Raytrix Light Field SDK  4.0
Logo
Public Member Functions | List of all members
Rx::LFR::Net::Calibration Class Reference

Detailed Description

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

Inherits Rx::Net::NativeInterfaceWrapper< Rx::LFR::CCalibration, Rx::LFR::Net::Interfaces::ECalib >.

Public Member Functions

 Calibration ()
 Default constructor. Creates an uninitialized calibration. Call SetToDefault to initialize it. More...
 
 Calibration (Rx::LFR::CCalibration &xNative)
 Constructor. More...
 
 ~Calibration ()
 Destructor. Frees all used memory including the gray image. More...
 
const void * GetCameraFormat ()
 Gets the pointer to the internal camera format. Only for internal purposes. More...
 
Rx::Net::ImageGetGrayImage ()
 Gets the gray image. The gray image is invalid if this calibration has no gray image. More...
 
void GetGridData (RX_OUT array< double, 2 >^%adLensData2D, bool bMLI)
 Gets the grid data of this calibration. More...
 
virtual System::Object^  GetInterface (Rx::LFR::Net::Interfaces::ECalib eData)
 Gets the interface. More...
 
IParameters< Rx::LFR::Net::Params::ECalib >^ GetParams ()
 Gets the parameters object. More...
 
void GetRawImagePointsFromVirtualMM_s (RX_OUT array< double >^%adRawPoints, double dSrcX, double dSrcY, double dSrcZ, int iRadiusLU)
 Projects the given 3D point given in virtual space in sensor frame in millimeters through all suitable micro lenses. More...
 
void GetRawImagePointsFromVirtualMM_s (RX_OUT array< double >^%adRawPoints, double dSrcX, double dSrcY, double dSrcZ, int iRadiusLU, int iMinAllowedDistanceToLensBorderPX)
 Projects the given 3D point given in virtual space in sensor frame in millimeters through all suitable micro lenses. More...
 
void GetVirtualMM_sFromRawImagePoint (RX_OUT double% dTrgX, RX_OUT double% dTrgY, RX_OUT double% dTrgZ, double dSrcX, double dSrcY, double dSrcZ)
 Projects from the given pixel position in the raw image with the given standard depth through the micro lenses into virtual space. More...
 
bool HasGrayImage ()
 Queries if this calibration has a gray image. More...
 
bool Project (RX_OUT array< double >^%adTrgPoints, array< double >^adSrcPoints, ESpace eTrgSpace, ESpace eSrcSpace, Rx::Net::ImageFormat^ xFormat)
 Projects an array of points from the given source space into the given target space. More...
 
double ProjectDepth (double dSrcDepth, ESpace eSrcSpace, bool bSrcVD, ESpace eTrgSpace, bool bTrgVD)
 Projects the given source depth value into the given target space. More...
 
void SaveAsXmlFile (System::String^ sFilename)
 Saves some details of this calibration as a XML file. More...
 
void SaveAsXmlString (RX_OUT System::String^ %sXml)
 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 SetGrayImage (Rx::Net::Image^ xImg)
 Sets the given image as the gray image. This copies the given image into this calibration. More...
 
void SetGrayImage (Rx::Net::Image^ xImg, bool bMove)
 Sets the given image as the gray image. This moves or copies 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...
 

Constructor & Destructor Documentation

Rx::LFR::Net::Calibration::Calibration ( )
inline

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

Rx::LFR::Net::Calibration::Calibration ( Rx::LFR::CCalibration xNative)
inline

Constructor.

Wraps the given native instance instead of creating an own instance. The given native instance must be valid for the lifetime of this instance.

Parameters
xNative[in] The native instance to be wrapped by this class.
Rx::LFR::Net::Calibration::~Calibration ( )
inline

Destructor. Frees all used memory including the gray image.

Member Function Documentation

const void* Rx::LFR::Net::Calibration::GetCameraFormat ( )
inline

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

Returns
The pointer to the internal camera format.
Rx::Net::Image ^ Rx::LFR::Net::Calibration::GetGrayImage ( )
inline

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

Returns
The gray image.
void Rx::LFR::Net::Calibration::GetGridData ( RX_OUT array< double, 2 >^%  adLensData2D,
bool  bMLI 
)
inline

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.
bMLITrue to get the MLI grid. False to get the MLA grid.

Gets the interface.

Returns
The interface.
IParameters<Rx::LFR::Net::Params::ECalib> ^ Rx::LFR::Net::Calibration::GetParams ( )
inline

Gets the parameters object.

Returns
The parameters object.
void Rx::LFR::Net::Calibration::GetRawImagePointsFromVirtualMM_s ( RX_OUT array< double >^%  adRawPoints,
double  dSrcX,
double  dSrcY,
double  dSrcZ,
int  iRadiusLU 
)
inline

