I developed this color filter removal method on Raspberry Pi Camera Module V1 boards. Five cameras were damaged during the experiments. Their failure points helped identify the mechanical and chemical risks around the exposed sensor.
Converting a Raspberry Pi Camera V1 to Monochrome
A color image sensor places a color-filter array over the photosites. The Raspberry Pi Camera Module V1 uses an OmniVision OV5647 sensor with a Bayer-pattern color-filter array. Removing that array exposes the underlying pixels to a broader range of wavelengths and can turn the sensor into a broadband monochrome device.
This modification is commonly called “debayering,” although color-filter-array removal is the more precise description. Demosaicing is the software process that reconstructs a full-color image from Bayer samples; this experiment physically removes the filter material from the sensor.
Expected changes
Removing the Bayer filters keeps the same physical pixel count. A five megapixel sensor remains a five megapixel sensor. In the normal camera, demosaicing uses neighboring red, green and blue samples to calculate color values at every output position.
A successful monochrome conversion can nevertheless provide real benefits:
- More photons may reach each photosite because the absorbing color filters are gone.
- Every surviving pixel samples roughly the same broad spectral band instead of one Bayer color.
- Fine monochrome detail may no longer depend on demosaicing assumptions.
- Near-infrared response may improve when the optical path also lacks an IR-cut filter.
The result depends on the layers that remain. Mechanical or chemical removal can damage microlenses, passivation, pixel structures, bond wires or the die. Uneven residue can also create a fixed pattern in every image.
NoIR is not monochrome
The Pi NoIR module omits the infrared-cut filter, but it still has a Bayer color-filter array. It is therefore a color sensor with visible-plus-near-infrared sensitivity, not a native monochrome sensor. Removing the lens assembly or IR filter and removing the Bayer array are separate modifications with different effects.
Results from the early attempts
Two cameras were damaged while separating the glued lens holder from the board. Two more failed during early scraping attempts. The exposed sensor package has extremely fine connections near the edge of the die; contact, debris, excessive force, or die movement can break or short them.
The fifth camera produced an image after the filter removal. Movement of the lens holder during refocusing then pulled on the sensor area and damaged a connection. The lens holder and focus mechanism therefore need the same care as the exposed sensor.
Mechanical method
The video records one of the mechanical scraping experiments under magnification.
A repeatable setup should include ESD protection, a rigid microscope fixture, controlled force, contamination control, flat field images before and after the work, spectral response measurements and a fixed method for restoring focus.
Chemical attempts
I tried several solvents and an ultrasonic cleaner. A later test used photoresist remover followed by a cleaning solvent and the camera continued to operate after that test. Sensor coatings and packaging can change between models and production lots, so material compatibility must be checked for the exact device.
Photoresist removers can be corrosive, toxic, combustible, or damaging to polymers and semiconductor passivation. Ultrasonic cleaning can mechanically stress bond wires and package structures. Anyone investigating a chemical method must identify the exact chemical, read its safety data sheet, determine material compatibility, provide ventilation and personal protection, and expect complete sensor loss.
Result
The modified module produced an image. A measured comparison with an unmodified camera would show the change in sensitivity, resolution, noise, uniformity and spectral response. Both cameras should use matched optics, exposure, illumination, focus and raw image processing.
Measuring the result
- Record raw images from an unmodified module before disassembly.
- Use a fixed lens, target, illumination, distance, exposure, and gain.
- Capture dark frames, uniform flat fields, a resolution target, and narrowband illumination samples.
- Repeat the same captures after conversion.
- Compare signal, read noise, fixed-pattern non-uniformity, hot/dead pixels, spatial resolution, and response by wavelength.
This comparison would show which changes came from color filter removal and which came from damage or image processing.
Hi Elad,
ReplyDeleteI have been searching for information on how to debayer the Pi camera and your blog post is one of the few sources I have found. Thanks for posting!
I have just a few questions:
1) what type of tool did you use to remove the filter?
2) what solvent(s) worked best for you?
3) Do you know of any more links about removing the Pi camera's bayer filter?
Thanks!
Kyle
Hello,
ReplyDeleteI am interested too in Kyle's questions. I need to debayer a RaspberryPi Camera V2 NoIR for my master thesis.
Many thanks!
Abbas
Hi Abbas,
ReplyDeleteWhich solvent did you eventuelly use? I have to do the same.
most kinds and brands of photoresist remover should work
Deleteafterwards you need to clean the residues for best result use heat, patient, and good microscope to monitor the process.
Hi Elad,
ReplyDeleteI am trying to solve the same problem and I found your blog really useful.
Can you explain which brand of photoresist remover used and the method (how to heat specially).
I have been trying to remove the color filter array by scratching, but my cameras always broke. Also, I wonder if there are three layers of the filter array before reach to the CMOS sensor.
Thank you very much.
This comment has been removed by the author.
DeleteHi Moso,
DeleteAs Elad replied above, you need patience, it's a very thorough process if you're etching the pi cam sensors.
The photoresist remover in general is an aggressive solution, different solutions may destroy the small board (<1sqcm sensor board, not the 2.5sqcm connected to the pi).
You need to check if the sensor is has a positive or negative photoresists and get the convenient remover. If you can't know that, then you have to try both seperately. For the Pi Cam 1.3 sensor, Wilkes et al. used a positive photoresist remover. Moreover, some removers target both kinds of resists.
If you get this to work then you will end up with a much more delicate sensor.
Good luck!