Ruminations about confusing stacks

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

Moderators: rjlittlefield, ChrisR, Chris S., Pau

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

Ruminations about confusing stacks

Post by rjlittlefield »

I'd like to talk about some odd effects I've been playing with lately. Be warned, this thread is mostly about problems, not yet answers.

As background, remember that I recently posted a Tiny brown bug stuck to a small black beetle..

Here is a small chunk of that image, blown up much bigger than shown before -- 70% of actual pixels:

Image

Now that's a clean image, one that I'm happy with.

But it's also the third stack that I shot of that specimen. My first attempt, using PMax, produced a ghastly "hairball". Not even using DMap would clean things up. Here's what I mean:

Image Image

Here's the PMax as full frame so you can see the whole context.

Image

You can probably imagine that this piqued my curiosity. Was that one part of the leg really so different from the rest?

I sat for a while contemplating what was the best way to proceed. The first stack had been shot at 10 micron focus steps using a Mitutoyo 10X NA 0.28 objective and what I had intended to be completely diffuse lighting. Here was the setup. The subject is part of that black blob almost centered under the cup.

Image

Using Zerene to play through the frames like a filmstrip, I saw some weird changes in appearance as focus shifted. So I decided that the first thing to do was to re-shoot the critical part of the stack using much finer focus step, 2 microns. I did that, and we'll see some of that stack #2 in a moment.

Then I speculated that the problem was somehow related to illumination, perhaps a reflection off some shiny part of my setup that could be seen directly by the subject, not going through the diffuser.

The simplest way to resolve that was to just drop a Kleenex tissue over the lens and the hole in the foam cup.

Image

A few test images suggested that might have solved the problem, so I shot stack #3 again doing the full depth at 10 microns. That's the one that I showed you as a "final".

OK, so the "hairball" apparently was caused by a bit of undiffused illumination. But what about those "weird changes in appearance" that I mentioned?

Well, let's take a closer look at that. Here is a bit of the short stack, presented as PMax, DMap, then a short animation of individual frames 6 microns apart, sweeping focus back and forth across the area of interest, and finally a chunk of the final well diffused result for comparison

Image Image Image Image

OK, so now again it's abundantly clear that there's something very weird about how the appearance of the bug changes a lot with small changes in focus, again when the illumination is not sufficiently diffused. In contrast, the well diffused image looks great. So surely all is now well under control, right?

Hah -- we should be so lucky!

Here's an animation of that same area, at a little wider scale, this time with well diffused illumination and a 10 micron focus step.

Image

That's right, folks, it tips! Or at least, it appears to tip. Or maybe you perceive it more as a warping.

In any case, what seems to be happening is that as focus shifts, OOF stuff on the right of the image moves left at the same time that OOF stuff on the left of the image is moving right.

This is entirely a local effect. While this one small area is exhibiting large shifts, similar areas far away in the image are exhibiting only the same sorts of shifts depending on their own local geometry. There are no large "rigid body" shifts like you'd see if the specimen were actually moving or the center of perspective were changing significantly.

Quite frankly, I do not understand what's going on here. The illustration above is with a Mitutoyo lens, but a Nikon CFI60 10X NA 0.25 does something similar though apparently less intense:

Image

I've seen similar effects with other lenses, on other subjects, and realtime under a scope. But to see it and to understand it are two very different things.

If anybody can help me understand what's going on here, I would be very grateful.

--Rik

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

Post by ChrisR »

Well that's interesting. I'm sure I've seen similar things, most recently with a 75mm at f/4 at 2x, with criss-cross bristles which appeared at minute inspection ( a dozen pixels) to move around as I focused.. I was half-convinced something was moving in the subject or stage, or the aligner was all that was doing it. Wound up stacking at 20 and 10 micron steps, better but still not happy.
I "gave up" and used f/8 and it seemed to get better, though less resolution of course. Something like your final image - less detail than individual frames in the previous animated (3rd across out of the four). Needing to run any stack overnight affects freedom to experiment!

