diff options
Diffstat (limited to 'tracker-easy/tracker-easy.cpp')
-rw-r--r-- | tracker-easy/tracker-easy.cpp | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/tracker-easy/tracker-easy.cpp b/tracker-easy/tracker-easy.cpp index 7850a23e..e69cbb92 100644 --- a/tracker-easy/tracker-easy.cpp +++ b/tracker-easy/tracker-easy.cpp @@ -121,7 +121,10 @@ namespace EasyTracker QMutexLocker l(&camera_mtx); if (camera) + { std::tie(iFrame, new_frame) = camera->get_frame(); + } + } if (new_frame) @@ -304,8 +307,11 @@ namespace EasyTracker } // Show full size preview pop-up - cv::imshow("Preview", iPreview.iFrameRgb); - cv::waitKey(1); + if (s.debug) + { + cv::imshow("Preview", iPreview.iFrameRgb); + cv::waitKey(1); + } // Update preview widget widget->update_image(iPreview.get_bitmap()); @@ -321,7 +327,10 @@ namespace EasyTracker else { // No preview, destroy preview pop-up - cv::destroyWindow("Preview"); + if (s.debug) + { + cv::destroyWindow("Preview"); + } } } } @@ -331,6 +340,11 @@ namespace EasyTracker { QMutexLocker l(&camera_mtx); + if (camera->is_open()) + { + return true; + } + iCameraInfo.fps = s.cam_fps; iCameraInfo.width = s.cam_res_x; iCameraInfo.height = s.cam_res_y; |