Image comparison and compression

조회 수: 4 (최근 30일)
aravind`
aravind` 2012년 2월 1일
편집: Alex Taylor 2013년 10월 4일
I am doing project based on image comparison. I need to compare two images. I use basic pixel by pixel comparison . If the images are of different size the comparison can not be done. So i was planning to compress the image to make them of same size(Resolution). But while compressing the image the pixel value might change (i am not sure about whether they will change or not ? correct me if im wrong) So in that circumstances pixel by pixel comparison may not be an efficient method. Can any one please help me with this. Please.

채택된 답변

Walter Roberson
Walter Roberson 2012년 2월 1일
I think you mean "resize" rather than "compress".
Yes, resizing images will generally change pixels.
What you should do about the change of pixels depends upon what you mean by "image comparison".
If I have a picture that is a green background (square) that has a purple circle and an orange triangle inside it, and I create a second image in which I leave all the sizes and shapes exactly the same, but change the colors to yellow, red, and brown, then should the images compare as being fairly similar (same object shapes, same sizes and positions), or should the images compare as being completely different (since not one pixel is the same color) ?
  댓글 수: 6
aravind`
aravind` 2012년 3월 6일
Sir i am actually considering two images has exactly same scene in it. No change in brightness or any other property but only in their size. And if i check if they are same or not i should get the correct result. can u help me with this?
Image Analyst
Image Analyst 2012년 3월 6일
Call imresize, then subtract them and see if the sum of the differences of all the pixels is less than some value that you specify.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Image Segmentation and Analysis에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by