Raytrix Light Field SDK  v3.1
Logo
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Properties Events Groups Pages
Light Field Calibration API functions

Methods to perform a camera calibration. More...

Functions

static void Rx::Net::ApiLF::RxMetricCalibAddBoundImage ([Out] unsigned% uObjectId)
 Add the currently bound image to metric calibration. More...
 
static void Rx::Net::ApiLF::RxMetricCalibApplyCalibrationToBoundImage ()
 Apply the computed metric calibration to a newly bound image. More...
 
static void Rx::Net::ApiLF::RxMetricCalibEvaluatePointSpaceCoverage ([Out] array< double >^%adAreaCovered)
 Evaluate the metric calibration data set. More...
 
static void Rx::Net::ApiLF::RxMetricCalibExecute (Rx::Net::ApiLF::EMetricCalibResult eResult, bool bCalibrateAfterInit)
 Performs the metric calibration. More...
 
static void Rx::Net::ApiLF::RxMetricCalibFinalize ()
 Clears the metric calibration. More...
 
static void Rx::Net::ApiLF::RxMetricCalibFindPoints (Rx::Net::Image^ xImage, [Out] array< double, 2 >^%amatPointEllipses)
 Raytrix metric calib transform bound image to point model. More...
 
static void Rx::Net::ApiLF::RxMetricCalibGetAddImageResult (unsigned uObjectId, [Out] Rx::Net::MetricCalibAddImageResult^ %AddObjectResult)
 Get result to an object id. More...
 
static void Rx::Net::ApiLF::RxMetricCalibGetAllObjectIds ([Out] array< unsigned >^%auObjectIds)
 Get all valid object ids from the metric calibration. More...
 
static void Rx::Net::ApiLF::RxMetricCalibGetModelsList ([Out] array< double, 2 >^%amatModelsList)
 Get the list of all models extracted from the added image. More...
 
static void Rx::Net::ApiLF::RxMetricCalibGetPointConnections (unsigned uId, Rx::Net::ApiLF::EMetricCalibPointType ePointType, [Out] array< double, 2 >^%amatLines)
 Get All point connections. More...
 
static void Rx::Net::ApiLF::RxMetricCalibGetPointEllipses (unsigned uId, Rx::Net::ApiLF::EMetricCalibPointFilter ePointFilter, Rx::Net::ImageFormat^ xTargetImageFormat, [Out] array< double, 2 >^%matPointEllipses)
 Get the list of specific point ellipses. More...
 
static void Rx::Net::ApiLF::RxMetricCalibGetPoints (unsigned uId, Rx::Net::ApiLF::EMetricCalibPointFilter ePointFilter, Rx::Net::ApiLF::EMetricCalibPointType ePointType, [Out] array< double, 2 >^%amatPoints)
 Get specific points from the models. More...
 
static void Rx::Net::ApiLF::RxMetricCalibGetRefocusedImage (unsigned uObjectId, Rx::Net::Image^ xImage)
 Get the refocused image from the metric calibration. More...
 
static void Rx::Net::ApiLF::RxMetricCalibGetResult ([Out] Rx::Net::MetricCalibResult^ %xMetricCalibResult)
 Evaluated the calibration result. That is, the error function of the calibration is executed once with the current parameter settings and mean residual, mean euclidean distance, min euclidean distance, max euclidean distance and the standard deviation. Note that this function also projects all test points of all test models to object space. More...
 
static void Rx::Net::ApiLF::RxMetricCalibInitialize (Rx::Net::ApiLF::EMetricCalibrationType eCalibrationType)
 Initialize metric calibration. More...
 
static void Rx::Net::ApiLF::RxMetricCalibLoadCalibration (System::String^ sFilename)
 Load a '.rxcalib' file from file system, containing a calibrated system. More...
 
static void Rx::Net::ApiLF::RxMetricCalibLoadPlanarModelData (System::String^ sFilename, [Out] array< unsigned >^%auObjectIds)
 Load planar model data. More...
 
static void Rx::Net::ApiLF::RxMetricCalibProjectPointsIntoObjectSpace (array< double, 2 >^amatPoints, Rx::Net::Image^ xDepthImage, [Out] array< double, 2 >^%amatPoints3D)
 Receive metric calib projection points into object space. More...
 
