ImFusion C++ SDK 4.4.0
ImFusion::RGBDDataComponent Class Reference

#include <RGBD/Include/ImFusion/RGBD/RGBDDataComponent.h>

RGBDDataComponent stores all calibration and configuration parameters for an RGBD sensor. More...

Inheritance diagram for ImFusion::RGBDDataComponent:

Detailed Description

RGBDDataComponent stores all calibration and configuration parameters for an RGBD sensor.

This includes intrinsic and distortion parameters for both depth and color cameras, image sizes, and transformations between camera coordinate systems.

Intended usage:

  • Attach this component to image sets or data objects representing RGBD sensor data.
  • Use the setters to configure calibration and other parameters based on sensor specifications or calibration results.
  • Use the getters to retrieve respective parameters for processing RGBD data

Important aspects:

  • All parameters must be set to match the actual data for correct processing.
  • The 4x4 matrices depthToColorTransform and sensorTransform are representing euclidean transformations (SE(3)).
  • The component can be serialized/deserialized via Properties.
  • Thread safety is not guaranteed.

Example 1:

CameraCalibrationDataComponent colorCalib, depthCalib;
// ... configure colorCalib and depthCalib ...
mat4 depthToColor; // transformation from depth to color camera
RGBDDataComponent comp(colorCalib, depthCalib, depthToColor);
if (comp.valid()) { /* use comp for further processing */ }
A data component storing mainly the intrinsic calibration of a pinhole camera Information such as ima...
Definition CameraCalibrationDataComponent.h:22

Example 2:

Note: All parameters are just set to some example values and do not represent a real sensor.

RGBDDataComponent comp;
comp.setDepthWidth(640);
comp.setDepthHeight(480);
comp.setDepthK(mat3()); // set intrinsic matrix
comp.setDepthDistortion(vec5::Zero());
comp.setColorWidth(640);
comp.setColorHeight(480);
comp.setColorK(mat3()); // set intrinsic matrix
comp.setColorDistortion(vec5::Zero());
comp.setDepthToColorTransform(mat4::Identity());
void setColorK(const mat3 &K)
Sets/gets the intrinsic matrix of the color camera.
void setDepthToColorTransform(const mat4 &T)
Sets/gets the transformation from depth camera to color camera coordinate system.
void setDepthDistortion(const vec5 &k)
Sets/gets the distortion coefficients of the depth camera.
void setColorDistortion(const vec5 &k)
Sets/gets the distortion coefficients of the color camera.
void setDepthWidth(int v)
Sets/gets the width of the depth image (pixels).
void setDepthHeight(int v)
Sets/gets the height of the depth image (pixels).
void setDepthK(const mat3 &K)
Sets/gets the intrinsic matrix of the depth camera.
void setColorHeight(int v)
Sets/gets the height of the color image (pixels).
void setColorWidth(int v)
Sets/gets the width of the color image (pixels).
See also
CameraCalibrationDataComponent

Public Types

enum class  DistortionModel { None = 0 }
 Distortion model for depth camera.
enum class  TransformationConvention { CameraToWorld = 0 , WorldToCamera }
 Convention for pose transformations.

Public Member Functions

 RGBDDataComponent (const RGBDDataComponent &other)=default
 RGBDDataComponent (const CameraCalibrationDataComponent &camColor, const CameraCalibrationDataComponent &camDepth, const mat4 &depthToColorT=mat4::Identity())
RGBDDataComponent & operator= (const RGBDDataComponent &other)=default
bool operator== (const RGBDDataComponent &other) const
 Checks for exact equality of all parameters.
bool isApprox (const RGBDDataComponent &other, double precision=std::numeric_limits< double >::epsilon()) const
 Checks for approximate equality of all parameters within a given precision.
std::string id () const override
 Returns the component type identifier.
bool valid (bool checkDepth=true, bool checkColor=true) const
 Checks if the component is valid (all required parameters set).
