PiDigitiser, a Low-Cost, Open Source Film Scanner.

by kinpro1024 in Circuits > Raspberry Pi

26092 Views, 128 Favorites, 0 Comments

PiDigitiser, a Low-Cost, Open Source Film Scanner.

Presentation 23.001.jpeg

PiDigitizer is an open-source film digitizer designed to bridge the gap for analog enthusiasts and today’s digital workflows. Unlike traditional scanners, the PiDigitizer isn’t bound by restrictive hardware or proprietary ecosystems, it is a flexible, DIY-friendly platform that produces high-quality digital outputs of film. By transforming analog sources into easily shareable and manageable digital files, it empowers users to preserve, distribute, and work with their film collections without the barriers of specialized or costly equipment.

Built around easily available components, the PiDigitizer is both affordable and accessible. Its modular, open-source nature makes it an ideal solution for a wide range of users: from enthusiasts and amateurs eager to save family archives, to professional archivists safeguarding historical collections, to small businesses seeking a practical alternative to commercial scanning systems. The project not only lowers the entry barrier for film digitization but also creates space for experimentation and improvement, inviting the community to refine, expand, and innovate upon the design.

In an environment where existing solutions often suffer from high costs, limited availability, or steep learning curves, the PiDigitizer provides a more inclusive and adaptable path forward. By rethinking the film-to-digital workflow with openness and accessibility at its core, it aims to improve the current landscape of digitization and foster a community-driven evolution of film preservation technology.

Supplies

FORMAT : "Ordering No. Item (Recommendation)(Note) - Recommended Quantity with Spares"



Electronics

1. Raspberry Pi Zero 2 W (It is assumed that a decent capacity MicroSD is also used to set up the Raspberry Pi OS) - 1 unit
2. Pi HQ Camera - 1 unit
3. An LED lighting fixture. (I used a Philips Fixture) (Make sure the fixture you choose has a large diameter and is a diffusion type, not a spot type) - 1 unit


Hardware

1. 250x250x10mm MDF Blanks - 8-10 units
2. 1/2in Threaded Rod - 2 units
3. 1/2in Curtain Rod - 4 units
4. 1/2in Hex Nuts - 40-50 units
5. A camera lens (I used an old Pentax 50mm f1.8) - 1 unit
6. A lens mount (3D Printed or Off an old Zenith in my case) - 1 unit


Tooling

Spirit Level, Mallet.
Superglue, Gloves, Coarse and Medium Grit Sandpaper, Pliers, Wire Strippers, Tape, Calipers, Measuring Implements, Multimeter, Screwdrivers, Allen Keys, Tweezers, Keyboard, Mouse, Safety Glasses, and PATIENCE. Such basic/implied tools are assumed present in your work area.

Building the Gantry Platform

Screenshot 2025-10-01 at 21.32.02.png
22E05DDA-68BB-4BF7-9DA6-454D1827A47E.jpg

The gantry is the structural backbone of the PiDigitizer. It provides the stable platform on which the camera, lens, and film transport system are mounted. To begin, prepare the MDF blanks that will form the sides and faces of the gantry. Each blank measures 250 × 250 mm and is cut into one of three functional types:


Support Blank


Purpose: Provides overall rigidity and stability.

Features: Contains only the linear rail guides for the sliding assemblies.

Notes: These blanks form the support base of the gantry.


Square-Hole Blank


Purpose: Acts as a general-purpose mounting face.

Features: Contains cut-out square holes for attaching modular components (e.g., film holders, LED panels, etc.).

Notes: Serves as the most versatile blank, used wherever adaptability is required.


Specialty Mount Blank


Purpose: Provides a precise mounting location for the digitizer’s camera and lens system.

Features: Cut according to the specific mount shape (e.g., circular aperture for the lens body, bolt pattern for securing the mount).

Notes: Must be prepared with accuracy to ensure optical alignment between the lens and the film plane.


Once these blanks are cut and prepped, they are arranged and secured onto the gantry system. Together, they form the basic gantry structure onto which all functional subsystems will be mounted. The 4 curtain rods are stabilizer rails and the threaded rods use nuts to lock the blanks.


Gantry Stack (In order from Top to Bottom)


