4 Replies Latest reply on Feb 14, 2019 11:00 PM by HemanthR_06

    stream raw8 to rgb24 or yuy2 with cx3

    alca_3937256

      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

        • 1. Re: stream raw8 to rgb24 or yuy2 with cx3
          HemanthR_06

          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

          • 2. Re: stream raw8 to rgb24 or yuy2 with cx3
            alca_3937256

            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.

            • 3. Re: stream raw8 to rgb24 or yuy2 with cx3
              HemanthR_06

              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

              • 4. Re: stream raw8 to rgb24 or yuy2 with cx3
                HemanthR_06

                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

                1 of 1 people found this helpful