From 43e7e6e4753608ca7986ec8d16a1a0f5e913dc63 Mon Sep 17 00:00:00 2001 From: lluis Date: Tue, 23 Jul 2013 14:37:45 +0200 Subject: [PATCH] removed extra cv:: scope qualifiers for better readability --- .../include/opencv2/objdetect/erfilter.hpp | 10 ++++---- modules/objdetect/src/erfilter.cpp | 24 +++++++++---------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/modules/objdetect/include/opencv2/objdetect/erfilter.hpp b/modules/objdetect/include/opencv2/objdetect/erfilter.hpp index fd4a274ea8..1273688b64 100644 --- a/modules/objdetect/include/opencv2/objdetect/erfilter.hpp +++ b/modules/objdetect/include/opencv2/objdetect/erfilter.hpp @@ -119,7 +119,7 @@ public: Extracts the component tree (if needed) and filter the extremal regions (ER's) by using a given classifier. */ -class CV_EXPORTS ERFilter : public cv::Algorithm +class CV_EXPORTS ERFilter : public Algorithm { public: @@ -138,11 +138,11 @@ public: \param image is the input image \param regions is output for the first stage, input/output for the second one. */ - virtual void run( cv::InputArray image, std::vector& regions ) = 0; + virtual void run( InputArray image, std::vector& regions ) = 0; //! set/get methods to set the algorithm properties, - virtual void setCallback(const cv::Ptr& cb) = 0; + virtual void setCallback(const Ptr& cb) = 0; virtual void setThresholdDelta(int thresholdDelta) = 0; virtual void setMinArea(float minArea) = 0; virtual void setMaxArea(float maxArea) = 0; @@ -176,7 +176,7 @@ public: \param nonMaxSuppression Whenever non-maximum suppression is done over the branch probabilities \param minProbability The minimum probability difference between local maxima and local minima ERs */ -CV_EXPORTS cv::Ptr createERFilterNM1(const cv::Ptr& cb = NULL, +CV_EXPORTS Ptr createERFilterNM1(const Ptr& cb = NULL, int thresholdDelta = 1, float minArea = 0.000025, float maxArea = 0.13, float minProbability = 0.2, bool nonMaxSuppression = true, @@ -195,7 +195,7 @@ CV_EXPORTS cv::Ptr createERFilterNM1(const cv::Ptr if omitted tries to load a default classifier from file trained_classifierNM2.xml \param minProbability The minimum probability P(er|character) allowed for retreived ER's */ -CV_EXPORTS cv::Ptr createERFilterNM2(const cv::Ptr& cb = NULL, +CV_EXPORTS Ptr createERFilterNM2(const Ptr& cb = NULL, float minProbability = 0.85); } diff --git a/modules/objdetect/src/erfilter.cpp b/modules/objdetect/src/erfilter.cpp index efcfa0bbfa..37e3519b91 100644 --- a/modules/objdetect/src/erfilter.cpp +++ b/modules/objdetect/src/erfilter.cpp @@ -82,14 +82,14 @@ public: // the key method. Takes image on input, vector of ERStat is output for the first stage, // input/output - for the second one. - void run( cv::InputArray image, std::vector& regions ); + void run( InputArray image, std::vector& regions ); protected: int thresholdDelta; float maxArea; float minArea; - cv::Ptr classifier; + Ptr classifier; // count of the rejected/accepted regions int num_rejected_regions; @@ -98,7 +98,7 @@ protected: public: // set/get methods to set the algorithm properties, - void setCallback(const cv::Ptr& cb); + void setCallback(const Ptr& cb); void setThresholdDelta(int thresholdDelta); void setMinArea(float minArea); void setMaxArea(float maxArea); @@ -111,10 +111,10 @@ private: // pointer to the input/output regions vector std::vector *regions; // image mask used for feature calculations - cv::Mat region_mask; + Mat region_mask; // extract the component tree and store all the ER regions - void er_tree_extract( cv::InputArray image ); + void er_tree_extract( InputArray image ); // accumulate a pixel into an ER void er_add_pixel( ERStat *parent, int x, int y, int non_boundary_neighbours, int non_boundary_neighbours_horiz, @@ -126,7 +126,7 @@ private: // copy extracted regions into the output vector ERStat* er_save( ERStat *er, ERStat *parent, ERStat *prev ); // recursively walk the tree and filter (remove) regions using the callback classifier - ERStat* er_tree_filter( cv::InputArray image, ERStat *stat, ERStat *parent, ERStat *prev ); + ERStat* er_tree_filter( InputArray image, ERStat *stat, ERStat *parent, ERStat *prev ); // recursively walk the tree selecting only regions with local maxima probability ERStat* er_tree_nonmax_suppression( ERStat *er, ERStat *parent, ERStat *prev ); }; @@ -184,7 +184,7 @@ ERFilterNM::ERFilterNM() // the key method. Takes image on input, vector of ERStat is output for the first stage, // input/output for the second one. -void ERFilterNM::run( cv::InputArray image, std::vector& _regions ) +void ERFilterNM::run( InputArray image, std::vector& _regions ) { // assert correct image type @@ -222,7 +222,7 @@ void ERFilterNM::run( cv::InputArray image, std::vector& _regions ) // extract the component tree and store all the ER regions // uses the algorithm described in // Linear time maximally stable extremal regions, D Nistér, H Stewénius – ECCV 2008 -void ERFilterNM::er_tree_extract( cv::InputArray image ) +void ERFilterNM::er_tree_extract( InputArray image ) { Mat src = image.getMat(); @@ -749,7 +749,7 @@ ERStat* ERFilterNM::er_save( ERStat *er, ERStat *parent, ERStat *prev ) } // recursively walk the tree and filter (remove) regions using the callback classifier -ERStat* ERFilterNM::er_tree_filter ( cv::InputArray image, ERStat * stat, ERStat *parent, ERStat *prev ) +ERStat* ERFilterNM::er_tree_filter ( InputArray image, ERStat * stat, ERStat *parent, ERStat *prev ) { Mat src = image.getMat(); // assert correct image type @@ -820,7 +820,7 @@ ERStat* ERFilterNM::er_tree_filter ( cv::InputArray image, ERStat * stat, ERStat { vector hull; - cv::convexHull(contours[0], hull, false); + convexHull(contours[0], hull, false); hull_area = (int)contourArea(hull); } @@ -1072,7 +1072,7 @@ double ERClassifierNM2::eval(const ERStat& stat) \param nonMaxSuppression Whenever non-maximum suppression is done over the branch probabilities \param minProbability The minimum probability difference between local maxima and local minima ERs */ -Ptr createERFilterNM1(const cv::Ptr& cb, int thresholdDelta, +Ptr createERFilterNM1(const Ptr& cb, int thresholdDelta, float minArea, float maxArea, float minProbability, bool nonMaxSuppression, float minProbabilityDiff) { @@ -1111,7 +1111,7 @@ Ptr createERFilterNM1(const cv::Ptr& cb, int thres if omitted tries to load a default classifier from file trained_classifierNM2.xml \param minProbability The minimum probability P(er|character) allowed for retreived ER's */ -Ptr createERFilterNM2(const cv::Ptr& cb, float minProbability) +Ptr createERFilterNM2(const Ptr& cb, float minProbability) { CV_Assert( (minProbability >= 0.) && (minProbability <= 1.) );