#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
相关推荐
No0d1es41 分钟前
电子学会青少年软件编程(C语言)等级考试试卷(三级)2025年12月bjxiaxueliang2 小时前
一文掌握C/C++命名规范:风格、规则与实践详解xu_yule3 小时前
网络和Linux网络-13(高级IO+多路转接)五种IO模型+select编程2301_765703143 小时前
C++与自动驾驶系统轩情吖3 小时前
Qt的窗口(三)热爱编程的小刘3 小时前
Lesson04---类与对象(下篇)郝学胜-神的一滴3 小时前
Linux网络编程之listen函数:深入解析与应用实践呱呱巨基4 小时前
c语言 文件操作小明同学014 小时前
[C++进阶] 深度解析AVLTreeCoderCodingNo4 小时前
【GESP】C++五级练习题 luogu-P1031 [NOIP 2002 提高组] 均分纸牌