getting close to a rhododendron leafhopper

Images of undisturbed subjects in their natural environment. All subject types.

Moderators: rjlittlefield, ChrisR, Chris S., Pau

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

Re: getting close to a rhododendron leafhopper

Post by rjlittlefield »

Jens_ac wrote:
Tue Aug 27, 2024 11:34 am
(for my feeling there is a 1/pi missing in the DOF calculator)
Which calculator, and why do you think this?

--Rik

Jens_ac
Posts: 18
Joined: Sat Aug 10, 2024 8:37 am
Location: Aachen, Germany

Re: getting close to a rhododendron leafhopper

Post by Jens_ac »

rjlittlefield wrote:
Tue Aug 27, 2024 12:04 pm
Jens_ac wrote:
Tue Aug 27, 2024 11:34 am
(for my feeling there is a 1/pi missing in the DOF calculator)
Which calculator, and why do you think this?

--Rik
Hello Rik - your calculator (Zerene DOF calculator). I think this because when I take about 3x more images I get more resolution - ok, I do not see any banding or such using your calculator so it is not wrong for sure but I think that it is not optimal.
If I read your formular right for the Rayleigh length I think a 1/pi is missing for diffraction case: Z_R=lambda/(pi NA NA), which I normaly use. I agree that this is the most extreme case I apply here and DOF calculator works nice. But since it does not cost me anything but a few seconds I feel the optimum at about 3x more images than the DOF calculator tells me. I hope you understand.
Best regards,
Jens

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

Re: getting close to a rhododendron leafhopper

Post by rjlittlefield »

Jens_ac wrote:
Tue Aug 27, 2024 12:32 pm
Z_R=lambda/(pi NA NA)
I would be interested to see a reference that explains the origin of that formula.

The one that I use, lambda/(NA NA), is well known to give the total slab thickness within which the optical image has wavefront error of no more than 1/4 lambda. At maximum defocus, this results in a modest sag of the MTF curve, about 26% loss of contrast at the most sensitive frequency. It is one of the standard optical engineering criteria for "diffraction limited", and it's consistent with what the major manufacturers of microscope objectives use to spec their lenses. (Mitutoyo can be confusing because they specify the one-sided DOF, maximum acceptable deviation from perfect focus, which is only half as large.) If you go to https://www.microscopyu.com/microscopy-basics/depth-of-field-and-depth-of-focus , find the formula for d_tot, and set n=1 (air) and e=0 (perfect detector), what's left is lambda / (NA NA).

So, I'm quite comfortable that lambda/(NA NA) is an appropriate formula for most purposes.

That's not to say that it's the best formula for your purposes. There are numerous reasons why shooting more frames at finer steps can give better results, particular when shooting conditions are less than perfect.

In any case you are not be the first person to report that they like to use about 3 times smaller steps than suggested by lambda/(NA NA).

You are, however, the first person to report that they like to use pi times smaller, and that value seems oddly specific. As mentioned, I would be very interested to see where that particular formula comes from.

--Rik

Jens_ac
Posts: 18
Joined: Sat Aug 10, 2024 8:37 am
Location: Aachen, Germany

Re: getting close to a rhododendron leafhopper

Post by Jens_ac »

rjlittlefield wrote:
Tue Aug 27, 2024 3:16 pm
Jens_ac wrote:
Tue Aug 27, 2024 12:32 pm
Z_R=lambda/(pi NA NA)
I would be interested to see a reference that explains the origin of that formula.

The one that I use, lambda/(NA NA), is well known to give the total slab thickness within which the optical image has wavefront error of no more than 1/4 lambda. At maximum defocus, this results in a modest sag of the MTF curve, about 26% loss of contrast at the most sensitive frequency. It is one of the standard optical engineering criteria for "diffraction limited", and it's consistent with what the major manufacturers of microscope objectives use to spec their lenses. (Mitutoyo can be confusing because they specify the one-sided DOF, maximum acceptable deviation from perfect focus, which is only half as large.) If you go to https://www.microscopyu.com/microscopy-basics/depth-of-field-and-depth-of-focus , find the formula for d_tot, and set n=1 (air) and e=0 (perfect detector), what's left is lambda / (NA NA).
Hello Rik,
since I am from laser technology I use the Gaussian beam for the calculation, which is a paraxial solution of the Helmholz equation. I use this in laser microscopy since decades - it works well and fits reality, for example as real as a laser drilled hole in a diamond.

