#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
相关推荐
小陈又菜1 小时前
【C++】类和对象--类中6个默认成员函数(2) --运算符重载weixin_307779134 小时前
C++实现MATLAB矩阵计算程序捏尼卜波卜4 小时前
try/catch/throw 简明指南_poplar_5 小时前
09 【C++ 初阶】C/C++内存管理GetcharZp5 小时前
C++ Boost 从入门到精通:让你的代码飞起来mit6.8246 小时前
[LVGL] 配置lv_conf.h | 条件编译 | 显示屏lv_display板鸭〈小号〉6 小时前
线程安全的单例模式,STL和智能指针阿飞__6 小时前
C++使用FFmpeg进行视频推流limitless_peter7 小时前
优先队列,链表优化新手村领路人8 小时前
c++ opencv调用yolo onnx文件