02.16
For about a week now, I’ve been playing around with some old movies from my parents and grand parents. I wanted to digitize these old movies before they were lost forever, and for that purpose I rigged up a Goko Telecine Player and connected my digital video camera to it. This was a total failure, probably because of mismatching framerates, broken hardware and skills on operating it. Anyway, I couldn’t get the camera to record the picture correctly, at any framerate, having fixed the focus and brightness-control issues (The movies are 18 or 24 fps, and the camera is 30 fps).
I searched around on the internet for clues to this problem, and without any concrete solutions I discovered lots of other methods on digitizing this bloated movie format. My favorite method was using a flatbed scanner. I kind of laughed at this at first, but when I discovered that quite many people actually does this, and the result they were getting were great, I began to plan my own contraption of this sort.
Having all the parts I needed, I started right away.
First of all, the scan has to be automated. My scanner is really slow at high resolutions, and waiting for the scanner to finish scanning ~18 frames takes about 1 minute and 30 seconds. Multiply this with seconds of film and you’ll get the picture. Automating the scan-process was amazingly simple with Mac OSX and Objective-C using the Image Acquisition framework. You just give it some area to scan, initializes it with the scan type you want (transmissive, colored), and you’re off to go. It even handles filenames and increments them, so just fire and forget.
The next problem was to actually move the film forward after each scan. For this I used a dc-motor I had laying around, and connected this to a Phidgets Motor Controller which is USB-based and really easy to use (like four C-functions, and it runs with no fuzz). A standard 8mm film reel is mounted to the motor with a couple of screws and some glue :) So after every scan, I ran the motor at a given speed for about a second and scanned again (rinse, repeat). I fine tuned these numbers to how many frames I wanted to pass through. I could only fit ~16-17 frames in one scan due to a design flaw in my scanner.
Another problem was to keep the film in an exact path and completely horizontal. This is more of a physical problem, than a software problem, and I solved it by gluing a couple of guides the film could go through on a plexi-glass that I then layed on the flatbed.
8mm movie reels are mounted on the old telecine player, just because it was practical at the time being, and the movie goes from there to the dc-motor via guides on the scanner.
Now that the software is able to scan and move the film, I can let it work through the night. It takes about 6-7 hours to scan a 2-3 minute long movie. The scanner needs to adjust its scanhead between every scan, and this takes a few seconds. Really annoying. The result is about 250 images at 25MB each (PNG, 4800 dpi). These images contains ~16 frames, and I needed to split these frames to separate files. After each scan, I also check if >20% of the image is colored, that is, not completely white (by a given threshold). If 80% of the scanned image is white, I stop the process and the film scan is complete. This prevents the scanner keep running without any film to scan ;)
This frames are pretty randomly placed within these slides, so the position of each frame has to be calculated. There is many examples and sample code for doing this, and many uses the Canny edge detection algorithm. The “sprocket” (the rectangle on the side of each frame) on the film is very highlighted on the scans, and therefor very easy to detect. I didn’t use this algorithm, I based my detection completely on the color brightness of one row of pixels at a given x-coordinate. By doing this I could detect the beginning and ending of a sprocket, and knowing this is placed at the center of each frame (Super8 only, on legacy 8mm the sprocket has a different position, and size for that matter), I knew the height of each frame. The width is constant, and no problem for my software. I also did some sanitizing of frame sizes, to skip half-frames and such.
Having all the frames ready in incremental numbers, I fed them to QuickTime’s “Open Image Sequence”, and there the movie was ready to play. To finish I clicked export and tweaked a coloring filter to do some easy enhancing, and the result was a pretty nice 640×480 movie, and a lot better than what I could expect from the telecine player I rigged at first.
The process is tedious, but when automated it’s doable. QuickTime does a great job on putting the frames together.
Here’s a screenshot of my Mac-application that does all the magic:
It renders a preview after each scan, this has no practical purpose, but it looks cool! I hope to release the source code soon after cleanups and memleak-fixes (eats a good chunk of 2GB on a good night ;).
Oh, and here is a screenshot of a rendered movie. I’ll upload a sample movie as soon as I convert one to Flash/FLV/Ogg Theora or whatever you kids manage to play. I get too many complaints on QuickTime .mov-files :-)
This is without any filtering and the frame cut is a bit bigger than necessary.
If you like this project, check out more details around the movie format, build methods, code etc on these links:
Thanks to these guys this project became a success. Pictures of the configuration is coming also, for now this video will have to do:
This is a video from the early stages of the project, before I had a guide for the film, thus getting scewed frames. I will update this soon.



