Path: blob/master/modules/calib3d/test/test_chessboardgenerator.hpp
16337 views
// This file is part of OpenCV project.1// It is subject to the license terms in the LICENSE file found in the top-level directory2// of this distribution and at http://opencv.org/license.html.3#ifndef CV_CHESSBOARDGENERATOR_H143KJTVYM389YTNHKFDHJ89NYVMO3VLMEJNTBGUEIYVCM203P4#define CV_CHESSBOARDGENERATOR_H143KJTVYM389YTNHKFDHJ89NYVMO3VLMEJNTBGUEIYVCM203P56namespace cv7{89using std::vector;1011class ChessBoardGenerator12{13public:14double sensorWidth;15double sensorHeight;16size_t squareEdgePointsNum;17double min_cos;18mutable double cov;19Size patternSize;20int rendererResolutionMultiplier;2122ChessBoardGenerator(const Size& patternSize = Size(8, 6));23Mat operator()(const Mat& bg, const Mat& camMat, const Mat& distCoeffs, std::vector<Point2f>& corners) const;24Mat operator()(const Mat& bg, const Mat& camMat, const Mat& distCoeffs, const Size2f& squareSize, std::vector<Point2f>& corners) const;25Mat operator()(const Mat& bg, const Mat& camMat, const Mat& distCoeffs, const Size2f& squareSize, const Point3f& pos, std::vector<Point2f>& corners) const;26Size cornersSize() const;2728mutable std::vector<Point3f> corners3d;29private:30void generateEdge(const Point3f& p1, const Point3f& p2, std::vector<Point3f>& out) const;31Mat generateChessBoard(const Mat& bg, const Mat& camMat, const Mat& distCoeffs,32const Point3f& zero, const Point3f& pb1, const Point3f& pb2,33float sqWidth, float sqHeight, const std::vector<Point3f>& whole, std::vector<Point2f>& corners) const;34void generateBasis(Point3f& pb1, Point3f& pb2) const;3536Mat rvec, tvec;37};3839}404142#endif434445