Harri Kaimio

     
 
Main | About Me »

Fun with Mindstorms & Old 8mm Films


 


 

As a teenager in the 80s I was actively shooting films with my Super8 camera. Most of the stuff was just documentary about my family and friends but I had also more ambitious projects. As so many other in that age I even dreamed of a career as professional film maker before choosing the easy way of playing for my strengths in physics and IT.

That was 20 years ago and I don't any more have a working film projector. I did transfer the films to VHS tape a long time ago but the quality was quite poor (and no, I don't have a VHS recorder either). So I have been looking for a way to could digitize the films with a better quality and into format that would stand time.

I have used an Epson 4990 scanner for digitizing my photo archive. It is a very high quality flatbed scanner that can scan 4 strips of 35 mm at once. The obvious question was that could I use it to scan my Super8 films as well?

The basic idea was simple: the scanner lid is wide enough to fit about 2 seconds of 8mm film at a time. If I could scan these, somehow extract the individual frames from the scanned image and move the next 2 sec of the film to the scanner... Should be easy, but this must be automated (I don't want to sit next to my scanner and transfer the film 30 times to get one minute of material...)



My sons love playing with LEGOs and the the Mindstorms robotic kit seemed just the perfect solution for building a prototype of my telecine concept. So we made a deal: they build the film transport system from LEGOs and I take care of the other parts, mainly the control and image processing software needed.

The Transport System


The LEGO part has two main functions: it must pull the film from scanner so that the next unscanned piece of film gets ready, and it must rotate the film reel into which the scanned film goes. We used 2 Mindstorms servo motors, one for each task.

The film is pressed between 2 soft Lego wheels that are rotated by one of the motors. We placed some guides on both sides to the wheels to ensure that the film moves straight (luckily, some Lego parts have exactly 8mm holes in them!)

The film reel is rotated with the other servo. We reused the film guides to detect when the film is tightened and the reel must be stopped.

The most difficult part was to figure out how to keep the film flat in the scanner. Because the frames are only 4x6 mm, even a small bend or twist causes visible warping in the scanned image.  We tried many alternatives (ranging from innovative Lego creations to correcting the warp in software), but finally we built a film guide from 2 stainless steel rulers that press the film from both sides against the scanner glass. The system is not perfect but good enough: There is still some jitter caused by bending film but that is tolerable.

The Software


So, the boys did their part and it was time for me to keep my promise! The Mindstorms central unit has a Bluetooth chip and Lego folks have done excellent job in documenting their system so controlling it from PC was easy. Controlling the scanning was another matter.

I ended up using VueScan (by Ed Hamrick) as a scanning software. Despite its, well, not so intuitive UI it can produce better image quality than any other scanning software I have tried. And as far as I know it is the only scanning software in Linux that supports infra-red cleaning. The problem: it is a GUI application and does not have any scripting support. So it required a relatively large amount of hacking to integrate it to other system (hint to Ed: I would love a command line version of VueScan!!!)

I scan 32 frames of film at once and save it as a single image. After that I use custom software to detect the perforations in the scanned image (they are the brightest areas in the scan, so this is relatively easy) and extract individual frames to separate files. Then I use the video encoder of my choice to create suitable video file.

The Results

The resulting video is of surprising high quality, considering that I haven't spent a lot of time for tuning the image processing part:



Things to Do

Of course, the current system is a prototype. The things I would like to do include:

Image enhancement. I haven't spent a lot of time in fine-tuning the image quality. The thing that disturbs me most is chromatic aberration. The small frame size exaggerates it and apparently the lenses in cheap S8 cameras were not really top quality. This shows up as colored edges around people and objects.

Correcting chromatic aberration is quite easy but integrating it to my processing pipeline needs still some work. Also, sometimes there is effect that looks like CA even in the centre of the image. I wonder if the viewfinder prism could cause this (In S8 cameras, part of the light coming through lens was reflected to viewfinder by a prism. There was no mirror mechanism as in SLRs and more expensive 16 and 35 mm film cameras)

Speed. Now it takes about 2 minutes to scan 2 seconds of film (with 4800 dpi resolution and infrared cleaning). This is quite OK for me as I can leave the system running overnight but of course it could be faster.

Integration. Now the system has been glued together from LEGOs, other off-the-shelf hardware, Python scripts, GUI testing toolkit (for controlling VueScan), commercial software, custom Java code and (literally) duck tape. It works but it isn't pretty. It would be much nicer to use (especially for others) if some of the components would be removed and the whole thing packaged into a single program.

Sound. Well, for now I have enough mute films to play with but digitizing sound needs some further thinking...

All in all, this was a fun project, full of interesting challenges for kids and dad alike. And even if you can learn a lot by just just playing with LEGOs is  it is still better to see how that differs from engineering a working system.



 
 
 
 
Comments:

This is a beautiful project on many levels. The hacking is sublime, and your results thus far are stunning. Very nice indeed.

Posted by Dave Eaton on joulukuu 09, 2007 at 08:41 AM EET #

Very nice project. What about releasing the software? ;)

