Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

You can't pass non-static function to cvSetMouseCallback. If you want to call method of some class in this callback, you can write wrapper-callback:

void on_mouse_wrapper(int event, int x, int y, int flag, void *param)
{
    ObjectDetectionGUI* thiz = (ObjectDetectionGUI*) param;
    thiz->on_mouse(...);
}

cvSetMouseCallback(window_name, on_mouse_wrapper, this);