Raspberry Pi 相机设置教程
["raspistill", "-t", "0.1/1/5", "-w", "300", "-h", "500" ]
说明:
红色标注参数,只能是正整数,否则出现不可控,导致进程raspistill一直占用相机拍照。导致其它程序无法使用相机。
-t, --timeout : 拍照和关闭时的延时指定,未指定时默认是5s
raspistill
作用
在指定的时间运行摄像头,而且如果需要可以捕获JPG图片
使用格式
raspistill [options]
图像参数与命令
-?, --help : 帮助文档-w, --width : 设置图像宽度 <尺寸> -h, --height : 设置图像高度 <尺寸> -q, --quality : 设置jpeg品质 <0到100>-r, --raw : 增加raw原始拜尔数据到JPEG元数据-o, --output : 输出文件名 <文件名> ,如果要写到stdout,使用`-o -`,如果不特别指定,图像文件不会被保存-l, --latest : 链接最近的完整图像到指定文件 <文件名> -v, --verbose : 在运行摄像头时输出详细信息-t, --timeout : 拍照和关闭时的延时指定,未指定时默认是5s-th, --thumb : 设置预览图(小图)参数(包括X、Y、品质)或者不设置-d, --demo : 运行一个demo模式(cycle through range of camera options, no capture),括号里的我可以理解成循环测试模式吗?-e, --encoding : 编码来输出指定格式文件 (jpg, bmp, gif, png)-x, --exif :将可交换图像文件应用到捕获中(格式:`key=value`)或者不设置-tl, --timelapse : 间隔拍摄,每拍摄一张图片-fp, --fullpreview : 用静态捕捉分辨率运行预览(可能会减小预览帧率)-k, --keypress : 按键触发,按`ENTER`键拍照,按`X`然后`ENTER`键退出-s, -signal : 信号触发,等待另一个进程信号来拍摄一张照片-g, -gl : 绘制预览到文本,而不是使用视频渲染组件(啥意思?)-gc, --glcapture : 捕获GL帧buffer而不是摄像机图像-set, --settings : 检索摄像机设置值然后写出到stdout-cs, --camselect : 选择摄像头设备 <数字> ,默认0-bm, --burst : 运行burst capture mode 数字> 文件名> 文件名> 尺寸> 尺寸>
预览参数与命令
-p, --preview : 预览窗口大小设置-f, --fullscreen : 全屏幕预览模式-op, --opacity : 预览窗口透明度 (0-255)-n, --nopreview : 不显示预览窗口
图像参数与命令2
-sh, --sharpness : 设置图像锐度 (-100 到 100)-co, --contrast : 设置图像对比度 (-100 到 100)-br, --brightness : 设置图像亮度 (0 到 100)-sa, --saturation : 设置图像饱和度 (-100 到 100)-ISO, --ISO : 设置摄像头感光度-vs, --vstab : Turn on video stabilisation 开启摄像头防抖模式(是这个意思吗?)-ev, --ev : 设置EV补偿-ex, --exposure : 设置曝光模式(参见提示)-awb, --awb : 设置AWB模式(参见提示)-ifx, --imxfx : 设置图像效应(参见提示)-cfx, --colfx : 设置色彩效应(参见提示)-mm, --metering : 设置测光模式(参见提示)-rot, --rotation : 设置图像旋转 (0到359)-hf, --hflip : 设置水平翻转 horizontal flip-vf, --vflip : 设置垂直翻转 vertical flip-roi, --roi : 设置interest区域 (啥叫interset?)--ss, --shutter : 设置快门速度,微秒--awbg, --awbgains : 设置AWB阈值, AWB模式必须关闭--drc, --drc : 设置DRC水平
提示
曝光模式选项:
auto - 自动曝光模式night - 夜间拍摄模式nightpreview - 夜间预览拍摄模式backlight - 逆光拍摄模式spotlight - 聚光灯拍摄模式sports - 运动拍摄模式snow - 雪景拍摄模式beach - 海滩拍摄模式verylong - 长时间曝光拍摄模式fixedfps - 帧约束拍摄模式antishake - 防抖模式fireworks - 烟火拍摄模式
自动白平衡选项:
off - 关闭白平衡测算auto - 自动模式(默认)sun - 日光模式cloud - 多云模式shade - 阴影模式tungsten - 钨灯模式fluorescent - 荧光灯模式incandescent - 白炽灯模式flash - 闪光模式horizon - 地平线模式
图像特效选项:
none - 无特效(默认)negative - 反色图像solarise - 曝光过度图像posterize - 色调图像whiteboard - 白板特效blackboard - 黑板特效sketch - 素描风格特效denoise - 降噪图像emboss - 浮雕图像oilpaint - 油画风格特效hatch - 草图特效gpen - 马克笔特效pastel - 柔化风格特效watercolour - 水彩风格特效film - 胶片颗粒风格特效blur - 模糊图像saturation - 色彩饱和图像colourswap - 暂未可用washedout - 暂未可用posterise - 暂未可用colourpoint - 暂未可用colourbalance - 暂未可用cartoon - 暂未可用
测光模式选项:
average - 全画面平衡测光spot - 点测光backlit - 模拟背光图像matrix - 阵列测光
预览参数与命令2
-gs, -glscene : GL屏幕尺寸等参数-gw, -glwin : GL窗口参数
raspivid
采集视频信息,需要时会再补充翻译
raspiyuv
采集YUV格式的原始图像,需要时会补充翻译
Mac下查看树莓派视频
安装mplayer
通过基金会推荐的包管理软件(Homebrew)安装
localhost:~ wangliang$ brew install mplayerUpdating Homebrew...==> Downloading https://homebrew.bintray.com/bottles/mplayer-1.3.0.sierra.bottle######################################################################## 100.0%==> Pouring mplayer-1.3.0.sierra.bottle.tar.gz==> Using the sandbox? /usr/local/Cellar/mplayer/1.3.0: 10 files, 27.4MBlocalhost:~ wangliang$
安装Homebrew
localhost:~ wangliang$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"==> This script will install:/usr/local/bin/brew/usr/local/share/doc/homebrew/usr/local/share/man/man1/brew.1/usr/local/share/zsh/site-functions/_brew/usr/local/etc/bash_completion.d/brew/usr/local/Homebrew==> The following existing directories will be made group writable:/usr/local/bin/usr/local/etc/usr/local/share/usr/local/share/doc/usr/local/share/man/usr/local/share/man/man1/usr/local/share/man/man3/usr/local/share/man/man5/usr/local/share/man/man7==> The following existing directories will have their owner set to wangliang:/usr/local/bin/usr/local/etc/usr/local/share/usr/local/share/doc/usr/local/share/man/usr/local/share/man/man1/usr/local/share/man/man3/usr/local/share/man/man5/usr/local/share/man/man7==> The following existing directories will have their group set to admin:/usr/local/bin/usr/local/etc/usr/local/share/usr/local/share/man/usr/local/share/man/man1/usr/local/share/man/man3/usr/local/share/man/man5/usr/local/share/man/man7==> The following new directories will be created:/usr/local/Cellar/usr/local/Homebrew/usr/local/Frameworks/usr/local/opt/usr/local/sbin/usr/local/share/zsh/usr/local/share/zsh/site-functions/usr/local/varPress RETURN to continue or any other key to abort==> /usr/bin/sudo /bin/chmod u+rwx /usr/local/bin /usr/local/etc /usr/local/share /usr/local/share/doc /usr/local/share/man /usr/local/share/man/man1 /usr/local/share/man/man3 /usr/local/share/man/man5 /usr/local/share/man/man7Password:==> /usr/bin/sudo /bin/chmod g+rwx /usr/local/bin /usr/local/etc /usr/local/share /usr/local/share/doc /usr/local/share/man /usr/local/share/man/man1 /usr/local/share/man/man3 /usr/local/share/man/man5 /usr/local/share/man/man7==> /usr/bin/sudo /usr/sbin/chown wangliang /usr/local/bin /usr/local/etc /usr/local/share /usr/local/share/doc /usr/local/share/man /usr/local/share/man/man1 /usr/local/share/man/man3 /usr/local/share/man/man5 /usr/local/share/man/man7==> /usr/bin/sudo /usr/bin/chgrp admin /usr/local/bin /usr/local/etc /usr/local/share /usr/local/share/man /usr/local/share/man/man1 /usr/local/share/man/man3 /usr/local/share/man/man5 /usr/local/share/man/man7==> /usr/bin/sudo /bin/mkdir -p /usr/local/Cellar /usr/local/Homebrew /usr/local/Frameworks /usr/local/opt /usr/local/sbin /usr/local/share/zsh /usr/local/share/zsh/site-functions /usr/local/var==> /usr/bin/sudo /bin/chmod g+rwx /usr/local/Cellar /usr/local/Homebrew /usr/local/Frameworks /usr/local/opt /usr/local/sbin /usr/local/share/zsh /usr/local/share/zsh/site-functions /usr/local/var==> /usr/bin/sudo /bin/chmod 755 /usr/local/share/zsh /usr/local/share/zsh/site-functions==> /usr/bin/sudo /usr/sbin/chown wangliang /usr/local/Cellar /usr/local/Homebrew /usr/local/Frameworks /usr/local/opt /usr/local/sbin /usr/local/share/zsh /usr/local/share/zsh/site-functions /usr/local/var==> /usr/bin/sudo /usr/bin/chgrp admin /usr/local/Cellar /usr/local/Homebrew /usr/local/Frameworks /usr/local/opt /usr/local/sbin /usr/local/share/zsh /usr/local/share/zsh/site-functions /usr/local/var==> /usr/bin/sudo /bin/mkdir -p /Users/wangliang/Library/Caches/Homebrew==> /usr/bin/sudo /bin/chmod g+rwx /Users/wangliang/Library/Caches/Homebrew==> /usr/bin/sudo /usr/sbin/chown wangliang /Users/wangliang/Library/Caches/Homebrew==> /usr/bin/sudo /bin/mkdir -p /Library/Caches/Homebrew==> /usr/bin/sudo /bin/chmod g+rwx /Library/Caches/Homebrew==> /usr/bin/sudo /usr/sbin/chown wangliang /Library/Caches/Homebrew==> Downloading and installing Homebrew...remote: Counting objects: 6451, done.remote: Compressing objects: 100% (3906/3906), done.remote: Total 6451 (delta 3730), reused 4275 (delta 2341), pack-reused 0Receiving objects: 100% (6451/6451), 3.58 MiB | 55.00 KiB/s, done.Resolving deltas: 100% (3730/3730), done.From https://github.com/Homebrew/brew * [new branch] master -> origin/master * [new tag] 0.1 -> 0.1 * [new tag] 0.2 -> 0.2 * [new tag] 0.3 -> 0.3 * [new tag] 0.4 -> 0.4 * [new tag] 0.5 -> 0.5 * [new tag] 0.6 -> 0.6 * [new tag] 0.7 -> 0.7 * [new tag] 0.7.1 -> 0.7.1 * [new tag] 0.8 -> 0.8 * [new tag] 0.8.1 -> 0.8.1 * [new tag] 0.9 -> 0.9 * [new tag] 0.9.1 -> 0.9.1 * [new tag] 0.9.2 -> 0.9.2 * [new tag] 0.9.3 -> 0.9.3 * [new tag] 0.9.4 -> 0.9.4 * [new tag] 0.9.5 -> 0.9.5 * [new tag] 0.9.8 -> 0.9.8 * [new tag] 0.9.9 -> 0.9.9 * [new tag] 1.0.0 -> 1.0.0 * [new tag] 1.0.1 -> 1.0.1 * [new tag] 1.0.2 -> 1.0.2 * [new tag] 1.0.3 -> 1.0.3 * [new tag] 1.0.4 -> 1.0.4 * [new tag] 1.0.5 -> 1.0.5 * [new tag] 1.0.6 -> 1.0.6 * [new tag] 1.0.7 -> 1.0.7 * [new tag] 1.0.8 -> 1.0.8 * [new tag] 1.0.9 -> 1.0.9 * [new tag] 1.1.0 -> 1.1.0 * [new tag] 1.1.1 -> 1.1.1 * [new tag] 1.1.10 -> 1.1.10 * [new tag] 1.1.11 -> 1.1.11 * [new tag] 1.1.12 -> 1.1.12 * [new tag] 1.1.13 -> 1.1.13 * [new tag] 1.1.2 -> 1.1.2 * [new tag] 1.1.3 -> 1.1.3 * [new tag] 1.1.4 -> 1.1.4 * [new tag] 1.1.5 -> 1.1.5 * [new tag] 1.1.6 -> 1.1.6 * [new tag] 1.1.7 -> 1.1.7 * [new tag] 1.1.8 -> 1.1.8 * [new tag] 1.1.9 -> 1.1.9 * [new tag] 1.2.0 -> 1.2.0 * [new tag] 1.2.1 -> 1.2.1 * [new tag] 1.2.2 -> 1.2.2 * [new tag] 1.2.3 -> 1.2.3HEAD is now at cd7e3cd Merge pull request #2778 from jasonkarns/tap-full-name==> Tapping homebrew/coreCloning into '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core'...remote: Counting objects: 4444, done.remote: Compressing objects: 100% (4245/4245), done.remote: Total 4444 (delta 35), reused 463 (delta 13), pack-reused 0Receiving objects: 100% (4444/4444), 3.53 MiB | 147.00 KiB/s, done.Resolving deltas: 100% (35/35), done.Checking connectivity... done.Tapped 4243 formulae (4,486 files, 11MB)==> Cleaning up /Library/Caches/Homebrew...==> Migrating /Library/Caches/Homebrew to /Users/wangliang/Library/Caches/Homebrew...==> Deleting /Library/Caches/Homebrew...Already up-to-date.==> Installation successful!==> Homebrew has enabled anonymous aggregate user behaviour analytics.Read the analytics documentation (and how to opt-out) here: http://docs.brew.sh/Analytics.html==> Next steps:- Run `brew help` to get started- Further documentation: http://docs.brew.sh