Hi Guys,
I am using the ioctl utilities to capture the bayer image on the JetsonNano-IMX219 platform.
It succeeded in the resolution of 3264x2464. But when I set the resolution to 1920x1080, it still captures the image of 3264x2464.
Below is the code for setting the operation mode. #define IMAGEWIDTH 1920 #define IMAGEHEIGHT 1080
river@river-desktop:~$ v4l2-ctl --device /dev/video0 --stream-mmap --stream-count=1 --set-fmt-video=width=1920,height=1080,pixelformat=RG10 --verbose
VIDIOC_QUERYCAP: ok
VIDIOC_G_FMT: ok
VIDIOC_S_FMT: ok
Format Video Capture:
Width/Height : 3264/2464
Pixel Format : ‘RG10’
Field : None
Bytes per Line : 6528
Size Image : 16084992
Colorspace : sRGB
Transfer Function : Default (maps to sRGB)
YCbCr/HSV Encoding: Default (maps to ITU-R 601)
Quantization : Default (maps to Full Range)
Flags :
VIDIOC_REQBUFS: ok
VIDIOC_QUERYBUF: ok
VIDIOC_QBUF: ok
VIDIOC_QUERYBUF: ok
VIDIOC_QBUF: ok
VIDIOC_QUERYBUF: ok
VIDIOC_QBUF: ok
VIDIOC_QUERYBUF: ok
VIDIOC_QBUF: ok
VIDIOC_STREAMON: ok
Index : 0
Type : Video Capture
Flags : mapped
Field : None
Sequence : 0
Length : 16084992
Bytesused: 16084992
Timestamp: 80987.479496s (Monotonic, End-of-Frame)
VIDIOC_STREAMOFF: ok
river@river-desktop:~$ v4l2-ctl -d /dev/video0 --all
Driver Info (not using libv4l2):
Driver name : tegra-video
Card type : vi-output, imx219 7-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 : 3264/2464
Pixel Format : ‘RG10’
Field : None
Bytes per Line : 6528
Size Image : 16084992
Colorspace : sRGB
Transfer Function : Default (maps to sRGB)
YCbCr/HSV Encoding: Default (maps to ITU-R 601)
Quantization : Default (maps to Full Range)
Flags :
Ok seems the driver is not changing the resolution and is always setting default resolution. Are you using the default driver that ships with L4T? What Jetpack version are you using?
could you please specify control property, i.e. --set-ctrl=sensor_mode=<N> to assign sensor modes.
I’m able to switch sensor modes with Nano/IMX219 by the following command lines.
for example,
$ v4l2-ctl -d /dev/video0 --set-fmt-video=width=1280,height=720,pixelformat=RG10 --set-ctrl bypass_mode=0 --stream-mmap --stream-count=1 --set-ctrl=sensor_mode=3 --verbose
...
VIDIOC_QUERYCAP: ok
VIDIOC_S_EXT_CTRLS: ok
VIDIOC_G_FMT: ok
VIDIOC_S_FMT: ok
Format Video Capture:
Width/Height : 1280/720
Pixel Format : 'RG10'
Field : None
Bytes per Line : 2560
Size Image : 1843200