#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
相关推荐
weixin_307779132 小时前
C++代码实现MATLAB中的dlarray函数功能Frank_refuel6 小时前
C++11之一场名为“搬家”的 C++ 之旅hetao17338378 小时前
2026-10-03~04 hetao1733837 的刷题记录longlongzihan8 小时前
从LeetCode 70. 爬楼梯看动态规划:如何精准推导状态转移方程?潼心1412o11 小时前
C++初阶(长期更新)第6讲:类和对象(下)-森屿安年-12 小时前
按身高排序(Charon)13 小时前
【C++面试】vector底层原理:扩容、拷贝移动与迭代器失效朔北之忘 Clancy13 小时前
青少年软编等考七级题解目录汉克老师13 小时前
GESP2026年9月认证C++七级( 第一部分选择题(8~15题)精讲Mr_Macallon13 小时前
C++回顾(基础)(01)