Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Compare two different images

Hi,
I have two images of different sizes.I am trying to compare two images and remove all the pixels in Image A which are NOT present in Image B.I tried to this using IMAQ Compare which does exactly the opposite, i.e., removes those pixels, from Image A, which are in Image B.If anybody has done this before, plz send me ur suggestions.
Thanx
Deepak
0 Kudos
Message 1 of 2
(3,795 Views)
Deepak,

I'm not sure what you want to do about the images of different sizes. If you are trying to locate a smaller image within a larger image, you will need to use pattern matching or correlation. If you are trying to compare equal sized regions, you can do direct pixel to pixel comparisions.

One possibility would be using IMAQ Compare to remove the matching pixels, then subtract the resulting image from the original, which would only leave the matching pixels. This would only work on exact matches. If there is any noise in the image, you won't get an exact match on most of the pixels.

If you are using binary images, you can just AND the two images together, and the resulting image is only the pixels that are common between the two.

Bruce
Bruce Ammons
Ammons Engineering
Message 2 of 2
(3,795 Views)