https://download.csdn.net/download/qccz123456/10567684
Video for Linux Two API Specification
参考文献:https://www.linuxtv.org/downloads/legacy/video4linux/API/V4L2_API/spec-single/v4l2.html
【命令行模式】
安装:sudo apt install v4l-utils
列出相关的camera设备:v4l2-ctl --list-devices
HD Pro Webcam C920 (usb-3f980000.usb-1.2):
/dev/video2
292A-IPC-AR0330 (usb-3f980000.usb-1.4):
/dev/video0
/dev/video1
列出针对某camera的控制参数:
v4l2-ctl -d /dev/video0 --list-ctrls
v4l2-ctl --device=/dev/video0 --set-ctrl=exposure_auto=1
v4l2-ctl --device=/dev/video0 --set-ctrl=exposure_absolute=200
brightness (int) : min=-64 max=64 step=1 default=0 value=12
contrast (int) : min=0 max=64 step=1 default=32 value=32
saturation (int) : min=0 max=128 step=1 default=60 value=60
hue (int) : min=-40 max=40 step=1 default=0 value=0
white_balance_temperature_auto(bool) : default=1 value=1
gamma (int) : min=72 max=500 step=1 default=100value=100
gain (int) : min=0 max=100 step=1 default=0 value=0
power_line_frequency(menu) : min=0 max=2 default=1 value=1
white_balance_temperature(int) : min=2800 max=6500 step=1default=4600 value=4600 flags=in
sharpness (int) : min=0 max=6 step=1 default=2 value=2
backlight_compensation(int) : min=0 max=2 step=1 default=1value=1
exposure_auto (menu) : min=0 max=3 default=3 value=1
exposure_absolute(int) : min=1 max=5000 step=1default=157 value=200
exposure_auto_priority(bool) : default=0 value=1
参数说明:
exposure_auto (menu) : min=0 max=3 default=3 value=3
V4L2_CID_EXPOSURE_AUTO | enum v4l2_exposure_auto_type |
| ||||||||
| Enables automatic adjustments of the exposure time and/or iris aperture. The effect of manual changes of the exposure time or iris aperture while these features are enabled is undefined, drivers should ignore such requests. Possible values are: | |||||||||
|
|
exposure_absolute (int) : min=1 max=5000 step=1 default=157value=200
当exposure_auto=1( V4L2_EXPOSURE_MANUAL )时可设置曝光绝对值。
exposure_auto_priority(bool) : default=0 value=1
Frame rate is set to be camera_fps. Without settingexposure_auto_priority, AE will never change this frame rate - you will get aframe every 1/fps seconds. AE can request an exposure time that is < 1/fpsseconds, but never exceed it. The exposure mode (night, sport, etc) variesother parameters such as whether to increase gain or exposure time first, andwhat maximum value to adopt for each.
也就是说exposure_auto_priority=0是锁定camera的fps,exposure_auto_priority=1是fps不固定,曝光设置优先。
Video for Linux 2 Universal Control Panel
用于可视化调节参数https://apps.ubuntu.com/cat/applications/v4l2ucp/