发布于 2018-08-27 13:11:24
当你选择一个校准模式时,选择一个在水平方向(8,7)或垂直方向(7,8)上有更多角的图案。
有不同的选项,您可以尝试检测棋盘。
vector<Point2f> corners;
Size checkerBoardSize(7,7);
bool found = findCheckerBoard(img, checkerBoardSize, corners, CALIB_CB_SYMMETRIC_GRID);
if(!found)
found = findCheckerBoard(img, checkerBoardSize, corners, CALIB_CB_SYMMETRIC_GRID | CALIB_CB_CLUSTERING);
//You can draw and see the detected points as follows
Mat res = img.clone();
if(res.channels() == 1)
cvtColor(res, res, CV_GRAY2BGR);
drawChessboardCorners(res1, checkerBoardSize, corners, found);
imshow("res", res);
waitKey(0);https://stackoverflow.com/questions/52039036
复制相似问题