Radius of beam waist in focus is here wo=lambda/(pi NA) and Rayleigh length is zR=n w0 / NA with n= refraction index, here 1, thus zR=lambda /(pi NA NA).

A reference I just found (since books are out of fashion): https://www.edmundoptics.com/knowledge- ... opagation/

You may multiply that by 2 to get beam diameter=2 wo and depth of focus DOF=2 zR, but I do not like that: From my experience I can focus significantly better than zR to get a sharper image. At zR away from focus beam diameter is 1,4x larger and thus intensity is half - that is to much for me and at this point personal feeling comes in to play. In other words: I agree that wavefront error of 1/4 lambda is ok for a lens in case it includes all the aberrations, but to add another 1/4 lambda error solely by defocus I do not want without good reason. If I need the speed, I am fine with that compromise. Else I am sad during retouching when I see that I miss a lot between the frames I have and what I could have got spending a few seconds more with the bug.

I think the implication on the desired pixels size are more severe for me since that can not be adjusted to my feelings as easily. I get sharper images with the a tele as tube lens (200mm), thus pixels could be smaller but at the severe cost of travel range in z-direction. So I consider the use of a tele converter to get the macro lens safe into diffraction land, at the moment I am probably still a bit pixel size limited (17.3 mm sensor width, 5760 pixels, m=3.3-4.5 with the 7,5x on the OMS90).

Best regards, Jens

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

Re: getting close to a rhododendron leafhopper

Post by rjlittlefield »

Jens_ac wrote:
Wed Aug 28, 2024 1:07 am
since I am from laser technology I use the Gaussian beam for the calculation, which is a paraxial solution of the Helmholz equation. I use this in laser microscopy since decades - it works well and fits reality, for example as real as a laser drilled hole in a diamond.

Radius of beam waist in focus is here wo=lambda/(pi NA) and Rayleigh length is zR=n w0 / NA with n= refraction index, here 1, thus zR=lambda /(pi NA NA).

A reference I just found (since books are out of fashion): https://www.edmundoptics.com/knowledge- ... opagation/
Thank you for the reference.

To be clear, zR=lambda/(pi NA NA) gives a one-sided DOF = deviation from perfect focus. In my model the formula for that would be lambda/(2 NA NA).

So, the difference between the laser math and mine is really a matter of pi/2, not pi.

My primary reference is the seminal publication, "The frequency response of a defocused optical system", by H.H.Hopkins, published in Proceedings of the Royal Society A, 19 July 1955. For the convenience of myself and others, I host on my personal website a scanned PDF with some additional notes, https://janrik.net/Papers/Hopkins-TheFrequencyResponseOfADefocusedOpticalSystem-withNotes.pdf .

For extended discussion with experimental confirmation, I usually point to viewtopic.php?t=23751 and the files that it links to. The key point of all that stuff is that out to about 0.4 lambda wavefront error the MTF curve sags gradually, retaining its same cutoff point, but beyond 0.4 the curve sags catastrophically, and around 0.6 lambda the first frequency that cuts off with MTF=0 suddenly drops to about half the original cutoff frequency.

There's nothing particularly special about 1/4 lambda, except that it matches industry convention so it's more easily explained than if I used any other value. Other than that, for me 1/4 lambda is just an arbitrary point that is safely far back from the MTF cliff that starts at 0.4.

For smaller amounts of defocus, the amount of sag is roughly proportional to defocus squared, so 26% at 1/4 lambda becomes 6.5% at 1/8 lambda (half the calculator's value), and 2.9% at 1/12 lambda (a third the calculator's value). For my eyes, the difference between perfect focus and 1/4 lambda can be clearly seen if I specifically look for it, but the difference between perfect and 1/8 lambda is more a matter of imagination than observation.

