diff options
-rw-r--r-- | tracker-pt/camera.cpp | 3 | ||||
-rw-r--r-- | tracker-pt/ftnoir_tracker_pt.cpp | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/tracker-pt/camera.cpp b/tracker-pt/camera.cpp index 63b401a8..ff721557 100644 --- a/tracker-pt/camera.cpp +++ b/tracker-pt/camera.cpp @@ -117,6 +117,9 @@ bool CVCamera::_get_frame(cv::Mat* frame) if (img.empty()) return false; + if (frame->rows != img.rows || frame->cols != img.cols) + *frame = cv::Mat(); + *frame = img; cam_info.res_x = img.cols; cam_info.res_y = img.rows; diff --git a/tracker-pt/ftnoir_tracker_pt.cpp b/tracker-pt/ftnoir_tracker_pt.cpp index 3dd91a45..877b58fd 100644 --- a/tracker-pt/ftnoir_tracker_pt.cpp +++ b/tracker-pt/ftnoir_tracker_pt.cpp @@ -79,12 +79,12 @@ void Tracker_PT::run() #endif apply_settings(); + cv::Mat frame; while((commands & ABORT) == 0) { const double dt = time.elapsed() * 1e-9; time.start(); - cv::Mat frame; bool new_frame; { |