树莓派csi摄像头和usb摄像头_树莓派上用 fswebcam + USB 摄像头拍摄
在实践过程中,树莓派对 USB 摄像头的支持不如 CSI 摄像头完美。偶尔会出现无法使用 USB 摄像头的情况,自带的摄像头操作命令 raspistill、raspivid 也无法使用。
而 fswebcam 这是一款小型摄像头程序(官网),则可以很好地支持 USB 摄像头。使用方法也很简便。
安装 fswebcam
安装 fswebcam,用于访问摄像头、进行拍照。
sudo apt-get install fswebcam
fswebcam 的用法
fswebcam --help
Usage: fswebcam [] [[] ... ]
Options:
-?, --help Display this help page and exit.
-c, --config Load configuration from file.
-q, --quiet Hides all messages except for errors.
-v, --verbose Displays extra messages while capturing
--version Displays the version and exits.
-l, --loop Run in loop mode.
-b, --background Run in the background.
-o, --output Output the log to a file.
-d, --device Sets the source to use.
-i, --input Selects the input to use.
-t, --tuner Selects the tuner to use.
-f, --frequency Selects the frequency use.
-p, --palette Selects the palette format to use.
-D, --delay Sets the pre-capture delay time. (seconds)
-r, --resolution Sets the capture resolution.
--fps Sets the capture frame rate.
-F, --frames Sets the number of frames to capture.
-S, --skip Sets the number of frames to skip.
--dumpframe Dump a raw frame to file.
-s, --set = Sets a control value.
--revert Restores original captured image.
--flip Flips the image. (h, v)
--crop [,] Crop a part of the image.
--scale Scales the image.
--rotate Rotates the image in right angles.
--deinterlace Reduces interlace artifacts.
--invert Inverts the images colours.
--greyscale Removes colour from the image.
--swapchannels Swap channels c1 and c2.
--no-banner Hides the banner.
--top-banner Puts the banner at the top.
--bottom-banner Puts the banner at the bottom. (Default)
--banner-colour Sets the banner colour. (#AARRGGBB)
--line-colour Sets the banner line colour.
--text-colour Sets the text colour.
--font Sets the font and/or size.
--no-shadow Disables the text shadow.
--shadow Enables the text shadow.
--title Sets the main title. (top left)
--no-title Clears the main title.
--subtitle Sets the sub-title. (bottom left)
--no-subtitle Clears the sub-title.
--timestamp Sets the timestamp format. (top right)
--no-timestamp Clears the timestamp.
--gmt Use GMT instead of local timezone.
--info Sets the info text. (bottom right)
--no-info Clears the info text.
--underlay Sets the underlay image.
--no-underlay Clears the underlay.
--overlay Sets the overlay image.
--no-overlay Clears the overlay.
--jpeg Outputs a JPEG image. (-1, 0 - 95)
--png Outputs a PNG image. (-1, 0 - 10)
--save Save image to file.
--exec Execute a command and wait for it to complete.
使用 fswebcam
命令行下查看 /dev/下有video0 的设备。
运行 lsusb 命令,有相关摄像头的信息。
在终端中运行下面的命令来抓去一张来自摄像头的照片。
fswebcam --no-banner -r 640x480 image.jpg
或者你可以直接用:
fswebcam image.jpg
可以直接拍照,-d 用于指定使用哪个摄像头设备。-r 指定图片的分辨率,最后的是照片保存的路径。
如果拍摄出来的照片是一片漆黑,可能和摄像头启动延迟有关,可以通过加 -S 参数来跳过前面几帧解决。例如使用命令:
fswebcam -S 10 image.jpg
树莓派csi摄像头和usb摄像头_树莓派上用 fswebcam + USB 摄像头拍摄相关推荐
- 树莓派4b ros镜像 网盘_树莓派4B的入手操作
1.到手机器 拿到主板.散热片(散热风扇).电源.读卡器.SD卡(推荐16G以及更高).网线.其他小配件. 2.下载系统镜像 进入https://www.raspberrypi.org/ 网站 , 点 ...
- usb协议规范_你想了解的USB知识,都在这里了!
作为电脑必备接口,USB堪称万能接口. 可是你的USB接口是2.0还是3.0? 支不支持快速充电? 你的USB Type C接口除了传输文件和给手机充电,是否支持显示.给电脑充电.外接扩展坞? 这些题 ...
- upan启动写入usb驱动_为什么创建可启动USB驱动器比创建可启动CD更复杂?
upan启动写入usb驱动 Creating bootable CDs and DVDs tends to be a simple, straightforward process, but why ...
- java 连接 usb串口_树莓派 3 java usb串口通讯485
0 参考链接 https://blog.csdn.net/qq_43725844/article/details/97682424 https://blog.csdn.net/fhqlongteng/ ...
- 树莓派连接usb手机_树莓派03 - 树莓派的VNC连接
开启VNC连接(可视化图形界面) 1.输入:sudo raspi-config,然后回车,进入设置界面 2.选择第5个 "Interfacing Options",回车 3.选择第 ...
- 树莓派4bpython串口通信解读数据_树莓派基础实验36:通用串口通信实验
一.介绍 对于树莓派 3B+来说,他的UART功能有三种: 1.内部蓝牙使用: 2.控制终端使用: 3.与其他设备进行串口通信. 在树莓派基础实验35:USB TO TTL模块实验中学习了通过串口对树 ...
- 树莓派是python的应用领域吗_树莓派为什么采用python语言为主要开发语言?
回复内容: 他老爸想让更多小孩学会编程,去用电脑实现自己有趣的想法.本来打算只让这个机器跑Python(是只跑Python,像学习机一样的东西.并没有想过在上面弄一个完整的linux).但是后来动真格 ...
- 树莓派能直接运行python程序_树莓派怎么运行python程序
树莓派运行Python程序的方法: 一.RaspBerry系统设置 1.首先在开发板没有通电情况下,连接硬件,以及项目中用到传感器.比如当前项目需要将LED灯插在面包板上,然后通过杜邦线将开发板和面包 ...
- 树莓派3b能装java吗_树莓派3B-系统安装
工具: 树莓派3B,感觉不同版本树莓派应该安装起来没什么区别 网线 路由器 带HDMI线的显示屏 5V2A的电源 键盘 鼠标 读卡器 16G TF卡 参考资料: 系统镜像加载和刻录 https://b ...
最新文章
- Java面试题之Oracle 支持哪三种事务隔离级别
- RecyclerView.Adapter:全能notify解决方案
- MYSQL 获取每个汉字的拼音首字母
- HIVE 一行转多行输出办法
- BPEL4WS基础知识
- Java中的时间和日期(上)
- c语言计算坐标,求助,有关坐标计算的
- 小D课堂 - 零基础入门SpringBoot2.X到实战_第8节 数据库操作之整合Mybaties和事务讲解_34、SpringBoot整合Mybatis实操和打印SQL语句...
- 解决:VB.NET程序中 datagridview 多次绑定出现 的“不能在数据绑定的 DataGridView 控件上设置 ColumnCount...
- 高等数学(第七版)同济大学 总习题六 个人解答
- 工业物联网解决方案,工业物联网原创监控平台如何搭建
- 网站遭到XSS挂马的危害性
- 学习笔记(30):Google开发专家带你学 AI:入门到实战(Keras/Tensorflow)(附源码)-模型微调(青出于蓝胜于蓝)
- I3C协议Single Data Rate(SDR)模式研读(一):总线配置Bus Configuration
- 腾讯地图标记点击事件
- 关于设计抗混叠滤波器的三个指导原则
- 微信企业号开发之 企业号人员身份认证与开发
- 解决xcode doesn‘t support iphone’s ios 14.6 (18f72)
- 数据传输功能单元——DID参数定义
- Office 连供打印机无法进纸怎么办 卡纸,塞纸怎么办