Luminous Landscape Forum

Equipment & Techniques => Medium Format / Film / Digital Backs – and Large Sensor Photography => Topic started by: Dick Roadnight on August 29, 2010, 05:35:24 am

Title: Auto-step-focus-stacking
Post by: Dick Roadnight on August 29, 2010, 05:35:24 am
What is the biggest problem with MDF? …DOF

They give us auto bracketing for HDR, so why not autofocus stacking for Focus Merge?
It would be even more useful if this was available remote tethered… we have power remote auto-focus but not manual remote focus (specifying a distance, or without having to re-compose to auto-focus).

Being able to tilt the Plane Of Sharpest Focus is the main argument for a view camera or a T/S adapter… but auto-focus-stacking would largely eliminate the requirement.

For Focus Merge to work well, you need to be able to re-focus in precise steps without touching the camera, and I do not know of any easy way of doing this without using a Medium Format Digital View Camera, or moving the subject on a precision positioning micrometer table like Doug did, see Doug's Article (http://www.captureintegration.com/2009/08/25/extreme-macro/#more-2524).

I am contemplating using a Velmex programmable linear actuator for auto-focus-stacking, and it would be nice (and lucrative) to be the only fotog that could do it, so, perhaps, I would be happier if they do provide this as a standard function on the H4D-60.

Is it complicated David Grover Hasselblad? …can this be a software upgrade?
Title: Re: Auto-step-focus-stacking
Post by: bdp on August 29, 2010, 06:02:21 am
I think the Sinar Hy6 camera has focus bracketing. I remember the Sydney dealer telling me of one his clients who benefited from it. I don't know any more information, but I assume it does 3 shots using user definable focus distances.

Ben

PS. And BTW some would say the shallow DOF and focus 'roll off' is one of the biggest advantages of MF - I know that's why I use it  - chip size, not just megapixels. We don't all shoot landscapes and interiors :)
Title: Re: Auto-step-focus-stacking
Post by: pchong on August 29, 2010, 06:35:56 am
A commercial solution exists...interestingly it is not too expensive...the whole system including the macro rail driven by a step motor and control electronics is about the price of an RRS macro rail.

http://www.cognisys-inc.com/stackshot/stackshot.php
Title: Re: Auto-step-focus-stacking
Post by: Dick Roadnight on August 29, 2010, 08:59:39 am
A commercial solution exists...interestingly it is not too expensive...the whole system including the macro rail driven by a step motor and control electronics is about the price of an RRS macro rail.

http://www.cognisys-inc.com/stackshot/stackshot.php
Thank you...

This is very interesting... but I think I would need .001mm

One could mount the rear standard of a view camera on one of these for interiors where DOF would be a problem.

I was thinking of a Velmex three or five axis system for remote multi-row stitching and possibly tilt/yaw on a view camera... but I would want stitching on the rear standard and tilt on the front.

Don't tell anyone, or everyone will be able to do it!
Title: Re: Auto-step-focus-stacking
Post by: nad54 on August 29, 2010, 10:51:24 am
I use focus stacking alot in the field with my H3D-50 (now H4D-50) and 50-110mm. There really is no need for automation (though it would be nice). THe beauty of the H camera is the mirror stays locked up. All I have to do is gently tweak the focus ring. Before I start I have noted where the near and far points are. I can work quickly and have done a 10 step stack. The biggest issue is part of the frame moving. I found the camera doesn't move at all as long as it is on a stable tripod. The other big plus with the H system is the leaf shutter doesn't create any vibrations.
Title: Re: Auto-step-focus-stacking
Post by: cunim on August 29, 2010, 10:59:42 am
We used to build a system that did this on microscopes.  It would move the stage in X,Y, and Z  using motors and rotary encoders.  The software needed about 10% overlap to do a seamless job in XY stitching.  The depth dimension (Z) had two options.

1.  Convolve - This is what programs like Helicon do.  They combine the best focal data from multiple planes into a single plane.
2.  Deconvolve - This extracts a single very thin plane of focus - an optical slice - from a series of images each of which has a greater depth of focus.

These systems include things like automated corrections for color casts and for light falloff.  Set it up, go have lunch and come back to an image that might be 50 XY fields of view by 10 planes deep.  OK, I'm lying, it's not quite that easy but the results can really be quite beautiful if you are into the biospecimen type of thing.  Pretty widespread these days.  Too bad it only works well on microscopes.

Image of e. diadema made as above.  Slide is almost 200 yrs old (hence the dirt).  About 20 fields of view.  Can't remember how many planes.  Looks like the mounter tore a leg off during the capture.
Title: Re: Auto-step-focus-stacking
Post by: BJNY on August 29, 2010, 11:08:13 am
I use focus stacking alot in the field with my H3D-50 (now H4D-50) and 50-110mm. There really is no need for automation (though it would be nice). THe beauty of the H camera is the mirror stays locked up. All I have to do is gently tweak the focus ring. Before I start I have noted where the near and far points are. I can work quickly and have done a 10 step stack. The biggest issue is part of the frame moving. I found the camera doesn't move at all as long as it is on a stable tripod. The other big plus with the H system is the leaf shutter doesn't create any vibrations.

When tethered into Phocus,

you wouldn't need to physically touch the focusing ring

as there are left and right arrows in the software which changes the focus.
Title: Re: Auto-step-focus-stacking
Post by: Joe Behar on August 29, 2010, 11:24:28 am
Thank you...

This is very interesting... but I think I would need .001mm



Really?

You're serious about getting 0.001mm accuracy in a rail that moves a complete camera system with tolerances probably an order of magnitude bigger than that?

Title: Re: Auto-step-focus-stacking
Post by: Dick Roadnight on August 29, 2010, 12:18:49 pm
I use focus stacking alot in the field with my H3D-50 (now H4D-50) and 50-110mm. There really is no need for automation (though it would be nice). THe beauty of the H camera is the mirror stays locked up. All I have to do is gently tweak the focus ring. Before I start I have noted where the near and far points are. I can work quickly and have done a 10 step stack. The biggest issue is part of the frame moving. I found the camera doesn't move at all as long as it is on a stable tripod. The other big plus with the H system is the leaf shutter doesn't create any vibrations.
A 10Kg tripod always helps...
I had contemplated a cable system...
Do you remember the levers they used to supply for focusing Hasselblads?
Title: Re: Auto-step-focus-stacking
Post by: Dick Roadnight on August 29, 2010, 12:23:07 pm
We used to build a system that did this on microscopes.  It would move the stage in X,Y, and Z  using motors and rotary encoders.
I had thought that it would be routine for photo microscopy... can you configure a digitally optomised photo-microscope to get near 1:1, so that there is not a yawning gap in magnification ratio between photo-microscopy and an apo-digitar macro?
Title: Re: Auto-step-focus-stacking
Post by: Dick Roadnight on August 29, 2010, 12:25:36 pm
When tethered into Phocus,

you wouldn't need to physically touch the focusing ring

as there are left and right arrows in the software which changes the focus.
I had not found that in Phocus - it would be nice to have it automated so that you could take several photos in a few seconds of a live specimen.
Title: Re: Auto-step-focus-stacking
Post by: Dick Roadnight on August 29, 2010, 12:35:10 pm
Really?

You're serious about getting 0.001mm accuracy in a rail that moves a complete camera system with tolerances probably an order of magnitude bigger than that?

You would only need .001 for very small subjects, and you would tend to move the subject, not the camera.

A precision system would not just have a stepper motor driving through one set of loose gears, but a double drive system so you could tension one against the other to eliminate slop.

...and/or you have a separate measuring system measuring directly on the moved end of the system.

If you have a system with .001 resolution you can move in steps of .003, 4 or 5 which would give you flexibility to make the most of your DOF, and would be very useful even if you never need to use .001 steps.
Title: Re: Auto-step-focus-stacking
Post by: Joe Behar on August 29, 2010, 12:56:58 pm
You would only need .001 for very small subjects, and you would tend to move the subject, not the camera.

A precision system would not just have a stepper motor driving through one set of loose gears, but a double drive system so you could tension one against the other to eliminate slop.

...and/or you have a separate measuring system measuring directly on the moved end of the system.

If you have a system with .001 resolution you can move in steps of .003, 4 or 5 which would give you flexibility to make the most of your DOF, and would be very useful even if you never need to use .001 steps.

Dick,

Seriously....the entire system expands and contracts more than 0.001mm with slight temperature and humidity changes.

0.001mm equals  0.00004 inches...are you really suggesting that moving the subject by even 5 times that amount will make a visible difference to anything?

We are talking photography of objects bigger than say, 0.1 inches, right?





Title: Re: Auto-step-focus-stacking
Post by: cunim on August 29, 2010, 01:12:25 pm
I had thought that it would be routine for photo microscopy... can you configure a digitally decustomised photo-microscope to get near 1:1, so that there is not a yawning gap in magnification ratio between photo-microscopy and an apo-digitar macro?

Routine, hmmmm.  Easy to do badly.  Even today few systems do it well.  The convolution and deconvolution functions are massive coding projects with deep literatures behind them.

Mechanically and optically, no real problem getting 1X on the microscope.  You could simply order such a system off the shelf.  Things like focus slop and motor precision are not issues because position sensing is built into the hardware and software, usually using optical encoders.  You can locate a single blood cell on a 3" wide slide and come back to it just by feeding in its XY coordinates.

Optically, however, there are issues at 1X.  Low magnification optics have small numerical apertures and yield poor image quality.  Looking at the same image made with a 1X plan objective vs a 4 image stitch with a 4X planapo is instructive.  Same general thing as having a wide angle lens vs a stitched image made with a longer lens.  Horses for courses.

Anyway, this type of system is unlikely to be much use to you.  It works with relatively flat specimens that do not create issues of perspective.


Title: Re: Auto-step-focus-stacking
Post by: Dick Roadnight on August 29, 2010, 01:48:20 pm
Seriously, I do not know what you problem is...

Dick,

Seriously....the entire system expands and contracts more than 0.001mm with slight temperature and humidity changes.
So you use an automated system to take a succession of exposures while conditions stay reasonable constant, and you mount the object on a rail attached to the monorail of your camera, to eliminate (relative) tripod movement in case of an earthquake.
Quote
0.001mm equals  0.00004 inches...are you really suggesting that moving the subject by even 5 times that amount will make a visible difference to anything?
At the limit, the relevant dimension is the wavelength of light.

For f5, magnification of 25:1 and circle of confusion of 0.01 the depth of field, (without allowance for overlap) is 0.004, according to Wikipaedia.
Quote
We are talking photography of objects bigger than say, 0.1 inches, right?
Wrong
Title: Re: Auto-step-focus-stacking
Post by: Dick Roadnight on August 29, 2010, 02:04:15 pm

Optically, however, there are issues at 1X.  Low magnification optics have small numerical apertures and yield poor image quality. 
I have a Schneider Apo-Digitar Macro for 3:1 to 1:3, and a set of Zeiss Luminar Microscope screw macro lenses for magnification from 1:1 to 25:1, but the Luminars are optomised for 5 * 4" I think, and I would like something for this range of magnification that is optomised for modern digital sensors.
Title: Re: Auto-step-focus-stacking
Post by: Joe Behar on August 29, 2010, 02:11:40 pm

For f5, magnification of 25:1 and circle of confusion of 0.01 the depth of field, (without allowance for overlap) is 0.004, according to Wikipaedia.


Using a 25mm lens on your monorail camera would require a bellows extension of 625mm to achieve 25X magnification

Using a 50mm lens needs 1250mm of extension....that's over 4 feet of bellows.

(I hope I have the math right)

This is a nice theoretical discussion but.......

Title: Re: Auto-step-focus-stacking
Post by: feppe on August 29, 2010, 02:17:28 pm
Seriously, I do not know what you problem is...
So you use an automated system to take a succession of exposures while conditions stay reasonable constant, and you mount the object on a rail attached to the monorail of your camera, to eliminate (relative) tripod movement in case of an earthquake.At the limit, the relevant dimension is the wavelength of light.

For f5, magnification of 25:1 and circle of confusion of 0.01 the depth of field, (without allowance for overlap) is 0.004, according to Wikipaedia.Wrong


You have taken pixel peeping and measurebating to a whole new level, even by LL standards ;D
Title: Re: Auto-step-focus-stacking
Post by: Dick Roadnight on August 29, 2010, 02:40:28 pm

For f5, magnification of 25:1 and circle of confusion of 0.01 the depth of field, (without allowance for overlap) is 0.004, according to Wikipaedia.


Using a 25mm lens on your monorail camera would require a bellows extension of 625mm to achieve 25X magnification
In real life, I have over a meter of monorail and bellows, and a support rail...

¿Any problems?
Title: Re: Auto-step-focus-stacking
Post by: Joe Behar on August 29, 2010, 02:50:37 pm
In real life, I have over a meter of monorail and bellows, and a support rail...

¿Any problems?

Nope....

Its a beautiful day out. I think I'll go out and take some pictures.

Title: Re: Auto-step-focus-stacking
Post by: feppe on August 29, 2010, 03:57:00 pm
In real life, I have over a meter of monorail and bellows, and a support rail...

¿Any problems?

This is all new to me, but I just had to do the math on this for the insane hilarity of the discussion: assuming you have 1 meter of steel rail, and there's a 1 degree (Centigrade) increase in ambient temperature during your shooting, that rail will expand 0.013mm. To re-iterate, this is 13 times more than the 0.001 accuracy you "need," rendering that level of accuracy entirely useless. With just 1 degree change in temperature.

So if you manage to get that stepping motor accurate to 0.001mm, be sure not to touch it, breath at it, or even get close to it during the shoot, as I'm sure the infrared radiation from your body will change the rail's temperature enough to make that level of accuracy irrelevant. Even if you wear an aluminum apron and operate the contraption from the adjacent room with a remote, heat generated by the camera electronics and friction heat from moving up and down the rail are another challenge.

Of course you could measure the temperature (passively) and take thermal expansion into account when moving the rail. But this assumes you have a perfectly rigid, perfectly straight rail bolted to a 1-ton granite slab in a cooled, temperature-controlled clean room built on top of bedrock way out in the sticks so passing traffic doesn't disturb it. Hell, I bet a a stray butterfly wing flap, a burrowing earthworm or moon phase would wreak havoc on the results ;D

