Two small contributions of new member from southern bavaria

A forum to ask questions, post setups, and generally discuss anything having to do with photomacrography and photomicroscopy.

Moderators: rjlittlefield, ChrisR, Chris S., Pau

Charles Krebs
Posts: 5865
Joined: Tue Aug 01, 2006 8:02 pm
Location: Issaquah, WA USA
Contact:

Post by Charles Krebs »

Craig
What is the relevance of the two terms depth of field and depth of focus and what is their relationship to one another?

Could someone put this into a bite size nutshell?
In simplified terms:

-Depth-of-field in normally used to refer to the amount (depth) of the subject that will be rendered "adequately sharp" (refers to object space)

-Depth-of-focus refers to the acceptable amount the sensor/film plane can be "off" and still be "acceptably sharp" (refers to image space).

The values are inversely related in a given situation. For example a 4/0.10 will provide (realtively!) large depth-of-field while it will have very shallow depth-of-focus.

For a more detailed discussion see:
http://www.microscopyu.com/articles/for ... depth.html
Unfortunately the terms are frequently used interchangeably, which can lead to confusion at times.

As mentioned above, somewhat counter intuitively.... your depth-of-focus (image space) is extremely less with a low power objective like a 4X than it is with something like a 40X. This is one reason why photomicrographers will sometimes have a hard time getting a really sharp image from a high quality 2X or 4X objectives with a microscope that is supposedly "parfocal" (eyepieces and camera in focus at the same time). A film/sensor plane "error" that is practically inconsequential with higher power objectives can be very bad with a low power objective. For example... if the system was set up with the "parfocality" established using, say, a 20/0.40 you could be far off with a 4/0.10 which has 30X less depth-of-focus. (Even though the 4X would have about 10X the depth-of-field).

michael_r
Posts: 30
Joined: Sun Jan 22, 2012 5:46 am
Location: Bavaria

Post by michael_r »

Thank you all for your helpful comments and interesting links. I already learned a lot.

Concerning the tube lens question i believe that all 200 mm lenses with good imaging quality at infinity should do the job well. Bulky medium format lenses probably even a little better as these are designed for large diameter (and therefore for rays that pass at larger distance to the optical axis)? I will do further investigations on this subject, as i will get hands on a mitutoyo tube lens for comparison and also have other interesting candidates (but only for my sony 900 which does not have live view and therefore is not so well suited for this type of photography). If i will find something remarkable i will report it. But progress will be slow, as i'm currently serving as the dean of our faculty (sigh) .....

Rik thank you for the infinity comparison. Really interesting.

Craig thank you for asking the DOF question, which really puzzled me, when i read Riks comment. If i look at the DOF specification of my lenses in the Edmunds catalogue i find 1.6 um and 0.9 um for the 20x and 50x respectively and i tried to realize smaller step sizes due to the recommendation of some overlap (in some posts step sizes well below 1 um were reported for 40x to 50x). If i use the formulas of NikonmicroscopyU i find 4.3 um and 2.2 um respectively inserting e=10 um and lambda=0.55 um (hope i typed everything correct into my pocket calculator). That's a considerable difference and i would like to find out how the Nikon formula derives, which i haven't seen elsewhere before. Is there someone who can tell me, where i find a derivation of that formula?


Michael

ChrisR
Site Admin
Posts: 8668
Joined: Sat Mar 14, 2009 3:58 am
Location: Near London, UK

Post by ChrisR »

Nikon and Mitutoyo tube lenses have been mentioned again, and a link to Chris S's detailed list of Edmunds parts for the Mitutoyo which he uses in his bratcam.
Not only is the Nikon tube lens less expensive than the Mitutoyo, but he has investigated Thorlabs parts, and worked out which can be put together to hook it up to cameras. It turns out they also come to significantly less cost than comparable Edmunds parts.
I checked with Edmunds UK who eventually replied that they don't have anything which fits the Nikon tube lens, unlike Thorlabs.
The key Thorlabs part is adapter SM2-M38, $45.
The whole assembly would come under $200.
When Chris S returns from camping in the desert (insert green with envy, smiley) I'm sure he'll be happy to elucidate.
It might be assumed that the Nikon tube lens would work as well as the Mitutoyo with either makers' objectives, but on a sample of just one, there is room for doubt. It' s too early to elaborate on that, pending further tests.

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

Post by rjlittlefield »

