12-16-2010 10:56 PM
Hi,
I have two image files X1.bmp and X2.bmp. I need a VI to compare these image files and get Boolean output as TURE when both images are identical, FALSE otherwise.
Please help me regarding this.
Many Thanks
Haneef
12-16-2010 11:45 PM
What type of image you will have to compare...? Can you post a sample Image?.
12-17-2010 03:14 AM
Hi Haneef,
Steps to compare two .bmp images
1. Read both the .bmp file using "Read BMP File.vi" which located under "Graphics&Sound" section in the funtion palatte.
2. Compare the "image data" output from the "Read BMP File.vi" using "Equal?" function
3. Combine all the boolean data from "Equal?" function to an array
4. Do "AND" operation
The output will be true if both mages are same
Ganesan Kani
12-17-2010 04:41 AM
Hi Ganesan,
The 'image data' output are same for different *.bmp images.
Hence it gives always true output even for the different images.
12-17-2010 04:46 AM
Hi Anand,
The images are attached in the following attachment.
Note: Convert those images into *.bmp before comparision. I cant Upload *.bmp files, hence uploaded *.png.
Haneef
12-17-2010 04:48 AM
Hi Ganesan,
The images are attached below for your ref.
Note: Convert those images into *.bmp before comparision. I cant Upload *.bmp files, hence uploaded *.png.
Regards
Haneef
12-17-2010 05:06 AM - edited 12-17-2010 05:07 AM
You can use the Pattern Matching VI that is already available with the LabVIEW Examples... Make a search in the Help files and use it....
12-20-2010 04:28 AM
Hi Haneef,
The image data output can't be same for different BMP images, also Its working fine with the images you have attached.
Can you pls upload your code??
Ganesan Kani
12-20-2010 05:30 AM
Hi Ganeshan,
I have attached the VI in the following attachment.
The 'image data' and 'image data2' are same though images are different.
Please confirm whether the method what I followed is correct.
Regards
Haneef
12-20-2010 11:06 AM
Your program is doing exactly what your code is intended to do.
If you want to compare the images, you will have to convert them into arrays(to get the intensity values), however, the intensity values might be different, but the images have the same shape, hence a correlation of the images will give u a better indication of how close they are in shape.