From 34b079f9adb70b08993b2508216e6606a8a50952 Mon Sep 17 00:00:00 2001 From: TinyOh Date: Sat, 2 Mar 2019 14:32:11 +0800 Subject: [PATCH 1/3] fix: reduce more copy times --- src/mynteye/api/processor/depth_processor.h | 6 ++++++ src/mynteye/api/processor/disparity_processor.h | 3 +++ src/mynteye/api/processor/points_processor_ocv.h | 6 ++++++ 3 files changed, 15 insertions(+) diff --git a/src/mynteye/api/processor/depth_processor.h b/src/mynteye/api/processor/depth_processor.h index 69f2f6d..0d57d04 100644 --- a/src/mynteye/api/processor/depth_processor.h +++ b/src/mynteye/api/processor/depth_processor.h @@ -34,6 +34,12 @@ class DepthProcessor : public Processor { std::string Name() override; protected: + inline Processor::process_type ProcessOutputConnection() override { + return Processor::WITHOUT_CLONE; + } + inline Processor::process_type ProcessInputConnection() override { + return Processor::WITHOUT_CLONE; + } Object *OnCreateOutput() override; bool OnProcess( Object *const in, Object *const out, diff --git a/src/mynteye/api/processor/disparity_processor.h b/src/mynteye/api/processor/disparity_processor.h index de2a46e..fd6cc33 100644 --- a/src/mynteye/api/processor/disparity_processor.h +++ b/src/mynteye/api/processor/disparity_processor.h @@ -41,6 +41,9 @@ class DisparityProcessor : public Processor { void NotifyComputingTypeChanged(const DisparityComputingMethod &MethodType); protected: + inline Processor::process_type ProcessOutputConnection() override { + return Processor::WITHOUT_CLONE; + } Object *OnCreateOutput() override; bool OnProcess( Object *const in, Object *const out, diff --git a/src/mynteye/api/processor/points_processor_ocv.h b/src/mynteye/api/processor/points_processor_ocv.h index a0d2c0a..0aa22da 100644 --- a/src/mynteye/api/processor/points_processor_ocv.h +++ b/src/mynteye/api/processor/points_processor_ocv.h @@ -37,6 +37,12 @@ class PointsProcessorOCV : public Processor { bool OnProcess( Object *const in, Object *const out, std::shared_ptr const parent) override; + inline Processor::process_type ProcessOutputConnection() override { + return Processor::WITHOUT_CLONE; + } + inline Processor::process_type ProcessInputConnection() override { + return Processor::WITHOUT_CLONE; + } private: cv::Mat Q_; From 1bc0e47cd16de6663ff2995b005b60ce136a224f Mon Sep 17 00:00:00 2001 From: TinyOh Date: Sat, 2 Mar 2019 15:28:23 +0800 Subject: [PATCH 2/3] fix: test and reduce more copy times --- src/mynteye/api/processor/disparity_processor.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/mynteye/api/processor/disparity_processor.h b/src/mynteye/api/processor/disparity_processor.h index fd6cc33..5fd470d 100644 --- a/src/mynteye/api/processor/disparity_processor.h +++ b/src/mynteye/api/processor/disparity_processor.h @@ -44,6 +44,9 @@ class DisparityProcessor : public Processor { inline Processor::process_type ProcessOutputConnection() override { return Processor::WITHOUT_CLONE; } + inline Processor::process_type ProcessInputConnection() override { + return Processor::WITHOUT_CLONE; + } Object *OnCreateOutput() override; bool OnProcess( Object *const in, Object *const out, From 764ccba0411c213d1c2a50d33a6859d6aec6e45a Mon Sep 17 00:00:00 2001 From: TinyOh Date: Sat, 2 Mar 2019 16:17:21 +0800 Subject: [PATCH 3/3] fix: ros record, add disparity pre clone. --- src/mynteye/api/processor/disparity_processor.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mynteye/api/processor/disparity_processor.h b/src/mynteye/api/processor/disparity_processor.h index 5fd470d..a58bd57 100644 --- a/src/mynteye/api/processor/disparity_processor.h +++ b/src/mynteye/api/processor/disparity_processor.h @@ -44,9 +44,9 @@ class DisparityProcessor : public Processor { inline Processor::process_type ProcessOutputConnection() override { return Processor::WITHOUT_CLONE; } - inline Processor::process_type ProcessInputConnection() override { - return Processor::WITHOUT_CLONE; - } +// inline Processor::process_type ProcessInputConnection() override { +// return Processor::WITHOUT_CLONE; +// } Object *OnCreateOutput() override; bool OnProcess( Object *const in, Object *const out,