Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Generate template for IMAQ Match Pattern 4

I am trying to create a VI where I can create and save two template files for later use with IMAQ Match pattern 4. But when I am trying to read the template files and use them in Match pattern I get "Invalid template descriptor" error. See picture below. Any idea what I am doing wrong?

 

It works fine when I use the template files directly without storing it in a png file first. Seems to be some problem related to appending vision information to the png. file.

template error.png

0 Kudos
Message 1 of 5
(5,243 Views)

Are template files created with no errors?  Have you tried to load the templae files into vision assistant?  I have seen issues where if the image area is too small it will cause an error.

 

Matt Fitzsimons
NI Alliance Member
LabVIEW Champion
NI Certified LabVIEW Architect
LabVIEW, LV-RT, Vision, DAQ, Motion, and FPGA
Message 2 of 5
(5,208 Views)

Thanks for your response. Templates are created just fine without any errors. And it is possible to use them for pattern matching from vision assistant. 

 

The VI seems to work if I use "Low Discrepancy Sampling" instead of "Grayscale value pyramid" even though I "train" the template for all algorithms.

 

0 Kudos
Message 3 of 5
(5,195 Views)

I think it is one or the other as far as the algorithm.  Grayscale Value Pyramid creates a much larger template file size than Low Discrepancy Sampling.  Good thing is that you got it working.

Matthew Fitzsimons

Certified LabVIEW Architect
LabVIEW 6.1 ... 2013, LVOOP, GOOP, TestStand, DAQ, and Vison
0 Kudos
Message 4 of 5
(5,162 Views)

Ok, thank you for your comments. As far as I can see Low Discrepancy Sampling- method seems to work OK for my application. 

0 Kudos
Message 5 of 5
(5,152 Views)