logo

请问这个摄像头初始化的问题怎么解决?我对准强光镜头是一个效果,背光是另一种效果,有时候镜头会整体偏向一种颜色怎么调稳定

2021-10-16 11:02
F
r1nw

阈值一直用的官方给的

red_threshold = ((30, 100, 15, 127, 15, 127)) # generic_red_thresholds

green_threshold = (30, 70, -128, -20, -128, 127) # generic_green_thresholds

blue_threshold = (0, 15, 0, 40, -80, -20) # generic_blue_thresholds

sensor.reset()

sensor.set_pixformat(sensor.RGB565)

sensor.set_framesize(sensor.VGA)

sensor.skip_frames(time = 3000)

sensor.set_auto_gain(False)

sensor.set_auto_whitebal(False)

clock = time.clock()

vindown()

ctr.work_mode=0x00

ctr.work_mode2=0x00

s1.pulse_width(1550)

s2.pulse_width(1650)

servo_color_flag = 0

2021-10-17 20:29
I
网红小智智 星瞳科技

阈值与设置摄像头的参数无关。

你的代码是,最开始的3秒,自动设置摄像头的白平衡和增益,然后关闭摄像头的白平衡和增益。

如果像一开始就手动设置,可以用这个代码:https://book.openmv.cc/example/21-Sensor-Control/sensor-exposure-control.html