Jump to content


Photo

DIY Film Scanner (With Samples)

Film Scanner

  • Please log in to reply
119 replies to this topic

#1 Josh Gladstone

Josh Gladstone
  • Basic Members
  • PipPipPipPip
  • 323 posts
  • Editor
  • Hollywood

Posted 25 July 2013 - 11:36 AM

Hey everyone,

 

So I've been working on a DIY film scanner and I've got it working somewhat well, so I thought I would share it here just to see if anyone else is interested. It uses an old Dejur Super 8 projector, which is run with a stepper motor and an Arduino. The camera is a Sony XCD U100CR color machine vision camera capable of 1200x1600 pixels. The camera is connected via Firewire using libdc1394 and OpenCV. The software is written in Python, and I'm running it in OSX (10.8.3, if you're curious). I'm still not set on the optics, but currently I'm using a medium format camera lens reversed on a sort of macro rig. But I'm working on that. The Arduino also fires an LED backlight.

 

I call it StepCapture. It runs autonomously, just set it and forget it. Well, in theory. I'm still working out some bugs. And it does take a really long time. About 3 seconds per frame. So about an hour per minute of footage. And setup can take 20 or 30 minutes. But like I said, I'm still working on it!

 

So here's a demo video showing how it works. Note, I'm now using a 9-LED setup.

 

It outputs 1200x1600 sequential tiff files (or jpegs). From that I usually import into Quicktime, save a reference movie, and work with that in Final Cut for sound and any color correction.

 

So here are some samples. Keep in mind, some of this stuff was footage I'd been handling a lot testing the system out, so it's pretty dirty. I'm also still in the process of properly timing the stepper motor and projector, so the image does sometimes roll.

 

Here's some early test footage with Tri-X:

 

This is some more Tri-X:

 

Here's some Ektachrome 100D (and 1 shot of Tri-X):

 

Here's my first test of Vision3 negative. Note that it's 500T and I was shooting outdoors as the sun was starting to go down. I did some quick color correction to take out some of the blue:

 

Here's some Tri-X hand-processed in Caffenol:

http://www.youtube.com/watch?v=TmqiFnlEyAc

 

In all the cost of the project was something like this:

 

Camera: $200 on ebay

Projector: $50

Stepper motor: $30

EasyDriver (for the motor): $15

Arduino: $25

 

Lets say between $325 and $400.

 

So that's pretty much it. If there's any interest I'm happy to share everything, answer any questions, talk about the features, future developments etc.

 

Thanks for reading!


Edited by Josh Gladstone, 25 July 2013 - 11:39 AM.

  • 0

#2 Zac Fettig

Zac Fettig
  • Basic Members
  • PipPipPipPip
  • 338 posts
  • Other
  • Boston

Posted 27 July 2013 - 11:13 PM

I love it! I'd love to have something like this for small runs with 16mm, before paying for a full TK.

 

Love that you ran it through with negative. It looks like it doesn't have much noise for what it is. Maybe it's an advantage to the lng cycle time?

Did you get the stepper motor from Sparkfun?


  • 0

#3 Josh Gladstone

Josh Gladstone
  • Basic Members
  • PipPipPipPip
  • 323 posts
  • Editor
  • Hollywood

Posted 28 July 2013 - 01:17 AM

Thanks!

 

Sure did get it from Sparkfun. It's this motor, plus EasyDriver and Arduino Uno. I started off using the projector's original motor slowed down as far as it would go and still turn everything, and I was using a modified mouse button to register frames. It definitely scanned fast, but it was inaccurate and jittery, and sometimes it would capture the pulldown. So I figured it was better to go the stepper motor route. I didn't realize how slow it would be at the time, but at least it works!

 

The added bonus is that it should work with almost any camera. It'll definitely work with any camera that works in OpenCV, so far I've tested my machine vision camera, and an HDV camera, and both of those open up no problem. The built in iSight even opens, so theoretically that's even a possibility. I'm not sure about DSLRs, but even if they didn't work in OpenCV, the code could probably be modified to capture a frame some other way. Could get some ludicrous resolutions that way too...

 

