Change parameters of Intialize() to DepthParameter
authorTae-Young Chung <ty83.chung@samsung.com>
Fri, 8 Oct 2021 02:41:44 +0000 (11:41 +0900)
committer엘무럿/선행S/W Lab(생활가전)/Principal Engineer/삼성전자 <e.talipov@samsung.com>
Tue, 14 Dec 2021 02:21:04 +0000 (11:21 +0900)
Signed-off-by: Tae-Young Chung <ty83.chung@samsung.com>
src/dfs_opencv.cpp
src/dfs_opencv_private.h

index bea2a84430556fc5dc966bfa211f12708cf5fc7e..2db17d6db85af02b2d4aea071f9e7e8e6b462fb2 100644 (file)
@@ -21,10 +21,7 @@ namespace DfsAdaptationImpl
 {
        DfsOCV::DfsOCV() :
                mDfsOcv(nullptr),
-               mTextureThreshold(0.0),
-               mAggregationWindowWidth(3),
-               mAggregationWindowHeight(3),
-               mMaxSpeckleSize(0),
+               mDepthParam(),
                mNumDisparities(179),
                mBlockSize(5),
                mMinDisparity(32),
@@ -42,17 +39,11 @@ namespace DfsAdaptationImpl
                LOGI("LEAVE");
        }
 
-       void DfsOCV::Initialize(double textureThreshold,
-                                               size_t aggregationWindowWidth,
-                                               size_t aggregationWindowHeight,
-                                               size_t maxSpeckleSize)
+       void DfsOCV::Initialize(DepthParameter& param)
        {
                LOGI("ENTER");
 
-               mTextureThreshold = textureThreshold;
-               mAggregationWindowWidth = aggregationWindowWidth;
-               mAggregationWindowHeight = aggregationWindowHeight;
-               mMaxSpeckleSize = maxSpeckleSize;
+               mDepthParam = param;
 
                mDfsOcv = cv::StereoSGBM::create(1, mNumDisparities, mBlockSize);
 
index afbad5e37a44c64d4713e5650260d00244f0fb1a..ea394e6c0a17e9e4358c192771bf3b3a8c5f0207 100644 (file)
@@ -18,6 +18,7 @@
 #define __DFS_OPENCV_PRIVATE_H__
 
 #include <dfs_adaptation.h>
+#include <dfs_parameter.h>
 
 #include <opencv2/core.hpp>
 #include <opencv2/calib3d.hpp>
@@ -44,10 +45,7 @@ namespace DfsAdaptationImpl
        private:
                cv::Ptr<cv::StereoSGBM> mDfsOcv;
 
-               double mTextureThreshold;
-               size_t mAggregationWindowWidth;
-               size_t mAggregationWindowHeight;
-               size_t mMaxSpeckleSize;
+               DepthParameter mDepthParam;
                size_t mNumDisparities;
                size_t mBlockSize;
                size_t mMinDisparity;
@@ -60,10 +58,7 @@ namespace DfsAdaptationImpl
                DfsOCV();
                ~DfsOCV();
 
-               void Initialize(double textureThreshold,
-                                               size_t aggregationWindowWidth,
-                                               size_t aggregationWindowHeight,
-                                               size_t maxSpeckleSize) override;
+               void Initialize(DepthParameter& param) override;
 
        };
 }