← All projects

Research · HMC Biophotonics Lab

OpenIVIS: Low-Cost Bioluminescence Imaging

Commercial in vivo imaging systems can cost over $100,000. We built one that detects glowing bacteria for under $210, using a Raspberry Pi, a laser-cut acrylic box, and a lot of Python.

BiophotonicsRaspberry PiPythonImage ProcessingLaser Cutting
Lab
Harvey Mudd Biophotonics Lab
Advisor
Prof. Joshua Brake
Team
Megan Tran, Natalie Ko
Timeline
Summer 2025, then through Jan 2026
Worked with
CMC Rathbun Lab
Total cost
Under $210

Why we built it

In vivo imaging systems (IVIS) let researchers watch what’s happening inside living samples using light. They’re used for things like diagnosing disease and testing new drugs. The problem is the price. A commercial system often runs over $100,000, which is out of reach for a lot of smaller labs.

The Rathbun Lab at Claremont McKenna is one of them. They engineer bioluminescent enzymes to study how cells interact, but they didn’t have an IVIS to image their work. My summer project was adding a bioluminescence module to OpenIVIS, the lab’s open-source imaging box, so labs like theirs could do this kind of imaging for a tiny fraction of the cost.

Why bioluminescence is tricky

With bioluminescence, the cells make their own light through luciferase enzymes, so you don’t shine anything on the sample. That’s great for background noise, but the light they give off is incredibly faint. The whole system had to be built around catching very small signals in a very dark box.

Building the box

The enclosure is laser-cut black acrylic with jigsaw-style edges that lock together so light can’t sneak in. The front panel slides up and locks open. In the lid there’s a 3D-printed ring of NeoPixel LEDs with a white acrylic diffuser underneath to spread the light evenly, and a 3D-printed stand holds the camera in place above the sample.

Everything runs on a Raspberry Pi 4 with a Camera Module 3 NoIR. We picked that camera because it’s cheap and easy to get, it has no IR filter (which helps in low light), and its Sony IMX708 sensor handles dim scenes well. It also plugs straight into the Pi, so we could control it all in Python.

Black and white acrylic + acrylic cement$97
Raspberry Pi 4 Model B + Camera Module 3 NoIR$60
8 ultra-bright NeoPixel RGBW LEDs$44
Adafruit Perma-Proto HAT$5
TotalUnder $210

Testing it with glowing bacteria

To test the module we used iLux, an engineered strain of E. coli from the Rathbun Lab that glows brighter as it gets warmer. We ran two experiments.

First, we plated iLux on agar and took a time-lapse over 16 hours at room temperature, expecting the brightness to climb as the plate warmed up. Second, we put iLux in a 96-well plate at different concentrations. The Rathbun Lab measured each well’s photon count with their commercial plate reader, and then we imaged the same plate with OpenIVIS to see how well our numbers matched theirs.

Bioluminescent iLux bacteria on an agar plate imaged by OpenIVIS
iLux on an agar plate, imaged by OpenIVIS after noise correction
96-well plate image with regions of interest marked
The 96-well plate with a region of interest on each well

Processing the images

Most of my time went into the Python side. Each step became its own script:

  • Focusing. The LED ring lights up the sample just for focusing, and a script finds the best lens position so every capture uses the same focus.
  • Time-lapse capture. You give it the lens position, the time between shots, the exposure times, and how many rounds to take.
  • Dark frame subtraction. We take ten images with nothing in the box, average them, and subtract that from every real image pixel by pixel. That strips out the camera’s own noise pattern and any stray light.
  • Finding the signal. For the time-lapse, the code finds the brightest circular region and tracks how its intensity changes. For the 96-well plate, it lays a grid of regions over the wells and measures each one.
  • Fitting the data. Some of the relationships weren’t linear, so the code fits a power law (y = kxa) and reports the R² value.

Results

0.959correlation between OpenIVIS intensity and the commercial reader’s photon counts
R² = 0.981power law fit of OpenIVIS intensity vs. iLux concentration
16 hoursof time-lapse showing brightness rising as the plate warmed

The time-lapse did what we hoped. The iLux got brighter as it warmed up, which showed both that the bacteria behaved as expected and that our camera could pick up the change. Comparing the first and last images, the last one had way more bright pixels.

On the 96-well plate, OpenIVIS lined up really well with the commercial reader, with a correlation of 0.959. Against concentration, our intensity followed a power law with an exponent of 0.43, so it grows more slowly at high concentrations, but the fit was strong (R² = 0.981). For comparison, the reader’s own photon counts matched concentration with a correlation of 0.997.

Scatter plot of photon count against OpenIVIS intensity with a linear fit
Commercial reader photon count vs. OpenIVIS intensity
Scatter plot of concentration against OpenIVIS intensity with a power law fit
iLux concentration vs. OpenIVIS intensity
Line graph of total region intensity increasing over about 14 hours
Brightness of the iLux plate over the time-lapse

What didn’t go perfectly

Light leaks were the biggest problem. Even with the box closed, tiny gaps at the seams let in enough ambient light to show up as glare. We’re fixing that with blackout material and better sealing.

The signal is also so faint that we needed long exposures, and long exposures add sensor noise. Dark frame subtraction helped a lot but didn’t get rid of it completely. Even so, the numbers held up against the commercial equipment, which I think is the main win.

Where it’s going

After the summer I kept working on the project and helped plan a smaller, mobile version with its own app. Next steps are a Python pipeline that scores images on signal-to-noise ratio, resolution, and the faintest signal it can detect, adding a thermistor so we can match brightness to temperature in real time, and putting all the code and documentation on the HMC Biophotonics GitHub so anyone can build one.

Thanks

This work was funded by the Silicon Valley Community Foundation (Grant No. 2022-251322). Thank you to Harvey Mudd, Jacob Stampiel, Sydney Torrey, and the Rathbun Lab at CMC for the iLux strains and plate reader data, with dilutions prepared by Evelyn Harrington. OpenIVIS builds on earlier work by the HMC Biophotonics Lab and the Cash Lab at Colorado School of Mines.

OpenIVIS research poster
My poster from the Harvey Mudd Summer Research Poster Session
Bioluminescence poster, Summer 2025Open full screen ↗