Rename member function 22/279922/1
authorTae-Young Chung <ty83.chung@samsung.com>
Fri, 19 Aug 2022 05:44:58 +0000 (14:44 +0900)
committerTae-Young Chung <ty83.chung@samsung.com>
Fri, 19 Aug 2022 05:45:15 +0000 (14:45 +0900)
[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 <ty83.chung@samsung.com>
packaging/dfs-opencv.spec
src/dfs_opencv.cpp
src/dfs_opencv_private.h

index 5a310ea3b64c02c08f64c81de3ec6b9e79dc7a52..90dad4d056ab89561211f77989bd221bf3c161bd 100644 (file)
@@ -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
index d429bc9d38a76b7e150e12c00956be5d9bca6217..1d67282f4083dc762f7d7b5a89284125a56bd61f 100644 (file)
@@ -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<std::mutex> lock(mMutexJob);
@@ -294,7 +294,7 @@ namespace DfsAdaptationImpl
        }
 
        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) {
@@ -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<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)));
@@ -474,7 +474,7 @@ namespace DfsAdaptationImpl
                LOGI("LEAVE");
        }
 
-       DfsOutputData& DfsOCV::GetDepthData()
+       DfsOutputData& DfsOCV::getDepthData()
        {
                LOGI("ENTER");
 
index b20ce4dd72106f3dad52413498c8b1b6651ac655..42123677a4b00fc3c44c1143bc56c81018f3f9ba 100644 (file)
@@ -115,15 +115,15 @@ namespace DfsAdaptationImpl
                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);
@@ -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;
 
        };
 }