diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2015-06-01 17:10:06 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2015-06-01 17:10:06 +0200 |
commit | fc03209f0819e2d247f0b24ed02842fc5505ef73 (patch) | |
tree | c1ee719eaf89babd9e90f5bd13863d43fa841a51 /ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp | |
parent | 95624a290d9894966e3dab9ffc7064bbb2b51f18 (diff) |
pt, aruco, ht: select camera by name, not index
Diffstat (limited to 'ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp')
-rw-r--r-- | ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp b/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp index a6394b71..34bffa0a 100644 --- a/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp +++ b/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp @@ -97,7 +97,7 @@ void Tracker::run() fps = 200; break; } - camera = cv::VideoCapture(s.camera_index); + camera = cv::VideoCapture(camera_name_to_index(s.camera_name)); if (res.width) { camera.set(CV_CAP_PROP_FRAME_WIDTH, res.width); @@ -375,7 +375,7 @@ TrackerControls::TrackerControls() ui.setupUi(this); setAttribute(Qt::WA_NativeWindow, true); ui.cameraName->addItems(get_camera_names()); - tie_setting(s.camera_index, ui.cameraName); + tie_setting(s.camera_name, ui.cameraName); tie_setting(s.resolution, ui.resolution); tie_setting(s.force_fps, ui.cameraFPS); tie_setting(s.fov, ui.cameraFOV); |