diff options
| author | Stanislaw Halik <sthalik@misaki.pl> | 2015-12-18 19:45:29 +0100 | 
|---|---|---|
| committer | Stanislaw Halik <sthalik@misaki.pl> | 2015-12-18 19:45:29 +0100 | 
| commit | fd99faebde3361e5acf1dfc4ebebfe4727a47124 (patch) | |
| tree | e85c92e91252ffd3628747556d9de533dd85b11d | |
| parent | 02fe02c3e09ff28ce235a90bdd7f70eba1da95c8 (diff) | |
tracker/pt: move ctor out of the loop
| -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;          {  | 
