例程讲解05-Snapshot->emboss_snapshot
import sensor, image, pyb
RED_LED_PIN = 1
BLUE_LED_PIN = 3
sensor.reset()
sensor.set_pixformat(sensor.RGB565)
sensor.set_framesize(sensor.QVGA)
sensor.skip_frames(time = 2000)
pyb.LED(RED_LED_PIN).on()
sensor.skip_frames(time = 2000)
pyb.LED(RED_LED_PIN).off()
pyb.LED(BLUE_LED_PIN).on()
print("You're on camera!")
img = sensor.snapshot()
img.morph(1, [+2, +1, +0,\
+1, +1, -1,\
+0, -1, -2])
img.save("example.jpg")
pyb.LED(BLUE_LED_PIN).off()
print("Done! Reset the camera to see the saved image.")
星瞳科技OpenMV官方中文文档函数讲解: