3 Replies Latest reply on Sep 16, 2018 11:08 PM by hman

    How to get a RAW16 from CX3

    hwp195_3645981

      This is my data flow for my system:

      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?

        • 1. Re: How to get a RAW16 from CX3
          hman

          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

          • 2. Re: How to get a RAW16 from CX3
            hwp195_3645981

            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.

            • 3. Re: How to get a RAW16 from CX3
              hman

              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