From raw data to yuv

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

cross mob
nich_4171101
Level 3
Level 3
First like received

The Raw10 monochrome will output as YUV format. May I know how does the Raw10 monochrome data split into YUV format, as my understanding Y=8bit, U=8bit and V=8bit. Total = 24bit. The Raw10 data is 10 bit, Y can only store 8 bit the remaining 2 bit will go into U or V?

Regards,

Nigel

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

Hi Nigel,

Conversion can't be done in FX3.

You can connect 10 lines of your image sensor to GPIF (which is configured as 16 bit wide). For each PCLK edge, FX3 would be sampling all the 16 lines.

Note: Here I assume that the image sensor data bus is 10 bit wide.

In this case, you can tie the other 6 lines to Ground. In the UVC format descriptor, you can mention the image format to be YUY2 (refer AN75779 firmware) and the pixel depth as 2 bytes.

If the format reported in the UVC descriptor is RAW then UVC driver would discard the data.

Once you receive the data, your application has to process the data to convert the image to the desired format and then display.

Regards,

Hemanth

Hemanth

View solution in original post

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

Hi Nigel,

Which Cypress chip are you using FX3 OR CX3?

Are you asking about the 'Input Video Format' and 'Output Video Format' in Image Sensor Configuration section of CX3 Configuration Tool?

Regards,

Hemanth

Hemanth
0 Likes

Hi Hemanth,

I'm using Fx-3 with aptina MT9v034 image sensor.

The sensor output format is monochrome 10 bit raw data. I would like convert it to yuv format to fulfill the uvc compliance.

Rgds

Nigel

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

Hi Nigel,

Conversion can't be done in FX3.

You can connect 10 lines of your image sensor to GPIF (which is configured as 16 bit wide). For each PCLK edge, FX3 would be sampling all the 16 lines.

Note: Here I assume that the image sensor data bus is 10 bit wide.

In this case, you can tie the other 6 lines to Ground. In the UVC format descriptor, you can mention the image format to be YUY2 (refer AN75779 firmware) and the pixel depth as 2 bytes.

If the format reported in the UVC descriptor is RAW then UVC driver would discard the data.

Once you receive the data, your application has to process the data to convert the image to the desired format and then display.

Regards,

Hemanth

Hemanth
0 Likes

Hi Hemanth,

Yes the sensor data is 10bit wide.

Currently I'm using cypress interconnect board CYUSB3ACC-004 to connect the fx-3 eva with the aptina imgae sensor. To tie the other 6 lines to Ground do i need to customize a new board ?

Thanks & Regards

Nigel

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

Hi Nigel,

You can still use the interconnect board, provided, the following is satisfied:

- The data lines DQ10 to DQ15 should not be connected to the image sensor. They should be floating. If this is ensured, then you can use the API: CyU3PGpioSetIoMode (X, CY_U3P_GPIO_IO_MODE_WPD); where X is GPIOs 10 to 15, to configure an internal weak pull-down on the DQ line. Hope this is clear.

When these lines are floating, because of the WeakPull  down configuration done in the API, the lines DQ10 to DQ15 would be sampled as zeros.

Regards,

Hemanth

Hemanth
0 Likes

Hi Hemanth,

I have tried to changed the GPIF setting to 16bit but there is not image display yet, I suspecting the i2c is not communicating with the sensor at all.

Rgds

Nigel

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

Hi Nigel,

For that you will have to take an I2C trace and verify the communication between FX3 and Image Sensor.

Regards,

Hemanth

Hemanth
0 Likes