错误:AttributeError: 'Image' object has no attribute 'to_rgb'
img=img.to_grayscale()
img=img.to_rgb()
https://docs.singtown.com/micropython/zh/latest/openmvcam/library/omv.image.html#image.Image.image.to_rgb565
是to_rgb565而不是to_rgb