10-20-2012 11:11 AM
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.
10-22-2012 04:18 PM
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?
10-22-2012 05:47 PM
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.
Here is the error.
10-23-2012 02:37 PM
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.