Skip to content

Commit 43e7e6e

Browse files
committed
removed extra cv:: scope qualifiers for better readability
1 parent 2087d46 commit 43e7e6e

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
lines changed

modules/objdetect/include/opencv2/objdetect/erfilter.hpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ struct CV_EXPORTS ERStat
119119
120120
Extracts the component tree (if needed) and filter the extremal regions (ER's) by using a given classifier.
121121
*/
122-
class CV_EXPORTS ERFilter : public cv::Algorithm
122+
class CV_EXPORTS ERFilter : public Algorithm
123123
{
124124
public:
125125

@@ -138,11 +138,11 @@ class CV_EXPORTS ERFilter : public cv::Algorithm
138138
\param image is the input image
139139
\param regions is output for the first stage, input/output for the second one.
140140
*/
141-
virtual void run( cv::InputArray image, std::vector<ERStat>& regions ) = 0;
141+
virtual void run( InputArray image, std::vector<ERStat>& regions ) = 0;
142142

143143

144144
//! set/get methods to set the algorithm properties,
145-
virtual void setCallback(const cv::Ptr<ERFilter::Callback>& cb) = 0;
145+
virtual void setCallback(const Ptr<ERFilter::Callback>& cb) = 0;
146146
virtual void setThresholdDelta(int thresholdDelta) = 0;
147147
virtual void setMinArea(float minArea) = 0;
148148
virtual void setMaxArea(float maxArea) = 0;
@@ -176,7 +176,7 @@ class CV_EXPORTS ERFilter : public cv::Algorithm
176176
\param nonMaxSuppression Whenever non-maximum suppression is done over the branch probabilities
177177
\param minProbability The minimum probability difference between local maxima and local minima ERs
178178
*/
179-
CV_EXPORTS cv::Ptr<ERFilter> createERFilterNM1(const cv::Ptr<ERFilter::Callback>& cb = NULL,
179+
CV_EXPORTS Ptr<ERFilter> createERFilterNM1(const Ptr<ERFilter::Callback>& cb = NULL,
180180
int thresholdDelta = 1, float minArea = 0.000025,
181181
float maxArea = 0.13, float minProbability = 0.2,
182182
bool nonMaxSuppression = true,
@@ -195,7 +195,7 @@ CV_EXPORTS cv::Ptr<ERFilter> createERFilterNM1(const cv::Ptr<ERFilter::Callback>
195195
if omitted tries to load a default classifier from file trained_classifierNM2.xml
196196
\param minProbability The minimum probability P(er|character) allowed for retreived ER's
197197
*/
198-
CV_EXPORTS cv::Ptr<ERFilter> createERFilterNM2(const cv::Ptr<ERFilter::Callback>& cb = NULL,
198+
CV_EXPORTS Ptr<ERFilter> createERFilterNM2(const Ptr<ERFilter::Callback>& cb = NULL,
199199
float minProbability = 0.85);
200200

201201
}

modules/objdetect/src/erfilter.cpp

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -82,14 +82,14 @@ class CV_EXPORTS ERFilterNM : public ERFilter
8282

8383
// the key method. Takes image on input, vector of ERStat is output for the first stage,
8484
// input/output - for the second one.
85-
void run( cv::InputArray image, std::vector<ERStat>& regions );
85+
void run( InputArray image, std::vector<ERStat>& regions );
8686

8787
protected:
8888
int thresholdDelta;
8989
float maxArea;
9090
float minArea;
9191

92-
cv::Ptr<ERFilter::Callback> classifier;
92+
Ptr<ERFilter::Callback> classifier;
9393

9494
// count of the rejected/accepted regions
9595
int num_rejected_regions;
@@ -98,7 +98,7 @@ class CV_EXPORTS ERFilterNM : public ERFilter
9898
public:
9999

100100
// set/get methods to set the algorithm properties,
101-
void setCallback(const cv::Ptr<ERFilter::Callback>& cb);
101+
void setCallback(const Ptr<ERFilter::Callback>& cb);
102102
void setThresholdDelta(int thresholdDelta);
103103
void setMinArea(float minArea);
104104
void setMaxArea(float maxArea);
@@ -111,10 +111,10 @@ class CV_EXPORTS ERFilterNM : public ERFilter
111111
// pointer to the input/output regions vector
112112
std::vector<ERStat> *regions;
113113
// image mask used for feature calculations
114-
cv::Mat region_mask;
114+
Mat region_mask;
115115

116116
// extract the component tree and store all the ER regions
117-
void er_tree_extract( cv::InputArray image );
117+
void er_tree_extract( InputArray image );
118118
// accumulate a pixel into an ER
119119
void er_add_pixel( ERStat *parent, int x, int y, int non_boundary_neighbours,
120120
int non_boundary_neighbours_horiz,
@@ -126,7 +126,7 @@ class CV_EXPORTS ERFilterNM : public ERFilter
126126
// copy extracted regions into the output vector
127127
ERStat* er_save( ERStat *er, ERStat *parent, ERStat *prev );
128128
// recursively walk the tree and filter (remove) regions using the callback classifier
129-
ERStat* er_tree_filter( cv::InputArray image, ERStat *stat, ERStat *parent, ERStat *prev );
129+
ERStat* er_tree_filter( InputArray image, ERStat *stat, ERStat *parent, ERStat *prev );
130130
// recursively walk the tree selecting only regions with local maxima probability
131131
ERStat* er_tree_nonmax_suppression( ERStat *er, ERStat *parent, ERStat *prev );
132132
};
@@ -184,7 +184,7 @@ ERFilterNM::ERFilterNM()
184184

185185
// the key method. Takes image on input, vector of ERStat is output for the first stage,
186186
// input/output for the second one.
187-
void ERFilterNM::run( cv::InputArray image, std::vector<ERStat>& _regions )
187+
void ERFilterNM::run( InputArray image, std::vector<ERStat>& _regions )
188188
{
189189

190190
// assert correct image type
@@ -222,7 +222,7 @@ void ERFilterNM::run( cv::InputArray image, std::vector<ERStat>& _regions )
222222
// extract the component tree and store all the ER regions
223223
// uses the algorithm described in
224224
// Linear time maximally stable extremal regions, D Nistér, H Stewénius – ECCV 2008
225-
void ERFilterNM::er_tree_extract( cv::InputArray image )
225+
void ERFilterNM::er_tree_extract( InputArray image )
226226
{
227227

228228
Mat src = image.getMat();
@@ -749,7 +749,7 @@ ERStat* ERFilterNM::er_save( ERStat *er, ERStat *parent, ERStat *prev )
749749
}
750750

751751
// recursively walk the tree and filter (remove) regions using the callback classifier
752-
ERStat* ERFilterNM::er_tree_filter ( cv::InputArray image, ERStat * stat, ERStat *parent, ERStat *prev )
752+
ERStat* ERFilterNM::er_tree_filter ( InputArray image, ERStat * stat, ERStat *parent, ERStat *prev )
753753
{
754754
Mat src = image.getMat();
755755
// assert correct image type
@@ -820,7 +820,7 @@ ERStat* ERFilterNM::er_tree_filter ( cv::InputArray image, ERStat * stat, ERStat
820820
{
821821

822822
vector<Point> hull;
823-
cv::convexHull(contours[0], hull, false);
823+
convexHull(contours[0], hull, false);
824824
hull_area = (int)contourArea(hull);
825825
}
826826

@@ -1072,7 +1072,7 @@ double ERClassifierNM2::eval(const ERStat& stat)
10721072
\param nonMaxSuppression Whenever non-maximum suppression is done over the branch probabilities
10731073
\param minProbability The minimum probability difference between local maxima and local minima ERs
10741074
*/
1075-
Ptr<ERFilter> createERFilterNM1(const cv::Ptr<ERFilter::Callback>& cb, int thresholdDelta,
1075+
Ptr<ERFilter> createERFilterNM1(const Ptr<ERFilter::Callback>& cb, int thresholdDelta,
10761076
float minArea, float maxArea, float minProbability,
10771077
bool nonMaxSuppression, float minProbabilityDiff)
10781078
{
@@ -1111,7 +1111,7 @@ Ptr<ERFilter> createERFilterNM1(const cv::Ptr<ERFilter::Callback>& cb, int thres
11111111
if omitted tries to load a default classifier from file trained_classifierNM2.xml
11121112
\param minProbability The minimum probability P(er|character) allowed for retreived ER's
11131113
*/
1114-
Ptr<ERFilter> createERFilterNM2(const cv::Ptr<ERFilter::Callback>& cb, float minProbability)
1114+
Ptr<ERFilter> createERFilterNM2(const Ptr<ERFilter::Callback>& cb, float minProbability)
11151115
{
11161116

11171117
CV_Assert( (minProbability >= 0.) && (minProbability <= 1.) );

0 commit comments

Comments
 (0)