FX3 RGB to YUY2 conversion

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

cross mob
Anonymous
Not applicable

Hi.

   

I have an image sensor with an RGB bayer output and i want to integrate it to the FX3 dev kit. I made some changes to the sample firmware so that I could transmit RGB format but the PC application software couldn't display the streamed image.

   

I understand that UVC can only support               YUY2, NV12, M420 and I420. But I have seen in your new chip which is the CX3 that it can receive an RGB image and send it to a YUV422 format, and then display it thru UVC. So I am thinking if there is a way I can convert an RGB format to YUY2 format, on the firmware level, so that I could use the UVC sample source code for the FX3.

   

I hope that you could help me.

   

Thanks.

0 Likes
13 Replies
Anonymous
Not applicable

 Hi,

   

Microsoft provides an extension to the UVC driver & it supports more formats than specified in the UVC 1.1/1.5 spec. Using this feature it can directly stream raw RGB image without using  intermediate converter. Sample descriptor implementation along with firmware is available in SDK 1.3 firmware folder.    

          

   

RGB24 (RGB888):  ..\1.3\EZ-USB FX3 SDK\1.3\firmware\cx3_examples\cycx3_rgb24    

          

   

RGB16 (RGB565):  ..\1.3\EZ-USB FX3 SDK\1.3\firmware\cx3_examples\cycx3_rgb16    

          

   

Refer the following link for supported formats,http://msdn.microsoft.com/en-us/library/windows/desktop/dd757532(v=vs.85).aspx

   

 

   

Regards,

   

Gayathri

0 Likes
shkuc_292731
Level 3
Level 3

Hi eFRF,

   

 

   

In the Cx3 chip you cannot the format from RGB to YUY2.

   

It simply accepts the Mipi signal and convert it  into parallel signals.

   

 

   

Regards,

   

Shanthakumar

0 Likes
Anonymous
Not applicable

 hi everyone,

   

          i am using Aptina Ar0132 in my application,it has bayer 12 output , how can i stream it through uvc?

   

 

   

Waiting for your valuable reply.

   

 

   

Regards,

   

Nagarajan.K

0 Likes
Anonymous
Not applicable

It is not possible to transmit a Bayer12 format stream over UVC.

   

You need to convert it into a YUV/RGB format.

   

Or you can just transmit the Bayer12 stream over a vendor class interface and develop your own host application to read and display the stream.

   

 

   

-Shashank

0 Likes
Anonymous
Not applicable

Hi friends,

   

              can you please elaborate how i can stream over vendor class interface? 

   

 

   

Waiting for your valuable reply.

   

 

   

Regards,

   

Nagarajan.K

0 Likes
Anonymous
Not applicable

 You can use the GPIFII and DMA design available in the UVC example code to fetch the data from your sensor.

   

You can remove the header addition part of the code since you wouldn't be using UVC anymore. And hence make this an AUTO DMA channel if need be.

   

The major changes would happen in the descriptor file. You can remove all UVC-specific descriptors and only retain the config, interface and endpoint descriptors. Look at the descriptor structure of cyfxbulksrcsink for reference.

   

As a result, you can also remove the code that handles all UVC control requests (in uvc.c file).

   

 

   

On the host side, you would need to develop an application (like the Control Center or Streamer applications provided by Cypress) that would talk to the cyusb3.sys driver. Your application should be coded to fetch the data from the device (using Cypess API's) and then display the received video frames using Microsoft API's. All this only holds true if you are going to use Windows host platform.

   

For Linux/Mac, you'd need to use a third party driver (like libusb) and code your application on top of it (since Cypress does not provide drivers for these paltforms).

   

-Shashank

0 Likes
Anonymous
Not applicable

Hi there,

   

I was wondering, whether the example for an RGB Implementation, that Gayathri poasted earlier, works for the FX3 as well. It doesn't really seem like that to me but we have a little bit of hope left.
Doesn't the FX3 contain a ARM9 Core? Wouldn't it be possible to use this for data conversion? I just have a really hard time to believe that rgb and UVC can't be merged together on the FX3.

   

 

   

Or how about this idea: What would actually happen if I would just send my rgb data to the FX3 and let UVC transfer that data to the Host. Sure I wouldn't have a proper picture using a standard software like VLC or so, but I could grab the pixels with Open CV and convert them there, couldn't I? 

   

Thanks in advance!

   

Regards,

   

Lennart

0 Likes

Lennart,

Have you been able to transfer RGB to VLC like VirtualDub using FX3 UVC sample code? I struggled on it more than 2 months and no video show up yet. If it is not feasible, I would just give it up and look for other solutions. Thank you very much.

0 Likes

Hi qwa_2323766

You can stream RAW RGB data using VLC. But the image and colors wont be proper . You should use windows supported GUID to test the RAW RGB data.

Refer the link https://msdn.microsoft.com/en-us/library/windows/desktop/dd757532(v=vs.85).aspx.

However to get the proper output . you should convert the raw RGB data to YUV or RGB or any formats supported by VLC or host application to get the clear image.

10. Re: FX3 RGB to YUY2 conversion

maheswariamudha_2545856Level 5

0 Likes

Hi qwa_2323766

Are you getting proper video after converting to RGB888.

0 Likes

maheswariamudha_2545856,

Yes. It is working now in terms of streaming proper video.

0 Likes

Hi Lennart

You can send the RAW RGB data to the FX3 and at the host side develop a OpenCV application to decode the Bayer data to any format. The host application should be developed on top of libuvc.

0 Likes