Depth of field when f and p are not known

Started 1 month ago | Discussions
Garry2306 Forum Member • Posts: 93
Re: Ill-conditioned equations

bclaff wrote:

Garry2306 wrote:

IMHO if you are looking for the ‘best’ depth of field management approach, the first thing you need to decide is what you are trying to do.

A single DoF setting may be of interest to a portrait photographer, but the real value of knowing the DoF is when trying to set an infinity shot, ie set a defocus blur and maximise the near DoF, or carry out a contiguous focus bracket set.

Although knowing the pupil mag (p) may feel important, it can easily be swamped by setting the circle of confusion, thus p and the CoC dominate the DoF equation, with one other variable, the focus position.

And here is the problem. How accurately do we know the focus position? As a Canon shooter, and one that creates Lua scripts in Magic Lantern and CHDK, I know that the ‘best’ I can do for focus position is to read the Canon upper and lower focus positions.

As my scripts are primarily written to aid focus bracketing, I will use the lower focus position. That is a conservative take on contiguous focus bracketing.

My Canon M3 CHDK script models the lens as a thick lens, ie modelling the hiatus. I also allow the user to guess p, but as I say, choosing a CoC for overlapping focus brackets will dominate things, eg https://photography.grayheron.net/2021/04/m3-brackets-pupil-magnification-update.html

Bottom line: focusing is fun.

Not sure why this reply is to me ...

I don't agonize over depth of field in my photography.
Using depth of field preview and experience has been my personal guide for years.

I do have a technical understanding depth of field and will chime in when I see statements that aren't true.

Sorry Bill, the reply was not aimed at you. Just a general posting on this topic.

Clheers

Garry

bclaff Forum Pro • Posts: 11,984
Re: Ill-conditioned equations

Garry2306 wrote:

bclaff wrote:

Garry2306 wrote:

...

My Canon M3 CHDK script models the lens as a thick lens, ie modelling the hiatus. I also allow the user to guess p, but as I say, choosing a CoC for overlapping focus brackets will dominate things, eg https://photography.grayheron.net/2021/04/m3-brackets-pupil-magnification-update.html

Bottom line: focusing is fun.

Not sure why this reply is to me ...

...

Sorry Bill, the reply was not aimed at you. Just a general posting on this topic.

No problem !

BTW, regarding your work. You can get some more accurate pupil magnification information from the PhotonsToPhotos Optical Bench Hub .

Several of the lenses you are interested in appear there, for example:

Regards,

-- hide signature --

Bill ( Your trusted source for independent sensor data at PhotonsToPhotos )

Garry2306 Forum Member • Posts: 93
Re: Ill-conditioned equations

bclaff wrote:

Garry2306 wrote:

bclaff wrote:

Garry2306 wrote:

...

My Canon M3 CHDK script models the lens as a thick lens, ie modelling the hiatus. I also allow the user to guess p, but as I say, choosing a CoC for overlapping focus brackets will dominate things, eg https://photography.grayheron.net/2021/04/m3-brackets-pupil-magnification-update.html

Bottom line: focusing is fun.

Not sure why this reply is to me ...

...

Sorry Bill, the reply was not aimed at you. Just a general posting on this topic.

No problem !

BTW, regarding your work. You can get some more accurate pupil magnification information from the PhotonsToPhotos Optical Bench Hub .

Several of the lenses you are interested in appear there, for example:

Regards,

Bill

Many thanks for the link.

Cheers

Garry

Garry2306 Forum Member • Posts: 93
Re: Ill-conditioned equations

BTW, purely for self education reasons, and the fact I’m about to try some ultra macro photography, I just posted a few thoughts on my blog, that some may find of interest.

I not claiming anything new here, as I say, my posting is cathartic in nature

https://photography.grayheron.net/2021/08/continung-insights-into-macro.html

alanr0 Senior Member • Posts: 2,445
Diffraction and Depth of Field
2

Garry2306 wrote:

BTW, purely for self education reasons, and the fact I’m about to try some ultra macro photography, I just posted a few thoughts on my blog, that some may find of interest.

I not claiming anything new here, as I say, my posting is cathartic in nature

https://photography.grayheron.net/2021/08/continung-insights-into-macro.html

Thanks for posting Garry. Some observations based on my own analysis:

In your root-sum-of-squares expression, you appear to equate the diameter of the geometric blur, c, with the diameter of the first dark ring of the Airy disk, 2.44 λ N, where N is the f-number and λ is the wavelength. As you point out, this is approximately equal to 4 N/3 for visible light, and more precisely for 546 nm green light.

Diffraction blur has a much weaker subjective impact than a 'top hat' geometric blur of the same diameter as the first dark ring of the Airy PSF. Arguably, better metrics might be the full width at half maximum (1.08 λ N) or the 1/e² diameter (roughly 1.64 λ N) often used to characterise blur diameter or spot size.

