I shoot 16mm movie film every once in a while. Think of it as HDTV, only with more color information. Every once in a while, I attempt to digitize my movies. I have yet to be really happy with any of the attempts I've made over the years.
But, that doesn't stop me from trying....
So, one day, Dan was at a surplus auction and brought home a whole pile of pageant projectors. Those are the projectors you want, if you ever get into 16mm. They are completely manual thread, and very gentle on one's film. But, among the herd was an analysis projector.
Analysis projectors are what people used to use for what instant replay is now used for. You would shoot some film, then put it on an analysis projector and run it forwards and backwards at whatever speed you felt like, as well as stopping to look at single frames. I suppose thats not very impressive to people used to modern technology. So, keep in mind that your average movie projector has a several hundred watt lamp (compared to normally a couple tens of watts for your average office VGA projector). It depends on the film moving to actually survive the light. The analysis projector has a much smaller lamp (nearly as small as a video projector :-), as well as more effective infrared filters and blowers.
But, what was really cool about this projector was that it was electronicly controllable.
So, I reverse-engineered the projector's control electronics (it is quite a bit more involved than the usual on/off control found on a pageant) and built a computer interface for it. Printer ports are wonderful things. Well except for connecting printers... those belong on Ethernet.
Then, I pulled out the projection lens (a 1 inch focal length one, very rare, most of them are 2 inches. And yes, it really is labeled in inches.) and pointed a video camera down the projector's throat. Unfortunately the video camera's lens couldn't focus that close. So, I borrowed a different projection lens from a 35mm filmstrip projector, and convinced the optics to line up. (And I thought the optics would be the hard part.) This is cool because the film is imaged directly on to the video camera's CCD. No noise from a projection screen, and much lower light levels.
Then, I wrote a software phase locked loop. Go read the page http://www.hitex.co.uk/c166/pidex.html for a most excellent explanation, which I used for my implementation. The goal is to run the projector such that 1 film frame would be exactly 12 video frames long, in sync with the video camera.
Perhaps you're wondering why 12... A projector has a shutter, just like a camera. The shutter is a disk with 3 equally spaced blades. It moves the film behind one of the blades, then flashes the frame up three times. That results in a "refresh rate" of 72 Hz. If it was only one blade, the image would be brighter (since another 2/6 of the light would now be getting through, but it would also appear to flicker much worse.
Anyway, the goal is to put 1 video frame in the middle of each of the three flashes of image. Then, grab those frames, to put into the P7 file. But, the flashes are actually 2 video frames long. That means we can suffer a sync error of plus or minus 1/2 of a frame. Nifty eh?
Then, I could get fancy, use a monochrome camera and red green and blue LEDs in the lamp house, and get full 4:4:4 color. (And I have an old scientific high res monochrome camera on the shelf too.) But right now, the lamp house contains a 10 Watt 12V halogen lamp I got from Home Despot, and I'm averaging the three frames. (as opposed to the original lamp, which was WAY too bright for the video camera to be looking directly at it.)
Unfortunately... the plot doesn't actually work.
The problem is resonance. The motor on the projector can run at any speed... (its analog :-) (I'm actually feeding it 8 bits of speed value). The motor has a rubber belt which then goes around the shutter. The shutter has a 2 dimensional cam on the front to run the pulldown claw. The pulldown happens once per revolution, and is a significant amount of torque. So, the rubber belt stretches. Then the pulldown finishes, and the belt bounces back.
The final result is a pendulum (one bouncing on the end of a spring, not the kind which swings). The projector goes "boing boing boing". So, when I adjust the current going to the motor just a little, the boinging doesn't change. The speed as a function of the value fed to the motor is quantized on 16 millisecond boundaries.
X is the value given to the DAC. Y is the time of a cycle in milliseconds. The target speed is 400 ms. There are 10 samples per DAC value. Observe the banding...
So, I'm pondering how to replace the rubber belt with something stiffer (which should increase the frequency of the oscillation, so it would quantize to a shorter period). Or perhaps to increase the load on the motor, so the constant torque is a greater component of the total torque than the pulldown. Or, Something...
Test Data:
This is a couple of seconds of the test film I was using. (I spliced it into a loop, it runs and I can debug at my leisure)