Relationship Between Magnification vs Depth of Field

Have questions about the equipment used for macro- or micro- photography? Post those questions in this forum.

Moderators: rjlittlefield, ChrisR, Chris S., Pau

rjlittlefield
Site Admin
Posts: 23564
Joined: Tue Aug 01, 2006 8:34 am
Location: Richland, Washington State, USA
Contact:

Re: Relationship Between Magnification vs Depth of Field

Post by rjlittlefield »

Peter, I'm pressed for time today so this reply will be short.

Your line of thinking is very familiar to me. It makes great intuitive sense, but for this problem intuition does not lead to correct answers.

If you want a single formula that works well in almost all cases, then there a common approach from the literature that you may like.

It says to use a COC-based formula, but plug in a modified slightly larger COC value that has been computed as follows:
COC_including_diffraction = sqrt(COC_without_diffraction^2 + AiryDiskDiameter^2)

In other words, use the RMS combination of geometric COC and diffraction blur.

There is no legitimate physical basis for this particular combination of COC and Airy disk diameter.

However, as a matter of empirical curve fitting it does a good job of matching the shape of an accurate physics-based curve, and then any of the usual "season to taste" methods for adjusting the main scaling parameter bring the quick-to-compute method into close agreement with the physics-based curve that is painful to compute.

I suspect you have not yet read and understood the entirety of https://www.photomacrography.net/forum/ ... hp?t=23751 . Please go do that, and check back when you're done.

--Rik

mjkzz
Posts: 1683
Joined: Wed Jul 01, 2015 3:38 pm
Location: California/Shenzhen
Contact:

Re: Relationship Between Magnification vs Depth of Field

Post by mjkzz »

further more, through out your analysis back in 2014, all the analysis about wave optics are correct and excellent, Nikon also has same conclusion.

Except, I think in your analysis, the term CoC is mixed/confused with qlwe which is an inherent property of an optics for a given NA. For a single point, qlwe is the "CoC" in your wave optics analysis and the real CoC in geometry is zero for a single point. If real CoC we pick is not zero, then you have a dumb bell shaped DOF, with optical axis passing through it, you get Nikon formula.

And what is the maximum impact for this diffraction term for a photo lens? Lets see, if we stop down to f/32, pretty reasonable for a photo or "normal", lens, that means NA of 1/64, plugging that into diffraction term, wavelength = 0.55um, in vacuum or air, we get:

0.55 * 1 * (64 * 64) = 2252.8um or 2.25mm.

That seems to be small enough for scenery, portrait, etc. But at same time, say, we pick a 1/2000 sensor with as CoC, that means the geometric term is

22.4um * 64 * 1/M where, say M is 0.1 for some close-up work, this means the geometric term is 14336um or 14.34 millimeters, compare that with 2.25, definitely over dominate. Open up more, the diffraction term becomes even smaller, at f/2.8, the diffraction term is 17.248um and this compared to the same 14.34mm? See, this is why a macro lens like MP-E 65, also exhibit the behaviour like f(m) = C / m curve, as one link in my previous post.

So, the Nikon formula works for both "normal" lenses and objectives.

mjkzz
Posts: 1683
Joined: Wed Jul 01, 2015 3:38 pm
Location: California/Shenzhen
Contact:

Re: Relationship Between Magnification vs Depth of Field

Post by mjkzz »

rjlittlefield wrote:
Mon Dec 05, 2022 4:30 pm
Peter, I'm pressed for time today so this reply will be short.

Your line of thinking is very familiar to me. It makes great intuitive sense, but for this problem intuition does not lead to correct answers.

If you want a single formula that works well in almost all cases, then there a common approach from the literature that you may like.

It says to use a COC-based formula, but plug in a modified slightly larger COC value that has been computed as follows:
COC_including_diffraction = sqrt(COC_without_diffraction^2 + AiryDiskDiameter^2)

In other words, use the RMS combination of geometric COC and diffraction blur.

There is no legitimate physical basis for this particular combination of COC and Airy disk diameter.

However, as a matter of empirical curve fitting it does a good job of matching the shape of an accurate physics-based curve, and then any of the usual "season to taste" methods for adjusting the main scaling parameter bring the quick-to-compute method into close agreement with the physics-based curve that is painful to compute.

