logo

彩色会报错,只能显示灰色

2024-07-21 23:22
L
ybh6
import sensor#引入感光元件的模块

# 设置摄像头
sensor.reset()#初始化感光元件
sensor.set_pixformat(sensor.RGB565)#设置为彩色
sensor.set_framesize(sensor.QVGA)#设置图像的大小
sensor.skip_frames()#跳过n张照片,在更改设置后,跳过一些帧,等待感光元件变稳定。

# 一直拍照
while(True):
    img = sensor.snapshot()#拍摄一张照片,img为一个image对象
2024-07-22 20:50
I
网红小智智 星瞳科技

提供具体的硬件型号,固件版本。报错提示。