This document is outdated. README_ja.md is more frequently updated.
Python3 packages. On installing OpenCV3, specify
--with-ffmpeg --with-tbb --with-python3 --HEAD options.
###Install by pip
Install the trainscanner from the PyPI with pip3 command:
% pip3 install trainscanner % trainscanner
###Install by homebrew (mac) It installs everything required. (PyQt5, OpenCV3 with options, Python3)
% brew tap vitroid/homebrew-TrainScanner % brew install trainscanner % trainscanner
##How to capture the video Capture the whole train from the side with a video camera.
- Tripod is necessary.
- Pay attention to use tripod on the station platform.
Other advises are listed in the last section. ##Open in TrainScanner
- Open the video file by pressing the "Open the movie" button. If you fail to open the movie, try conversion with ffmpeg etc.
- When file is successfully opened, a large dialog window appears. There are three panels in the window. Top panel is the frame selector, left panel is for the deformation, and right panel is for specifying the motion detection window.
- First of all, find the first frame, that is, the frame in which the train is about to enter in the sight, by clicking the thumbnail bar.
- Select a frame by the slider below the thumbnail bar.
- If the video is captured in portrait, or the camera is a little bit slanted, rotate the photo using the buttons below the left panel.
- Four sliders at the four corners of the left panel is the perspective correction. (You can skip this step).
- In the right panel, specify the location of the motion detection window. By default, the window is at the central one third of the image.
- Red lines in the right panel indicates the positions of the slit. That is, the long image strip is made from the thin image at this red line of each video frame. You can move the slid with the slider at the bottom.
##Stitch in TrainScanner When you finished editing the frames, let's go stitching.
- Go back to the first, small dialog. (Do not close the large window.) Just press the "Start" button. Firstly, a motion detection dialog window appears, in which interframe difference is shown. If the two successive frames are identical, the window becomes white, while difference is indicated in colors. If the software detect the train motion correctly, the image region of the train becomes white and the background becomes colored. (Note: it takes fairly long time for now because the seeking feature in OpenCV2 is very inaccurate. Sorry for convenience.)
- After the motion detection is completed, a stitching dialog appears. In the window, you can watch the making process of the long train image strip. After completing the stitch, the product image is saved at the same folder where the original video resides.
##For better product photo ...
- 2016-11-11 GUI Version 0.1 is released.