IDS peak ICV v1.0.0
Loading...
Searching...
No Matches
Undistortion Class Reference

#include <peak_icv/algorithms/transformations/peak_icv_undistortion.hpp>

Inheritance diagram for Undistortion:
Collaboration diagram for Undistortion:

Public Member Functions

 Undistortion (const IntrinsicParameters &intrinsicParameters)
 Creates an instance of class undistortion based on the given intrinsicParameters.
 
 Undistortion (const IntrinsicParameters &intrinsicParameters, const peak::common::Metadata &metadata)
 Creates an instance of class undistortion based on the given intrinsicParameters and metadata.
 
 Undistortion (const CalibrationParameters &calibrationParameters)
 Creates an instance of class undistortion based on the given calibrationParameters.
 
 Undistortion (const CalibrationParameters &calibrationParameters, const peak::common::Metadata &metadata)
 Creates an instance of class undistortion based on the given calibrationParameters and metadata.
 
 Undistortion (const CalibrationResult &calibrationResult)
 Creates an instance of class undistortion based on the given calibrationResult.
 
 Undistortion (const CalibrationResult &calibrationResult, const peak::common::Metadata &metadata)
 Creates an instance of class undistortion based on the given calibrationResult and metadata.
 
 Undistortion (const Undistortion &other)
 
 Undistortion (Undistortion &&other) noexcept
 
 ~Undistortion () override
 
Undistortion & operator= (const Undistortion &other)
 
Undistortion & operator= (Undistortion &&other) noexcept
 
UndistortedImage Process (const Image &image) const
 Applies the undistortion on the given image and returns the undistorted image.
 
Interpolation GetInterpolation () const
 Provides the current interpolation algorithm used by the undistortion.
 
void SetInterpolation (Interpolation interpolation)
 Sets the interpolation method for the undistortion transformation.
 

Detailed Description

Class for undistorting an image.

Undistortion is applied to correct image distortion using the camera's intrinsic calibration parameters. The IntrinsicParameters can be calculated using the CameraCalibration::Process.

Note
The images to be undistorted generally need to match the images used for camera calibration. It is also possible to undistort images that had binning applied on them, as long as the metadata of these images contain information about the binning factor. The binning factor of the image to be undistorted has to be bigger or equal to the binning factor of the images used for calibration.
Warning
This function is still in development and not released.

Definition at line 43 of file peak_icv_undistortion.hpp.

Constructor & Destructor Documentation

◆ Undistortion() [1/8]

Undistortion ( const IntrinsicParameters & intrinsicParameters)
inlineexplicit

Creates an instance of class undistortion based on the given intrinsicParameters.

This constructor can also be used if you need to perform an undistortion on images with metadata which differs from the metadata of the images that were used to create the intrinsicParameters via CameraCalibration::Process concerning the binning factors. In this case, the first call of the function Undistortion::Process may take longer than subsequent calls, because some internal parameters have to be reinitialized.

To avoid this initial delay, you can instead use the constructor Undistortion(const IntrinsicParameters& intrinsicParameters, const peak::common::Metadata& metadata) to create the undistortion with both the intrinsic parameters and the metadata from the start.

Parameters
[in]intrinsicParametersCan be obtained e.g. using CameraCalibration::Process
Warning
This function is still in development and not released.

Definition at line 262 of file peak_icv_undistortion.hpp.

◆ Undistortion() [2/8]

Undistortion ( const IntrinsicParameters & intrinsicParameters,
const peak::common::Metadata & metadata )
inline

Creates an instance of class undistortion based on the given intrinsicParameters and metadata.

This constructor can be used if you need to perform an undistortion on images with metadata which differs from the metadata of the images that were used to create the intrinsicParameters via CameraCalibration::Process concerning the binning factors. If this constructor was used before calling Undistortion::Process, the images to be undistorted must have metadata that matches exactly with what was provided in this constructor.

Parameters
[in]intrinsicParametersCan be obtained e.g. using CameraCalibration::Process
[in]metadataMetadata related to a capture process, e.g. used binning factor.
Warning
This function is still in development and not released.

Definition at line 270 of file peak_icv_undistortion.hpp.

◆ Undistortion() [3/8]

Undistortion ( const CalibrationParameters & calibrationParameters)
inlineexplicit

Creates an instance of class undistortion based on the given calibrationParameters.

This constructor can also be used if you need to perform an undistortion on images with metadata which differs from the metadata of the images that were used to create the calibrationParameters via CameraCalibration::Process concerning the binning factors. In this case, the first call of the function Undistortion::Process may take longer than subsequent calls, because some internal parameters have to be reinitialized.

To avoid this initial delay, you can instead use the constructor Undistortion(const CalibrationParameters& calibrationParameters, const Metadata& metadata) to create the undistortion with both the intrinsic parameters and the metadata from the start.

Parameters
[in]calibrationParametersCan be obtained e.g. using CameraCalibration::Process
Warning
This function is still in development and not released.

Definition at line 282 of file peak_icv_undistortion.hpp.

◆ Undistortion() [4/8]

