openTanjaLog();
masking_init();
- tracking_init();
-
- cvSetMouseCallback("contours_picture", mouseTracking, 0);
+ tracking_init(&mouseTracking);
capture.set(CV_CAP_PROP_POS_FRAMES, 0);
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);
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);
}
Point2f head, tail;
};
-void tracking_init();
+void tracking_init( void (*mouseTracking)(int, int, int, int, void*) );
void tracking_locateTags(vector<tag>& tags, Mat combinedmask_contour);
Mat& tracking_getFrame();
int tracking_showFrame();