opencv 4.4
vs2017
代码是借用人家的,具体哪篇也忘了~
程序运行后按Y键持续检测角点直到输出
角点找不到的原因分析 这里设置标定板的角点数错误,行列应该设置为你标定板最大格数-1,我的标定板是7行10列这里就设置(6,9)
另外还有可能标定板离的太近
Size patternsize = Size(6,9); /* 标定板上每行、列的角点数 */
另外个容易出问题的地方在这里 COLOR_RGB2GRAY,由于opencv版本的变化这里可能会报错,老的版本可能是cv::CV_RGB2GRAY,主体意思就是把传进来的图片变成灰度图
cvtColor(imageInput, gray, COLOR_RGB2GRAY);
#include "pch.h"
#include <iostream>
#include <cstring>
#include "opencv2/opencv_modules.hpp"
#include <opencv2/core/utility.hpp>
#include "opencv2/imgcodecs.hpp"
#include "opencv2/highgui.hpp"
#include <opencv2/calib3d/calib3d.hpp>
#include "opencv2/stitching/detail/autocalib.hpp"
#include "opencv2/stitching/detail/blenders.hpp"
#include "opencv2/stitching/detail/timelapsers.hpp"
#include "opencv2/stitching/detail/camera.hpp"
#include "opencv2/stitching/detail/exposure_compensate.hpp"
#include "opencv2/stitching/detail/matchers.hpp"
#include "opencv2/stitching/detail/motion_estimators.hpp"
#include "opencv2/stitching/detail/seam_finders.hpp"
#include "opencv2/stitching/detail/warpers.hpp"
#include "opencv2/stitching/warpers.hpp"
#include "opencv2/xfeatures2d.hpp"
#include <opencv2/stitching.hpp>
#include <iostream>
#include <fstream>
using namespace std;
using namespace cv;
u