Raytrix Light Field SDK  5.0
Rx::LFR::CCalibration Class Reference

Detailed Description

Defines a single camera or ray image calibration, including a possible gray image.

Inherits Rx::LFR::CParametersPimpl< CCalibration_Impl, Params::ECalib::ID, Interfaces::ECalib::ID >.

Public Types

typedef Interfaces::ECalib::ID EnumInterfaceType
 
typedef Params::ECalib::ID EnumType
 The type of the parameter enum. Is used by managed wrapper classes. More...
 

Public Member Functions

 CCalibration ()
 Default constructor. Creates an uninitialized calibration. Call SetToDefault to initialize it. More...
 
 CCalibration (CCalibration &&xCalibration)
 Move constructor. More...
 
 ~CCalibration ()
 Destructor. Frees all used memory including the gray image. More...
 
const void * GetCameraFormat () const
 Gets the pointer to the internal camera format. Only for internal purposes. More...
 
CRxMapping3DGetDepthCorrectionVolume ()
 Gets the depth correction volume. More...
 
const CRxMapping3DGetDepthCorrectionVolume () const
 Gets the depth correction volume. More...
 
CRxImageGetGrayImage ()
 Gets the gray image. The gray image is invalid if this calibration has no gray image. More...
 
const CRxImageGetGrayImage () const
 Gets the gray image. The gray image is invalid if this calibration has no gray image. More...
 
void GetGridData (CRxArray2DDouble &adLensData2D, bool bMLI) const
 Gets the grid data of this calibration. More...
 
CCalibration_Impl & GetImpl ()
 Gets the non constant implementation. More...
 
const CCalibration_Impl & GetImpl () const
 Gets the constant implementation. More...
 
void * GetInterface (Interfaces::ECalib::ID eInterface)
 Gets the interface defined by the given interface ID. More...
 
TInterface * GetInterface (Interfaces::ECalib::ID eInterface)
 Gets the interface defined by the given interface ID. More...
 
const void * GetInterface (Interfaces::ECalib::ID eInterface) const
 Gets the interface defined by the given interface ID. More...
 
const TInterface * GetInterface (Interfaces::ECalib::ID eInterface) const
 Gets the interface defined by the given interface ID. More...
 
CParameters< Params::ECalib::ID > & GetParams ()
 
const CParameters< Params::ECalib::ID > & GetParams () const
 
bool HasDepthCorrectionVolume () const
 Query if this object has a depth correction volume. More...
 
bool HasGrayImage () const
 Queries if this calibration has a gray image. More...
 
bool HasInterface (Interfaces::ECalib::ID eInterface)
 Queries if this object has the given interface. More...
 
CCalibrationoperator= (CCalibration &&xCalibration)
 Move assignment operator. More...
 
void SaveAsXmlFile (const CRxString &sxFilename)
 Saves some details of this calibration as a XML file. More...
 
void SaveAsXmlString (CRxString &sxXml)
 Saves some details of this calibration as a XML string. More...
 
void SetCameraFormat (const void *pvData)
 Sets the camera format by pointer. Only for internal purposes. More...
 
void SetDepthCorrectionVolume (const CRxMapping3D &xMapping)
 Sets the depth correction volume. This copies the given mapping into this calibration. More...
 
void SetDepthCorrectionVolume (CRxMapping3D &&xMapping)
 Sets the depth correction volume. This moves the given mapping into this calibration. More...
 
void SetGrayImage (const CRxImage &xImg)
 Sets the given image as the gray image. This copies the given image into this calibration. More...
 
void SetGrayImage (CRxImage &&xImg)
 Sets the given image as the gray image. This moves the given image into this calibration. More...
 
void SetToDefault (int iHeightPX, int iWidthPX)
 Sets this calibration to default. All applied parameters are reset. The gray image is not affected. More...
 

Member Typedef Documentation

◆ EnumInterfaceType

◆ EnumType

The type of the parameter enum. Is used by managed wrapper classes.

Constructor & Destructor Documentation

◆ CCalibration() [1/2]

Rx::LFR::CCalibration::CCalibration ( )

Default constructor. Creates an uninitialized calibration. Call SetToDefault to initialize it.

◆ CCalibration() [2/2]

Rx::LFR::CCalibration::CCalibration ( CCalibration &&  xCalibration)

Move constructor.

Parameters
xCalibration[in,out]The calibration instance.

◆ ~CCalibration()

Rx::LFR::CCalibration::~CCalibration ( )

Destructor. Frees all used memory including the gray image.

Member Function Documentation

◆ GetCameraFormat()

const void* Rx::LFR::CCalibration::GetCameraFormat ( ) const

Gets the pointer to the internal camera format. Only for internal purposes.

Returns
The pointer to the internal camera format.

◆ GetDepthCorrectionVolume() [1/2]

CRxMapping3D& Rx::LFR::CCalibration::GetDepthCorrectionVolume ( )

Gets the depth correction volume.

Returns
The depth correction volume.

◆ GetDepthCorrectionVolume() [2/2]

const CRxMapping3D& Rx::LFR::CCalibration::GetDepthCorrectionVolume ( ) const

Gets the depth correction volume.

Returns
The depth correction volume.

◆ GetGrayImage() [1/2]

CRxImage& Rx::LFR::CCalibration::GetGrayImage ( )

Gets the gray image. The gray image is invalid if this calibration has no gray image.

Returns
The gray image.

◆ GetGrayImage() [2/2]

const CRxImage& Rx::LFR::CCalibration::GetGrayImage ( ) const

Gets the gray image. The gray image is invalid if this calibration has no gray image.

Returns
The gray image.

◆ GetGridData()

void Rx::LFR::CCalibration::GetGridData ( CRxArray2DDouble adLensData2D,
bool  bMLI 
) const

