I'm using OpenCV's har cascade face detector in python.
For example:
faces = cv.HaarDetectObjects(grayscale, cascade, storage, 1.2, 2,
cv.CV_HAAR_DO_CANNY_PRUNING, (50,50))
for f in faces:
print(f)
This will print a list of detections in this form:
((174, 54, 114, 114), 53)
((22, 51, 121, 121), 36)
((321, 56, 114, 114), 21)
((173, 263, 125, 125), 51)
((323, 272, 114, 114), 20)
((26, 271, 121, 121), 36)
Where each line represents a detection. The first 4 numbers are the x,y location of the top-left point, and the height, width of the bounding box. The last number is (quoting from the OpenCV documentation) the number of neighbors.
I guess I have two questions:
1) What does the last number mean? I couldn't find any reference to that when googling.
2) (more important)Is there a way to get a confidence score for each detection? How much is the face classifier certain that the detection corresponds to a real face?
Thanks