import imutils

def camer():
    import cv2

    # Load the cascade
    face_cascade = cv2.CascadeClassifier('haarcascade_frontalface_default.xml')

    # To capture video from webcam.
    cap = cv2.VideoCapture(0)

    while True:
        # Read the frame
        _, img = cap.read()
        img=imutils.resize(img, width=400)
        # Convert to grayscale
        gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)

        # Detect the faces
        faces = face_cascade.detectMultiScale(gray, 1.3, 5, minSize=(30, 30),flags = cv2.CASCADE_SCALE_IMAGE)

        # Draw the rectangle around each face
        for (x, y, w, h) in faces:
            cv2.rectangle(gray, (x, y), (x + w, y + h), (10,159,255), 1)


        # Display
        cv2.namedWindow('cam check', cv2.WINDOW_KEEPRATIO)
        cv2.imshow('cam check', gray)
        cv2.resizeWindow('cam check',300,300)

        # Stop if escape key is pressed
        if cv2.waitKey(1) & 0xFF == ord('q'):
            break

    # Release the VideoCapture object
    cap.release()
    cv2.destroyAllWindows()

35c9406b6bc3dd9eefa417d10903864daa465250
<mask token>

<mask token>


def camer():
    import cv2
    face_cascade = cv2.CascadeClassifier('haarcascade_frontalface_default.xml')
    cap = cv2.VideoCapture(0)
    while True:
        _, img = cap.read()
        img = imutils.resize(img, width=400)
        gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
        faces = face_cascade.detectMultiScale(gray, 1.3, 5, minSize=(30, 30
            ), flags=cv2.CASCADE_SCALE_IMAGE)
        for x, y, w, h in faces:
            cv2.rectangle(gray, (x, y), (x + w, y + h), (10, 159, 255), 1)
        cv2.namedWindow('cam check', cv2.WINDOW_KEEPRATIO)
        cv2.imshow('cam check', gray)
        cv2.resizeWindow('cam check', 300, 300)
        if cv2.waitKey(1) & 255 == ord('q'):
            break
    cap.release()
    cv2.destroyAllWindows()

import imutils


def camer():
    import cv2
    face_cascade = cv2.CascadeClassifier('haarcascade_frontalface_default.xml')
    cap = cv2.VideoCapture(0)
    while True:
        _, img = cap.read()
        img = imutils.resize(img, width=400)
        gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
        faces = face_cascade.detectMultiScale(gray, 1.3, 5, minSize=(30, 30
            ), flags=cv2.CASCADE_SCALE_IMAGE)
        for x, y, w, h in faces:
            cv2.rectangle(gray, (x, y), (x + w, y + h), (10, 159, 255), 1)
        cv2.namedWindow('cam check', cv2.WINDOW_KEEPRATIO)
        cv2.imshow('cam check', gray)
        cv2.resizeWindow('cam check', 300, 300)
        if cv2.waitKey(1) & 255 == ord('q'):
            break
    cap.release()
    cv2.destroyAllWindows()

import imutils

def camer():
    import cv2

    # Load the cascade
    face_cascade = cv2.CascadeClassifier('haarcascade_frontalface_default.xml')

    # To capture video from webcam.
    cap = cv2.VideoCapture(0)

    while True:
        # Read the frame
        _, img = cap.read()
        img=imutils.resize(img, width=400)
        # Convert to grayscale
        gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)

        # Detect the faces
        faces = face_cascade.detectMultiScale(gray, 1.3, 5, minSize=(30, 30),flags = cv2.CASCADE_SCALE_IMAGE)

        # Draw the rectangle around each face
        for (x, y, w, h) in faces:
            cv2.rectangle(gray, (x, y), (x + w, y + h), (10,159,255), 1)


        # Display
        cv2.namedWindow('cam check', cv2.WINDOW_KEEPRATIO)
        cv2.imshow('cam check', gray)
        cv2.resizeWindow('cam check',300,300)

        # Stop if escape key is pressed
        if cv2.waitKey(1) & 0xFF == ord('q'):
            break

    # Release the VideoCapture object
    cap.release()
    cv2.destroyAllWindows()