So, if somebody says they need steps smaller than half the calculator's value, I go looking for reasons other than diffraction. Several such reasons have been identified, the most vexing one being a "squirms around laterally" effect that is caused by light preferentially entering the lens off-center, leading to subject features that appear to move laterally as focus changes. See viewtopic.php?p=149187#p149187 for an example. This "squirming around" effect can cause degradation at much smaller focus steps than diffraction softening does, particularly if sensor resolution is also in play so that the "moving" features also drift across pixel boundaries that change their rendering.

I hope this helps. Thanks for the discussion.

--Rik

Jens_ac
Posts: 18
Joined: Sat Aug 10, 2024 8:37 am
Location: Aachen, Germany

Re: getting close to a rhododendron leafhopper

Post by Jens_ac »

Thank you Rik,

I agree. My experience in laser scanning turns into only feeling when I do photography - knowing may result in seeing non relevant things. A practical reason for more images is indeed other than diffraction: Outside everything moves - the insect, wind shakes the leaf, my hand is at the camera and its internal parts move trying to compensate other movements sometimes in vain. Thus in retouching I am often happy to have some images to choose from - the last stack shown was from more than 600 frames and still I'd like to have some more at its eye.

Thank you for the very good ressources you linked - this gives me the trust to be on solid ground with everything I learned at this place.

Best regards,
Jens

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

Re: getting close to a rhododendron leafhopper

Post by rjlittlefield »

Good, I'm glad that was helpful.

Thinking more about the laser math, I realized that there's another interesting difference between the lasers and ordinary imaging. The lasers have (approximately) Gaussian profile, and if I understand correctly, that profile is maintained all along the beam path. The MTF of a Gaussian profile is itself a Gaussian curve, exp(-k f f), whose width is inversely proportional to the width of the profile. This means that as the laser is defocused, the MTF curve simply shrinks to the left, scaling in proportion to the beam width but not changing its shape. In contrast, ordinary imaging has a uniform profile (in paraxial approximation), and in that case Hopkins' analysis shows that slight defocus causes the MTF curve to change shape, sagging in the middle but not changing its cutoff frequency until after the cliff around 0.4-0.6 lambda wavefront error. At any given threshold, say MTF = 0.5 or MTF = 0.1, the sagging does reduce the frequency where the curve hits that threshold. But I speculate that the relative reduction in frequency is not as much with uniform profile as it is with Gaussian profile. If that's correct, then it would also help to explain why a laser might be more sensitive to focus than ordinary imaging is.

Or maybe there's something fatally flawed with this line of reasoning. I don't have much experience or equipment for dealing with lasers, so I have no way of testing experimentally.

--Rik

Jens_ac
Posts: 18
Joined: Sat Aug 10, 2024 8:37 am
Location: Aachen, Germany

Re: getting close to a rhododendron leafhopper

Post by Jens_ac »

rjlittlefield wrote:
Thu Aug 29, 2024 10:32 am
The lasers have (approximately) Gaussian profile, and if I understand correctly, that profile is maintained all along the beam path. The MTF of a Gaussian profile is itself a Gaussian curve, exp(-k f f), whose width is inversely proportional to the width of the profile. This means that as the laser is defocused, the MTF curve simply shrinks to the left, scaling in proportion to the beam width but not changing its shape. In contrast, ordinary imaging has a uniform profile (in paraxial approximation), and in that case Hopkins' analysis shows that slight defocus causes the MTF curve to change shape, sagging in the middle but not changing its cutoff frequency until after the cliff around 0.4-0.6 lambda wavefront error. At any given threshold, say MTF = 0.5 or MTF = 0.1, the sagging does reduce the frequency where the curve hits that threshold. But I speculate that the relative reduction in frequency is not as much with uniform profile as it is with Gaussian profile. If that's correct, then it would also help to explain why a laser might be more sensitive to focus than ordinary imaging is.
Yes, that is correct.
Let me continue a bit from my side: A good laser beam (typ. M^2 < 1.2, 1 is optimum) has Gaussian profile and its transformation is also Gaussian and thus math is very simple in my life. The photons in the beam are all diffraction limited and identical (undistinguishable, thus all the photons look exactly like the laser beam), thus any additional aberration is very easy to see - not only defocus but also diffraction at the aperture of any lens. Such diffraction at the aperture must be avoided - that is the difference in laser tech (or laser scanning microscopy): We make the lens big enough that it cuts the Gaussian at 1/e^2. Because when we fill the lens maximal ("top hat" profile in the aperture), diffraction at the aperture reduces peak intensity in the image by about 30%. This latter situation we can also find in photography: An evenly illuminated small point-like feature on the object, like a pollen the size of beam radius wo, produces a circular wave also overfilling the aperture with similar property as a laser beam only 30% tainted by the aperture. If you carefully focus scan this pollen, you see about the same like I see with the laser - aberration by defocus and also astigmatism/coma/all other are clearly visible and distinguishable in that "pollen bokeh", which we call caustic.

Once you got used to that perfect laser caustics look, you probably want 2-3x more images and you may get allergic to astigmatism and coma (but more tolerant to diffraction seen by small pixels size, because that looks more like at home: I put many pixels inside the laser spot to investigate it in detail).

Jens_ac
Posts: 18
Joined: Sat Aug 10, 2024 8:37 am
Location: Aachen, Germany

Re: getting close to a rhododendron leafhopper

Post by Jens_ac »

After all that theory I want to show the next image of that colorful animal. I worked a bit on the lighting and thus could reduce exposure time further (1/2000s), which helped also reducing number of images needed in the stack - thus now without my weird pi-factor (354 images only). Exifcopy turned the image, thus it is without that data. Colors probably are like this after LED turned the background black (LED is 5500K and CRI97 - but what is truth?) - I want to check in the next days again.
P1035004_RZikade57_00107892_354B_ret1_SPS_WS1024.jpg
Mitutoyo 7,5x/0.21 on OMS90

Jens_ac
Posts: 18
Joined: Sat Aug 10, 2024 8:37 am
Location: Aachen, Germany

Re: getting close to a rhododendron leafhopper

Post by Jens_ac »

Here is the same image like above but cropped in. These are artfull animals.
P1035004_RZikade57_00107892_354B_ret1_SPS_WS1024.jpg

Bob-O-Rama
Posts: 207
Joined: Sat Dec 06, 2014 6:46 am
Location: Allentown, PA, USA, Earth, etc.
Contact:

Re: getting close to a rhododendron leafhopper

Post by Bob-O-Rama »

What a great set! They are great subjects in general, and this really take it to the next level.

FotoChris
Posts: 746
Joined: Mon Apr 03, 2023 11:17 am

Re: getting close to a rhododendron leafhopper

Post by FotoChris »

=D> excellent results!!! How did you manage to keep it so still at that magnification? When I'm outside it's difficult enough to get successful stacks at 2x.

Would you mind sharing your complete formula? I think I use the same that Rik does for my calculations but with a (rather generous) 35-40% overlap.

I should pay more attention to leafhoppers, they really are beautiful creatures!

Jens_ac
Posts: 18
Joined: Sat Aug 10, 2024 8:37 am
Location: Aachen, Germany

Re: getting close to a rhododendron leafhopper

Post by Jens_ac »

FotoChris wrote:
Thu Sep 05, 2024 8:07 am
=D> excellent results!!! How did you manage to keep it so still at that magnification? When I'm outside it's difficult enough to get successful stacks at 2x.

Would you mind sharing your complete formula? I think I use the same that Rik does for my calculations but with a (rather generous) 35-40% overlap.

I should pay more attention to leafhoppers, they really are beautiful creatures!
Thank you Chris. I use a tripod with a small xy-stage for alignment and here I used a Wimberley Plamp against the wind and I stack fast using video with 30-120 fps.

Which formular do you want me to share? I gave my "2/pi-factor laser-formular" above. Practically I use the Zerene DOF-calculator with a factor of up to 2-3x more images, especially in case there is motion by wind so that I have some backup and may drop many images, since the stacking software just ignores all the unsharp images with motion blur.

Post Reply Previous topicNext topic