how to stream CX3 RAW8/RAW10 - BAYER Video to Android Device

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

cross mob
Sivaraj_A
Level 2
Level 2
5 likes given 10 replies posted 10 questions asked

Hi,

        RAW8/RAW10 - BAYER video to Android Smartphone is a challenge for us.

1. The setting below is incompatible with Android and Windows devices. For example, if I set (RAW10 & 16-bit output), the streaming in the Windows app appeared little green.

Sivaraj_A_3-1678371181527.png

   2.  I try to obtain the streaming using  Opencv Library  :

          A. cap = cv2.VideoCapture(0)

                I got Error: CvCapture_MSMF::grabFrame videoio(MSMF): can't grab frame. Error: -2147483638

          B. cap = cv2.VideoCapture(0,cv2.CAP_DSHOW) 

                I got 3 plane Buffer , But i need RAW10/RAW8 Flatten Array for color interpolation algo.

Please advise us on how to obtain RAW8/RAW10 frames without losing quality for windows / Android.

 

 

 

 

 

 

 

0 Likes
1 Solution
AliAsgar
Moderator
Moderator
Moderator
1000 replies posted 250 solutions authored 750 replies posted

Hi,

RAW video formats are not supported by the UVC class specifications.

Hence, in CX3, we set the UVC descriptors to YUY2 and send RAW video data. The host PC assumes the data to be YUY2 and prints the video data as it is on the Video application. That is the reason you see green colour tint on the video.

The demosaicing algorithm needs to be implemented on the host side to get the proper full colour video output from the RAW video data. Please note that you do not lose any quality, instead processing is required on the host to retrieve the full colour from the video.

Also as RAW10 output is sent on a 16 bit parallel interface, the remaining 6 bits are zero padded. These zero pads needs to be removed from the video data as well during the processing on the host.

Best Regards,
AliAsgar

View solution in original post

0 Likes
1 Reply
AliAsgar
Moderator
Moderator
Moderator
1000 replies posted 250 solutions authored 750 replies posted

Hi,

RAW video formats are not supported by the UVC class specifications.

Hence, in CX3, we set the UVC descriptors to YUY2 and send RAW video data. The host PC assumes the data to be YUY2 and prints the video data as it is on the Video application. That is the reason you see green colour tint on the video.

The demosaicing algorithm needs to be implemented on the host side to get the proper full colour video output from the RAW video data. Please note that you do not lose any quality, instead processing is required on the host to retrieve the full colour from the video.

Also as RAW10 output is sent on a 16 bit parallel interface, the remaining 6 bits are zero padded. These zero pads needs to be removed from the video data as well during the processing on the host.

Best Regards,
AliAsgar

0 Likes