How to capture image in the RAW10 Bayer format



How to capture image in the RAW10 Bayer format.

I am able do the following steps successfully.

sudo media-ctl -d /dev/media1 -l '“msm_csiphy0”:1->“msm_csid0”:0[1],“msm_csid0”:1->“msm_ispif0”:0[1],“msm_ispif0”:1->“msm_vfe0_rdi0”:0[1]'
sudo media-ctl -d /dev/media1 -V ‘“ov7251 1-00c0”:0[fmt:SRGGB10/640x480],“msm_csiphy0”:0[fmt:SRGGB10/640x480],“msm_csid0”:0[fmt:SRGGB10/640x480],“msm_ispif0”:0[fmt:SRGGB10/640x480],“msm_vfe0_rdi0”:0[fmt:SRGGB10/640x480]’

Please can you suggest me after above steps, how to capture snapshot in RAW10 Bayer format.


what about:

# Show video stream
$ gst-launch-1.0 v4l2src device=/dev/video0 ! 'video/x-bayer,format=rggb,width=640,height=480' ! glimagesink


# Capture image
gst-launch-1.0 v4l2src device=/dev/video0 num-buffers=1 ! 'video/x-bayer,format=rggb,width=640,height=480' ! jpegenc ! filesink location=image01.jpg

Note that you need to be sure your camera (ov7251) output is configured to generate RAW10 Bayer format.


I am looking to do a raw capture of 640x480 SRGGB_1X8 stream source is not a camera output but from a lattice mipi to CSI converter, can you help me with this


I tried the following steps
sudo media-ctl -d /dev/media0 -l ‘“msm_csid0”:1->“msm_ispif0”:0[1],“msm_ispif0”:1->“msm_vfe0_rdi0”:0[1]’

linaro@linaro-alip:~$ sudo media-ctl -d /dev/media0 -V ‘“msm_csid0”:1[fmt:SRGGB8_1X8/640x480 field:none],“msm_ispif0”:0[fmt:SRGGB8_1X8/640x480 field:none],“msm_vfe0_rdi0”:0[fmt:SRGGB8_1X8/640x480 field:none]’
linaro@linaro-alip:~$ gst-launch-1.0 v4l2src device=/dev/video0 ! ‘video/x-bayer,format=rggb,width=640,height=480’ ! glimagesink
WARNING: erroneous pipeline: could not link v4l2src0 to glimagesinkbin0, glimagesinkbin0 can’t handle caps video/x-bayer, format=(string)rggb, width=(int)640, height=(int)480


Try to add bayer2rgb before sink element:

e.g. on my side with test source:

gst-launch-1.0 videotestsrc ! video/x-bayer,format=rggb,width=640,height=480 ! bayer2rgb ! autovideosink