chessboard create
来源:互联网 发布:文字播音软件 编辑:程序博客网 时间:2024/06/05 19:26
const int perBoardPixel = 100; const cv::SizeboardSize(8,6); const cv::Sizeresolution(1200,800); int main() { int basisHeight = (resolution.height - perBoardPixel*boardSize.height) /2; int basisWidth = (resolution.width - perBoardPixel*boardSize.width) /2; if( basisHeight < 0 || basisWidth < 0) { cout<<"Resolution doesn't match!"<<endl; } cv::Mat image(resolution,CV_8UC1,cv::Scalar::all(255)); int flag = 0; for(int j =0;j < boardSize.height;j++) { for(int i =0;i < boardSize.width;i++) { flag = (i+j) % 2; if(flag == 0) { for(int n = j * perBoardPixel;n < (j+1) * perBoardPixel;n++) for(int m = i * perBoardPixel;m < (i+1) * perBoardPixel;m++) image.at<uchar>(n + basisHeight,m + basisWidth) =0; } } } return 0; }
阅读全文
0 0
- chessboard create
- Chessboard
- Chessboard
- Chessboard
- poj2446 Chessboard
- poj2446 Chessboard
- POJ2446 Chessboard
- poj2446 Chessboard
- POJ2446--Chessboard
- Incomplete Chessboard
- HDU5100-Chessboard
- hdu5100---Chessboard
- Chessboard(HDUOJ_5100)
- POJ2446 CHESSBOARD
- HDU5100 Chessboard
- Chessboard HDU
- create
- create
- java新特性
- 云计算笔记一:概述
- HDOJ1013 Digital Roots
- Windows下在CLion中导入OpenSSL的方法
- RESTful API 设计最佳实践
- chessboard create
- Android神器:高效事件通信总线EventBus,简例讲解,进阶中高级工程师必看!(附带碎片Fragment高级使用技巧)
- 利用runtime解决数组crash
- 十一月英语——So it goes...
- 人工智能简介
- 浅谈hibernate的sessionFactory和session
- Nginx--Session共享问题
- ZOJ 2770 Burn the Linked Camp(差分约束)
- 动态规划之0-1背包问题