take_face_data.py
def recognize_face(frame_orginal, faces):
    """
    recognize human faces using LBPH features
    Args:
        frame_orginal:
        faces:
    Returns:
        label of predicted person
    """
    predict_label = []
    predict_conf = []
    for x, y, w, h in faces:
        frame_orginal_grayscale = cv2.cvtColor(frame_orginal[y: y + h, x: x + w], cv2.COLOR_BGR2GRAY)
        cv2.imshow("cropped", frame_orginal_grayscale)
        predict_tuple = recognizer.predict(frame_orginal_grayscale)
        a, b = predict_tuple
        predict_label.append(a)
        predict_conf.append(b)
        print("Predition label, confidence: " + str(predict_tuple))
    return predict_label

    recognize human faces using LBPH features
    Args:
        frame_orginal:
        faces:
    Returns:
        label of predicted person
    
recognize human faces using LBPH features
recognize human faces using LBPH features
def recognize_face(frame_orginal, faces):
    predict_label = []
    predict_conf = []
    for x, y, w, h in faces:
        frame_orginal_grayscale = cv2.cvtColor(frame_orginal[y: y + h, x: x + w], cv2.COLOR_BGR2GRAY)
        cv2.imshow("cropped", frame_orginal_grayscale)
        predict_tuple = recognizer.predict(frame_orginal_grayscale)
        a, b = predict_tuple
        predict_label.append(a)
        predict_conf.append(b)
        print("Predition label, confidence: " + str(predict_tuple))
    return predict_label
def recognize_face ( frame_orginal , faces ) : predict_label = [ ] predict_conf = [ ] for x , y , w , h in faces : frame_orginal_grayscale = cv2 . cvtColor ( frame_orginal [ y : y + h , x : x + w ] , cv2 . COLOR_BGR2GRAY ) cv2 . imshow ( "cropped" , frame_orginal_grayscale ) predict_tuple = recognizer . predict ( frame_orginal_grayscale ) a , b = predict_tuple predict_label . append ( a ) predict_conf . append ( b ) print ( "Predition label, confidence: " + str ( predict_tuple ) ) return predict_label
recognize human faces using LBPH features
recognize human faces using LBPH features
"""
    recognize human faces using LBPH features
    Args:
        frame_orginal:
        faces:
    Returns:
        label of predicted person
    """
label of predicted person
label of predicted person
frame_orginal
None
faces
None