CalibrateAdvanced

Utilizing one to thirty-two user-specified points, CalibrateAdvanced creates a 2D transformation to convert between pixel and real-world coordinate systems. In this process, CalibrateAdvanced accounts for linear and non-linear distortion, and offers a higher degree of accuracy than Calibrate, when five or more point pairs are used.

About CalibrateAdvanced

Just like the Calibrate function, the CalibrateAdvanced 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.

And, like the Calibrate function, CalibrateAdvanced requires the extraction of features from an image using a vision tool. The difference between the two functions, though, is in terms of how many features can be utilized as locations, and how those feature locations are entered as both real-world and pixel coordinates. CalibrateAdvanced allows from one to thirty-two pixel and real-world coordinate pairs, which are called point pairs, versus the four point pairs required by Calibrate.

Using CalibrateAdvanced, during the calibration phase an image is acquired that contains from one to thirty-two different 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.

Note: The origin of the pixel coordinates is always the upper-left corner of the upper-left pixel.

Next, both the pixel and real-world coordinates are entered as arguments; for the pixel coordinates, a cell reference to a vision tool's Row and Column values can be used, while a numeric value can be entered to express the real-world coordinates. Then the tool computes the 2D transformation between the real-world and pixel coordinates, producing a Calib structure that represents the transformation.

Note:
  • CalibrateAdvanced does not have a property sheet; it is based on one to thirty-two variable arguments expressed by the number of point pairs. For instance, if a CalibrateAdvanced function was inserted into the spreadsheet, and was utilizing an ExtractBlobs function that reported five different blobs to calibrate the system, the pixel coordinates would be expressed as cell references to the reported Row and Column values of the ExtractBlobs tool. Then, the world coordinates would be set according to the specific real-world value, resulting in the following formula: CalibrateAdvanced($D$11,$D$12,0,0,$E$11,$E$12,2,0,$F$11,$F$12,2,2,$G$11,$G$12,0,2,$H$11,$H$12,1,2).
  • The maximum string length allowed in a cell is 255 characters. If more than 255 characters are used to specify the variable arguments, an error message will be displayed. When a string used to specify the variables arguments exceeds the 255 character limits, use a cell range. The real-world coordinates can also be included in a cell range by entering the X and the Y values directly into the cells. For example, when specifying thirty-two point pairs using a cell range, the following formula could be used: CalibrateAdvanced(C11:F42).

CalibrateAdvanced performs the following transformations:

  • Translation in two dimensions (using 1 or more point pairs).
  • Rotation about three axes (using 4 or more point pairs).
  • Scale in two dimensions (using 2 or more point pairs).
  • Perspective distortion (using 4 or more point pairs).
  • Parallelogramming or skewing (using 4 or more point pairs).
Note:
  • 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.

CalibrateAdvanced Inputs

Syntax: CalibrateAdvanced(Pixel Point 0.Row,Pixel Point 0.Column,World Point 0.X,World Point 0.Y,...,Pixel Point 31.Row,Pixel Point 31.Column,World Point 31.X,World Point 31.Y)

Parameter Description

Pixel Point 0-31

Specifies the pixel coordinates of a pixel-to-world association.

Row

The image row coordinate.

Column

The image column coordinate.

World Point 0-31

Specifies the real-world coordinates of a pixel-to-world association (-16777216 to 16777216).

X

The x-axis coordinate, as a world value.

Y

The y-axis coordinate, as a world value.

CalibrateAdvanced Outputs

Returns

A Calib data structure containing the coefficients that define the transformation between the two coordinate systems.