## Rear-standard focusing with infinity objectives?

**Moderators:** Pau, rjlittlefield, ChrisR, Chris S.

### Rear-standard focusing with infinity objectives?

Rik has often written about the advantages of keeping the lens fixed when focus-stacking, yet most people here (I think this includes Rik) seem to move the whole camera plus microscope objective. Yet it would be fairly easy (especially when the tube lens is a Raynox on bellows or extension tubes) to keep the objective fixed and use a Stackshot to move just the camera.

I suppose there might be a cost to that in terms of image quality, since the tube length would vary slightly from the length needed for infinity focus. But if I recall correctly, most tests show the image quality is relatively insensitive to tube lenses that are not exactly focused at infinity.

Does anyone have experience just moving the camera, not the lens, when stacking using infinity-corrected microscope objectives?

I suppose there might be a cost to that in terms of image quality, since the tube length would vary slightly from the length needed for infinity focus. But if I recall correctly, most tests show the image quality is relatively insensitive to tube lenses that are not exactly focused at infinity.

Does anyone have experience just moving the camera, not the lens, when stacking using infinity-corrected microscope objectives?

Notit would be fairly easy (especially when the tube lens is a Raynox on bellows or extension tubes) to keep the objective fixed and use a Stackshot to move just the camera.

*all that*easy compared with moving the lot, and to what advantage? Many objectives ( eg Mitutoyo, compared with Nikon) are close to telecentric anyhow. There would be more advantage with typical camera lenses.

Our friend "Ploum" is ploughing his own furrow on this. (The French don't even have a verb "to plough", let alone spell it wrongly, such as "plow". They uses "labourer" - you know, as in someone who labo

**u**rs )

As Rik has often written, the advantage is a stationary entrance pupil so no changes in perspective occur during stacking. Maybe the Mitu is "close to telecentric" but it is not telecentric. And many other lenses are not even close to telecentric. Why not generally do it right?....and to what advantage?

Ploum's set-up is far more complex than just a rear-standard focusing set-up. He has other things going on (which work very well for him!).

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

I am not aware of head-to-head comparisons between the two methods for microscope objectives.

That comparison would be an interesting thing to see, but I'm short of time to do it myself.

As general discussion and theory...

Focusing by rear extension gives no change in perspective, but gives large changes in exposure and magnification, and introduces some amount of aberration. Focusing by camera movement gives no change in exposure or aberration, but changes perspective to some extent depending on entrance pupil position.

At low magnification these tradeoffs favor focusing by rear extension. At high magnification, moving the camera becomes more attractive.

The key parameter is a ratio between the focus depth and the distance between subject and entrance pupil, when the lens moves. At high magnification, that ratio becomes more favorable even if the lens is not telecentric. For example, a 50 mm lens extended to 1:1 at nominal f/5.6, with 0.28 mm DOF and 100 mm distance, has a ratio of only 1:350. But an infinite 10X NA 0.28 objective, even with no telecentricity, with 0.008 mm DOF and 20 mm distance, would have a ratio of 1:2500 so about 7 times less perspective change per slice.

Any degree of telecentricity moves the entrance pupil farther away and gives a more favorable ratio. It's been a while since I last measured it, but I vaguely recall a number for the Mitutoyo 10X of something like 1:10,000, scale change per DOF.

This extreme ratio is what permits you to turn off scale correction and pretend that an objective is telecentric, even when it really isn't.

There's another aspect of scale change that will come into play with deep stacks. Consider again that 10X objective, and perturb the rear extension so as to step focus over a 1 mm range, say varying front distance between 20 mm and 21 mm so as to capture the whole 10X field at all focus positions. Again assuming thin lens, and assuming I haven't botched the calculations, that will vary the magnification from 10 to 6.45, a ratio of 1:1.55. Given current sensors, it seems challenging to capture the whole high quality field at 10X in foreground, without losing image quality by undersampling at 6.45X in background.

--Rik

That comparison would be an interesting thing to see, but I'm short of time to do it myself.

As general discussion and theory...

Focusing by rear extension gives no change in perspective, but gives large changes in exposure and magnification, and introduces some amount of aberration. Focusing by camera movement gives no change in exposure or aberration, but changes perspective to some extent depending on entrance pupil position.

At low magnification these tradeoffs favor focusing by rear extension. At high magnification, moving the camera becomes more attractive.

The key parameter is a ratio between the focus depth and the distance between subject and entrance pupil, when the lens moves. At high magnification, that ratio becomes more favorable even if the lens is not telecentric. For example, a 50 mm lens extended to 1:1 at nominal f/5.6, with 0.28 mm DOF and 100 mm distance, has a ratio of only 1:350. But an infinite 10X NA 0.28 objective, even with no telecentricity, with 0.008 mm DOF and 20 mm distance, would have a ratio of 1:2500 so about 7 times less perspective change per slice.

Any degree of telecentricity moves the entrance pupil farther away and gives a more favorable ratio. It's been a while since I last measured it, but I vaguely recall a number for the Mitutoyo 10X of something like 1:10,000, scale change per DOF.

