CVB++ 14.0
LineScanCalibrator Class Referencefinal

A set of parameters that is required by the following data transformation to get the final result. More...

#include <cvb/foundation/calibration_line_scan.hpp>

Public Member Functions

NonLinearTransformationPtr Transformation () const noexcept
 Gets the transformation. More...
 
double PixelSize () const noexcept
 Gets the pixel size after transformation. More...
 
double MeanError () const noexcept
 Gets the mean difference between stripe width in the transformed image and reference. More...
 
double StandardDeviation () const noexcept
 Gets the standard deviation of the mean error. More...
 

Friends

std::unique_ptr< LineScanCalibratorCreateLineScanCalibration (const Point2D< double > &calibrationPoint1, const Point2D< double > &calibrationPoint2, double referenceDistanceCalibrationPoints, const EdgeDetectionResult &edgeDetectionResult, double referenceWidthStripes, const LineScanCalibrationConfiguration &configuration)
 Calibrates line-scan cameras. More...
 

Detailed Description

A set of parameters that is required by the following data transformation to get the final result.

Member Function Documentation

◆ MeanError()

double MeanError ( ) const
inlinenoexcept

Gets the mean difference between stripe width in the transformed image and reference.

Returns
The mean error.
Exceptions
Doesnot throw any exception.

This is calculated over all stripes.

◆ PixelSize()

double PixelSize ( ) const
inlinenoexcept

Gets the pixel size after transformation.

Returns
The pixel size of the transformed image.
Exceptions
Doesnot throw any exception.

The value is in the same unit as the reference distance calibration points and the reference width stripes.

◆ StandardDeviation()

double StandardDeviation ( ) const
inlinenoexcept

Gets the standard deviation of the mean error.

Returns
The standard deviation.
Exceptions
Doesnot throw any exception.

◆ Transformation()

NonLinearTransformationPtr Transformation ( ) const
inlinenoexcept

Gets the transformation.

Returns
The transformation.
Exceptions
Doesnot throw any exception.

Friends And Related Function Documentation

◆ CreateLineScanCalibration

std::unique_ptr< LineScanCalibrator > CreateLineScanCalibration ( const Point2D< double > &  calibrationPoint1,
const Point2D< double > &  calibrationPoint2,
double  referenceDistanceCalibrationPoints,
const EdgeDetectionResult edgeDetectionResult,
double  referenceWidthStripes,
const LineScanCalibrationConfiguration configuration 
)
friend

Calibrates line-scan cameras.

Parameters
[in]calibrationPoint1First calibration point (left or top).
[in]calibrationPoint2Second calibration point (right or bottom).
[in]referenceDistanceCalibrationPointsReference distance between the two calibration points (same units as referenceWidthStripes).
[in]edgeDetectionResultResult returned by DetectEdgesOfStripeTarget.
[in]referenceWidthStripesReference width of stripes in calibration pattern (same units as referenceDistanceCalibrationPoints).
[in]configurationConfiguration of line-scan calibration.
Returns
A line-scan calibrator including a transformation and its quality.

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.