I suspect you have not yet read and understood the entirety of https://www.photomacrography.net/forum/ ... hp?t=23751 . Please go do that, and check back when you're done.

--Rik
Yes, I was reading that post and the conclusion is, your are missing the geometric term in Nikon's formula and making it that DOFs are the same for all optics with same NA, that is not right. The more I think about it, the more sense Nikon's formula makes. After all, they do publish things for no reason.

Anyways, after all this, it further confirms my confidence in Nikon's formula, it is encapsulating both wave optics and ray optics. So, I do not think I will invest too much time on this.

mjkzz
Posts: 1683
Joined: Wed Jul 01, 2015 3:38 pm
Location: California/Shenzhen
Contact:

Re: Relationship Between Magnification vs Depth of Field

Post by mjkzz »

OK, during morning workout, the dumb bell, particularly the 20lbs one, model/visualization is really what it is: using Nikon formula, the handle is determined by geometry, the two ends are governed by wave optics, if you pick e = 0 (in Nikon formula), the handle is a single point, and that formula is wave optics. If you pick e = 1/2000th of sensor with, way out of Airy disk, it still adds in the effect of diffraction (wave optics part) as that is inherent property of it, you can not ignore it, but as M gets smaller, it is so small, say in portrait photography, that can probably be ignored as measurement error, then you get geometric models like fxsover and Stanford.

rjlittlefield
Site Admin
Posts: 23564
Joined: Tue Aug 01, 2006 8:34 am
Location: Richland, Washington State, USA
Contact:

Re: Relationship Between Magnification vs Depth of Field

Post by rjlittlefield »

Peter, I would like to see how you apply and interpret these formulas.

Please compute for me the DOF, using formulas from fxsolver and Nikon, for the following conditions:
  • magnification 1X
  • nominal f/8
  • COC = 0.020 mm
  • focal length 100 mm
  • in air so n=1
  • lambda=0.00055 mm (green light)
--Rik

mjkzz
Posts: 1683
Joined: Wed Jul 01, 2015 3:38 pm
Location: California/Shenzhen
Contact:

Re: Relationship Between Magnification vs Depth of Field

Post by mjkzz »

rjlittlefield wrote:
Tue Dec 06, 2022 2:23 am
Peter, I would like to see how you apply and interpret these formulas.

Please compute for me the DOF, using formulas from fxsolver and Nikon, for the following conditions:
  • magnification 1X
  • nominal f/8
  • COC = 0.020 mm
  • focal length 100 mm
  • in air so n=1
  • lambda=0.00055 mm (green light)
--Rik
OK, translate f/8 to nominal NA of 1/16

Nikon: 140.8um + 320um = 460.2um or 0.4602mm

