X-Git-Url: http://git.treefish.org/~alex/stickletrack.git/blobdiff_plain/ab5ee4c78e1fa591a4d8d9af812f83a9e81ef6d7..9f9e04b576a579d96e339cb2339a71f4405af50b:/tracking.cpp?ds=sidebyside diff --git a/tracking.cpp b/tracking.cpp index 88c9512..9a185df 100644 --- a/tracking.cpp +++ b/tracking.cpp @@ -65,7 +65,7 @@ bool tracking_isEnabled () { return enablecontours; } -void tracking_init() { +void tracking_init( void (*mouseTracking)(int, int, int, int, void*) ) { namedWindow("stickletrack_tracking_prefs", CV_WINDOW_KEEPRATIO); namedWindow("stickletrack_tracking_screen", CV_WINDOW_KEEPRATIO); @@ -82,6 +82,8 @@ void tracking_init() { createTrackbar("max speed", "stickletrack_tracking_prefs", &Prefs.contours_maxspeed, 100, &trackbarCallbackUpdateNormPrefs, 0); createTrackbar("max rotation speed", "stickletrack_tracking_prefs", &Prefs.contours_maxrot, 100, &trackbarCallbackUpdateNormPrefs, 0); + cvSetMouseCallback("stickletrack_tracking_screen", mouseTracking, 0); + mContours = Mat::zeros(Props.height, Props.width, CV_8UC3); }