V4L2 Utils raw image capture not working with IMX219

v4l2-ctl --list-devices --all
vi-output, imx219 6-0010 (platform:54080000.vi:0):
/dev/video0

Driver Info (not using libv4l2):
Driver name : tegra-video
Card type : vi-output, imx219 6-0010
Bus info : platform:54080000.vi:0
Driver version: 4.9.140
Capabilities : 0x84200001
Video Capture
Streaming
Extended Pix Format
Device Capabilities
Device Caps : 0x04200001
Video Capture
Streaming
Extended Pix Format
Priority: 2
Video input : 0 (Camera 0: no power)
Format Video Capture:
Width/Height : 1280/720
Pixel Format : ‘RG10’
Field : None
Bytes per Line : 2560
Size Image : 1843200
Colorspace : sRGB
Transfer Function : Default (maps to sRGB)
YCbCr/HSV Encoding: Default (maps to ITU-R 601)
Quantization : Default (maps to Full Range)
Flags :

Doing a frame capture using V4L2 utils command:
v4l2-ctl --stream-mmap --stream-count=1 --stream-to=file.raw
creates an unsupported raw image.
But, capture using Gstreamer works fine.

Your IMX219 sensor is a Bayer sensor, so the v4l capture is in bayer RG10 format. This is expected. You would have to debayer the frame into a suitable format such as RGB or YUV for viewing it.

When using nvarguscamerasrc, the RG10 frames are redirected through a bypass to ISP that performs debayering (and more) and provides NV12 format. Note that when capturing with v4l2-ctl, you should add option :

--set-ctrl bypass_mode=0

so that it won’t interfere with argus-daemon.

Hello !
I tried running the command :
v4l2-ctl --stream-mmap --stream-count=1 --stream-to=file.raw --set-ctrl bypass_mode=0
Still I am facing the old issue, the raw is not viewable.
Is there anything which am missing ?

You’re just missing a viewer supporting Bayer RG10 format. Sorry I can’t provide any link for this.
I’d suggest to use argus to get a debayered format.

Thanks @Honey_Patouceul !