Leaper WaferScan Toolkit
中文 / English 2.x
Public Member Functions | Properties
ILCalibBoard Interface Reference

This interface provide functionalities of the calibration board. More...

Inheritance diagram for ILCalibBoard:
ILObject LCalibBoard

Public Member Functions

LPVErrorCode Detect (ILImage *img, ILCalibPointPairs **pointPairs)
 
LPVErrorCode DetectInRegion (ILImage *img, ILRegion *region, ILCalibPointPairs **pointPairs)
 
LPVErrorCode GeneratePointPairs (ILPoints *imgPoints, ILCalibPointPairs **pointPairs)
 
- Public Member Functions inherited from ILObject
ILObjectCopy ()
 
LPVErrorCode Load (LString filename)
 
void Reset ()
 
LPVErrorCode Save (LString filename)
 
BOOL Valid ()
 

Properties

BOOL AutoRemoveBad [get, set]
 Whether to evaluate and automatically remove bad points found in detection. By default, it's off.
 
double BoardThickness [get, set]
 The thickness of the calibration board, in the same unit as SquareSize.
It will help compensate the calibration error due to mismatch of plane of calibration and detection, when using the Pinhole calibration model.
 
LPVCalibBoardType CalibBoardType [get, set]
 The type of the calibration board.
 
int GridHeight [get, set]
 The height for the calibration board's grid, at least 3.
Not needed for the distributed Charuco board, as it's embedded in the calibration pattern.
 
int GridWidth [get, set]
 The width for the calibration board's grid, at least 3.
Not needed for the distributed Charuco board, as it's embedded in the calibration pattern.
 
BOOL GuessPartialBlock [get, set]
 Whether to enable guessing and detection of the corners in partial blocks, for the distributed Charuco board. It results in more corner results, but those guessed ones may be less accurate. By default, it's on.
 
BOOL InvertBlock [get, set]
 Whether to invert the block. Turn it on when you invert the source image captured. By default, it's off.
 
double MarkerSize [get, set]
 The marker size for the distributed Charuco board, in the same unit as SquareSize.
By default, it's 0 means the marker size is 80% based on the square size.
 
double SquareSize [get, set]
 The square size for the calibration board.
For the chessboard or distributed Charuco board, it means the size of a black square.
For the circle grid board, it means the distance between the two nearby circle dots' centers.
 
BOOL StartFromCetner [get, set]
 Whether the start point is moved to the center position of the grid. By default, it's not enabled and the top-left corner is treated as start point.
 
double StartX [get, set]
 The x-coordinate world position for the first start point of the board. It is usually the top-left corner of the grid, or the center position if StartFromCetner is enabled.
For circle grid board with empty mark, it's the world position of the origin point.
For distributed Charuco board, this setting does not take any effect, as the world positions are completely dependent on the local patterns.
 
double StartY [get, set]
 The y-coordinate world position for the first start point of the board. The start point is usually the top-left corner of the grid, or the center position if StartFromCetner is enabled.
.
 
double StepX [get, set]
 The horizontal step used to generate the output world positions, applied before SwapXY. It is the moving distance in world coordinates from the start point and the point right to it in the image grid. It should be positive for x axis towards right and negative for left.
 
double StepY [get, set]
 The vertical step used to generate the output world positions, applied before SwapXY. It is the moving distance in world coordinates from the start point and the point below it(in the next row) in the image grid. It should be positive for y axis towards down and negative for up.
 
BOOL SwapXY [get, set]
 Whether to swap the x/y coordinate of the output world positions.
 
BOOL UseFittingMethod [get, set]
 Whether to use fitting method for sub-pix pattern corner detection. By default, it's off.
For the chessboard or distributed Charuco board, it uses the line-fitting method to find the chessboard corners. For the circle grid or EM circle grid board, it uses the ellipse-fitting method to find the dots' centers.
 

Detailed Description

This interface provide functionalities of the calibration board.

The calibration board is used to detect and generate image and world point pairs for calibration. We currently support the following 4 types of boards:


The classic chessboard calibration board and symmetric circle grid calibration board


Our patented distributed Charuco calibration board which is much more convenient and helpful for the calibration of a camera array.


The novel EM circle grid calibration board which has an empty mark. It's designed for the hand-eye calibration, the overall pattern is very simple for laser printing. The empty marker is used to specify the orientation and origin position of the axes:



To use this interface, you should create a LCalibBoard object.

Example Code

Member Function Documentation

◆ Detect()

LPVErrorCode Detect ( ILImage img,
ILCalibPointPairs **  pointPairs 
)

Detect the calibration pattern on the provided image, and report the generate image and world point pairs.

Parameters
[in]img The input image.
[out]pointPairsReturn the collection of image and world point pairs.
Return values
errorReturn error code if anything is wrong.

◆ DetectInRegion()

LPVErrorCode DetectInRegion ( ILImage img,
ILRegion region,
ILCalibPointPairs **  pointPairs 
)

Detect the calibration pattern on the provided image and region, and report the generate image and world point pairs.

Parameters
[in]img The input image.
[in]regionThe input region, to limit the region of detection.
[out]pointPairsReturn the collection of image and world point pairs.
Return values
errorReturn error code if anything is wrong.

◆ GeneratePointPairs()

LPVErrorCode GeneratePointPairs ( ILPoints imgPoints,
ILCalibPointPairs **  pointPairs 
)

Generate the point pairs based on the given image points.
The input image points will be sorted by rows then left to right, while the corresponding world points are built with the current calibration board setting such as grid and square size from the top-left corner (Except for the circle grid calibration board with empty mark, whose axes' directions are recognized from the distribution of the image points).

Parameters
[in]imgPointsThe input image points, usually they are collected from other locating tools.
[out]pointPairsReturn the collection of image and world point pairs.
Return values
errorReturn error code if anything is wrong.
See also
CalibBoardType, GridWidth, GridHeight, SquareSize, StartX, StartY