Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

IMAQ Learn Pattern 2.vi -1074395247 error

Solved!
Go to solution

Hi,

 

Development Environment:

  • LabVIEW 2012 32-bit (12.0f3)
  • Vision 2012

Description:

Can anyone please shed some light on what ROI Descriptors types are allowed for IMAQ Learn Pattern 2?. Are only certain ROI types allowed for this VI, or can you use any type? I am attempting to create a template image with a mask - The ROI Descriptors type is set to polygon - is this valid or possible?

 

I get the -1074395247 error: "Invalid template descriptor".

 

However, just by simply changing the ROI type to Rectangle (and the coordinates to suit), I do not get this error (although this does not correctly mask out the pixels I don't need)

 

Thanks!

 

Christopher Farmer

Certified LabVIEW Architect and LabVIEW Champion
DQMH Trusted Advisor
https://wiredinsoftware.com.au

0 Kudos
Message 1 of 5
(3,949 Views)

Hi Chris,

 

I would consult this KnowledgeBase article which points out why the error is occurring: http://digital.ni.com/public.nsf/allkb/F05924D50AD6472B86256F320075CDBF

 

Further there should be an example available for this particular VI and its usages with this directory: 

  • LabVIEW\examples\Vision\2. Functions\Pattern Matching\Pattern Matching Example.llb 

Thanks!

Matt S.
Industrial Communications Product Support Engineer
National Instruments
0 Kudos
Message 2 of 5
(3,934 Views)
Thanks Aix-La-Chapelle for the quick response.

I did read that article, and I have several cases where I am using the Learn Pattern 2 vi with success. However I cannot seem to get it to work with the polygon type. I am hoping someone can confirm that this should be ok.
Christopher Farmer

Certified LabVIEW Architect and LabVIEW Champion
DQMH Trusted Advisor
https://wiredinsoftware.com.au

0 Kudos
Message 3 of 5
(3,929 Views)
Solution
Accepted by topic author ChrisFarmerWIS

Hi Chris,

 

I believe you should be able to create an ROI with a polygon.  Please see this example: https://decibel.ni.com/content/docs/DOC-25241

 

Thanks!

Matt S.
Industrial Communications Product Support Engineer
National Instruments
0 Kudos
Message 4 of 5
(3,919 Views)

Thanks Matt for your help.  That is a good example.

 

I had some success yesterday.  I was able to get it working most of the time, although it can be quite fussy.  It would be good if there were some guidelines for what ROIs are acceptable, and what aren't.

 

It appears that if you make the ROI too small in size, then it results in the aforementioned error (-1074395247). In addition, the "Broken line" type seems to throw this error quite frequently too.

 

Christopher Farmer

Certified LabVIEW Architect and LabVIEW Champion
DQMH Trusted Advisor
https://wiredinsoftware.com.au

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