* @brief Run dfs adaptor.
* @since_tizen 7.0
*/
- virtual void Run(DfsData& base, DfsData& extra) = 0;
+ virtual void Run(DfsInputData& data) = 0;
/**
* @brief Run dfs adaptor.
* @since_tizen 7.0
*/
- virtual DfsData& GetDepthData() = 0;
+ virtual DfsOutputData& GetDepthData() = 0;
};
typedef void destroy_t(IDfsAdaptation *);
void Initialize(DfsParameter& param, size_t width, size_t height,
size_t minDisp, size_t maxDisp, std::string stereoConfigPath);
- void Run(DfsData& base, DfsData& extra);
- DfsData& GetDepthData();
+ void Run(DfsInputData& data);
+ DfsOutputData& GetDepthData();
};
} /* DfsAdaptation */
namespace DfsAdaptation
{
struct DfsParameter {
- double textureThreshold;
- size_t aggregationWindowWidth;
- size_t aggregationWindowHeight;
- size_t maxSpeckleSize;
-
- DfsParameter()
- {
- textureThreshold = 1;
- aggregationWindowWidth = 10;
- aggregationWindowHeight = 10;
- maxSpeckleSize = 10;
- }
+ double textureThreshold { 1.0 };
+ size_t aggregationWindowWidth { 10 };
+ size_t aggregationWindowHeight { 10 };
+ size_t maxSpeckleSize { 10 };
};
struct DfsData {
- void *data;
- int type;
- size_t width;
- size_t height;
- size_t stride;
+ void *data { nullptr };
+ int type { 0 };
+ size_t width { 0 };
+ size_t height { 0 };
+ size_t stride { 0 };
+ };
- std::vector<std::vector<double>> pointCloud;
- double *pointCloudData;
- size_t pointCloudSize;
+ struct DfsInputData : public DfsData {
+ void *extraData { nullptr };
+ int inputFormat { 0 };
+ };
- DfsData()
- {
- data = pointCloudData = nullptr;
- type = 0;
- width = height = stride = 0;
- }
+ struct DfsOutputData : public DfsData {
+ std::vector<std::vector<double>> pointCloud;
+ double *pointCloudData { nullptr };
+ size_t pointCloudSize { 0 };
};
enum
DFS_DATA_TYPE_UINT16C1 = 4
};
+ enum
+ {
+ DFS_DATA_INPUT_FORMAT_COUPLED_SBS = 1,
+ DFS_DATA_INPUT_FORMAT_DECOUPLED_SBS = 2
+ };
+
}
#endif /* __DFS_PARAMETER_H__ */
LOGI("LEAVE");
}
- void DfsAdaptor::Run(DfsData& base, DfsData& extra)
+ void DfsAdaptor::Run(DfsInputData& data)
{
LOGI("ENTER");
CHECK_INSTANCE(mDfsAdaptorHandle);
- mDfsAdaptorHandle->Run(base, extra);
+ mDfsAdaptorHandle->Run(data);
LOGI("LEAVE");
}
- DfsData& DfsAdaptor::GetDepthData()
+ DfsOutputData& DfsAdaptor::GetDepthData()
{
LOGI("ENTER");
LOGI("LEAVE");
}
-}
\ No newline at end of file
+}