libface 0.2
|
00001 00033 #ifndef _FACEDETECT_H_ 00034 #define _FACEDETECT_H_ 00035 00036 #include "LibFaceCore.h" 00037 #include "LibFaceConfig.h" 00038 #include "LibFaceUtils.h" 00039 00040 namespace libface 00041 { 00042 00043 class FACEAPI FaceDetect : public LibFaceDetectCore 00044 { 00045 public: 00046 00054 FaceDetect(const std::string& cascadeDir); 00055 00059 ~FaceDetect(); 00060 00066 std::vector<Face>* detectFaces(const IplImage* inputImage, const CvSize& originalSize = cvSize(0,0)); 00067 00075 std::vector<Face>* detectFaces(const std::string& filename); 00076 00080 int accuracy() const; 00081 00085 void setAccuracy(int value); 00086 00091 static int getRecommendedImageSizeForDetection(); 00092 00093 private: 00094 00103 std::vector<Face>* cascadeResult(const IplImage* inputImage, CvHaarClassifierCascade* casc, CvSize faceSize = cvSize(10, 10)); 00104 00113 std::vector<Face> finalFaces(const IplImage*, std::vector< std::vector<Face> >, int maxdist, int mindups); 00114 00115 private: 00116 00117 class FaceDetectPriv; 00118 FaceDetectPriv* const d; 00119 }; 00120 00121 } // namespace libface 00122 00123 #endif /* _FACEDETECT_H_ */