#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
相关推荐
blasit1 天前
笔记:Qt C++建立子线程做一个socket TCP常连接通信肆忆_2 天前
# 用 5 个问题学懂 C++ 虚函数(入门级)不想写代码的星星3 天前
虚函数表:C++ 多态背后的那个男人端平入洛4 天前
delete又未完全delete端平入洛5 天前
auto有时不auto哇哈哈20216 天前
信号量和信号多恩Stone6 天前
【C++入门扫盲1】C++ 与 Python:类型、编译器/解释器与 CPU 的关系蜡笔小马6 天前
21.Boost.Geometry disjoint、distance、envelope、equals、expand和for_each算法接口详解超级大福宝6 天前
N皇后问题:经典回溯算法的一些分析weiabc6 天前
printf(“%lf“, ys) 和 cout << ys 输出的浮点数格式存在细微差异