-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstereocamera.cpp
More file actions
32 lines (25 loc) · 817 Bytes
/
stereocamera.cpp
File metadata and controls
32 lines (25 loc) · 817 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#include "stereocamera.h"
VideoCapture StereoCamera::getCapLeft() const { return capLeft; }
void StereoCamera::setCapLeft(const VideoCapture &value) { capLeft = value; }
VideoCapture StereoCamera::getCapRight() const { return capRight; }
void StereoCamera::setCapRight(const VideoCapture &value) { capRight = value; }
bool StereoCamera::isOpened() {
if (capLeft.isOpened() && capRight.isOpened()) {
return true;
}
return false;
}
StereoCamera::StereoCamera() {
capLeft.open("/dev/video0");
capRight.open("/dev/video2");
}
StereoCamera::StereoCamera(string pathCamLeft, string pathCamRight) {
capLeft.open(pathCamLeft);
capRight.open(pathCamRight);
}
StereoCamera::~StereoCamera() {
cout << "Destroy Stereo Camera Object";
capLeft.release();
capRight.release();
destroyAllWindows();
}