这篇文章主要介绍OpenCV怎么实现相机标定板,文中介绍的非常详细,具有一定的参考价值,感兴趣的小伙伴们一定要看完!具体内容如下1.代码实现#include <opencv.hpp>#include &quo
这篇文章主要介绍OpenCV怎么实现相机标定板,文中介绍的非常详细,具有一定的参考价值,感兴趣的小伙伴们一定要看完!
具体内容如下
#include <opencv.hpp>#include "highgui.h"#include "cxcore.h"using namespace cv;int main0(int arGC, char *argv[]){ int width = 140;//width and heigth of single square int height = 140; IplImage *src = cvCreateImage(cvSize(width*(10+1),width*(6+1)), IPL_DEPTH_8U, 1);//in the CalibrationAndTest.cpp ,there is a param called boardsize(10,6), causing here:(10+1),(6+1) cvZero(src); for (int i = 0; i < src->height; i++) { for (int j = 0; j < src->width; j++) { if ((i / width + j / height) % 2 != 0) { src->imageData[i*src->widthStep + j * src->nChannels] = 255; } } } //cvNamedWindow("src"); cvShowImage("src", src); //cvSaveImage("ChessBoard.bmp", src, 0); cvWaiTKEy(0); return 0;}
将该程序生成的图片使用A4纸铺满的方式打印出来,贴在一个刚体的板子上,即可用于相机标定。
以上是“OpenCV怎么实现相机标定板”这篇文章的所有内容,感谢各位的阅读!希望分享的内容对大家有帮助,更多相关知识,欢迎关注编程网精选频道!
--结束END--
本文标题: OpenCV怎么实现相机标定板
本文链接: https://www.lsjlt.com/news/271180.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
下载Word文档到电脑,方便收藏和打印~
2024-05-14
2024-05-14
2024-05-14
2024-05-14
2024-05-14
2024-05-14
2024-05-14
2024-05-14
2024-05-14
2024-05-14
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0