![]() # We add to the graph two filters: one is a source filter corresponding to the first camera connected to your PC, # the second is the default render, that shows the images from the camera in a window on the screen. ![]() # This code shows a screen with the live image from the first camera in your PC. Print( f"Image s, press ENTER to terminate.") now() - start_time image_file_name = path. Global start_time capture_time = datetime. OUTPUT_FOLDER = r"C:\test\\" CAMERA_INDEX = 0 # Using first camera found global start_time def capture_photos_loop( event_): dshow_graph import FilterGraph from os import path PAUSE_BETWEEN_CAPTURE = 1 # 1 sec. # Captures a frame from the first camera found on your computer every second and saves it to a file import cv2 from datetime import datetime from threading import Event, Thread from pygrabber.
0 Comments
Leave a Reply. |