---------- Support Blank (Top) ----------

---------- Support Blank ----------

---------- HQ Camera Sensor & Pi ----------

---------- Lens ----------

---------- Square-hole Blank (For support) ----------

---------- Film Plane ----------

---------- Light Fixture ----------

---------- Support Blank ----------

---------- Support Blank ----------

---------- Support Blank ----------


Note: It is very important to use a mallet and spirit level to make sure each platform is dead level before proceeding to do the next, as one blank out of alignment will induce significant stresses on the rails, making other blanks immobile.

Setting Up the Pi

IMG_3791.jpg

With the gantry structure complete, the next stage is preparing the Raspberry Pi system that powers the digitizer. This setup ensures the camera is operational and ready for integration with the mechanical components.


Connect the Raspberry Pi HQ Camera


  1. Attach the Raspberry Pi High-Quality (HQ) Camera module to the Pi using the ribbon cable.
  2. Ensure the ribbon cable is seated firmly in the CSI port (Camera Serial Interface), with the contacts oriented correctly.


Set Up the Display


  1. Connect a monitor or screen to the Raspberry Pi via HDMI (or a compatible interface).
  2. Attach a keyboard and mouse (or use SSH if you prefer remote control).


Start the Terminal


  1. Power on the Raspberry Pi and open a terminal session.
  2. Update your system to ensure all camera-related packages are current:
sudo apt update && sudo apt upgrade -y


Choose Your Method of Camera Interaction


There are multiple ways to control and capture images from the HQ Camera, you can find detailed guides for all of them on YouTube if you are unfamiliar:

  1. RPiCam GUI: A graphical interface for preview and basic capture. Suitable for quick setup and testing.
  2. Raspberry Pi Configuration Tools: Enable and test the camera using built-in utilities.
  3. Command Line Tools (Recommended): Use rpicam and related tools directly from the terminal. This method provides the most flexibility and control. For example, to capture an image:
libcamera-still -o test.jpg
Tip: The command-line workflow is preferred for precise digitization tasks, as it allows fine-grained control over exposure, resolution, and capture parameters.


At this stage, the Raspberry Pi and camera should be fully operational, allowing you to preview and capture frames before integrating them into the full film digitization workflow.

Set Up Your Environment

IMG_3565.jpeg

With the Raspberry Pi and camera operational, the next step is preparing the software environment that processes the captured images into high-resolution digital frames.


Why a Python Environment Is Needed


  1. PiDigitizer doesn’t just capture a single frame, it builds one high-resolution scan by combining three separate images.
  2. Each image is taken from slightly different positions across the film strip (left, center, and right).
  3. These three images are then stitched together using a Python script, resulting in a single frame with much higher detail.
  4. This method is necessary because the Raspberry Pi HQ Camera has a relatively high crop factor, limiting the amount of the film it can capture at once. By splitting the frame into three overlapping shots and stitching them, we effectively overcome this limitation and achieve higher resolution without specialized optics.


Computer Requirement


  1. The stitching process is computationally demanding.
  2. The Raspberry Pi Zero 2W is not powerful enough to run the Python stitching program reliably.
  3. Instead, you should set up the Python environment on a laptop or desktop computer, which will handle the processing.


Setting Up Python


  1. Ensure Python 3.x is installed on your laptop. Most modern systems already have it, but you can verify by running:
python3 --version
  1. Install the required dependencies (image processing libraries such as opencv-python and numpy will be needed for stitching):
pip install opencv-python numpy
  1. Prepare the stitching script (provided here) that will automatically align and merge the three images into one.


Positioning for Capture


  1. The physical setup requires capturing three images of each frame of film.
  2. You will need to experiment with the camera’s placement so that the left, center, and right portions of the film are covered with enough overlap for the Python script to stitch them smoothly.
  3. For now, the focus is on setting up the environment — the fine-tuning of camera alignment will come in a later step.



Scanning the Film

IMG_3519.JPG
IMG_3441.JPG
IMG_3444.JPG
IMG_3446.JPG

Note on Film Trays:

If you don’t have access to a dedicated film tray, you can make one yourself using sunboard (also known as composite sheeting). This material resembles dense styrofoam or foam sheeting, and it can be easily cut into shape to create a DIY tray for holding film strips flat during scanning.


