How not to do a focus stack!

Here you can discuss topics such as focus stacking, stitching and other techniques that relate to the processing of micrographs.
Post Reply
Message
Author
User avatar
gekko
Posts: 4701
Joined: Sun Oct 12, 2014 7:38 am
Location: Durham, NC, USA.

How not to do a focus stack!

#1 Post by gekko » Wed Apr 27, 2016 11:23 pm

This the kind of focus stack I get many times. Dandelion pollen; 14 images at 1 µm focus increments, 40x objective. This was stacked using CombineZP, but the results from Picolay were comparable. Is there enough information in the image to suggest what I may be doing wrongr? Many thanks!

Image
Last edited by gekko on Thu Apr 28, 2016 12:26 am, edited 2 times in total.

User avatar
75RR
Posts: 8207
Joined: Sun Oct 12, 2014 2:34 am
Location: Estepona, Spain

Re: How not to do a focus stack

#2 Post by 75RR » Wed Apr 27, 2016 11:46 pm

Might help seeing an image from the middle of the stack to give us a basis for comparison.
Zeiss Standard WL (somewhat fashion challenged) & Wild M8
Olympus E-P2 (Micro Four Thirds Camera)

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

Re: How not to do a focus stack

#3 Post by mrsonchus » Thu Apr 28, 2016 12:00 am

Hi gekko, looks like you've far too many layers (images) in your stack old chap. Trouble comes on horseback I find with stacking essentially transparent/translucent subjects such as my slides or pollen etc. The stack can't be built with many layers containing in-focus points that are in the 'same spot' in the image, as they simply cannot all be in focus at once.

The trick is one of 'less is more' and ensuring that you keep to a minimum or eliminate overlapping focused points in your proposed stack-layers.
For pollen grains (non-sectioned) I'd use say a focus at the very 'top', one about 25% 'down and one at the equatorial plane - use of any layers below the equatorial-plane would cause overlap of course and so is best avoided.

Try a stack of about 2,3 or 4 well-chosen focused planes, you should see a marked improvement. As for stacking software - I've compared several and they've all been identical and now I use 'Toupview' as it's 100% as good and outrageously fast to stack.

Good luck. :)

p.s. don't bother trying to make the distance between layers constant or even small - concentrate on choosing focused layers with good edges and contrast, without overlaps....
John B

User avatar
gekko
Posts: 4701
Joined: Sun Oct 12, 2014 7:38 am
Location: Durham, NC, USA.

Re: How not to do a focus stack

#4 Post by gekko » Thu Apr 28, 2016 12:11 am

75RR wrote:Might help seeing an image from the middle of the stack to give us a basis for comparison.
Thanks, 75RR: I've added a section from about the middle (left) and the stack is on the right. I can see that the middle image is not good, but at least it is smooth. I can see one big mistake, and that is I did not inspect the individual images to see how bad they were! I just automatically stacked them then complained about the result :oops: . Thanks.

User avatar
gekko
Posts: 4701
Joined: Sun Oct 12, 2014 7:38 am
Location: Durham, NC, USA.

Re: How not to do a focus stack

#5 Post by gekko » Thu Apr 28, 2016 12:25 am

mrsonchus wrote:Hi gekko, looks like you've far too many layers (images) in your stack old chap. Trouble comes on horseback I find with stacking essentially transparent/translucent subjects such as my slides or pollen etc. The stack can't be built with many layers containing in-focus points that are in the 'same spot' in the image, as they simply cannot all be in focus at once.

The trick is one of 'less is more' and ensuring that you keep to a minimum or eliminate overlapping focused points in your proposed stack-layers.
For pollen grains (non-sectioned) I'd use say a focus at the very 'top', one about 25% 'down and one at the equatorial plane - use of any layers below the equatorial-plane would cause overlap of course and so is best avoided.

Try a stack of about 2,3 or 4 well-chosen focused planes, you should see a marked improvement. As for stacking software - I've compared several and they've all been identical and now I use 'Toupview' as it's 100% as good and outrageously fast to stack.

