LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I use find coordsys(pattern)2 to locate for template in an image when the image is threshold-ed?

I'm trying to locate for a template in an image, and the image is threshold-ed. I tried to threshold both the template and the image to try if it can locate the template, but there was an error, it said that the template has not enough contrast or something like that? Please help me, thank you.

 

0 Kudos
Message 1 of 4
(2,378 Views)

Hello,

 

It sounds like your template image is not well-defined enough to act as a template for your target image. What threshold value are you using? Also, what images are you using?

 

Finally, what is the exact error message and error number?

Colden
0 Kudos
Message 2 of 4
(2,339 Views)

template.png

Here is what I tried to do, I used a AutoBthreshold2 and I didn't set a value to it. The image is attached below and the template. Thank you.

 

Untitled.png

 

Here is the error.

Download All
0 Kudos
Message 3 of 4
(2,335 Views)

Hello Pinkman,

 

The first error you're getting is described in this knowledgebase article:

http://digital.ni.com/public.nsf/allkb/f05924d50ad6472b86256f320075cdbf?OpenDocument

The conclusion is that you need to pick a replacement color that is high enough contrast for the image. For thresholded images, I played around with it a bit, and found that teal ("5" on the input of "replacement value") works fine. Then you still get errors finding the image. This is explained in this knowledgebase article:

http://digital.ni.com/public.nsf/allkb/A3A6AE15BE2100C0862574E500553547?OpenDocument

The article is about the vision assistant, but it still works fine as long as you use the "IMAQ Equalize" VI before using Find Coordinate System.

Colden
0 Kudos
Message 4 of 4
(2,322 Views)