if len(faces) > 0:
    print('=> ' + str(len(faces)) + ' face detected!')
for (x, y, width, height), n in faces:
    pt1 = x, y
pt2 = x + width, y + height
cv.Rectangle(image, pt1, pt2, cv.RGB(255, 0, 0), 3, 8, 0)
if __name__ == '__main__':
    filename = sys.argv[1]
image = cv.LoadImage(filename, cv.CV_LOAD_IMAGE_COLOR)
detect_face(image)
cv.ShowImage('cam', image)
cv.WaitKey(0)
Classifiers confidence in opencv face detector