Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

"Insufficient number of calibration feature points" in Learn Calibration?

Solved!
Go to solution
Highlighted

I suspect that IMAQ Learn Calibration Template VI may be bugged, as I can't make it work for sparse reference points.

 

I get error -1074396116, even when I'm passing more than 4 reference points, as specified by the help.

 

I've remarked these posts, http://forums.ni.com/ni/board/message?board.id=200&requireLogin=False&thread.id=10257, http://forums.ni.com/ni/board/message?board.id=200&message.id=17400&requireLogin=False, where the problem seems unsolved. The sample VI provided by the first poster, http://forums.ni.com/ni/attachments/ni/200/10279/1/Reference_Points1.vi, is not working for me either.

 

My setup is LV9 on winXp32, 640x480 8 bit grayscale image. What I'm trying to do is not the subject of the post, the potential bug is.

 

Can someone provide a working example? Calibration examples included in the example finder use calibration grids, not sparse reference points AFAIU.

 

Thanks in advance, Enrico

Message 1 of 10
(3,354 Views)
Highlighted
Solution
Accepted by topic author Enrico_Segre

After a little experimentation with the VI provided by the first poster (Attached my small modification), I'm realizing that perspective calibration seem to need a minimum of 5 points, whereas nonlinear need a minimum of 9. So there is a documentation bug. Can this be confirmed?

Thanks, Enrico

 

Message 2 of 10
(3,352 Views)
Highlighted
0 Kudos
Message 3 of 10
(3,333 Views)
Highlighted

I've seen that. It does not look relevant to me. The poster mentions the same error, but no explanation is finally given about why.

 

As I wrote above, this seems a documentation bug - added to the fact that no detail is given about the calibration algorithm internally used (cfr. also the complaint in this thread).

 

Enrico

0 Kudos
Message 4 of 10
(3,328 Views)
Highlighted
I think your second post hit the nail on the head.  The minimum number of points for any setting is actually four points, but the documentation should reflect the fact that this changes depending on the Distortion setting.  This was reported to R&D (#194882) for further investigation.
Alex Person
NI-RIO Product Support Engineer
National Instruments
0 Kudos
Message 5 of 10
(3,308 Views)
Highlighted
Hi Alex

good to know that the matter is being taken care of. However, I don't understand your statement:

  "The minimum number of points for any setting is actually four ... this changes depending on the Distortion setting"

So is it four or not? Do you perhaps mean that the setting needing the least (Simple Calibration, I presume) needs 4, but other settings need more, as I discovered?

Thanks, Enrico

0 Kudos
Message 6 of 10
(3,282 Views)
Highlighted
The latter-one of the settings only requires 4 points while others require more.  So, the documentation is technically correct but is missing some information.
Alex Person
NI-RIO Product Support Engineer
National Instruments
0 Kudos
Message 7 of 10
(3,271 Views)
Highlighted

I ran into the same error code attempting to use four points and Perspective calibration.  In my case, the error description was not indicative of the real problem, which I was able to resolve as follows: The error was induced because some of the image coordinates I used were outside the bounds of the image.  This was caused by collecting the points using the Coords node on a MouseMove event on the image indicator, which yields coordinates on the indicator, not pixels in the image.  It was corrected by using the CtlRef and the Last Mouse Position property.

Code_Snippet.JPG

I hope that helps.  -Wes-

0 Kudos
Message 8 of 10
(2,498 Views)
Highlighted

I found your post after finding inherited code that worked correctly under LabVIEW 7.1.1 FDS (& LV711 runtime engine) stopped working under LV2011 and LV2012

 

I stripped out the 'IMAQ Learn Calibration Template' and wrote a stand alone VI that was very similar to your 'Reference_Points1' which still generates the -1074396116 error, unless I cut and paste your pixel and real world coordinate data into my reference points control.

 

My points are an offset 3x3 grid which have both positive and negative values - which by trial and error I found was the problem.

 

This function doesn't like negative pixel values, which it used to in LabVIEW 7.1.1 - my Pixel data are actually either ADC or DAC readings returned from the device under test, while the real world coordinates are the position of a laser beam as measured by a calibrated vision system.

 

Message 9 of 10
(2,308 Views)
Highlighted

I don't know if there was any evolution of the 'IMAQ Learn Calibration Template' and its bugs across versions. As noted above, what I did more than three years ago was in LV2009.

If you haven't yet found out, for that kind of application I moved away from the LV builtin calibration later on because I was VERY dubious about its algorithm, and am using since then vanilla polinomial coordinate mappings. Have you seen this thread?

 

Enrico

0 Kudos
Message 10 of 10
(2,304 Views)