Add a new variant of detectMultiScale with output arguments 'objects' and 'numDetections'; factor most of detectMultiScale's code into 2 protected methods

This commit is contained in:
Peter Minin
2013-06-14 04:25:17 +04:00
parent e16af9bdc9
commit 7d70399d72
3 changed files with 96 additions and 37 deletions

View File

@@ -149,6 +149,14 @@ public:
Size minSize = Size(),
Size maxSize = Size() );
CV_WRAP virtual void detectMultiScale( const Mat& image,
CV_OUT std::vector<Rect>& objects,
CV_OUT std::vector<int>& numDetections,
double scaleFactor=1.1,
int minNeighbors=3, int flags=0,
Size minSize=Size(),
Size maxSize=Size() );
CV_WRAP virtual void detectMultiScale( const Mat& image,
CV_OUT std::vector<Rect>& objects,
CV_OUT std::vector<int>& rejectLevels,
@@ -168,7 +176,12 @@ public:
protected:
virtual bool detectSingleScale( const Mat& image, int stripCount, Size processingRectSize,
int stripSize, int yStep, double factor, std::vector<Rect>& candidates,
std::vector<int>& rejectLevels, std::vector<double>& levelWeights, bool outputRejectLevels = false);
std::vector<int>& rejectLevels, std::vector<double>& levelWeights, bool outputRejectLevels = false );
virtual void detectMultiScaleNoGrouping( const Mat& image, std::vector<Rect>& candidates,
std::vector<int>& rejectLevels, std::vector<double>& levelWeights,
double scaleFactor, Size minObjectSize, Size maxObjectSize,
bool outputRejectLevels = false );
protected:
enum { BOOST = 0