I have just started working with opencv in python for my undergrad thesis. Im Trying to build a simple GUI which supports mouse inputs on an image. This is fairly simple in C and C++ , since there are tons of documentations for opencv funtions in that area.
Anyway here is the problem.
Im trying to create a mouse listener which is shown like this in the API
Expand|Select|Wrap|Line Numbers
- void cvSetMouseCallback( const char* window_name, CvMouseCallback on_mouse );
- window_name
- Name of the window.
- on_mouse
- Pointer to the function to be called every time mouse event occurs in the specified window. This function should be prototyped as
- void Foo(int event, int x, int y, int flags);
- where event is one of CV_EVENT_*
when i give the function name I get the error:
> argument 2 of type 'CvMouseCallback'
and yes I know python is type free. Any Ideas???
Thanks.