Posted by Giovanni Ortu on joulukuu 09, 2007 at 09:55 AM EET #

I would love to see the software side of this project.

Posted by Bob Richardson on joulukuu 12, 2007 at 01:12 AM EET #

say hello to home telecine :P

Posted by Kaku on joulukuu 12, 2007 at 09:12 AM EET #

I'll try to write an entry about the software side in near future. What comes to releasing it, let's see - I would definitely like to do it but currently it is way too much of a hack, so it needs some serious work. Also, I currently use some commercial SW (Vuescan) that does not fit very well into this workflow - if anyone has pointers/experiences with FOSS solutions for high quality scanning (including good color correction & infrared cleaning) I could definitely have a look...

Posted by Harri on joulukuu 14, 2007 at 11:55 AM EET #

There is another site that is worth mentionning for anyone interested in transferring 8mm films to digital. Although the hardware part isn't well documented, the Java software is well integrated with source code available through sourceforge. It can control the scanner through TWAIN, trigger a film advance mechanism using parallel port, extract individual frames and eliminate overlapping ones automatically. The source isn't complete because of some license restrictions on fundamental routines extracted from an old 'c' numerical methods, but instructions are clear enough for an experienced programmer to get working binaries. With Christmas around, family memories could be a great gift for grand parents http://www.jiminger.com/s8/index.html

Posted by Sebastien Leclerc on joulukuu 17, 2007 at 03:11 PM EET #

I like this thing! Wery impresive! ;)

Posted by Runcio on joulukuu 17, 2007 at 06:56 PM EET #

