Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Pattern Matching: Template image does not contain enough contrast.

Solved!
Go to solution

Hello,

 

I use the Pattern Matching.vi to get Information about the Glue that we apply on Products.

Unfortunately,  the Pattern Matching tool always answers with the Template Image beeing too low on contrast.

This case only Comes with the mask beeing applied. Without the Masking the vi runs perfectly.

I really Need the Masking to sort out other influences on the AOI (Automatic optic Inspection)

 

Maybe someone knows how I can solve the Problem 😃

 

PS: .vi and Pictures are all in Attachments!

 

Thanks a lot!

Jack

 

Download All
0 Kudos
Message 1 of 4
(3,063 Views)
Solution
Accepted by topic author xJack

Error Message -1074395235: The Contrast In The Template Is Too Low
The error is generated when the selected region does not contain enough information to create a useful template. Most often this is caused by an image not having very high contrast. This error can also be caused if the region specified is very small. There are two ways to fix the problem:

  • Increase the contrast of the image. If you choose to use this option you should also increase the contrast in all the images on which you will perform pattern matching in order to ensure the pattern is found.
  • Increase the size of your template. This will give the algorithm more information to create a valid template.

Ref:http://digital.ni.com/public.nsf/allkb/F05924D50AD6472B86256F320075CDBF#ContrastTemplateTooLow

-You have to provide little more information with the SubVIs and Sample Image as well.

-Read the help of IMAQ Mask.vi and how the images get modified with inputs.

Thanks
uday
Message 2 of 4
(3,020 Views)
Solution
Accepted by topic author xJack

Hi Jack,

out of curiosity I tested it with the high level vision assistant and it works with that one. So I would rather think that it is due to the configuration of your VIs.

I attached my code with the pattern that I used.

Cheers,

Niko

Niko NR
Systems Engineer, National Instruments
Download All
Message 3 of 4
(3,011 Views)

Hello,

 

Thanks for the Solutions.

Both the Vision Assistant and increasing template Information gives a good result.

 

Im glad you answerd so quickly.

 

Kind Regards

xJack

0 Kudos
Message 4 of 4
(2,995 Views)