Jump to content


Photo

DIY Film Scanner (With Samples)

Film Scanner

  • Please log in to reply
119 replies to this topic

#81 Josh Gladstone

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

Posted 26 May 2015 - 01:17 AM

Neat! I dig it.

 

So how exactly did you rip the shutter out?


  • 0

#82 Sam Friedman

Sam Friedman

    New

  • Basic Members
  • Pip
  • 7 posts
  • Cinematographer
  • Los Angeles, CA

Posted 03 June 2015 - 06:05 PM

So, I've successfully gutted my Bell&Howell projector, and written a really basic Arduino sketch that's successfully advancing frames. I'm pretty stoked about all this.

 

Today I'm receiving a pretty cheap USB Microscope camera from Amazon that I'm going to try to get to work with the whole setup. Josh, can you post your Python program? I think it'll work with the camera I bought, because the computer should treat it like a webcam, and I know you said your program worked with your iSight...

 

Once I have a complete setup in place, regardless of how *good* it is, I will share with the forum!


  • 0

#83 Wayne Kozun

Wayne Kozun

    New

  • Basic Members
  • Pip
  • 2 posts
  • Other
  • Toronto

Posted 08 January 2016 - 03:11 PM

This is a fascinating thread.  Anyone have any updates, particularly on the USB microscope cameras.

 

I am interested in capturing some Super 8 or Regular 8 mm home movies from the 60s and 70s.

 

The quick and dirty method is to just take a video of the film as it is projected on a screen.  This capture method must give better results but can anyone comment on how much better the final product is?


  • 0

#84 Josh Gladstone

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

Posted 10 January 2016 - 02:50 AM

Hey Sam,

 

Let me just say this about cameras: from my limited experience, no matter how much a manufacturer claim that they comply with standards, it always takes some work to get the cameras working. For example, I just got an imaging solutions L-W-5s-1394 (2.5k camera upgrade!), but I haven't been able to get OpenCV to interface with it yet, despite the claim that both it and my current camera both use DCAM IIDC standards. So that's going to take some work.

 

But I digress. The version I had working with iSight was from a long time ago when I was using an HDV camera with removable lens as my capture camera. OpenCV was able to natively pull images from those cameras; it wasn't until I got into machine vision that I needed to look to other libraries. But anyway, here's a basic Python program that should be able to pull images out of the iSight. It was hanging on my system, but it looks like that might be an OpenCV version / possibly a Yosemite issue. The code should work. Will it work with a webcam? Maybe? But honestly I'd be surprised if it was that easy. Anyway, here's the code:

#!/usr/bin/env python
#include "highgui.h"
import cv2



cv2.namedWindow("preview")

vc = cv2.VideoCapture(0)

rval = True





while rval:

rval, frame = vc.read()

cv2.imshow("preview", frame)



key = cv2.waitKey(20)

if key == 27: # exit on ESC

break

  • 0

#85 Josh Gladstone

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

Posted 10 January 2016 - 02:59 AM

Also, as a bonus (?), here's some really old code I had. Basically this was the very first proof-of-concept version I had working with the HDV camera. I hacked apart a computer mouse and modified mouse and projector so that it would click once per revolution. A preview video is shown in a window, and every time the preview window is clicked, the current frame is written to the hard drive. So, once I situatied the cursor, and then hooked up the projector-mouse-combo up to the computer, it would capture each frame. It was able to capture at fairly reasonable rates (like 15-20fps if I remember correctly! Probably has something to do with it being HDV as opposed to raw imageds coming off the vision cameras). But it was hard to time the capture exactly, so eventually the shutter would creep in. Then I removed the shutter, and after a while, it would capture a pulldown blur. Just couldn't get it to be reliable, so that's when I moved to the stepper motors and vision cameras. Anyway, here's the code for this. And this was a long long time ago, so no guarantees anything works.

 

#!/usr/bin/env python
#include "highgui.h"




      ###########################################################
   ###                                                           ###
###                       FrameCapture v .9                         ###
   ###                                                           ###
      ###########################################################




import cv2, argparse, time


