Skip to content
Snippets Groups Projects
Commit fa5c8233 authored by Nicolas Pope's avatar Nicolas Pope
Browse files

Allow camera device selection

parent 2c533e2d
No related branches found
No related tags found
No related merge requests found
Pipeline #21463 canceled
......@@ -33,14 +33,16 @@ LocalSource::LocalSource(nlohmann::json &config)
: Configurable(config), timestamp_(0.0) {
nostereo_ = value("nostereo", false);
int device_left = value("device_left", 0);
int device_right = value("device_right", 1);
// Use cameras
camera_a_ = new VideoCapture;
LOG(INFO) << "Cameras check... ";
camera_a_->open(0);
camera_a_->open(device_left);
if (!nostereo_) {
camera_b_ = new VideoCapture(1);
camera_b_ = new VideoCapture(device_right);
} else {
camera_b_ = nullptr;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment