detect_calibration_pattern.h
Go to the documentation of this file.
1 #ifndef _DETECT_CALIBRATION_PATTERN_
2 #define _DETECT_CALIBRATION_PATTERN_
3 
4 #include <opencv2/core/core.hpp>
5 #include <opencv2/calib3d/calib3d.hpp>
6 #include <opencv2/calib3d/calib3d.hpp>
7 #include <opencv2/highgui/highgui.hpp>
8 #include <opencv2/imgproc/imgproc.hpp>
9 
10 #include <Eigen/Dense>
11 #include <Eigen/Geometry>
12 #include <Eigen/StdVector>
13 
14 #include <iostream>
15 #include <stdexcept>
16 
17 using namespace std;
18 
19 enum Pattern
20 {
22 };
23 
24 typedef std::vector<cv::Point3f> object_pts_t;
25 typedef std::vector<cv::Point2f> observation_pts_t;
26 
27 void convertCVtoEigen(cv::Mat& tvec, cv::Mat& R, Eigen::Vector3f& translation, Eigen::Quaternionf& orientation);
28 
30 {
31  public:
33 
34  static object_pts_t calcChessboardCorners(cv::Size boardSize,
35  float squareSize,
36  Pattern patternType = CHESSBOARD,
37  cv::Point3f offset = cv::Point3f());
38 
39  int detectPattern(cv::Mat& inm, Eigen::Vector3f& translation, Eigen::Quaternionf& orientation);
40 
41  void setCameraMatrices(cv::Matx33d K_, cv::Matx33d D_);
42 
43  void setPattern(cv::Size grid_size_, float square_size_,
44  Pattern pattern_type_, cv::Point3f offset_ = cv::Point3f());
45 
46  public:
47  cv::Matx33d K;
48  cv::Matx33d D;
49  cv::Mat rvec, tvec, R;
50 
51  // Do we need to store anything but type and ideal points?
52  // Who knows!
54  cv::Size grid_size;
55  float square_size;
57 };
58 
59 #endif
void convertCVtoEigen(cv::Mat &tvec, cv::Mat &R, Eigen::Vector3f &translation, Eigen::Quaternionf &orientation)
GLintptr offset
std::vector< cv::Point3f > object_pts_t
std::vector< cv::Point2f > observation_pts_t


turtlebot_actions
Author(s): Helen Oleynikova, Melonee Wise
autogenerated on Mon Jun 10 2019 15:43:57