framecount=0
shuttercount=3
gocapture=0
syncdelay=0.0


parser = argparse.ArgumentParser(description='Example with non-optional arguments')
parser.add_argument('-l', action='store', dest='capture_folder', default='/FrameCapture/Caps',
                    help='Path to Capture Folder, i.e. /Users/USERNAME/Desktop')
thePath = parser.parse_args().capture_folder


def onmouse(event, x, y, flags, param):
    global shuttercount
    global framecount
    global syncdelay
    if gocapture > 0:
        if event==cv2.EVENT_LBUTTONDOWN:    
            if shuttercount >= 6:
                time.sleep(syncdelay)
                cv2.imwrite(saveLoc, frame)
                framecount += 1
                shuttercount=1
                print 'Frame Captured --> ' + saveLoc
            else:
                print('*')*shuttercount
                shuttercount +=1


print ''
print '-------------------------------------------------------------------------'
print '[] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] ['
print '-----------------------------------------------------------------------/'
print '      \|/ | O -   ^^         |                  |           _   _     |'
print '     --O--|/ \        O  ^^  |   ^^   |||||     |     ___  ( ) ( )   _/'
print ' /\   /|\ |         --|--    | ^^     |O=O|     |_ __/_|_\,_|___|___/'
print '/  \/\    |~~~~~~~~~~~|~~~~~~|        ( - )     |   -O---O-       |'
print '  /\  \/\_|          / \     |       .-~~~-.    | -- -- -- -- -- /'
print ' /  /\ \  |                  |      //| o |\\   |______________ |'
print '--------------------------------------------------------------_/'
print '[] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] ['
print '------------------------------------------------------------ '
print '                            FrameCapture v .9   (c)2013'
print ''
cv2.namedWindow('Initializing Camera...')
camera_index = 0
vc = cv2.VideoCapture(camera_index)
print 'Camera Online. Click in Video Window to Activate.'
print 'Press [h] for help. Press [esc] to Exit.'


if vc.isOpened(): # try to get the first frame
    rval, frame = vc.read()
else:
    rval = False


while rval:
    saveLoc = thePath + '/Frame_' + str(framecount).zfill(3) + '.tiff'
    cv2.imshow('Capture', frame)
    cv2.setMouseCallback('Capture', onmouse)
    rval, frame = vc.read()
    key = cv2.waitKey(20)
    if key == 27: # exit on ESC
        print 'Goodbye.'
        break
    if key ==32: # spacebar
        if gocapture < 1:
            gocapture=10
            print 'Starting Capture...'
        else:
            gocapture=0
            print 'Ending Capture...'
    if key ==46: # < key
        syncdelay += .01
        print 'Delay:', syncdelay
    if key ==44: # < key
        if syncdelay >= 0.01:
            syncdelay -= .01
            print 'Delay:', syncdelay
        else:
            print 'Delay: 0.00'
    if key ==48: # < key
        syncdelay = 0
        print 'Delay: 0.00'
    if key==78 or key==110: # n key
        camera_index += 1 #try the next camera index
        print 'Switching Cameras...'
    if key==72 or key==104: # n key
        print ''
        print 'HELP:'
        print '    To change capture location, invoke FrameCapture command with FrameCapture.py -l /PATH/TO/LOCATION'
        print '    Press [space] to start/stop capturing frames.'
        print '    Press [period] to increase delay. Press [comma] to decrease delay. Press [0] to reset delay.'
        print ''

Enjoy! I'll try to answer any questions if anybody's got any!


  • 0

#86 Josh Gladstone

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

Posted 10 January 2016 - 03:03 AM

Sorry, just for anybody starting out. If you want to run that program, you need to have Python and OpenCV installed. Then save it as FrameCapture.py, just drag it into a terminal window, hit enter, and it'll run. If you want to specify a save location, after you drag it into the terminal window, add "-l" for location, followed by the path to the directory you'd like the images saved in. Hope that makes sense!


  • 0

#87 Wayne Kozun

Wayne Kozun

    New

  • Basic Members
  • Pip
  • 2 posts
  • Other
  • Toronto

Posted 10 January 2016 - 11:33 AM

