Pages: 1 2 [3]   Go Down

### AuthorTopic: The DOF vs Diffraction challenge: FF or crop?  (Read 19561 times)

#### David Eichler

• Sr. Member
• Offline
• Posts: 807
##### Re: The DOF vs Diffraction challenge: FF or crop?
« Reply #40 on: August 29, 2011, 06:42:10 am »

That's not only what Erik is saying, it's a commonly known fact called physics, unfortunately. Deconvolution sharpening can restore some of the resolution lost due to diffraction blur, but some loss remains and noise may increase. The fact that you act surprised suggests that you don't see a difference between an actual image taken at e.g. f/8 and f/22. I'm puzzled by that. Are you saying that you can fully remove the blur caused by diffraction, or do you see no difference to begin with?

Cheers,
Bart

Restore lost resolution? How can resolution be restored once it is lost? Do you really mean accutance, perhaps?
Logged

#### hjulenissen

• Sr. Member
• Offline
• Posts: 2051
##### Re: The DOF vs Diffraction challenge: FF or crop?
« Reply #41 on: August 29, 2011, 06:54:02 am »

Thank you.

The link to this image seems to be broken?
http://echophoto.dnsalias.net/ekr/images/DoF2/A55_100Macro_small1-16.jpg

So basically, you are looking at defocusing (PSF expansion) due to defocusing (moving the object of interest out of focus), and due to diffraction limiting (shrinking the aperture). I would expect the total defocusing to be something like:

 large aperture small aperture Out of focus Large PSF Medium PSF In focus Small PSF Medium PSF
Is that confirmed by your test?
Hi,

My understanding is that diffraction is not a disc (like defocus for an ideal thin lens) but more like a "bell curve". For peak shapes similar to "bell curves" most often FWHM (Full With Half Maximum) is used, but the effect of diffraction will be broader than FWHM. But some detail may also be resolved within the FWHM diameter as we still have some gradient.

My article here: http://echophoto.dnsalias.net/ekr/index.php/photoarticles/49-dof-in-digital-pictures?start=1 demonstrates this with real world samples. Diffraction is red circles and defocus is green circles. For diffraction the conventional value is used. FWHM would be somewhat smaller.

When looking at the above article keep in mind that diffraction is constant for each row. Defocus is increasing from left to right.

Last page of the article shows examples of sharpening using "basic" deconvulution using Smart Sharpen in CS5 and Topaz inFocus.

Best regards
Erik

Logged

#### hjulenissen

• Sr. Member
• Offline
• Posts: 2051
##### Re: The DOF vs Diffraction challenge: FF or crop?
« Reply #42 on: August 29, 2011, 06:58:26 am »

Restore lost resolution? How can resolution be restored once it is lost? Do you really mean accutance, perhaps?
I think this is only semantics. Deconvolution can (ideally) do a filtering operation that bring details that have had their contrast reduced to invisible levels back again to visible levels. I.e. true details that are visibly lost (and really hard to regain using blind sharpening) can be restored to their original value. Or to an approximation of their original value corrupted by noise and flaws in the characterization of the PSF.

So yes, you are right, the resolution is never truly "lost", but it is degraded/corrupted in such a way that it is really hard to bring back.

-h
Logged

#### Bart_van_der_Wolf

• Sr. Member
• Offline
• Posts: 8910
##### Re: The DOF vs Diffraction challenge: FF or crop?
« Reply #43 on: August 29, 2011, 08:24:41 am »

Restore lost resolution? How can resolution be restored once it is lost? Do you really mean accutance, perhaps?

Hi David,

You are correct, once it's lost it's gone. However, what many consider lost is actually restorable to a significant extent. It's not done by edge contrast enhancement, but by deconvolution.

Diffraction especially is a good candidate for deconvolution sharpening/restoration, because it is not just an average over an area but rather a weighted average. So, as long as there is some microcontrast left (even when spread over multiple pixels), and we have or can synthesize a reasonably accurate model of the blur pattern (a point spread function or PSF), a lot of the seemingly lost resolution will prove to be restorable to real resolution. However, the lower the modulation transfer of the optical system is the higher the chance that noise will reduce our chances of successful recovery by generation of artifacts. And when the diffraction blur is very pronounced, there comes a limit beyond which there is no hope for restoration.

Cheers,
Bart
Logged
== If you do what you did, you'll get what you got. ==

#### torger

