Software to focus and record image stack

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

Moderators: Pau, rjlittlefield, ChrisR, Chris S.

Charles Krebs
Posts: 5860
Joined: Tue Aug 01, 2006 8:02 pm
Location: Issaquah, WA USA
Contact:

Software to focus and record image stack

Post by Charles Krebs »

Recently the subject of software to control the camera focus in order to "automate" the process of recording an image stack was touched upon here:
http://www.photomacrography.net/forum/v ... c&start=15

For users of newer Canon DSLR's (and soon Nikon DSLR's) that have the "Live View" feature it looks as if an interesting solution may be near. I've been playing around with a beta of a program called "HeliconRemote" and it's pretty addictive. Thing is, it's usable with auto-focus lenses, but many (most?) of us here are using a variety of focusing stages to move either the camera or subject. I've strongly encouraged the people at Helicon to look into control of stepping motors that could be used with many of our set-ups. It's something they had intended to pursue. (The image stack is saved to disk, so any program, like say ZS :wink:, could be used for the actual stacking process itself).

I'm not savvy at all on what is available out there in this regard. The "turn-key" hardware solutions I've seen (like here: http://www.saphicon.com/focus-drive-integrated-s.htm ) seem too pricey. It's hard for me to to believe there is not available a modestly priced motor/controller that could be used with software like this, and would be suitable for a wide range of the type of equipment we use. I know several members here are far more knowledgeable about the "stepping" devices.... any suggestions?

In the meantime I'll be having some fun with my AF 100mm macro (and some extension tubes as well).
Just wish 90% of my stuff was not in boxes in storage right now... ](*,)

If you have a "Live View" Canon body and a suitable AF lens and want to give it this a try, I think they would welcome more "beta" testers.

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

Re: Software to focus and record image stack

Post by elf »

Charles Krebs wrote:Recently the subject of software to control the camera focus in order to "automate" the process of recording an image stack was touched upon here:
http://www.photomacrography.net/forum/v ... c&start=15

For users of newer Canon DSLR's (and soon Nikon DSLR's) that have the "Live View" feature it looks as if an interesting solution may be near. I've been playing around with a beta of a program called "HeliconRemote" and it's pretty addictive. Thing is, it's usable with auto-focus lenses, but many (most?) of us here are using a variety of focusing stages to move either the camera or subject. I've strongly encouraged the people at Helicon to look into control of stepping motors that could be used with many of our set-ups. It's something they had intended to pursue. (The image stack is saved to disk, so any program, like say ZS :wink:, could be used for the actual stacking process itself).

I'm not savvy at all on what is available out there in this regard. The "turn-key" hardware solutions I've seen (like here: http://www.saphicon.com/focus-drive-integrated-s.htm ) seem too pricey. It's hard for me to to believe there is not available a modestly priced motor/controller that could be used with software like this, and would be suitable for a wide range of the type of equipment we use. I know several members here are far more knowledgeable about the "stepping" devices.... any suggestions?

In the meantime I'll be having some fun with my AF 100mm macro (and some extension tubes as well).
Just wish 90% of my stuff was not in boxes in storage right now... ](*,)

If you have a "Live View" Canon body and a suitable AF lens and want to give it this a try, I think they would welcome more "beta" testers.

The "turn-key" hardware solution does seem a bit expensive for what is essentially a small stepper motor and controller.

The ability to control the focus from a computer may be one of the things that persuades me to by a Canon for my next camera. The only real issue with setting the focus like this is you lose the ability to rotate around the entrance pupil so it's limited to single frame stacks.

The Olympus SDK doesn't have the ability to adjust the focus.

Harold Gough
Posts: 5786
Joined: Sun Mar 09, 2008 2:17 am
Location: Reading, Berkshire, England

Re: Software to focus and record image stack

Post by Harold Gough »

elf wrote:
The only real issue with setting the focus like this is you lose the ability to rotate around the entrance pupil so it's limited to single frame stacks.
As a non-stacker, I can usually get the gist of what is being said but you lost me here. :?

Harold
My images are a medium for sharing some of my experiences: they are not me.

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

Re: Software to focus and record image stack

Post by elf »

Harold Gough wrote:
elf wrote:
The only real issue with setting the focus like this is you lose the ability to rotate around the entrance pupil so it's limited to single frame stacks.
As a non-stacker, I can usually get the gist of what is being said but you lost me here. :?

Harold
Most of my images, both macro and non-macro, are shot as panoramas. It is best to be able to rotate around the entrance pupil for each frame. Most of my lens move the entrance pupil when changing the focus point, so it's hard to shoot multiple frames without parallax errors. This was one of the main reasons for developing my spherical pano head.

Leaving the lens in a fixed position and changing the draw on the bellows works really well since the entrance pupil isn't moving. Adding a stepper motor to drive it would relieve the tedium of multi hundred image stacks :)

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

Post by rjlittlefield »

Harold, if you need some further background info regarding the entrance pupil and stitched panoramas, see this article.

For a stack-and-stitch application, the ideal situation is where the entrance pupil never moves, either when focus changes or when the camera pans to a different part of the scene.

Elf's system is the only one I have seen achieve that without using telecentric optics.

--Rik

Harold Gough
Posts: 5786
Joined: Sun Mar 09, 2008 2:17 am
Location: Reading, Berkshire, England

Post by Harold Gough »

Thanks for the explanations. No great mystery after all.

Had it been phrased in terms of nodal point (now a dated term, I understand) and panorama I would have understood immediately.

Harold
My images are a medium for sharing some of my experiences: they are not me.

Graham Stabler
Posts: 209
Joined: Thu Dec 20, 2007 11:22 am
Location: Swindon, UK

Post by Graham Stabler »

Stepper motors are simple beasts and there is no reason any of this should cost much at all. You could use a PC power supply, a small single axis stepper driver and a small stepper motor all for less than the cost of even a pretty bad tripod.

For control the parallel port can be used or to make it more compatible with newer PCs you can get simple USB to serial emulators and let a cheap micro processor (pic, arduino, basic stamp, propeller) do the motion on receiving commands.

My object movie rig is stepper controlled on both rotation axes and in the z-axis for stacking. The most expensive part of the system was the machining of the components.

Cheers,

Graham

Charles Krebs
Posts: 5860
Joined: Tue Aug 01, 2006 8:02 pm
Location: Issaquah, WA USA
Contact:

Post by Charles Krebs »

Graham,
Stepper motors are simple beasts and there is no reason any of this should cost much at all.
Well... if you've never even seen one it can be confusing to choose from the huge amount of hardware available, and the finer points of their operation.:wink:

Not having worked with these before, I'm actually a little more curious about some of the "details". For example...
For my microscope it would be coupled to my fine focus knob. The fine focus moves the stage through a small gear-train. To avoid wear or damage I would not want very abrupt, high "impact" steps driving these gears. So, if I use full steps at low magnifications do I need "control signals" for acceleration and/or velocity or are the steps gentle enough that this is not a concern? On the microscope, higher mags will require finer increments than a full step. Am I better off (more consistent spacing) with microstepping or a motor that has reduction gearing?
Bipolar or Unipolar? 1.8 degree per step or 0.9 degree?

What about a vertical stage moving camera/bellows via a lead screw. How large a motor (and holding torque) is really needed? Unlike the fine focus on a microscope, which rotates nearly effortlessly, the "load" is greater and more torque is needed. If I use microstepping, at what point (if any) will the reduction in power become a problem (movement and accurate spacing)? Do I go to a larger motor, or a geared motor?

Having so many choices makes things confusing to the uninitiated. :wink:

AndrewC
Posts: 1436
Joined: Thu Feb 14, 2008 10:05 am
Location: Belgium
Contact:

Post by AndrewC »

Answered your PM but to put it out for others to see:

1) "Gentle steps" - microstepping makes it gentle but I would be surprised if full steps would actually damage gears. I usually use microstepping on my horizontal stages and have never run out of power. For a controller it is just as happy to make 8x 1/8th microsteps as 1 full step. You will nearly always get smoother motion when microstepping and, as long as the power is enough, should get more repeatable positioning. The first ustep should take care of the stiction / inertia. I've tested it myself on a system with a shaft encoder - much more random and systematic positioning errors with big steps than little steps.

2) Acceleration: you can't accelerate into a single step, you accelerate by progressively reducing the delay between steps. This is done if you want to move a stage from rest to high speed. Actually, you could "accelerate" into a step by gradually ramping the applied voltage. The commonly available bipolar chopper drivers (see below) tend to give it a big whack and then back off. The only driver I have personal experience of that gives very smooth motion by using a ramped voltage is a Linistepper http://www.piclist.com/techref/io/stepp ... /index.htm but that only works on unipolar motors and most commonly available motors are 4 wire bipolar.

3) Torque holding power: pretty much a suck it and see - it depends on the mass you are lifting, pitch and stiction of the leadscrew, etc, etc. Of course a reduction gear head helps but I don't think it is really necessary and they are hard to find. You will typically find that a linear drive with a 5mm pitch or less will easily hold and move a couple of kgs vertically when coupled to pretty much any NEMA23 stepper. If it does drift just buy stepper motor with more power. to put it in context, I can't rotate any of my NEMA23 motors by hand when powered up and just gripping the shaft bare handed. They do have a high holding torque :)

IMO the biggest hurdles with steppers are:

- mechanical interface: easy when connecting to a conventional linear bearing with worm drive / leadscrew with mounting points, but more interesting if you want to drive a microscope focus knob shaft with no pre-existing mounting points. You will normally connect with some kind of flex coupling that has zero backlash but reduces the need for exact shaft alignment - unless the rotation axis for motor and shaft are exactly aligned you need some kind of flexible coupling to soak up the difference

- control signals for the stepper driver: you need a way of sending the correct number of step and associated direction pulses. Can be done from a PC or a dedicated microcontroller. Can't be done with a push button switch unless you debounce it.

- stepper driver: converts "step and direction" into the actual current sent to the motor coils. These are easy to purchase. I have personal experience of JAFmotion or routoutcnc but there are many more.

http://routoutcnc.com/singlesmall.html

http://www.jafmotion.co.uk/index.php?op ... &Itemid=50

A vertical lift is very much the same as a CNC Z-axis. Search the web for CNC drives and z-axis, you'll find lots of relevant info out there.

Specific questions are easy to answer: if you link to some specific hardware or electronics you've found it will be easier to discuss.

hope that helps :)

Andrew

Now I've got to go the hospital and get some positron emission imaging of my spine - what fun :)

lothman
Posts: 507
Joined: Sat Feb 14, 2009 7:00 am
Location: Stuttgart/Germany

Post by lothman »

AndrewC wrote: 3) Torque holding power: pretty much a suck it and see - it depends on the mass you are lifting, pitch and stiction of the leadscrew, etc, etc. Of course a reduction gear head helps but I don't think it is really necessary and they are hard to find. You will typically find that a linear drive with a 5mm pitch or less will easily hold and move a couple of kgs vertically when coupled to pretty much any NEMA23 stepper. If it does drift just buy stepper motor with more power. to put it in context, I can't rotate any of my NEMA23 motors by hand when powered up and just gripping the shaft bare handed. They do have a high holding torque :)
I built a z-axis lifting the whole Microscope. Yes these motors have enough holding torque, but if power is off only a fraction of that torque is left. In my case gravity was sufficient to start moving the microscope down (due to the lack of self locking of the ball screw I used). I solved that by adding a break which is open as long as power supply works.
Image

Post Reply Previous topicNext topic