I was really surprised the color negative stuff came out as well as it did. Here's an un-corrected frame, just a straight inversion:

BKZUcOq.jpg

I really didn't expect it to work at all, and then this stuff started coming up on my computer. Crazy. Anyway, I'm going to try and shoot some 50D next week and see how that does. I expect good things!

 

And yes! 16mm! Absolutely! I just got a Beaulieu r16, so that's definitely on my list of to-do's.


  • 0

#4 Peter Charuza

Peter Charuza
  • Guests

Posted 28 August 2013 - 07:39 PM

I can't wait to see how this progresses. I'm currently in school for electrical engineering, I wish I could lend a hand but I havn't gotten that far in my studies to really be a functional programmer/circuit designer...

 

There certainly needs to be a good DIY film scanning solution. From what I've looked at used professional HD Models are approx. 17 grand and pretty much ceiling around 100grand. Granted for 100grand you're getting a fine piece of machinery, that will work any type of film from Nitrate to fresh Kodak.   There's been more and more home brew setups cropping up. I think we can put something killer together for under 5 grand total parts. And I mean HIGH REZ. 1080p or higher, 24frames.

 

I'm going to do some more research on how the high end telecines function. This is a goal of mine to be able to scan my own film. Save on over half the cost of going to the lab, and would allow me to get the best prints possible to work from. 


  • 0

#5 David Mullen ASC

David Mullen ASC
  • Sustaining Members
  • 19759 posts
  • Cinematographer
  • Los Angeles

Posted 28 August 2013 - 07:52 PM

I wonder if a color filter on the pick-up device or projector source could help improve the colors from a scan of negative by canceling some of the color mask.  I guess it would be a cyan filter... though your converted frame already looks cyan -- I wonder if the camera was properly white-balanced.
  • 0

#6 Josh Gladstone

Josh Gladstone
  • Basic Members
  • PipPipPipPip
  • 323 posts
  • Editor
  • Hollywood

Posted 29 August 2013 - 02:20 PM

Hey guys, thanks so much for the comments!

 

David, I think that's a really good idea. Cyan should work, I think. I'll keep that in mind as I continue to experiment with negative color stocks.

 

Peter, I'm definitely getting more than HD as far as image size goes (vertical resolution anyway), so it's certainly possible. I'd recommend checking out the Muller HM film scanner for inspiration. That does some of the best scans I've seen.

 

And since there's some interest in this thing after all, I thought I'd share some little updates. I've upgraded the optics to a Schneider Componon 80mm enlarger lens, which is worlds better than the repurposed medium format lens I was using before. I've also filed out my gate a bit, although I'm not quite finished with that yet.

 

I also started using a 9-LED array as a light source, which led (pun!) to an interesting experiment. Since the scanner moves so slowly, I can expose each frame as many times as I want before advancing. So I decided to find out what happens if I do some bracketing. I captured each frame 3 times, once with 3 LEDs illuminating it, once with 6 LEDs, and once with all 9 lit up. This gives me 3 different exposures of the same image, one underexposed, one overexposed, and one in the middle. I then composited these images in PhotomatixPro. Here are some sample images:

 

This is the finished bracketed image, after being composited in Photomatix: 

OTp84bR.jpg

 

And here are the three exposures I got out of the scanner:

wckoJ57.jpg

7dI03CH.jpg

3A1E7cY.jpg

 

And now everything in motion. I made a "normal" version to compare the bracketed version to. The normal version uses just one of the exposures, so no compositing necessary (I went with the most underexposed and then corrected the levels in FCP)

The normal version:

The bracketed version (with side by side comparison at 30 seconds):

 

All in all, the bracketing takes a lot longer to capture and process, and I don't really think it adds that much. You get some more detail and things do appear sharper, but it also seems to flatten out the image tonally. But an interesting experiment nonetheless, and a cool option to have.