Good luck. :)

p.s. don't bother trying to make the distance between layers constant or even small - concentrate on choosing focused layers with good edges and contrast, without overlaps....
Thank you very much, John, for your advice. I will definitely take it next time I do a stack. Here, unfortunately, my images were bad to begin with, as I stated in my reply to 75RR. My after-the-fact calculation: depth of pollen about 15 µm, depth of field of objective about 0.5 µm, so based on that I would expect to need about 30 images at 0.5 µm spacing! Yet you get superb results-- I've seen them! using far fewer images. So my assumptions may be wrong.

Thank you both for your comments: I will repeat the whole process (I still have the pollen on the slide).

User avatar
zzffnn
Posts: 3200
Joined: Sat Jun 20, 2015 3:57 am
Location: Houston, Texas, USA
Contact:

Re: How not to do a focus stack!

#6 Post by zzffnn » Thu Apr 28, 2016 1:07 am

gekko,

I think John B has a great point - less can be more sometimes. Most of the times, the microscopy stacks that I have seen have no more than 15 layers (many have less than 10 actually).

Your pollen may be a difficult subject to start with. For the software or human eyes, it could be hard to tell what is in focus and what is not.

Maybe close down condenser iris slightly to reduce flare and increase contrast? That way, it may be easier to tell what is in sharp focus.

I had a thread before dealing with how to do stacks. Key take home point from that thread was, if I remember correctly, only use layers that are clearly in focus in discrete areas and not overlapping much.

Microscopy stacks may be different from macro stacks, where in-focus vs out-of-focus areas can be easier to identified.

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

Re: How not to do a focus stack!

#7 Post by mrsonchus » Thu Apr 28, 2016 1:19 am

Experimentation is the way ahead!

Here are 3 (low-res of course) such images I took for a stack some time back, I just selected 3 decent focus levels and fed them to Toupview, may help a bit.

Oh, first here's a horror that I produced from exactly the same approach as your a while back, with very similar (Sonchus) pollen....
I'm still ashamed of this image! :oops:
ws_early-pollen-stack.jpg
ws_early-pollen-stack.jpg (37.76 KiB) Viewed 22385 times
Argggghhhh - I can only apologize for the horror..... :oops: :cry:

Here are three half-decent stack-slices,
ws_stackslicestrio.jpg
ws_stackslicestrio.jpg (187.15 KiB) Viewed 22385 times
They're a little poor but show basically how I try to stack....

Here's what they produced, not good, but reasonable to demonstrate.... (remember only 2mp to play with :cry: )
ws_FFDSSDstack.jpg
ws_FFDSSDstack.jpg (123.54 KiB) Viewed 22385 times
It's by no means high-quality but does the job, to a point....
John B

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

Re: How not to do a focus stack!

#8 Post by mrsonchus » Thu Apr 28, 2016 1:25 am

Ah, but your 'middle slice is almost a good equatorial-slice (the lowest layer when stacking pollen) and is almost in focus for the surrounding 'halo' of the spiny exine.....
Two more levels I'd try - the topmost level (nearest to you) and the 'middle' between the topmost and the equatorial should give you a good idea of how to proceed. Pollen is however rather difficult to begin with so don't be too discouraged. :)

Good luck. :)

Bear in mind that pollen is essentially spherical or cylindrical most of the time, meaning that any plane lower than it's widest point seen from above (the 'equatorial' of a sphere) will be unable to be 'stacked twice' - i.e. 1 above and 1 below the equatorial plane if you move past 'half of the object' in the Z axis. Of course in an opaque object such as many used in macro-stacks, there's no possibility of overlapping focused planes to ruin the stack....
John B

billbillt
Posts: 2895
Joined: Mon Nov 10, 2014 10:01 pm

Re: How not to do a focus stack!

#9 Post by billbillt » Thu Apr 28, 2016 7:00 am

Thanks John B. for the explanation!... It makes perfect sense to me.. It is easy to visualize with your description..

