ImFusion SDK 4.3
CameraCalibrationDataComponent Class Reference

#include <ImFusion/Vision/CameraCalibrationDataComponent.h>

A data component storing mainly the intrinsic calibration of a pinhole camera Information such as image size, extrinsic poses and distortions are also stored Debug values like MRE and standard deviations estimated for intrinsic parameters, which are used for evaluating the calibration results during the calibration process are also saved here. More...

+ Inheritance diagram for CameraCalibrationDataComponent:

Detailed Description

A data component storing mainly the intrinsic calibration of a pinhole camera Information such as image size, extrinsic poses and distortions are also stored Debug values like MRE and standard deviations estimated for intrinsic parameters, which are used for evaluating the calibration results during the calibration process are also saved here.

Public Member Functions

 CameraCalibrationDataComponent (const vec2i &size, const mat3 &k, const vec5 &dist)
 
 CameraCalibrationDataComponent (const vec2i &size, const mat3 &k, const vec5 &dist, const mat4 &reg)
 
bool operator== (const CameraCalibrationDataComponent &other) const
 
bool isApprox (const CameraCalibrationDataComponent &other, double precision=std::numeric_limits< double >::epsilon()) const
 
bool checkImageSizeAndCalibrationConsistency (const vec2i &size) const
 Checks if the physical image size and the size in CameraCalibrationDataComponent are consistent.
 
bool adaptCalibrationToCropping (const vec4i &cropBox)
 Adapts the intrinsic calibration to a cropped image.
 
bool adaptCalibrationToPadding (const vec4i &padValues)
 Adapts the intrinsic calibration to a padded image.
 
bool adaptCalibrationToResizing (const vec2i &newSize)
 Adapts the intrinsic calibration to a resized image.
 
bool save (const Filesystem::Path &file)
 
bool load (const Filesystem::Path &file)
 
void configure (const Properties *p) override
 Configure this object instance by de-serializing the given Properties.
 
- Public Member Functions inherited from DataComponent< CameraCalibrationDataComponent >
std::unique_ptr< DataComponentBaseclone () const override
 Creates a clone of this data component.
 
std::unique_ptr< SubclasscloneDerived () const
 
bool assign (const DataComponentBase &other) override
 Assigns the content of other to this data component.
 
bool equals (const DataComponentBase &other) const override
 Compares this data component to other for equality.
 
- Public Member Functions inherited from Configurable
virtual void configuration (Properties *p) const
 Serialize the current object configuration into the given Properties object.
 
virtual void configureDefaults ()
 Retrieve the properties of this object, replaces values with their defaults and sets it again.
 
void registerParameter (ParameterBase *param)
 Register the given Parameter or SubProperty, so that it will be configured during configure()/configuration().
 
void unregisterParameter (const ParameterBase *param)
 Remove the given Parameter or SubProperty from the list of registered parameters.
 
 Configurable (const Configurable &rhs)
 
 Configurable (Configurable &&rhs) noexcept
 
Configurableoperator= (const Configurable &)
 
Configurableoperator= (Configurable &&) noexcept
 

Public Attributes

Parameter< vec2i > p_imageSize = {"imageSize", vec2i::Zero(), this}
 
Parameter< mat3 > p_K = {"K", mat3::Zero(), this}
 
Parameter< vec5 > p_distortion = {"distortion", vec5::Zero(), this}
 
Parameter< mat4 > p_camToWorldT = {"registration", mat4::Identity(), this}
 
Parameter< double > p_mre = {"mre", 0., this}
 
Parameter< vec4 > p_stdK = {"stdK", vec4::Zero(), this}
 
Parameter< vec5 > p_stdDistortion = {"stdDistortion", vec5::Zero(), this}
 
- Public Attributes inherited from Configurable
Signal signalParametersChanged
 Emitted whenever one of the registered Parameters' or SubPropertys' signalValueChanged signal was emitted.
 

Methods implementing the DataComponent interface

std::string id () const override
 Returns a unique string identifier for this type of data component.
 

Additional Inherited Members

- Protected Member Functions inherited from DataComponentBase
 DataComponentBase (const DataComponentBase &)=default
 
DataComponentBaseoperator= (const DataComponentBase &other)=default
 
- Protected Attributes inherited from Configurable
std::vector< Paramm_params
 List of all registered Parameter and SubProperty instances.
 

Member Function Documentation

◆ id()

std::string id ( ) const
overridevirtual

Returns a unique string identifier for this type of data component.

Note
To avoid conflicts make sure to include potential plugin names into this ID. Due to the modular architecture of the ImFusion library, uniqueness of IDs cannot be checked at compile time. However, DataComponentFactory will check the uniqueness of the ID during registration.

Implements DataComponentBase.

◆ checkImageSizeAndCalibrationConsistency()

bool checkImageSizeAndCalibrationConsistency ( const vec2i & size) const

Checks if the physical image size and the size in CameraCalibrationDataComponent are consistent.

Parameters
sizeThe physical image size
cameraCalibrationDataComponentThe CameraCalibrationDataComponent to check against
Returns
true if the sizes are consistent, false otherwise

◆ adaptCalibrationToCropping()

bool adaptCalibrationToCropping ( const vec4i & cropBox)

Adapts the intrinsic calibration to a cropped image.

Parameters
cropBoxThe crop box in pixel in COCO format (upper left x , upper left y, width, height)
Returns
true if the calibration was adapted, false otherwise

◆ adaptCalibrationToPadding()

bool adaptCalibrationToPadding ( const vec4i & padValues)

Adapts the intrinsic calibration to a padded image.

Parameters
padValuesThe padding values (left, right, top, bottom)
Returns
true if the calibration was adapted, false otherwise

◆ adaptCalibrationToResizing()

bool adaptCalibrationToResizing ( const vec2i & newSize)

Adapts the intrinsic calibration to a resized image.

Note
Please make sure the previous image size was consistent with the calibration data. You can do this with checkImageSizeAndCalibrationConsistency prior to resizing the image. If not please make sure you update it throughout the pipeline.
Parameters
newSizeThe new image size
Returns
true if the calibration was adapted, false otherwise

◆ configure()

void configure ( const Properties * p)
overridevirtual

Configure this object instance by de-serializing the given Properties.

The default implementation will do so automatically for all registered Parameter and SubProperty instances.

See also
configuration() for the inverse functionality

Reimplemented from Configurable.


The documentation for this class was generated from the following file:
Search Tab / S to search, Esc to close