Gets the grid data of this calibration.

The grid data is a 2D vector of lens information. For each lens on the grid exists a four component entry with the following values:

  • 1. X position of the lens center given in pixels on the PXA
  • 2. Y position of the lens center given in pixels on the PXA
  • 3. The effective radius of the lens
  • 4. The lens type of the lens.
Parameters
adLensData2D[out] The 2D lens information vector.
bMLI[in] True to get the MLI grid. False to get the MLA grid.

◆ GetImpl() [1/2]

CCalibration_Impl & Rx::LFR::CPimpl< CCalibration_Impl , Interfaces::ECalib::ID >::GetImpl
inlineinherited

Gets the non constant implementation.

Returns
The implementation.

◆ GetImpl() [2/2]

const CCalibration_Impl & Rx::LFR::CPimpl< CCalibration_Impl , Interfaces::ECalib::ID >::GetImpl
inlineinherited

Gets the constant implementation.

Returns
The implementation.

◆ GetInterface() [1/4]

void* Rx::LFR::CPimpl< CCalibration_Impl , Interfaces::ECalib::ID >::GetInterface ( Interfaces::ECalib::ID  eInterface)
inherited

Gets the interface defined by the given interface ID.

Parameters
eInterface[in] The interface ID.
Returns
Null if it fails, else the interface.

◆ GetInterface() [2/4]

TInterface* Rx::LFR::CPimpl< CCalibration_Impl , Interfaces::ECalib::ID >::GetInterface ( Interfaces::ECalib::ID  eInterface)
inlineinherited

Gets the interface defined by the given interface ID.

Template Parameters
TInterface[in] The interface type.
Parameters
eInterface[in] The interface.
Returns
Null if it fails, else the interface.

◆ GetInterface() [3/4]

const void* Rx::LFR::CPimpl< CCalibration_Impl , Interfaces::ECalib::ID >::GetInterface ( Interfaces::ECalib::ID  eInterface) const
inherited

Gets the interface defined by the given interface ID.

Parameters
eInterface[in] The interface ID.
Returns
Null if it fails, else the interface.

◆ GetInterface() [4/4]

const TInterface* Rx::LFR::CPimpl< CCalibration_Impl , Interfaces::ECalib::ID >::GetInterface ( Interfaces::ECalib::ID  eInterface) const
inlineinherited

Gets the interface defined by the given interface ID.

Template Parameters
TInterface[in] The interface type.
Parameters
eInterface[in] The interface ID.
Returns
Null if it fails, else the interface.

◆ GetParams() [1/2]

◆ GetParams() [2/2]

◆ HasDepthCorrectionVolume()

bool Rx::LFR::CCalibration::HasDepthCorrectionVolume ( ) const

Query if this object has a depth correction volume.

Returns
True if there is a depth correction volume, false if not.

◆ HasGrayImage()

bool Rx::LFR::CCalibration::HasGrayImage ( ) const

Queries if this calibration has a gray image.

Returns
True if this calibration has a gray image, false if not.

◆ HasInterface()

bool Rx::LFR::CPimpl< CCalibration_Impl , Interfaces::ECalib::ID >::HasInterface ( Interfaces::ECalib::ID  eInterface)
inlineinherited

Queries if this object has the given interface.

Parameters
eInterface[in] The interface to query.
Returns
True if this class has the given interface, false if not.

◆ operator=()

CCalibration& Rx::LFR::CCalibration::operator= ( CCalibration &&  xCalibration)

Move assignment operator.

Parameters
xCalibration[in,out] The calibration instance.
Returns
The instance.

◆ SaveAsXmlFile()

void Rx::LFR::CCalibration::SaveAsXmlFile ( const CRxString sxFilename)

Saves some details of this calibration as a XML file.

Parameters
sxFilename[in] The file name.

◆ SaveAsXmlString()

void Rx::LFR::CCalibration::SaveAsXmlString ( CRxString sxXml)

Saves some details of this calibration as a XML string.

Parameters
sxXml[out] The XML string.

◆ SetCameraFormat()

void Rx::LFR::CCalibration::SetCameraFormat ( const void *  pvData)

Sets the camera format by pointer. Only for internal purposes.

Parameters
pvData[in] The pointer to the camera format to set.

◆ SetDepthCorrectionVolume() [1/2]

void Rx::LFR::CCalibration::SetDepthCorrectionVolume ( const CRxMapping3D xMapping)

Sets the depth correction volume. This copies the given mapping into this calibration.

Parameters
xMapping[in] The mapping.

◆ SetDepthCorrectionVolume() [2/2]

void Rx::LFR::CCalibration::SetDepthCorrectionVolume ( CRxMapping3D &&  xMapping)

Sets the depth correction volume. This moves the given mapping into this calibration.

Parameters
xMapping[in] The mapping is invalid after this call.

◆ SetGrayImage() [1/2]

void Rx::LFR::CCalibration::SetGrayImage ( const CRxImage xImg)

Sets the given image as the gray image. This copies the given image into this calibration.

Parameters
xImg[in] The gray image.

◆ SetGrayImage() [2/2]

void Rx::LFR::CCalibration::SetGrayImage ( CRxImage &&  xImg)

Sets the given image as the gray image. This moves the given image into this calibration.

Parameters
xImg[in] The gray image. Is invalid after this call.

◆ SetToDefault()

void Rx::LFR::CCalibration::SetToDefault ( int  iHeightPX,
int  iWidthPX 
)

Sets this calibration to default. All applied parameters are reset. The gray image is not affected.

Parameters
iHeightPX[in] The height of the camera sensor in pixels.
iWidthPX[in] The width of the camera sensor in pixels.