Namespace for collection of calibration line-scan functions from the Foundation package. More...
Classes | |
class | EdgeDetectionResult |
A set of parameters that stores the result from an edge detection. More... | |
class | LineScanCalibrationConfiguration |
A set of parameters, which is used to configure line-scan calibration. More... | |
class | LineScanCalibrator |
A set of parameters that is required by the following data transformation to get the final result. More... | |
Typedefs | |
using | LineScanCalibratorPtr = std::shared_ptr< LineScanCalibrator > |
Convenience shared pointer for LineScanCalibrator. | |
Enumerations | |
enum class | ScanDirection { X = CExports::CVFScanDirection::CVFSD_X , Y = CExports::CVFScanDirection::CVFSD_Y } |
Specifies the scanning direction. More... | |
enum class | PreDefinedPixelSizeMode { DoNotUse , Use } |
Specifies if the predefined pixel resolution is used for the metric calibration. More... | |
Functions | |
std::pair< Point2D< double >, Point2D< double > > | CalculateTwoPointsForCalibrationOfMovement (const ImagePlane &imagePlane, const Area2D &aoi, CalibrationPatternContrast contrast, int minContrast, const ValueRange< double > &pointSizeRange, const ScanDirection &scanDirection) |
Extracts two points which can be used for the calibration of the movement of line-scan cameras. More... | |
EdgeDetectionResult | DetectEdgesOfStripeTarget (const Image &imageStripes, const Area2D &aoi, int numStripes, const ScanDirection &scanDirection, double threshold) |
This function detects edges from a calibration pattern with alternating black and white stripes. More... | |
std::unique_ptr< LineScanCalibrator > | CreateLineScanCalibration (const Point2D< double > &calibrationPoint1, const Point2D< double > &calibrationPoint2, double referenceDistanceCalibrationPoints, const EdgeDetectionResult &edgeDetectionResult, double referenceWidthStripes, const LineScanCalibrationConfiguration &configuration) |
Calibrates line-scan cameras. More... | |
Namespace for collection of calibration line-scan functions from the Foundation package.
|
strong |
|
strong |
|
inline |
Extracts two points which can be used for the calibration of the movement of line-scan cameras.
[in] | imagePlane | An image plane containing the calibration points. |
[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] | pointSizeRange | Desired range of the point size (in number of pixels). |
[in] | scanDirection | Scan direction of the camera. |
Any | exception derived from std::exception including CvbException. |
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.
|
inline |
Calibrates line-scan cameras.
[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] | edgeDetectionResult | Result returned by DetectEdgesOfStripeTarget. |
[in] | referenceWidthStripes | Reference width of stripes in calibration pattern (same units as referenceDistanceCalibrationPoints). |
[in] | configuration | Configuration of line-scan calibration. |
The transformation result includes a 3rd order polynomial 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.
This function needs these coordinates and the reference distance between the dots referenceDistanceCalibrationPoints.
For the line-scan calibration, an image of a pattern with alternating black and white stripes has to be acquired. Also, the width of the stripes referenceWidthStripes has to be given as reference.
|
inline |
This function detects edges from a calibration pattern with alternating black and white stripes.
[in] | imageStripes | Calibration pattern with alternating black and white stripes. |
[in] | aoi | Area of interest in the given image. |
[in] | numStripes | Number of stripes in the calibration pattern. |
[in] | scanDirection | Scan direction of the camera. |
[in] | threshold | Threshold for edge detection in the given image (pixel data type-dependent, see also Edge::FindAllEdges). |
The output of this function is used by CreateLineScanCalibration calculating the line-scan calibration.
For the detection of the transition between the stripes, the CVB function Edge::FindAllEdges is used. For further information see the documentation of the CVB edge tool.