Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Invalid Template in Match Pattern - why?

I am trying to use the Match Pattern option on a 8-bit image in VB AI 2.5 [Create Template]. I consistently get an error 'Not a valid template'. My templates are in the range of 50 x 50 pixels, so I am not exceeding the size limitation noted in the knowledge base. If I do make a very small template, I do the useful message that my template is too small. So how do I find out what is wrong with my template? Thanks.
0 Kudos
Message 1 of 6
(3,833 Views)
Perhaps this is the same knowledgebase you have seen, but the 'How To Use Pattern Matching' knowledgebase has solutions to many common pattern matching errors.

How To Use Pattern Matching

If none of these seem to help, please post some more information - like a screen shot and the image/template you are using.
0 Kudos
Message 2 of 6
(3,820 Views)
Yes I read that knowledge base. I am unable to post the image due to some sensitivity. Could you let me know what you would do to try and run down the issue, and I could then perform them?
0 Kudos
Message 3 of 6
(3,799 Views)
I would first try performing a simple pattern match on a known 8-bit image to see if the image I am working with is possibly a different format or corrupted somehow. Attached is an 8 bit image from one of NI's Vision Builder for AI (VBAI) examples.

If that is successful, then I would run a conversion utility on my image to 'cast' it to an 8 bit image. Also attached is a simple conversion utility (requires LabVIEW 7.1 and Vision 7.1).

If the test on a known 8 bit image is unsuccessful, I would try opening some of the examples included with VBAI to double check and if all of them have errors, I would backup my work and reinstall VBAI.

I hope this helps,
0 Kudos
Message 4 of 6
(3,789 Views)
Turns out that I need write access to the VBAI directory (apparently it writes temp files here). When I install I have admin rights and everything works fine. However, when I run this as a User (not Admin), I did not have write rights to the VBAI2.5 directory.
0 Kudos
Message 5 of 6
(3,766 Views)
Thanks for letting me know the root of the problem. I added the solution to an online KnowledeBase to help others if they run into the same problem.

Happy Wiring!
0 Kudos
Message 6 of 6
(3,750 Views)