如何在私有类btnpr中添加我的static void mouse_callback? [英] How to add my static void mouse_callback in the private class btnpr?
问题描述
我尝试添加
static void mouse_callback(< span class =code-keyword> int event , int x, int y, int , void *)
在私有类
private:System :: Void btnpr_Click(System :: Object ^ sender,System :: EventArgs ^ e)
我在Visual Studio +中工作OpenCV + WindowsForms
或者如果有人知道如何在Windows窗体c ++中添加感兴趣区域(OpenCV)?
谢谢。
我尝试过:
我尝试添加下一个表格的这个类:
setMouseCallback(System valuate,mouse_callback);
但它给我一个void和cv :: MouseCallback之间的兼容性错误
该函数不正确接口。有一个int很多:
static void mouse_callback( int event , int x, int y, void * data);另请阅读<在Github上的一个href =https://github.com/opencv/opencv/blob/master/samples/cpp/ffilldemo.cpp>示例。
要指定一个地区你检查正常鼠标处理函数中的坐标
Hi,I try to add
static void mouse_callback(int event, int x, int y, int, void *)
in the private class
private: System::Void btnpr_Click(System::Object^ sender, System::EventArgs^ e)
I am working in Visual Studio+OpenCV+WindowsForms
Or if someone know how to add Region of Interest (OpenCV) in Windows Forms c++?
Thanks.
What I have tried:
I try to add this class of the next form:
setMouseCallback("System valuate", mouse_callback);
But it gives me a compatibility error between void and cv :: MouseCallback
The function has a not correct interface. There is an int to much:
static void mouse_callback(int event, int x, int y, void *data);Read also this example on Github.
To specify an region you check the coordinates in the normal mouse handler function.
这篇关于如何在私有类btnpr中添加我的static void mouse_callback?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!