File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -159,7 +159,7 @@ class CV_EXPORTS_W ERFilter : public Algorithm
159
159
virtual void setMinProbability (float minProbability) = 0;
160
160
virtual void setMinProbabilityDiff (float minProbabilityDiff) = 0;
161
161
virtual void setNonMaxSuppression (bool nonMaxSuppression) = 0;
162
- virtual int getNumRejected () = 0;
162
+ virtual int getNumRejected () const = 0;
163
163
};
164
164
165
165
Original file line number Diff line number Diff line change @@ -145,7 +145,7 @@ class CV_EXPORTS ERFilterNM : public ERFilter
145
145
void setMinProbability (float minProbability) CV_OVERRIDE;
146
146
void setMinProbabilityDiff (float minProbabilityDiff) CV_OVERRIDE;
147
147
void setNonMaxSuppression (bool nonMaxSuppression) CV_OVERRIDE;
148
- int getNumRejected () CV_OVERRIDE;
148
+ int getNumRejected () const CV_OVERRIDE;
149
149
150
150
private:
151
151
// pointer to the input/output regions vector
@@ -223,6 +223,8 @@ ERFilterNM::ERFilterNM()
223
223
// input/output for the second one.
224
224
void ERFilterNM::run ( InputArray image, vector<ERStat>& _regions )
225
225
{
226
+ num_rejected_regions=0 ;
227
+ num_accepted_regions=0 ;
226
228
227
229
// assert correct image type
228
230
CV_Assert ( image.getMat ().type () == CV_8UC1 );
@@ -999,7 +1001,7 @@ void ERFilterNM::setNonMaxSuppression(bool _nonMaxSuppression)
999
1001
return ;
1000
1002
}
1001
1003
1002
- int ERFilterNM::getNumRejected ()
1004
+ int ERFilterNM::getNumRejected () const
1003
1005
{
1004
1006
return num_rejected_regions;
1005
1007
}
You can’t perform that action at this time.
0 commit comments