修改了摄像头读取方式

This commit is contained in:
xinyang
2019-04-27 16:16:53 +08:00
parent 9cfd26cc23
commit 4e47b38d7d
15 changed files with 272 additions and 255 deletions

View File

@@ -5,19 +5,18 @@
#include "camera/video_wrapper.h"
VideoWrapper::VideoWrapper(const std::string &filename0, const std::string &filename1) {
video0.open(filename0);
video1.open(filename1);
VideoWrapper::VideoWrapper(const std::string &filename) {
video.open(filename);
}
VideoWrapper::~VideoWrapper() = default;
bool VideoWrapper::init() {
return video0.isOpened() && video1.isOpened();
return video.isOpened();
}
bool VideoWrapper::read(cv::Mat &src_left, cv::Mat &src_right) {
return video0.read(src_left) && video1.read(src_right);
bool VideoWrapper::read(cv::Mat &src) {
return video.read(src);
}