Declaration


This scanning workflow has currently been verified only for black-and-white film. The reason is that the LEDs typically used in DIY builds have a relatively low CRI (Color Rendering Index).

  1. CRI is a measure of how accurately a light source reveals colors compared to natural light (a CRI of 100 is perfect daylight).
  2. Cheap LEDs usually have a poor CRI, which means they distort or mute certain colors. This doesn’t matter much for black-and-white film, but it produces inaccurate color scans. For proper color film digitization, a high-CRI light source would be required.


Capture Process


Prepare the Film


  1. Place your film strip into the tray (either sourced or DIY sunboard tray).
  2. Ensure the film is flat and aligned for consistent results.


Capture Three Overlapping Images


Using the Raspberry Pi HQ Camera, capture the frame in three segments:

  1. Left of the frame
  2. Center of the frame
  3. Right of the frame

The overlap between these images is important so the stitching script can merge them smoothly.


Transfer to the Stitching Computer

  1. Import the three captured images onto your laptop or desktop computer (the one with the Python environment set up in Step 3).
  2. The Raspberry Pi Zero 2W cannot handle stitching, so all image merging is done on this separate system.


Run the Stitching Script as given in the Next Step


  1. The Python script automatically aligns the three images and combines them into a single high-resolution scan.
  2. The script also inverts the colors automatically, so you don’t have to manually convert negatives into positives.


At the end of this step, you should have a clean, high-resolution digital black-and-white negative frame ready for storage, editing, or sharing.

Stitching the Final Results

IMG_3569 copy.jpg

Once you’ve captured the three overlapping images of each film frame, the last stage is to merge them into a single high-resolution scan using the stitching computer.


Transfer the Images


  1. Copy the three captured images from the Raspberry Pi to your stitching computer (laptop or desktop with the Python environment set up in Step 3).
  2. Keep your file structure organized so that each film frame’s images are grouped together.


Name the Files Correctly


For the stitching script to work properly, name the three images as follows:

1.jpg → Right portion of the frame

2.jpg → Center portion of the frame

3.jpg → Left portion of the frame

The order is right to left, which ensures the script processes them correctly. You must place them in the same folder as the script.


Run the Stitching Script


Execute the Python script on your stitching computer, the script will automatically:

  1. Align the three images
  2. Merge them into one seamless frame
  3. Invert the negative to produce a positive digital image (for black-and-white film)
  4. If the steps were followed correctly, the output will be a properly digitized version of your film frame.
  5. The result can now be archived, shared, or processed further using image-editing tools.



Notes and Considerations

IMG_3571.jpg
IMG_3445.JPG
5D82348C-7F5A-4560-9534-31F728C92E2C.jpg

The PiDigitizer is a functional, low-cost way to convert film into digital format, but there are a few important caveats and technical issues to keep in mind. These notes document some of the most significant limitations and lessons learned during development.


1. Black-and-White Film Only (for Now)


  1. As mentioned earlier, this workflow is verified only for black-and-white film.
  2. The reason lies in the CRI (Color Rendering Index) of the light source. CRI measures how accurately a light source reproduces colors compared to natural daylight (100 being perfect).
  3. Most inexpensive LEDs have poor CRI, which results in inaccurate or distorted color rendering. While this is acceptable for black-and-white digitization, it makes color film scans unreliable without a high-CRI light source.


2. Lighting Challenges


  1. LED Fixtures: The biggest hurdle is finding a reliable LED fixture. Cheap fixtures often use poor-quality LED drivers that degrade quickly. This can introduce flicker, which the camera picks up as banding.
  2. Banding and Rolling Shutter: Banding occurs because the Raspberry Pi HQ Camera uses a rolling shutter — it scans the image sensor line by line. If the LED flickers even slightly (from AC ripple or poor driver design), different rows of the sensor receive different amounts of light, producing visible horizontal bands.
  3. Experimentation Required: It’s strongly recommended to experiment with multiple LED setups before settling on one. Stable, flicker-free lighting is absolutely crucial for consistent results.
  4. Fresnel Lens Attempt: An early version used a Fresnel lens to parallelize the light and spread it evenly across the film. However, this approach created artifacts and did not provide the expected uniformity, so it was abandoned.