Edited by Josh Gladstone, 29 August 2013 - 02:25 PM.

  • 0

#7 Jeremy Cavanagh

Jeremy Cavanagh
  • Sustaining Members
  • 128 posts
  • Other

Posted 30 August 2013 - 01:28 PM

Thanks for posting this. I was interested your use of an Arduino, a stepper motor and OS X as I have also been thinking about building a DIY scanner having been inspired by the Cine2digits website which is very good and sets out a detailed approach. So far I have only bought a couple of projectors to try and convert. 

 

Can I ask, is it difficult to link the turns on the stepper motor to pulling a full film frame down (I'm an electrical engineer but haven't done this sort of stuff for years so part of the attraction for me is discovering how to do this)?

 

I would like to try using a monochrome machine vision camera and using LEDs flash three separate frames and combine them (plus an HDR frame if I succeed with R+G+B frames) in processing to get over the limitations of a Bayes filter but have been warned that it would be very difficult to combine the three frames as a film frame, even though still, would not be steady enough to overlay three scans of the same film frame.


  • 0

#8 Josh Gladstone

Josh Gladstone
  • Basic Members
  • PipPipPipPip
  • 323 posts
  • Editor
  • Hollywood

Posted 30 August 2013 - 04:14 PM

Hey, I'm just glad there's any interest at all, so I'm happy to answer any questions. I should mention that I'm not an engineer of any sort. Before this project, I'd never used an Arduino and never written a line of Python. I watched the few videos on Youtube I could find for design inspiration, but I'd never even heard of Cine2digits before a couple weeks ago. I REALLY wish I had. Point is, I'm making all this up as I go along. Trial and error.

 

So it turns out it actually is very difficult to synchronize the number of steps to the movement of the projector. It's pretty easy to get really close (i.e. no problems for a few hundred or thousand frames), but if you watch almost any of my videos, you'll see that the picture tends to roll every now and then. That's exactly because I'm out of sync by a few microsteps per 1 full revolution. Too few steps and the image rolls down, too many and it rolls up. I recently lubed all the moving parts of the projector, and that seemed to affect the number of steps for a full revolution, too. So it's tricky. You can adjust the number of steps per revolution on the fly in the program, but it's still one of the the only reasons that I stick around to monitor a capture (the others being dust in the gate and to turn it off when it finishes). I've thought about some sort of magnetic or physical trigger to overcome this, so I might look into that.

 

As far as using three LEDs and a monochrome camera, I don't see why it wouldn't work. I just did multiple exposures in the bracketing test and it looked plenty steady to me. I actually wanted to do the same thing originally, but I went with a color machine vision camera for simplicity and because it came up on ebay for real cheap.


  • 0

#9 Keith Walters

Keith Walters
  • Sustaining Members
  • 2219 posts
  • Other
  • Sydney Australia

Posted 30 August 2013 - 05:17 PM

I wonder if a color filter on the pick-up device or projector source could help improve the colors from a scan of negative by canceling some of the color mask.  I guess it would be a cyan filter... though your converted frame already looks cyan -- I wonder if the camera was properly white-balanced.

Actually, it would probably be better to use a set of RGB LEDs for your light source, with individual brightness controls for each colour.

When you white-balance a single-sensor camera using its internal white balance function, all you're really doing is adjusting the output levels from the red, green and blue masked sensors.
It's much better (in any camera) if you can get the colours at least approximately right before they hit the sensor, because then all three channels are working at the optimum dynamic range.

All you would need to do is set the camera to "fixed" colour  balance and then fiddle with the LED level controls until the image looks about right. After that, the camera itself could probably  take care of any minor trimming needed.

 

To get good diffusion of the three colours, it's hard to beat the diffuser  material they use at the back of LCD TV screens (or monitors).

If you can get hold of a junked LCD panel (from a repair shop or similar) they usually have 4 or 5 sheets of somewhat strange-looking translucent white diffuser plastic between the backlight and the LCD panel.

