Mineral photography - image stacking

A big issue when doing extreme closeup photography is limited depth of field. In some cases this is a nice effect (many great photos emphasize some central item of interest by throwing everything else out of focus). A solution for times where extensive depth of field is desired is to stack a sequence of digital images taken with various focus settings. This requires computer software to do the work, and there are a number of choices.

When taking a series of images for image stacking, note that you do not want to refocus the lens between shots, but instead change the camera to subject distance using a focusing rail or some equivalent scheme. Refocusing the lens will change perspective as well as focus, which is not what you want. You want to move the focus plane through the subject and change nothing else.

Use GIMP or Photoshop

As of CS4, Photoshop has included focus stacking abilites. It was improved in updates to CS4, and is reportedly improved yet again in CS5.

Here is what I am told you need to do:

  1. In bridge, select all the images you want to stack.
  2. Create one file with each image a separate layer, keeping them in order. This can be done in one step in bridge via Tools -> Photoshop -> Load files into photoshop layers.
  3. Select all the layers (Select->All Layers).
  4. Go to Edit->Auto align layers.
  5. Go to Edit->Auto blend layers.
  6. select the "stacking" button.
  7. Crop off any funky edge areas.

My buddy John says that he tried it and thought it did a terrible job. He now uses Zerene Stacker.

Use GIMP

The big plus with regard to the gimp is it is free. The big negative is that it is the most poorly designed and hard to use program on the planet.

The little birdies have told me that the GIMP can do focus stacking via: Filters->Combine->Depth Merge

I no information about how good the results are.

CombineZ

The original version of Combine Z was CombineZ5 This source code is still available, but has not been developed since 2006.

Next (from 2006 to 2008) came CombineZM.

CombineZP is the current work by the author (Alan Hadley), and it boldly is open source (under the GPL)!
The source can be downloaded from Alan Hadleys site as combine.zip. I also stashed my own copies of his source (as of 8-26-2011) here:

CombineZ runs only on windows, so a Mac (or Linux user like me) is out in the cold.

People have set up CombineZM to run under Wine in linux. See this thread that describes how a fellow did it. There were some unexpected issues, such as using winetricks to install Microsoft Visual C++ 2003 libraries:

mkdir ~/.wine/drive_c/Program Files/CombineZM.
Download CombineZ-m.exe and fftw3.dll from CombineZM’s websit and put them in the folder.
wget http://www.kegel.com/wine/winetricks
chmod +x winetricks
sudo mv winetricks /usr/local/bin
winetricks vcrun2003
wine ~/.wine/drive_c/Program\ Files/CombineZM/CombineZ-m.exe

Combine Z was written in C++ (for the windows platform -- visual studio C++). I briefly contemplated the idea of porting CombineZ to linux, but this would be no small task. The visual studio CPP environment almost seems to be engineered to make porting difficult. For details, click this Windows Software Porting link.

Helicon Focus

Check the HeliconSoft website.

My friend Joe has used this with satisfaction for some time, but is now thinking of switching to Zerene Pro because he is purchasing the Stackshot rail system.

Zerene Stacker

Essentially everyone I know now runs Zerene. This includes Joe, Jerry, and John. As needed, several of these have needed to contact the author, who they describe as interested, responsive, and helpful.

Check the Zerene systems website. The "Personal Edition" costs $89 USD and runs on Windows, OsX, and Linux, which ain't bad. The "Professional Edition" costs $289, and is really the same thing, but with fewer restrictions with what you do with the output.

There seems to be one exception to all this, and that is support within Zerene for the stackshot rail, you have to buy the professional edition to get the rail support. The stackshot is a product from Cognisys Inc and as of September, 2011 was selling for about $600 (this is the rail, motor, and controller). So, by the time you buy the rail and the pro edition of Zerene, you have spent nearly $1000. Note that the stackshot mounts the camera using an Arca clamp (or can), which is nice.

Zerene is written by Rik Littlefield (editor/administrator of Photomacrography.net)

What I like is that they support linux users like myself, but it is not clear if that support will continue to include the StackShot.

Others

Here is a link to a Wikipedia article on focus stacking that mentions quit a list of packages.

Here are some packages that I have taken a look at:

Note that although TuFuse is free, it is NOT open source, and apparently only runs on windows, so that ends my interest in it. It has a related front end package "PTAssembler".

There is also EnBlend-EnFuse, which does both HDR, panorama stitching, and focus stacking (sounds great!).

Theory

The TuFuse website references a 2007 paper by Mertens, Kautz and Van Reeth which is worth looking at, along with some other papers:

So, which software is the best?

All of the "big 3" packages yield impressive results. There was a forum thread on mindat from late 2010 entitled Best of Mindat micro photos. Of the photos chosen, 18 photos (all from different photographers) indicated which stacking software was used. The breakdown was as follows: Bear in mind these were "award winning photos" by accomplished micro mineral photographers.

Hardware to aid stacking

Saphicon is sophisticated and expensive.
Stackshot is more affordable; their package is $525 which includes the rail, controller, power supply, and cables.
Feedback? Questions?
Drop me a line!

Tom's Mineralogy Info / tom@mmto.org