LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Image comparision using pattern method

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

0 Kudos
Message 1 of 14
(3,233 Views)

What type of image you will have to compare...? Can you post a sample Image?.

-----

The best solution is the one you find it by yourself
0 Kudos
Message 2 of 14
(3,231 Views)

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

0 Kudos
Message 3 of 14
(3,219 Views)

Hi Ganesan,

 

The 'image data' output are same for different *.bmp images.

 

Hence it gives always true output even for the different images.

 

 

0 Kudos
Message 4 of 14
(3,207 Views)

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

Download All
0 Kudos
Message 5 of 14
(3,204 Views)

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

Download All
0 Kudos
Message 6 of 14
(3,202 Views)

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.... Smiley Wink

-----

The best solution is the one you find it by yourself
0 Kudos
Message 7 of 14
(3,193 Views)

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

0 Kudos
Message 8 of 14
(3,152 Views)

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

0 Kudos
Message 9 of 14
(3,143 Views)

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.

 

 

0 Kudos
Message 10 of 14
(3,118 Views)