Cine Film Scanners - 9.5 & 8mm cine film scanners

LEGO 9.5mm cine film scanner with a Raspberry Pi 3 B+ using a 5MP camera with adjustable focus lens running Python film registration image processing code, and advancing film via Arduino Nano. Sprocket assembly removed from old Pathé Marignan 9.5mm projector and a large LEGO gear glued to spindle. An Arduino Nano with 9 volt supply controls the sprocket assembly film advance mechanism via a L293 motor driver and LEGO motor, counts rotations using a LEGO switch as an analog rotation sensor, & also controls the take-up spool via another LEGO motor. Python software on Raspberry Pi searches each image for top & bottom sprocket holes, and computes frame registration (sprocket advance mechanism is never exact, and film moves slightly within LEGO guides). A COB LED Light Chip Bead 3W 280lm 3000-3200K is used to provide backlight via a diffuser (semi-opaque white perspex), powered from the Nano 3v output via a 10 ohm resistor to reduce heating. XY registration is provided by two worm gears: one provides exact film registration with the sprocket drive, and the other ensures each image contains both top and bottom sprockets. Serial messages from the Raspberry Pi to the Nano trigger frame advance after image processing.




Experience with LEGO RCX rotation sensors shows they sometimes behave erratically. Instead, an RCX touch sensor can be used connected to an Arduino anaolgue input; see section 4: High precision angle-sensor, sampling switch resistance at intervals (nominally 1mS). For the Cine Film Scanner we only want to count revolutions, so a threshold is used to clean up analogue readings.








Candidate sprocket rectangles are found by searching centre top & bottom halves of grey scale images for homogeneous bright regions. Histograms for candidate sprocket rectangles are constructed by summing all the pixels within a candidate rectangle in first the x direction (to find sprocket left & right edges), then the y direction (to find sprocket top & bottom edges). Histograms are seached from the centre for rapid changes between a running average and raw values. Thresholds are set for candidate rectange mean & sigma, histogram differentials, and for sprocket size & position.
Raw images and frames are stored on the Raspberry Pi SD card. Python code with tweaked thresholds can be used to rescan raw images where sprockets have not been extracted, eg when a sprocket is adjacent to bright sky, beach, etc. Scene sequences of frames are transferred to a PC, and FFmpeg used to stitch frames together, forming short scenes. PowerDirector 365 is used for final video assembly & editing.
8mm film scanner coming soon!
Last update 5 August 2024.




