这个软件怎么可以隔一段时间自动保存图像❓
-
这个软件怎么可以隔一段时间自动保存图像
-
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