stream raw8 to rgb24 or yuy2 with cx3

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
alca_3937256
Level 2
Level 2

Hi, i am currently able to capture frames from a toshiba csi-2 bridge. The data sent is in mono8, so the value are between 0-255 and represent a gray value. Is there any way to convert it to a rgb or yuy2 value so it can be streamed by uvc and played by any uvc viewer ?

ex. a value of 126 will be (126,126,126) in rgb. It can also be it any format as long that it recognized by uvc standard.

The image format is 320x240 at 30 fps. So an image is 320*240*8 = 76800 bytes. I guest that the data input should be in raw8 and the output in 24 bit, but then ? do i just need to change the guid in the usb descriptor ? If yes, how can i do that ?

Best regards

Thank you

0 Likes
1 Solution
Hemanth
Moderator
Moderator
Moderator
First like given First question asked 750 replies posted

Hi,

Let the output video format chosen in CX3 configuration tool be 8-bit.

But in the firmware, make the GPIF bus width as 16 (using GpifLoad() API) (With this setting, for every byte sent by MIPI block of CX3 to GPIF, CX3 will be sampling one extra byte which is not driven by MIPI block and is 0x00)

Along with this you have to make changes to Descriptor file(format, bits/pixel), rx payload size in probe control structure.

Regards,

Hemanth

Hemanth

View solution in original post

4 Replies
Hemanth
Moderator
Moderator
Moderator
First like given First question asked 750 replies posted

Hi,

- RAW to RGB conversion can't be made in CX3. It has to be done in the Host side application.

- The output format of 24 bit that you have mentioned is not related to RGB. It just means that the image data that is received from MIPI block of CX3 will be supplied to GPIF block at the of 3 bytes/GPIF parallel clock.

Regards,

Hemanth

Hemanth
0 Likes

from the a document of cypress:

Note: Although a monochrome image is not supported as a part of the UVC specification, an 8-bit monochrome image can be represented in the YUY2 format by using the 8-bit RAW data as the Y value and setting all the U and V values to 0x80.

This is exactly what i want do to. Is there any way to do this ? I cannot change the current raw8 format of the camera and my customers need to use UVC.

0 Likes
Hemanth
Moderator
Moderator
Moderator
First like given First question asked 750 replies posted

Hi,

It is possible to make U and V as 0x00 but not 0x80.

And also the note says:

It should be handled by image sensor/ISP.

But if it is okay to make 0x00 for U and V then we can achieve it only with CX3.

Regards,

Hemanth

Hemanth
0 Likes
Hemanth
Moderator
Moderator
Moderator
First like given First question asked 750 replies posted

Hi,

Let the output video format chosen in CX3 configuration tool be 8-bit.

But in the firmware, make the GPIF bus width as 16 (using GpifLoad() API) (With this setting, for every byte sent by MIPI block of CX3 to GPIF, CX3 will be sampling one extra byte which is not driven by MIPI block and is 0x00)

Along with this you have to make changes to Descriptor file(format, bits/pixel), rx payload size in probe control structure.

Regards,

Hemanth

Hemanth