Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

haarcascade face detection for loop

In implementing haarcascade for face detection , after reading video file the following loop is used .

I need explanation on how it works for exmaple what is the meaning of

faces[i].x+faces[i].width, faces[i].y+faces[i].height

face_cascade.detectMultiScale(gray_img, faces, 1.1, 5, CV_HAAR_SCALE_IMAGE | CV_HAAR_DO_CANNY_PRUNING, cvSize(0,0), cvSize(300,300)); for(int i=0; i < faces.size();i++) { Point pt1(faces[i].x+faces[i].width, faces[i].y+faces[i].height); Point pt2(faces[i].x,faces[i].y);

    rectangle(cap_img, pt1, pt2, cvScalar(0,255,0), 2, 8, 0);
}

Thanks for help

haarcascade face detection for loop

In implementing haarcascade for face detection , after reading video file the following loop is used .

I need explanation on how it works for exmaple what is the meaning of

faces[i].x+faces[i].width, faces[i].y+faces[i].height

face_cascade.detectMultiScale(gray_img, faces, 1.1, 5, CV_HAAR_SCALE_IMAGE |  CV_HAAR_DO_CANNY_PRUNING, cvSize(0,0), cvSize(300,300));
     for(int i=0; i < faces.size();i++)
     {
        Point pt1(faces[i].x+faces[i].width, faces[i].y+faces[i].height);
       Point pt2(faces[i].x,faces[i].y);

 Point pt2(faces[i].x,faces[i].y);

    rectangle(cap_img, pt1, pt2, cvScalar(0,255,0), 2, 8, 0);
 }

Thanks for help