Commit aaf46f1c authored by Alexander Alekhin's avatar Alexander Alekhin

Merge pull request #1895 from alalek:issue_1882

parents a97a0612 33e35c08
...@@ -159,7 +159,7 @@ public: ...@@ -159,7 +159,7 @@ public:
virtual void setMinProbability(float minProbability) = 0; virtual void setMinProbability(float minProbability) = 0;
virtual void setMinProbabilityDiff(float minProbabilityDiff) = 0; virtual void setMinProbabilityDiff(float minProbabilityDiff) = 0;
virtual void setNonMaxSuppression(bool nonMaxSuppression) = 0; virtual void setNonMaxSuppression(bool nonMaxSuppression) = 0;
virtual int getNumRejected() = 0; virtual int getNumRejected() const = 0;
}; };
......
...@@ -145,7 +145,7 @@ public: ...@@ -145,7 +145,7 @@ public:
void setMinProbability(float minProbability) CV_OVERRIDE; void setMinProbability(float minProbability) CV_OVERRIDE;
void setMinProbabilityDiff(float minProbabilityDiff) CV_OVERRIDE; void setMinProbabilityDiff(float minProbabilityDiff) CV_OVERRIDE;
void setNonMaxSuppression(bool nonMaxSuppression) CV_OVERRIDE; void setNonMaxSuppression(bool nonMaxSuppression) CV_OVERRIDE;
int getNumRejected() CV_OVERRIDE; int getNumRejected() const CV_OVERRIDE;
private: private:
// pointer to the input/output regions vector // pointer to the input/output regions vector
...@@ -223,6 +223,8 @@ ERFilterNM::ERFilterNM() ...@@ -223,6 +223,8 @@ ERFilterNM::ERFilterNM()
// input/output for the second one. // input/output for the second one.
void ERFilterNM::run( InputArray image, vector<ERStat>& _regions ) void ERFilterNM::run( InputArray image, vector<ERStat>& _regions )
{ {
num_rejected_regions=0;
num_accepted_regions=0;
// assert correct image type // assert correct image type
CV_Assert( image.getMat().type() == CV_8UC1 ); CV_Assert( image.getMat().type() == CV_8UC1 );
...@@ -999,7 +1001,7 @@ void ERFilterNM::setNonMaxSuppression(bool _nonMaxSuppression) ...@@ -999,7 +1001,7 @@ void ERFilterNM::setNonMaxSuppression(bool _nonMaxSuppression)
return; return;
} }
int ERFilterNM::getNumRejected() int ERFilterNM::getNumRejected() const
{ {
return num_rejected_regions; return num_rejected_regions;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment