Desktop automated focus stacking setup

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: 23598
Joined: Tue Aug 01, 2006 8:34 am
Location: Richland, Washington State, USA
Contact:

Post by rjlittlefield »

elf wrote:
ChrisR wrote: By the way, where IS the entrance pupil on that 10x/0.25 objective?
I think it's at infinity, but I don't know if it's behind the camera or in front of it :)
I would be a little surprised if a 10X/0.25 entrance pupil is actually at infinity.

But the DOF is so shallow that you can get good results by pretending it is.

Just turn off scale adjustments in the stacking software. The assembled stack will have the geometry of orthographic projection, exactly as if the entrance pupil really were at infinity. In theory, this introduces a little smearing whenever the entrance pupil is not at infinity, but in practice the scale change for in-focus detail is so small that you can't see whatever theoretical smearing there might be.

As an aside, I recommend turning off scale adjustment whenever you're working at high magnification, such as through a 10X objective. This is because it's safer. For many subjects at high mag, the scale adjustment computation is likely to be misled by the appearance of OOF parts of the image, with the result that it makes erroneous "corrections" leading to bulging eyes and similar artifacts.

--Rik

elf
Posts: 1416
Joined: Sun Nov 18, 2007 12:10 pm

Post by elf »

Tesselator wrote: Thanks for the explanation. Yeah, I was referring to the milled levers and such. I thought those looked form cast and then worked. That you can get stock that think in news to me. I guessed the extensions though. :) I've cast some aluminum in the past and thought maybe you were doing the same.
The thickest flat plat is 1/2" (12.5mm). The photos may make them look larger.

Tesselator
Posts: 388
Joined: Sat Mar 27, 2010 11:40 pm
Location: Japan
Contact:

Post by Tesselator »

elf wrote: The thickest flat plat is 1/2" (12.5mm). The photos may make them look larger.
That would explain it. Thanks!

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

Post by ChrisR »

"worldofcnc" is about the only supplier I've found in the UK, and their range is pretty meagre compared to several in the US.
I have already tried several google searches.
I'm pretty sure Aalco is one of the other meage-ranged suppliers I emailed. Out of half a dozen, only two bothered to reply, negatively.
I'm looking for something like
this sole example

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

Post by ChrisR »

I would be a little surprised if a 10X/0.25 entrance pupil is actually at infinity.
:?: How to find it :?

There must be standard ways. I don't remember seeing other than Rik's pins - a bit big.
Would this work: a 1mm hole drilled into (Cyan) perspex, with razor-saw slits at 1mm increments along the hole, from the sides.
Focus with the rear standard (=sensor)
Take the pic, stack with scaling off, do the trig, average the errors,...
?
Image

Planapo
Posts: 1581
Joined: Tue Nov 07, 2006 2:33 am
Location: Germany, in the United States of Europe

Post by Planapo »

Chris wrote:
I'm looking for something like
this sole example
Eh bien Chris, sen why nod shust 'ave sis Profilé sent over agross se shannel to se UK from la France? :) :wink:

--Betty :D

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

Post by ChrisR »

Of course I shall, what a splendid idea. I forgot how close it is. #-o

Aber Betty, wir wurden erhoben, die Franzosischen zu hassen, seit Hunderten vor Jahren. Wollen Sie mich, ihnen Geld zu geben? Es ist gegen unsere Bildung. Maggie Thatcher wurde nicht genemigen! (Ausserdem, wurde es offensichtlich von Knoblauch und Zwiebeln riechen.)Erzahlen Sie nicht die anderen! Entschuldigungen, fur meine Tastatur...

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

Post by rjlittlefield »

ChrisR wrote:There must be standard ways. [to find the entrance pupil]
Sure. Set up another lens system to look into the front of the objective and focus on the edge of the limiting aperture. Wherever the focus point of the other lens system is, that's where the entrance pupil of the objective is.

I just ran through this exercise with three of my objectives, using two "other lens systems": 1) my naked eyeball augmented by a 10X loupe, and 2) a compact digital point-and-shoot. One objective at 10X NA 0.25 does have its entrance pupil essentially at infinity (so I am a little surprised, as promised). My Nikon CF N Plan Achro 10X NA 0.30 has its entrance pupil 5 cm or so in front of the objective (on the back side of the in-focus subject); and my CF ELWD 20X NA 0.40 has its entrance pupil a couple of cm in front of the objective, again on the back side of the subject.

But with all three of these objectives, at least in a quick test, the scale change within the in-focus slab was too small to worry about (no visible smearing) and also too small for Zerene Stacker to measure accurately. Turning off scale correction would be safe and effective.

I guess I can imagine cases where it would be important to know the pupil location, but I don't anticipate doing any work nearly that precise.
Would this work: a 1mm hole drilled into (Cyan) perspex, with razor-saw slits at 1mm increments along the hole, from the sides.
Focus with the rear standard (=sensor)
Take the pic, stack with scaling off, do the trig, average the errors,...
?
This won't work as well as it might appear.

As background, remember that what the entrance pupil position controls is perspective, which really amounts to how scale changes with distance.

It's easy to determine entrance pupil location if we can clearly see objects at two significantly different distances without changing focus. In that case, any change in scale is due entirely to perspective caused by the entrance pupil location.

If we have to refocus to clearly see objects, the problem gets a lot worse. Any scale changes then are due partly to refocusing and partly to perspective. To determine perspective, we have to back out any scale changes due to refocusing, and then work with what's left.

In the scheme shown above, if we do not back out the scale change caused by refocusing, then what we'll get is a strongly converging pattern regardless of where the entrance pupil is.

The scheme can be adapted to work, in theory, by explicitly rescaling images to take into account the change in magnification caused by changing the lens-to-sensor distance. Whatever change in scale is left after that must be due to entrance pupil location.

But...(there's always a "but")...in order for this to work, we have to know very precisely how much change in magnification is due to changing the lens-to-sensor distance. If we get that wrong, then we'll be calculating entrance pupil location from what is actually residual error in the rescaling.

OK, no problem (it seems), let's just measure the change in magnification as we change focus, say by shooting an image of an in-focus scale micrometer. The problem with this approach is that when we back out those particular measurements, we end up making the image of the micrometer the same size at all focus distances. That results in apparently no change in magnification with distance, the hallmark of a telecentric lens. We have computed the entrance pupil to be at infinity as a result of the way we made the measurement.

The underlying difficulty with any approach involving just the imagery is that we're trying to determine entrance pupil location by observing what lines up with what. Because of the shallow DOF, we can only tell what is lined up within a very thin slab, where the scale changes are too small to measure accurately. Think about trying to make a distance measurement by triangulation using a baseline that's way too short -- any small error in the angles gets multiplied by a long lever arm and turns into a big error in distance to target. In the same way, when DOF is very shallow, any small error in the observations turns into large error in estimating the entrance pupil location from imagery.

--Rik

elf
Posts: 1416
Joined: Sun Nov 18, 2007 12:10 pm

Post by elf »

How do you find the edge of the limiting aperture?
This is somewhat focused on a lamp behind the objective:
Image

I think I know why my 10X images are soft:
Image

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

Post by ChrisR »

How do you find the edge of the limiting aperture?
I share your difficulty!
It's the far end of the visible hole, I suppose, if you peer into the front of the lens. The curved side in the top pic. If you wiggle the lens ( in pitch and yaw) that hole moves about a lot less for a BD 10x/0./25 than it does for a 10x/0.3. But I'm darned if I can tell how "far away" it is. For some lenses I find it v hard. It's not like you can use binocular vision to see it! I feel it ought to be possible to hold a ruler up with the lens somehow, but haven't so far been able to make that work either.

(This method doesn't work - really not enough to look at in a microscope objective: http://www.johnhpanos.com/ep-right.gif)

I think I know why my 10X images are soft:
I got a surprise too. One lens I'd written off as soft, had a layer of something like treacle all over it. I'd never noticed that before :roll:. ! Scratches such as the one you show though, I keep reading don't usually make a significant difference.
-----

Also I'm not sure that I'm sure what " 5 cm or so in front of the objective (on the back side of the in-focus subject)" means. 5cm from where, in which direction?

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

Post by ChrisR »

Later - could one use some technique like this? Avoid the magnification-changes-focus problem, by having two pins, one behind the other both on the lens axis. No magnification change when you focus between them.

Rotate the camera assembly about a line which passes through the lens axis and is perpendicular to it. If it's in the plane of the entrance pupil as at X, the two pins will come into focus in line with the centre (green) line when you focus between them by adjusting the sensor position.
If you miss it, say the entrance pupil is at Y, then the two pins will go out of alignment as you focus.

SImple to try with a normal bellows focus rail fixed at a single mounting point.
Is it? :smt017
Image

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

Post by rjlittlefield »

ChrisR wrote:
How do you find the edge of the limiting aperture?
I share your difficulty!
It's the far end of the visible hole, I suppose, if you peer into the front of the lens. The curved side in the top pic.
This is one of those measurements that is simple in principle, not so simple in practice.

Here is an illustration I worked up a few minutes ago.

Image

Image

The bottom pic shows what I believe is the edge of the limiting aperture, as seen through the loupe. The loupe, of course, has very little DOF, so the fact that it shows the pin and the aperture edge in focus at the same time means they're in the same place. Unless I've scrambled something (always a possibility), then the entrance pupil will be at the pin labeled "Loupe focuses here". The other pin roughly marks the spot where the objective focuses.

I would describe this objective as having its entrance pupil "2 cm or so in front of the objective (on the back side of the in-focus subject)". That's different from the "5 cm or so" that I wrote last night based on trying to estimate distances while hand-holding lenses next to my face. I'd put more trust in this morning's number, but it's pretty casual too.

Because the entrance pupil is behind the subject, this lens should exhibit inverted perspective -- "farther is bigger". From the distances shown here (entrance pupil ~1 cm behind focus), the scale change should be about 1 part per 1000 per 10 microns of focus step. It seems like that ought to be measurable if I work real hard at it, but I probably don't have time right now to work that hard on this problem. Perhaps someone else can have a go at it.

--Rik

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

Post by rjlittlefield »

ChrisR wrote:SImple to try with a normal bellows focus rail fixed at a single mounting point.
Is it? :smt017
Image
Give it a try and see what happens.

This scheme works well with ordinary lenses, which A) have enough DOF that you can see both pins fairly clearly at the same time, and B) have a wide enough field that you can rotate the lens a significant amount while keeping both pins in view.

When you try it with a microscope objective, I believe you'll find that one pin or the other will be so OOF that you can't tell whether it's lined up or not. Of course you can solve that problem by moving the pins very close together in depth, but then you get into that short-baseline problem I mentioned earlier. In either case, when you try rotating, both pins will move out of the field before you have rotated very far.

Oh, there's one more issue that crops up. When making the measurement, you have to be careful to not introduce a new limiting aperture. Be sure to stick a camera on the end of the bellows, and make your "lined up" decisions by looking at what the camera sees.

--Rik

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

Post by ChrisR »

I believe you'll find that one pin or the other will be so OOF that you can't tell whether it's lined up or not.
Ah , no they won't appear together, I think, but I wasn't clear. I'm relying on the green line, between me and the camera, to indicate where the focus should be.
ie a pointer fixed to the axial line of my non-existent optical bench.
Give it a try and see what happens.
Not possible at the moment, unfortunately.


I follow you with your loupe and pins. Things could get confusing. I think I'd try the skew camera with a simple lens like a 50/f2.8 first!

Post Reply Previous topicNext topic