If you hold the sheets in front of a single light bulb, the whole sheet sort of lights up evenly, it's really strange stuff!

You could cut up some pieces of that and place them between the LEDs and the film plane.

 

Regarding the erratic sync, I think your best approach would be to run the film over an extra, separate, sprocket with an optocoupler setup that tells the controller how many times the sprocket wheel has turned. You could work out how many opto  pulses it outputs for a set number of stepper motor pulses  and use that to keep track of how much film has already run through the gate. Depending on how fine your stepper steps are, you could just occasionally add or subtract a pulse to keep the frame on track


  • 1

#10 Jeremy Cavanagh

Jeremy Cavanagh
  • Sustaining Members
  • 128 posts
  • Other

Posted 30 August 2013 - 05:23 PM

A fantastic achievement with no technical background.

 

Yes a number of projects I've come across have used DC motors e.g. Cine2digits used a brushless DC motor and not stepper motors and I assume that's because of the difficulty in matching no of rotors to pulling down exactly one of height of a small format film.


  • 0

#11 Jeremy Cavanagh

Jeremy Cavanagh
  • Sustaining Members
  • 128 posts
  • Other

Posted 30 August 2013 - 05:27 PM

I wonder if a color filter on the pick-up device or projector source could help improve the colors from a scan of negative by canceling some of the color mask.  I guess it would be a cyan filter... though your converted frame already looks cyan -- I wonder if the camera was properly white-balanced.

David,

 

Excuse my out of date knowledge on telecine and my next to non existent knowledge of neg film but when scanning neg isn't a turquoise filter used to cancel the cast?


  • 0

#12 Keith Walters

Keith Walters
  • Sustaining Members
  • 2219 posts
  • Other
  • Sydney Australia

Posted 31 August 2013 - 03:16 AM

Actually I had given some thought myself to a DIY 8mm telecine.

However, I was thinking more of using a super-8 camera for the transport mechanism, with a hole cut out of the pressure plate tp let the light through.

I would simply have a pair of optocouplers that detect the start and finish of the pulldown cycle

My idea for the scanner was to simply using an ordinary cheapo compact digital camera's macro function to zoom in on the frame, and

simply wire a pair of relay contacts across the "take" button.

There would be a simple pulse generator using a 555 timer or similar, that would trigger the sequence:

Start motor - Stop Motor - "click" camera. The repetition rate would largely be determined by the response speed of the digital camera.

 

That would give a series of JPEGs of whatever resolution you set the camera to. Modern CF cards would hold an awful lot of JPEGs.

After that I could convert them to video using FFMPEG or one of the free-windows front ends for it such as SUPER or Avidemux.

I would probably have to write a program that renames the sequence to the 1.jpg, 2.jpg, 3.jpg sequence FFMPEG requires, but that would be a trivial matter.


  • 0

#13 Jeremy Cavanagh

Jeremy Cavanagh
  • Sustaining Members
  • 128 posts
  • Other

Posted 31 August 2013 - 05:27 AM

Keith,

 

That's an interesting idea but would it have to be a DS8 camera so as to have a pressure plate or would you build one plus how would you mount the light source?


  • 0

#14 Josh Gladstone

Josh Gladstone
  • Basic Members
  • PipPipPipPip
  • 323 posts
  • Editor
  • Hollywood

Posted 31 August 2013 - 10:45 AM

Keith, the light diffuser idea is interesting. I've actually played with the stuff before when I took apart a broken cell phone. I've been looking for the right stuff for ages, I'm not sure why I didn't think of that. Currently I'm using a few small pieces of diffusion from a Lee Filters sample pack all layered together, and that works pretty okay, but I've actually got another broken cell sitting around, so maybe I'll put that to some good use. Great idea, thanks for bringing it up!

 

