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

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

Inheritance diagram for Undistortion:

Public Member Functions

 Undistortion (const IntrinsicParameters &intrinsicParameters)
 Constructs an undistortion using intrinsic parameters.
 
 Undistortion (const IntrinsicParameters &intrinsicParameters, const peak::common::Metadata &metadata)
 Constructs an undistortion using intrinsic parameters and metadata.
 
 Undistortion (const CalibrationParameters &calibrationParameters)
 Constructs an undistortion using calibration parameters.
 
 Undistortion (const CalibrationParameters &calibrationParameters, const peak::common::Metadata &metadata)
 Constructs an undistortion using calibration parameters and metadata.
 
 Undistortion (const CalibrationResult &calibrationResult)
 Constructs an undistortion using a calibration result.
 
 Undistortion (const CalibrationResult &calibrationResult, const peak::common::Metadata &metadata)
 Constructs an undistortion using a calibration result 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 undistortion to the specified image.
 
Interpolation GetInterpolation () const
 
void SetInterpolation (Interpolation interpolation)
 Sets the Interpolation method used for undistortion.
 

Detailed Description

Represents an undistortion transformation for images.

Provides geometric correction to remove lens distortion using intrinsic calibration parameters. The intrinsic parameters can be obtained using CameraCalibration::Process().

This class also supports undistorting images with binning factors that differ from those used during calibration, as long as the image metadata includes valid binning information. The binning factor of the image to be undistorted must be greater than or equal to the binning factor of the calibration images.

Note
If the metadata of the images to be undistorted differs from the metadata used during calibration (e.g. due to different binning), internal parameters may need to be reinitialized. In such cases, the first call to Process() may take longer. To avoid this, use a constructor that accepts both calibration parameters and metadata. When using those constructors, the provided metadata must match the images to be undistorted.

Limitations

  • In-place undistortion is not supported.
  • Maximum supported image size is 32767 × 32767 pixels.
Since
ids_peak_icv 1.1

Constructor & Destructor Documentation

◆ Undistortion() [1/8]

Undistortion ( const IntrinsicParameters & intrinsicParameters)
inlineexplicit

Constructs an undistortion using intrinsic parameters.

Parameters
[in]intrinsicParametersIntrinsic calibration parameters.
Since
ids_peak_icv 1.1

◆ Undistortion() [2/8]

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

Constructs an undistortion using intrinsic parameters and metadata.

Parameters
[in]intrinsicParametersIntrinsic calibration parameters.
[in]metadataMetadata describing capture characteristics.
Since
ids_peak_icv 1.1

◆ Undistortion() [3/8]

Undistortion ( const CalibrationParameters & calibrationParameters)
inlineexplicit

Constructs an undistortion using calibration parameters.

Parameters
[in]calibrationParametersCalibration parameters.
Since
ids_peak_icv 1.1

◆ Undistortion() [4/8]

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

Constructs an undistortion using calibration parameters and metadata.

Parameters
[in]calibrationParametersCalibration parameters.
[in]metadataMetadata describing capture characteristics.
Since
ids_peak_icv 1.1

◆ Undistortion() [5/8]

Undistortion ( const CalibrationResult & calibrationResult)
inlineexplicit

Constructs an undistortion using a calibration result.

Parameters
[in]calibrationResultCalibration result.
Since
ids_peak_icv 1.1

◆ Undistortion() [6/8]

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

Constructs an undistortion using a calibration result and metadata.

Parameters
[in]calibrationResultCalibration result.
[in]metadataMetadata describing capture characteristics.
Since
ids_peak_icv 1.1

◆ Undistortion() [7/8]

Undistortion ( const Undistortion & other)
inline

◆ Undistortion() [8/8]

Undistortion ( Undistortion && other)
inlinenoexcept

◆ ~Undistortion()

~Undistortion ( )
inlineoverride

Member Function Documentation

◆ GetInterpolation()

Interpolation GetInterpolation ( ) const
inline
Returns
The current interpolation method used by the undistortion.
Since
ids_peak_icv 1.1

◆ operator=() [1/2]

Undistortion & operator= ( const Undistortion & other)
inline

◆ operator=() [2/2]

Undistortion & operator= ( Undistortion && other)
inlinenoexcept

◆ Process()

UndistortedImage Process ( const Image & image) const
inline

Applies undistortion to the specified image.

This function undistorts the image and returns an UndistortedImage that includes updated intrinsic parameters.

The returned image has the same size and pixel format as the input image.

The image region is also undistorted.

Note
In the rare case that the Metadata ROI (peak::common::MetadataKey::Roi) is set such that the principal point of the calibration parameters lies outside the ROI, invalid data may appear at the image border. The image region is therefore restricted to points within the valid area.
Parameters
[in]imageThe image to be undistorted.
Supported pixel formats
  • Mono8
  • Mono10
  • Mono12
  • Mono16
  • RGB8
  • RGBa8
  • BGR8
  • BGRa8
  • Coord3D_C32f
  • Coord3D_ABC32f

See the Pixel and Pixel Format Specifications for a detailed description of the pixel formats.

Returns
An undistorted image with updated intrinsic parameters.
Exceptions
NotPossibleExceptionThe image binning factor is too small for the undistortion configuration.
MismatchExceptionThe input image size or capture information does not match the undistortion configuration.
Returns
The undistorted image.
Since
ids_peak_icv 1.1

◆ SetInterpolation()

void SetInterpolation ( Interpolation interpolation)
inline

Sets the Interpolation method used for undistortion.

Parameters
[in]interpolationinterpolation method to use.
Since
ids_peak_icv 1.1