False RGB data detection

Which Khadas SBC do you use?


Which system do you use? Android, Ubuntu, OOWOW or others?


Which version of system do you use? Khadas official images, self built images, or others?

**Self Build Images**

Please describe your issue below:

`Hello Team,

We are working on a application where we want to detect the color on the screen which is HDMI out from Khadas. We are using a black and white image where black color is in the left half and white color in the right half. The image resolution is 1920 x 1080. If we check the value of the pixel independently in windows system it is showing (0,0,0,) for Black and (255,255,255) for White which is expected and correct. But when we check the data of the same image through our firmware, the value we get for white are (8080eb in Hex) which in RGB format is (128,128,235) and for Black are (808010 in Hex) which in RGB format is (128,128,16) which is not the expected result. Ideally for white it should be somewhat near to (ebebeb) for white and (101010)for black.

To verify our assumption, we tried with another image with other colors and we did not get the correct RGB values of the image. We are using Khadas VIM3. Is there any parameter or setting which can affect the capability of Khadas VIM3 to correctly get RGB values of any image?


Hello @Dhruvil_Patel,

how are you detecting the colors, can you provide more information ?

Is it through an app or detecting the video output of HDMI ?

We are detecting the colours by 2 methods.

  1. By taking the screenshots and then checking the RGB value from colour pop. Where we get the ideal values.

  2. We chech the data in Vivado using ILA from FPGA, which is connected through HDMI. Here we are getting the error value.

Is it consistently recorded same in both applications ?

Yes. The same data is recorded consistently in both the applications.

maybe you are reading the HDMI value as RGB instead of YUV which is what HDMI uses to transfer video data.

Thanks for the suggestion, we got our the problem. We were sending RGB format while we were reading in YUVformat.

1 Like