mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
21 lines
356 B
Python
21 lines
356 B
Python
import sensor, time
|
|
|
|
sensor.reset()
|
|
|
|
# Set sensor parameters
|
|
sensor.set_brightness(-2)
|
|
sensor.set_contrast(1)
|
|
#sensor.set_gainceiling(5)
|
|
|
|
# Set sensor pixel format
|
|
sensor.set_framesize(sensor.QVGA)
|
|
sensor.set_pixformat(sensor.JPEG)
|
|
sensor.set_quality(98)
|
|
|
|
clock = time.clock()
|
|
|
|
while (True):
|
|
clock.tick()
|
|
image = sensor.snapshot()
|
|
print(clock.fps())
|