Hi - cool project! I attempted something similar last year - but I hacked up an old Super 8 projector and drove it with a stepper motor to do the film advance. I also used VueScan and controlled the whole thing through Applescript (I'm on a Mac). Fairly hackish - since VueScan isn't scriptable but I got it to work very well. (polling the output folder to see if the file count had changed). The gotcha was that I was using and Epson scanner that only handled reflective artwork. I rigged a light to illuminate the film but there was no way to turn off the flatbed light (disconnecting it made the scanner non-functional). Someone just gave me an Epson with a transparency lid so the the lighting problem is solved. Was tinkering with the rig yesterday - VueScan is some quirky software! but it all works fine. I went with cropping to single frames rather than trying to locates frames, etc. t

Posted by tomjoad on joulukuu 19, 2007 at 03:44 AM EET #

There is another site that is worth mentionning for anyone interested in transferring 8mm films to digital. Although the hardware part isn't well documented, the Java software is well integrated with source code available through sourceforge. It can control the scanner through TWAIN, trigger a film advance mechanism using parallel port, extract individual frames and eliminate overlapping ones automatically. The source isn't complete because of some license restrictions on fundamental routines extracted from an old 'c' numerical methods, but instructions are clear enough for an experienced programmer to get working binaries. http://www.jiminger.com/s8/index.html

Posted by Sebastien on tammikuu 04, 2008 at 09:40 PM EET #

Hi, this is interesting. I haven been trying something similar with more regular lego, a custom made PC interface, an Epson 4870 and Linux. I did approach Ed Hamrick for some insights on how to use the infrared scanning on the Epson. He kindly told me that he preferred not since he did spend a lot of time on it. I have also been digging into Epson manuals and did some analysis of the USB communications between scanner and PC but the IR part seems to be driven by a rather complex command. I did resolve how to do the scanning without IR at high resolution but given the dust on the films, I have given up so far to proceed. I would appreciate if you can give more hints on how to drive the Vuescan software since that seems a nice way around my difficulties. Since my son has also a Mindstorm, I might go that way too. steven

Posted by steven on tammikuu 13, 2008 at 01:53 PM EET #

Amazing results. Did you use Python's imaging Library to develop the image extraction to slice the frames from the master image to individual bitmap files ? Then just build the movie file from those?

Posted by James on helmikuu 21, 2008 at 03:21 AM EET #

James: I use Java and Sun's Java Advanced Imaging library for image processing (mostly because I have used it for several projects earlier and I am familiar with it. But JAI also has pretty good support for processing large images in tiles with reasonable memory usage). I use Python only for controlling the scanning process (with BT connection to Mindstorms and Dogtail for controlling Vuescan)

Posted by Harri on helmikuu 24, 2008 at 11:06 AM EET #

Good start on the project. I have developed my own version and have started documenting my process at digireel.blogspot.com. I started selling film conversion services in January of 2007 using my system. It is a lot of fun to see something you develop yourself actually work and produce excellent results. Sometimes the quality of the end product amazes me.

Posted by Kyle Brunner on maaliskuu 03, 2008 at 12:15 AM EET #

[Trackback] So, at this point, you? re probably thinking? Well, Adam, you haven? t mentioned Senator John McCain at all, what about the Republican candidate?? I can not and will not lie about him. I? d love to give him fair coverage here in this blog post and give...

Posted by Hot Air Balloons | Up Up and Away on maaliskuu 25, 2008 at 12:33 AM EET #

Nice work there. Necesity is the mother of invention...I went with the workprinter route since I had some 40 400-foot reels...very very cool. Check out my website which is dedicated to super 8 and includes a video transfer section...

Posted by Mike on maaliskuu 27, 2008 at 04:09 AM EET #

[Trackback] The first responsibility of government is to protect the American people, the homeland, and our way of life. Today we face the urgent threat of radical Islamic terrorists. Al Qaeda is committed to attacking us here at home, and wants to use weapons of ...

Posted by ????? ???? on huhtikuu 25, 2008 at 03:10 PM EEST #

BRAVO!! So inspiring that I built my own Frankenstein telecine. With about zero programming skills, it was a challenge! I use AutoIT3 (an easy automation scripting program), Photoshop, and a crazy film advancer controlled via parallel cable. Takes about a week to do a one 3-minute reel, though. But looks great! Will have some up on the youtube soon.

Posted by Ken on toukokuu 12, 2008 at 12:59 AM EEST #

Firstly; I admire the language skills of the Finns. (My Suomi is rubbish - the only word I know is Thaimaa.) (I do have a few words of Thai, but not the accent.) However, English speakers will be unfamiliar with the month names on this page. P.S. there seem to be a few unrelated posts at the end.

Posted by P.Woods on syyskuu 11, 2008 at 11:44 PM EEST #

I'm very intrigued by this & may well try it out myself on some old silent comedies. If you already have Adobe AfterEffects 6 or 7, you might want to look at using Red Giant's Film Fix for post-processing. It should help stabilize the image & reduce the flicker. (Unfortunately, Film Fix costs USD800, or 400 if you have an academic discount. Myself, I'm waiting for a deeper discount.)

Posted by Dan McCormick on marraskuu 17, 2008 at 07:44 PM EET #

Hi, check out my blog post about my own experiments with scanning in super8 film with my epson perfection scanner: http://www.wg23.ch

Posted by Matthias on joulukuu 04, 2008 at 12:26 AM EET #

Post a Comment:
  • HTML Syntax: Allowed
 

« joulukuu 2014
matiketopelasu
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
    
       
Today
About Me
Software professional living in Finland. This blog is about my hobby projects, usually related to photography and technology.

See more

Valid XHTML or CSS?

[This is a Roller site]
Theme by Rowell Sotto.
 
© Harri