Nice ASCII art!


  • 0

#88 R Taylor

R Taylor

    New

  • Basic Members
  • Pip
  • 3 posts
  • Other
  • Seattle

Posted 05 February 2016 - 01:18 AM

New poster, but have benefited immensely from this discussion, and hopefully will have more to add.  I recently have gotten into video, and had an interest to digitize my family’s small collection of super 8 videos.  I figured I’d try to build a telecine-type device to do it, and as my background is in microbiology, why not try to use a microscope as the image collector?

 

I’m still very early in the process, but thought I’d put out some of the things I’ve discovered in trying to use a USB microscope to do this.

 

I did some calculations early on - the horizontal field of view at max maginication of the Celestron Pro scope(pushed all the way to the object) is about 7mm, judging from the videos online.

Super 8mm frames are 0.211" 0.158" 4:3
 

There are a number of capture resolutions on the scope (theoretically, see below)
- 1280 x 960 (1.3 MP)
- 1600 x 1200 (2 MP)
- 2048 x 1536 (3 MP)
- 2592 x 1944 (5 MP

So, if assumed we captured at max resolution all the way up to the scope (without modifying):
5.79/7 *2592 = 2143 x 1611 image for each frame or about 3.5MP per frame.  Not too bad.
 

Selection:  I looked around at a number of cheap scopes, and it seems there are actually only a few low-cost scopes made.  Actually, there are only low cost scopes that are direct USB scopes, the next step up includes a screen, and then you’re looking at a separate scope and camera, which are much more expensive.  I think there is likely only a few manufacturers, but they are OEMed to many different firms that put them out.   I ended up purchasing the “Crenova® UM012C USB Digital Microscope 5MP Video Microscope”.  This is theoretically the same microscope as the “Celestron 5 MP Handheld Digital Microscope Pro” and other brands, but was the cheapest at the time on Amazon.

 

Plugging it in to a windows computer (I’ve tried windows 7 and 10) and the drivers will automatically load.  It installs as a webcam (which it essentially is, but with a different lens), so any software that can interface with windows to capture webcam video can use it.   The disc that came with the scope didn’t read, so I downloaded the microscope software from the Celestron site, and it worked fine.  I took some shots with the scope the worst/least cared about super 8 movie that I had.   As a first proof of concept, I put it on top of a tablet for backlighting and used the scope to take some shots.  You can see the pixels behind the frame.   I tried a bunch of different resolutions, using the Celestron-supplied software, but didn’t see much of a difference above 2MP.  Of course, that might change with proper diffuser and backlighting.   Also the film has a number of scratches and imperfections so more study is needed.

 

4lDMiTv.jpg

 

I had originally thought that I might build a variant of the http://kinograph.cc/ but then finding this forum made me think that the better route would be using a projector to move the film.  This is my current plan.

 

As far as software, I have tried a number of libraries.  Microsoft Expression, opencv, and AForge.  I’ve had the best luck with AForge, which has a good forum, and lots of example code.  I’ve modified a demo app for my purposes that allows me to adjust the capture resolution and capture jpgs from the image programmatically using Visual Basic.  I think this will work well to allow me to develop the scripts for the automation.  I’m not sure if I’m going to do the Arduino path, or more direct control like a Labjack.   Another TBD. 

 

I just got a Sankyo Dualux-1000 today, which seems to work well.  I took out the lens, and pressed the scope in and it’s about the same diameter, and it stuck in place.   While it is not optimally placed (it is too far away from the film currently for a good capture) I took some shots that might be interesting.   Also, I was using my bike headlight as the light source, so not an optimal test, but another proof of concept. The front part of the scope seems to be screwed on, so it might be easy to unscrew it and get it closer.  It would be nice to do this non-destructively to the projector.  It would also be nice not to have to use any additional lenses, and just snap the film directly.

 

Tn2brCR.jpg

 

 

 

2P52erk.jpg

 

 

 

More details on the Microscope:  Though it is advertised as 5MP (2592x1944), I can only seem to get that resolution out of the Crestron software.  When I use other programs to adjust/capture I only get up to 2048x1536  I’m not sure why –

·       It could be that the camera is not 5MP, and they are just upscaling – I don’t have anything good to look at with good detail at that resolution, so eyeballing it to date hasn’t worked.   

·       It could be that that 5MP mode uses some special driver mode that isn’t available to DirectShow which is what my software uses.   There is also a ‘snapshot mode’ for webcams, which tends to be high resolution, but my initial search hasn’t found a higher rez mode. 

 

In all though, I’m not sure how high a rez I’ll need, or if 5MP will be overkill.

 

Modes from the Directshow driver reported from the scope:

 

Stream Format Properties Tab for Microscope

Color Space/ Compression; Frame Rate/ Output Size

MJPEG - 15FPS - 2048x1536 (default)

MJPEG - 15FPS - 1600x1200

MJPEG - 25FPS - 1280x960

MJPEG - 30FPS - 800x600

MJPEG - 30FPS - 640x480

 

No adjustments available on Frame Rate or On the 'compression' tab

 

YUY2 - 5FPS - 2048x1536 (Default)

YUY2 - 5FPS - 1600x1200

YUY2 - 10FPS - 1280x960

YUY2 - 20FPS - 800x600

YUY2 - 30FPS - 640x480

 

No adjustments available on Frame Rate or On the 'compression' tab

 

I don’t know much about color space or compression quality difference between MJPEG and YUY2 in terms of practical outcomes, anyone have any tips?

 

I’ll be working on this over the course of the winter and will update as it progresses.

 


  • 0

#89 Andries Molenaar

Andries Molenaar
  • Basic Members
  • PipPipPipPip
  • 688 posts
  • Industry Rep
  • Amsterdam

Posted 05 February 2016 - 01:23 AM

Your photos are way (4x) too big and mess up the page layout. This on a modern large screen windows system. Let alone on a tablet or Phone.


  • 0

#90 R Taylor

R Taylor

    New

  • Basic Members
  • Pip
  • 3 posts
  • Other
  • Seattle

Posted 05 February 2016 - 01:26 AM

Your photos are way (4x) too big and mess up the page layout. This on a modern large screen windows system. Let alone on a tablet or Phone.

Huh, that's odd.  They autoscale for me, and only open large when clicked. 


  • 0

#91 Mark Dunn

Mark Dunn
  • Basic Members
  • PipPipPipPip
  • 2734 posts
  • Other
  • London

Posted 05 February 2016 - 04:51 AM

Your photos are way (4x) too big and mess up the page layout. This on a modern large screen windows system. Let alone on a tablet or Phone.

Same here.


  • 0

#92 Will Montgomery

Will Montgomery
  • Sustaining Members
  • 2085 posts
  • Producer
  • Dallas, TX

Posted 05 February 2016 - 10:58 AM

They scale just fine on a Mac with Safari. :)


  • 0

