Started porting the camera calibration functions.

This commit is contained in:
2014-04-10 17:55:31 -04:30
parent 453c3a36e5
commit 249e6e30a4
6 changed files with 493 additions and 380 deletions

View File

@@ -17,15 +17,12 @@
#define MARKER_HPP
#include <vector>
#include <opencv2/opencv.hpp>
namespace nxtar{
class Marker;
typedef std::vector<std::vector<cv::Point> > contours_vector;
typedef std::vector<cv::Point2f> points_vector;
typedef std::vector<Marker> markers_vector;
typedef std::vector<cv::Point2f> points_vector;
class Marker{
public:
@@ -34,8 +31,26 @@ public:
int code;
};
/**
* Detect all 5x5 markers in the input image and return their codes in the
* output vector.
*/
void getAllMarkers(std::vector<int> &, cv::Mat &);
void calibrateCamera(cv::Mat &);
/**
* Find a chessboard calibration pattern in the input image. Returns true
* if the pattern was found, false otherwise. The calibration points
* detected on the image are saved in the output vector.
*/
bool findCalibrationPattern(points_vector &, cv::Mat &);
/**
* Sets the camera matrix and the distortion coefficients for the camera
* that captured the input image points into the output matrices. Returns
* the reprojection error as returned by cv::calibrateCamera.
*/
double getCameraParameters(cv::Mat &, cv::Mat &, std::vector<points_vector> &, cv::Size);
}
#endif