Collection of calibration line scan functions. More...
Static Public Member Functions | |
static Point2Dd[] | CalculateTwoPointsForCalibrationOfMovement (ImagePlane imagePlane, Area2D aoi, CalibrationPatternContrast contrast, int minContrast, ValueRange< double > pointSizeRange, ScanDirection scanDirection) |
Extracts two points which can be used for the calibration of the movement of line scan cameras. More... | |
static EdgeDetectionResult | DetectEdgesOfStripeTarget (Image imageStripes, Rect aoi, int numStripes, ScanDirection scanDirection, double threshold) |
This function detects edges from a calibration pattern with alternating black and white stripes. More... | |
static LineScanCalibrator | CreateLineScanCalibration (Point2Dd calibrationPoint1, Point2Dd calibrationPoint2, double referenceDistanceCalibrationPoints, EdgeDetectionResult edgeDetectionResult, double referenceWidthStripes, LineScanCalibrationConfiguration configuration) |
This function calibrates linescan cameras. More... | |
Collection of calibration line scan functions.
|
static |
Extracts two points which can be used for the calibration of the movement of line scan cameras.
The output of this function serves as input for the linescan calibration process executed by the CreateLineScanCalibration function. If the image contains more than two points, the points which are nearest to the top and bottom edge(or left and right edge if ScanDirection is Y) are chosen.
imagePlane | An image plane containing the calibration points. |
aoi | Area of interest where the calibration points can be found. |
contrast | Selects whether the image shows white on black or black on white dots. |
minContrast | Minimum gray value contrast between the object and the background of the calibration points. Value to be set depends on the quality of the image taken. |
pointSizeRange | The minimum and maximum size of the markers in the image in [number of pixels]. |
scanDirection | Scan direction of the camera. |
|
static |
This function calibrates linescan cameras.
This function estimates coefficients of a 3rd order polynomial which calibrates linescan cameras. The polynomial corrects lens distortion as well as the camera's direction of movement (described by a scaling factor).
For the estimation of the lens distortion correction a pattern with alternating black and white stripes where the width of the stripes referenceWidthStripes is precisely known has to be acquired. For the camera's direction of movement a target with two circular markers can be used. The distance between the calibration points referenceDistanceCalibrationPoints has to be known, too. Note, that referenceWidthStripes and referenceDistanceCalibrationPoints must be provided in the same units.
In a first step the edges of the stripe target have to be detected via function DetectEdgesOfStripeTarget.
Second the two markers have to be extracted from the image via function CalculateTwoPointsForCalibrationOfMovement. Note, that if the encoder step of your setup is precisely known (e.g. in [mm / scanline]), you do not need to acquire an image with markers. You may manually define fictive calibration points and the corresponding reference distance:
calibrationPoint1 | First calibration point (left or top). |
calibrationPoint2 | Second calibration point (right or bottom). |
referenceDistanceCalibrationPoints | Reference distance between the two calibration points (same units as referenceWidthStripes ). |
edgeDetectionResult | Result returned by DetectEdgesOfStripeTarget. |
referenceWidthStripes | Reference width of stripes in calibration pattern ImageStripes (same units as referenceDistanceCalibrationPoints ). |
configuration | Configuration of the linescan calibration . |
|
static |
This function detects edges from a calibration pattern with alternating black and white stripes.
The output of this function is used by function CreateLineScanCalibration calculating the linescan calibration. This function internally calls Edge.FindAll, where all input parameter are described, too. For detailed information see the documentation of the CVB edge tool.
Note, that the given area of interest aoi must only cover areas with stripes.
imageStripes | Calibration pattern with alternating black and white stripes. |
aoi | Area of interest in the given image. |
numStripes | Number of stripes in the calibration pattern. |
scanDirection | Scan direction of the camera. |
threshold | Threshold for gray value change. |