To get the first result out of the LineScanner project some hand-work was required which is described below.

Create some videos with the setup described earlier. Filming vertically increases the resolution of the result later. I used the 720p mode with 120 frames per sesond. That means, that the final picture has a vertical resolution of 1280 pixels. The horizontal resolution is time-dependent. 120fps means that for each single second of video you would have 120 pixels in picture-width. A one-minute clip would result in a 7200 pixel-wide picture. A one-hour long clip would be 432000 pixels in width.

Convert the video to individual frames and extract a single column out of each frame. Can be done with ffmpeg.

ffmpeg -i video.mp4 -vf "crop=1280:8:0:360,transpose=2" -q:v 1 -f image2 "./lines/line-%06d.jpg"
  • uses video.mp4 as input-file [-i video.mp4]
  • extracts a 8-pixel wide column out of the center of each frame [crop=1280:8:0:360] and rotates it by 90 degrees [transpose=2]
  • converts the result to individual images [-f image2] in a new sub-directory named lines [./lines/line-%06d.jpg]

Concatenate all columns horizontally to a single picture. For that I probably used the worst approach possible - which is called PHP and its gd library. Because of practical knowledge I gathered over the years I knew that I could implement this quickly, but also knew that it would be awesomely slow.

This picture-result stems from a 40s long clip that I took driving from the Mörsenbroicher Ei into the beginning of the Mörsenbroicher Weg in Düsseldorf, Germany. On the left side you see the ARAG tower which is 32-stories high.