Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI
This Document is not yet Rated  Rate this Document

Matching Vision Assistant Settings for Learn Pattern2 in LabVIEW and C

Primary Software: Vision Assistant
Primary Software Version: 8.10
Primary Software Fixed Version: N/A
Secondary Software: N/A

Problem:
When a pattern template is created in Vision Assistant for pattern matching steps, I am forced to save it as a separate .PNG file. If I convert this Vision Assistant script into a LabVIEW VI or C code, the resulting code uses the .PNG file as a hardcoded template in the script and does not expose what parameters Vision Assistant used to create the template file. If I try to create a similar template using default settings in LabVIEW or C, the pattern matching score is not the same.

What settings does Vision Assistant use to create its patterns, so that I can use them in C or LabVIEW?

Solution:
When Vision Assistant learns the template from an image, it uses the IMAQ Setup Learn Pattern2 VI and the IMAQ Learn Pattern2 VI. The block diagram for this looks like the following:

Vision Assistant's Learn Pattern settings shown as LabVIEW VIs

The C equivalent of this code would be
int imaqLearnPattern2(image, IMAQ_LEARN_ALL, NULL);

Where image in both cases is the input image. Either of these methods should result in an identical pattern matching score to the one Vision Assistant returns given the same source image and ROI.

Related Links:

Attachments:





Report Date: 03/24/2008
Last Updated: 03/28/2008
Document ID: 4JNHMA3H

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit