A pixel is worth a thousand nerds

A few months ago I came across an article by a technical journalist who was listing the features that he hoped to see in the upcoming version of the iPhone. Top of the list was a 20 megapixel camera. This got me wondering why anybody would want so many pixels on a smartphone.

Just before Christmas 2004 I went to Wrocław for my brother’s Wedding (no, the lady at the check-in counter at Heathrow couldn’t pronounce it, either, though according to my brother it is something like “Frotswaf”, with a gulp in the middle of the w). As usual I brought my camera (a Canon EOS3) and a selection of lenses, but when I arrived he thrust an EOS20D at me and told me to use that. It was my first experience of a digital SLR, and as soon as I got home I had to buy one. I loved that camera, and took a lot of pictures with it, even selling some of them. Oh…. and it had an 8.2 megapixel sensor.

Technology moves on very quickly, and with digital SLR’s that means better sensitivity, reduced sensor noise, faster focusing and (in many cases) more pixels. Canon now make a camera with 50.6 megapixels, the EOS 5DS. Over the years I have updated my equipment a few times, but the real revelation came when I got an EOS 1DX. Like the rest of the 1-series it is a professional camera and squarely aimed at those who make their living out of photography. It was brought out in time for the 2012 London Olympic Games, and was used by many of the photographers there. It had 18.1 megapixels. Two years ago I bought the updated version, the EOS 1DX ii, because I was trying to photograph dragonflies in flight and the focusing system was more sophisticated. There is not much to choose between the two cameras in terms of image quality, though I should add that the more recent one has 20.2 megapixels.

So why should a smartphone require more pixels than a serious professional camera? Well, obviously the answer is that it is a meaningless marketing exercise, but is it actually an advantage?

Do you mind if I take your pixel?

In case anybody doesn’t know what a pixel is, it refers to the tiny coloured squares that make up a digital image. Here is a picture of my dog (who is fussing at me just now because she want to go outside and eat squirrels), to illustrate the effects of changing the number of pixels:

Isn’t she sweet? (Canon 1Dx II and 70-200 f/2.8 L is II lens)
With fewer pixels she is getting a bit blurred
If you half-close your eyes she still looks like a spaniel
Can you tell what it is yet?

The top image has 0.7 megapixels, and would probably not look quite sharp, therefore, if you made an A4 print from it, though as it happens the focus was a bit off to begin with so the low-ish pixel count might not make too much difference. The bottom one has few enough pixels that you could count them.

Without going into complicated details of sensor design, roughly speaking one pixel on the camera sensor corresponds to one pixel in the photograph. The more pixels there are, the finer the resolution can be in the image, but beyond a certain point the human eye can’t tell the difference. For an A4 print, it is quite common to print at 72 dpi (dots per inch, which is how printers measure resolution). This works out as about 0.5 megapixels. If you want an especially fine resolution you might choose 300 dpi, which is about 8.7 megapixels.

That’s all very well, but what if you want a larger image? What about all those posters on advertising hoardings? Well, the main thing about a larger print is that you are going to view it from further away, so generally whoever makes the print will keep the count the same but just use bigger pixels. Of course it is useful to have a few extra pixels in hand if you want to crop the photo, provided that it is otherwise sharp enough, and this is where quality of a proper camera with a high-quality lens comes into its own.

Ah yes, but what if you have a 4K television, and want to use it to watch videos shot on your phone… ?

4K, Slow K, Special K, AOK…?

There are two 4K standards, 3840 x 2160 and 4096 x 2160 (this second one is used for commercial digital cinema). These correspond to 7.5 and 8.8 megapixels. No need to go up to 20.

More pixels mean larger files, and therefore more storage space and bigger data contracts if you want to share them (come to think of it, maybe it is the telecomms providers that are driving this…). But there are other disadvantages, because what is really important to image quality is pixel size.

The larger a pixel is on a sensor, the more light it can gather, and so the more sensitive it can be. All serious photographers know that there is never enough light, unless you are in bright sunshine or carry a flash, and there is a constant struggle to balance shutter speed against aperture against cost and weight of equipment. As the light gets dimmer, smaller pixels just can’t register it any more. Smartphones get round this to some extent by aggregating the signal from several pixels which means that you can still take photos, but the effective pixel count is much lower, and the sharpness suffers, with a curious kind of smudging which I suppose you might regard as artistic:

This roe dear was on our lawn, shot with an iPhone 5

Smaller pixels are also more susceptible to thermal noise. The random movement of electrons within the sensor can cause it to register a signal even if no light is falling on it. This depends on the temperature, and is one of the reasons that the Hubble Space Telescope has to be kept cool. However, a phone is generally going to be at the temperature of your pocket, and even if you did manage to cool it down sufficiently to reduce thermal noise the battery will stop working. Smaller pixels have less light striking them to offset the effects of thermal noise, and indeed smaller circuitry in general is more susceptible as it the random currents generated don’t average out so well. This is very noticeable here:

My dog contemplating Christmas decorations, shot with an iPhone 6 plus

So far these problems all boil down to the particle nature of light, with individual photons striking the sensor and ionising electrons (the photoelectric effect, which was described by Einstein and got him his Nobel prize). But light also behaves as a wave, and this, too, can degrade the image with small pixels. What is important here is not so much their size as their spacing, and the reason is diffraction.

He ain’t got no diffractions

Diffraction is what happens when a wave encounters an edge, which then acts as a source of new waves spreading out from it. If you want an illustration of this try dropping stones into a pond on a still day and watch what the ripples do. In the case of a camera the edge in question is the diaphragm of the lens, what we refer to as the aperture. Anybody serious about photography will know that you can improve the sharpness of the image by stopping down the lens (making the aperture smaller), which cuts out the light going obliquely through the edge of the lens leaving behind the light travelling through the centre, where lenses perform better (professional lenses are designed to be so good even at the edges that this doesn’t make a lot of difference, and they are very expensive).

But… The smaller the aperture the greater the contribution from diffraction by the edge of the aperture itself, and this softens the image. This isn’t something that can be removed by clever lens design – it is a fundamental feature of the wave behaviour of light. In the days of film it wasn’t an issue, as the spacing of light-sensitive grains in the emulsion were well beyond the theoretical limits of the available lenses. But as camera sensors have been getting smaller, with the pixels closer together, it has now become a real problem. I notice it especially when photographing insects. When dealing with something that small the depth of field (how far the in-focus area extends) is very shallow, and ideally I want to stop down the lens to improve it, but as I do so, diffraction makes the in-focus area less sharp.

This certainly applies to smartphones, too. They tend to have wider apertures than conventional cameras (here I am referring to the effective aperture, given as the f-stop, which is defined as the focal length of the lens divided by the diameter of the physical aperture), typically f/2 or thereabouts, but because the pixels are so close together, it is diffraction rather than pixel number which gives the theoretical resolution of the camera.

In practice the limit is the quality of the lens itself, as good lenses are complicated and expensive to make, requiring several elements of different shape and material to cancel out the aberrations that can’t be avoided with simpler designs.

Actually I am quite impressed by what can be achieved with a smartphone camera. In most of the situations where people want to take a photograph it will produce something of reasonable quality which can be readily shared.

I will end with an apothegm attributed to Chase Jarvis:

The best camera is the one you have with you, not the fancy one you left at home.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.