C++ OpenCV生成对称圆点标定图案
发布时间
阅读量:
阅读量
目录
- 基础代码
- 视觉效果展示
- 文献来源
运用OpenCV与C++编程语言生成对称分布的圆形标记校准图样
原始代码
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/opencv.hpp>
using namespace cv;
using namespace std;
int main()
{
// 图像宽高
int width = 1400;
int height = 1000;
// 边框大小
int thicknum = 2;
// 两个维度的特征圆点数目
int sqXnum = 14;
int sqYnum = 10;
// 根据输入的特征点数目,自适应计算圆点半径大小(此处预设两圆点圆心之间距离为4*半径)
int radius = min(width / (4 * sqXnum + 2), height / (4 * sqYnum + 2));
if (
全部评论 (0)
还没有任何评论哟~
