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... | |
const CRxMapping3D & | GetDepthCorrectionVolume () const |
Gets the depth correction volume. More... | |
CRxMapping3D & | GetDepthCorrectionVolume () |
Gets the depth correction volume. More... | |
const CRxImage & | GetGrayImage () const |
Gets the gray image. The gray image is invalid if this calibration has no gray image. More... | |
CRxImage & | GetGrayImage () |
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... | |
const void * | GetInterface (Interfaces::ECalib::ID eInterface) const |
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 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 |
void | GetRawImagePointsFromVirtualMM_s (CRxArray< double > &adRawPoints, double dSrcX, double dSrcY, double dSrcZ, int iRadiusLU) const |
Projects the given 3D point given in virtual space in sensor frame in millimeters through all suitable micro lenses. More... | |
void | GetRawImagePointsFromVirtualMM_s (CRxArray< double > &adRawPoints, double dSrcX, double dSrcY, double dSrcZ, int iRadiusLU, int iMinAllowedDistanceToLensBorderPX) const |
Projects the given 3D point given in virtual space in sensor frame in millimeters through all suitable micro lenses. More... | |
void | GetVirtualMM_sFromRawImagePoint (double &dTrgX, double &dTrgY, double &dTrgZ, double dSrcX, double dSrcY, double dSrcZ) const |
Projects from the given pixel position in the raw image with the given standard depth through the micro lenses into virtual space. More... | |
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... | |
CCalibration & | operator= (CCalibration &&xCalibration) |
Move assignment operator. More... | |
bool | Project (CRxArrayDouble &adTrgPoints, const CRxArrayDouble &adSrcPoints, LF::ESpace::ID eTrgSpace, LF::ESpace::ID eSrcSpace, const CRxImageFormat &xFormat) const |
Projects an array of points from the given source space into the given target space. More... | |
double | ProjectDepth (double dSrcDepth, LF::ESpace::ID eSrcSpace, bool bSrcVD, LF::ESpace::ID eTrgSpace, bool bTrgVD) const |
Projects the given source depth value into the given target space. 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 (CRxMapping3D &&xMapping) |
Sets the depth correction volume. This moves the given mapping into this calibration. More... | |
void | SetGrayImage (const Interop::Runtime28::IImage *pxImg) |
Sets the given image as the gray image. This copies the given image 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... | |
|
inherited |
|
inherited |
The type of the parameter enum. Is used by managed wrapper classes.
Rx::LFR::CCalibration::CCalibration | ( | ) |
Default constructor. Creates an uninitialized calibration. Call SetToDefault to initialize it.
Rx::LFR::CCalibration::CCalibration | ( | CCalibration && | xCalibration | ) |
Move constructor.
xCalibration | [in,out]The calibration instance. |
Rx::LFR::CCalibration::~CCalibration | ( | ) |
Destructor. Frees all used memory including the gray image.
const void* Rx::LFR::CCalibration::GetCameraFormat | ( | ) | const |
Gets the pointer to the internal camera format. Only for internal purposes.
const CRxMapping3D& Rx::LFR::CCalibration::GetDepthCorrectionVolume | ( | ) | const |
Gets the depth correction volume.
CRxMapping3D& Rx::LFR::CCalibration::GetDepthCorrectionVolume | ( | ) |
Gets the depth correction volume.
const CRxImage& Rx::LFR::CCalibration::GetGrayImage | ( | ) | const |
Gets the gray image. The gray image is invalid if this calibration has no gray image.
CRxImage& Rx::LFR::CCalibration::GetGrayImage | ( | ) |
Gets the gray image. The gray image is invalid if this calibration has no gray image.
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:
adLensData2D | [out] The 2D lens information vector. |
bMLI | True to get the MLI grid. False to get the MLA grid. |
|
inlineinherited |
Gets the non constant implementation.
|
inlineinherited |
Gets the constant implementation.
|
inherited |
Gets the interface defined by the given interface ID.
eInterface | The interface ID. |
|
inherited |
Gets the interface defined by the given interface ID.
eInterface | The interface ID. |
|
inlineinherited |
Gets the interface defined by the given interface ID.
TInterface | The interface type. |
eInterface | The interface. |
|
inlineinherited |
Gets the interface defined by the given interface ID.
TInterface | The interface type. |
eInterface | The interface ID. |
|
inherited |
|
inherited |
void Rx::LFR::CCalibration::GetRawImagePointsFromVirtualMM_s | ( | CRxArray< double > & | adRawPoints, |
double | dSrcX, | ||
double | dSrcY, | ||
double | dSrcZ, | ||
int | iRadiusLU | ||
) | const |
Projects the given 3D point given in virtual space in sensor frame in millimeters through all suitable micro lenses.
adRawPoints | [out] The projected points. This array contains three entries per projected point. The first and the second entry are the X and the Y coordinates of the projected point given in pixels in the raw image. The third entry is the corresponding lens type. |
dSrcX | The X coordinate of the source point in virtual space in millimeters. |
dSrcY | The Y coordinate of the source point in virtual space in millimeters. |
dSrcZ | The Z coordinate of the source point in virtual space in millimeters. |
iRadiusLU | The radius given in lens units that is used to find the suitable micro lenses. A radius of 2 or 3 lens units is recommended. |
void Rx::LFR::CCalibration::GetRawImagePointsFromVirtualMM_s | ( | CRxArray< double > & | adRawPoints, |
double | dSrcX, | ||
double | dSrcY, | ||
double | dSrcZ, | ||
int | iRadiusLU, | ||
int | iMinAllowedDistanceToLensBorderPX | ||
) | const |
Projects the given 3D point given in virtual space in sensor frame in millimeters through all suitable micro lenses.
adRawPoints | [out] The projected points. This array contains three entries per projected point. The first and the second entry are the X and the Y coordinates of the projected point given in pixels in the raw image. The third entry is the corresponding lens type. |
dSrcX | The X coordinate of the source point in virtual space in millimeters. |
dSrcY | The Y coordinate of the source point in virtual space in millimeters. |
dSrcZ | The Z coordinate of the source point in virtual space in millimeters. |
iRadiusLU | The radius given in lens units that is used to find the suitable micro lenses. A radius of 2 or 3 lens units is recommended. |
iMinAllowedDistanceToLensBorderPX | The minimal allowed distance to lens border in pixels. |
void Rx::LFR::CCalibration::GetVirtualMM_sFromRawImagePoint | ( | double & | dTrgX, |
double & | dTrgY, | ||
double & | dTrgZ, | ||
double | dSrcX, | ||
double | dSrcY, | ||
double | dSrcZ | ||
) | const |
Projects from the given pixel position in the raw image with the given standard depth through the micro lenses into virtual space.
dTrgX | [in,out] The X coordinate of the target point in virtual space in mm. |
dTrgY | [in,out] The Y coordinate of the target point in virtual space in mm. |
dTrgZ | [in,out] The Z coordinate of the target point in virtual space in mm. |
dSrcX | The X coordinate of the source point in pixels in raw image format. |
dSrcY | The Y coordinate of the target point in pixels in raw image format. |
dSrcZ | The Z coordinate of the target point in standard depths (Between 0.5 and 1.0) |
bool Rx::LFR::CCalibration::HasDepthCorrectionVolume | ( | ) | const |
Query if this object has a depth correction volume.
bool Rx::LFR::CCalibration::HasGrayImage | ( | ) | const |
Queries if this calibration has a gray image.
|
inlineinherited |
Queries if this object has the given interface.
eInterface | The interface to query. |
CCalibration& Rx::LFR::CCalibration::operator= | ( | CCalibration && | xCalibration | ) |
Move assignment operator.
xCalibration | [in,out] The calibration instance. |
bool Rx::LFR::CCalibration::Project | ( | CRxArrayDouble & | adTrgPoints, |
const CRxArrayDouble & | adSrcPoints, | ||
LF::ESpace::ID | eTrgSpace, | ||
LF::ESpace::ID | eSrcSpace, | ||
const CRxImageFormat & | xFormat | ||
) | const |
Projects an array of points from the given source space into the given target space.
adTrgPoints | [out] The array of projected points. |
adSrcPoints | The array of points to project. |
eTrgSpace | The target space. |
eSrcSpace | The source space. |
xFormat | The image format of the source and/or target space. Only required if the space is a view. This parameter limits this function to allow only projections from an image format to the same image format. |
double Rx::LFR::CCalibration::ProjectDepth | ( | double | dSrcDepth, |
LF::ESpace::ID | eSrcSpace, | ||
bool | bSrcVD, | ||
LF::ESpace::ID | eTrgSpace, | ||
bool | bTrgVD | ||
) | const |
Projects the given source depth value into the given target space.
dSrcDepth | The source depth value in millimeter or virtual depths. |
eSrcSpace | The source space. |
bSrcVD | True if the source depth value is given in virtual depths. Is ignored if the source space isn't virtual. |
eTrgSpace | The target space. |
bTrgVD | True if the target depth value should be given in virtual depths. Is ignored if the target space isn't virtual. |
void Rx::LFR::CCalibration::SaveAsXmlFile | ( | const CRxString & | sxFilename | ) |
Saves some details of this calibration as a XML file.
sxFilename | The file name. |
void Rx::LFR::CCalibration::SaveAsXmlString | ( | CRxString & | sxXml | ) |
Saves some details of this calibration as a XML string.
sxXml | [out] The XML string. |
void Rx::LFR::CCalibration::SetCameraFormat | ( | const void * | pvData | ) |
Sets the camera format by pointer. Only for internal purposes.
pvData | [in] The pointer to the camera format to set. |
void Rx::LFR::CCalibration::SetDepthCorrectionVolume | ( | CRxMapping3D && | xMapping | ) |
Sets the depth correction volume. This moves the given mapping into this calibration.
xMapping | [in] The mapping is invalid after this call. |
void Rx::LFR::CCalibration::SetGrayImage | ( | const Interop::Runtime28::IImage * | pxImg | ) |
Sets the given image as the gray image. This copies the given image into this calibration.
pxImg | The image. |
void Rx::LFR::CCalibration::SetGrayImage | ( | const CRxImage & | xImg | ) |
Sets the given image as the gray image. This copies the given image into this calibration.
xImg | The gray image. |
void Rx::LFR::CCalibration::SetGrayImage | ( | CRxImage && | xImg | ) |
Sets the given image as the gray image. This moves the given image into this calibration.
xImg | The gray image. Is invalid after this call. |
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.
iHeightPX | The height of the camera sensor in pixels. |
iWidthPX | The width of the camera sensor in pixels. |