# Can using a high resolution sensor and downsampling compensate for a soft lens?

In this question Does super-sampling produce good results? the difference in quality between using a high and low resolution sensor of the same size and then downsampling the high resolution one gives better image quality.

This however does not discuss lenses.

If I have a soft lens am I better of in terms of image sharpness taking a low resolution sensor (say 12mp) or a high resolution sensor (say 48mp) and downsampling to the same size as the lower resolution sensor.

Assume the best availible algortim is used and consider that each pixel have information about its neighbours (as defined by a teoretical perfectly sharp lens) and thus more information than simply avaraging the pixels in groups of four are availible.

• In real world practice, nothing compensates for a soft lens. May 17, 2018 at 17:59

The short answer is yes, you can overcome some loss of sharpness using many more pixels. in theory you can approximate a sharp lens on a small sensor using a soft lens on a large sensor. If we make two assumptions:

• softening focus does not increase any other distortions. This is often not true for zoom lenses where field corrections and plane corrections occur in the same group.
• You are talking about nearly perfect sensors. Many modern sensors have nearly perfect MTF (around 96% nyquist) but there will still be some loss of resolution to the sensor which will limit your ability to recover sharpness.

Given the two assumptions, you are left to recover spatial resolution at a log-base-2 rate. What this means in practice is you need to double the dimensions of your sensor (quadruple the megapixels) to recover half the difference in resolving power. So if you are trying to approximate a lens that has 100 "sharpness units" using a lens that has 50 sharpness units, you will need 4x the megapixels to get the final image to about 73 sharpness units (remember sensor loss) if you wanted to get it to about 92 sharpness units you would need about 16x the megapixels (50-75-87.5-93.75-95.875) is 4 steps and 2^4 is 16 and you will lose about 4 sharpness units to the sensor.)

I'm very much simplifying a subject about which thousand page textbooks have been written so please don't take my math too literally. My point is that the answer is application dependent. As mentioned, you can never fully compensate for a sharp lens because you can never get to 100%. On the other hand, if you are trying to make a 300x600 website header out of a slightly blurry 24mp image then yeah, you can get away with it.

• Great answer I do not know why I missed it until now. You mention textbooks have bern written. What would the subject of thouse books be? Do you have any book titles or google terms? Mar 7, 2019 at 16:03

Each stage of the image process degrades the image.

If you have a soft lens, then using a higher res sensor and downsampling after will give you some better results than just using the lower res sensor. However it's not a magic bullet. The information isn't there. No sensor will give you a better image than the lens it self gives.

You may also be able to make modest gains with a sequence of downsize/sharpening steps to preserve what edges there are.

The best answer is to get a sharper lens.

In short, Bayer CFA means colour data is under-provisioned, so in any case if your scene is well lit then 48MP Bayer sensor will be a better way to get 12MP full colour image than 12MP Bayer sensor. That's why Sigma's Foveon has superior details compared to Bayer sensor with same number of photosites in well-lit conditions.

Under-provisioning chromaticity hurts luminance data as well because there can't be strict separation between colour and luminance.

Whether this advantage means anything in your case ultimately depends on the characteristics of the lens. If it's resolution is low (small radius softness) then yes it will somewhat help.

• I thought I had read somewhere that taking a high resolution image and downsizing it gives a better result than acquiring the image at the lower resolution. I realize "better" needs to be defined. I know this question can get very technical quickly but I once did an experiment with a digital scanner, scanning at a high resolution and downsizing to a lower resolution in a Photoshop type program vs scanning at the lower resolution to begin with. I recall that I was not convinced there was any readily noticeable difference. Should there have been? Dec 19, 2023 at 17:33
• @Not_Einstein i did not research scanner sensors but it looks like they have full colour unlike camera sensors. In general it should not make any difference which resolution you take the image if your sensor has full colour and you are then going to scale it down. Dec 20, 2023 at 0:08
• Full colour sensor @ 12MP should produce same image as 48MP full colour sensor scaled down to 12 MP. In case of scanner it's slightly more complicated because the sensor resolution does not change but the speed of moving it depends on quality selected but the core concept is the same. Dec 20, 2023 at 0:10
• The question was specifically about CFA sensors (I guess so because they are almost the only well-regarded type) and that's why there is difference. Dec 20, 2023 at 13:42