From fb0b25692e9655883b0c73ccb2f6470eff7af868 Mon Sep 17 00:00:00 2001 From: Alexey Kazakov Date: Fri, 22 Apr 2011 11:21:40 +0000 Subject: [PATCH] A little fix in haar cascade --- .../include/opencv2/objdetect/objdetect.hpp | 23 +++++++++++++------ modules/objdetect/src/haar.cpp | 2 +- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/modules/objdetect/include/opencv2/objdetect/objdetect.hpp b/modules/objdetect/include/opencv2/objdetect/objdetect.hpp index ed60a1b79..cc0e85c61 100644 --- a/modules/objdetect/include/opencv2/objdetect/objdetect.hpp +++ b/modules/objdetect/include/opencv2/objdetect/objdetect.hpp @@ -125,13 +125,14 @@ CVAPI(void) cvReleaseHaarClassifierCascade( CvHaarClassifierCascade** cascade ); #define CV_HAAR_FIND_BIGGEST_OBJECT 4 #define CV_HAAR_DO_ROUGH_SEARCH 8 -CVAPI(CvSeq*) cvHaarDetectObjectsForROC( const CvArr* image, - CvHaarClassifierCascade* cascade, CvMemStorage* storage, - std::vector& rejectLevels, std::vector& levelWeightds, - double scale_factor CV_DEFAULT(1.1), - int min_neighbors CV_DEFAULT(3), int flags CV_DEFAULT(0), - CvSize min_size CV_DEFAULT(cvSize(0,0)), CvSize max_size CV_DEFAULT(cvSize(0,0)), - bool outputRejectLevels = false ); +//CVAPI(CvSeq*) cvHaarDetectObjectsForROC( const CvArr* image, +// CvHaarClassifierCascade* cascade, CvMemStorage* storage, +// CvSeq** rejectLevels, CvSeq** levelWeightds, +// double scale_factor CV_DEFAULT(1.1), +// int min_neighbors CV_DEFAULT(3), int flags CV_DEFAULT(0), +// CvSize min_size CV_DEFAULT(cvSize(0,0)), CvSize max_size CV_DEFAULT(cvSize(0,0)), +// bool outputRejectLevels = false ); + CVAPI(CvSeq*) cvHaarDetectObjects( const CvArr* image, CvHaarClassifierCascade* cascade, CvMemStorage* storage, @@ -276,6 +277,14 @@ CVAPI(CvSeq*) cvLatentSvmDetectObjects(IplImage* image, #ifdef __cplusplus } +CV_EXPORTS CvSeq* cvHaarDetectObjectsForROC( const CvArr* image, + CvHaarClassifierCascade* cascade, CvMemStorage* storage, + std::vector& rejectLevels, std::vector& levelWeightds, + double scale_factor CV_DEFAULT(1.1), + int min_neighbors CV_DEFAULT(3), int flags CV_DEFAULT(0), + CvSize min_size CV_DEFAULT(cvSize(0,0)), CvSize max_size CV_DEFAULT(cvSize(0,0)), + bool outputRejectLevels = false ); + namespace cv { diff --git a/modules/objdetect/src/haar.cpp b/modules/objdetect/src/haar.cpp index d0ec2cf83..80a172258 100644 --- a/modules/objdetect/src/haar.cpp +++ b/modules/objdetect/src/haar.cpp @@ -1011,7 +1011,7 @@ struct HaarDetectObjects_ScaleCascade_Invoker } -CV_IMPL CvSeq* +CvSeq* cvHaarDetectObjectsForROC( const CvArr* _img, CvHaarClassifierCascade* cascade, CvMemStorage* storage, std::vector& rejectLevels, std::vector& levelWeights,