#93 Carl Looper

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

Posted 05 February 2016 - 04:16 PM

Yep - the big images muck up the layout on a windows box under firefox or google chrome.

 

But Microsoft Edge is okay.

 

This has always been the case here on cinematography.com.

 

Someone posts an image bigger than usual, and the width

of the entire thread window then stretches to accommodate

the larger image meaning one then has to use the horizontal

scroll bar to find the end of any text, unlike here where I've

used manual line wrapping.


Edited by Carl Looper, 05 February 2016 - 04:21 PM.

  • 0

#94 R Taylor

R Taylor

    New

  • Basic Members
  • Pip
  • 3 posts
  • Other
  • Seattle

Posted 05 February 2016 - 05:16 PM

Well, I works ok for me on Edge and Chrome, but not IE..  Frustrating as there doesn't seem to be any thumbnailing bbcode on this forum (I looked).   I'd edit the post, but it seems I can't do that?


  • 0

#95 Carl Looper

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

Posted 05 February 2016 - 08:52 PM

Oh yeah - it's too late to edit.

 

Just something to remember for next time - to pre-edit images down to something like 1280 wide at the most.


  • 0

#96 Pol Fieldman

Pol Fieldman

    New

  • Basic Members
  • Pip
  • 7 posts
  • Electrician

