chessboard
int n_cols = 4; // 角点行的个数int n_rows = 6; //角点列的个数int n_pix = 100; //每一个块的像素int col = n_pix * (n_cols + 1); // 生成标定图的列int row = n_pix * (n_rows + 1); //生成标定图的行Mat map = Mat(row, col, CV_8UC1, Scalar::all(0)); //初始化将所有的像素设为0for (int i = 0; i < row; i++) { // 遍历所有像素点for (int j = 0; j < col; j++) {if (int(i / n_pix) % 2 == 0) { //如果是奇数行if (int(j / n_pix) % 2 != 0) {map.at<Vec3b>(i, j)[0] = 255;map.at<Vec3b>(i, j)[1] = 255;map.at<Vec3b>(i, j)[2] = 255;}}if (int(i / n_pix) % 2 != 0) { //如果是偶数行if (int(j / n_pix) % 2 == 0) {map.at<Vec3b>(i, j)[0] = 255;map.at<Vec3b>(i, j)[1] = 255;map.at<Vec3b>(i, j)[2] = 255;}}}}imshow("1", map);waitKey();
chessboard相关推荐
- UESTC 1851 Kings on a Chessboard
状压DP... Kings on a Chessboard Time Limit: 10000ms Memory Limit: 65535KB This problem will be judged ...
- Numbers on the Chessboard
You are given a chessboard of size n×nn×n. It is filled with numbers from 11 to n2n2 in the followin ...
- [poj2446]Chessboard
Description 给定一个m×n的棋盘,上面有k个洞,求是否能在不重复覆盖且不覆盖到洞的情况下,用2×1的卡片完全覆盖棋盘. Input 第一行有三个整数n,m,k(0<m,n<=3 ...
- 【CodeForces - 1027B 】Numbers on the Chessboard (没有营养的找规律题,无聊题)
题干: You are given a chessboard of size n×nn×n. It is filled with numbers from 11 to n2n2 in the foll ...
- Numbers on the Chessboard(CF-1027B)
Problem Description You are given a chessboard of size n×n. It is filled with numbers from 1 to n^2 ...
- Codewars-The wheat/rice and chessboard problem(棋盘放谷粒)
棋盘放谷粒 科学作家大卫·布拉特纳说,从前,有一个骗子为高端客户制作棋盘--在这个例子中,他是一个国王. 工匠很好;他的棋盘不仅仅是漂亮.他知道,国王喜欢下棋.于是他想出一个计谋,骗国王交出一大笔财产 ...
- LightOJ1171 Knights in Chessboard (II)(二分图最大点独立集)
题目 Source http://www.lightoj.com/volume_showproblem.php?problem=1171 Description Given an m x n ches ...
- UVA10284 POJ2512 Chessboard in FEN【国际象棋】
In the FEN (Forsyth-Edwards Notation), a chessboard is described as follows: • The Board-Content is ...
- UVA10751 Chessboard【数学水题】
A king wishes to go for a walk of a square chessboard with the following conditions: • Each two cons ...
- POJ1657 Bailian1657 Distance on Chessboard【基础】
Distance on Chessboard 描述 国际象棋的棋盘是黑白相间的8 * 8的方格,棋子放在格子中间.如下图所示: 王.后.车.象的走子规则如下: 王:横.直.斜都可以走,但每步限走一格. ...
最新文章
- 已经正常安装ssh: connect to host 192.168.4.254 port 22: Connection refused
- JAVA-JSP内置对象
- android studio使用问题——instant run
- 【oracle】dbms_output:控制台输出
- uni-app 实现递增递减(js)
- @Modules( ... ) 多个包路径问题
- Windows下SVN备份脚本
- Happy New Year!PR升3啦!
- Guice集成Properties配置
- 【AI视野·今日CV 计算机视觉论文速览 第192期】Thu, 6 May 2021
- [JAVA]EXCEL工具推荐-MyExcel
- 百度「联邦学习」战略全布局
- Blender(二)bpy模块
- You are currently rebasing branch ‘csindex/feature/index_info‘ on ‘d2ef4210a3‘.
- 国产操作系统银河麒麟V10-sp1-0521桌面系统文件共享配置
- OpenGL--多边形偏移
- Java基础:反射的详细介绍与使用
- “华为 30 岁以下员工仅占 28%”上热搜,网友:说好的 35 岁天花板呢?
- 图像局部特征(五)--斑点检测之SIFT算法原理总结
- 如何将guake设置为开机自启动
热门文章
- python利用Tkinter绘图
- 第三章 复变函数的积分 知识点总结(Jeff自我感悟)
- 数据结构与算法之数组与广义表
- xstart连不上linux_【Tools系列】使用xstart远程连接linux图形用户界面以及rxvt终端配置-Go语言中文社区...
- cd /home 和cd home的区别以及一些常用的linux的命令
- input()函数及其各种用法
- java变量和运算符_Java(二)—— 变量和运算符
- Feign原理及其使用
- OpenCV3错误总结(二):0x00007FFE8F21A9C0 (ntdll.dll)处(位于 photo mix.exe 中)引发的异常: 0xC0000005: 读取位置 0x00000000
- CNN中的混合域注意力机制CBAM