fxsolver: 2*8*0.02*2 / (1 - (0.0016*0.0016) or about 640um or 0.64mm

mjkzz
Posts: 1683
Joined: Wed Jul 01, 2015 3:38 pm
Location: California/Shenzhen
Contact:

Re: Relationship Between Magnification vs Depth of Field

Post by mjkzz »

So, I used Fusion 360 to draw some visualizations. The circle symbolizes the wave optics effect (not in real world) and its diameter is governed by the first term of Nikon's formula, the wave optics term. The distance between two circles are governed by ray optics, ie geometry.

Important note: the wave optics function operated on a single point is independent for another point. This must be true, else a DOF will have infinite number of points and distance between them is infinitely small, if the operation of wave optics is not independent, you get chaos :D [added]You can think of it as wave optics acting on a segment of line[edit] of perfect focuses [/edit], instead of one single point[/added]

So, that said, basically, the Nikon formula says geometry determines a gDOF, and at each end of that gDOF, two points, are also affected by wave optics, it needs to be added in.

Mitty at 5x
DOF_Mitty5X.png
Mitty at 2.5x, zoomed down
DOF_Mitty2.5X.png
Mitty at 10x, zoomed up
DOF_Mitty10X.png

Macro_Cosmos
Posts: 1511
Joined: Mon Jan 15, 2018 9:23 pm
Contact:

Re: Relationship Between Magnification vs Depth of Field

Post by Macro_Cosmos »

I really wonder how the discussion here is deployed into various deconvolution and superresolution algorithms (like SRRF-stream), I imagine the transitional regime being discussed is accounted for.
This reminds me of the "light regimes" in imaging, where intuitive formulas sometimes just do not work that well, making camera comparisons extremely tricky.

rjlittlefield
Site Admin
Posts: 23564
Joined: Tue Aug 01, 2006 8:34 am
Location: Richland, Washington State, USA
Contact:

Re: Relationship Between Magnification vs Depth of Field

Post by rjlittlefield »

mjkzz wrote:
Tue Dec 06, 2022 2:53 am
rjlittlefield wrote:
Tue Dec 06, 2022 2:23 am
Peter, I would like to see how you apply and interpret these formulas.

Please compute for me the DOF, using formulas from fxsolver and Nikon, for the following conditions:
  • magnification 1X
  • nominal f/8
  • COC = 0.020 mm
  • focal length 100 mm
  • in air so n=1
  • lambda=0.00055 mm (green light)
--Rik
OK, translate f/8 to nominal NA of 1/16

Nikon: 140.8um + 320um = 460.2um or 0.4602mm

fxsolver: 2*8*0.02*2 / (1 - (0.0016*0.0016) or about 640um or 0.64mm
It appears that you have used NA = 0.0625 = magnification/(2*Fnominal). The correct value would be calculated as NA = magnification / (2*Feff).

Please repeat the calculation using correct NA.

--Rik

mjkzz
Posts: 1683
Joined: Wed Jul 01, 2015 3:38 pm
Location: California/Shenzhen
Contact:

Re: Relationship Between Magnification vs Depth of Field

Post by mjkzz »

rjlittlefield wrote:
Tue Dec 06, 2022 5:22 am
mjkzz wrote:
Tue Dec 06, 2022 2:53 am
rjlittlefield wrote:
Tue Dec 06, 2022 2:23 am
Peter, I would like to see how you apply and interpret these formulas.

Please compute for me the DOF, using formulas from fxsolver and Nikon, for the following conditions:
  • magnification 1X
  • nominal f/8
  • COC = 0.020 mm
  • focal length 100 mm
  • in air so n=1
  • lambda=0.00055 mm (green light)
--Rik
OK, translate f/8 to nominal NA of 1/16

Nikon: 140.8um + 320um = 460.2um or 0.4602mm

fxsolver: 2*8*0.02*2 / (1 - (0.0016*0.0016) or about 640um or 0.64mm
It appears that you have used NA = 0.0625 = magnification/(2*Fnominal). The correct value would be calculated as NA = magnification / (2*Feff).

Please repeat the calculation using correct NA.

--Rik
OK, not sure about that, it should be the nominal one, unless Nikon formula says otherwise, but I am so handicapped here -- no access to that article :D Why it should be the nominal one? Because as soon as you plug in Feff, the Feff has magnification implicitly embedded, I doubt Nikon would do that. But then again, I know nothing about optics, so there :D

However, what is interesting with Nikon's formula is that, they use e instead of "traditional" c for CoC, so without access to that article, I do not know what that e is, I just guessed/assumed the e is CoC, it might not be. Even with access to that article, I am not sure if Nikon has explanation for it, they probably just tell reader "trust us", pick an arbitrary e and you will get what you want. :D

Anyways, I think I am spending too much time on this, but after some thinking, with wave optics effect being independent, it looks increasingly like Nikon's formula is correct, it encapsulates both ray optics and wave optics.

mjkzz
Posts: 1683
Joined: Wed Jul 01, 2015 3:38 pm
Location: California/Shenzhen
Contact:

Re: Relationship Between Magnification vs Depth of Field

Post by mjkzz »

Another thought is, my rough illustration is NOT a good one and I know there are a lot of professors or people in academic world HERE, maybe this is a good topic, such as a 3D visualization of Nikon's formula, maybe even some animations, for an undergrad thesis, and some more rigorous analysis why that 3D visualization is correct for graduates. That would be a great asset for this community.

Just saying :D

mjkzz
Posts: 1683
Joined: Wed Jul 01, 2015 3:38 pm
Location: California/Shenzhen
Contact:

Re: Relationship Between Magnification vs Depth of Field

Post by mjkzz »

Macro_Cosmos wrote:
Tue Dec 06, 2022 4:40 am
I really wonder how the discussion here is deployed into various deconvolution and superresolution algorithms (like SRRF-stream), I imagine the transitional regime being discussed is accounted for.
This reminds me of the "light regimes" in imaging, where intuitive formulas sometimes just do not work that well, making camera comparisons extremely tricky.
Maybe you can create a new thread about it, I have slightest idea on what you are even talking about :D, sure sounds interesting to read.

rjlittlefield
Site Admin
Posts: 23564
Joined: Tue Aug 01, 2006 8:34 am
Location: Richland, Washington State, USA
Contact:

Re: Relationship Between Magnification vs Depth of Field

Post by rjlittlefield »

Peter,
mjkzz wrote:
Wed Dec 07, 2022 2:33 am
But then again, I know nothing about optics, so there :D
If you had written that seriously, then I would be happy to agree it appears a good approximation. :D

But moving on...

rjlittlefield wrote:
Tue Dec 06, 2022 5:22 am
The correct value would be calculated as NA = magnification / (2*Feff)
That statement can be explained as follows.

Going back to basics of optics, NA is intimately involved in one of the invariants of a lens system. Everywhere there is a focused image, the effective F-number at that point is equal to 1/(2*NA) at that same point. If there is a scale change between two image planes, then the NA's and effective f-numbers for those two planes are changed by the same scale.

You may be familiar with the standard formula that

Feff = m/(2*NA)

where
Feff is the effective F-number at the sensor,
m is the magnification, from subject to sensor
NA is the numerical aperture at the subject

Note that two different image planes are involved in that formula.

So, being more explicit about what's going on:

Feff_subject = 1/(2*NA_subject)
Feff_camera = m*Feff_subject

and combining the two formulas

Feff_camera = m/(2*NA_subject)

Of course this formula can be rearranged by algebra, giving:

NA_subject = m/(2*Feff_camera)


As for physical intuition, NA = 1/(2*nominal_F_number) would be the correct formula IF the lens were reversed and placed 1 focal length away from the subject. But in order to focus at a finite distance, you have to move the lens away from the subject. Increasing the lens-to-subject distance makes the cone of light narrower, and since NA is all about the angles, making the cone of light narrower reduces the NA by the same amount.


So now, repeating myself with clarification, the correct value of NA would be calculated as NA_subject = magnification / (2*Feff_sensor).

Again, please repeat the calculation using correct NA.


--Rik

mjkzz
Posts: 1683
Joined: Wed Jul 01, 2015 3:38 pm
Location: California/Shenzhen
Contact:

Re: Relationship Between Magnification vs Depth of Field

Post by mjkzz »

If you had written that seriously, then I would be happy to agree it appears a good approximation. :D
That is so true, I know nothing about optics, it is not an approximation, it is the truth. Period!

But then again, your insistence of using feff is based on your way of thinking, ie, your interpretation of Nikon's formula, that might not be how Nikon article intends to, get it?

To me, the two NA's used in Nikon formula, in the first and second term are the SAME, it would be stupid for Nikon to use the same word NA to mean different things in different part of the formula. And this NA should be independent of magnification, else it would make the term for wave optics dependent on magnification. I know nothing about optics, I do know how to glance through a formula and look at things and get a basic understanding what it is saying.

If you are trying to say that the geometric term from Nikon formula disagrees with calculation from fxsolver one, the only thing is the term e used in Nikon's formula. I am sure you have access to the article for the Nikon formula, please read it and try to understand what it is saying before applying something you think is right, after all, it is not your derivation, maybe they do give some hints about selection of the e.

mjkzz
Posts: 1683
Joined: Wed Jul 01, 2015 3:38 pm
Location: California/Shenzhen
Contact:

Re: Relationship Between Magnification vs Depth of Field

Post by mjkzz »

Furthermore, reading more in one of your PDF, titled "What's the depth of field (DOF) for a diffraction-limited lens?", you used f_eff . . . I agree with first term, which also agrees with Nikon's first term, and also says wave optics effect is only dependent on NA.

But the part underlined red seems to say the wave optics effect does depend on magnification because (m+1)/m is not always one, when focused to infinity, m approaches to zero, (m+1) / m would approach infinity, this contradicts with the first formula that says wave optics effect is only a function of NA, independent of m

So something about your definition of f_eff (feff), something does not add up as the two formulas in your PDF should agree with each other, but they do not.

Or is it my lack of knowledge in optics?
RikWO.png

Post Reply Previous topicNext topic