title: Classifiers confidence in opencv face detector
body: <p>I'm using opencv's har cascade face detector (cv.HaarDetectObjects) in python.</p>
  
  <p>for example:</p>
  
  <pre><code>    faces = cv.HaarDetectObjects(grayscale, cascade, storage, 1.2, 2,
      cv.CV_HAAR_DO_CANNY_PRUNING, (50,50))
  
         for f in faces:
             print(f)
  </code></pre>
  
  <p>This will print a list of detections in this form:</p>
  
  <pre><code> ((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)
  </code></pre>
  
  <p>Where each line represent 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.</p>
  
  <p>I guess I have two questions:</p>
  
  <p>1) What does the last number mean? I couldn't find any reference to that when googling.</p>
  
  <p>2) (<strong>more important</strong>)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? </p>
  
  <p>Thanks</p>