michael_r wrote:Craig thank you for asking the DOF question, which really puzzled me, when i read Riks comment. If i look at the DOF specification of my lenses in the Edmunds catalogue i find 1.6 um and 0.9 um for the 20x and 50x respectively and i tried to realize smaller step sizes due to the recommendation of some overlap (in some posts step sizes well below 1 um were reported for 40x to 50x). If i use the formulas of NikonmicroscopyU i find 4.3 um and 2.2 um respectively inserting e=10 um and lambda=0.55 um (hope i typed everything correct into my pocket calculator). That's a considerable difference and i would like to find out how the Nikon formula derives, which i haven't seen elsewhere before. Is there someone who can tell me, where i find a derivation of that formula?
I cannot tell you where to find the derivation of that formula. I can, however, comment on the difference between Nikon's and Mitutoyo's numbers. Briefly, it appears that Mitutoyo is specifying single-sided DOF = maximum deviation from the plane of sharpest focus, as opposed to the two-sided DOF that we want for focus stacking and is computed by Nikon. Another minor difference is that Mitutoyo's formula includes only the wave optics term, nothing to do with pixel size. If you manually compute Nikon's wave optics term, effectively setting e=0 which the applet doesn't let you do, then I believe you'll find exactly a factor of 2 difference between the Nikon and Mitutoyo numbers. See http://www.photomacrography.net/forum/v ... 5246#75246 and continuing onto Page 2 for the original discussion.

--Rik

ChrisR
Site Admin
Posts: 8668
Joined: Sat Mar 14, 2009 3:58 am
Location: Near London, UK

Post by ChrisR »

rays that pass at larger distance to the optical axis
Now, there's a ray diagram here somewhere.... :?
We're only using the centre really, the microscope manufacturers tube lenses are quite small, as is the image circle diameter requirement.

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

Post by rjlittlefield »

ChrisR wrote:Now, there's a ray diagram here somewhere.... :?
http://www.photomacrography.net/forum/v ... ght=#58595 ?

--Rik

michael_r
Posts: 30
Joined: Sun Jan 22, 2012 5:46 am
Location: Bavaria

Post by michael_r »

Rik thank you for your explanation and for the very informative link. It seems that i produced too many images for my stacks.

Michael

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

Post by rjlittlefield »

michael_r wrote:It seems that i produced too many images for my stacks.
Well, if you are looking for the absolute best image quality that you can get from a lens, I think there is no such thing as "too many". On the other hand, there may well be some point where you decide that the additional cost is not justified by the improved quality.

I just now ran a "shallow" test stack (only 191 frames) to illustrate. The setup was a 40X NA 0.50 lens mounted in a microscope driven by StackShot, whose positioning performance is documented HERE. The step sizes are in units of micron, "1" = 1 micron. I shot the stack at nominal 1/16 micron step size, then processed repeatedly with Options > Preprocessing > "Stack every N'th frame" set to 1, 2, 4, etc.

You're looking here at a tiny piece of one scale from a moth wing, image center, reproduced at 100% actual pixels straight from Zerene Stacker PMax.

Image

Nikon's applet does not include a lens of this specification, but it's simple enough to use their formulas directly. The calculated DOF is 2.4 um with e=4, or 2.2 microns with e=0.

You can match this number against the images and apply your own subjective criteria.

To my eye, there is frank focus banding at 4 microns and above, at 2 microns there is an overall loss of contrast and some of the finest details may be missing entirely, and at 1 micron and below there is only some difference in contrast that could mostly be made up by filtering. If my subject were flat enough, I might choose to shoot at 1/2 micron to maximize image quality. For thicker subjects I would comfortably shoot at 1 or 2 microns, depending on the frame count I was willing to pay. But I would have to think very seriously about going larger than that at the same aperture, and would probably opt instead to go with a smaller NA to reduce the risk of focus banding.

Here is the full frame of this particular subject as shot and stacked, 191 frames at 1/16 micron. Total depth to get everything in focus would have been about 120 microns.

Image

--Rik

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

Post by rjlittlefield »

Craig Gerard wrote:Could someone put this into a bite size nutshell?
Maybe....
Edmund Optics list the depth of focus at 0.9μm for the Mitutoyo M Plan Apo 50X 0.55 and the Resolving Power at 0.5μm.

Using those figures I could easily be inclined to shoot at 0.5μm when focus stacking with the aforementioned objective.
That would be OK, but you might also consider it overkill. See illustration above.
What is the relevance of the two terms depth of field and depth of focus and what is their relationship to one another?
Mitutoyo uses "depth of focus" to mean one-sided depth of sharpness at the subject, where Nikon uses "depth of field" to mean two-sided depth of sharpness, also at the subject. Mitutoyo is the only source I've seen use the phrase in that way.
johnsankey wrote:Microscopists are much more generous in their acceptance of blurry images than most photographers are - all they have to do is identify things whereas we want them to look sharp. DoF very much depends on who is judging it. However, DoFocus and DoField are essentially the same concept.

Edmund's DoF of 0.9um for the 50x/0.55 corresponds to an 800px wide image, lower resolution than we photographers normally consider sharp.
Then we will eagerly await your production of photographer-quality high magnification images. The microscopists that I know would love to have sharper images, but so far they've been forced to live with what the physics of light allows.

For what it's worth, Mitutoyo/Edmund's formula does not incorporate any assumptions about pixel size or count. The only thing that goes into the formula is the wavelength of light and the aperture size (NA). The formula is based entirely on wave optics. It corresponds to how far away from perfect focus you can be while still retaining significant contrast near the cutoff frequency implied by diffraction given the specified aperture. At high magnifications the image content does correspond to small pixel counts, but that's an output of the physics, not an input from an unusually tolerant human.

