Wednesday, April 28th 2010

The Myth of the Megapixel Myth

When Canon released the 50D I thought it had too many pixels. And I thought I was smart in thinking so.

Canon, please understand that SLR buyers aren’t as gullible as compact buyers when it comes to megapixels.

But in reality I had fallen for the myth of the megapixel myth.

(This post grew to almost a 1,000 words. If you haven’t got all day, skip to the conclusion.)

Lets start from the beginning.

The megapixel myth refers to the notion that a higher number of megapixels equals a better camera. And in calling it a myth, we are implying that camera manufacturers are increasing the number of megapixels on camera sensors only to trick everyone into constantly upgrading their cameras. Indirectly, we are implying that there is some intermediate number of megapixels that should be considered optimum for a given sensor size.

Ironically, the optimum number of megapixels always seems to be equal to the number in the camera generation one step back from the very latest release. Giving thousands and thousands of spoilt (and misguided) photographer brats an excuse to pour out their disgust in a million forum posts. A bit like I did.

One day it won’t make sense to add more pixels, but we have a long way to go until we reach those numbers. As it is now, we’re still gaining a lot of detail in our photos when the resolution increases.

On photography discussion forums you often hear the claim that a high resolution sensor needs really good glass, or even that it outresolves available lenses.

But those claims simply aren’t true. They are based on an incorrect mental model of how resolution works.

Even if you’re using a really cheap or soft lens, you’ll still get more detail out of it with a higher resolution sensor.

Have a look at these two tests at Photozone.de:

(If you own the 18-55mm IS, don’t scream at me – I’m not claiming it is a soft lens. Read on.)

Scroll down to the section titled MTF. The diagrams show how much detail the lenses can produce on the two cameras. Specifically, they show how many horizontal black and white lines you can fit into the image height before they blend together into a grey mush.

Note that the Extreme Corners which are the softest areas of the lens, produce a higher level of detail on the 15 megapixel camera – just like the centre of the lens. So just because they’re soft on the 8 megapixel camera doesn’t mean they won’t produce more detail on a 15 megapixel camera. This is because the lens and the sensor both combine to produce the details in the final image.

A sharper lens will always give you finer image detail, no matter what the sensor resolution. And a higher resolution sensor will always give you finer image detail, no matter what the lens in front of it!

Some maths

Mathematically, this is an approximation of how it works:

1/I2 = 1/L2 + 1/S2

or

I2 = 1 / (1/L2 + 1/S2)

I is image detail, L is lens resolution and S is sensor resolution. These are linear resolutions, just as in the MTF-charts I referred to above. (Megapixels are two linear resolutions multiplied together, width x height.)

Let’s say we have a camera with S = 2,300 and a lens with L = 3,000. That would give us an image with 1,825 lines per picture height:

I2 = 1 / (1/3,0002 + 1/2,3002) = 1,8252

I = 1,825

If we now buy a better camera with, say, S = 3,200 we’ll get more and finer details in our images:

I2 = 1 / (1/3,0002 + 1/3,2002) = 2,1872

I = 2,187

As you can see, the lens is still able to resolve a lot more detail than we get in the final image.

To get anywhere near the maximum performance out of a lens, the sensor needs to resolve at least three times as much as the lens:

I2 = 1 / (1/3,0002 + 1/9,0002) = 2,8462

I = 2,846

2,846 lines is basically 95% of what the lens in this example can resolve.

As you may have noticed, the numbers in my examples above are not just taken out of the blue. The values for the sensor resolutions correspond to the image heights in pixels of the Canon EOS 350D and Canon EOS 50D.

I chose a lens resolution value that would make the image resolution values (1,825 and 2,187) correspond fairly closely to the average measured resolution in Photozone’s tests that I linked to. In other words, 3,000 line widths (per image height) is probably roughly what the 18-55mm IS can resolve.

Conclusion

So, what does this all mean? Well, since the numbers in the examples above correspond roughly to reality, we can make a simple calculation.

To get 95% of the resolution out of the Canon EF-S 18-55mm IS, or any other half decent lens, we need a sensor ~9,000 pixels high. Which means the width would be 13,500 pixels.

