📜  cv2.videocapture python 设置帧率 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:31.416000             🧑  作者: Mango

代码示例1
#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()