import sensor, image, time
sensor.reset()
sensor.set_pixformat(sensor.GRAYSCALE) # or RGB565.
sensor.set_framesize(sensor.QVGA)
sensor.skip_frames(time = 2000)
sensor.set_auto_gain(False) # must be turned off for color tracking
sensor.set_auto_whitebal(False) # must be turned off for color tracking
clock = time.clock()
#threshold =[42, 66, -29, 7, 3, 38]
while(True):
clock.tick()
img = sensor.snapshot()
histogram = img.get_histogram()#得到直方图
Thresholds = histogram.get_threshold()#得到最佳阈值
l = Thresholds.l_value()
a = Thresholds.a_value()
b = Thresholds.b_value()
print(Thresholds)也就是这个程序没有报错,但却不能正常运行:worried_face:
我运行这个代码,没有错误。
请提供硬件版本,固件版本,IDE版本。