How to get a RAW16 from CX3

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

cross mob
hehe_3645981
Level 1
Level 1
First like given

This is my data flow for my system:

pastedImage_0.png

Because i can not found a demo to config a raw16, and i did not found the enum type "enum CyU3PMipicsiDataFormat_t " which not contain a RAW16type,

so i did't known how to transfer my raw16 data to the host.

I try to use the yuv422 configuration to transfer my raw data to the host, and i really received data from the CX3 by e-cam, but the image is wrong for the e-cam use the yuv2 formating to resolve the raw data. And now I think i can use the matlab to grap a frame and deal with it. But when i use the matlab getting a snashot and i found the data is a

type like this: 1280*800*3(full frame size:1280x800). Is it the matlab regard as a yuv data? and how can i config the cx3 to support raw16  or how to deal with the data i grap from the cx3 with the yuv format transfer.

Is there any other developer meet the requirement like me?

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

Hi,

- Please note that you cannot report RAW format in UVC format descriptor. UVC driver doesn't support RAW format.

- So the options available are:

a) Report the image format as YUY2 and then you have to write your Host application to take the data from the driver and convert into the required form.

b) Instead of UVC class, you can make the device come up as vendor class device and then write your Host application to handle the RAW16 data.

I have seen your comment: "I try to use the yuv422 configuration" - With this do you mean you have used that particular CyU3PMipicsiDataFormat_t ?

If yes, then please note that the format that the UVC driver sees is the one that you have mentioned in your UVC format descriptor.

And also please check the 'Number of bits per pixel' in your format descriptor.

Regards,

Hemanth

Hemanth

View solution in original post

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

Hi,

- Please note that you cannot report RAW format in UVC format descriptor. UVC driver doesn't support RAW format.

- So the options available are:

a) Report the image format as YUY2 and then you have to write your Host application to take the data from the driver and convert into the required form.

b) Instead of UVC class, you can make the device come up as vendor class device and then write your Host application to handle the RAW16 data.

I have seen your comment: "I try to use the yuv422 configuration" - With this do you mean you have used that particular CyU3PMipicsiDataFormat_t ?

If yes, then please note that the format that the UVC driver sees is the one that you have mentioned in your UVC format descriptor.

And also please check the 'Number of bits per pixel' in your format descriptor.

Regards,

Hemanth

Hemanth
0 Likes

hman​   Thank you for your answer. I can received the yuv2 format correctly and play on the e-cam, and when i changed the "CyU3PMipicsiDataFormat_t " to "CY_U3P_CSI_DF_RAW12", the e-cam can receive and play it on the screen also. But the color be with the green. So i think raw data frame have been transfer to the host correctly, but i don't known how to get the frame and deal with the header of the CX3 and UVC, so i confuse that about the endian and header of the UVC protocol, and is there CX3 do any process (e.g data rearraynge) on the raw data? thanks a lot.

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

Hi,

No, CX3 doesn't process the RAW data. It just acts as a pipe to transfer the data to the Host. On the Host side as I said before, it has to be processed and make it displayable.

Regards,

Hemanth

Hemanth
0 Likes