IDS peak ICV v1.2.0
Loading...
Searching...
No Matches
CalibrationResult Class Reference

#include <peak_icv/algorithms/calibration/peak_icv_calibration_result.hpp>

Inheritance diagram for CalibrationResult:

Public Member Functions

 CalibrationResult (const std::string &filePath)
 Constructs a CalibrationResult instance by loading data from a JSON file.
 
 ~CalibrationResult () override
 
 CalibrationResult (const CalibrationResult &other)
 
 CalibrationResult (CalibrationResult &&other) noexcept
 
CalibrationResult & operator= (const CalibrationResult &other)
 
CalibrationResult & operator= (CalibrationResult &&other) noexcept
 
double GetMeanReprojectionError () const
 Retrieves the mean reprojection error from the calibration result.
 
std::vector< CalibrationView > GetViews () const
 Returns a vector of CalibrationView objects.
 
CalibrationParameters GetCalibrationParameters () const
 Extracts the calibration parameters from a calibration result.
 
 operator CalibrationParameters () const
 Implicitly converts a CalibrationResult into calibration parameters.
 

Detailed Description

Holds the results of a camera calibration.

The CalibrationResult class stores the intrinsic and extrinsic parameters, the mean reprojection error, and a collection of calibration views, each representing marker positions and corresponding reprojection errors in the image.

These results are typically produced by the CameraCalibration::Process() method.

Since
ids_peak_icv 1.1

Definition at line 44 of file peak_icv_calibration_result.hpp.

Constructor & Destructor Documentation

◆ CalibrationResult() [1/3]

CalibrationResult ( const std::string & filePath)
inlineexplicit

Constructs a CalibrationResult instance by loading data from a JSON file.

This constructor initializes the calibration result by parsing the given file, which contains intrinsic parameters, the mean reprojection error, and the calibration views.

Parameters
[in]filePathAn existing file path to a calibration result JSON file.
Exceptions
IOExceptionIf the given filePath does not exist, or the permissions are not sufficient to read it.
CorruptedExceptionIf the file cannot be read.
Since
ids_peak_icv 1.1

Definition at line 245 of file peak_icv_calibration_result.hpp.

◆ ~CalibrationResult()

~CalibrationResult ( )
inlineoverride
Since
ids_peak_icv 1.1

Definition at line 237 of file peak_icv_calibration_result.hpp.

◆ CalibrationResult() [2/3]

CalibrationResult ( const CalibrationResult & other)
inline
Since
ids_peak_icv 1.1

Definition at line 185 of file peak_icv_calibration_result.hpp.

◆ CalibrationResult() [3/3]

CalibrationResult ( CalibrationResult && other)
inlinenoexcept
Since
ids_peak_icv 1.1

Definition at line 193 of file peak_icv_calibration_result.hpp.

Member Function Documentation

◆ GetCalibrationParameters()

CalibrationParameters GetCalibrationParameters ( ) const
inline

Extracts the calibration parameters from a calibration result.

This function extracts the calibration parameters required for image operations such as point cloud generation, image undistortion, and other calibration-dependent tasks. The extracted parameters include intrinsic parameters and, depending on the number of calibration views, extrinsic parameters.

  • Intrinsic parameters are always extracted from the calibration result.
  • If the calibration result contains exactly one calibration view, the extrinsic parameters are taken from that view.
  • If multiple calibration views are present (e.g., from a full camera calibration), the extrinsic parameters are set to the identity matrix.

To use extrinsic parameters from a specific calibration view rather than the identity matrix, retrieve the desired view using CalibrationResult::GetViews() and incorporate its parameters accordingly.

Since
ids_peak_icv 1.1

Definition at line 295 of file peak_icv_calibration_result.hpp.

◆ GetMeanReprojectionError()

double GetMeanReprojectionError ( ) const
inline

Retrieves the mean reprojection error from the calibration result.

The mean reprojection error is the root mean square of distances between the marker points detected from the calibration images and the projected world points, measured in pixels.

Since
ids_peak_icv 1.1

Definition at line 252 of file peak_icv_calibration_result.hpp.

◆ GetViews()

std::vector< CalibrationView > GetViews ( ) const
inline

Returns a vector of CalibrationView objects.

The order of the returned CalibrationViews corresponds exactly to the order of images passed to CameraCalibration::Process().

Since
ids_peak_icv 1.1

Definition at line 263 of file peak_icv_calibration_result.hpp.

◆ operator CalibrationParameters()

operator CalibrationParameters ( ) const
inline

Implicitly converts a CalibrationResult into calibration parameters.

This operator calls CalibrationResult::GetCalibrationParameters() to extract the calibration parameters.

Since
ids_peak_icv 1.1

Definition at line 307 of file peak_icv_calibration_result.hpp.

◆ operator=() [1/2]

CalibrationResult & operator= ( CalibrationResult && other)
inlinenoexcept
Since
ids_peak_icv 1.1

Definition at line 219 of file peak_icv_calibration_result.hpp.

◆ operator=() [2/2]

CalibrationResult & operator= ( const CalibrationResult & other)
inline
Since
ids_peak_icv 1.1

Definition at line 199 of file peak_icv_calibration_result.hpp.