Yet another metric is the diameter of the geometric Circle of Confusion which gives the same MTF50 (modulation transfer function at 50% contrast) as the diffraction blur. This is approximately 1.7 λ N.

Combined diffraction and defocus

A further complication is that the root sum of squares combination of blurs is not particularly accurate, especially for small amounts of defocus. If you examine how the point spread function varies with defocus we do not see a simple monotonic broadening.

Intensity variation with defocus: https://en.wikipedia.org/wiki/File:Spherical-aberration-slice.jpg#file

Consider the central image (above) for image defocus with no spherical aberration.

For small defocus (image plane left or right of best focus), the intensity of the central peak of the Airy disk decreases, but does not get significantly narrower. Instead, an increasing proportion of the total energy is pushed outwards into the diffraction rings. At larger defocus, the geometric optics description of a uniform circular blur becomes more accurate.

In another series of threads back in 2016, I developed an alternative root sum of squares approximation for MTF50 which made some allowance for these effects. Not as coherent and easy to follow as your blog, but if you are interested, here is a summary with links to the original threads.

Getting back to your macro photograph, with moderate amounts of diffraction and defocus, the blur point spread function is not dissimilar to a simple Gaussian, and can respond well to sharpening in post-processing.  You may have better results with smaller apertures (higher f-number) than your present analysis predicts.  Worth investigating, at any rate.  https://rawpedia.rawtherapee.com/Sharpening

Cheers.

-- hide signature --

Alan Robinson

Garry2306 Forum Member • Posts: 93
Re: Diffraction and Depth of Field

Alan

Many thanks for your insight and links. 
I will certainly be reading and reflecting

Cheers

Garry

Garry2306 Forum Member • Posts: 93
Re: Diffraction and Depth of Field

alanr0 wrote:

Garry2306 wrote:

BTW, purely for self education reasons, and the fact I’m about to try some ultra macro photography, I just posted a few thoughts on my blog, that some may find of interest.

I not claiming anything new here, as I say, my posting is cathartic in nature

https://photography.grayheron.net/2021/08/continung-insights-into-macro.html

Thanks for posting Garry. Some observations based on my own analysis:

In your root-sum-of-squares expression, you appear to equate the diameter of the geometric blur, c, with the diameter of the first dark ring of the Airy disk, 2.44 λ N, where N is the f-number and λ is the wavelength. As you point out, this is approximately equal to 4 N/3 for visible light, and more precisely for 546 nm green light.

Diffraction blur has a much weaker subjective impact than a 'top hat' geometric blur of the same diameter as the first dark ring of the Airy PSF. Arguably, better metrics might be the full width at half maximum (1.08 λ N) or the 1/e² diameter (roughly 1.64 λ N) often used to characterise blur diameter or spot size.

Yet another metric is the diameter of the geometric Circle of Confusion which gives the same MTF50 (modulation transfer function at 50% contrast) as the diffraction blur. This is approximately 1.7 λ N.

Combined diffraction and defocus

A further complication is that the root sum of squares combination of blurs is not particularly accurate, especially for small amounts of defocus. If you examine how the point spread function varies with defocus we do not see a simple monotonic broadening.

Intensity variation with defocus: https://en.wikipedia.org/wiki/File:Spherical-aberration-slice.jpg#file

Consider the central image (above) for image defocus with no spherical aberration.

For small defocus (image plane left or right of best focus), the intensity of the central peak of the Airy disk decreases, but does not get significantly narrower. Instead, an increasing proportion of the total energy is pushed outwards into the diffraction rings. At larger defocus, the geometric optics description of a uniform circular blur becomes more accurate.

In another series of threads back in 2016, I developed an alternative root sum of squares approximation for MTF50 which made some allowance for these effects. Not as coherent and easy to follow as your blog, but if you are interested, here is a summary with links to the original threads.

Getting back to your macro photograph, with moderate amounts of diffraction and defocus, the blur point spread function is not dissimilar to a simple Gaussian, and can respond well to sharpening in post-processing. You may have better results with smaller apertures (higher f-number) than your present analysis predicts. Worth investigating, at any rate. https://rawpedia.rawtherapee.com/Sharpening

Cheers.

Alan

BTW I did try and deal with diffraction and macro photography on my blog: https://photography.grayheron.net/2020/10/dofis-now-for-macro-shooters.html

As I said in the last post on this thread, I will look into your links.

Once again, thanks for your feedback.

Cheers

Garry

Garry2306 Forum Member • Posts: 93
Re: Diffraction and Depth of Field

I thought some may be interested in my latest (personal/cathartic) posting on macro depth of field. With thanks to Alan and Bill.

https://photography.grayheron.net/2021/08/continuing-insights-into-macro.html

Garry2306 Forum Member • Posts: 93
Re: Diffraction and Depth of Field

Once again, I thought some may be interested in my latest post on macro depth of field and accounting for m & p, or not

https://photography.grayheron.net/2021/08/addendum-to-continuing-insights-into.html

Keyboard shortcuts:
FForum MMy threads