This extreme ratio is what permits you to turn off scale correction and pretend that an objective is telecentric, even when it really isn't.

There's another aspect of scale change that will come into play with deep stacks. Consider again that 10X objective, and perturb the rear extension so as to step focus over a 1 mm range, say varying front distance between 20 mm and 21 mm so as to capture the whole 10X field at all focus positions. Again assuming thin lens, and assuming I haven't botched the calculations, that will vary the magnification from 10 to 6.45, a ratio of 1:1.55. Given current sensors, it seems challenging to capture the whole high quality field at 10X in foreground, without losing image quality by undersampling at 6.45X in background.

--Rik

Choose to prioritise telecentricity or not, depending whether it makes a difference and/or gives other problems .As Rik has often written, the advantage is a stationary entrance pupil so no changes in perspective occur during stacking. Maybe the Mitu is "close to telecentric" but it is not telecentric. And many other lenses are not even close to telecentric. Why not generally do it right?

Nikon CFI 10x is way off telecentric. Generally it's not relevant.

For the Mitu, the working distance is 35mm (but this doesn't matter). So let's say we make a 1mm thick stack by moving the camera back. The change in magnification between the first and last frames due to extension is 1mm/20mm (20mm is the approx focal length of the Mitu). So across the whole stack, the magnification would change 10x to 10.05x. Right?

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

I'm not sure how you're thinking about this, so let me go through my analysis in more detail.Lou Jost wrote:Rik, thanks for your quantitative analysis. But the figure you give for the change in magnification as you move from 20 to 21 mm seems much too large. Are you sure about it?

The objective plus its 200 mm tube lens is effective focal length 1/(1/20+1/200) = 18.18 mm. To move the focus point of that lens from 20 mm in front to 21 mm in front requires making the rear extension be 1/(1/18.18-1/21) = 135.4 mm. With 21 mm in front and 135.4 mm behind, the new magnification is only 135.4/21 = 6.45X.Consider again that 10X objective, and perturb the rear extension so as to step focus over a 1 mm range, say varying front distance between 20 mm and 21 mm so as to capture the whole 10X field at all focus positions. Again assuming thin lens, and assuming I haven't botched the calculations, that will vary the magnification from 10 to 6.45, a ratio of 1:1.55.

If "moving the camera back" means changing the rear extension, then the analysis above applies, and magnification changes from 10X to 6.45X.Lou Jost wrote: So let's say we make a 1mm thick stack by moving the camera back. The change in magnification between the first and last frames due to extension is 1mm/20mm (20mm is the approx focal length of the Mitu). So across the whole stack, the magnification would change 10x to 10.05x. Right?

If "moving the camera back" means altering the subject-to-lens distance, leaving the extension fixed, then the in-focus plane is captured at a constant magnification.

Assuming an aperture at 20 mm, perspective will give a scale range of 20:21, about 5% from front to back

*of the entire stack*.

But most of that change is in areas of the image that are hopelessly OOF in any one frame, so you can't really tell what the change is.

The key then is what difference in scale any particular feature experiences during the time that feature is significantly in focus. If we assume that's just one DOF, then we're looking at roughly 20:20.008, which is that 1 part in 2500 that I spoke of.

Does this help?

--Rik

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

OK, so now that we're in agreement about a simple case, let me complicate matters in a way that makes rear focusing more attractive.

The simple calculation I did above assumed both thin lens and no separation between objective and tube lens. If you allow separation, then you can significantly reduce the change in magnification when focusing by rear extension. But again it's a matter of tradeoffs, because the separation introduces other issues such as vignetting.

Quick simulation in WinLens3D for 20 mm FL objective, 200 mm FL rear lens, with 100 mm separation, shows minimum magnification of 7.7X for front focus of 21 mm. Increase that to 150 mm separation, magnification 8.5X; 200 mm separation, 9.5X; 220 mm separation (sum of focal lengths), 10X constant regardless of focus shift.

If you want to experiment with focusing by rear extension, I'd recommend using the largest separation that still gives you good coverage.

--Rik

The simple calculation I did above assumed both thin lens and no separation between objective and tube lens. If you allow separation, then you can significantly reduce the change in magnification when focusing by rear extension. But again it's a matter of tradeoffs, because the separation introduces other issues such as vignetting.

Quick simulation in WinLens3D for 20 mm FL objective, 200 mm FL rear lens, with 100 mm separation, shows minimum magnification of 7.7X for front focus of 21 mm. Increase that to 150 mm separation, magnification 8.5X; 200 mm separation, 9.5X; 220 mm separation (sum of focal lengths), 10X constant regardless of focus shift.

*Note: if you do these calculations yourself, be aware that the last case introduces a singularity that causes WinLens3D to mess up the calculation and give some nonsense numbers. 220.01 and 219.99 both give proper results.*If you want to experiment with focusing by rear extension, I'd recommend using the largest separation that still gives you good coverage.

--Rik

With such a big separation between objective and tube lens, where should the iris go?

Is this setup then telecentric?

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

That's correct. The configuration where the separation between principal planes is equal to the sum of focal lengths always hurts my head. If you point that combination at the heavens, then it acts like a telescope. If you shine a collimated beam in one end, then out the other end comes a collimated beam with a different diameter. And if you use it with finite conjugates, it has constant magnification. (Did I mention that my head hurts?)Lou Jost wrote:Rik, so the 10x at objective/tube lens separation = the sum of the focal lengths is going to be constant regardless of distance from front of lens to subject? In other words, it does not depend on your choice of 21mm?

I would stick it as close as possible to the objective, since that should give the least problem with vignetting.With such a big separation between objective and tube lens, where should the iris go?

Not necessarily. If you place the iris at the rear focal point of the objective, then the entrance pupil moves to infinity and the combo goes telecentric. If you place the iris at the front of the objective, then that's where the entrance pupil is, and you get the perspective implied by that distance.Is this setup then telecentric?

Now here's where things get even harder to keep straight, at least in my head.

In that second case, with the iris in front of the lens, perspective implies that farther is smaller. So in order to make features like up

*perfectly*from frame to frame, the stacking software will have to make sure that images focused farther back will have the properly smaller scale.

But depending on separation between the lenses, the images probably weren't captured at the correct scale, so some computational resizing will still be required.

Nonetheless, there is still no change in

*perspective*throughout the stack, so at least in principle that resizing really will make things line up perfectly. In contrast, if focus had been changed by moving the whole unit, there would be that slight change in perspective that touched off this whole discussion.

Writing this, I've just now had a new and rather quirky idea. Adjust focus by changing lens-to-subject distance, leaving rear extension fixed. But instead of letting the entrance pupil move with the lens, fix it in one place by positioning a non-moving iris just in front of the lens when the lens is at its farthest forward. Then as you move the lens backward to adjust focus, you'll be slightly changing the effective NA but not the perspective. Seems like this approach might solve everybody's wishes.

More aspirin...

--Rik

In your last paragraph, I am a bit confused because we were earlier talking about a lens + objective combination. So when you say to focus by varying lens-to-subject distance with rear standard a fixed distance from the lens, isn't that just the normal moving of the whole camera+lens? Are you suggesting to keep the iris and objective stationary and move the camera + tube lens? I like that idea, because it keeps the entrance pupil stationary, but it also eliminates aberrations due to non-infinity tube lens focus, and eliminates extension-caused magnification variations.....

Edit: But now the separation of the objective and tube lens would not always equal the sum of the focal lengths...

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

Yes. What's different is the addition of an external iris to establish an entrance pupil that is fixed with respect to the subject.Lou Jost wrote:So when you say to focus by varying lens-to-subject distance with rear standard a fixed distance from the lens, isn't that just the normal moving of the whole camera+lens?

No. In fact if the tube lens is focused at infinity as it ideally should be, then moving the camera + tube lens won't have any significant effect unless it gets so extreme as to introduce vignetting.Are you suggesting to keep the iris and objective stationary and move the camera + tube lens?

--Rik

Previously you said the iris should be between the tube lens and objective, at (for the Mitu) 20mm behind the objective (leaving aside "thick lens" considerations). In your new approach, are you suggesting abandoning that and using an iris in front of the objective? And keeping that stationary while the camara+tube lens+ objective move together as a unit?

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

Yes.Previously you said the iris should be between the tube lens and objective, at (for the Mitu) 20mm behind the objective (leaving aside "thick lens" considerations). In your new approach, are you suggesting abandoning that and using an iris in front of the objective? And keeping that stationary while the camara+tube lens+ objective move together as a unit?

I do twitch at that word "abandoning". To the best of my knowledge, the idea of using a fixed external limiting aperture for this purpose is completely new and untested. Its practical advantages -- if any -- remain to be shown, and so this idea is completely speculative at this moment. But yes, in the sense that the proposal moves the limiting aperture from behind the objective to in front of it, the aperture behind the objective is abandoned.

I have just enough experience with external limiting apertures to be pretty sure that the idea will work as discussed, establishing a fixed perspective that is independent of how focus is controlled behind it. See for example the discussion in Theory of the “No-Parallax” Point in Panorama Photography. Especially relevant is Figure 3, which demonstrates that the perspective of an image, including its angle of view, can be established by an external aperture and altered by moving that aperture, with no change at all to the optics, camera, or subject position.

As for focusing, you could move the camera+tube_lens+objective as a unit, or change rear extension, or turn the focus ring on a focusable tube lens. Each of those methods will change magnification and exposure in a different way, but in every case the resulting set of frames could be registered perfectly with each other by just rescaling to match the perspective implied by the limiting aperture. Focusing by moving the camera+tube_lens+objective as a unit is attractive because that's a well understood method that avoids adding aberrations or changing the optical magnification.

--Rik