How do digital cameras work?
The camera is one of those wondrous inventions that changed the world.
Before it arrived the only way to make a picture was to draw it or paint it.
Which obviously removed a fair amount of the spontaneity when you were trying to knock
out a quick selfie of yourself giving epic duckface while eating a Maccy-Ds with your
bezzie mates.
Which is probably why Rembrandt always looked so depressed in his self-portraits.
Anyway, the camera made it possible to make an instant picture in a fraction of a second.
But the process involved in getting the image out of the camera and printed was a complicated
one.
The light-sensitive film had to be carefully removed, sent to a processor, get developed,
turned into a negative and then printed onto photographic paper.
In the dark.
Which was a problem with the rise of the digital age, the internet and your pressing need to
upload a picture of Fluffy to the 'my cat looks like Hitler' web forum.
But while the microprocessor revolution started to transform many parts of our lives from
the 1970s onwards, the digital camera was a relatively late invention, arriving after
the video camera, the mobile phone, the laptop computer and even the Billy Big Bass singing
plastic fish.
This was because the technology that lies at the heart of it, the sensor chip, is unbelievably
complicated.
In a film camera, light is sent through a lens and a shutter onto photo-sensitive film.
Which, with a subject shot in normal light, needs just hundredths of a second of exposure
to capture the image.
The front end of a digital camera works on exactly the same principle, light is focused
through the lens and controlled by a shutter and variable aperture.
But instead of film, there's a light-sensitive sensor chip that has to record all of the
data in a very short space of time.
There are different ways of doing this, but we're going to concentrate on the CMOS or
Complementary Metal Oxide Semiconductor sensor that now sits in the majority of digital cameras,
from those integrated in phones to fairly chunky DSLRs (that's Digital Single Lens Reflex
in the jargon) their the sort that look like 'real' cameras.
The camera's sensor is covered with tiny individual light sensitive cells, each of which can measure
the amount of light that falls on in.
As the digital camera has evolved, so have the number of these pixels on the surface
of the sensor.
Ten years ago, you'd struggle to get a digital camera capable of delivering much more than
a single 'megapixel' of resolution, a million total pixels, or a grid 1200 by 900.
But these days, 12 or 16 megapixels are commonplace among top-spec 'prosumer' and professional
camera.
That's enough to enable you to produce images the size of a magazine cover with no loss
in perceived quality.
The cells act like the photosensitive chemicals on old-fashioned film, reacting to the light
that falls on them and then reporting to the camera's microprocessor brain.
That would be fine for the sort of moody black and white shots favoured by gothy Instagram
users.
But, because most of us want to post pictures of our lunch to Facebook in colour, it's also
necessary to split the light 'seen' by the camera into the three primary colours which
can then be used to create an accurate image.
There are different ways of doing this: some expensive cameras will even employ three different
filters.
But most CMOS sensors will use what's called a 'Bayer Filter'.
This is a grid of coloured filters that sit over the sensor with red, green and blue elements
over individual pixels that will only allow their respective light colours through.
Because the human eye is most sensitive to green light, which largely determines how
'bright' an image looks, there are twice as many green pixels as red or blue.
The filters are arranged in a clever mathematical pattern, which means that the camera's brain
can interpolate using a demosaicing algorithm.
Yes, really.
Or, in slightly plainer language, the camera doesn't just look at an individual pixel on
the sensor, it also looks at the pixels around it to come up with an informed guess of what
the true colour of that pixel is.
Although even the most advanced sensors in the world still struggle with the increasingly
unlikely colour of Richard Hammond's hair.