Jeremy, I think a DC motor also gives better speed. The stepper motor is definitely the bottleneck in that respect. Capturing one frame and advancing to the next on my machine takes about 3 seconds. At least 2 of those are just from the motor turning.

 

Keith, I'm not sure a converted camera is the best way to go. Although, you could pick a camera that has single frame advance, so that could be useful and super easily driven. But where would you put the feed and takeup reels? And how would you turn them? One of the convenient things about using a projector is that everything is already geared up, so the takeup reel turns under power while advancing and the feed turns if put in reverse. If I put it in rewind, the pressure plate lifts out of the way and I can clean the gate. Etc. It's really convenient.

I also doubt that you could get enough magnification from a digital camera's built-in macro mode. Even with a small sensor area, for super 8 you're going to need at least 1:1 magnification, which means you'll need either a dedicated macro lens or a bellows (or rails) setup. I've got my stuff on rails with an 80mm enlarger lens reverse-mounted a good 5 or 6 inches away from the sensor (picture below). If you use a camera's built-in macro, you'll probably end up having to crop significantly. That would be my guess. I did talk to someone who used a USB microscope and that actually worked really nicely. He was limited to it's 640x480 resolution, but they've got to have HD microscopes now, right?

I would also recommend thinking about capturing tethered to a computer, and having the computer run everything. That way you wouldn't have to rely on "timing" everything out, but you could have the computer run the motor once it's sure a frame has been captured. You could also get live previews, which trust me, helps when focusing and adjusting the exposure. I could go on. There are lots of advantages.

 

So here's a picture of my camera/lens setup:

tywIM8Zl.jpg

For those interested, this setup gives me the flexibility to change magnifications, so I can crop into the image, or scan all the way to the perfs. The 80mm lens gives me enough working distance to deal with the form factor of my projector, which only lets you get so close to the film plane because of how the lens used to be mounted in there. I started with a 50mm lens, but it didn't have enough magnification for the working distance I needed.


Edited by Josh Gladstone, 31 August 2013 - 10:46 AM.

  • 0

#15 Keith Walters

Keith Walters
  • Sustaining Members
  • 2219 posts
  • Other
  • Sydney Australia

Posted 01 September 2013 - 07:13 AM

Oddly enough I was looking in my storeroom for something entirely unrelated tonight and I found an old Canon Super-8  I bought at a garage sale.

Now that I look at it, of course it doesn't really have a pressure plate, the film cartridge itself more or less serves that function. 

As far as tensioning the takeup and supply reels goes, most Panavision 35mm cameras just used to have "pancake" DC motors attached to the reel hubs, with pots to adjust the tension. That always worked OK for them, so I'm sure I could come up with something similar.

For the film path I was thinking of using rollers and guides from some junked Video-8 camcorders, since the film and tape are the same size.

Mounting the film  reels wouldn't be any real problem. Remember, you're not actually projecting, so the camera can be laid on its side and the reels mounted horizontally. The whole thing could simply be assembled on a sheet of plywood.

 

As for the macro function, that very much depends on the camera you use, and in particular, the size of its sensor.

 

For closeup photo work for my engineering projects I've actually been using a cheap camera with an eyepiece lens from a junked pair of binoculars stuck on the front of the lens with Blu-Tak! With that I can use the zoom function to get enormous magnification and it delivers considerably better pictures than a much more expensive camera  we were using!

 

 

 

Keith, I'm not sure a converted camera is the best way to go. Although, you could pick a camera that has single frame advance, so that could be useful and super easily driven. But where would you put the feed and takeup reels? And how would you turn them? One of the convenient things about using a projector is that everything is already geared up, so the takeup reel turns under power while advancing and the feed turns if put in reverse. If I put it in rewind, the pressure plate lifts out of the way and I can clean the gate. Etc. It's really convenient.

