
Version 1.0.9
Terminal から以下のコマンドでインストール・起動して下さい。
pip install trainscanner
trainscanner
開発中の版を試してみたい場合はこちら。
pip install 'git+https://github.com/vitroid/TrainScanner.git#beta'
手持ち撮影でもきれいにつながるように、trainscannerで列車をつなぐ前に、手ぶれをとりのぞくツールです。
antishake
ムービーが画像ファイルに展開されるので、それなりのディスク容量が必要です。生成した画像ファイルの束は、ディレクトリごとtrainscannerで読みこめます。
TrainScanner で作成した画像は巨大でしかも長大なので、そのままでは取り扱いにくいため、見易いようにいろんな変換プログラムを準備しました。
ts_converter
pynojector をインストールすると、ts_converter に機能が追加されます。
pip install https://github.com/vitroid/pynojector.git
rectify: 長い画像を何段かに切りわけるツール長い画像を、定型用紙に入るように「円筒に巻く」プログラムです。こちらは、画像がななめにならない代わり、円筒をのりづけする時にずらす必要があります。
rectify longimage.png
usage: rect.py [-h] [--output OUTPUT] [--rows ROWS] [--overlap OVERLAP]
[--head-right] [--thumbnail] [--width WIDTH]
image_path
Fold a train image into a stack of images
positional arguments:
image_path Path of the input image file
options:
-h, --help show this help message and exit
--output OUTPUT, -o OUTPUT
Path of the output file
--rows ROWS, -r ROWS Number of rows-- 1:25
--overlap OVERLAP, -l OVERLAP
Overlap rate (percent)-- 0:100
--head-right, -R The train heads to the right.
--thumbnail, -t Add a thumbnail image (Hans Ruijter's style)
--width WIDTH, -W WIDTH
Width (pixels, 0 for original image size)-- 0:10000
movify: スクロール動画を生成するツールスクロール動画を生成します。
movify longimage.png
usage: movie.py [-h] [--output OUTPUT] [--duration DURATION] [--height HEIGHT]
[--width WIDTH] [--head-right] [--fps FPS] [--crf CRF] [--png]
[--alternating] [--accel] [--encoder ENCODER] [--thumbnail]
[--imageseq]
image_path
Make a movie from a train image
positional arguments:
image_path Path of the input image file
options:
-h, --help show this help message and exit
--output OUTPUT, -o OUTPUT
Path of the output file
--duration DURATION, -d DURATION
Duration of the movie (seconds)-- 10:1000
--height HEIGHT, -H HEIGHT
Height of the movie-- 100:4096
--width WIDTH, -W WIDTH
Width of the movie-- 100:4096
--head-right, -R The train heads to the right.
--fps FPS, -r FPS Frame rate-- 1:120
--crf CRF, -c CRF CRF (Constant Rate Factor) -- 16:30
--png, -p Intermediate files are png
--alternating, -a Go back and forth
--accel, -A Acceleration
--encoder ENCODER, -e ENCODER
mp4 encoder
--thumbnail, -t Add a thumbnail (Yamako style)
--imageseq, -i Make a sequence of images
TrainScanner.appは、pass1.pyとstitch.pyという 2 つのプログラムを呼びだすためのラッパーで、これらのプログラムは単独でも動作します。列車の移動量の検出がうまくいかなかった場合など、手直ししたい場合には、tsconfファイルとtsposファイルを手で修正して、より良い結果を得ることもできます。
それぞれのコマンドには多数のオプションがあります。-hオプションを付けて、使い方を見て下さい。ほとんどのオプションはtrainscanner_gui.py (アプリケーション名はTrainScanner.app, TrainScanner.exe)上で指定できますので、グラフィック表示ができる環境であれば、GUI を使うことをお勧めします。ただし、tsconfファイルとtsposファイルを手で修正した場合はstitch.pyを使いたくなるかもしれません。
trainscanner_pass1: 照合プログラムビデオを読みこみ、列車の移動を検出し、移動量を.tsposという名前のファイルに出力します。
trainscanner_pass1 video.mov
trainscanner_stitch: 結合プログラムpass1.py の出力に従い、映像を連結して 1 枚の大きな写真を作ります。通常は、以下のように、pass1.py が出力した.tsconfファイルを読みこんで使用します。
trainscanner_stitch @video.mov.12345.tsconf
@マークは、コマンドラインオプションをファイルからインクルードすることを意味します。この後ろに、さらにオプションを追加することで、スリット位置やフレーム間のぼかし幅を調節できます。例えば、あとからスリット位置と幅をそれぞれ 220 と 1.5 に変えたい場合は、
trainscanner_stitch @video.mov.12345.tsconf -s 220 -w 1.5
のようにします。GUI を使う場合には、設定を変える度に pass1.py も実行せざるをえませんが、stitch.py を直接使えば、よりすばやく結果を得られます。
trainscanner: 統合ユーザーインターフェイスtrainscanner_pass1とtrainscanner_stitchを統合し、オプションを対話的に設定できる UI を備えた TrainScanner の本体です。Windows の exe ファイルや macOS の App はこれをパッケージ化したものです。
--debugオプションが意図せず.tsconfファイルに保存される問題を解決trainscanner.trainscannerからtrainscanner.image.Transformationへの移行pass1.py: --debugオプションがaction="store_true"の適切な処理を追加stitch.py: ファイル読み込み時のエンコーディング指定subpixel_match to use CCOEFF method and adjusted handling of maximum acceleration in motion function. Enhanced parameter handling for improved flexibility in image processing.subpixel_match to use CCOEFF method and adjusted handling of maximum acceleration in motion function. Enhanced parameter handling for improved flexibility in image processing.subpixel_match to use CCOEFF method and adjusted handling of maximum acceleration in motion function. Enhanced parameter handling for improved flexibility in image processing.subpixel_match to use CCOEFF method and adjusted handling of maximum acceleration in motion function. Enhanced parameter handling for improved flexibility in image processing.subpixel_match to use CCOEFF method and adjusted handling of maximum acceleration in motion function. Enhanced parameter handling for improved flexibility in image processing.Python
97.9%
Makefile
1.4%

Version 1.0.9
Terminal から以下のコマンドでインストール・起動して下さい。
pip install trainscanner
trainscanner
開発中の版を試してみたい場合はこちら。
pip install 'git+https://github.com/vitroid/TrainScanner.git#beta'
手持ち撮影でもきれいにつながるように、trainscannerで列車をつなぐ前に、手ぶれをとりのぞくツールです。
antishake
ムービーが画像ファイルに展開されるので、それなりのディスク容量が必要です。生成した画像ファイルの束は、ディレクトリごとtrainscannerで読みこめます。
TrainScanner で作成した画像は巨大でしかも長大なので、そのままでは取り扱いにくいため、見易いようにいろんな変換プログラムを準備しました。
ts_converter
pynojector をインストールすると、ts_converter に機能が追加されます。
pip install https://github.com/vitroid/pynojector.git
rectify: 長い画像を何段かに切りわけるツール長い画像を、定型用紙に入るように「円筒に巻く」プログラムです。こちらは、画像がななめにならない代わり、円筒をのりづけする時にずらす必要があります。
rectify longimage.png
usage: rect.py [-h] [--output OUTPUT] [--rows ROWS] [--overlap OVERLAP]
[--head-right] [--thumbnail] [--width WIDTH]
image_path
Fold a train image into a stack of images
positional arguments:
image_path Path of the input image file
options:
-h, --help show this help message and exit
--output OUTPUT, -o OUTPUT
Path of the output file
--rows ROWS, -r ROWS Number of rows-- 1:25
--overlap OVERLAP, -l OVERLAP
Overlap rate (percent)-- 0:100
--head-right, -R The train heads to the right.
--thumbnail, -t Add a thumbnail image (Hans Ruijter's style)
--width WIDTH, -W WIDTH
Width (pixels, 0 for original image size)-- 0:10000
movify: スクロール動画を生成するツールスクロール動画を生成します。
movify longimage.png
usage: movie.py [-h] [--output OUTPUT] [--duration DURATION] [--height HEIGHT]
[--width WIDTH] [--head-right] [--fps FPS] [--crf CRF] [--png]
[--alternating] [--accel] [--encoder ENCODER] [--thumbnail]
[--imageseq]
image_path
Make a movie from a train image
positional arguments:
image_path Path of the input image file
options:
-h, --help show this help message and exit
--output OUTPUT, -o OUTPUT
Path of the output file
--duration DURATION, -d DURATION
Duration of the movie (seconds)-- 10:1000
--height HEIGHT, -H HEIGHT
Height of the movie-- 100:4096
--width WIDTH, -W WIDTH
Width of the movie-- 100:4096
--head-right, -R The train heads to the right.
--fps FPS, -r FPS Frame rate-- 1:120
--crf CRF, -c CRF CRF (Constant Rate Factor) -- 16:30
--png, -p Intermediate files are png
--alternating, -a Go back and forth
--accel, -A Acceleration
--encoder ENCODER, -e ENCODER
mp4 encoder
--thumbnail, -t Add a thumbnail (Yamako style)
--imageseq, -i Make a sequence of images
TrainScanner.appは、pass1.pyとstitch.pyという 2 つのプログラムを呼びだすためのラッパーで、これらのプログラムは単独でも動作します。列車の移動量の検出がうまくいかなかった場合など、手直ししたい場合には、tsconfファイルとtsposファイルを手で修正して、より良い結果を得ることもできます。
それぞれのコマンドには多数のオプションがあります。-hオプションを付けて、使い方を見て下さい。ほとんどのオプションはtrainscanner_gui.py (アプリケーション名はTrainScanner.app, TrainScanner.exe)上で指定できますので、グラフィック表示ができる環境であれば、GUI を使うことをお勧めします。ただし、tsconfファイルとtsposファイルを手で修正した場合はstitch.pyを使いたくなるかもしれません。
trainscanner_pass1: 照合プログラムビデオを読みこみ、列車の移動を検出し、移動量を.tsposという名前のファイルに出力します。
trainscanner_pass1 video.mov
trainscanner_stitch: 結合プログラムpass1.py の出力に従い、映像を連結して 1 枚の大きな写真を作ります。通常は、以下のように、pass1.py が出力した.tsconfファイルを読みこんで使用します。
trainscanner_stitch @video.mov.12345.tsconf
@マークは、コマンドラインオプションをファイルからインクルードすることを意味します。この後ろに、さらにオプションを追加することで、スリット位置やフレーム間のぼかし幅を調節できます。例えば、あとからスリット位置と幅をそれぞれ 220 と 1.5 に変えたい場合は、
trainscanner_stitch @video.mov.12345.tsconf -s 220 -w 1.5
のようにします。GUI を使う場合には、設定を変える度に pass1.py も実行せざるをえませんが、stitch.py を直接使えば、よりすばやく結果を得られます。
trainscanner: 統合ユーザーインターフェイスtrainscanner_pass1とtrainscanner_stitchを統合し、オプションを対話的に設定できる UI を備えた TrainScanner の本体です。Windows の exe ファイルや macOS の App はこれをパッケージ化したものです。
--debugオプションが意図せず.tsconfファイルに保存される問題を解決trainscanner.trainscannerからtrainscanner.image.Transformationへの移行pass1.py: --debugオプションがaction="store_true"の適切な処理を追加stitch.py: ファイル読み込み時のエンコーディング指定subpixel_match to use CCOEFF method and adjusted handling of maximum acceleration in motion function. Enhanced parameter handling for improved flexibility in image processing.subpixel_match to use CCOEFF method and adjusted handling of maximum acceleration in motion function. Enhanced parameter handling for improved flexibility in image processing.subpixel_match to use CCOEFF method and adjusted handling of maximum acceleration in motion function. Enhanced parameter handling for improved flexibility in image processing.subpixel_match to use CCOEFF method and adjusted handling of maximum acceleration in motion function. Enhanced parameter handling for improved flexibility in image processing.subpixel_match to use CCOEFF method and adjusted handling of maximum acceleration in motion function. Enhanced parameter handling for improved flexibility in image processing.Python
97.9%
Makefile
1.4%