代码拉取完成,页面将自动刷新
#pragma once
#include "opencv2\opencv.hpp"
#include <string>
#include <fstream>
#include <iostream>
using namespace std;
using namespace cv;
#define CV
//#define FISHEYE
class CCalibration
{
public:
CCalibration(string patternImgPath, string CalibResultPath, Size boardSize)
{
this->patternImgPath=patternImgPath;
this->calibResultPath=CalibResultPath;
this->boardSize=boardSize;
}
~CCalibration(){}
private:
vector<cv::Point3f> singlePatternPoints;
vector<Mat> patternImgList;
int imgHeight;
int imgWidth;
int imgNum;
float scale = 0.25;
float errThresh = 3000;
string patternImgPath;
string calibResultPath;
Size boardSize;
Mat camK;
Mat camDiscoeff;
private:
int evaluateCalibrationResult(vector<vector<cv::Point3f>> objectPoints, vector<vector<cv::Point2f>> cornerSquare, vector<int> pointCnts, vector<cv::Vec3d> _rvec,
vector<cv::Vec3d> _tvec, cv::Mat _K, cv::Mat _D, int count, vector<int> &outLierIndex, int errThresh);
bool testCorners(vector<cv::Point2f>& corners, int patternWidth, int patternHeight);
void init3DPoints(cv::Size boardSize, cv::Size squareSize, vector<cv::Point3f> &singlePatternPoint);
public:
bool writeParams();
bool readPatternImg();
void calibProcess();
void run();
};
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。