#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
相关推荐
我不会插花弄玉5 小时前
13.多路转接epoll【由浅入深-网络】郝学胜-神的一滴7 小时前
Effective STL 条款03:容器中的对象复制要廉价且正确西西弗Sisyphus8 小时前
C++ explicit 关键字工程实践AIgorithmGEEK10 小时前
std::unordered_map 与 std::unordered_set:接口、算法技巧与权衡 (速查)一拳一个呆瓜12 小时前
【STL】头文件:<cmath>草莓熊Lotso13 小时前
【C++ 基于微服务的即时通讯系统】ElasticSearch 用户数据管理实现慧都产品智能化13 小时前
Qt 开发 CAD/CAM 工序表的隐性成本分析eggwyw15 小时前
linux下的C\C++多进程多线程编程实例详解青少儿编程课堂16 小时前
第十八届蓝桥杯青少组图形化真题 + 全国青少年信息素养大赛 + 电子学会图形化考级:校园泡泡堂大挑战解析小七在进步17 小时前
string的实现(3)