02-04-2009 12:06 PM
I am using NI Vision tools to calibrate for nonlinear distortions by imaging a calibration image of unfirmly spoaced dots. I propagate this calibration information in order to calibrate a series of images taken under the same conditions as my calibration grid. I then need to correct these images before I can make dimensional measurements. (Due to the nature of the measurement processing routine I require that these images be corrected first). I also need to input the real-world conversion information for the corrected images to this measurement processing routine. I obtain this by using the Convert Pixel to Real World.vi for each and every pixel within the image in order to see any variability within the image. I would assume that this conversion value would be uniform thoughout the image but it is not, and varies up to 10%.
Can anyone help explain what might be going on?
Secondly, in correcting my images I only have the interpolation methods: zero order and bilinear. The quadratic and cubic spline are greyed out. Not sure why this is?
Thanks
Dan
Solved! Go to Solution.
02-04-2009 04:23 PM
The NI calibration routines connect the dots in your calibration grid to get a distorted grid. Each distorted square in the grid is corrected to a true square using bilinear interpolation. The NI calibration routines ignore the fact that the lines connecting the dots would be curved, not straight. That introduces the errors you see.
To improve your results, you might be able to use a finer grid of dots. That would reduce the size of each square in your corrected image and reduce the errors.
The only other option would be to write your own calibration routines that handle nonlinear distortion better. I have done that for specific applications, and it is not easy.
Bruce
02-05-2009 02:36 PM
Bruce,
I folllow that the errors are inherent in the bilinear interpolation method used for calibration. But even when I set my camera as close to aligned with my image plane as I can (so that I am only seeing perspective error; and my lens has very small nonlinear distortion) I still see siginificant error in my mm/pixel. The errors seem to occur at the edges of my grid and are also present if I use a perspective only calibration. Is this typical?
Also, the way I am calculating my mm/pixel is by taking my calibrated image from the Learn Calibration.vi and using the Convert Pixel to Real-World.vi, looping through every pixel in the image, to get mm/pixel at each and every point. Does this seem correct?
Thanks
Dan
02-05-2009 06:00 PM
One other detail - the NI calibration results are only valid within the calibration grid. The numbers go crazy anywhere outside the grid. They also get a little goofy on the borders between squares.
Looping through every pixel is one way to do it, but it is kind of slow. The only other possible approach I can think of is mapping the image to a corrected image. You can see distortions that way, but you wouldn't have measurements for them. I might consider checking every other pixel, since the scaling factors don't change too rapidly.
Bruce