3DiVi Face SDK  3.24.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Groups
VDT.FaceRecognition.SDK.CameraCalibrator Class Reference

Interface object for camera calibration and correction of image distortion. More...

Classes

class  AddImageOutput
 Result of image processing. More...
 
class  CalibrateOutput
 Result of calibration. More...
 
class  CalibrationSettings
 Сalibration process settings. More...
 

Public Member Functions

void initCalibration (CalibrationSettings settings)
 Initialize the calibration process. All previous accepted patterns will be removed. More...
 
AddImageOutput addImage (RawImage image)
 Search a pattern in the image and store it. More...
 
float getPatternSpaceCoverProgress ()
 Evaluate covering of the pattern space to get more accurate calibration. More...
 
List< PointgetTip ()
 Get a tip where to put a pattern in the image to get a better pattern space coverage. More...
 
CalibrateOutput calibrate (int max_used_patterns_count)
 Calibrate the camera. More...
 
RawImage undistort (RawImage image, float alpha)
 Correct the image distortion using the calibrated or loaded camera parameters. More...
 
void saveCameraParameters (Stream binary_stream)
 Save the calibrated camera parameters to binary_stream. The format is platform-independent. More...
 
void loadCameraParameters (Stream binary_stream)
 Load the calibrated camera parameters from binary_stream. The format is platform-independent. More...
 
- Public Member Functions inherited from VDT.FaceRecognition.SDK.IDisposableObject
virtual void Dispose ()
 Release internal object.
 

Additional Inherited Members

- Properties inherited from VDT.FaceRecognition.SDK.IDisposableObject
bool isDisposed [get]
 True if internal object already disposed.
 

Detailed Description

Interface object for camera calibration and correction of image distortion.

Member Function Documentation

AddImageOutput VDT.FaceRecognition.SDK.CameraCalibrator.addImage ( RawImage  image)
inline

Search a pattern in the image and store it.

Parameters
[in]imageAn image or a videoframe.
Returns
Result of image processing.
CalibrateOutput VDT.FaceRecognition.SDK.CameraCalibrator.calibrate ( int  max_used_patterns_count)
inline

Calibrate the camera.

Parameters
[in]max_used_patterns_countMaximum number of patterns to use for calculation. If more patterns are accepted, the subset covering the pattern space best will be used. The recommended value is 50.
Returns
Result of calibration.
float VDT.FaceRecognition.SDK.CameraCalibrator.getPatternSpaceCoverProgress ( )
inline

Evaluate covering of the pattern space to get more accurate calibration.

Returns
A real number from 0 to 1.
List<Point> VDT.FaceRecognition.SDK.CameraCalibrator.getTip ( )
inline

Get a tip where to put a pattern in the image to get a better pattern space coverage.

Returns
An empty list if the tip is not ready, or a list of pattern points.
void VDT.FaceRecognition.SDK.CameraCalibrator.initCalibration ( CalibrationSettings  settings)
inline

Initialize the calibration process. All previous accepted patterns will be removed.

Parameters
[in]settingsCalibration process settings.
void VDT.FaceRecognition.SDK.CameraCalibrator.loadCameraParameters ( Stream  binary_stream)
inline

Load the calibrated camera parameters from binary_stream. The format is platform-independent.

Parameters
[in]binary_streamInput stream object.
void VDT.FaceRecognition.SDK.CameraCalibrator.saveCameraParameters ( Stream  binary_stream)
inline

Save the calibrated camera parameters to binary_stream. The format is platform-independent.

Parameters
[out]binary_streamOutput stream object.
RawImage VDT.FaceRecognition.SDK.CameraCalibrator.undistort ( RawImage  image,
float  alpha 
)
inline

Correct the image distortion using the calibrated or loaded camera parameters.

Parameters
[in]imageAn image or a videoframe. The size can differ from the size of the images used for calibration. I.e. you can calibrate a camera once with one resolution and then calibrate the distortion of images from the same camera with any resolution.
[in]alphaA real value from 0 (the result image contains only valid pixels (no black areas)) to 1 (all pixels from the original image are stored in the result image (no source image pixels are lost)). Intermediate values yield an intermediate result between those two extreme cases.
Returns
Undistorted image of the same size and type as the source image.