static void Rx::Net::ApiLF::RxMetricCalibRegisterCallbackFunctionWithMessageHandler (bool bRegister)
 Registers the callback function of the metric calibration to the api message handler. More...
 
static void Rx::Net::ApiLF::RxMetricCalibRemoveModelFromCalibrationSet (unsigned nObjectId)
 Removes the models of the object given by its object id from the calibration set. Changes the result information related to this object id. You can receive the information of an object by calling Rx::Net::ApiLF::RxMetricCalibGetAddImageResult(unsigned, Rx::CRxMetricCalibAddImageResult);. More...
 
static void Rx::Net::ApiLF::RxMetricCalibResetToNominal ()
 Reset the metric calibration to nominal values. More...
 
static void Rx::Net::ApiLF::RxMetricCalibSaveCalibration (System::String^ sFilename)
 Save the converged calibration result. More...
 
static void Rx::Net::ApiLF::RxMetricCalibSavePlanarModelData (System::String^ sFilename)
 Save planar model to filesystem. More...
 
static void Rx::Net::ApiLF::RxMlaCalibExecute ([Out] Rx::Net::ApiLF::EMlaCalibResult% eResult, bool bIgnoreImageQuality)
 Calibrate the micro lens image grid using white image from bound image. More...
 
static void Rx::Net::ApiLF::RxMlaCalibGetGridData ([Out] array< double >^%aLensData, [Out] double% dLensRadius, unsigned uLensType)
 Get the lens center positions of given type in pixel coordinates. The corresponding lensRadius is returned. More...
 
static bool Rx::Net::ApiLF::RxMlaCalibParallelLightExecute ()
 Calibrate the MLA properties using a parallel light image. Calibration has to be augmented by a white-image calibration to be valid. More...
 
static void Rx::Net::ApiLF::RxMlaCalibRegisterCallbackFunction (bool bActivate)
 Enables/Disables progress callback of Rx::Net::ApiLF::RxMlaCalibExecute / Rx::Net::ApiLF::RxMlaCalibParallelLightExecute. More...
 

Detailed Description

Methods to perform a camera calibration.

Function Documentation

static void Rx::Net::ApiLF::RxMetricCalibAddBoundImage ( [Out] unsigned%  uObjectId)
static

Add the currently bound image to metric calibration.

The currently bound image is added to extract all planar models found in this image. Thereafter all test models are created from all extracted planar models. Afterwards the Test models are filtered for optimization reasons. The ID of the newly created object is returned in nObjectId

Precondition
An image must be bound before calling this function.
Parameters
[out]uObjectIdThe Id of the newly created object.
static void Rx::Net::ApiLF::RxMetricCalibApplyCalibrationToBoundImage ( )
static

Apply the computed metric calibration to a newly bound image.

static void Rx::Net::ApiLF::RxMetricCalibEvaluatePointSpaceCoverage ( [Out] array< double >^%  adAreaCovered)
static

Evaluate the metric calibration data set.

Parameters
[out]adAreaCoveredA vector containing the number of points in each area. The scene is divided into 12 parts and is sorted as follows:
Index Area
0 Left Down Front
1 Left Down Middle
2 Left Down Back
3 Left Up Front
4 Left Up Middle
5 Left Up Back
6 Right Down Front
7 Right Down Middle
8 Right Down Back
9 Right Up Front
10 Right Up Middle
11 Right Up Back
static void Rx::Net::ApiLF::RxMetricCalibExecute ( Rx::Net::ApiLF::EMetricCalibResult  eResult,
bool  bCalibrateAfterInit 
)
static

Performs the metric calibration.

Precondition
An image must be bound before calling this function.
Attention
Associated Api Parameters:
Parameters
eResultThe result.
bCalibrateAfterInitIndicates whether the actual calibration should be performed after the first initial iteration. If not this function performs only the first iteration which includes the initial error evaluation. This can be used to display the point situation before calibration.
static void Rx::Net::ApiLF::RxMetricCalibFinalize ( )
static

Clears the metric calibration.

static void Rx::Net::ApiLF::RxMetricCalibFindPoints ( Rx::Net::Image xImage,
[Out] array< double, 2 >^%  amatPointEllipses 
)
static

Raytrix metric calib transform bound image to point model.

