@kidswong999 谢谢,我试一下
U
ug4p 发布的帖子
-
lab转RGB函数报错lab_to_rgb()
def colorfunc():
img = sensor.snapshot() # Take a picture and return the image.
statistics=img.get_statistics(roi=ROI)
color_l=statistics.l_mode()
color_a=statistics.a_mode()
color_b=statistics.b_mode()
print(color_l,color_a,color_b)
rgb=img.lab_to_rgb(color_l,color_a,color_b)
print(rgb)
img.draw_rectangle(ROI) -
用Image.get_pixel函数,不同颜色返回的RGB为同一值 ,返回值均为255,255,255
img = sensor.snapshot() img = img.to_rgb565() img.draw_cross(160,120) rgb=img.get_pixel(160,120) print(rgb)