BillT

User avatar
gekko
Posts: 4701
Joined: Sun Oct 12, 2014 7:38 am
Location: Durham, NC, USA.

Re: How not to do a focus stack!

#10 Post by gekko » Thu Apr 28, 2016 11:43 am

John, many thanks for the additional comments and illustrations. I think that basically I was at first very discouraged with what I got with the pollen, but now, after all of your helpful tips and advice, and after accidentally seeing again a previous good stack of mine that I came across for an unrelated reason [ viewtopic.php?f=6&t=2766&p=23828#p23828 ] (proving that it is possible for me to do), I am encouraged to try focus stacks using what I learned and was reminded of here: (1) not to take images mindlessly by looking at the micron graduation of the fine focus knob (which is what I did here), but (2) take far fewer images at strategic focus planes where there are distinct features in focus, (3) make sure that the individual images are good in the first place, and (4, which I had remembered to do in the past but forgot in this case) in general, don't go below the middle (widest diameter) of the object.

Thank you all very much for taking the time and trouble to advise, explain, and illustrate!

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

Re: How not to do a focus stack!

#11 Post by mrsonchus » Thu Apr 28, 2016 1:21 pm

Go get 'em gekko! :D
John B

User avatar
rnabholz
Posts: 3086
Joined: Thu Jan 08, 2015 10:11 pm
Location: Iowa USA
Contact:

Re: How not to do a focus stack!

#12 Post by rnabholz » Thu Apr 28, 2016 1:27 pm

John,

This was very informative, you gave me a lot to think about and some ideas that I look forward to implementing.

Thanks for taking the time to share your experience.

Rod

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

Re: How not to do a focus stack!

#13 Post by mrsonchus » Thu Apr 28, 2016 1:39 pm

rnabholz wrote:John,

This was very informative, you gave me a lot to think about and some ideas that I look forward to implementing.

Thanks for taking the time to share your experience.

Rod
Have at 'em Rod! :D

Stacking is a fickle Diva I find - one day all goes well for me, another I produce embarrassingly-awful results! I suppose the trick is to try various ideas and see what works and when....
Great fun learning thought - and what a delight when a stack goes really well! :D
John B

User avatar
vasselle
Posts: 2763
Joined: Sat Oct 25, 2014 5:32 pm
Location: France

Re: How not to do a focus stack!

#14 Post by vasselle » Thu Apr 28, 2016 2:52 pm

Bonjour Gekko.
Si vous avez beaucoup de piles pour un stack il faut mieux faire plusieurs piles.
Exemple si vous avez 100 prise de vues pour un stack le mieux et de le diviser en 4 piles de 50 photos puis a la fin de ces 4 piles,reprendre ces piles et les traiter ensembles je trouve que le résultats est meilleurs avec cette méthode là.
Car sinon on obtient le trois quart du temps avec un empilage normal de mauvais résultats,surement trop de plan.
Cordialement seb
Microscope Leitz Laborlux k
Boitier EOS 1200D + EOS 1100D

JimT
Posts: 3247
Joined: Fri Oct 24, 2014 1:57 pm

Re: How not to do a focus stack!

#15 Post by JimT » Thu Apr 28, 2016 3:40 pm

Another trick I have used occasionally is to break the exposures into groups; two or sometimes three. I stack those separately and then stack the stacks. Doesn't always improve the result but sometimes it does.

Like John B. says, fun learning.

JimT

User avatar
gekko
Posts: 4701
Joined: Sun Oct 12, 2014 7:38 am
Location: Durham, NC, USA.

Re: How not to do a focus stack!

#16 Post by gekko » Thu Apr 28, 2016 4:53 pm

seb and JimT, many thanks for your suggestions. Actually, in addition to this time, seb had suggested this to me also previously, but I always forget to try it :oops: . Since this can be done after the fact, I don't even need to remember it during picture taking... Now I have a lot of excellent suggestions for next time. Many thanks to all.

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

Re: How not to do a focus stack!

#17 Post by mrsonchus » Thu Apr 28, 2016 5:40 pm

gekko wrote:seb and JimT, many thanks for your suggestions. Actually, in addition to this time, seb had suggested this to me also previously, but I always forget to try it :oops: . Since this can be done after the fact, I don't even need to remember it during picture taking... Now I have a lot of excellent suggestions for next time. Many thanks to all.
That's what I do gekko, I take the slices (images) and sometimes go back to them to apply any technique I come up with or read about, mostly I just put some images (slices) into Photoshop and 'play with them'!

The other night I tried the masking approach and the 'painting in' of other slice's layers - made an awful mess of it, but will try again when the fancy takes me. Always fun and always informative. :D
John B

User avatar
billben74
Posts: 1020
Joined: Sat Dec 26, 2015 10:33 pm
Location: Cambridge, UK

Re: How not to do a focus stack!

#18 Post by billben74 » Thu Apr 28, 2016 8:29 pm

Just say hi to eveyone and thanks, yet again to another really informative thread.
I've been a little busy of late.
But really nice to see everyone creating another of those informational gems.
Have nothing to add expect when you do stacks involving a lot of depth, insects etc. I do what
mrsonchus does except you have to take a lot of pics to do it.
I never tried the stacking into piles method and will give that a spin when I'm looking at such a subject.

Many thanks to everyone.

Microbeus
Posts: 9
Joined: Sun Jul 17, 2016 4:11 am

Re: How not to do a focus stack!

#19 Post by Microbeus » Sat Aug 13, 2016 4:17 am

barrel.jpg
barrel.jpg (78.15 KiB) Viewed 22128 times
alysium seedpods.jpg
alysium seedpods.jpg (52.84 KiB) Viewed 22128 times
I have done quite a bit of stacking, mostly with the stereomicroscope, the subjects either insects or small flowers.
I tend to work with 15 - 25 images to stack. , taking several below and above the object. When viewing the individual images I delete the ones that have no additional in- focus information. Almost all my images are taken in darkfield, ie with a completely black background. I found that this produces the best final result. It also gives an additional "depth" perception, and of course it often makes them look more attractive. Also with an even background like that it is easier to "rubber stamp" any arefacts away in photoshop. It often takes me a few goes to figure the optimum step size, to few and you get an unsharp patch where you don't want one. Lastly I usually leave parts of the image out of focus, again to enhance the feeling of depth.
Attachments
shiny flower seed.jpg
shiny flower seed.jpg (78.47 KiB) Viewed 22128 times

User avatar
gekko
Posts: 4701
Joined: Sun Oct 12, 2014 7:38 am
Location: Durham, NC, USA.

Re: How not to do a focus stack!

#20 Post by gekko » Sun Aug 14, 2016 2:02 pm

John B, billben, and Microbeus, many thanks for your comments.
Microbeus, thank you also for the very clear illustration of your point. Your images are far better than mine to begin with.

billbillt
Posts: 2895
Joined: Mon Nov 10, 2014 10:01 pm

Re: How not to do a focus stack!

#21 Post by billbillt » Tue Sep 13, 2016 4:37 pm

Hi Gekko,
I view your stacking photos as very good.. I have mixed results when I do it.. I don't use it enough to get very good at it... You are much better than I at this!!..

Best Regards,
BillT

manu de hanoi
Posts: 20
Joined: Wed May 02, 2018 2:04 pm

Re: How not to do a focus stack!

#22 Post by manu de hanoi » Wed May 02, 2018 3:40 pm

I havent succeeded stacking on regular 40x, I believe that's because the depth of focus is too thin for the software to process. I suggest you reduce the aperture of your objective to increase the depth of field

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

Re: How not to do a focus stack!

#23 Post by Hobbyst46 » Wed May 02, 2018 4:21 pm

@mrsonchus
An excellent demonstration of how to achieve the stacking goal with the just adequate amount of well-chosen data. Thanks!

Post Reply