V4L2总结

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:

 

V4L2_EXPOSURE_AUTO 

Automatic exposure time, automatic iris aperture.

V4L2_EXPOSURE_MANUAL 

Manual exposure time, manual iris.

V4L2_EXPOSURE_SHUTTER_PRIORITY 

Manual exposure time, auto iris.

V4L2_EXPOSURE_APERTURE_PRIORITY 

Auto exposure time, manual iris.

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/

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值