diff options
Diffstat (limited to 'ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp')
-rw-r--r-- | ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp b/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp index 0d93dba5..41bf0edd 100644 --- a/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp +++ b/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp @@ -148,6 +148,9 @@ Tracker::~Tracker() delete videoWidget; if(layout) delete layout; + qDebug() << "releasing camera, brace for impact"; + camera.release(); + qDebug() << "all done!"; } void Tracker::StartTracker(QFrame* videoframe) @@ -172,8 +175,7 @@ void Tracker::StartTracker(QFrame* videoframe) void Tracker::run() { - cv::VideoCapture camera(camera_index); - + camera = cv::VideoCapture(camera_index); if (force_width) camera.set(CV_CAP_PROP_FRAME_WIDTH, force_width); if (force_height) @@ -354,9 +356,6 @@ void Tracker::run() if (frame.rows > 0) videoWidget->update_image(frame); } - qDebug() << "releasing camera, brace for impact"; - camera.release(); - qDebug() << "all done!"; } bool Tracker::GiveHeadPoseData(double *data) |