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
Solved! Go to Solution.
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?
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).
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?
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.
I hope that helps. -Wes-
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.
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?