Undistortion ( const CalibrationParameters & calibrationParameters,
const peak::common::Metadata & metadata )
inline

Creates an instance of class undistortion based on the given calibrationParameters and metadata.

This constructor can be used if you need to perform an undistortion on images with metadata which differs from the metadata of the images that were used to create the calibrationParameters via CameraCalibration::Process concerning the binning factors. If this constructor was used before calling Undistortion::Process, the images to be undistorted must have metadata that matches exactly with what was provided in this constructor.

Parameters
[in]calibrationParametersCan be obtained e.g. using CameraCalibration::Process
[in]metadataMetadata related to a capture process, e.g. used binning factor.
Warning
This function is still in development and not released.

Definition at line 291 of file peak_icv_undistortion.hpp.

◆ Undistortion() [5/8]

Undistortion ( const CalibrationResult & calibrationResult)
inlineexplicit

Creates an instance of class undistortion based on the given calibrationResult.

This constructor can also be used if you need to perform an undistortion on images with metadata which differs from the metadata of the images that were used to create the calibrationResult via CameraCalibration::Process concerning the binning factors. In this case, the first call of the function Undistortion::Process may take longer than subsequent calls, because some internal parameters have to be reinitialized.

To avoid this initial delay, you can instead use the constructor Undistortion(const CalibrationResult& calibrationResult, const peak::common::Metadata& metadata) to create the undistortion with both the intrinsic parameters and the metadata from the start.

Parameters
[in]calibrationResultCan be obtained e.g. using CameraCalibration::Process
Warning
This function is still in development and not released.

Definition at line 303 of file peak_icv_undistortion.hpp.

◆ Undistortion() [6/8]

Undistortion ( const CalibrationResult & calibrationResult,
const peak::common::Metadata & metadata )
inline

Creates an instance of class undistortion based on the given calibrationResult and metadata.

This constructor can be used if you need to perform an undistortion on images with metadata which differs from the metadata of the images that were used to create the calibrationResult via CameraCalibration::Process concerning the binning factors. If this constructor was used before calling Undistortion::Process, the images to be undistorted must have metadata that matches exactly with what was provided in this constructor.

Parameters
[in]calibrationResultCan be obtained e.g. using CameraCalibration::Process
[in]metadataMetadata related to a capture process, e.g. used binning factor.
Warning
This function is still in development and not released.

Definition at line 313 of file peak_icv_undistortion.hpp.

◆ Undistortion() [7/8]

Undistortion ( const Undistortion & other)
inline
Warning
This function is still in development and not released.

Definition at line 326 of file peak_icv_undistortion.hpp.

◆ Undistortion() [8/8]

Undistortion ( Undistortion && other)
inlinenoexcept
Warning
This function is still in development and not released.

Definition at line 338 of file peak_icv_undistortion.hpp.

◆ ~Undistortion()

~Undistortion ( )
inlineoverride
Warning
This function is still in development and not released.

Definition at line 349 of file peak_icv_undistortion.hpp.

Member Function Documentation

◆ GetInterpolation()

Interpolation GetInterpolation ( ) const
inline

Provides the current interpolation algorithm used by the undistortion.

This algorithm returns the interpolation algorithm currently set for the undistortion transformation process.

Returns
The current interpolation algorithm used by the undistortion.
Warning
This function is still in development and not released.

Definition at line 412 of file peak_icv_undistortion.hpp.

◆ operator=() [1/2]

Undistortion & operator= ( const Undistortion & other)
inline
Warning
This function is still in development and not released.

Definition at line 357 of file peak_icv_undistortion.hpp.

◆ operator=() [2/2]

Undistortion & operator= ( Undistortion && other)
inlinenoexcept
Warning
This function is still in development and not released.

Definition at line 378 of file peak_icv_undistortion.hpp.

◆ Process()

UndistortedImage Process ( const Image & image) const
inline

Applies the undistortion on the given image and returns the undistorted image.

When performing an undistortion on images with metadata that differs from the metadata of the images which were used to create the calibration parameters via CameraCalibration::Process the first call of the function Undistortion::Process may take longer than subsequent calls. This is because some internal parameters have to be reinitialized.

To avoid this initial delay, you can instead use one of the undistortion constructors that take metadata as input to create the undistortion with the metadata from the start. In this case the images to be undistorted must have metadata that matches exactly with what was provided in the constructor.

Note
Due to current implementation limitations, the maximum image size for the input as well as the output is 32767 x 32767 pixels.
This operation disregards any specified image regions. It processes the entire image.
Parameters
[in]imageThe image to be undistorted
Returns
The undistorted image.
Exceptions
MismatchExceptionIf the image size doesn't match the image size defined in the calibration file or the metadata of the input image does not fit the calibration.
Returns
An undistorted image.
Warning
This function is still in development and not released.

Definition at line 398 of file peak_icv_undistortion.hpp.

◆ SetInterpolation()

void SetInterpolation ( Interpolation interpolation)
inline

Sets the interpolation method for the undistortion transformation.

Warning
This function is still in development and not released.

Definition at line 423 of file peak_icv_undistortion.hpp.