title: confidence of face recognition using opencv
body: <p>I tried to recognize faces using eugene face and Local Binary Pattern Histogram algorithms with OpenCV Python.The confidence level achieved with eugene face recognition was 2000,3000 etc. What should be the confidence level if the images were properly recognized ?</p>
  
  <pre><code>for image_path in image_paths:
   predict_image_pil = Image.open(image_path).convert('L')
   predict_image = np.array(predict_image_pil, 'uint8')
   faces = faceCascade.detectMultiScale(predict_image)
   for (x, y, w, h) in faces:
      nbr_predicted, conf = recognizer.predict(predict_image[y: y + h, x: x + w])
      nbr_actual = int(os.path.split(image_path)[1].split(".")[0].replace("subject", ""))
      if nbr_actual == nbr_predicted:
          print "{} is Correctly Recognized with confidence {}".format(nbr_actual, conf)
      else:
          print "{} is Incorrect Recognized as {}".format(nbr_actual,         nbr_predicted)
      cv2.imshow("Recognizing Face", predict_image[y: y + h, x: x + w])
  </code></pre>