Methods to perform a camera calibration. More...
Functions | |
RXLF_API void | Rx::ApiLF::RxMetricCalibAddBoundImage (unsigned &nObjectId) |
Add the currently bound image to metric calibration. More... | |
RXLF_API void | Rx::ApiLF::RxMetricCalibApplyCalibrationToBoundImage () |
Apply the computed metric calibration to a newly bound image. More... | |
RXLF_API void | Rx::ApiLF::RxMetricCalibEvaluatePointSpaceCoverage (CRxArrayDouble &aAreaCovered) |
Evaluate the metric calibration data set. More... | |
RXLF_API void | Rx::ApiLF::RxMetricCalibExecute (Rx::ApiLF::EMetricCalibResult::ID &eResult, bool bCalibrateAfterInit=true) |
Performs the metric calibration. More... | |
RXLF_API void | Rx::ApiLF::RxMetricCalibFinalize () |
Clears the metric calibration. More... | |
RXLF_API void | Rx::ApiLF::RxMetricCalibFindPoints (Rx::CRxImage &xRefocusedImage, Rx::CRxArray2DDouble &matPoints2D) |
Raytrix metric calib transform bound image to point model. More... | |
RXLF_API void | Rx::ApiLF::RxMetricCalibGetAddImageResult (const unsigned uObjectId, Rx::CRxMetricCalibAddImageResult &smcAddObjectResult) |
Get result to an object id. More... | |
RXLF_API void | Rx::ApiLF::RxMetricCalibGetAllObjectIds (CRxArrayUInt &aObjectIds) |
Get all valid object ids from the metric calibration. More... | |
RXLF_API void | Rx::ApiLF::RxMetricCalibGetModelsList (Rx::CRxArray2DDouble &matModelsList) |
Get the list of all models extracted from the added image. More... | |
RXLF_API void | Rx::ApiLF::RxMetricCalibGetPointConnections (const unsigned uId, const EMetricCalibPointType::ID ePointType, Rx::CRxArray2DDouble &matLines) |
Get All point connections. More... | |
RXLF_API void | Rx::ApiLF::RxMetricCalibGetPointEllipses (const unsigned uId, const EMetricCalibPointFilter::ID ePointFilter, const Rx::CRxImageFormat &xTargetImageFormat, Rx::CRxArray2DDouble &matPointEllipses) |
Get the list of specific point ellipses. More... | |
RXLF_API void | Rx::ApiLF::RxMetricCalibGetPoints (const unsigned uId, const EMetricCalibPointFilter::ID ePointFilter, const EMetricCalibPointType::ID ePointType, Rx::CRxArray2DDouble &matPoints) |
Get specific points from the models. More... | |
RXLF_API void | Rx::ApiLF::RxMetricCalibGetRefocusedImage (const unsigned uObjectId, Rx::CRxImage &xImage) |
Get the refocused image from the metric calibration. More... | |
RXLF_API void | Rx::ApiLF::RxMetricCalibGetResult (Rx::CRxMetricCalibResult &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... | |
RXLF_API void | Rx::ApiLF::RxMetricCalibInitialize (Rx::ApiLF::EMetricCalibrationType::ID eCalibrationType) |
Initialize metric calibration. More... | |
RXLF_API void | Rx::ApiLF::RxMetricCalibLoadCalibration (const Rx::CRxString &sxFilename) |
Load a '.rxcalib' file from file system, containing a calibrated system. More... | |
RXLF_API void | Rx::ApiLF::RxMetricCalibLoadPlanarModelData (const Rx::CRxString &sxFilename, CRxArrayUInt &aObjectIds) |
Load planar model data. More... | |
RXLF_API void | Rx::ApiLF::RxMetricCalibProjectPointsIntoObjectSpace (const CRxArray2DDouble &matPoints2D, Rx::CRxImage &xDepthImage, CRxArray2DDouble &matPoints3D) |
Receive metric calib projection points into object space. More... | |
RXLF_API void | Rx::ApiLF::RxMetricCalibRegisterCallbackFunctionWithMessageHandler (bool bRegister) |
Registers the callback function of the metric calibration to the api message handler. More... | |
RXLF_API void | Rx::ApiLF::RxMetricCalibRemoveModelFromCalibrationSet (const 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::ApiLF::RxMetricCalibGetAddImageResult. More... | |
RXLF_API void | Rx::ApiLF::RxMetricCalibResetToNominal () |
Reset the metric calibration to nominal values. More... | |
RXLF_API void | Rx::ApiLF::RxMetricCalibSaveCalibration (const Rx::CRxString &sxFilename) |
Save the converged calibration result. More... | |
RXLF_API void | Rx::ApiLF::RxMetricCalibSavePlanarModelData (const Rx::CRxString &sxFilename) |
Save planar model to filesystem. More... | |
RXLF_API void | Rx::ApiLF::RxMlaCalibExecute (Rx::ApiLF::EMlaCalibResult::ID &eResult, bool bIgnoreImageQuality=true) |
Calibrate the micro lens image grid using white image from bound image. More... | |
RXLF_API void | Rx::ApiLF::RxMlaCalibGetGridData (Rx::CRxArrayDouble &aLensCenter, float &fLensRadius, int iLensType) |
Get the lens center positions of given type in pixel coordinates. The corresponding lensRadius is returned. More... | |
RXLF_API bool | Rx::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... | |
RXLF_API void | Rx::ApiLF::RxMlaCalibRegisterCallbackFunction (bool bActivate) |
Enables/Disables progress callback of Rx::ApiLF::RxMlaCalibExecute / Rx::ApiLF::RxMlaCalibParallelLightExecute. More... | |
Methods to perform a camera calibration.
RXLF_API void Rx::ApiLF::RxMetricCalibAddBoundImage | ( | unsigned & | nObjectId | ) |
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
[out] | nObjectId | The Id of the newly created object. |
RXLF_API void Rx::ApiLF::RxMetricCalibApplyCalibrationToBoundImage | ( | ) |
Apply the computed metric calibration to a newly bound image.
RXLF_API void Rx::ApiLF::RxMetricCalibEvaluatePointSpaceCoverage | ( | CRxArrayDouble & | aAreaCovered | ) |
Evaluate the metric calibration data set.
[in,out] | aAreaCovered | A vector containing the number of points in each area. The scene is divided into 12 parts and is sorted as follows
|
RXLF_API void Rx::ApiLF::RxMetricCalibExecute | ( | Rx::ApiLF::EMetricCalibResult::ID & | eResult, |
bool | bCalibrateAfterInit = true |
||
) |
Performs the metric calibration.
eResult | The result. |
bCalibrateAfterInit | (Optional) Indicates 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. |
RXLF_API void Rx::ApiLF::RxMetricCalibFinalize | ( | ) |
Clears the metric calibration.
RXLF_API void Rx::ApiLF::RxMetricCalibFindPoints | ( | Rx::CRxImage & | xRefocusedImage, |
Rx::CRxArray2DDouble & | matPoints2D | ||
) |
Raytrix metric calib transform bound image to point model.
[in] | xRefocusedImage | The refocused image. |
[out] | matPoints2D | The mat points 2 d. |
RXLF_API void Rx::ApiLF::RxMetricCalibGetAddImageResult | ( | const unsigned | uObjectId, |
Rx::CRxMetricCalibAddImageResult & | smcAddObjectResult | ||
) |
Get result to an object id.
uObjectId | Identifier for the object. | |
[in,out] | smcAddObjectResult | The metric calibration add object result. |
RXLF_API void Rx::ApiLF::RxMetricCalibGetAllObjectIds | ( | CRxArrayUInt & | aObjectIds | ) |
Get all valid object ids from the metric calibration.
[out] | aObjectIds | List of identifiers for the objects. |
RXLF_API void Rx::ApiLF::RxMetricCalibGetModelsList | ( | Rx::CRxArray2DDouble & | matModelsList | ) |
Get the list of all models extracted from the added image.
[out] | matModelsList | Array 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. |
RXLF_API void Rx::ApiLF::RxMetricCalibGetPointConnections | ( | const unsigned | uId, |
const EMetricCalibPointType::ID | ePointType, | ||
Rx::CRxArray2DDouble & | matLines | ||
) |
Get All point connections.
uId | The identifier. | |
[in,out] | matList | [in,out] An array of all connected points. |
RXLF_API void Rx::ApiLF::RxMetricCalibGetPointEllipses | ( | const unsigned | uId, |
const EMetricCalibPointFilter::ID | ePointFilter, | ||
const Rx::CRxImageFormat & | xTargetImageFormat, | ||
Rx::CRxArray2DDouble & | matPointEllipses | ||
) |
Get the list of specific point ellipses.
uId | The identifier of the test model. | |
ePointFilter | A filter specifying the point. | |
xTargetImageFormat | The target image format on which the ellipses are to be drawn. | |
[out] | matPointEllipses | The array of point ellipses. |
RXLF_API void Rx::ApiLF::RxMetricCalibGetPoints | ( | const unsigned | uId, |
const EMetricCalibPointFilter::ID | ePointFilter, | ||
const EMetricCalibPointType::ID | ePointType, | ||
Rx::CRxArray2DDouble & | matPoints | ||
) |
Get specific points from the models.
uId | The identifier of the model. | |
ePointFilter | A filter specifying the point. | |
ePointType | Type of the point. | |
[out] | matPoints | An array of all points (x,y,z). |
RXLF_API void Rx::ApiLF::RxMetricCalibGetRefocusedImage | ( | const unsigned | uObjectId, |
Rx::CRxImage & | xImage | ||
) |
Get the refocused image from the metric calibration.
uObjectId | Identifier for the object. | |
[in,out] | xImage | The image. |
RXLF_API void Rx::ApiLF::RxMetricCalibGetResult | ( | Rx::CRxMetricCalibResult & | 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.
[out] | xMetricCalibResult | The metric calib result. |
RXLF_API void Rx::ApiLF::RxMetricCalibInitialize | ( | Rx::ApiLF::EMetricCalibrationType::ID | eCalibrationType | ) |
Initialize metric calibration.
eCalibrationType | Type of the calibration. |
RXLF_API void Rx::ApiLF::RxMetricCalibLoadCalibration | ( | const Rx::CRxString & | sxFilename | ) |
Load a '.rxcalib' file from file system, containing a calibrated system.
sxFilename | Filename of the calibration file. |
RXLF_API void Rx::ApiLF::RxMetricCalibLoadPlanarModelData | ( | const Rx::CRxString & | sxFilename, |
CRxArrayUInt & | aObjectIds | ||
) |
Load planar model data.
sxFilename | Filename of the model data. | |
[in] | aObjectIds | List of identifiers for the objects. |
RXLF_API void Rx::ApiLF::RxMetricCalibProjectPointsIntoObjectSpace | ( | const CRxArray2DDouble & | matPoints2D, |
Rx::CRxImage & | xDepthImage, | ||
CRxArray2DDouble & | matPoints3D | ||
) |
Receive metric calib projection points into object space.
matPoints2D | The matrix points 2 d. | |
[in] | xDepthImage | The depth image. |
[out] | matPoints3D | The matrix points 3 d. |
RXLF_API void Rx::ApiLF::RxMetricCalibRegisterCallbackFunctionWithMessageHandler | ( | bool | bRegister | ) |
Registers the callback function of the metric calibration to the api message handler.
bRegister | true to register. |
RXLF_API void Rx::ApiLF::RxMetricCalibRemoveModelFromCalibrationSet | ( | const 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::ApiLF::RxMetricCalibGetAddImageResult.
[in] | nObjectId | Identifier for the object. |
RXLF_API void Rx::ApiLF::RxMetricCalibResetToNominal | ( | ) |
Reset the metric calibration to nominal values.
RXLF_API void Rx::ApiLF::RxMetricCalibSaveCalibration | ( | const Rx::CRxString & | sxFilename | ) |
Save the converged calibration result.
sxFilename | Filename of the calibration to save. |
RXLF_API void Rx::ApiLF::RxMetricCalibSavePlanarModelData | ( | const Rx::CRxString & | sxFilename | ) |
Save planar model to filesystem.
sxFilename | Filename of the .calib file. |
RXLF_API void Rx::ApiLF::RxMlaCalibExecute | ( | Rx::ApiLF::EMlaCalibResult::ID & | eResult, |
bool | bIgnoreImageQuality = true |
||
) |
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.
Rx
ApiLF::EPar::MlaImg_CalibType . The available calibration modes are Rx
ApiLF::ECalibGridMode::Full (including distortion models), Rx
ApiLF::ECalibGridMode::Reduced (omitting distortions) and Rx
ApiLF::ECalibGridMode::Plain (without homography).This function reports on its progress using the set progress interface.
eResult | [out] The result. |
bIgnoreImageQuality | (Optional) True to ignore image quality. |
RXLF_API void Rx::ApiLF::RxMlaCalibGetGridData | ( | Rx::CRxArrayDouble & | aLensCenter, |
float & | fLensRadius, | ||
int | iLensType | ||
) |
Get the lens center positions of given type in pixel coordinates. The corresponding lensRadius is returned.
[out] | aLensCenter | The result list, containing the lens centers in pixel coordinates. |
[out] | fLensRadius | The lens radius for the given Lens Type. |
iLensType | The lens type number to retrieve. |
RXLF_API bool Rx::ApiLF::RxMlaCalibParallelLightExecute | ( | ) |
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..
RXLF_API void Rx::ApiLF::RxMlaCalibRegisterCallbackFunction | ( | bool | bActivate | ) |
Enables/Disables progress callback of Rx::ApiLF::RxMlaCalibExecute / Rx::ApiLF::RxMlaCalibParallelLightExecute.
Standard interface is used.
bActivate | Set to 'true' to activate callback interface for progress information. |