import time

import cv2
from PIL import Image


def main():
    print("Initializing......")

    cap = cv2.VideoCapture(0)
    num = 10
    for i in range(num):
        # Capture frame-by-frame
        ret, numpy_image = cap.read()
        img = Image.fromarray(numpy_image, 'RGB')
        img.show()


    cap.release()

if __name__ == "__main__":
    main()
