opencv每隔几秒在图片上显示一个点 (代码)
2015-10-12 08:45
537 查看
<span style="font-size:18px;">#include<Windows.h> #include<opencv2/imgproc/imgproc.hpp> #include<opencv2/highgui/highgui.hpp> #include<opencv2/objdetect/objdetect.hpp> #include<vector> #include<iostream> #include<string> using namespace std; using namespace cv; int main() { const Size sizepx(900, 900); Mat screen(sizepx.width, sizepx.height, CV_32FC3); screen.setTo(Scalar(255, 0, 0)); for (int i = 150; i < sizepx.height; i += 300) { for (int j = 150; j < sizepx.width; j += 300) { Point p = Point(i, j); double t = (double)getTickCount(); ((double)getTickCount() - t); circle(screen, p, 8, Scalar(0, 255, 0), -1); imshow("屏幕", screen); waitKey(3000); cout << p.x << ' ' << p.y << endl; } } /*waitKey(0);*/ return 0; }</span>
相关文章推荐
- 悬浮导航代码
- JSP编译为Java类
- 53 PHP文件处理(六)文件上传--总结---细说php
- Python&nbsp;cgi&nbsp;windows
- C++&nbsp;有符号&nbsp;无符号数
- Python set list dict tuple 区别
- PHP 之 FastCGI 与 mod_php 详解
- Effective&nbsp;C++笔记
- Python&nbsp;tuples&nbsp;list
- Python&nbsp;类型转化
- Google&nbsp;编程规范1.2
- C语言字符串操作
- python re 记录
- python&nbsp;字符串&nbsp;time互转
- C++回调函数
- C++&nbsp;字符串分割
- C++&nbsp;字符串大小写转换
- C++数组长度
- C++&nbsp;枚举值转char*
- Python&nbsp;shutil.copy&nbsp;函数