LoginSignup
5
5

More than 5 years have passed since last update.

Raspberry Pi(Raspbian)で写真を撮る方法

Last updated at Posted at 2019-02-05

はじめに

Raspberry Pi(Raspbian)で写真を撮る方法です。

raspistillコマンドを使用する方法は実用的ではないので、
写真を撮るプログラムを作成する前の準備だと思って下さい。

必要なもの

  • RaspbianがインストールされているRaspberry Pi
  • Raspberry Pi用のカメラモジュール
  • 変換ケーブル(Raspberry Pi Zeroを使用する場合のみ)

Raspberry Piにカメラモジュールを接続する

  1. Raspberry Piの電源をOFFにする
  2. Raspberry PiのCAMERAと書かれている部分にカメラモジュールを接続するDSC_0156.JPG
  3. カメラが基盤などに触れないようスタンドに設置する(壊れなければOK)DSC_0159.JPG

Raspberry Pi(Raspbian)のカメラを有効にする

  1. 「Raspberry Piの設定」を開く2019-02-05-130530_1824x984_scrot.png
  2. インターフェイスカメラ有効にする2019-02-05-130600_826x441_scrot.png
  3. Raspberry Piを再起動する

写真を撮る方法

  1. LXTerminalを起動する
  2. 被写体にカメラを向ける
  3. raspistill -o ファイル名.jpgコマンドを実行する2019-02-05-130838_659x422_scrot.png
  4. /home/pi直下に写真が保存される2019-02-05-131715_947x685_scrot.png
  5. 写真撮影完了photo.jpg

動画を撮る方法

  1. raspivid -o ファイル名.h264コマンドを実行する

写真の上下が逆になる場合の対処法

  • raspistillコマンドのオプションに-vf-hfを追加して上下左右を反転させる

参考

5
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
5