1 篇文章带有标签 “photography”

IoT 硬件:Raspberry Pi Camera

配置

Camera

$ sudo raspi-config
  • 3 Interface Options Configure connections to peripherals
  • P1 Camera Enable/disable connection to the Raspberry Pi Camera
  • Yes
reboot

显存

保证显存 >= 128

  • 查看
$ cat /boot/config.txt | grep gpu_mem
gpu_mem=128
  • 修改
$ vim /boot/config.txt

检测 Camera

如果没有检测出来,可以考虑重新插拔试试。

$ vcgencmd get_camera
supported=1 detected=1

验证

拍照 raspistill

  • 打开摄像头,预览2秒后关闭。
raspistill -t 2000
  • 打开摄像头,5秒后拍照(默认),保存为 image.jpg。
raspistill -o image.jpg
  • 打开摄像头,3秒后拍照,保存为 image.png,宽640:高480。
raspistill -t 3000 -o image.png -e png -w 640 -h 480
  • 打开摄像头,30秒内每2秒保存一张照片。
raspistill -t 30000 -tl 2000 -o image%04d.jpg