SpeedOfSpin
SpeedOfSpin

Reputation: 1690

I have a camera outputting RGB565 format but colours are all wrong

I have a small CMOS sensor (OV7670) which outputs raw pixel data in the RGB565 format. If I view an image I can make it out but the colours are wrong and I am not sure why.

The raw file is here.

This is what the raw file looks like when I view it on RawPixels Online Viewer

This is what the image looks like

and the image below is what it should look like

enter image description here

Any ideas?

Upvotes: 0

Views: 1307

Answers (1)

Pavel P
Pavel P

Reputation: 16843

Your raw file is corrupt. Send exact image. It doesn't look like it's R565. Everything about it wrong.

  • You didn't even say what dimensions. File size is 800001, this cannot be, as sizes should be even.
  • Since it's solid color blocks R565 would look like representative pairs of bytes. In you raw image it doesn't look like it at all: {ef 9f 87, ef 9f 87, ...} This is supposed to be the first stripe and it cannot be white.
  • At the bottom of the image are only NULLs, sample wasn't taken properly.
  • It looks like line size of the buffer is 1280 bytes. E.g. it could be 640 pixels wide if it were r565 and 625 pixes in height. With that I do not get anything as you show.

If I look at it as 640x625 R565 I get this:

enter image description here

Upvotes: 1

Related Questions