Spatial Calibration
Table of Contents
Description
Spatial calibration refers the process of correlating the pixels of an acquired image to real features in the image. This process can be used to make accurate measurements in real-world units (instead of pixels), and to correct for camera perspective and lens distortion. This is different from hardware calibration, which involves adjusting the A/D converter output to output a specific digital value for a given video signal voltage. Related to this is intensity calibration, which correlates digital pixel values to light intensities (as in a light meter).Spatial calibration produces a mapping to tell you how each pixel relates to a real-world location. The image data itself is unaffected by this process. Image correction actually applies the learned calibration information to remove camera perspective or lens distortion effects from an image. This process is computationally intensive, so in many cases you would prefer to just store the calibration results with the image and apply it as necessary (for example, you might correct two single pixels in order to measure the real-world distance between them).
Three levels of spatial calibration provide the capability to correct various types of distortions in images. A simple calibration assumes the camera is perpendicular to and far away from a scene, so perspective and lens distortion are negligible. It can compensate for non-square pixel sizes and convert pixels to real-world coordinates. A perspective calibration corrects for effects arising from the camera viewing the scene from an angle, and applies a linear correction based on the geometry of the situation. Nonlinear calibration is the most comprehensive type, and is capable of correcting radial lens distortion, as well as any other kinds of localized distortions arising from lens defects, atmospheric conditions, irregular image surfaces, etc. There is one example below for each of the above situations, as well as one which illustrates some of the data conversions necessary to allow the user to select a coordinate system in an existing image window.
There are excellent overviews and illustrations of these calibration issues in the IMAQ Vision Concepts Manual, as well as a condensed version in the IMAQ Vision for LabVIEW User Manual. A sample calibration grid image can be found with the IMAQ Vision installation documentation at Start>>Programs>>National Instruments>>Vision>>Documentation>>Calibration Grid.pdf. A more precise result can be achieved using a high-quality optical calibration grid from an optical supplier such as Edmunds Industrial Optics (www.edmundoptics.com).
Common Applications
All gauging applications, and situations where logistics dictate an imperfect camera positioning.
What To Expect
Measurements made on an image will correspond very closely to actual distance or size measurements.
Related Links:
Calibration Examples
IMAQ Vision Concepts Manual
IMAQ Vision for LabVIEW User Manual
Reader Comments | Submit a comment »
Legal
This tutorial (this "tutorial") was developed by National Instruments ("NI"). Although technical support of this tutorial may be made available by National Instruments, the content in this tutorial may not be completely tested and verified, and NI does not guarantee its quality in any way or that NI will continue to support this content with each new revision of related products and drivers. THIS TUTORIAL IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN NI.COM'S TERMS OF USE (http://ni.com/legal/termsofuse/unitedstates/us/).