3. Exposure and Noise


  1. Since the Pi HQ Camera is a digital camera, exposure settings must be carefully controlled.
  2. If exposure is not explicitly specified, the camera will auto-meter, potentially changing brightness unpredictably between captures. This ruins consistency in a scanning workflow.
  3. If the light level is too low, the camera compensates with digital gain, which amplifies the captured signal after digitization. This creates visible noise and “fuzziness” in the scan.


4. Analog Gain vs. Digital Gain


The sensor itself can apply analog gain or digital gain when boosting signal:

  1. Analog Gain: Applied at the sensor level before the image is converted into digital values. This generally increases brightness with less visible noise (though still some).
  2. Digital Gain: Applied after digitization. This is essentially multiplying pixel values in software, which not only brightens the image but also amplifies noise, producing a grainy, low-quality result.

In scanning applications, relying on digital gain should be avoided. It is better to provide adequate, stable lighting so that proper exposure can be achieved with low analog gain.


5. Practical Advice


  1. Use the most stable, flicker-free LED light source you can find. Cheap drivers are unreliable long-term.
  2. Disable auto-exposure and set manual exposure values for consistency across captures.
  3. Avoid relying on digital gain — increase lighting intensity instead.
  4. Be prepared for trial and error. Small adjustments to lighting, positioning, and exposure can make a large difference in scan quality.


6. Light Sealing Between Lens and Camera


For best results, it’s important to prevent stray light from entering the space between the lens and the camera sensor. Uncontrolled light leaks can reduce contrast, introduce glare, and lower the effective sharpness of your scans.

  1. Ideal Solution: Use bellows, which are flexible, light-tight sleeves traditionally used in large-format photography to block external light while allowing lens movement.
  2. DIY Alternative: If bellows are unavailable, you can improvise by cutting sunboard (composite foam sheeting)into panels and fitting them around the lens-camera gap. Even a simple box-style enclosure can be effective at minimizing light leaks.

Keeping this path light-sealed ensures that only the film is illuminated during capture, producing cleaner, higher-contrast digitizations.


7: Choosing the Optimal F-Stop


The f-stop (aperture value) you choose has a major impact on image sharpness and scan quality. Every lens has an aperture range where it performs best, often referred to as its “sweet spot.”

Why Sharpness Varies with Aperture:

  1. At wide open apertures (low f-stop, e.g., f/1.8), lenses let in more light but often suffer from aberrations(soft corners, chromatic fringing, reduced contrast).
  2. At mid-range apertures (e.g., f/5.6–f/8), most lenses sharpen up significantly because aberrations are reduced while still allowing enough light in. This is the sharpest setting for many consumer lenses.
  3. At very small apertures (high f-stop, e.g., f/16–f/22), sharpness often decreases again due to diffraction, where light waves spread out as they pass through the small opening, softening details.

Finding the Sweet Spot:

  1. Look up sharpness charts or reviews for your specific lens model online.
  2. As a rule of thumb, the best sharpness is often achieved around 2–3 stops down from wide open (e.g., if a lens opens to f/2.8, its sweet spot might be around f/5.6–f/8).

By using the lens at or near its sharpest aperture, you maximize detail capture, reduce optical flaws, and ensure that the digitized frames are as crisp as possible.

Acknowledgements

Presentation 23.007.jpeg

I would like to thank my friends and peers, including Rahil Kodinariya, Vishwas Joseph, Aditya Sharma and Aayush Bhatt who supported me throughout this project, whether by offering technical advice, lending equipment, or simply encouraging me to keep going. Their help made the project possible and more enjoyable to complete.

I would like to thank our local carpenter for helping me machine the blanks.

I would like to thank Ms.Vibha Bhagavatula for letting me use the pictures I took of her for this demonstration.

I want to extend a special thanks to Mr.Diptanshu Sinha, Mr. Vishal Kullarwar and Mr. Arindam Kumar Chatterjee for helping me understanding film and optics.

I also would like to thank my family, especially Mehaan for helping me with this project.


This effort was executed in the Summer of 2024.



License

This project is licensed under the MIT License. You are free to use, modify, and share it, provided that proper credit is given.