Source (http://www.calctool.org/CALC/eng/default/cte) for thermal expansion calc. I used 13 as CLTE from here (http://www.engineeringtoolbox.com/linear-expansion-coefficients-d_95.html).
Title: Re: Auto-step-focus-stacking
Post by: Dick Roadnight on August 29, 2010, 04:49:31 pm
This is all new to me, but I just had to do the math on this for the insane hilarity of the discussion: assuming you have 1 meter of steel rail, and there's a 1 degree (Centigrade) increase in ambient temperature during your shooting, that rail will expand 0.013mm.
An instant 5 or 10 degree rise in ambient temperature would have no significant effect on the length of the rail in the second or two between exposures - one more good reason for an automatic system.

If the whole system was instantly engulfed in molten lava... you would no longer be worried about the length of the rail.
Title: Re: Auto-step-focus-stacking
Post by: feppe on August 29, 2010, 05:13:45 pm
An instant 5 or 10 degree rise in ambient temperature would have no significant effect on the length of the rail in the second or two between exposures - one more good reason for an automatic system.

If the whole system was instantly engulfed in molten lava... you would no longer be worried about the length of the rail.

Even then, and in case you are actually serious, the challenges posed by extreme needs for rigidity, straightness, stability and isolation from imperceptible vibrations can't be overcome outside of a lab. I would think the weight of the camera moving up and down the rail would cause it to deform much more than 0.001mm, let alone the other factors - but I'm sure you have thought about a solution to that already.
Title: Re: Auto-step-focus-stacking
Post by: pchong on August 29, 2010, 09:28:08 pm
I do too...and I tend to agree with you. I use a H3D-39, mostly with the 80mm plus rings on a Manfrotto macro rail. I gently tweak the camera position with the micrometer screws on the rail. I find this technique better than moving the focus ring, as on macro, the macro ring hardly moves to change image focus, and its is easier to move the micrometer screw to move the camera by a fraction of a milimeter....and perhaps its psycological, I find blending the images to be easier by moving the camera than changing focus on the lens.

But having the automated rail is a neat solution, and can guarantee repeatability. For me, this is important, because I shoot macros of product (and product parts), and would like to retain some consistency between shots.

I use focus stacking alot in the field with my H3D-50 (now H4D-50) and 50-110mm. There really is no need for automation (though it would be nice). THe beauty of the H camera is the mirror stays locked up. All I have to do is gently tweak the focus ring. Before I start I have noted where the near and far points are. I can work quickly and have done a 10 step stack. The biggest issue is part of the frame moving. I found the camera doesn't move at all as long as it is on a stable tripod. The other big plus with the H system is the leaf shutter doesn't create any vibrations.
Title: Re: Auto-step-focus-stacking
Post by: Dick Roadnight on August 30, 2010, 02:29:08 am
But having the automated rail is a neat solution, and can guarantee repeatability. For me, this is important, because I shoot macros of product (and product parts), and would like to retain some consistency between shots.
My thought is that for regular professional work the auto-rail would be hassle-fee, quick and easy... and studio macro is something I could still be doing a a decade or two, even though I am now 61.
Title: Re: Auto-step-focus-stacking
Post by: Dick Roadnight on August 30, 2010, 02:46:44 am
Even then, and in case you are actually serious, the challenges posed by extreme needs for rigidity, straightness, stability and isolation from imperceptible vibrations can't be overcome outside of a lab.

I appreciate that 25:1 is a challenge, inside or out.

The Sinar system is rigid and stable.

Vibrations are not a problem if the subject is mounted on some thing attached to the monorail... I would not try photographing a bee's eye (@ 25:1) on a windy with the bee on a waving flower and the . camera on a tripod.
Quote

I would think the weight of the camera moving up and down the rail would cause it to deform much more than 0.001mm, let alone the other factors - but I'm sure you have thought about a solution to that already.
I would use an additional support rail, and, as long as there was no significant movement between exposures, it would not make any difference.

Zeiss are a serious company, and I do not think they were joking when they made the 16mm f2.5, which is recommended for 10* to 40*, see macrolenses (http://www.macrolenses.de/start.php?lang=en).
Title: Re: Auto-step-focus-stacking
Post by: Bart_van_der_Wolf on August 30, 2010, 07:03:23 am
I appreciate that 25:1 is a challenge, inside or out.

That's correct.

Not only are you going to be faced with very narrow DOF (e.g. ~6.4 micon @ f/8.0 when you use a sensel pitch of 6.4 micron and want to avoid diffraction as much as possible), but you'll need to find a way to get a lot of light (676x more than a regular exposure at infinity) on the object, and you'll wind up with a very small working distance which makes it difficult to get frontal lighting. I'm not saying it's impossible, but agree it's a challenge.

Moving the object/subject stage will require a lot of precision (given the narrow object side DOF), and it will change perspective during the incremental focus plane steps. Moving the sensor plane would have the benefit of unchanged perspective (and lighting!), and a larger depth of focus (~4 millimetres) thus requiring less positioning precision (can even be done by hand!). So using a view camera system has it's benefits.

Cheers,
Bart
Title: Re: Auto-step-focus-stacking
Post by: Dick Roadnight on August 30, 2010, 06:13:42 pm
That's correct.

Not only are you going to be faced with very narrow DOF (e.g. ~6.4 micon @ f/8.0 when you use a sensel pitch of 6.4 micron and want to avoid diffraction as much as possible), but you'll need to find a way to get a lot of light (676x more than a regular exposure at infinity) on the object, and you'll wind up with a very small working distance which makes it difficult to get frontal lighting. I'm not saying it's impossible, but agree it's a challenge.

Moving the object/subject stage will require a lot of precision (given the narrow object side DOF), and it will change perspective during the incremental focus plane steps. Moving the sensor plane would have the benefit of unchanged perspective (and lighting!), and a larger depth of focus (~4 millimetres) thus requiring less positioning precision (can even be done by hand!). So using a view camera system has it's benefits.

Cheers,
Bart
Frontal lighting would be a major problem with a P2 lensboard, unless I paint it white and use it as a reflector.

So using a P3 is the obvious solution... except that P3 bellows are short and expensive... the solution I have for this problem is to have two P3/P2 conversion bellows, so I can use P2 standards and bellows to extend a P3!

If you focus on the back of a subject (away from camera) then increase extension by moving the sensor standard, the magnification increases as you move focus towards the front of the subject, give the effect of enhanced natural-looking perspective, as the front of the subject will be reproduced bigger. It should be possible to mount the rear standard on an auto-focusing rail, or connect a stepper motor to the focusing knob.

Moving the subject would result in ¿no? perspective as the reproduction ratio would be the same for each focus slice?
Title: Re: Auto-step-focus-stacking
Post by: Bart_van_der_Wolf on August 30, 2010, 06:50:30 pm
Frontal lighting would be a major problem with a P2 lensboard, unless I paint it white and use it as a reflector.

Which is exactly what I would do, use the surroundings of the lens as reflector, it even allows to use more light from one side to maintain the impresssion of depth by sculpting 3D surfaces with light.

Quote
It should be possible to mount the rear standard on an auto-focusing rail, or connect a stepper motor to the focusing knob.

Yes, that would be the best solution IMHO. The stepper motor doesn't even have to have such a fine stepdistance, because the depth of focus (so at the image/sensor side) becomes bigger than the depth of field at the object side of the setup at larger than 1:1 magnification. You'll have plenty of leeway (several millimetres) for focusing with the rear standard, but only microns at the object end.
 
Quote
Moving the subject would result in ¿no? perspective as the reproduction ratio would be the same for each focus slice?

Moving the subject will change it's distance to the entrance pupil, and with that the perspective will change. It may or may not be an issue for the kind of object you're shooting, but it's best to avoid it if possible because it might result in halos with focus stitching.

Cheers,
Bart
Title: Re: Auto-step-focus-stacking
Post by: pchong on August 30, 2010, 08:28:09 pm
Hi Dick...I am now very curious...can please you show your setup and the pics you have taken to illustrate the gear and technique?
Title: Re: Auto-step-focus-stacking
Post by: Dick Roadnight on August 31, 2010, 04:44:56 am
Hi Dick...I am now very curious...can please you show your setup and the pics you have taken to illustrate the gear and technique?
I am glad that I have given you the impression that "I know what I am doing because I have done it" but that is not the case... I have been acquiring kit and info for macro for some considerable time, and and auto-step-focus-stacker might be about the last piece of the jigsaw to make 25:1 practicable. Until I told him about this concept Doug thought that > 10:1 was not practicable.
Title: Re: Auto-step-focus-stacking
Post by: Dick Roadnight on September 02, 2010, 11:29:20 am
Quote
Dick,
One thing I may have missed and one I didn't see:  When the lens is moved for focus, the object image tends to not only go in and out of focus, but also change size slightly.
If you move the lens (or the sensor/rear standard {relative to the lens}) you change the focus distance and the magnification,, and, as above, this can give the effect of perspective... If you focus by moving the subject (or moving the whole camera relative to the subject) the magnification does not change, but you still get a perspective difference in size, but anything in the plane of sharpest focus will theoretically have the magnification ratio.
Quote
Second: the circle of confusion for digital for really sharp images would be at least .007 I believe.
Is this true in the case of your experience or am i way off?

For DSLRS with Anti-Aliasing filters, I would initially try a CoC of three times the pixel pitch, for single-shot medium Format backs without Anti-Aliasing filters about double the pixel pitch, For multi-shot Medium format backs 1.5 times the pixel pitch... but suck it and see what works for your setup.