That equals 121.5 megapixels!

Even if we settle for 90% of the lens’ resolution, we need 60 megapixels to get there! Currently, Canon’s cameras are getting something like 60-75% out of the EF-S 18-55mm IS.

These figures obviously sound insane. But it is no more insane than having 12-14 megapixels in a compact camera. (A digital SLR has more than ten times the sensor area of a compact.) Flash memory and hard drives are getting cheaper all the time, so one day it will happen.

In other words, the megapixel myth is a myth in itself. Camera makers are not being tricksy when they add more megapixels. In fact, if we want to get the most out of our lenses we need lots and lots of megapixels!

Of course, there are many other aspects of a camera that are at least as important as the sensor resolution. And when it comes to compact cameras, with sensors no more than 5 or 6 mm wide, we’re probably reaching the upper limits of what makes sense. By now, I’m guessing that compacts are getting practically all the resolution out of their lenses.

17 Responses to this post:

  1. Meshwork says:

    I agree, almost totally. More pixels means more resolution, but only up to a point. Pixel photo-site size and the ability to absorb light is also important – and with smaller and smaller photo-sites due to the resolution increases over the same APSC size sensor (especially) or full frame sensor, diffraction kicks in at even moderate apertures. An example with pixel density is the Canon 30D having the same pixel density as that of the Canon 5D Mk11, at 6.4 um, the 5D Mk11 being the later model and having a full frame, 35 mm sensor. Lastly, with the very high pixel density of the 7D, the latest APSC sensor camera from Canon, the 4.3 um density means one has to more mindful of camera shake given the reduced capacity of that camera’s ability to promptly absorb light – and hence detail. Mesh, DP Review

  2. David Naylor says:

    Yes. But diffraction works just like with a soft lens. Independent of what aperture you’re using, you’ll always get more detail in the image with a higher resolution sensor.

    Even when diffraction comes into play, the sensor still needs to resolve at least three times more than the lens to get the most possible detail out it.

    Granted with smaller apertures, the lens’ resolving power is (slightly) reduced, so the number of pixels needed is also somewhat reduced. The factor three is still valid though.

  3. john says:

    Hi, dumb math question. How do you get i^2 = from 1/i^2 in the calculation?

    Also, does this mean I really do have to worry about megapixel counts in DSLR? I was looking at a Pentax with 6.2MP and a 10MP camera but now I am afraid to buy them because they aren’t “good enough.”

    I read on a blog somewhere that nothing mattered over four megapixels and that HD was only 2MP. Now I am completely confused and don’t know what to believe.

    Thanks for the article.

  4. David Naylor says:

    Thanks for your comment john. In the second line of the equation, notice the 1/ immediately to the right of the equals sign.

    In essence I have multiplied both sides with I^2 and divided both sides with (1/L^2 + 1/S^2). (And then switched sides.)

    Don’t worry about megapixels. While it is true that more will be better (but perhaps not for compacts), 6 MP and 10 MP are both plenty to make great prints.

    The claim that nothing matters over 4 MP is perhaps a bit over-simplified, but still probably true for the vast majority of photos that are taken every day.

  5. Meshwork says:

    We’ll agree to disagree. I do however suggest that you check out Digital-picture.com & Luminous Landscape for their appraisals of the 50D; also, at Canon’s Infobank web page on the subject:
    http://cpn.canon-europe.com/content/education/infobank/capturing_the_image/pixels_and_image_size.do
    Cheers
    Mesh

  6. David Naylor says:

    Sure, with increased detail comes the risk of capturing shake at a smaller level.

  7. Martin says:

    Well, I would rather want uniform performance across the frame, and there aren’t many lenses that perform as well off centre as they do at the centre. The Zeiss Makro-Planar 100mm f/2 is a very unique lens in that regard.

    I have shot with many lenses that have fantastic centre resolution, but perform poorly even slightly off centre.

    Lets assume physics will lax its boundaries, and its possible to have a 120mp FX sensor in a camera. How many lenses in your bag will be capable of performing well off centre at that resolution?

    There are lenses I’ve use that perform poorly at the edges on a 12mp FX sensor, and these lenses cost $1500 plus in their day. Referring to AF-D 20-35mm f/2.8 and the AF-S 17-35MM F/2.8 Nikkors. I also used a 16-35mm f/2.8 II on a 1DsMIII, and it had very poor corners even at f/8. The new AF-S 16-35mm is also no show stopper in the corners.

    With a resolution of 24 mp, most lenses already start softening ever so slightly from f/8 and smaller (diffraction)…The higher MP you have, the earlier diffraction occurs, which means lenses need to perform better at wider apertures. What will be the optimum aperture be on a 120mp camera? f/4, f/2.8, f/2? IF the lens performs well at these apertures at the centre…the corners will still suck gloriously.

    The BEST way to increase performance/resolution is to chuck the beyer type sensor design, and use real colour sensors. The Foveon sensor is an attempt at true colour sensor. That technology needs a heap load of research thrown at it, but its not economically feasible because the industry is still milking us with cheaply made CMOS sensors. They can be much easier produced than CCDs, even though CCD shows more promise for better quality. CCD sensors means more R&D $$$, which means less money for shareholders. Its all about money.

    My biggest wish would be for a proper B&W sensor, with no beyer interpolation. That gives almost a three fold gain in resolution! The only thing stopping me from buying a MF B&W back is the cost and the size of the system.

    just my 2 cents…

  8. John Handley says:

    Could you please send me the source of the mathematical equation you submitted.

    Based on your own figures, I assume that the Canon 18-55 lens resolves at 75% at no more than 21.1 MP. You say that it resolves at 90% at 60 MP. This means that to get a 20% increase in resolution you need to increase the sensor resolution by approximately 200%. A 20% increase in resolution means that you could not enlarge to the next paper size than what is currently appropriate.

    Once again, based on your figures I would say that when the lens is resolving at 65-75% then the camera body and lens is performing at it’s most efficient level. It would be very good if in a lens review a sensor value could be derived to show when the lens is performing at 70% resolution. This way the consumer can decide what is the best combination of lens and camera body and how far they are capable of increasing the sensor size and get a correspondingly meaningful increase in resolution.

  9. john says:

    Interesting math, but in practice put any zoom lens on a 5D MKII and you’ll see that the corner quality is pretty much crap. No zoom lens will have sharp corners at 21MP resolution, so unless you want to shoot with just primes extra Megapixels won’t be very benificial.

  10. David Naylor says:

    But the point is, even if they look like £$@& at 21 MP, you’ll have more detail there than at 12 MP.

  11. Ben Minstrel says:

    Yes, sampling more pixels gets you more detail. But right now, transfer rates to the computer, storage size on the computer, image processing times on the computer, dynamic range limitations of 14-bit data, and extreme noise encountered in dark regime shooting tell me that resolution is not where cameras really need improvement. I’m not dissatisfied — at all — with the horizontal and vertical detail in my images (15 mp 50D, 21mp 5D.) The 5D, if anything, is overkill. But I am *hugely* dissatisfied with the dynamic range — the ability to pull out low contrast details — and with noise — the ability to shoot fast in (relatively) dark regimes. Half of each day is spent in the dark, on average. Today’s Canon SLRs only behave well in relatively bright light, or with ridiculously long exposures (and yes, I use fast primes.) Canon’s not going to get me to buy another camera because it has more h/v detail. They can do it (and easily, too) by improving the dynamic range and the noise levels. I’d happy as can be with a 10mp camera if the thing would work better in in a dark restaurant, or when shooting the night sky. Remember: Bright light regimes are either artificial, or just a part of the day. For the rest of the time, we need more DR and quieter sensors (not noise reduction, actual quiet.) While the megapixel myth may indeed be myth, the fact is, megapixels are less important today because quite frankly, detail is satisfactory. Quality, however, is not.

  12. David Naylor says:

    Thanks for a very well written comment. I agree with you that detail in practice is satisfactory already and that more dynamic range would be nice. But would larger pixels (sensels for the know-it-alls) automatically mean higher DR?

  13. TheSwede says:

    Regarding noise larger pixels (all else being equal) are a very inefficient way to reduce noise. It’s an implementation of pixel binning which is a simplistic method of noise reduction. All else being equal more pixels give denoising algorithms better raw material to produce good output, and therefore more megapixels in practice means less noise.

    Dynamic range is not quite that simple, unfortunately. In theory, all else being equal, larger photosites will have higher dynamic range since they can hold more photons, but again, this is equivalent to binning. The main difference arguably lies in lack of focus on algorithms which can turn resolution into DR compared to algorithms which can turn resolution into less noise.

  14. David Naylor says:

    Interesting! So what we want really is some revolutionary new technology that can give us much larger photon wells at the current or higher resolutions. =)

  15. TheSwede says:

    Simplified, DR is the difference between the lowest possible amount of recorded photons and the maximum possible amount of recorded photons, so that is one of the ingredients. But it’s also important to lower the “floor”, by creating less noise on low amounts of photons. Thus, in theory, lower noise (which can be done by higher megapixels) results in improved DR, which /could/ counter the loss of DR from smaller photosites.

    In practice there are a lot of other considerations, of course, since all else is never equal. And in addition, megapixels sells cameras while high DR is much less visible. High usable ISO is getting a lot of hype, which has led to a tremendous advance in usable ISO. Would that this hype could extend to DR as well. We need an easy, standardized method of measurement of DR (in stops, using an easy to use setup) to get that ball rolling, for starters.

  16. JS says:

    I’m reminded of David Pogue’s experiment, where an image was shot at three focal lengths, with the wider images cropped to cover the same area. Then 16×24 prints were made at 7, 10, and 16.7MP. Only 1 in 50 observers correctly picked which is which.

    http://www.nytimes.com/2007/02/08/technology/08pogue.html

    If 7MP is indistinguishable from 17MP in a 16×24 print … how big a print do you need to actually make use of a 100MP sensor? And would any print of that size be examined closely enough for this to matter anyway? You don’t generally look at a mural with your nose inches from the wall. Heck, billboards don’t need more than 1 or 2MP, as I learned from my company’s graphic artist.

    I don’t think extracting every last bit of linear detail the lens can resolve is a worthwhile goal, when reduced noise and increased dynamic range would do much more for overall picture quality. But those aren’t succinctly summarized by one number, so they don’t sell as well.

  17. Ben Minstrel says:

    A concept I have for such a technology (effectively deeper wells) is the “digital well”; given tech that can count photons, you have (a) a well that accumulates them, (b) a local counter of many bits for each well, and this constantly counts the well content while draining it — if it can do so at a rate equal or better than the incoming photons (easier in dark regimes), then the “depth” of the well is equal to the size of the counter. Or, if the counter tech is *really* fast, no well at all, just a photon counter.

    This allows essentially unlimited exposure. Noise is, as always, an issue — photon-avalanched electrons as compared to random stray electrons from noise are indistinguishable. New materials with more stable properties are needed. Readout of each sensel is simply a matter of reading the counters.

    With regard to larger pixels being equivalent to binning smaller ones, yes, this is certainly true (within the limits of losses caused by non-sensor edges/microlensing and row/column readout and A/D noise), but doesn’t address the problems that over-detailed images bring with transfer, storage, and processing times.

    These are significant roadblocks to me today — adding more detail will only worsen the problem, I’ll still have to reduce resolution to get storage, transfer and processing sizes that are sanely related to the image sizes I actually use. So I maintain that this should be done in-camera; either with an actual lower resolution, or by resolution reduction (increases in dynamic range and decreases in noise are of course welcome.)

    Finally, WRT noise reduction, while binning is a simplistic method for noise reduction, it is also the most accurate one available (and so, therefore, are larger pixels.)

    Noise is reduced as the square root of the area (IOW 4x the area gets you 1/2 the noise, or 16x the area gets you 1/4th the noise), and this produces excellent images without content-consequent artifacts.

    More advanced algorithms have to depend on image knowledge, which is by its very nature, imperfect. Binning works with the base statistical properties of light noise *and* sensor noise, both in area, and in time (think stacking technologies.)