How to compare two bitmap images

Started by Archive, May 12, 2010, 08:54:28 AM

Previous topic - Next topic

Archive

[Originally posted by aj on 2008-11-28 03:54:58-08]

hi

I want to know how to compare two bitmap files (.bmp) files.

Please let me know as soon as possible.

Thanks
Ajay

Archive

[Originally posted by exiftool on 2008-11-28 11:17:14-08]

Hi Ajay,

If you are in such a hurry, some details would help.  Here is
one technique, but I doubt this is what you meant:

Code:
diff a.bmp b.bmp

This does a binary comparison of the two files using the
Unix "diff" command.

- Phil

Archive

[Originally posted by rogerhoward on 2008-12-05 23:17:33-08]

Define "compare".

If you want to compare the actual image content - for instance, creating a difference map of two images to see if any pixel values are different - then look at the tool called (amazingly) "compare" from ImageMagick.

Otherwise, what exactly are you looking to do? Compare metadata? BMPs don't generally have anything beyond the implicit (width, height, bit depth, etc).

Archive

[Originally posted by ajay12 on 2008-12-06 16:29:20-08]

Hi Phil

I have captured two bitmap images (.bmp)files of a web page.

The images are images of a web page. Both the images contain alphabets and some pictures.

But the second image has some error. Some texts and some images are missing on the second image file as compared to the first image file.

Now i have to compare the two images and give a output that there is a difference between the two bitmap images. Now i am trying to give only a message that says that the second image has got some error.

But i am also trying if the output result can also show the difference between the bitmap images.

I am new to perl but i am trying my best to find the solution for the problem.

Please let me know how i can proceed further.

Thanks,
Ajay

Archive

[Originally posted by ajay12 on 2008-12-06 16:40:06-08]

Hi Rogerhoward

Here is what i am trying to do.

I have captured two bitmap images (.bmp)files of a web page. The images are images of a web page. Both the images contain alphabets and some pictures. Both the images are same but a slight error is their in second image. The second image has some error. Some texts and some images are missing on the second image file as compared to the first image file. Now i have to compare the two images and give a output that there is a difference between the two bitmap images. Now i am trying to give only a message that says that the second image has got some error. But i am also trying if the output result can also show the difference between the bitmap images. I am new to perl but i am trying my best to find the solution for the problem. Please let me know how i can proceed further.

If you want to some more details please ask me.

Thanks, Ajay

Archive

[Originally posted by exiftool on 2008-12-06 20:41:55-08]

Hi Ajay,

Since you're dealing with image data, you should be using ImageMagick
as Roger suggested.  ExifTool deals with metadata only.

- Phil

Archive

[Originally posted by aj on 2008-12-08 08:46:45-08]

Hi Phil,

I am new to perl. I had started four weeks ago.

Will you please let me know how can i use ImageMagick to compare bitmaps images.

Also please let me know some good resources or tutorial to learn ImageMagick.

Thanks,
Ajay