I also doubt that you could get enough magnification from a digital camera's built-in macro mode. Even with a small sensor area, for super 8 you're going to need at least 1:1 magnification, which means you'll need either a dedicated macro lens or a bellows (or rails) setup. I've got my stuff on rails with an 80mm enlarger lens reverse-mounted a good 5 or 6 inches away from the sensor (picture below). If you use a camera's built-in macro, you'll probably end up having to crop significantly. That would be my guess. I did talk to someone who used a USB microscope and that actually worked really nicely. He was limited to it's 640x480 resolution, but they've got to have HD microscopes now, right?


  • 0

#16 Josh Gladstone

Josh Gladstone
  • Basic Members
  • PipPipPipPip
  • 323 posts
  • Editor
  • Hollywood

Posted 02 September 2013 - 08:14 AM

Keith, I thought you meant that you'd keep the form factor of the camera too, but now I realize that you just want to use the movement. So yeah, that could certainly work. More power to you! I'd love to see it!

I've also had the idea of a horizontally mounted scanner, but I think if I were to build something from scratch like that, I'd probably try to do something without a pulldown claw so that I'd be able to do 16mm too. Maybe for a 2.0 version...


  • 0

#17 Carl Looper

Carl Looper
  • Basic Members
  • PipPipPipPip
  • 1425 posts
  • Digital Image Technician
  • Melbourne, Australia

Posted 04 September 2013 - 07:10 AM

Great work Josh.

 

I love that your using stepper motors and arduino. I've done the same thing with a Super8 projector as well. Ripped out everything and mounted a stepper motor. In my case I run it from a laptop via a usb motor controller, but more or less the same idea. The first time I did it the stepper motor didn't quite have enough umph to completely turn the shaft all the way around. It would go for a few frames and then get stuck. Had to get a more powerful stepper.

 

And your use of a machine vision cameras is quite cool - they are programmable!

 

I use OpenCV as well, mainly for doing image registration but a few other things as well. Some great tools in OpenCV. One can do very accurate lens calibrations of your camera. And applying all that to film is just a great way of making a bridge between the world of film and the world of digital.

 

Great work. Look forward to seeing whatever work you do in the future.

 

Carl


  • 0

#18 Josh Gladstone

Josh Gladstone
  • Basic Members
  • PipPipPipPip
  • 323 posts
  • Editor
  • Hollywood

Posted 04 September 2013 - 10:13 PM

Thank you Carl, I'd love to see your setup and results, too. Do you have anything online?


  • 0

#19 Carl Looper

Carl Looper
  • Basic Members
  • PipPipPipPip
  • 1425 posts
  • Digital Image Technician
  • Melbourne, Australia

Posted 16 October 2013 - 05:05 PM

Thank you Carl, I'd love to see your setup and results, too. Do you have anything online?

 

I reassembled my setup (I had repurposed the motor for driving a bolex in a digital to film setup) - anyway here's the motor driving a Super8 projector:

 

Super8 projector driven by stepper motor:

 

C


  • 0

#20 Josh Gladstone

Josh Gladstone
  • Basic Members
  • PipPipPipPip
  • 323 posts
  • Editor
  • Hollywood

Posted 17 October 2013 - 11:42 PM

Cool!


  • 0



Metropolis Post

Abel Cine

Paralinx LLC

CineLab

Willys Widgets

rebotnix Technologies

Tai Audio

Ritter Battery

Glidecam

The Slider

Media Blackout - Custom Cables and AKS

Broadcast Solutions Inc

Technodolly

Aerial Filmworks

Gamma Ray Digital Inc

CineTape

Opal

FJS International, LLC

Visual Products

Wooden Camera

Rig Wheels Passport

Technodolly

Metropolis Post

CineTape

Wooden Camera

Opal

The Slider

Gamma Ray Digital Inc

FJS International, LLC

Paralinx LLC

Tai Audio

Ritter Battery

Visual Products

Glidecam

CineLab

Abel Cine

Rig Wheels Passport

Media Blackout - Custom Cables and AKS

Willys Widgets

rebotnix Technologies

Aerial Filmworks

Broadcast Solutions Inc