From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Image Comparison

 

Hello 

I want to compare two images. I am able to capture the image using frame grabber, Now I want to verify if the captured image is same as the stored reference image.

Now basically my images will be a specific pattern combination of Red, Yellow , Green, white and Black. I want to compare both pattern as well as the color of the two images.

Currently I am individually extracting each color using IMAQ Threshold from both the images and doing a IMAQ absolute difference to find if both the images are identical.

 

What is the most accurate way to do this?

 

 

0 Kudos
Message 1 of 5
(5,181 Views)

Hello,

Have you tried to IMAQ substract, pane by pane? I would try that and then on each of the result images I would histogram variance (or standard deviation) to quantify the difference pane by pane.

 

Clipboard01.png

 

See attached VI in LV 2012SP1


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 2 of 5
(5,174 Views)

Hello,

 

perhaps you could also give it a go with SSIM (structural similarity) on each seperate color plane? Try looking at IMAQ SSIM.

 

Best regards,

K


https://decibel.ni.com/content/blogs/kl3m3n



"Kudos: Users may give one another Kudos on the forums for posts that they found particularly helpful or insightful."
0 Kudos
Message 3 of 5
(5,141 Views)

Hi,

 

Can you please explain what exactly is the score that is returned by the SSIM vi?

Is it only useful for judging the quality of the image or can it also be used for comparison of two different image?

0 Kudos
Message 4 of 5
(5,067 Views)

When you want to know how vision finctions work, a good source is : C:\Program Files\National Instruments\Vision\Documentation\NIVisionConcepts.chm

And it's also on the web : http://zone.ni.com/reference/en-XX/help/372916P-01/nivisionconcepts/structural_similarity_index/

 

If you search for SSIM in the help file you will find the formulas and concepts. I am not familiar with SSIM myself so I won't be able to give you more than that, but I'm pretty sure you can find usefull info on the web.

 

Hope this helps


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 5 of 5
(5,065 Views)