logo

这个软件怎么可以隔一段时间自动保存图像❓

2023-04-13 10:37
H
yivh

这个软件怎么可以隔一段时间自动保存图像❓

2023-04-13 20:49
I
网红小智智 星瞳科技
import sensor, image, time

sensor.reset()                      # Reset and initialize the sensor.
sensor.set_pixformat(sensor.RGB565) # Set pixel format to RGB565 (or GRAYSCALE)
sensor.set_framesize(sensor.QVGA)   # Set frame size to QVGA (320x240)
sensor.skip_frames(time = 2000)     # Wait for settings take effect.
times = 0
while(True):
    img = sensor.snapshot()
    times += 1
    if times > 100:
        img.save("1.jpeg")
        times = 0