10 #ifndef CVCALIBRATION_H
11 #define CVCALIBRATION_H
92 bool calcUndistortionMaps);
112 bool load(
const string& calibDir,
114 bool calcUndistortionMaps);
115 bool save(
const string& calibDir,
119 CVMat& outUndistorted);
183 default:
return "unknown";
CVCalibState
OpenCV Calibration state.
@ CS_calibrated
The camera is calibrated.
@ CS_uncalibrated
The camera is not calibrated (no calibration found)
@ CS_guessed
The camera intrinsics where estimated from FOV.
Live video camera calibration class with OpenCV an OpenCV calibration.
float _boardSquareMM
Size of chessboard square in mm.
float _cameraFovVDeg
Vertical field of view in degrees.
void calculateUndistortedCameraMat()
Calculate a camera matrix that we use for the scene graph and for the reprojection of the undistorted...
bool _isMirroredV
Flag if image must be vertically mirrored.
bool calibFixAspectRatio()
float _reprojectionError
Reprojection error after calibration.
CVMat _undistortMapX
Undistortion float map in x-direction.
static const int _CALIBFILEVERSION
Global const file format version.
void calcCameraFovFromUndistortedCameraMat()
Calculates the vertical field of view angle in degrees.
bool calibThinPrismModel()
bool calibZeroTangentDist()
const CVMat & cameraMat() const
float boardSquareMM() const
const CVMat & distortion() const
CVCalibState _state
calibration state enumeration
void remap(CVMat &inDistorted, CVMat &outUndistorted)
Undistorts the inDistorted image into the outUndistorted.
string _calibFileName
name for calibration file
CVSize imageSizeOriginal() const
CVMat _cameraMatUndistorted
Camera matrix that defines scene camera and may also be used for reprojection of undistorted image.
const CVMat & cameraMatUndistorted() const
void createFromGuessedFOV(int imageWidthPX, int imageHeightPX, float fovH)
Calculates camera intrinsics from a guessed FOV angle.
CVCameraType camType() const
float boardSquareM() const
CVMat _undistortMapY
Undistortion float map in y-direction.
CVSize _imageSize
Input image size in pixels (after cropping)
float reprojectionError() const
bool calibRationalModel()
float imageAspectRatio() const
int numCapturedImgs() const
CVCalibration(CVCameraType camType, string computerInfos)
void adaptForNewResolution(const CVSize &newSize, bool calcUndistortionMaps)
Adapts an already calibrated camera to a new resolution (cropping and scaling)
float cameraFovHDeg() const
float cameraFovVDeg() const
CVMat _distortion
4x1 Matrix for intrinsic distortion
float _cameraFovHDeg
Horizontal field of view in degrees.
bool calibFixPrincipalPoint()
string _calibrationTime
Time stamp string of calibration.
bool load(const string &calibDir, const string &calibFileName, bool calcUndistortionMaps)
Loads the calibration information from the config file.
CVMat _cameraMat
3x3 Matrix for intrinsic camera matrix
int _camSizeIndex
The requested camera size index.
CVSize _imageSizeOrig
original image size (original from loading or calibration estimation)
string computerInfos() const
string calibFileName() const
int _numCaptured
NO. of images captured.
bool _isMirroredH
Flag if image must be horizontally mirrored.
string calibrationTime() const
CVMat _cameraMatOrig
3x3 Matrix for intrinsic camera matrix (original from loading or calibration estimation)
bool save(const string &calibDir, const string &calibFileName)
Saves the camera calibration parameters to the config file.
CVSize _boardSize
NO. of inner chessboard corners.
void buildUndistortionMaps()
Builds undistortion maps after calibration or loading.
CVCalibState state() const
int _calibFlags
OpenCV calibration flags.