read info
This commit is contained in:
parent
f1003b63b3
commit
5ef5e8d866
|
@ -18,7 +18,7 @@
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <functional>
|
#include <functional>
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
|
#include <opencv2/imgproc/imgproc.hpp>
|
||||||
#include "api/plugin.h"
|
#include "api/plugin.h"
|
||||||
#include "api/processor/depth_processor.h"
|
#include "api/processor/depth_processor.h"
|
||||||
#include "api/processor/disparity_normalized_processor.h"
|
#include "api/processor/disparity_normalized_processor.h"
|
||||||
|
@ -41,8 +41,10 @@ namespace {
|
||||||
|
|
||||||
cv::Mat frame2mat(const std::shared_ptr<device::Frame> &frame) {
|
cv::Mat frame2mat(const std::shared_ptr<device::Frame> &frame) {
|
||||||
// TODO(JohnZhao) Support different format frame to cv::Mat
|
// TODO(JohnZhao) Support different format frame to cv::Mat
|
||||||
CHECK_EQ(frame->format(), Format::GREY);
|
CHECK_EQ(frame->format(), Format::YUYV);
|
||||||
return cv::Mat(frame->height(), frame->width(), CV_8UC1, frame->data());
|
cv::Mat img(frame->height(), frame->width(), CV_8UC2,frame->data());
|
||||||
|
cv::cvtColor(img, img, cv::COLOR_YUV2BGR_YUY2);
|
||||||
|
return img;
|
||||||
}
|
}
|
||||||
|
|
||||||
api::StreamData data2api(const device::StreamData &data) {
|
api::StreamData data2api(const device::StreamData &data) {
|
||||||
|
|
|
@ -87,7 +87,7 @@ Device::Device(const Model &model, std::shared_ptr<uvc::device> device)
|
||||||
channels_(std::make_shared<Channels>(device)),
|
channels_(std::make_shared<Channels>(device)),
|
||||||
motions_(std::make_shared<Motions>(channels_)) {
|
motions_(std::make_shared<Motions>(channels_)) {
|
||||||
VLOG(2) << __func__;
|
VLOG(2) << __func__;
|
||||||
//ReadAllInfos();
|
ReadAllInfos();
|
||||||
}
|
}
|
||||||
|
|
||||||
Device::~Device() {
|
Device::~Device() {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user