Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

cv2.videocapture python set frame rate

#on efficient solution

frame_rate = 10
prev = 0

while capturing:

    time_elapsed = time.time() - prev
    res, image = cap.read()

    if time_elapsed > 1./frame_rate:
        prev = time.time()

        # Do something with your image here.
        process_image()
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #set #frame #rate
ADD COMMENT
Topic
Name
1+9 =