if (face_cascade.load ("haarcascade_frontalface_alt2.xml"))
{
source_image_gray = imread (input_filename, CV_LOAD_IMAGE_GRAYSCALE);
if (!source_image_gray.empty())
{
equalizeHist (source_image_gray, source_image_gray);
min_neighbors = 10;
face_cascade.detectMultiScale (source_image_gray, face, scale_factor, min_neighbors, CV_HAAR_FIND_BIGGEST_OBJECT);
if (face.size() > 0)
{
printf ("Face found at (%d, %d) to (%d, %d)\n", face.x, face.y, face.x + face.width, face.y + face.height);
}
}
}
Spring 2016, CS-161:
Lectures
Assignments:
Programs: