85 m_pCascade = (CvHaarClassifierCascade *) cvLoad(pCascadePath, 0, 0, 0);
101 const CvSeq *pFaces = cvHaarDetectObjects(pIplImage,
m_pCascade,
m_pStorage, 1.3, 3, CV_HAAR_DO_CANNY_PRUNING, cvSize(40, 40));
102 const int nFaces = pFaces ? pFaces->total : 0;
104 for (
int i = 0; i < nFaces; i++)
106 CvRect*
r = (CvRect *) cvGetSeqElem(pFaces, i);
111 region.
max_x = r->x + r->width;
112 region.
max_y = r->y + r->height;
114 regionList.push_back(region);
117 cvReleaseImageHeader(&pIplImage);
CvHaarClassifierCascade * m_pCascade
int Find(CByteImage *pImage, RegionList ®ionList)
Data structure for the representation of 8-bit grayscale images and 24-bit RGB (or HSV) color images ...
bool Init(const char *pCascadeFilePath)
std::vector< MyRegion > RegionList
CvMemStorage * m_pStorage
GLdouble GLdouble GLdouble r
IplImage * Adapt(const CByteImage *pImage, bool bAllocateMemory=false)
Converts a CByteImage to an IplImage.