--Rik

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

Post by rjlittlefield »

On further consideration of the DOF question, I realized there was a confounding factor in my earlier posting showing results from various step sizes. This posting is to address that issue.

The confounding factor was PMax.

PMax is commonly used for high mag stacking because it's very tolerant of overlaps and regions with no sharp detail. However, one of its side effects is a sort of "sharpening" artifact whose effect is to increase the contrast of details that are seen to go smoothly into and out of focus. In the context of my earlier illustration, this means that the panels with finer step sizes experienced more sharpening than panels with coarser step sizes.

To remove this factor, I reran the tests using DMap instead of PMax. DMap is less tolerant of overlaps and regions without sharp detail, but that's not a problem for the piece of moth scale that I'm using for evaluation. In exchange, DMap guarantees that the original contrast, colors, and noise levels will be retained.

Using DMap, here are the results. Before reading further, please stop and evaluate the images yourself. When you think you understand, resume reading.

Image

The catch here is that I've modified the format slightly to facilitate evaluation. What you're looking at is an animated GIF in which the result of 1/16 micron steps is used as a reference image, and each panel flashes between that 1/16 reference and whatever image result the labeled step size produced. You can tell that this is happening by looking at the little black dot following each label. When the dot is absent, you're looking at the specified step size; when it's present, you're looking at the 1/16 micron result. It's a very sensitive test for detecting differences.

I think the results are pretty clear. From 1/16 to 1 micron, the images are indistinguishable. At 1.5 microns, there are tiny detectable difference, but I surely wouldn't see them without the flashing. At 2 microns, the differences are larger and more widespread, but again that I think that most people would not see those without the flashing. At 2.5 microns, there's definite blurring in some areas, and it gets worse from there on out.

As noted earlier, Nikon's applet does not include a lens of this specification but it's simple enough to use their formulas directly. The calculated DOF is 2.4 um with e=4, or 2.2 microns with e=0. In contrast, the Edmund/Mitutoyo formula, with its additional factor of 1/2, gives the number 1.1 microns.

So what step size should you use? Well, it depends. If you plan to stack using PMax, then you can get a sharper rendering "out of the box" by using a smaller step and letting PMax do some sharpening for you as a side effect. Or if stack depth is important, you can take Nikon's smallest number and cut it back by 20% or so to be sure of not missing anything.

This has been an interesting test. I'll probably clean this up and post separately to make it easier to find later, but since folks are already watching this thread I thought I'd post here for continuity now.

--Rik

ChrisLilley
Posts: 674
Joined: Sat May 01, 2010 6:12 am
Location: Nice, France (I'm British)

Post by ChrisLilley »

rjlittlefield wrote: This has been an interesting test. I'll probably clean this up and post separately to make it easier to find later, but since folks are already watching this thread I thought I'd post here for continuity now.
--Rik
It has been most instructive.

When you posted the PMax series I was about to reply asking for a DMap series to remove the noise buildup aspect with a 'too fine' step size. Then I read on and you did a DMap series; the animation helped see small differences but at the cost of reducing the images to 256 colours indexed.

In the cleaned up post, it would be useful to see side-by-side PMax and DMap at the same, full-colour bit depth (perhaps only for selected step sizes, like 1/16, 1/4, 1, 2(because it is the optimum) and 4. I ask since you presumably have those images already.

It might also be helpful for readers in later years to transcribe the formulae used, in addition to retaining the links to other sites; this would help if those sites go away, or rearrange their structure without putting approporiate redirects in place.

Thanks again Rik for the excellent illustrative examples and clear discussion.

Blame
Posts: 342
Joined: Fri May 14, 2010 11:56 am

Post by Blame »

I think I must be missing something here.

I thought Stack Shot was only reliable to about 1um. Isn't that going to skew results with a test starting at 1/16 um?

The conclusion of 1.5 to 2um is going to be correct for that NA with Stack Shot but could be anything up to 1um wider with a decent microscope stage. Probably the error is much less because most steps are accurate but it could still be enough to count.

Perhaps it would be more accurate to use an objective with a lower NA.

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

Post by rjlittlefield »

Blame wrote:I think I must be missing something here.

I thought Stack Shot was only reliable to about 1um. Isn't that going to skew results with a test starting at 1/16 um?
What you missed was:
The setup was a 40X NA 0.50 lens mounted in a microscope driven by StackShot, whose positioning performance is documented HERE.
As described at that link,
This is a sequence of 132 moves, the largest of which measures a bit under 0.14 microns (average 0.0625 microns).
Sorry for the confusion. I'm never sure what to repeat, and what to just include by reference.

--Rik

Blame
Posts: 342
Joined: Fri May 14, 2010 11:56 am

Post by Blame »

Oh. I should have read more carefully. Brilliant and very useful test. It needs to be in a sticky.

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

Post by rjlittlefield »

Thanks. I plan to turn it into a FAQ, but I want to run some more tests first.

--Rik

Post Reply Previous topicNext topic