I seriously doubt I can suggest anything you won't have thought of, such as
"suppose the troublesome area is in a different part of the field of view", or
"what if you close a supplementary diaphragm" (though that's altering the optic geometry not just the DOF, I think)
"would a telecentric lens arrangement still see it" I expect so - perhaps worth trying a CF20x ELWD?

This is more heat than light, sorry!

(As an aside, my pc's too slow for movie-like viewing of preview images in ZS, but looking at the folder in Adobe Bridge is quick)

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

Post by rjlittlefield »

ChrisR wrote:I'm sure I've seen similar things, most recently with a 75mm at f/4 at 2x, with criss-cross bristles which appeared at minute inspection ( a dozen pixels) to move around as I focused.
I've seen that too. Most of those I've rationalized to myself as an aperture-shifting effect due to occlusion. If the front/back objects are aligned so that the edge of the front object's OOF blur sweeps across the back object as focus changes, then I'd expect the apparent position of the back object to change because the aperture that sees it effectively moves sideways.

But in the case of this beetle, I can't invoke occlusion because the surface seems way too smooth for anything to get in front of anything else. Maybe there could be tiny occlusions at the edges of grooves and such, but nothing nearly as large as what I'm seeing here. Now of course I'm wondering if I understood the other cases correctly either.

--Rik

Edit: spelling error "inclusion" --> occlusion
Last edited by rjlittlefield on Fri Apr 20, 2012 12:46 am, edited 1 time in total.

PanoGuy
Posts: 27
Joined: Mon Mar 15, 2010 2:44 pm

Post by PanoGuy »

Could the effect be due to a change in magnification at different focus points? It looks like you have inverted perspective in the animated mitutoyo image, so the far section starts out large then decreases in size as the focal point moves toward the rear of the subject. This would also likely have the opposite effect on near oof areas, which seems to be the case.

I assume the mitutoyo has a shorter working distance than the nikon because it's an apo? I think this shorter distance might increase the change in magnification in oof areas, making it worse for the mitutoyo.

You that the in focus areas behave as expected, which supports this also.

DQE
Posts: 1653
Joined: Tue Jul 08, 2008 1:33 pm
Location: near Portland, Maine, USA

Post by DQE »

Just an ad hoc, probably useless thought:

Is it possible that the subject is heating up due to lighting or something else, locally and/or generically?

---------------------------
My only other thought is that the subject must have reanimated itself and was breathing, preparing to get even for all the stresses of being photographed!
-Phil

"Diffraction never sleeps"

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

Post by rjlittlefield »

Could the effect be due to a change in magnification at different focus points?
The Mitutoyo is almost perfectly telecentric. The Nikon does have measurable perspective, but the change in scale factor is still quite small within the shallow DOF of this 10X objective.

I let Zerene compute this as part of the alignment process. In this stack the estimated change in scale factor for the Nikon is only about 0.06% per 10 micron focus step. Here are the results:

Image

More careful measurements on a planar target suggest that a more accurate number for the Nikon is more like 0.03-0.04% per 10 micron focus step. But either way, it's only a pixel or two in the entire frame width -- proportionally far less than we're seeing in the small crops of the beetle.
It looks like you have inverted perspective in the animated mitutoyo image, so the far section starts out large then decreases in size as the focal point moves toward the rear of the subject.
I don't see the same thing. Perspective would cause the image to change in size equally in all directions, where in the animation it looks to me like there's lots of lateral movement and little or no vertical.
I assume the mitutoyo has a shorter working distance than the nikon because it's an apo? I think this shorter distance might increase the change in magnification in oof areas, making it worse for the mitutoyo.
The Mitutoyo is an LWD with 33.5 mm working distance. The Nikon CFI60 is a normal Plan Achromat, 10.5 mm WD.
Is it possible that the subject is heating up due to lighting or something else, locally and/or generically?
No, it's definitely an optical effect. I just now stuck the beetle under a microscope with yet a third objective -- this one a finite Nikon CF Plan Achromat -- and watched by eye as I flew the focus knob up and down. Surfaces that are almost parallel to the focus plane just go in and out of focus like you'd expect. But surfaces that are more steeply inclined show this sort of tipping effect as I fly the focus knob up and down. It's really obvious now that I'm paying attention to it.

--Rik

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

Post by ChrisR »

A single -cut file would be a good test specimen, Slightly rusty for texture perhaps. FLat, "Smooth" or "2nd cut", I doubt we'd need a "Bastard"!

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

Post by rjlittlefield »

I think I'm getting a handle on the odd warpings. After some more experimentation, I now think it's essentially an aperture-shifting effect due to interaction between the slanted surface, somewhat directional illumination, and the physical aperture. More experiments required, but I do know that the effect is stronger with more directional illumination, weaker with diffused, and is greatly diminished by stopping down. In addition, OOF features can be made to move around simply by changing the location of the light source. It's a counterintutive effect -- I should make a little movie or animation to show how it works when I finally figure it all out.

--Rik

Pau
Site Admin
Posts: 6051
Joined: Wed Jan 20, 2010 8:57 am
Location: Valencia, Spain

Post by Pau »

rjlittlefield wrote:I think I'm getting a handle on the odd warpings. After some more experimentation, I now think it's essentially an aperture-shifting effect due to interaction between the slanted surface, somewhat directional illumination, and the physical aperture. More experiments required, but I do know that the effect is stronger with more directional illumination, weaker with diffused, and is greatly diminished by stopping down. In addition, OOF features can be made to move around simply by changing the location of the light source. It's a counterintutive effect -- I should make a little movie or animation to show how it works when I finally figure it all out.
--Rik
I recall seeing some similar or related effect while playing with transmitted oblique illumination and darkfield in the microscope: lateral shift of the image as focus changes, but I'm not enough skilled nor patient to investigate it.
Pau

seta666
Posts: 1071
Joined: Fri Mar 19, 2010 8:50 am
Location: Castellon, Spain

Post by seta666 »

It reminds me of the problem with inner reflections in ommatidia we discussed in the past ( I think the problem is the same in fact) and I guess solution would be retouching from individual images or small group stacks.
http://www.flickr.com/photos/seta666/59 ... 4257737097
Regards

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

Post by ChrisR »

OOF features can be made to move around simply by changing the location of the light source.
That reminds me of looking with a 100x objective at something using an LED-bank video light , so quite directional, as there was only 1mm WD.
The flare moves round apparently in mid air which is one strange looking thing, but the subject "sort of" does too!

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

Post by rjlittlefield »

seta666 wrote:It reminds me of the problem with inner reflections in ommatidia we discussed in the past ( I think the problem is the same in fact) and I guess solution would be retouching from individual images or small group stacks.
The problems are different but they can occur with the same subject as shown in your video.

With "inner reflections" the essential problem is that the reflection of the surroundings and texture on the surface of the eye focus in different planes at the same pixel position so the software has trouble choosing the one we want. That problem has nothing to do with things appearing to move around as focus is changed.

However, your video does also show the effect discussed here, where out-of-focus blobs appear to move across the surface as focus is changed. In your video the effect is most apparent at upper right corner, where ommatidia almost appear to "swim into the frame" as focus moves backward near the end.
ChrisR wrote:That reminds me of looking with a 100x objective at something using an LED-bank video light , so quite directional, as there was only 1mm WD.
The flare moves round apparently in mid air which is one strange looking thing, but the subject "sort of" does too!
Yes, this sounds like the same effect. Features of the subject that are exactly in focus will stay in the same place, but out-of-focus features will move around with the light.

--Rik

seta666
Posts: 1071
Joined: Fri Mar 19, 2010 8:50 am
Location: Castellon, Spain

Post by seta666 »

I see.. Also, when stacking do you move the subject or the camera?
Moving the subject while the light source remains still could be the cause? If I remember well when I did that wasp eye my set up worked that way
Regards
Javier

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

Post by rjlittlefield »

seta666 wrote:Also, when stacking do you move the subject or the camera?
It doesn't seem to matter. The stacks shown above were shot with fixed light and subject, moving the objective & camera. I see the same effects in a microscope that focuses by moving the subject. I haven't done the experiment yet, but I expect to see them also with a setup that does not move any of those things and instead shifts focus using the AF motor of an internal focusing telephoto used as tube lens.

At this point I believe the effect is due to the angles that light reflects off the subject and enters the objective. If that light fills the objective symmetrically, then there should be no lateral shift of features as they go in and out of focus. But if that light fills the objective asymmetrically, then shifting focus will cause a lateral shift in OOF features. An especially confusing aspect is that nearby features can reflect the light with different asymmetries depending on their slopes, and when that happens those features will shift in different directions. That plus some other interference effects from the narrow-angle illumination may be what's responsible for those elaborate shape-changing features shown in the first animation, using partly undiffused illumination. Working out the details of these processes is likely to take a while.

--Rik

DQE
Posts: 1653
Joined: Tue Jul 08, 2008 1:33 pm
Location: near Portland, Maine, USA

Post by DQE »

If one had literally perfectly diffused light, would these problems still occur with some subjects (such as the one Rik has been photographically torturing - grins)?

In other words, do these initial results suggest that one may have to custom-tune the lighting to match the reflection properties of the subject and background, in order to minimize the effects?

Perhaps it's not sufficient to only perfectly diffuse the incident light, but instead one should perfectly diffuse the combination of the scene and the light source(s)? Or, would even that effort be enough to prevent these artifacts/effects?

Sounds like an interesting mathematical and experimental challenge to create a perfectly diffused *combination* of the scene and the incident lighting. Perhaps we would call such a set up a "hyper-ring-light" or something?!?!

------------------------

Perhaps fiddling with cross-polarization would help, although it would also create various problems and challenges of its own.

Just some rambling ad-hoc thoughts, while we wait for more data and a better understanding...
-Phil

"Diffraction never sleeps"

Post Reply Previous topicNext topic