Functions to create, load and apply calibration to range maps and PointCloud objects. More...
Data Structures | |
struct | CVC3DAffineTransformationParameters |
Affine transformation parameters. More... | |
struct | CVC3DSensorSettings |
Camera sensor settings. More... | |
Typedefs | |
typedef void * | CVC3DCALIBRATOR |
Handle to calibration object. More... | |
Enumerations | |
enum | CVC3DCalibratorType { CVC3DC_Unknown = 0 , CVC3DC_Factors , CVC3DC_LaserPlaneMatrixH , CVC3DC_LaserPlanePolynom , CVC3DC_LaserPlaneZigZag , CVC3DC_LaserPlaneAT , CVC3DC_MatrixH , CVC3DC_Pinhole } |
Supported calibrator types. More... | |
enum | CVC3DSensorPixelPosition { CVC3DSPP_Absolute = 0 , CVC3DSPP_Relative } |
Indicates pixel position stored in rangemap. More... | |
enum | CVC3DSensorPixelsMirrored { CVC3DSPM_None = 0 << 0 , CVC3DSPM_X = 1 << 0 , CVC3DSPM_Y = 1 << 1 , CVC3DSPM_XY = 3 } |
Indicates if sensor pixels are mirrored in rangemap. More... | |
Functions | |
cvbres_t | CVC3DATCalibratorGetSensorRoi (CVC3DCALIBRATOR Calibrator, cvbdim_t &OffsetLeft, cvbdim_t &OffsetTop, cvbdim_t &Width, cvbdim_t &Height) |
Gets the current AT sensor ROI from the given Calibrator. More... | |
cvbres_t | CVC3DATCalibratorGetYFactor (CVC3DCALIBRATOR Calibrator, double &YFactor) |
Gets the current YFactor from the given Calibrator. More... | |
cvbres_t | CVC3DATCalibratorGetZFactor (CVC3DCALIBRATOR Calibrator, double &ZFactor) |
Gets the current ZFactor from the given Calibrator. More... | |
cvbres_t | CVC3DATCalibratorSetSensorRoi (CVC3DCALIBRATOR Calibrator, cvbdim_t OffsetLeft, cvbdim_t OffsetTop, cvbdim_t Width, cvbdim_t Height) |
Sets the sensor ROI to an AT Calibrator. More... | |
cvbres_t | CVC3DATCalibratorSetYFactor (CVC3DCALIBRATOR Calibrator, double YFactor) |
Sets the YFactor to the given AT Calibrator. More... | |
cvbres_t | CVC3DATCalibratorSetZFactor (CVC3DCALIBRATOR Calibrator, double ZFactor) |
Sets the ZFactor to the given AT Calibrator. More... | |
cvbres_t | CVC3DCalibratorGetCorrectionOfLaserPlaneInclination (CVC3DCALIBRATOR Calibrator, CVC3DTransformation &AffineTransformation) |
Gets the correction of the laser plane inclination of a Calibrator described by an affine transformation matrix and a translation. More... | |
cvbres_t | CVC3DCalibratorGetCorrectionOfLaserPlaneInclinationParameters (CVC3DCALIBRATOR Calibrator, CVC3DTransformation &AffineTransformation, CVC3DAffineTransformationParameters &TransformationParameters) |
Gets the correction of the laser plane inclination from given Calibrator described by an affine transformation matrix and a translation. More... | |
cvbres_t | CVC3DCalibratorGetExtrinsicMatrix (CVC3DCALIBRATOR Calibrator, CVC3DTransformation &Transformation) |
Gets the extrinsic transformation matrix of the Calibrator. More... | |
cvbres_t | CVC3DCalibratorGetRangeMapIgnoreValue (CVC3DCALIBRATOR Calibrator, double &Value) |
Gets the current ignore Value in a range map from the given Calibrator. More... | |
cvbres_t | CVC3DCalibratorGetSensorRoi (CVC3DCALIBRATOR Calibrator, cvbdim_t &OffsetLeft, cvbdim_t &OffsetTop, cvbdim_t &Width, cvbdim_t &Height) |
Gets the current sensor ROI (region of interest) from the given Calibrator. More... | |
cvbres_t | CVC3DCalibratorGetSettings (CVC3DCALIBRATOR Calibrator, CVC3DSensorSettings &SensorSettings, double &EncoderStep) |
Gets the default sensor settings from the given Calibrator. More... | |
cvbres_t | CVC3DCalibratorSetCorrectionOfLaserPlaneInclination (CVC3DCALIBRATOR Calibrator, const CVC3DTransformation &AffineTransformation) |
Sets the correction of the laser plane inclination of to Calibrator described by an affine transformation matrix and a translation. More... | |
cvbres_t | CVC3DCalibratorSetCorrectionOfLaserPlaneInclinationParameters (CVC3DCALIBRATOR Calibrator, const CVC3DTransformation &AffineTransformation, const CVC3DAffineTransformationParameters &TransformationParameters) |
Sets the correction of the laser plane inclination to the Calibrator described by an affine transformation matrix and a translation and transformation parameters. More... | |
cvbres_t | CVC3DCalibratorSetExtrinsicMatrix (CVC3DCALIBRATOR Calibrator, const CVC3DTransformation &Transformation) |
Sets the extrinsic transformation matrix of the Calibrator. More... | |
cvbres_t | CVC3DCalibratorSetRangeMapIgnoreValue (CVC3DCALIBRATOR Calibrator, double Value) |
Sets a Value to ignore in a range map to the given Calibrator. More... | |
cvbres_t | CVC3DCalibratorSetSensorRoi (CVC3DCALIBRATOR Calibrator, cvbdim_t OffsetLeft, cvbdim_t OffsetTop, cvbdim_t Width, cvbdim_t Height) |
Sets the current sensor ROI (region of interest) from the given Calibrator. More... | |
cvbres_t | CVC3DCreateCalibratedPointCloudFromRangeMap (OBJ RangeMapImage, CVC3DCALIBRATOR Calibrator, cvbval_t Flags, CVCOMPOSITE &PointCloud) |
Creates a new calibrated Cartesian 3D PointCloud from the given 2½D RangeMapImage and Calibrator data. More... | |
cvbres_t | CVC3DCreateCalibratedPointCloudFromRangeMapWithSettings (OBJ RangeMapImage, CVC3DCALIBRATOR Calibrator, const CVC3DSensorSettings &SensorSettings, double EncoderStep, cvbval_t Flags, CVCOMPOSITE &PointCloud) |
Creates a new calibrated Cartesian 3D PointCloud from the given 2½D RangeMapImage and Calibrator data considering sensor settings. More... | |
cvbres_t | CVC3DCreateFactorsCalibrator (CVC3DFactors Factors, CVC3DCALIBRATOR &Calibrator) |
Creates a simple calibrator based on factors. More... | |
cvbres_t | CVC3DCreateMatrixHCalibrator (const CVC3DMatrixH M, CVC3DCALIBRATOR &Calibrator) |
Creates a calibrator based on a general homography matrix M. More... | |
cvbres_t | CVC3DCreatePinholeCameraCalibrator (double Fx, double Fy, double Sz, double CPx, double CPy, CVC3DCALIBRATOR &Calibrator) |
Creates a Calibrator object for reconstructing a range map via the pinhole camera model. More... | |
cvbres_t | CVC3DGetCalibratorType (CVC3DCALIBRATOR Calibrator, CVC3DCalibratorType &Type) |
Gets the calibrator type. More... | |
cvbres_t | CVC3DLoadCalibrator (const char *FileName, CVC3DCALIBRATOR &Calibrator) |
Loads a 3D calibration file (ASCII string version). More... | |
cvbres_t | CVC3DLoadCalibratorW (const wchar_t *FileName, CVC3DCALIBRATOR &Calibrator) |
Loads a 3D calibration file (Unicode string version). More... | |
Functions to create, load and apply calibration to range maps and PointCloud objects.
Additional creation functions can be found in the CVMetric library. This library only provides the simple CVC3DCreateFactorsCalibrator and CVC3DCreateMatrixHCalibrator. For available calculations of the CVC3DMatrixH also see the CVMetric library.
Handle to calibration object.
The exact calibration performed depends on the created/loaded object. It is applied via CVC3DCreateCalibratedPointCloudFromRangeMap.
enum CVC3DCalibratorType |
Supported calibrator types.
The types are returned by CVC3DGetCalibratorType function.
Indicates if sensor pixels are mirrored in rangemap.
For a detailed description of the sensor settings and their influence on range map see also chapter "Theory of Operation -> Image Manager -> CVB Technology -> 3D Functionality -> Create Point Cloud from Range Map -> Create calibrated point cloud with modified sensor settings" of the CVB online help.
cvbres_t CVC3DATCalibratorGetSensorRoi | ( | CVC3DCALIBRATOR | Calibrator, |
cvbdim_t & | OffsetLeft, | ||
cvbdim_t & | OffsetTop, | ||
cvbdim_t & | Width, | ||
cvbdim_t & | Height | ||
) |
Gets the current AT sensor ROI from the given Calibrator.
[in] | Calibrator | Calibrator object to get sensor ROI from. |
[out] | OffsetLeft | Variable to receive column offset. |
[out] | OffsetTop | Variable to receive row offset. |
[out] | Width | Variable to receive width of sensor ROI. |
[out] | Height | Variable to receive height of senosor ROI. |
cvbres_t CVC3DATCalibratorGetYFactor | ( | CVC3DCALIBRATOR | Calibrator, |
double & | YFactor | ||
) |
Gets the current YFactor from the given Calibrator.
///
[in] | Calibrator | Calibrator object to get YFactor from. |
[out] | YFactor | Variable to receive the value. |
cvbres_t CVC3DATCalibratorGetZFactor | ( | CVC3DCALIBRATOR | Calibrator, |
double & | ZFactor | ||
) |
Gets the current ZFactor from the given Calibrator.
[in] | Calibrator | Calibrator object to get ZFactor from. |
[out] | ZFactor | Variable to receive the value. |
cvbres_t CVC3DATCalibratorSetSensorRoi | ( | CVC3DCALIBRATOR | Calibrator, |
cvbdim_t | OffsetLeft, | ||
cvbdim_t | OffsetTop, | ||
cvbdim_t | Width, | ||
cvbdim_t | Height | ||
) |
Sets the sensor ROI to an AT Calibrator.
[in] | Calibrator | Calibrator object to set sensor ROI on. |
[in] | OffsetLeft | Column offset. |
[in] | OffsetTop | Row offset. |
[in] | Width | Width of sensor ROI. |
[in] | Height | Height of senosor ROI. |
cvbres_t CVC3DATCalibratorSetYFactor | ( | CVC3DCALIBRATOR | Calibrator, |
double | YFactor | ||
) |
Sets the YFactor to the given AT Calibrator.
[in] | Calibrator | Calibrator object to set YFactor on. |
[in] | YFactor | Value. |
cvbres_t CVC3DATCalibratorSetZFactor | ( | CVC3DCALIBRATOR | Calibrator, |
double | ZFactor | ||
) |
Sets the ZFactor to the given AT Calibrator.
[in] | Calibrator | Calibrator object to set ZFactor on. |
[in] | ZFactor | Value. |
cvbres_t CVC3DCalibratorGetCorrectionOfLaserPlaneInclination | ( | CVC3DCALIBRATOR | Calibrator, |
CVC3DTransformation & | AffineTransformation | ||
) |
Gets the correction of the laser plane inclination of a Calibrator described by an affine transformation matrix and a translation.
[in] | Calibrator | Calibrator to get the intrinsic affine transformation. |
[out] | AffineTransformation | Variable to receive the affine transformation. |
cvbres_t CVC3DCalibratorGetCorrectionOfLaserPlaneInclinationParameters | ( | CVC3DCALIBRATOR | Calibrator, |
CVC3DTransformation & | AffineTransformation, | ||
CVC3DAffineTransformationParameters & | TransformationParameters | ||
) |
Gets the correction of the laser plane inclination from given Calibrator described by an affine transformation matrix and a translation.
This function returns the transformation parameters as well as the affine matrix. The affine matrix can also be derived from the transformation parameters.
[in] | Calibrator | Calibrator to get the intrinsic affine transformation. |
[out] | AffineTransformation | Variable to receive the intrinsic affine transformation. |
[out] | TransformationParameters | Variable to receive the transformation parameters. |
cvbres_t CVC3DCalibratorGetExtrinsicMatrix | ( | CVC3DCALIBRATOR | Calibrator, |
CVC3DTransformation & | Transformation | ||
) |
Gets the extrinsic transformation matrix of the Calibrator.
[in] | Calibrator | Calibrator to get the extrinsic transformation of. |
[out] | Transformation | Variable to receive the extrinsic transformation matrix. |
cvbres_t CVC3DCalibratorGetRangeMapIgnoreValue | ( | CVC3DCALIBRATOR | Calibrator, |
double & | Value | ||
) |
Gets the current ignore Value in a range map from the given Calibrator.
[in] | Calibrator | Calibrator object to get ignore value from. |
[out] | Value | Variable to receive the currently set ignore value; NaN if none is set. |
cvbres_t CVC3DCalibratorGetSensorRoi | ( | CVC3DCALIBRATOR | Calibrator, |
cvbdim_t & | OffsetLeft, | ||
cvbdim_t & | OffsetTop, | ||
cvbdim_t & | Width, | ||
cvbdim_t & | Height | ||
) |
Gets the current sensor ROI (region of interest) from the given Calibrator.
[in] | Calibrator | Calibrator object to get sensor ROI from. |
[out] | OffsetLeft | Variable to receive column offset. |
[out] | OffsetTop | Variable to receive row offset. |
[out] | Width | Variable to receive width of sensor ROI. |
[out] | Height | Variable to receive height of senosor ROI. |
cvbres_t CVC3DCalibratorGetSettings | ( | CVC3DCALIBRATOR | Calibrator, |
CVC3DSensorSettings & | SensorSettings, | ||
double & | EncoderStep | ||
) |
Gets the default sensor settings from the given Calibrator.
For a detailed description of the settings see CVC3DSensorSettings.
[in] | Calibrator | Calibrator object to get sensor settings from. |
[out] | SensorSettings | Sensor settings CVC3DSensorSettings. |
[out] | EncoderStep | Encoder step. |
cvbres_t CVC3DCalibratorSetCorrectionOfLaserPlaneInclination | ( | CVC3DCALIBRATOR | Calibrator, |
const CVC3DTransformation & | AffineTransformation | ||
) |
Sets the correction of the laser plane inclination of to Calibrator described by an affine transformation matrix and a translation.
[in] | Calibrator | Calibrator to set the intrinsic affine transformation and translation vector in. |
[in] | AffineTransformation | Affine matrix and translation vector to set to the Calibrator. |
NaN
value.cvbres_t CVC3DCalibratorSetCorrectionOfLaserPlaneInclinationParameters | ( | CVC3DCALIBRATOR | Calibrator, |
const CVC3DTransformation & | AffineTransformation, | ||
const CVC3DAffineTransformationParameters & | TransformationParameters | ||
) |
Sets the correction of the laser plane inclination to the Calibrator described by an affine transformation matrix and a translation and transformation parameters.
[in] | Calibrator | Calibrator to set the intrinsic affine matrix and translation vector in. |
[in] | AffineTransformation | Affine matrix and translation vector to set to the Calibrator. |
[in] | TransformationParameters | Transformation parameters to set to the Calibrator. |
NaN
value or AffineTransformation and TransformationParameters do not match.cvbres_t CVC3DCalibratorSetExtrinsicMatrix | ( | CVC3DCALIBRATOR | Calibrator, |
const CVC3DTransformation & | Transformation | ||
) |
Sets the extrinsic transformation matrix of the Calibrator.
[in] | Calibrator | Calibrator to set the extrinsic transformation in. |
[in] | Transformation | Matrix to use for extrinsic transformation. |
NaN
value.cvbres_t CVC3DCalibratorSetRangeMapIgnoreValue | ( | CVC3DCALIBRATOR | Calibrator, |
double | Value | ||
) |
Sets a Value to ignore in a range map to the given Calibrator.
If a z-value in a range map equals the Value its confidence is set to 0.
[in] | Calibrator | Calibrator object to set ignore value on. |
[in] | Value | New value to ignore in calibration; NaN to use all values. |
cvbres_t CVC3DCalibratorSetSensorRoi | ( | CVC3DCALIBRATOR | Calibrator, |
cvbdim_t | OffsetLeft, | ||
cvbdim_t | OffsetTop, | ||
cvbdim_t | Width, | ||
cvbdim_t | Height | ||
) |
Sets the current sensor ROI (region of interest) from the given Calibrator.
[in] | Calibrator | Calibrator object to set sensor ROI on. |
[in] | OffsetLeft | Column offset. |
[in] | OffsetTop | Row offset. |
[in] | Width | Width of sensor ROI. |
[in] | Height | Height of senosor ROI. |
cvbres_t CVC3DCreateCalibratedPointCloudFromRangeMap | ( | OBJ | RangeMapImage, |
CVC3DCALIBRATOR | Calibrator, | ||
cvbval_t | Flags, | ||
CVCOMPOSITE & | PointCloud | ||
) |
Creates a new calibrated Cartesian 3D PointCloud from the given 2½D RangeMapImage and Calibrator data.
This function simply accesses the first plane of the given RangeMapImage and interprets the pixel data as depth information (z). The resulting point cloud will have at most ImageWidth(RangeMapImage) * ImageHeight(RangeMapImage) points. Each of these generated points will be passed through the Calibrator object.
The following BytesPerPixel as input for unsigned integer cvbdatatype_t values are supported: 1, 2 and 4. For floating point cvbdatatype_t values only 4 and 8 BytesPerPixel are supported. Note, that only linear access is supported (check with GetLinearAccess function from the CVCUtilities.dll).
Depending on the calibration method the resulting point cloud is created via CVC3DCreateSparsePointCloud or CVC3DCreateDensePointCloud.
[in] | RangeMapImage | Handle of 2½D image. |
[in] | Calibrator | Calibration object to apply. |
[in] | Flags | Flags CVC3DPointCloudFlags specifying the kind of point cloud to be created. |
[out] | PointCloud | Variable to receive the handle of the point cloud object as a CVCOMPOSITE. |
cvbres_t CVC3DCreateCalibratedPointCloudFromRangeMapWithSettings | ( | OBJ | RangeMapImage, |
CVC3DCALIBRATOR | Calibrator, | ||
const CVC3DSensorSettings & | SensorSettings, | ||
double | EncoderStep, | ||
cvbval_t | Flags, | ||
CVCOMPOSITE & | PointCloud | ||
) |
Creates a new calibrated Cartesian 3D PointCloud from the given 2½D RangeMapImage and Calibrator data considering sensor settings.
Note, that the calibration parameters always refer to the whole sensor (with no mirroring of the pixel coordinates). If the camera settings indicate, that a sensor ROI is given or pixel coordinates are mirrored, the range map values will be transformed to the sensor coordinates before applying the calibration parameters. If the user acquires the range map to be calibrated and uses sensor settings different from the default ones, he has to set them correctly via this function.
If you only like to change one or two settings and do not want to care about the other parameters, you can get the default settings via function CVC3DCalibratorGetSettings, change the relevant settings within the struct and pass it to CVC3DCreateCalibratedPointCloudFromRangeMapWithSettings.
If you have not changed your camera settings, please use function CVC3DCreateCalibratedPointCloudFromRangeMap. A detailed documentation about the point cloud creation can also be found there.
For a detailed description of the sensor settings for specific cameras see the CVB online help chapter "Theory of Operation -> Image Manager -> CVB Technology -> 3D Functionality -> Create Point Cloud from Range Map -> Create calibrated point cloud with modified sensor settings".
[in] | RangeMapImage | Handle of 2½D image. |
[in] | Calibrator | Calibration object to apply. |
[in] | SensorSettings | Sensor settings CVC3DSensorSettings set aquiring RangeMapImage. |
[in] | EncoderStep | Encoder step. |
[in] | Flags | Flags CVC3DPointCloudFlags specifying the kind of point cloud to be created. |
[out] | PointCloud | Variable to receive the handle of the point cloud object as a CVCOMPOSITE. |
cvbres_t CVC3DCreateFactorsCalibrator | ( | CVC3DFactors | Factors, |
CVC3DCALIBRATOR & | Calibrator | ||
) |
Creates a simple calibrator based on factors.
You can use this calibrator for pre-calibrated range maps where you need to adjust the scale.
[in] | Factors | Transformation factor to apply to each coordinate. |
[out] | Calibrator | Variable to receive the resulting calibrator object. |
NaN
cvbres_t CVC3DCreateMatrixHCalibrator | ( | const CVC3DMatrixH | M, |
CVC3DCALIBRATOR & | Calibrator | ||
) |
Creates a calibrator based on a general homography matrix M.
You can use this calibrator if the pinhole camera model for calibration suffices.
{ 1, 1, 1 }
. Thus this calibrator returns a sparse point cloud.[in] | M | homogeneous transformation matrix. |
[out] | Calibrator | Variable to receive the resulting calibrator object. |
NaN
cvbres_t CVC3DCreatePinholeCameraCalibrator | ( | double | Fx, |
double | Fy, | ||
double | Sz, | ||
double | CPx, | ||
double | CPy, | ||
CVC3DCALIBRATOR & | Calibrator | ||
) |
Creates a Calibrator object for reconstructing a range map via the pinhole camera model.
[in] | Fx | Focal length x component. |
[in] | Fy | Focal length y component. |
[in] | Sz | Z divisor (applied to every z value in the range map). |
[in] | CPx | Center point x component. |
[in] | CPy | Center point y component. |
[out] | Calibrator | Variable to receive the resulting calibrator object. |
cvbres_t CVC3DGetCalibratorType | ( | CVC3DCALIBRATOR | Calibrator, |
CVC3DCalibratorType & | Type | ||
) |
Gets the calibrator type.
[in] | Calibrator | Calibration object to be checked. |
[out] | Type | CVC3DCalibratorType of Calibrator. |
cvbres_t CVC3DLoadCalibrator | ( | const char * | FileName, |
CVC3DCALIBRATOR & | Calibrator | ||
) |
Loads a 3D calibration file (ASCII string version).
The type of file to be loaded is determined by the FileName extension and the file's contents. The following file formats are supported:
Name | Extension(s) |
---|---|
CVB Calibration file | json |
AT Calibration file | dat, xml |
For Automation Technology (AT) dat files version 1 (homography only) and version 2 (added polynomial) are supported. For xml files the homography is required. Brown/Conrady, polynomial and binning mode are also supported.
[in] | FileName | Full path to the file to load. |
[out] | Calibrator | Variable to receive the loaded calibrator object handle. |
cvbres_t CVC3DLoadCalibratorW | ( | const wchar_t * | FileName, |
CVC3DCALIBRATOR & | Calibrator | ||
) |
Loads a 3D calibration file (Unicode string version).
The type of file to be loaded is determined by the FileName extension and the file's contents. The following file formats are supported:
Name | Extension(s) |
---|---|
CVB Calibration file | json |
AT Calibration file | dat, xml |
For Automation Technology (AT) dat files version 1 (homography only) and version 2 (added polynomial) are supported. For xml files the homography is required. Brown/Conrady, polynomial and binning mode are also supported.
[in] | FileName | Full path to the file to load. |
[out] | Calibrator | Variable to receive the loaded calibrator object handle. |