From fd99faebde3361e5acf1dfc4ebebfe4727a47124 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Fri, 18 Dec 2015 19:45:29 +0100 Subject: tracker/pt: move ctor out of the loop --- tracker-pt/camera.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'tracker-pt/camera.cpp') 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; -- cgit v1.2.3