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: 

Computing minimum contrast in template image

Hi all,

 

using the Pattern Matching 3 tool i found that minimum contrast could be useful. It will be interesting to calculate the minimum contrast in the template image and then use this value to set the same property of the setup match pattern VI. Problem is: i don't know how to calculate the minimum contrast in an image, any idea?

0 Kudos
Message 1 of 3
(4,154 Views)

Hello,

 

if you input value "0" to the minimum contrast, the value is computed by the algorithm.

 

Anyway, the contrast is the difference (in this case) between the maximum and minimum pixel value of the inspection image. Based on this, you can choose the minimum contrast.

 

In other cases, the contrast could also be defined as the ratio between the two.

 

 

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."
Message 2 of 3
(4,134 Views)

Thank you Klemen. I had made some experiments but i expected bigger improvements (in pattern matching 3) by changing the mentioned value. Seem to me that differences are minimal.

0 Kudos
Message 3 of 3
(4,113 Views)