RGB565 to RGB888?

Greetings, question regarding color resolution. The sensor is RGB565, but the graphical stats provided in the IDE are RGB888. How are these RGB888 numbers calculated? How is that extra 8b of information estimated? If there is a good article discussing this, please send it my way.

Related question, I see that get_stats() reports in terms of LAB, is there a way to (easily) get the same information direct in RGB? Or do I need to use the LAB to RGB888 conversion function for each statistic of interest? Of course the same question as above applies.

Last question, has a 24b color sensor been tested on any of the openmv platforms?

Thanks for the help!


Hi, our color conversion stuff is lacking.

Anyway, the conversation is done using a LUT. See the util scripts in the OpenMV GitHub for the code that generates the LUTs. It’s on the top level of the OpenMV GitHub repo under util scripts.

Thanks. If I use the get_pixel() command with a bayer format, is a 10b value returned? My understanding is that the sensor has 10ADCs per pixel, but after interpolation, RGB565 results.

Ultimately I don’t care too much about absolute color conversion - I’ll be using a LUT developed from known colors imaged with the OpenMV platform - but I want to be sure that I get the most resolution possible, and that any conversions (to LAB or otherwise) aren’t adding noise.

Do you know if a 24b color sensor has ever been tested using the openmv platform?

If you want 10b per pixel RAW you’ll need to mess with the cameras register settings. It can output that. However, once you do this the byte size of the image will be different from what our code expects so you’ll need to modify the C code.

Um, the OmniVision cameras don’t output 24 bits per pixel for RGB. The only way to get that is to work on the RAW Bayer image. The normal Bayer output we support is 8 bits per pixel.

No you get 8 bits per pixel (R, G or B depending on the pixel position and the CFA).

Not as far as we know.

Thanks guys