From: Tae-Young Chung Date: Fri, 19 Aug 2022 05:44:58 +0000 (+0900) Subject: Rename member function X-Git-Tag: submit/tizen/20220825.000317~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=846fb52e84fa692fb33f0a2d98535df8e2cc35fd;p=platform%2Fcore%2Fmultimedia%2Fdfs-opencv.git Rename member function [Version] 1.0.8-0 [Issue type] update https://review.tizen.org/gerrit/#/c/platform/core/multimedia/dfs-adaptation/+/279919 Rename member function https://wiki.tizen.org/Native_Platform_Coding_Idiom_and_Style_Guide [M05] The name should start with lowercase letters, Camel notation. Keep the style 'verb' + 'noun‘. Member functions o It should starts with a lowercase letter and have a uppercase letter for each new word. No underscores Change-Id: I8ac31ce5291c7efbc514b6e7a76bb910f0e46f8f Signed-off-by: Tae-Young Chung --- diff --git a/packaging/dfs-opencv.spec b/packaging/dfs-opencv.spec index 5a310ea..90dad4d 100644 --- a/packaging/dfs-opencv.spec +++ b/packaging/dfs-opencv.spec @@ -1,6 +1,6 @@ Name: dfs-opencv Summary: OpenCV based Depth-from-Stereo implementation -Version: 1.0.7 +Version: 1.0.8 Release: 0 Group: Multimedia/Libraries License: Apache-2.0 diff --git a/src/dfs_opencv.cpp b/src/dfs_opencv.cpp index d429bc9..1d67282 100644 --- a/src/dfs_opencv.cpp +++ b/src/dfs_opencv.cpp @@ -63,7 +63,7 @@ namespace DfsAdaptationImpl LOGI("LEAVE"); } - void DfsOCV::InitializeStereoCalibration(std::string filepath) + void DfsOCV::initializeStereoCalibration(std::string filepath) { LOGI("ENTER"); @@ -101,7 +101,7 @@ namespace DfsAdaptationImpl LOGI("LEAVE"); } - void DfsOCV::InitRectifyMap() + void DfsOCV::initRectifyMap() { LOGI("ENTER"); @@ -166,7 +166,7 @@ namespace DfsAdaptationImpl 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"); @@ -192,13 +192,13 @@ namespace DfsAdaptationImpl 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; } @@ -214,16 +214,16 @@ namespace DfsAdaptationImpl 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"); @@ -238,7 +238,7 @@ namespace DfsAdaptationImpl LOGI("LEAVE"); } - int DfsOCV::ConvertDfsDataTypeToCV(int type) + int DfsOCV::convertDfsDataTypeToCV(int type) { LOGI("ENTER"); switch (type) { @@ -275,7 +275,7 @@ namespace DfsAdaptationImpl return true; } - void DfsOCV::Runner() + void DfsOCV::runner() { while (true) { std::unique_lock lock(mMutexJob); @@ -294,7 +294,7 @@ namespace DfsAdaptationImpl } template - std::future DfsOCV::EnqueueJob(F f, Args... args) + std::future DfsOCV::enqueueJob(F f, Args... args) { LOGE("ENTER"); if (mIsStopAll) { @@ -316,7 +316,7 @@ namespace DfsAdaptationImpl return results; } - void DfsOCV::Run(DfsInputData& data) + void DfsOCV::run(DfsInputData& data) { LOGI("ENTER"); @@ -333,7 +333,7 @@ namespace DfsAdaptationImpl throw std::runtime_error("invalid size"); } - dataCvType = ConvertDfsDataTypeToCV(data.type); + dataCvType = convertDfsDataTypeToCV(data.type); if (dataCvType < 0) { throw std::runtime_error("invalid data type"); } @@ -352,7 +352,7 @@ namespace DfsAdaptationImpl 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"); @@ -397,14 +397,14 @@ namespace DfsAdaptationImpl 1.0/static_cast((1<> 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))); @@ -474,7 +474,7 @@ namespace DfsAdaptationImpl LOGI("LEAVE"); } - DfsOutputData& DfsOCV::GetDepthData() + DfsOutputData& DfsOCV::getDepthData() { LOGI("ENTER"); diff --git a/src/dfs_opencv_private.h b/src/dfs_opencv_private.h index b20ce4d..4212367 100644 --- a/src/dfs_opencv_private.h +++ b/src/dfs_opencv_private.h @@ -115,15 +115,15 @@ namespace DfsAdaptationImpl std::mutex mMutexJob; std::condition_variable mControlJob; - void Runner(); + void runner(); template - std::future EnqueueJob(F f, Args... args); + std::future 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); @@ -132,11 +132,11 @@ namespace DfsAdaptationImpl 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; }; }