00001 /* 00002 * Copyright (C) Massimo Cora' 2005 <maxcvs@email.it> 00003 * 00004 * This program is free software; you can redistribute it and/or modify 00005 * it under the terms of the GNU General Public License as published by 00006 * the Free Software Foundation; either version 2 of the License, or 00007 * (at your option) any later version. 00008 * 00009 * This program is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 * GNU General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU General Public License 00015 * along with this program; if not, write to the Free Software 00016 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00017 */ 00018 00019 00020 #ifndef __HAAR_FACE_DETECTING_H__ 00021 #define __HAAR_FACE_DETECTING_H__ 00022 00023 #include "OmniConfig.hh" 00024 #include "OmniFaceDetecting.hh" 00025 00031 class HaarFaceDetecting : public OmniFaceDetecting { 00032 public: 00033 00042 HaarFaceDetecting( const char** cascade_file_array, int array_length, 00043 int min_size_x = 40, int min_size_y = 40 ); 00044 virtual ~HaarFaceDetecting(); 00045 00050 bool is_ready_to_detect(); 00051 00057 bool face_detected( IplImage *image, CvPoint *face_center ); 00058 00059 private: 00060 00062 CvMemStorage* _storage; 00063 00065 CvHaarClassifierCascade** _cascade_array; 00066 int _cascade_array_length; 00067 int _min_size_x; 00068 int _min_size_y; 00069 }; 00070 00071 #endif 00072 00073