I am trying to build a face detection application in python using opencv.
Please see below for my code snippets:
# Loading the Haar Cascade Classifier
c
To get the number of faces it should be:
print "Number of faces found in-> ", img_fname, " are ", len(faces)
.
I would also recommend that to convert image to gray scale you should write:
gray = cv2.cvtColor(im, cv2.COLOR_BGR2GRAY)
instead of gray = cv2.cvtColor(im, cv2.COLOR_RGB2GRAY)
as color images are loaded by openCV in BGR mode.