From e9b42b3d4eabd1d4fbcdfb990c26f286259be8d2 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Mon, 20 Jul 2015 08:09:44 +0200 Subject: camera: more robust get_info() If camera was barely created and there's no info, grab the first frame to get resolution data. --- ftnoir_tracker_pt/camera.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ftnoir_tracker_pt/camera.h') diff --git a/ftnoir_tracker_pt/camera.h b/ftnoir_tracker_pt/camera.h index 63614ded..2c42652a 100644 --- a/ftnoir_tracker_pt/camera.h +++ b/ftnoir_tracker_pt/camera.h @@ -54,8 +54,8 @@ public: bool get_frame(float dt, cv::Mat* frame); // WARNING: returned references are valid as long as object - const CamInfo& get_info() const { return cam_info; } - const CamInfo& get_desired() const { return cam_desired; } + CamInfo get_info(); + CamInfo get_desired() const { return cam_desired; } protected: // get a frame from the camera -- cgit v1.2.3