LOGI("LEAVE");
}
- void DfsOCV::InitializeStereoCalibration(std::string filepath)
+ void DfsOCV::initializeStereoCalibration(std::string filepath)
{
LOGI("ENTER");
LOGI("LEAVE");
}
- void DfsOCV::InitRectifyMap()
+ void DfsOCV::initRectifyMap()
{
LOGI("ENTER");
LOGI("LEAVE");
}
- void DfsOCV::Initialize(DfsParameter& param, size_t width, size_t height,
+ void DfsOCV::initialize(DfsParameter& param, size_t width, size_t height,
size_t minDisp, size_t maxDisp, std::string stereoConfigPath)
{
LOGI("ENTER");
50, // speckleWindowSize
2); // speckleRange
- this->SetParameters();
+ this->setParameters();
#if ENABLE_CALIBRATION
if (!stereoConfigPath.empty()) {
try {
- this->InitializeStereoCalibration(stereoConfigPath);
- this->InitRectifyMap();
+ this->initializeStereoCalibration(stereoConfigPath);
+ this->initRectifyMap();
} catch (const std::exception& e) {
throw e;
}
if (!mDfsOcvExtra) {
mThreadPool.reserve(MAX_THREADS_NUM - 1);
- mThreadPool.emplace_back([this](){this->Runner();});
+ mThreadPool.emplace_back([this](){this->runner();});
} else {
mThreadPool.reserve(MAX_THREADS_NUM);
- mThreadPool.emplace_back([this](){this->Runner();});
- mThreadPool.emplace_back([this](){this->Runner();});
+ mThreadPool.emplace_back([this](){this->runner();});
+ mThreadPool.emplace_back([this](){this->runner();});
}
LOGI("LEAVE");
}
- void DfsOCV::SetParameters()
+ void DfsOCV::setParameters()
{
LOGI("ENTER");
LOGI("LEAVE");
}
- int DfsOCV::ConvertDfsDataTypeToCV(int type)
+ int DfsOCV::convertDfsDataTypeToCV(int type)
{
LOGI("ENTER");
switch (type) {
return true;
}
- void DfsOCV::Runner()
+ void DfsOCV::runner()
{
while (true) {
std::unique_lock<std::mutex> lock(mMutexJob);
}
template <class F, class... Args>
- std::future<bool> DfsOCV::EnqueueJob(F f, Args... args)
+ std::future<bool> DfsOCV::enqueueJob(F f, Args... args)
{
LOGE("ENTER");
if (mIsStopAll) {
return results;
}
- void DfsOCV::Run(DfsInputData& data)
+ void DfsOCV::run(DfsInputData& data)
{
LOGI("ENTER");
throw std::runtime_error("invalid size");
}
- dataCvType = ConvertDfsDataTypeToCV(data.type);
+ dataCvType = convertDfsDataTypeToCV(data.type);
if (dataCvType < 0) {
throw std::runtime_error("invalid data type");
}
data.width, data.height, mImageSize.width, mImageSize.height);
throw std::runtime_error("invalid size");
}
- dataCvType = ConvertDfsDataTypeToCV(data.type);
+ dataCvType = convertDfsDataTypeToCV(data.type);
if (dataCvType < 0) {
LOGE("dataCvType: %d", dataCvType);
throw std::runtime_error("invalid data type");
1.0/static_cast<double>((1<<mDownScale)));
std::vector<std::future<bool>> results;
- results.emplace_back(EnqueueJob(&DfsOCV::computeL,
+ results.emplace_back(enqueueJob(&DfsOCV::computeL,
std::cref(srcBaseMat),
std::cref(srcExtraMat),
std::ref(dispMat)));
if (mDfsPostOcv) {
if (mDfsOcvExtra) {
cv::Mat dispMatExtra;
- results.emplace_back(EnqueueJob(&DfsOCV::computeR,
+ results.emplace_back(enqueueJob(&DfsOCV::computeR,
std::cref(srcExtraMat),
std::cref(srcBaseMat),
std::ref(dispMatExtra)));
LOGI("LEAVE");
}
- DfsOutputData& DfsOCV::GetDepthData()
+ DfsOutputData& DfsOCV::getDepthData()
{
LOGI("ENTER");
std::mutex mMutexJob;
std::condition_variable mControlJob;
- void Runner();
+ void runner();
template <class F, class... Args>
- std::future<bool> EnqueueJob(F f, Args... args);
+ std::future<bool> enqueueJob(F f, Args... args);
- void SetParameters();
- int ConvertDfsDataTypeToCV(int type);
- void InitializeStereoCalibration(std::string filepath);
- void InitRectifyMap();
+ void setParameters();
+ int convertDfsDataTypeToCV(int type);
+ void initializeStereoCalibration(std::string filepath);
+ void initRectifyMap();
bool computeL(const cv::Mat& baseMat, const cv::Mat& extraMat, cv::Mat& disp);
bool computeR(const cv::Mat& baseMat, const cv::Mat& extraMat, cv::Mat& disp);
DfsOCV();
~DfsOCV();
- void Initialize(DfsParameter& param, size_t width, size_t height,
+ void initialize(DfsParameter& param, size_t width, size_t height,
size_t minDisp, size_t maxDisp, std::string stereoConfigPath) override;
- void Run(DfsInputData& data) override;
+ void run(DfsInputData& data) override;
- DfsOutputData& GetDepthData() override;
+ DfsOutputData& getDepthData() override;
};
}