Parameters
[in]xImageThe refocused image.
[out]amatPointEllipsesThe mat points 2D.
static void Rx::Net::ApiLF::RxMetricCalibGetAddImageResult ( unsigned  uObjectId,
[Out] Rx::Net::MetricCalibAddImageResult^ %  AddObjectResult 
)
static

Get result to an object id.

Parameters
uObjectIdIdentifier for the object.
[out]AddObjectResultThe metric calibration add object result.
static void Rx::Net::ApiLF::RxMetricCalibGetAllObjectIds ( [Out] array< unsigned >^%  auObjectIds)
static

Get all valid object ids from the metric calibration.

Parameters
[in]auObjectIdsList of identifiers for the objects.
static void Rx::Net::ApiLF::RxMetricCalibGetModelsList ( [Out] array< double, 2 >^%  amatModelsList)
static

Get the list of all models extracted from the added image.

Parameters
[out]amatModelsListArray of the models (planar models, test models). The first element in the array (0,0) (0, 1) represents the count of the respective model type.
static void Rx::Net::ApiLF::RxMetricCalibGetPointConnections ( unsigned  uId,
Rx::Net::ApiLF::EMetricCalibPointType  ePointType,
[Out] array< double, 2 >^%  amatLines 
)
static

Get All point connections.

Attention
The point connections are only created when the Box-Calibration is performed
Parameters
uIdThe identifier.
[in,out]amatLines[in,out] An array of all connected points
static void Rx::Net::ApiLF::RxMetricCalibGetPointEllipses ( unsigned  uId,
Rx::Net::ApiLF::EMetricCalibPointFilter  ePointFilter,
Rx::Net::ImageFormat xTargetImageFormat,
[Out] array< double, 2 >^%  matPointEllipses 
)
static

Get the list of specific point ellipses.

Parameters
uIdThe identifier of the test model.
ePointFilterA filter specifying the point.
[in,out]xTargetImageFormattarget image format.
[out]matPointEllipsesThe array of point ellipses.
static void Rx::Net::ApiLF::RxMetricCalibGetPoints ( unsigned  uId,
Rx::Net::ApiLF::EMetricCalibPointFilter  ePointFilter,
Rx::Net::ApiLF::EMetricCalibPointType  ePointType,
[Out] array< double, 2 >^%  amatPoints 
)
static

Get specific points from the models.

Parameters
uIdThe identifier of the model.
ePointFilterA filter specifying the point.
ePointTypeType of the point.
[out]amatPointsAn array of all points (x,y,z).
static void Rx::Net::ApiLF::RxMetricCalibGetRefocusedImage ( unsigned  uObjectId,
Rx::Net::Image xImage 
)
static

Get the refocused image from the metric calibration.

Parameters
uObjectIdIdentifier for the object.
[out]xImageThe image.
static void Rx::Net::ApiLF::RxMetricCalibGetResult ( [Out] Rx::Net::MetricCalibResult^ %  xMetricCalibResult)
static

Evaluated the calibration result. That is, the error function of the calibration is executed once with the current parameter settings and mean residual, mean euclidean distance, min euclidean distance, max euclidean distance and the standard deviation. Note that this function also projects all test points of all test models to object space.

Attention
The calibration result contains: -The mean residual -The mean euclidean distance -The minimum euclidean distance -The maximum euclidean distance -The standard deviation.
Parameters
[out]xMetricCalibResultThe metric calib result.
static void Rx::Net::ApiLF::RxMetricCalibInitialize ( Rx::Net::ApiLF::EMetricCalibrationType  eCalibrationType)
static

Initialize metric calibration.

Parameters
eCalibrationTypeType of the calibration.
static void Rx::Net::ApiLF::RxMetricCalibLoadCalibration ( System::String^  sFilename)
static

Load a '.rxcalib' file from file system, containing a calibrated system.

Parameters
[in]sFilenameFilename of the calibration file.
static void Rx::Net::ApiLF::RxMetricCalibLoadPlanarModelData ( System::String^  sFilename,
[Out] array< unsigned >^%  auObjectIds 
)
static

Load planar model data.

Parameters
[in]sFilenameFilename of the model data.
[in]auObjectIdsList of identifiers for the objects.
static void Rx::Net::ApiLF::RxMetricCalibProjectPointsIntoObjectSpace ( array< double, 2 >^  amatPoints,
Rx::Net::Image xDepthImage,
[Out] array< double, 2 >^%  amatPoints3D 
)
static

