CVB.Net 14.0
CalibrationLineScan Class Reference

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, Area2D 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...
 

Detailed Description

Collection of calibration line scan functions.

Member Function Documentation

◆ CalculateTwoPointsForCalibrationOfMovement()

static Point2Dd[] CalculateTwoPointsForCalibrationOfMovement ( ImagePlane  imagePlane,
Area2D  aoi,
CalibrationPatternContrast  contrast,
int  minContrast,
ValueRange< double >  pointSizeRange,
ScanDirection  scanDirection 
)
static

Extracts two points which can be used for the calibration of the movement of line scan cameras.

Parameters
imagePlaneAn image plane containing the calibration points.
aoiArea of interest where the calibration points can be found
contrastSelects whether the image shows white on black or black on white dots.
minContrastMinimum 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.
pointSizeRangeDesired range of the point size (in number of pixels).
scanDirectionScan direction of the camera.
Returns

◆ CreateLineScanCalibration()

static LineScanCalibrator CreateLineScanCalibration ( Point2Dd  calibrationPoint1,
Point2Dd  calibrationPoint2,
double  referenceDistanceCalibrationPoints,
EdgeDetectionResult  edgeDetectionResult,
double  referenceWidthStripes,
LineScanCalibrationConfiguration  configuration 
)
static

This function calibrates linescan cameras.

The Transformation result includes a 3rd order polynom for the line calibration and a factor to correct the movement direction. Note, that x and y do not depend on each other. All mixed coefficients are zero.

For the calibration of the movement direction an image containing two calibration dots is needed. The pixel coordinates of the dots calibrationPoint1 and calibrationPoint2 are calculated by the function CalculateTwoPointsForCalibrationOfMovement(ImagePlane, Area2D, CalibrationPatternContrast, int, ValueRange<double>, ScanDirection). CreateLineScanCalibration needs the coordinates and the reference distance between the dots referenceDistanceCalibrationPoints .

For the linescan calibration an image of a pattern with alternating black and white stripes has to be aquired. Also, the width of the stripes referenceWidthStripes has to be given as reference. Function DetectEdgesOfStripeTarget(Image, Area2D, int, ScanDirection, double) detects the stripes of the calibration pattern and gives their indices ScanLineIndices and EdgeIndices in edgeDetectionResult .

Parameters
calibrationPoint1First calibration point (left or top).
calibrationPoint2Second calibration point (right or bottom).
referenceDistanceCalibrationPointsReference distance between the two calibration points (same units as referenceWidthStripes ).
edgeDetectionResultContaining the ScanLineIndices and EdgeIndices.
referenceWidthStripesReference width of stripes in calibration pattern ImageStripes.
configurationConfiguration of the linescan calibration.
Returns
A line scan calibrator including a transformation and its quality.

◆ DetectEdgesOfStripeTarget()

static EdgeDetectionResult DetectEdgesOfStripeTarget ( Image  imageStripes,
Area2D  aoi,
int  numStripes,
ScanDirection  scanDirection,
double  threshold 
)
static

This function detects edges from a calibration pattern with alternating black and white stripes.

Parameters
imageStripesCalibration pattern with alternating black and white stripes.
aoiArea of interest in the given image.
numStripesNumber of stripes in the calibration pattern.
scanDirectionScan direction of the camera.
thresholdThreshold for edge detection in the given image (pixel data type dependent, see also
See also
Edge.FindAll(ImagePlane, EdgeSearchMode, EdgeType, double)
).
Returns
Result of the edge detection. The output of this function is used by function CreateLineScanCalibration calculating the line scan calibration. For the detection of the transition between stripes, the CVB function
See also
Edge.FindAll(ImagePlane, EdgeSearchMode, EdgeType, double)
is used. For further information see the documentation of the CVB edge tool.