Projects the given 3D point given in virtual space in sensor frame in millimeters through all suitable micro lenses.

Parameters
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.
dSrcXThe X coordinate of the source point in virtual space in millimeters.
dSrcYThe Y coordinate of the source point in virtual space in millimeters.
dSrcZThe Z coordinate of the source point in virtual space in millimeters.
iRadiusLUThe 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::Net::Calibration::GetRawImagePointsFromVirtualMM_s ( RX_OUT array< double >^%  adRawPoints,
double  dSrcX,
double  dSrcY,
double  dSrcZ,
int  iRadiusLU,
int  iMinAllowedDistanceToLensBorderPX 
)
inline

Projects the given 3D point given in virtual space in sensor frame in millimeters through all suitable micro lenses.

Parameters
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.
dSrcXThe X coordinate of the source point in virtual space in millimeters.
dSrcYThe Y coordinate of the source point in virtual space in millimeters.
dSrcZThe Z coordinate of the source point in virtual space in millimeters.
iRadiusLUThe radius given in lens units that is used to find the suitable micro lenses. A radius of 2 or 3 lens units is recommended.
iMinAllowedDistanceToLensBorderPXZero-based index of the minimum allowed distance to lens border in pixels.
void Rx::LFR::Net::Calibration::GetVirtualMM_sFromRawImagePoint ( RX_OUT double%  dTrgX,
RX_OUT double%  dTrgY,
RX_OUT double%  dTrgZ,
double  dSrcX,
double  dSrcY,
double  dSrcZ 
)
inline

Projects from the given pixel position in the raw image with the given standard depth through the micro lenses into virtual space.

Parameters
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.
dSrcXThe X coordinate of the source point in pixels in raw image format.
dSrcYThe Y coordinate of the target point in pixels in raw image format.
dSrcZThe Z coordinate of the target point in standard depths (Between 0.5 and 1.0)
bool Rx::LFR::Net::Calibration::HasGrayImage ( )
inline

Queries if this calibration has a gray image.

Returns
True if this calibration has a gray image, false if not.
bool Rx::LFR::Net::Calibration::Project ( RX_OUT array< double >^%  adTrgPoints,
array< double >^  adSrcPoints,
ESpace  eTrgSpace,
ESpace  eSrcSpace,
Rx::Net::ImageFormat xFormat 
)
inline

Projects an array of points from the given source space into the given target space.

Parameters
adTrgPoints[out] The array of projected points.
adSrcPoints[in] The array of points to project.
eTrgSpaceThe target space.
eSrcSpaceThe source space.
xFormat[in] 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.
Returns
True if all projections succeeded, false if at least one projection failed (out of sensor or image).
double Rx::LFR::Net::Calibration::ProjectDepth ( double  dSrcDepth,
ESpace  eSrcSpace,
bool  bSrcVD,
ESpace  eTrgSpace,
bool  bTrgVD 
)
inline

Projects the given source depth value into the given target space.

Parameters
dSrcDepthThe source depth value in millimeter or virtual depths.
eSrcSpaceThe source space.
bSrcVDTrue if the source depth value is given in virtual depths. Is ignored if the source space isn't virtual.
eTrgSpaceThe target space.
bTrgVDTrue if the target depth value should be given in virtual depths. Is ignored if the target space isn't virtual.
Returns
The resultant target depth value in millimeter or virtual depths.
void Rx::LFR::Net::Calibration::SaveAsXmlFile ( System::String^  sFilename)
inline

Saves some details of this calibration as a XML file.

Parameters
sFilename[in] The file name.
void Rx::LFR::Net::Calibration::SaveAsXmlString ( RX_OUT System::String^ %  sXml)
inline

Saves some details of this calibration as a XML string.

Parameters
sXml[out] The XML string.
void Rx::LFR::Net::Calibration::SetCameraFormat ( const void *  pvData)
inline

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

Parameters
pvData[in] The pointer to the camera format to set.
void Rx::LFR::Net::Calibration::SetGrayImage ( Rx::Net::Image xImg)
inline

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

Parameters
xImg[in] The gray image.
void Rx::LFR::Net::Calibration::SetGrayImage ( Rx::Net::Image xImg,
bool  bMove 
)
inline

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

Parameters
xImg[in,out] The gray image. Is invalid after this call if bMove is true.
bMoveTrue to move the image; false to copy the image.
void Rx::LFR::Net::Calibration::SetToDefault ( int  iHeightPX,
int  iWidthPX 
)
inline

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

Parameters
iHeightPXThe height of the camera sensor in pixels.
iWidthPXThe width of the camera sensor in pixels.