Posted 11 February 2016 - 03:49 PM

Just finished capturing about 40 reels of normal8 and super8 film with my diy telecine device.

I could not have done it without some great tips on this forum. Thanx all!

 

some technical details and samples :  


  • 0

#97 Carl Looper

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

Posted 12 February 2016 - 03:17 AM

Love it.

 

C


  • 0

#98 Phil Rhodes

Phil Rhodes
  • Sustaining Members
  • 12235 posts
  • Other

Posted 12 February 2016 - 03:26 AM

Looks pretty respectable. Have you done any negative?
  • 0

#99 Simon Lucas

Simon Lucas
  • Basic Members
  • PipPipPip
  • 100 posts
  • Other
  • UK

Posted 12 February 2016 - 05:29 AM

Just finished capturing about 40 reels of normal8 and super8 film with my diy telecine device.

I could not have done it without some great tips on this forum. Thanx all!

 

some technical details and samples :  

 

Stunning piece of work. I'm impressed by the sheer quality workmanship and attention to detail.

 

Personally, I got my stepper all rigged up and working at xmas, but then I stalled when it came to designing the LED light source. Would you be willing to share more detail about how you did that?


  • 0

#100 Pol Fieldman

Pol Fieldman

    New

  • Basic Members
  • Pip
  • 7 posts
  • Electrician

Posted 12 February 2016 - 02:27 PM

@Phil : No experience with negatives, I only got "projectable" reels from my father and grandfather.

 

@Simon : Thanks, I had a fun time building it.

 

About the LED light source:

 

I started with taking 9 RGB leds from a rgb ledstrip I had. I soldered them onto a small PCB.

The results were disappointing, because the wavelength of the green led was way too close to the blue led, resulting in poor color rendering. (the light source, film die and ccd bayer filters characteristics need to match ). I ordered separate green leds ( 545nm) and used these instead of the rgb green led. The result is much better.

 

I use a basic current source to dim the light. See schematic for a single color.

I did not use PWM because I was worried it could cause flickering. (if you use 1KHz PWM frequency the led flashes once every ms. If the exposure time is say 10ms, the ccd sensor can receive 9 or 10 pulses. Which would give a 10% difference in luminance frame to frame.)

Getting an uniform lighting of the film was a bit of a struggle, but the method I use now works fine. The light is mixed and reflected in the white tube, and the frontcover contains two layers of light diffuser foil, recovered from a lcd backlight.

 

To be really honest, I also tested with a halogen light with a good IR filter (to avoid burning the film and avoid flooding the ccd), and this also gave very good results. A halogen light is easier and requires no electronics.

 

The disadvantage is of course that the blue ccd pixels do not receive as much light as the red and green, causing some loss of dynamic range. But in my case the loss was approx. 30% ( white in the film is detected as red=100%,green=100%, blue = 70%), which is not that much considering the 12bit dynamic range of the sensor.

 

The real advantage of leds lies in the ability to supply very short and intense light burst, ideal if you want to keep the exposure time very short. For my 3 frames/s prototype not needed.

 

Pol

  

rgb.jpg

electronics.jpg

 


  • 0



Visual Products

Wooden Camera

Gamma Ray Digital Inc

Broadcast Solutions Inc

Technodolly

Ritter Battery

Glidecam

Paralinx LLC

The Slider

Media Blackout - Custom Cables and AKS

Tai Audio

Abel Cine

rebotnix Technologies

CineLab

Metropolis Post

New Pro Video - New and Used Equipment

Willys Widgets

Rig Wheels Passport

FJS International, LLC

Aerial Filmworks

CineTape

CineTape

Tai Audio

The Slider

Willys Widgets

FJS International, LLC

Metropolis Post

Visual Products

Media Blackout - Custom Cables and AKS

Wooden Camera

CineLab

rebotnix Technologies

Glidecam

Abel Cine

Aerial Filmworks

New Pro Video - New and Used Equipment

Ritter Battery

Gamma Ray Digital Inc

Paralinx LLC

Technodolly

Broadcast Solutions Inc

Rig Wheels Passport