Receive metric calib projection points into object space.

Parameters
[in]amatPointsThe matrix points 2D.
[in]xDepthImageThe depth image.
[out]amatPoints3DThe matrix points 3D.
static void Rx::Net::ApiLF::RxMetricCalibRegisterCallbackFunctionWithMessageHandler ( bool  bRegister)
static

Registers the callback function of the metric calibration to the api message handler.

Parameters
bRegistertrue to register.
static void Rx::Net::ApiLF::RxMetricCalibRemoveModelFromCalibrationSet ( unsigned  nObjectId)
static

Removes the models of the object given by its object id from the calibration set. Changes the result information related to this object id. You can receive the information of an object by calling Rx::Net::ApiLF::RxMetricCalibGetAddImageResult(unsigned, Rx::CRxMetricCalibAddImageResult);.

Parameters
[in]nObjectIdIdentifier for the object.
static void Rx::Net::ApiLF::RxMetricCalibResetToNominal ( )
static

Reset the metric calibration to nominal values.

static void Rx::Net::ApiLF::RxMetricCalibSaveCalibration ( System::String^  sFilename)
static

Save the converged calibration result.

Attention
The filename must end with '.rxcalib'.
Parameters
[in]sFilenameFilename of the calibration to save.
static void Rx::Net::ApiLF::RxMetricCalibSavePlanarModelData ( System::String^  sFilename)
static

Save planar model to filesystem.

Parameters
[in]sFilenameFilename of the .calib file.
static void Rx::Net::ApiLF::RxMlaCalibExecute ( [Out] Rx::Net::ApiLF::EMlaCalibResult eResult,
bool  bIgnoreImageQuality 
)
static

Calibrate the micro lens image grid using white image from bound image.

This function attempts an automatic calibration of the micro lens image parameters. If a parallel light image calibration is available for the bound image, it is augmented. Else a standard white image calibration is performed.

Warning
If the micro-image parameter (i.e. position and pitch) are too far off, this function may not return a correct calibration. A white image has to be available for calibration estimation.
Precondition
There are currently two different calibration modes that can be selected via the parameter Rx::Net::ApiLF::EPar::MlaImg_CalibType. The available calibration modes are Rx::Net::ApiLF::ECalibGridMode::Full (including distortion models), Rx::Net::ApiLF::ECalibGridMode::Reduced (omitting distortions) and Rx::Net::ApiLF::ECalibGridMode::Plain (without homography).

This function reports on its progress using the set progress interface.

Parameters
eResult[out] The result.
bIgnoreImageQualityTrue to ignore image quality.
static void Rx::Net::ApiLF::RxMlaCalibGetGridData ( [Out] array< double >^%  aLensData,
[Out] double%  dLensRadius,
unsigned  uLensType 
)
static

Get the lens center positions of given type in pixel coordinates. The corresponding lensRadius is returned.

Parameters
[out]aLensDataThe result list, containing the lens centers in pixel coordinates.
[out]dLensRadiusThe lens radius for the given Lens Type.
uLensTypeThe lens type number to retrieve.
static bool Rx::Net::ApiLF::RxMlaCalibParallelLightExecute ( )
static

Calibrate the MLA properties using a parallel light image. Calibration has to be augmented by a white-image calibration to be valid.

Tries to estimate the properties of the MLA, i.e., lens pitch, MLA rotation etc..

Precondition
The parallel light image has to be available in the bound raw image.
Attention
Writes the estimation result to the active camera format. Set's ParallelCalib-valid flag to true. To be used for master- calibration only!
Returns
True if it succeeds, false, if the estimation algorithm detected an invalid estimation.
static void Rx::Net::ApiLF::RxMlaCalibRegisterCallbackFunction ( bool  bActivate)
static

Enables/Disables progress callback of Rx::Net::ApiLF::RxMlaCalibExecute / Rx::Net::ApiLF::RxMlaCalibParallelLightExecute.

Standard interface is used.

  • ACG_Stage : reports active stage of algorithm (0 init, 1-3 respective stage, -1 finish)
  • ACG_Iteration : reports number of estimation steps performed in active stage.
Parameters
bActivateSet to 'true' to activate callback interface for progress information.