{
DfsOCV::DfsOCV() :
mDfsOcv(nullptr),
- mTextureThreshold(0.0),
- mAggregationWindowWidth(3),
- mAggregationWindowHeight(3),
- mMaxSpeckleSize(0),
+ mDepthParam(),
mNumDisparities(179),
mBlockSize(5),
mMinDisparity(32),
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);
#define __DFS_OPENCV_PRIVATE_H__
#include <dfs_adaptation.h>
+#include <dfs_parameter.h>
#include <opencv2/core.hpp>
#include <opencv2/calib3d.hpp>
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;
DfsOCV();
~DfsOCV();
- void Initialize(double textureThreshold,
- size_t aggregationWindowWidth,
- size_t aggregationWindowHeight,
- size_t maxSpeckleSize) override;
+ void Initialize(DepthParameter& param) override;
};
}