Calibrate
Utilizing four, user-specified points, Calibrate creates a 2D transformation to convert between pixel and real-world coordinate systems. In this process, Calibrate accounts for linear and non-linear distortion.
The Calibrate function requires user-specified points, expressed in two different coordinate systems: The real-world physical coordinate system of the object being captured, and the pixel coordinates of the object's image. To accomplish this, Calibrate requires the extraction of features from an image using a vision tool. Then, those feature locations are entered as both real-world and pixel coordinates.
During the calibration phase, an image is acquired that contains features with known locations in real-world coordinates. Using a vision tool, such as ExtractBlobs, FindPatterns or FindLine, the features in the image are located and reported in pixel coordinates.
Next, both the pixel and real-world coordinates are entered as the Pixel Point and World Point parameters; for the Pixel Point coordinates, a cell reference to a vision tool's Row and Column values is used, while a numeric value is entered to express the World Point real-world coordinates. Then the tool computes the 2D transformation between the pixel and real-world coordinates, producing a Calib structure that represents the transformation.
Calibrate also accounts for the following transformations:
- Translation in two dimensions.
- Rotation about three axes.
- Scale in two dimensions.
- Perspective distortion.
- Parallelogramming or skewing.
- When using a Calibrate, CalibrateAdvanced or CalibrateGrid function, the physical and optical set-up (the lens, sensor and the physical relationship between the sensor and the scene being acquired) must be the same for both the calibration and run-time operation. If any of these items is altered, the system must be re-calibrated. Therefore, it is recommended that the same sensor and lens be used to both calibrate and process the run-time images. The sensor and lens must also retain their original set-up and calibration settings. For example, changing the acquisition format (by altering the resolution) or moving the sensor will invalidate the computed 2D transformation that maps pixel to real-world coordinates.
- The In-Sight 5604 line scan vision system only operates in pixel coordinates. While the Calibrate Functions may be added to a job running on an In-Sight 5604, they will produce inaccurate results.
Calibrate Inputs
Syntax: Calibrate(Pixel Point 0.Row,Pixel Point 0.Column,World Point 0.X,World Point 0.Y,Pixel Point 1.Row,Pixel Point 1.Column,World Point 1.X,World Point 1.Y,Pixel Point 2.Row,Pixel Point 2.Column,World Point 2.X,World Point 2.Y,Pixel Point 3.Row,Pixel Point 3.Column,World Point 3.X,World Point 3.Y,Show)
Parameter | Description | ||||
---|---|---|---|---|---|
Specifies the pixel coordinates of a pixel-to-world association.
|
|||||
Specifies the real-world coordinates of a pixel-to-world association.
|
|||||
Specifies the display mode for Calibrate graphics overlay on the image.
|
Calibrate Outputs
Returns |
A Calib data structure containing the coefficients that define the transformation between the two coordinate systems. |