22 #include <opencv2/opencv.hpp>
29 using cv::FileStorage;
30 using cv::FileNodeIterator;
32 using cv::DescriptorExtractor;
46 bool readStringList(
const string& filename, vector<string>& l );
47 bool prepareandRunCalibration(
const vector<vector<Point2f> >& imagePoints,
48 Size imageSize, Size boardSize,
float squareSize,
49 float aspectRatio,
int flags, Mat& cameraMatrix,
51 bool runCalibration( vector<vector<Point2f> > imagePoints,
52 Size imageSize, Size boardSize,
53 float squareSize,
float aspectRatio,
54 int flags, Mat& cameraMatrix, Mat& distCoeffs,
55 vector<Mat>& rvecs, vector<Mat>& tvecs,
56 vector<float>& reprojErrs,
58 void calcChessboardCorners(Size boardSize,
float squareSize, vector<Point3f>& corners);
59 double computeReprojectionErrors(
60 const vector<vector<Point3f> >& objectPoints,
61 const vector<vector<Point2f> >& imagePoints,
62 const vector<Mat>& rvecs,
const vector<Mat>& tvecs,
63 const Mat& cameraMatrix,
const Mat& distCoeffs,
64 vector<float>& perViewErrors );
65 void printMatrix(Mat &matrix);
66 void printCameraMatrix();
67 void printDistortionVector();
68 void calibrate(
string imagesFilePath,
int boardWidth,
int boardHeight);
76 Camera(
string intrinsicFilePath);
90 void calibrate(vector<string> imageList,
int boardWidth,
int boardHeight);
96 bool saveCalibration(
string intrinsicFilePath);
103 Mat undistortImage(Mat image);
110 Mat getCameraMatrix();
122 void setCameraMatrix(Mat& K);
128 void setDistCoefficients(Mat& Dist);
The base class defining a simple camera.
Camera()
Default Constructor.