void setDepthWidth (int v)
 Sets/gets the width of the depth image (pixels).
int depthWidth () const
void setDepthHeight (int v)
 Sets/gets the height of the depth image (pixels).
int depthHeight () const
void setDepthK (const mat3 &K)
 Sets/gets the intrinsic matrix of the depth camera.
mat3 depthK () const
void setDepthDistortionModel (DistortionModel model)
DistortionModel depthDistortionModel () const
void setDepthDistortion (const vec5 &k)
 Sets/gets the distortion coefficients of the depth camera.
vec5 depthDistortion () const
void setColorWidth (int v)
 Sets/gets the width of the color image (pixels).
int colorWidth () const
void setColorHeight (int v)
 Sets/gets the height of the color image (pixels).
int colorHeight () const
void setColorK (const mat3 &K)
 Sets/gets the intrinsic matrix of the color camera.
mat3 colorK () const
void setColorDistortionModel (DistortionModel model)
 Distortion model for color camera.
DistortionModel colorDistortionModel () const
void setColorDistortion (const vec5 &k)
 Sets/gets the distortion coefficients of the color camera.
vec5 colorDistortion () const
void setDepthToColorTransform (const mat4 &T)
 Sets/gets the transformation from depth camera to color camera coordinate system.
mat4 depthToColorTransform () const
void setSensorTransform (const mat4 &T)
 Sets/gets the transformation from depth camera to reference coordinate system.
mat4 sensorTransform () const
void setDescription (const std::string &description)
 Sets/gets a human-readable description of the sensor.
std::string description () const
void setPose (const mat4 &T, TransformationConvention conv)
 Sets/gets the transformation between world and camera coordinate system.
mat4 pose (TransformationConvention conv) const
void setSerial (const std::string &serial)
 Sets/gets the device serial number.
std::string serial () const
void configure (const Properties *p) override
 Configures the component from a Properties object.
void configuration (Properties *p) const override
 Serializes the component to a Properties object.
Public Member Functions inherited from ImFusion::DataComponent< RGBDDataComponent >
std::unique_ptr< DataComponentBase > clone () const override
 Creates a clone of this data component.
std::unique_ptr< Subclass > cloneDerived () 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 ImFusion::Configurable
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
Configurable & operator= (const Configurable &)
Configurable & operator= (Configurable &&) noexcept

Static Public Member Functions

static RGBDDataComponent * fromProperties (Properties *p)
 Creates a component from a Properties object.

Additional Inherited Members

Public Attributes inherited from ImFusion::Configurable
Signal signalParametersChanged
 Emitted whenever one of the registered Parameters' or SubPropertys' signalValueChanged signal was emitted.
Protected Member Functions inherited from ImFusion::DataComponentBase
 DataComponentBase (const DataComponentBase &)=default
DataComponentBase & operator= (const DataComponentBase &other)=default
Protected Attributes inherited from ImFusion::Configurable
std::vector< Paramm_params
 List of all registered Parameter and SubProperty instances.

Member Function Documentation

◆ id()

std::string ImFusion::RGBDDataComponent::id ( ) const
inlineoverridevirtual

Returns the component type identifier.

Implements ImFusion::DataComponentBase.

◆ setPose()

void ImFusion::RGBDDataComponent::setPose ( const mat4 & T,
TransformationConvention conv )

Sets/gets the transformation between world and camera coordinate system.

Use with care; intended for advanced use cases.

◆ configure()

void ImFusion::RGBDDataComponent::configure ( const Properties * p)
overridevirtual

Configures the component from a Properties object.

Reimplemented from ImFusion::Configurable.

◆ configuration()

void ImFusion::RGBDDataComponent::configuration ( Properties * p) const
overridevirtual

Serializes the component to a Properties object.

Reimplemented from ImFusion::Configurable.


The documentation for this class was generated from the following file:
  • RGBD/Include/ImFusion/RGBD/RGBDDataComponent.h
Search Tab / S to search, Esc to close