攝像頭安裝
參見:http://www.eeboard.com/bbs/thread-38684-1-1.html
#有問題都可以在網上找到解決方法
sudo raspi-config Enable Camera
#raspistill 拍照
-v:調試信息查看。
-w:圖像寬度 -h:圖像高度 -rot:圖像旋轉角度,只支持 0、90、180、270 度
-o:圖像輸出地址,例如image.jpg,如果文件名為“-”,將輸出發送至標准輸出設備 常配合管道
-t:獲取圖像前等待時間,默認為5000,即5秒-tl:多久執行一次圖像抓取
raspistill -o image.jpg # -o 輸出
#raspivid 錄像 基本參數同拍照一樣
raspivid -o mi.h264
#配合管道輸出,可通過VLC輸入網絡串流地址查看:
sudo raspivid -o - -t 0 -w 640 -h 360 -fps 25|cvlc -vvv stream:///dev/stdin --sout '#standard{access=http,mux=ts,dst=:8090}' :demux=h264
http://picamera.readthedocs.io/en/release-1.2/ # 樹莓派官方攝像頭文檔 Picamera庫
http://bbs.ickey.cn/community/forum.php?mod=viewthread&tid=45847 #部分翻譯