Mouse click to get opencv image coordinates and pixel values

Table of contents

1. Core functions

2. Define and use in the class

1. Declare the callback function directly as a friend function

2、.h

3、DW_S_OnMou.cpp

4、main.cpp、

3. Function call

1、OnMouse.h

2、OnMouse.cpp


1. Core functions

setMouseCallback(_winname, mouse, reinterpret_cast<void*> (&_image));
void mouse(i

Guess you like

Origin blog.csdn.net/puqian13/article/details/127180048