Yuv = image.rgb_to_yuv(pix) OSError

Dear OpenMV

I am trying to extract YUV from the image using “yuv = image.rgb_to_yuv(pix)”
If the image is QVGA everything is fine.

But if the image is VGA, then I get “OSErorr not enough positional arguments”.

There is any workaround to get YUV conversion work for VGA as well ???

Thank you

dear friend will help if you post the line that gives you the error.

yuv = image.rgb_to_yuv(pix)

Slight advance,

When the image is QVGA the img.get_pixel() returns a tuple with three elements. great
When the image is VGA the img.get_pixel() returns only one element !!!?!!


What can I do to have the RGB tuple for VGA as well ???

Please help


pix = img.get_pixel(10, 10)


pix = img.get_pixel(10, 10, rgbtuple=True)

Now it is ok.

Thank you gang

1 Like

It’s because the image changes to BAYER in the background to fit the VGA size. It’s not RGB565 anymore.

1 Like