查看摄像头是否挂载及挂载的USB端口号
方法一:
ls /dev/video*
方法二:
ls /dev | grep video
ls /dev | grep video*
则可看到"/dev/video0",表示成功驱动摄像头。
如果没有的话,拔掉摄像头,重新插上。然后再输入命令:ls /dev/v*,则可看到。
查看video设备参数信息
v4l2-ctl命令查看video设备参数信息
v4l2-ctl -d /dev/video0 --all
如果提示如下未找到v4l2-ctl命令,则需要安装v4l-utils
sudo apt-get install v4l-utils
Driver Info (not using libv4l2):
Driver name : uvcvideo
Card type : USB 2.0 Camera
Bus info : usb-3610000.xhci-1
Driver version: 4.9.253
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 1: ok)
Format Video Capture:
Width/Height : 640/480
Pixel Format : 'YUYV'
Field : None
Bytes per Line : 1280
Size Image : 614400
Colorspace : sRGB
Transfer Function : Default (maps to sRGB)
YCbCr/HSV Encoding: Default (maps to ITU-R 601)
Quantization : Default (maps to Limited Range)
Flags :
Crop Capability Video Capture:
Bounds : Left 0, Top 0, Width 640, Height 480
Default : Left 0, Top 0, Width 640, Height 480
Pixel Aspect: 1/1
Selection: crop_default, Left 0, Top 0, Width 640, Height 480
Selection: crop_bounds, Left 0, Top 0, Width 640, Height 480
Streaming Parameters Video Capture:
Capabilities : timeperframe
Frames per second: 30.000 (30/1)
Read buffers : 0
brightness 0x00980900 (int) : min=-255 max=255 step=1 default=0 value=0
contrast 0x00980901 (int) : min=0 max=30 step=1 default=16 value=16
saturation 0x00980902 (int) : min=0 max=127 step=1 default=36 value=36
hue 0x00980903 (int) : min=-16000 max=16000 step=1 default=0 value=0
white_balance_temperature_auto 0x0098090c (bool) : default=1 value=1
gamma 0x00980910 (int) : min=20 max=250 step=10 default=100 value=100
power_line_frequency 0x00980918 (menu) : min=0 max=2 default=1 value=1
white_balance_temperature 0x0098091a (int) : min=2500 max=7000 step=1 default=5000 value=5000 flags=inactive
sharpness 0x0098091b (int) : min=0 max=15 step=1 default=6 value=6
backlight_compensation 0x0098091c (int) : min=0 max=2 step=1 default=1 value=1