<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>
opencv每隔几秒在图片上显示一个点 (代码)
最新推荐文章于 2022-04-21 15:52:31 发布