用户询问:PAG7936分辨率怎么设置为1200*800
该问题涉及 OpenMV 摄像头所使用的图像传感器 PAG7936,用户希望将其输出分辨率配置为 1200×800。
使用高分辨率,然后使用set_windowing(1200,800)开一个指定大小的框
打开自动增益,同时关闭自动曝光,如何设置?两者冲突吗?我关闭自动曝光后,打不开自动增益。板子为N6
可以使用SXGA的分辨率:sensor — 相机传感器 — MicroPython 1.22 文档
import sensor,time
# 初始化摄像头
sensor.reset()
sensor.set_pixformat(sensor.RGB565) # 或 sensor.GRAYSCALE
sensor.set_framesize(sensor.VGA) # 设置图像分辨率
sensor.set_auto_exposure(False, exposure_us=10000)
sensor.set_auto_gain(False, gain_db=10)
clock = time.clock() # Create a clock object to track the FPS.
while True:
clock.tick() # Update the FPS clock.
img = sensor.snapshot() # Take a picture and return the image.
print(clock.fps()) # Note: OpenMV Cam runs about half as fast when connected
# to the IDE. The FPS should increase once disconnected.
此代码是手动设置增益和曝光的代码,具体参考:sensor — 相机传感器 — MicroPython 1.22 文档
关闭自动曝光+开启自动增益,不冲突吧?
不冲突