Enumerations | |
enum | CVFScanDirection { CVFSD_X = 0 , CVFSD_Y = 1 } |
Functions | |
cvbres_t | CVFCreateLineScanCalibration (CVIPointD CalibrationPoint1, CVIPointD CalibrationPoint2, double ReferenceDistanceCalibrationPoints, int *ScanLineIndices, double *EdgeIndices, size_t NumScanLines, size_t NumEdgesPerScanLine, double ReferenceWidthStripes, const CVFLineScanCalibrationConfiguration &Configuration, NLTRANSFORMATION &Transformation, double &PixelSize, double &MeanError, double &StdDev) |
This function calibrates linescan cameras. More... | |
cvbres_t | CVFDetectEdgesOfStripeTarget (IMG ImageStripes, cvbdim_t Left, cvbdim_t Top, cvbdim_t Right, cvbdim_t Bottom, size_t NumStripes, CVFScanDirection ScanDirection, double Threshold, int *ScanLineIndices, double *EdgeIndices, size_t &NumScanLines, size_t &NumEdgesPerScanLine) |
This function detects edges from a calibration pattern with alternating black and white stripes. More... | |
cvbres_t | CVFGet2PointsForCalibrationOfMovement (IMG Image, cvbdim_t Index, const TArea &Aoi, TCalibrationPatternContrast Contrast, cvbval_t MinContrast, double MinPointSize, double MaxPointSize, CVFScanDirection ScanDirection, CVIPointD &FirstPoint, CVIPointD &SecondPoint) |
Extracts two points which can be used for the calibration of the movement of linescan cameras. If the image contains more than two points, the points which are nearest to the left and right edge (or top and bottom edge, if movement direction is x) are chosen. More... | |
enum CVFScanDirection |
cvbres_t CVFCreateLineScanCalibration | ( | CVIPointD | CalibrationPoint1, |
CVIPointD | CalibrationPoint2, | ||
double | ReferenceDistanceCalibrationPoints, | ||
int * | ScanLineIndices, | ||
double * | EdgeIndices, | ||
size_t | NumScanLines, | ||
size_t | NumEdgesPerScanLine, | ||
double | ReferenceWidthStripes, | ||
const CVFLineScanCalibrationConfiguration & | Configuration, | ||
NLTRANSFORMATION & | Transformation, | ||
double & | PixelSize, | ||
double & | MeanError, | ||
double & | StdDev | ||
) |
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 CVFGet2PointsForCalibrationOfMovement. CVFCreateLineScanCalibration needs these 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 CVFDetectEdgesOfStripeTarget detects the stripes of the calibration pattern and gives their indices ScanLineIndices and EdgeIndices.
The resulting transformation can be applied to images using function CreateNLTransformedImage.
[in] | CalibrationPoint1 | First calibration point (left or top). |
[in] | CalibrationPoint2 | Second calibration point (right or bottom). |
[in] | ReferenceDistanceCalibrationPoints | Reference distance between the two calibration points (same units as ReferenceWidthStripes). |
[in] | ScanLineIndices | Array with scan line indices containing NumScanLines elements. |
[in] | EdgeIndices | Array with edge indicies of each scan line containing NumScanLines x NumEdgesPerScanLine elements. The indices are stored scan line by scan line consecutively. |
[in] | NumScanLines | Number of scan lines. |
[in] | NumEdgesPerScanLine | Number of edges per scan line. |
[in] | ReferenceWidthStripes | Reference width of stripes in calbration pattern ImageStripes (same units as ReferenceDistanceCalibrationPoints). |
[in] | Configuration | Configuration of linescan calibration. |
[out] | Transformation | Handle of result transformation object. |
[out] | PixelSize | Pixel size after transformation (same units as ReferenceDistanceCalibrationPoints and ReferenceWidthStripes). |
[out] | MeanError | Mean deviation of all distances between stripes of transformed image from reference stripe width. |
[out] | StdDev | Standard deviation of MeanError. |
cvbres_t CVFDetectEdgesOfStripeTarget | ( | IMG | ImageStripes, |
cvbdim_t | Left, | ||
cvbdim_t | Top, | ||
cvbdim_t | Right, | ||
cvbdim_t | Bottom, | ||
size_t | NumStripes, | ||
CVFScanDirection | ScanDirection, | ||
double | Threshold, | ||
int * | ScanLineIndices, | ||
double * | EdgeIndices, | ||
size_t & | NumScanLines, | ||
size_t & | NumEdgesPerScanLine | ||
) |
This function detects edges from a calibration pattern with alternating black and white stripes.
The output of this function is used by function CVFCreateLineScanCalibration calculating the linescan calibration.
For the detection of the transition between the stripes, the CVB function CFindAllEdges is used. For further information see the documentation of the CVB edge tool.
[in] | ImageStripes | Calibration pattern with alternating black and white stripes. |
[in] | Left | Left edge of area of interest for ImageStripes. |
[in] | Top | Top edge of area of interest for ImageStripes. |
[in] | Right | Right edge of area of interest for ImageStripes. |
[in] | Bottom | Bottom edge of area of interest for ImageStripes. |
[in] | NumStripes | Number of stripes in the calibration pattern. |
[in] | ScanDirection | Scan direction of the camera. |
[in] | Threshold | Threshold for edge detection in ImageStripes (pixel data type dependent, see also CFindAllEdges). |
[out] | ScanLineIndices | Array to recive the indices of the scan lines. |
[out] | EdgeIndices | Array to recive the indices of edges for each scan line. |
[out] | NumScanLines | Number of scan lines where edges are correctly detected. |
[out] | NumEdgesPerScanLine | Number of edges per scan line. |
cvbres_t CVFGet2PointsForCalibrationOfMovement | ( | IMG | Image, |
cvbdim_t | Index, | ||
const TArea & | Aoi, | ||
TCalibrationPatternContrast | Contrast, | ||
cvbval_t | MinContrast, | ||
double | MinPointSize, | ||
double | MaxPointSize, | ||
CVFScanDirection | ScanDirection, | ||
CVIPointD & | FirstPoint, | ||
CVIPointD & | SecondPoint | ||
) |
Extracts two points which can be used for the calibration of the movement of linescan cameras. If the image contains more than two points, the points which are nearest to the left and right edge (or top and bottom edge, if movement direction is x) are chosen.
[in] | Image | Image containing the calibration points. |
[in] | Index | Index of the plane to be processed. |
[in] | Aoi | Area of interest where the calibration points can be found. |
[in] | Contrast | Selects whether the image shows white on black or black on white dots. |
[in] | 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. |
[in] | MinPointSize | Desired minimum point size (in number of pixels). |
[in] | MaxPointSize | Desired maximum point size (in number of pixels). |
[in] | ScanDirection | Scan direction of the camera. |
[out] | FirstPoint | X and Y coordinate of top calibration point if ScanDirection is X, otherwise left point. |
[out] | SecondPoint | X and Y coordinate of bottom calibration point if ScanDirection is X, otherwise right point. |