#include "stdafx.h"
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
using namespace cv;
using namespace std;
//using namespace cv::xfeatures2d;
//using namespace cv::ml;
Mat src;
bool down = false;
Poi
利用opencv通过点击鼠标获取一张图片上点的像素点坐标
于 2021-03-04 15:32:56 首次发布
这篇博客介绍了如何在使用OpenCV时,通过监听鼠标左键点击事件获取图片上的像素点坐标。作者提到了在代码中包含<header>opencv2/highgui/highgui_c.h</header>以确保cvNameWindow等函数的正确识别,并且建议可以移除<stdafx.h>头文件。同时,注意到CV_EVENT_LBUTTONDOWN事件标识符可以简化为_LBUTTONDOWN。
摘要由CSDN通过智能技术生成