August 27, 2022

Focus stacking cheat sheet

This is intended to be my shortest and most succinct set of instructions (for myself) about how to take focus stacking photos. I add things after I make stupid mistakes and forget things.

The first rule is Read this sheet -- every word. Because it is brief, everything is important. If you ignore this advice you will miss something important, be upset and angry and probably just be wasting time because you have to start all over.

A quick note up front about the BBB focus controller. Be sure to do a shutdown and don't just turn of the power when you are done. Use "putty focus", login and give the shutdown command.

Connect cables and turn everything on. This may be as easy as plugging in the power strip.

Set up specimen, diffusors, lighting, etc.

New steps for the R5

Get EOS utility and the R5 camera talking. Launch EOS utility. Turn on the camera, press menu, go to the wifi-1 menu and select the top entry. Click "set" until it declares that it is looking for the wifi. When it finds "GILA" click that and the magic should happen.

I have not yet worked out how to use lightroom for tethered shooting with the R5 connected via Wifi. It may be easy, it may be impossible. So I just let the EOS utility capture the images and I tell it to put them at P:/lightroom/2023/2023_tether. It will create its own directory under this, which is unfortunate, but I just move the images later.

The following gives one fellows method for Wifi shooting with Lightroom. Lightroom doesn't directly support it, but lightroom does have a thing called "auto import". He also does not use the EOS Utility, but rather uses qDslrDashboard. Note that qDslrDashboard runs on Linux.

Old steps prior to the R5

Start lightroom, start tethered shooting, (Use: File -- tethered capture -- start tethered capture). Click "live" button to get live view. (This works on my Canon 1D, even though it is not on the supported list). Be sure the session name is 2023_tether, the starting image number is 1, and the location to save is "lightroom/2023".

On with the show

Do some test exposures (use the shutter button on camera) and get the exposure setting set up right. With the R5, you don't have to shut down live view to take an exposure and the shutter button on the EOS gui works. Aperture (only for the MPE-65) should be set wide open to minimize diffraction, at least for 4x and 5x magnification. Check white balance at this stage also.

Use lightroom to (or somehow) delete any test exposures (use Ctrl-A and then remove them all).

Launch Chrome. Start the focus GUI in a browser window on http://192.168.0.31:1776. (Or just use the following link).

The BBB now starts the required server on boot. You no longer need to login and start things up.

Set top and bottom for focus stack with the aid of live view.
The stage has positive numbers with the camera in higher positions.

Be sure that both top and bottom are set, just moving to the desired position and admiring it does not set either of these.

Set the step size by typing into the entry field next to the "Go" button and hitting return. Ensure that the step size gets copied and displayed to the left of the entry.

Click the "Go" button. The stage will move to the bottom position (the lowest) and start the stack. The shutter should begin clicking and images should pile up in the directory "lightroom/2022/2022_tether".

When it is done, move all the images back to the 2023_tether directory and delete the directory EOS utility created. I do these steps on Linux. Now launch lightroom, find the images and import them. Use Ctrl-A to select all the images and export them as TIFF with no resizing, no renaming, no sharpening.

Interestingly, lightroom at first shows me a full size image preview, then crops it to 1:1 when it does the import. This along with the fact that the raw files are not any smaller makes me think that there is nothing gained about selecting the 1:1 crop in the camera.

The actual stacking

For this, I move to my Linux machine with a big monitor. Doing the stacking and editing on my Linux machine allows me (in theory) to be taking stacks with my Windows machine while processing the stack on Linux -- but so far I have yet to do that.

Start Zerene. I do this on my linux machine and just type "zerene" at the command line.

You can drop all the images into it (if you are on Windows). Better yet, use File -- Add files. On my linux machine the files will be at:

/u1/Camera/lightroom/2023/2023_tether

Using "Add files", navigate to the above directory, use Ctrl-A to select them all, then click the "Open button". I have some old notes that say that Ctrl-A does not work, but as of 2023 it seems to work fine. Zerene may complain about files it cannot deal with, but it just ignores them.

Use Stack - align & stack all Pmax (until I learn better). This takes 2 minutes for about 100 images (10 mpx images) on my current computer. I hear my processor fan crank up. Zerene beeps when it is done.

When Zerene is done, use File -- Save output image. Do not use "save project". I save to "lightroom/2022/2022_minerals" directly from Zerene.

Now I have to tell lightroom to import that image. There may be a better way, but for now I use "import", navigate to "P:lightroom/2022/2022_minerals", do an "uncheck all", then check on the single new image, and then do the import.

Now I edit the image. Don't forget to sharpen it!

After this, I clean up -- I use lightroom to delete the DNG files from the tethered capture, and windows file explorer to get rid of the exported TIF images so I am ready for next time.


Feedback? Questions? Drop me a line!

Tom's Computer Info / tom@mmto.org