Colour photography in the UV – understanding the Bayer filter

Can science be viewed in the same light as art?  Those of who work in science will definitely say there is a certain beauty to some aspects of science and certain experiments, and as Keats once said “beauty is truth; truth beauty”, so perhaps it is understandable that we perceive a well run and executed experiment as beautiful in its own right.

One area brings the two into direct contact – scientific imaging, where science itself plays a critical role in the creation of something artistic.  My work recently has taken me down the rabbit hole of UV photography, an area of imaging which has devotees in field ranging from forensics to dermatologists to botany to ornithology and beyond, but is an area which is prone to artifacts being introduced into the image as a result of how the image is captured, and is incredibly difficult to do well.

When I first got into this, one of my questions was “how does the camera interpret the different wavelengths of light in the UV, and what does this mean for the ‘colours’ in a UV photograph?”.  This seemingly naive question, has resulted in many sleepless nights, and metaphysical discussions, and I hope here to shed some light on it with some of my recent work, at least from the point of view of the photographer.

First a quick note about how cameras collect colour information.  I shall for the moment only talk about cameras with Bayer filters over the sensors – Sigma cameras which have the Foveon sensor uses a different approach, and at the moment I haven’t looked at them.  Back to conventional cameras.  The sensor is black and white – it is simply pixels which respond to light intensity.  Over the top of this sensor is a Bayer filter – an array of Red, Green and Blue dyed squares in a mosaic pattern. These then allow certain wavelengths to hit certain parts of the sensor, a bit like how the eye works with its cone cells, some of which are sensitive to red, others to blue and finally some to green. So we can create dyes which transmit light in s similar manner to our cone cells, and these applied to the sensor such that the camera can be made to be sensitive to what we perceive as red, green and blue.  As the wavelength changes we perceive light as different colours and the camera captures this in s similar way.  Also on top of the Bayer filter, on most cameras, is an arrayof microlenses which are designed to focus light onto the light sensitive parts of the sensor.

Now this colour information is all fine for visible light photography where we have our own reference, but what about UV or IR, where we cannot perceive the light and have no concept of what the colour should be?  This is where is gets interesting.  I’ll focus here on UV imaging, as that is my key area of interest for now. UV photography has been around since photography began.  Early orthochromatic films were UV and blue light sensitive, and eventually with the advent of colour films these could also be used to capture UV images.  But how was this colour information being captured?  The different dyes/sensitizers in the film used for isolating red, green and blue, also let through some light in the UV in differing amounts depending on the wavelength of light. This then created the image.  The thing is, unlike in the visible spectra, where the peak transmission of the dyes had been created based on our own reference, in the UV it was down to luck ad chance – how did the dye behave beyond the wavelength range it was created for?  When digital photography came along the same thing happened but with the Bayer filter – dyes were created to make colour filters for Sensors, but those dyes let through some UV too, and different amounts depending on different wavelengths. The fact that these dyes don’t all behave in the same way is why we can create striking UV images such as this one of a Buttercup in my garden below, which shows the typical darkening of the central part of the flower, thought to be linked to the way the flowers are pollinated and insect vision.

Buttercup in UV

Interpreting the colours created by the cameras in the UV is hard though.  Bayer filter manufacturers release spectral transmission data for the filters in the visible region, 400-700nm, but not beyond that.  Without knowing this, how do we know what the camera is capturing?  The Bayer filters are grown/deposited directly onto the sensors so cannot simply be removed to enable measuring of their transmission spectra.  So we have a dilemma, how do we measure something which cannot be isolated?  And this has been a problem for UV photographers for years – to understand colour in the UV we need the Bayer filter transmission curves, and how do we get at that?

As part of my work in UV imaging I wanted a way to measure camera sensitivity as a function of wavelength, and with little option I ended up building something to do that, which I have discussed on my page here.  Once I started playing with this I realised it could be used to work out how much light was being let through the Bayer filter and Microlens array on the sensor as a function of wavelength, as long I had 3 things.  A lens which let the same amount of light through between 280nm and 800nm, a camera with the Bayer filter removed along with the UV/IR cut filter (my monochrome camera), and another camera with the Bayer filter still attached (but with the UV/IR cut filter removed).  I had two of the three from my sunscreen work, and after a quick eBay purchase, and a conversion to have its UV/IR cut filter removed, I got hold of the final camera I needed, and I set about the task of measuring the Bayer filter transmission in the UV.

First though a test – did what I see in the visible spectra match what would be expected.  The image below is from a paper by Taguchi and Enokido “Technology of color filter materials for image sensor” gave a nice visible light spectra of the dyes used for making Bayer filters.

Bayer filter dyes transmission curves

How did my measurements stack up?  This is what I measured for my Canon EOS 5DSR which had had the UV/IR cut filter removed.

The first thing to notice, is that the channel responses go above 100% for each colour in their respective bands.  This is because of the microlenses on top of the Bayer filter.  The microlenses collect light which would otherwise miss the light sensitive part of the sensor, and make sure that it is collected.  With these microlenses removed, some of the incoming light is lost as it hits none sensitive parts of the sensor.

With my setup I have the ability to go beyond the visible though as I can measure from 280nm to 800nm (although for practical reasons here I only went down to 320nm).  This is what it looks like is I expand the X axis on my graph to include the UV and IR.

We can now see that the Bayer filter transmission in the UV drops dramatically for the each of the colour channels at 400nm and below, which is more easily seen here;

But there are differences between the different colour channels at different wavelengths.  As photographers we sort of knew this, otherwise everything in the UV image would be the same tone.  This however is the first time that has been measured directly using this approach with a real system.

So what, you may ask?  Without knowing this we could still make nice pictures, and yes that is a valid point.  However we can now begin to understand more about the world from the images we take.  While the leap to using a camera as a spectrometer may be a way away yet, the fact that different wavelengths trigger different responses in the camera can be used to learn something about what light is being reflected and captured in the image.  It also explains why monochrome camera conversions are ideal for UV imaging where colour information is not needed – Bayer filter dyes absorb huge amount of UV.  Strip the filter away and much more UV can hit the sensor, making it about 4-6 times more sensitive.

This work has come about through a natural evolution.  I asked a direct question which needed an answer to push my research forward – what was the sensitivity of my camera to different wavelengths.  I built something to answer that question.  That in turn lead me to find a new use for my device, which was to answer a much more fundamental question about Bayer filter transmission curves in the UV which has applications in fields far beyond my original area.  So often now, as researchers we are so tightly focussed in on a specific problem that we miss the opportunities our work can bring elsewhere in the scientific field.  Unfortunately there is so little time to do fundamental research, and it is so hard to justify it the accountants, as it doesn’t always have an obvious result.  But it is this fundamental work which can have the most wide reaching impact of all.  So, I say to you managers, when you have someone working for you who has a passion for something, do your best to let them indulge it.  If you want to make the biggest discoveries, you have to take the biggest leaps….