• Sr. Member
• Offline
• Posts: 3267
##### Re: The DOF vs Diffraction challenge: FF or crop?
« Reply #44 on: August 29, 2011, 08:26:29 am »

Restore lost resolution? How can resolution be restored once it is lost? Do you really mean accutance, perhaps?

You cannot restore lost signal, but the thing is that with diffraction (and many other types of distortion) the signal is not lost, just distorted. If you know the shape of the function that distorted the signal you can make an inverse function and run the distorted signal through that and restore the original.

So even if the signal is totally blurry, if the blur function is well-defined you can "run it backwards" and restore the original -- that is what deconvolution is about. Deconvolution is a mathematical process that is used in many signal processing applications, not just in photography. It is often used in audio applications for example.

However, if the signal has been distorted with a function that totally cuts off parts of the signal (not just shuffles it around) the original cannot be restored. Fortunately diffraction is a relatively well-behaved type of distortion that keeps all signal and only blurs it (randomly though which is bad, but with a specific probability function so with enough signal it becomes well-defined).

To make a perfect inversion (deconvolution) you need perfect signal without noise and have the exact distortion function (point spread function, PSF), which you in practice won't have, so what you today can achieve with deconvolution is quite limited, but I find it useful in many images, not only for diffraction but also for example to enhance sharpness in long exposures when there's been some vibration problem.
« Last Edit: August 29, 2011, 08:30:48 am by torger »
Logged

#### Bart_van_der_Wolf

• Sr. Member
• Offline
• Posts: 8910
##### Re: The DOF vs Diffraction challenge: FF or crop?
« Reply #45 on: August 29, 2011, 10:03:18 am »

My understanding is that diffraction is not a disc (like defocus for an ideal thin lens) but more like a "bell curve". For peak shapes similar to "bell curves" most often FWHM (Full With Half Maximum) is used, but the effect of diffraction will be broader than FWHM. But some detail may also be resolved within the FWHM diameter as we still have some gradient.

Hi Erik,

Yes that's correct. This will also mean that with very high sensel densities and/or very narrow apertures (= large diffraction pattern diameter), the diffraction blur pattern will be oversampled, which in turn will make it easier to successfully deconvolve such an image. A defocus blur PSF will look like a disc of more or less uniform brightness, which will not provide as much help for practical restoration. In theory, in a perfect world, there is no mathematical difference as long as the PSF is decribed accurately.

Cheers,
Bart
« Last Edit: August 30, 2011, 04:56:16 pm by BartvanderWolf »
Logged
== If you do what you did, you'll get what you got. ==

#### hjulenissen

• Sr. Member
• Offline
• Posts: 2051
##### Re: The DOF vs Diffraction challenge: FF or crop?
« Reply #46 on: August 30, 2011, 01:54:04 pm »

This will also mean that with very high sensel densities and/or very narrow apertures (= large diffraction pattern diameter), the diffraction blur pattern will be subsampled, which in turn will make it easier to successfully deconvolve such an image.
Did you mean supersampled?

-h
Logged

#### hjulenissen

• Sr. Member
• Offline
• Posts: 2051
##### Re: The DOF vs Diffraction challenge: FF or crop?
« Reply #47 on: August 30, 2011, 01:59:08 pm »

Diffraction especially is a good candidate for deconvolution sharpening/restoration, because it is not just an average over an area but rather a weighted average.
I am scratching my head over this. Why is it necessarily harder to invert the response of a rectangular filter kernel than a general non-rectangular kernel (switching my brain over to 1-d operations for convenience)?

The DFT of a rectangular function is a sin(x)/x function with periodic zero crossings. In 2-d space I guess the equivalent would be circular flat (space) and some Bessel function (frequency). This means that for some frequency components the recorded SNR will be very low (tending towards 0). But other shapes may have deep zeros as well. The question is if the image will look better if we amplify only those components where the SNR is satisfactory?

-h
Logged

#### Bart_van_der_Wolf

• Sr. Member
• Offline
• Posts: 8910
##### Re: The DOF vs Diffraction challenge: FF or crop?
« Reply #48 on: August 30, 2011, 04:55:18 pm »

Did you mean supersampled?

You are correct, I meant supersampled/oversampled. Thanks for spotting that, I've changed the text to avoid further confusion.

Cheers,
Bart
Logged
== If you do what you did, you'll get what you got. ==

#### Bart_van_der_Wolf

• Sr. Member
• Offline
• Posts: 8910
##### Re: The DOF vs Diffraction challenge: FF or crop?
« Reply #49 on: August 30, 2011, 05:29:21 pm »

