1、生成aruco标定板
#include <opencv2/opencv.hpp>
#include <opencv2/aruco.hpp>
#include <opencv2/objdetect/aruco_detector.hpp>
#include <iostream>
#include <string>
using namespace cv;
using namespace std;
int main()
{
int markersX = 17;
int markersY = 12;
int markerLength = 200;
int markerSeparation = 44;
int margins = markerSeparation;
int borderBits = 1;
bool showImage = false;
String out = "aruco_board4.png";
Size imageSize;
imageSize.width = markersX * (markerLength + markerSeparation) - markerSeparation + 2 * margins;
imageSize.height = markersY * (markerLength + markerSeparation) - markerSeparation + 2 * margins;
aruco::Dictionary dictionary = cv::aruco::getPredefinedDictionary(cv::aruco::DICT_6X6_250);
aruco::GridBoard board(Size(markersX, markersY), float(markerLength), float(markerSeparation), dictionary);
Mat boardImage;
board.generateImage(imageSi

最低0.47元/天 解锁文章
3539

被折叠的 条评论
为什么被折叠?



