Stacking focus consistency

Here you can discuss topics such as focus stacking, stitching and other techniques that relate to the processing of micrographs.
Post Reply
Message
Author
Jkelley1000
Posts: 20
Joined: Thu Nov 29, 2018 2:55 am

Stacking focus consistency

#1 Post by Jkelley1000 » Fri Jan 25, 2019 3:14 am

Hi Folks,
I have a modest Trinocular OMAX with 6 M camera and ToupView. I have done some good stacks but wish for more accuracy in the focus process. Unfortunately, my microscope has no hash marks or scale on the focus knobs. Are round, calibrated stick on labels available somewhere? Will they even help?
Beyond that, I'm handy with electronics if I can find or build a highly precise motorized focus drive? If I can use it on my telescopes all the better. DIY or used would be great.
So, how do you handle incremental focus? What's more, does taking more layers sort of make super accurate focus stepping less important?
I sure appreciate this forum and thank you for reading my post!
Take good care,
Jimmy

PeteM
Posts: 1606
Joined: Tue Dec 06, 2016 6:22 am
Location: N. California

Re: Stacking focus consistency

#2 Post by PeteM » Fri Jan 25, 2019 4:54 am

JKelley -- you could fit a larger fine focus knob over the existing one and print out and glue on a series of graduations on the periphery. If you know someone with a lathe this would be a quick project. Swap the time for some bit of electronic wizardly they might want?

Might even fit the new and larger cylindrical over-knob with a couple of nylon tipped setscrews so you can take easily remove it if needed.

Depending on how your fine focus knob goes on, might also be easy enough to simply replace it with a larger one.

Hardest part is figuring things out (line spacing) so that the graduations wrap to leave the last graduation about right -- or just not worry about it if a single turn gets you enough depth of field. You can also print out the graduations and then machine the diameter (circumference) of your new knob to match.

Another way to print up graduations (besides a printer) is to get something like a Brother P Touch label maker. Print a vertical line a zillion times . . . You can buy all sorts of label stock and it sticks and holds up pretty well.

Engraving or stamping the lines is also pretty easy for someone with a metal shop.

3D printer is another possibility if you know someone with one. Turning from solid aluminum or an engineered plastic would likely be faster and easier and provide a better looking result.

Given that your focus mechanism will have some backlash, be sure to take that out when you start a stack and keep incrementing in the same direction until you're done.

Another possibility is to fit something like a red dot laser sight (they can be very small) to the end of the fine focus. Even with double stick tape, hot glue, or a drilled and tapped hole. Play that laser dot on a distant surface and a couple microns of fine focus movement might correspond to an inch or more on paper yardstick affixed to a distant wall and/or ceiling. For perfect results, it ought to be an arc -- but get far enough way and it won't matter much.

Others have drilled holes in the fine focus know and fixed spokes.

Stepper motor is another possibility, but with the same challenge of fitting the motor to the fine focus as with fitting a larger knob. Ideally you'd automatically trigger the camera after each step had settled, being mindful to eliminate sources of vibration in the stepper and camera.

Hobbyst46
Posts: 3311
Joined: Mon Aug 21, 2017 9:02 pm

Re: Stacking focus consistency

#3 Post by Hobbyst46 » Fri Jan 25, 2019 6:25 am

This subject has been recently discussed:
viewtopic.php?f=12&t=6940&hilit=stepper
But, I think that the question : "what is the essential and sufficient number of single images to yield a satisfactory stack" has yet to be answered.
In addition, what may be important is that each image in the set is in focus (at least a part of the area), and not necessarily that they are evenly spaced. On the other hand, it is far easier to simply run an automated sequence of vertical stage movements and shooting at each stop.
I am certain that in the research literature it has been addressed, so all we need to do is locate the article and "translate" it to a practical working rule for hobbyists that stack for pleasure rather than business...
Zeiss Standard GFL+Canon EOS-M10, Olympus VMZ stereo

MichaelG.
Posts: 2711
Joined: Mon Apr 10, 2017 8:24 am
Location: NorthWest England

Re: Stacking focus consistency

#4 Post by MichaelG. » Fri Jan 25, 2019 9:28 am

Hobbyst46 wrote: I am certain that in the research literature it has been addressed, so all we need to do is locate the article and "translate" it to a practical working rule for hobbyists that stack for pleasure rather than business...
My question to Zerene support is largely irrelevant, but Rik Littlfield's answer was concise:
On 14 Jul 2018, at 01:45, support@zerenesystems.com wrote:

Michael,

I do not anticipate any special problems from either the unequal spacing or the small number of frames. Unless you're doing synthetic stereo (probably not practical with only 3 images), Zerene Stacker does not make any assumptions about equal spacing. And while 3 frames is definitely on the short end of things, I have seen even 2-image stacks processed to good effect.
... Straight from the horse's mouth !

MichaelG.
Too many 'projects'

User avatar
mrsonchus
Posts: 4039
Joined: Tue Feb 03, 2015 9:42 pm
Location: Cumbria, UK

Re: Stacking focus consistency

#5 Post by mrsonchus » Fri Jan 25, 2019 1:51 pm

Hi, I never use equally-spaced focus for my stack layers. I concentrate on focusing to features that I notice coming into focus as I move the focus knob - regardless of their distance from the focal-plane before them. I also tend very much to keep my number of frames (layers) to a minimum, definitely finding that 'less is more'.

That said the context of my above remark is one of semi-transparent/translucent specimens sectioned very thinly as stained permanent slides. This is far different to a completely opaque and incident-lit specimen such as say a beetle etc. In this case of complete opacity and incident-lighting I would say that more layers and regular spacing were likely to give better perception of depth.

With stacking of translucent subjects the aim (mine anyway) is revelation of details that don't coincide in the X,Y plane. For details that do coincide in the X,Y plane but not in the Z plane the technique is one of 'optical sectioning', where the different levels of focus are not stacked but taken as separate images.

Opaque subjects of course don't have details coincident in the X,Y plane.

John B.
John B

ChrisR
Posts: 139
Joined: Tue Jun 14, 2016 11:01 pm
Location: Surrey, UK

Re: Stacking focus consistency

#6 Post by ChrisR » Fri Jan 25, 2019 2:52 pm

Note that anything not quite in focus will probably give you false colours from longitudinal chromatic aberrations. For Nikon and many others that would be purples. If there's something there, you probably want it in focus.
My old computer used to take one minute per frame to stack. The current one does one a second, so I don't worry about having too many. I do trim the ends, though.
(Using Zerene Stacker)

Jkelley1000
Posts: 20
Joined: Thu Nov 29, 2018 2:55 am

Re: Stacking focus consistency

#7 Post by Jkelley1000 » Sat Jan 26, 2019 1:17 am

Thanks so much everyone. Nothing beats experienced users like you.
I appreciate your posts very much,
Jimmy

ChrisR
Posts: 139
Joined: Tue Jun 14, 2016 11:01 pm
Location: Surrey, UK

Re: Stacking focus consistency

#8 Post by ChrisR » Sat Jan 26, 2019 4:49 pm

Coincidentally I'm just having bother with an Olympus focus knob which IS calibrated, but only by means of raised numbers and bars, so it's black on black.
I tried painting it, but it's not pretty.
So I'm printing a circle with 100, or 200 marks round it, sized to stick on one or other knob.
If you have photoshop in one version or another, you can Transform > rotate > by 3.6°
then when you hold the right combination of Ctrl-ALt-Shift T (may be one key out, I can't remember) it repeats the transformation, so you tap 100 times. Or spend time finding a more efficient way!

Here's one I stole - Ed French won't mind:
Attachments
387_dialFace10_6a_1.gif
387_dialFace10_6a_1.gif (15.91 KiB) Viewed 9681 times

MichaelG.
Posts: 2711
Joined: Mon Apr 10, 2017 8:24 am
Location: NorthWest England

Re: Stacking focus consistency

#9 Post by MichaelG. » Sat Jan 26, 2019 6:18 pm

If you don't need the printed numbers ... This is very useful:
http://www.cgtk.co.uk/metalwork/reference/divider

MichaelG.
Too many 'projects'

User avatar
iconoclastica
Posts: 78
Joined: Sun Jan 20, 2019 5:43 pm

Re: Stacking focus consistency

#10 Post by iconoclastica » Sat Jan 26, 2019 11:25 pm

On the microscope, I make focus steps by eye judgement. I watch where the focus is now, where the next details will likely appear, and turn the wheel until I see them. Of course, I scout the subject before starting, so I know where to look. This works quite well in all magnifications (4x-100x). Stepsizes vary with magnification and aperture.

This said, I will be making an automated system based on a stepper motor. Note that normally these motors make 200 or 400 steps per full turn, which is not always enough. Microstepping, gears, or a belt drive can be used to make smaller steps. I will try a geared system. Gears don't have the best of reputations for the extra play that comes into the system. But I think (or hope...) that that won't be a problem as long as the moter is used one way.

Note that the hardware is only part of the job: you'll also have to write software for the controller. If you don't feel easy with that, you might consider using e.g. the stackshot controller to drive your motor.

Hobbyst46
Posts: 3311
Joined: Mon Aug 21, 2017 9:02 pm

Re: Stacking focus consistency

#11 Post by Hobbyst46 » Sat Jan 26, 2019 11:39 pm

iconoclastica wrote:This said, I will be making an automated system based on a stepper motor. Note that normally these motors make 200 or 400 steps per full turn, which is not always enough. Microstepping, gears, or a belt drive can be used to make smaller steps. I will try a geared system. Gears don't have the best of reputations for the extra play that comes into the system. But I think (or hope...) that that won't be a problem as long as the moter is used one way.
Note that the hardware is only part of the job: you'll also have to write software for the controller. If you don't feel easy
I would start with 200/400 steps/turn, on my microscope that means 2 or 1 micrometers/step, respectively.
Software is (IMO) easier done that hardware, not many commands are needed, but the initial position of the moving part ("zero point") must be defined, so a "reset" will always bring the stage back to the starting point.
And, of course, provided that the communication protocol with the camera is available... actually of this I doubt...
Zeiss Standard GFL+Canon EOS-M10, Olympus VMZ stereo

User avatar
iconoclastica
Posts: 78
Joined: Sun Jan 20, 2019 5:43 pm

Re: Stacking focus consistency

#12 Post by iconoclastica » Sun Jan 27, 2019 2:39 pm

I find 1-2µm quite big steps, but of course all depend on your intended magnification. I quite agree on your stand on software, but i have been a software engineer all my life. Not everyone feels the same about it.
Triggering the camera is easy: with an optocoupler yout short the pc remote cable for about 0.1 sec. That's all there is to it. Can be done with a transistor too, but I prefer to have both circuits completely separated.

LeonhardEuler
Posts: 93
Joined: Thu Mar 18, 2021 12:36 pm

Re: Stacking focus consistency

#13 Post by LeonhardEuler » Sat Mar 27, 2021 10:57 pm

I have also pondered using a motorized solution that I wired up somehow... I am just afraid I might beef it and it makes my focus knob fly off or something :(

Chas
Posts: 32
Joined: Tue Jan 19, 2021 3:11 pm

Re: Stacking focus consistency

#14 Post by Chas » Mon Mar 29, 2021 9:19 pm

I have a little clicker made out of a bit of an aluminium soft-drink can (the stuff is not as sharp as you might at first think.)
I cut mine into an L-shape ( a bit like a piece of angle iron) with a pair of scissors and have one flat side of it attached flat to the microscope body and the end of other flat face pressed again the focussing knob.

This thing makes a surprising loud click as each moulded line on the knob's surface flicks it.

Chas
Posts: 32
Joined: Tue Jan 19, 2021 3:11 pm

Re: Stacking focus consistency

#15 Post by Chas » Mon Mar 29, 2021 9:33 pm

You do need to turn the knob slowly otherwise you will end up doing a 'click and a half' rather than a click.
Not very sophisticated .. I push it away from the focussing knob with a finger when racking the microscope down.
clicker 640 480.jpg
clicker 640 480.jpg (56.09 KiB) Viewed 795 times

Seta
Posts: 115
Joined: Thu Feb 18, 2021 8:24 pm
Location: Castellón, Spain

Re: Stacking focus consistency

#16 Post by Seta » Sat Apr 03, 2021 1:03 pm

On my vertical set up I use a motorized rail. On the microscope for now I do not even look at the tick marks, just try make small steps; I plan to motorize it soon...
Chas wrote:
Mon Mar 29, 2021 9:33 pm
You do need to turn the knob slowly otherwise you will end up doing a 'click and a half' rather than a click.
Not very sophisticated .. I push it away from the focussing knob with a finger when racking the microscope down.
clicker 640 480.jpg
Best focussing knob mod ever.. :D

EYE C U
Posts: 174
Joined: Wed Jul 15, 2020 5:18 pm

Re: Stacking focus consistency

#17 Post by EYE C U » Sun Apr 04, 2021 8:28 am

set to take a pic every second and turn focus slooooowly

BramHuntingNematodes
Posts: 804
Joined: Tue Jan 21, 2020 1:29 am
Location: Georgia, USA

Re: Stacking focus consistency

#18 Post by BramHuntingNematodes » Sun Apr 04, 2021 12:59 pm

That rules chas
1942 Bausch and Lomb Series T Dynoptic, Custom Illumination

Elapid
Posts: 10
Joined: Thu Apr 11, 2019 2:09 pm

Re: Stacking focus consisten

#19 Post by Elapid » Sat Apr 17, 2021 11:05 pm

I started focus stacking over 15 years ago doing terrestrial photos with a DSLR and adjusting increments manually. I used Combine ZM which was about all there was then. Now I use a simular approach with a DSLR on my microscope. For each image I do a couple of “practice runs” to find the two endpoints. I watch the image on a large LCD monitor. I always go from the counter-clockwise endpoint to the clockwise endpoint. That way I don’t get confused as to which way I’m turning the fine focus knob. The farther the distance between endpoints the more steps I use, it’s strictly seat of the pants. I don’t think it matters that each increment is equal to all the others in terms of microns or degrees of knob rotation. If Zerene is putting out something goofy look thru all the images and find the one that’s not right and delete it. Then run Zerene again.

Digital imaging people say that all digital images require some amount of sharpening, it’s the nature of the beast. I’m sure most of us do that. Recently artificial intelligence algorithms have greatly increased the capability of sharpening software. This seems especially true with focus stacked images. I’m not plugging anyone but if you want to try increasing the quality of your stacked images you might investigate a trial version of something like Topaz Sharpen AI. I’m sure there are others as well.
Attachments
7EDCF6B0-FA10-4501-A889-D88259FDA632.jpeg
7EDCF6B0-FA10-4501-A889-D88259FDA632.jpeg (191.2 KiB) Viewed 122 times

Post Reply