Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Raspberry Pi で星景写真

Raspberry Pi で星景写真

Kenichiro MATOHARA

August 15, 2021
Tweet

More Decks by Kenichiro MATOHARA

Other Decks in Technology

Transcript

  1. Raspberry Pi カメラでの星景写真 Raspberry Pi カメラでの星景写真 センサ感度から難しいと思っていた( のに) というソフトウェアを見つける Raspberry

    Piカメラで流星などを撮影するためのソフトウェア Raspberry Pi + CSIカメラでコンポジット撮影をお手軽に出来るよ うになる 他の組み合わせはNG 手元にv1, v2 のカメラがあるので試してみる 150万画素のコンデジで撮影し してたこともあった meteotuxpi 8 / 27
  2. Raspberry Pi公式ICS2接続カメラ Raspberry Pi公式ICS2接続カメラ バージョン 解像度 備考 v1 5MP -

    v2 8MP - HQ 12MP レンズ交換可能, C/CSマウント 指定可能パラメータにカメラごとに差異がある それぞれに今回向きのNoIR版もある Raspberry Pi Zeroの初代ではCSIコネクタがないので使えない Raspberry Pi ZeroではCSIコネクタが小型でケーブル形状が異なる 9 / 27
  3. 前準備 前準備 VRAMを128MB以上に raspi-config コマンドで Performance Options の GPU Memory

    を 128MB 以上にする カメラモジュールを有効に raspi-config コマンドで Interfacing Options の Camera を有効にする. カメラパイロットLEDをOFFに(option) /boot/config.txt ファイルに disable_camera_led=1 を 追記 meteotuxpi をダウンロードして適当な場所に展開して実行権を つけておく 11 / 27
  4. meteotuxpi 実行例 meteotuxpi 実行例 meteotux_pi -d 30 -e 2000 -g

    1 -v 総撮影時間30秒 露出時間2000ms ゲイン1 露出時間2秒の写真を30秒の間撮影し続けて合成して, 2021-08- 10T04:43:11+09:00.jpg のようなファイルとして保存を停止する まで続ける.撮影時間の指定なども出来るので,夜になったら撮影 開始,朝になったら撮影終了とかも指定可能. 12 / 27
  5. option option $ ./meteotux_pi Raspberry _pi meteor camera written (C)

    By Jani Lappalainen 2014-> version 1.5.18 Missing parameter -d Parameters: --drc Optional. Dynamic range compression level. Values:off/low/medium/high. Default va -d Required. Minimum duration of record of one image in seconds. Resticted to range exposure time (500ms*20=10s) to keep frames count equal on each image. -e Optional. Exposure time in milliseconds. Minimum value 100ms. Maximum value depend -f Optional. path/text added front of filename. Example: -f "images/allsky-" will wr on folder images. Folder images must exist. -g Optional. Manual gain to overwrite camera automatic gain control (AGC). Must be m (verbose) flag -h Optional. Show help. -t Optional. UTC start and end time; hh:mm-hh:mm. Example: --time 21:00-07:00 will ru is UTC+2. Default value 00:00-00:00 (infinite). -v Optional. Verbose. Shows more information. 13 / 27
  6. script script #!/usr/bin/perl use strict; use warnings; my $out="out_lighten.bmp"; my

    @list= glob('*.JPG'); my $N=$#list+1; my $i=0; foreach my $file (sort @list) { $i++; if ($i == 1) { print "\n#$i/$N cp $file $out\n"; my @args = ( "convert", $file, $out ); system(@args) == 0 or die "system @args failed: $?"; } else { print "#$i/$N composite -compose lighten $file $out $out\n"; my @args = ( "composite", "-compose", "lighten", $file, $out, $out ); system(@args) == 0 or die "system @args failed: $?"; } } 19 / 27
  7. タイムラプス動画にしてみる タイムラプス動画にしてみる 追記とかできないかな? $ cat 2021*.jpg out_lighten_2021-08-*.jpg | \ ffmpeg

    -f image2pipe -vcodec mjpeg -r 8 -i - -codec copy output.mkv https://www.youtube.com/watch?v=o3Sk2DyxNis 21 / 27