#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;
}
c++代码生成标定板
谢大旭2023-10-24 23:04
相关推荐
阿猿收手吧!30 分钟前
【C++】string_view:高效字符串处理指南Word码1 小时前
[C++语法] 继承 (用法详解)lxl13071 小时前
C++算法(1)双指针淀粉肠kk1 小时前
C++11列表初始化:{}的革命性进化zhooyu2 小时前
C++和OpenGL手搓3D游戏编程(20160207进展和效果)HAPPY酷2 小时前
C++ 和 Python 的“容器”对决:从万金油到核武器茉莉玫瑰花茶3 小时前
C++ 17 详细特性解析(5)cpp_25013 小时前
P10570 [JRKSJ R8] 网球cpp_25013 小时前
P8377 [PFOI Round1] 暴龙的火锅程序员老舅3 小时前
C++高并发精髓:无锁队列深度解析