CVB++ 14.0
EdgeDetectionResult Class Referencefinal

A set of parameters that stores the result from an edge detection. More...

#include <cvb/foundation/calibration_line_scan.hpp>

Public Member Functions

std::vector< int > ScanLineIndices () const noexcept
 Gets the indices of the scan-lines. More...
 
std::vector< double > EdgeIndices () const noexcept
 Gets the indices of edges for each scan-line. More...
 
int NumProfiles () const noexcept
 Gets the number of scan-line where edges are correctly detected. More...
 
int NumEdgesPerProfile () const noexcept
 Gets the number of edges per unit profile. 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 stores the result from an edge detection.

Member Function Documentation

◆ EdgeIndices()

std::vector< double > EdgeIndices ( ) const
inlinenoexcept

Gets the indices of edges for each scan-line.

Returns
The indices of edges for each scan-line.
Exceptions
Doesnot throw any exception.

◆ NumEdgesPerProfile()

int NumEdgesPerProfile ( ) const
inlinenoexcept

Gets the number of edges per unit profile.

Returns
The number of edges per unit profile.
Exceptions
Doesnot throw any exception.

◆ NumProfiles()

int NumProfiles ( ) const
inlinenoexcept

Gets the number of scan-line where edges are correctly detected.

Returns
The number of scan-line where edges are correctly detected.
Exceptions
Doesnot throw any exception.

◆ ScanLineIndices()

std::vector< int > ScanLineIndices ( ) const
inlinenoexcept

Gets the indices of the scan-lines.

Returns
The indices of the scan-lines.
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.