I am scratching my head over this. Why is it necessarily harder to invert the response of a rectangular filter kernel than a general non-rectangular kernel (switching my brain over to 1-d operations for convenience)?

As I said, mathematically it isn't. However, because we rarely have an exact PSF, and in the presence of (photon- and) read-noise, and the demosaicing of that noisy signal, the algorithms used are not necessarily straight forward classic deconvolution. They usually result in noise amplification although the signal is amplified more. Even the Richardson Lucy algorithm is based on maximum likelihood statistics of Poisson noise distributions.

Now, as for the difference between a defocus and a diffraction blur, and the deconvolution of it. Consider a large uniform area (free of noise to make things easy) in the spatial domain with a small signal in the middle. Now blur it with a uniform disc shaped filter that's several times larger in diameter than the signal. The small signal will become the average of that full disc's area, and thus very small, maybe even less than 1 quantization unit difference from the surrounding area. Now compare that to blurring with a Gaussian or an Airy disk shaped blur filter. The blurred image is more likely to still have some (Gaussian) shape with a slightly higher signal directly in the middle of the original signal, because the blur filter took a weighted average instead of an area average. Combining this slightly better signal with a deconvolution, offers a (slightly) better chance of restoration.

Add noise, and we can use all the small bits of help we can get.

Cheers,
Bart
Logged
== If you do what you did, you'll get what you got. ==

#### hjulenissen

• Sr. Member
• Offline
• Posts: 2051
##### Re: The DOF vs Diffraction challenge: FF or crop?
« Reply #50 on: August 30, 2011, 05:57:16 pm »

Now, as for the difference between a defocus and a diffraction blur, and the deconvolution of it. Consider a large uniform area (free of noise to make things easy) in the spatial domain with a small signal in the middle. Now blur it with a uniform disc shaped filter that's several times larger in diameter than the signal. The small signal will become the average of that full disc's area, and thus very small, maybe even less than 1 quantization unit difference from the surrounding area. Now compare that to blurring with a Gaussian or an Airy disk shaped blur filter. The blurred image is more likely to still have some (Gaussian) shape with a slightly higher signal directly in the middle of the original signal, because the blur filter took a weighted average instead of an area average. Combining this slightly better signal with a deconvolution, offers a (slightly) better chance of restoration.

Add noise, and we can use all the small bits of help we can get.

Cheers,
Bart
That may be the case for a small star or a hypothetical object. But is it the case for general, complex objects? How do we know that the shape of a part of a tree does not interact with the Gaussian when convolving to form a perfectly flat (hard-to-recover) end-result where using a flat kernel would have produced something for R-L to work on?

How does an image with wide, flat general MTF, but periodic deep high-frequency zeros look like? Assuming that is the optimal correction of a circular, flat PSF.

-h
Logged

#### erpman

• Jr. Member
• Offline
• Posts: 61
##### Re: The DOF vs Diffraction challenge: FF or crop?
« Reply #51 on: September 06, 2011, 10:02:43 am »

So, after this week´s math-class, lets have a look at some real world examples:

A side by side comparison of canon 1dsIII and the pentax645d at different apertures. Although diffraction is clearly noticable, the MF holds detail much better than the FF, and the detail lost to diffraction seems to be recoverable with sharpening/deconvolution.

http://www.ephotozine.com/article/pentax-645d-canon-eos-1ds-mark-iii-comparison-digital-slr-review-15653

Logged

#### ErikKaffehr

• Sr. Member
• Offline
• Posts: 11311
##### Re: The DOF vs Diffraction challenge: FF or crop?
« Reply #52 on: September 06, 2011, 10:41:19 am »

Hi,

It's a bigger sensor so any image would be around 30% magnified.  But both sensor would probably loose 75% of their megapixels when stopped down to f/22. It is know that diffraction can in part be corrected by deconvolution.

Best regards
Erik

So, after this week´s math-class, lets have a look at some real world examples:

A side by side comparison of canon 1dsIII and the pentax645d at different apertures. Although diffraction is clearly noticable, the MF holds detail much better than the FF, and the detail lost to diffraction seems to be recoverable with sharpening/deconvolution.

http://www.ephotozine.com/article/pentax-645d-canon-eos-1ds-mark-iii-comparison-digital-slr-review-15653

Logged
Erik Kaffehr

Pages: 1 2 [3]   Go Up