From 94745289725707455958bab803fa0651d10b3d51 Mon Sep 17 00:00:00 2001 From: TinyOh Date: Wed, 9 Jan 2019 11:03:13 +0800 Subject: [PATCH] refactor(calib models): delete new unused things --- src/mynteye/api/processor/depth_processor.cc | 14 +++++++------- src/mynteye/api/processor/points_processor.cc | 14 ++------------ src/mynteye/api/processor/points_processor.h | 2 +- src/mynteye/api/synthetic.cc | 2 +- 4 files changed, 11 insertions(+), 21 deletions(-) diff --git a/src/mynteye/api/processor/depth_processor.cc b/src/mynteye/api/processor/depth_processor.cc index aaaf610..e9ceea6 100644 --- a/src/mynteye/api/processor/depth_processor.cc +++ b/src/mynteye/api/processor/depth_processor.cc @@ -41,13 +41,13 @@ Object *DepthProcessor::OnCreateOutput() { bool DepthProcessor::OnProcess( Object *const in, Object *const out, Processor *const parent) { MYNTEYE_UNUSED(parent) - const ObjMat *input = Object::Cast(in); - ObjMat *output = Object::Cast(out); - cv::Mat channels[3 /*input->value.channels()*/]; - cv::split(input->value, channels); - channels[2].convertTo(output->value, CV_16UC1); - output->id = input->id; - output->data = input->data; + // const ObjMat *input = Object::Cast(in); + // ObjMat *output = Object::Cast(out); + // cv::Mat channels[3 /*input->value.channels()*/]; + // cv::split(input->value, channels); + // channels[2].convertTo(output->value, CV_16UC1); + // output->id = input->id; + // output->data = input->data; return true; } diff --git a/src/mynteye/api/processor/points_processor.cc b/src/mynteye/api/processor/points_processor.cc index b82dd32..81102d5 100644 --- a/src/mynteye/api/processor/points_processor.cc +++ b/src/mynteye/api/processor/points_processor.cc @@ -23,8 +23,8 @@ MYNTEYE_BEGIN_NAMESPACE const char PointsProcessor::NAME[] = "PointsProcessor"; -PointsProcessor::PointsProcessor(cv::Mat Q, std::int32_t proc_period) - : Processor(std::move(proc_period)), Q_(std::move(Q)) { +PointsProcessor::PointsProcessor(std::int32_t proc_period) + : Processor(std::move(proc_period)) { VLOG(2) << __func__ << ": proc_period=" << proc_period; } @@ -42,16 +42,6 @@ Object *PointsProcessor::OnCreateOutput() { bool PointsProcessor::OnProcess( Object *const in, Object *const out, Processor *const parent) { -#ifdef WITH_CAM_MODELS - -#else - MYNTEYE_UNUSED(parent) - const ObjMat *input = Object::Cast(in); - ObjMat *output = Object::Cast(out); - cv::reprojectImageTo3D(input->value, output->value, Q_, true); - output->id = input->id; - output->data = input->data; -#endif return true; } diff --git a/src/mynteye/api/processor/points_processor.h b/src/mynteye/api/processor/points_processor.h index e571091..5ca43f3 100644 --- a/src/mynteye/api/processor/points_processor.h +++ b/src/mynteye/api/processor/points_processor.h @@ -27,7 +27,7 @@ class PointsProcessor : public Processor { public: static const char NAME[]; - explicit PointsProcessor(cv::Mat Q, std::int32_t proc_period = 0); + explicit PointsProcessor(std::int32_t proc_period = 0); virtual ~PointsProcessor(); std::string Name() override; diff --git a/src/mynteye/api/synthetic.cc b/src/mynteye/api/synthetic.cc index a951511..f2a3232 100644 --- a/src/mynteye/api/synthetic.cc +++ b/src/mynteye/api/synthetic.cc @@ -484,7 +484,7 @@ void Synthetic::InitProcessors() { points_processor = points_processor_pin; } else if (calib_model_ == CalibrationModel::KANNALA_BRANDT) { auto &&points_processor_kan = std::make_shared( - rectify_processor->Q, POINTS_PROC_PERIOD); + POINTS_PROC_PERIOD); points_processor = points_processor_kan; } else { LOG(ERROR) << "Unknow calib model type in device: "