Identification, Images, & Information
For Insects, Spiders & Their Kin
For the United States & Canada

Stacking images

Harvard and other schools are compiling insect photo databases in which each image is actually a composite of several shots that are combined to include only the bug parts that are in focus, sort of like a contour map without the lines. I can often get great detail in my highly magnified shots, but only at a certain elevation of the bug: sharp mandibles but fuzzy antennae and legs, etc.

Has anyone tried this type of photo stacking? What is involved?

A tool I only recently found out about
and ordered online is the StackShot programmable electronic focusing rail that can advance your camera in steps ranging from .01mm to 100mm with a pause time established by you between steps. I am anxious to mess around with it and gain a good working familiarity for purpose of automating the process of taking stackable images. Price was $525 plus $45 for a Canon D series shutter cable connection.

I have been using stackshot
for about a year now, and besides the MPE-65 Canon lens, its the most useful piece of equipment I have purchased. Works flawlessly.

And a question:
Although designed to advance the camera, an alternative method that would eliminate a lot of camera shake is to use StackShot to advance the subject toward a stationary camera. Have you tried using yours like this?

I use the system for moving my specimen stage, not the camera, as seen in my image here:

Great to hear, Guy.
I find the 65mm macro lens at 5x really needs a montage system, even for minute specimens. I bought a 10x microscope objective and adapters that will be worthless without stacking. It will be awhile before I get a chance to play around with it.

Speaking of which, a biological microscope essentially has a built-in focussing rail for stacking. All manual, but not difficult to manage.

I used an old broken microscope
for that exact purpose for several years, but I found that having to stand there running it was taking too much time on the hundreds upon hundreds of SA type specimens I have been doing. so the cost was well worth it!

I had considered going that route before finding out about this device. Also had pretty much decided to try making my own with a fine-thread machine screw to advance the subject toward the camera for a succession of stackable shots as at least one very talented microphotographer has done. It would have been fun but now I can move on to better types of fun :-)

focussing steps
As I mentioned below, I've used this seat-of-the-pants method to make focus stacks with a Nikon stereomicroscope. It's certainly not ideal, but if that's the equipment you have...

For people that have Photoshop 5, 5.5 or 6 for some other reason, it has focus stacking built in.

I'll take that ol' "if it's all you have" Nikon stereomicroscope off your hands. ;-)

Not mine, but the same model

Auction's ended
with winning bid (buy-it-now price) of $100. I put in a lower bid, which was stupid because I couldn't watch the auction closely. I should have gone straight to the buy-it-now price.

Nikon Stereomicroscope
It's still an excellent stereomicroscope. But for photography, it's sketchy. The only camera I can really use with it is a Nikon Coolpix 995. Others I've tried require way too much zoom to fill a frame.

There are attachment devices with custom lenses, but they are almost as expensive as a camera.

I have PhotoShop 6 but was unaware it had stacking. Under what menu is it located? What is the function named in PS?

First a correction: I wrote Photoshop 5, 5.5 and 6. I meant Photoshop CS 5, 5.5 and 6.
The feature is under File > Automate > Photomerge. I haven't used it much. I also haven't compared it with Helicon Focus, which isn't supported in Lion, last time I checked.

Interestingly, this kind of software originated with the Mars Rovers, and really isn't that much different from slicing and pasting. The latest Photoshops have some excellent edge blending algorithms.
I'd love to see digital cameras with a focus-bracketing feature, perhaps with multiple steps for closeups.

Helicon is supported in Lion
with their newest upgrade. When I purchased it I bought the pro version, which includes all future upgrades, so I contacted them when I updated to Lion, and they immediately send me the links and registrations to the new version. It is a bit different in that it has two different stacking processes, and its a bit more fussy with lighting, but I have had perfect luck with it...Now if Adobe could get older versions of Illustrator to print in Lion, My world would be in perfect balance!

Re "focus-bracketing feature," Tim Moyer is using one.
Actually it's a software hack but it works for his Canon:

I understand some folks are working on versions for Canon D series but can't say if one is available yet.

Re PhotoShopCS, apparently CS stands for Creative Suite and this is supposed to be better than the "old" PhotoShop?

Photoshop CS
For several years, Adobe has called groups of software sold at a relative discount "creative suite." Each time a major version comes out they change which software is in which suite. Now they also have a yearly subscription that allows you to download all the Adobe software.
The Photoshop in CS 6 is Photoshop version 13. Photoshop also comes in a plain and an extended version. The extended version has more 3D capability.

Generally the creative suites pay off if you need a third major piece of the pie. Also there are deep discounts for qualified education users, generally about the same price as an upgrade.

Not that I'm advertising Creative Suite per se. Photoshop got some excellent improvements. Dreamweaver not so much.

Someday I'd like to move that direction.... maybe when I'm retired.


Image Stacking
What you are talking about is image stacking, not stitching. There are many applications available for this (Google "Image Stacking Software") - many for under $30. Most also offer HDR features and great extras for dark / evening shots.


I think I agree with you, Rick.
I first heard of this in reference that said it could be done using an image stitcher. I never saw the logical connection between hooking up shots into a panorama image and cherry-picking in-focus areas of several photos to create one image.

I'm making a change in the heading and text to reflect your comment here.

I've found that CombineZ5 works much better than Helicon Focus. You can download CombineZ5 for free from

There's a good explanation of usage at along with some handy Photoshop actions.

Here are some examples:

Agree with Tony
All you have to do is take multiple shots of the subject as long as the subject or you remains still. Then you basically layer these images in your favorite image app and erase the out-of-focus parts of the subject, do a little clean up and blending, merge all your layers and voila!

Paul "BugMan" McNelis - My Insect Macro Photography Portfolio - The Community that brings Insects into Focus

Photo montage
NDSU Fargo uses a system called photo-montage that takes several digital images throughout the insect plane, then automatically mashes them together into one image. The system is expensive, and as far as I know not portable, so it is only good for collected specimen imaging. I've had decent luck in combining two or three images into one in photoshop, but have had better results using the unsharp mask filter to clean up images of beetles in the wild.

Evidently, some freeware/shareware versions of AutoMontage are now available, see here. AutoMontage also now has a stripped down version available.

Helicon Focus, stack editing
Anyone who has a need to do this type of stuff often should seriously check out Helicon Focus. Within configurable limits it will automatically resize and balance the exposure of each image to help them match.

Beware that the Photoshop methods described by Professor Hart are really not well-suited to editing photographs. Selecting actual pixels and moving them to new layers to be recombined is a good way to end up with something that looks like a jigsaw puzzle. It'll look good from far away, but get up close and you can see each individual piece. Same goes for the halo touch-up work, where it's recommended to clone pixels from one image or layer directly onto another one.

In both examples it is far better (and totally non-destructive!) to assemble multiple layers and use masks cover or reveal parts of the image from lower layers.

For selecting the sharp parts of an image to use in your mask: create a duplicate layer (Ctrl+J), go to menu Filter|Stylize|Find Edges, desaturate (Shift+Ctrl+U), menu Select|Color, select black with fuzziness 200, delete your duplicate layer, menu Layer|Add Layer Mask|Reveal Selection (or just click the Add layer mask icon in the layers palette). Even THAT is too much work for me, so just do it once and record it as an Action. Now, if you need to hide or reveal a larger sharpness area, just adjust the levels of the mask.

Jay Barnes

Helicon vs Combine ZM
Now that we're 5 years later than your post, are you still voting for Helicon Focus vs Combine ZM? I'm using Combine ZM, but I'm seeing mixed reviews on which is better for, for example, 2mm LRB's (little round beetles). Compared to the price of the MP-E65, twin light flash, and Canon 50D, Helicon's price wouldn't be significant - if it's a lot better than Combine ZM.

Anyone else weighing in on Helicon over Combine ZM?

my experiences
I can't recall if it was Combine ZM that I tried briefly a while back (1-2 years), but I've been using Helicon Pro for sometime now and am still pleased with the job it does with only 1 click. I usually use Method B; my images are from the microscope and generally have a light background. Transparency sometimes seems to cause a bit of trouble, but usually if I have problems it's because I've mixed my stacks (two different setups) or the specimen has moved too much (sand helps).

My current process looks something like this:

1) Camera shots (CR2 images)
2) Balance exposure, contrast, etc. using Canon software
and batch export as 8-bit uncompressed TIF at 50%.
3) Run Helicon Pro with Method B (throw out
any poor or unneeded image layers)
4) Save result as TIF
5) Post-process in Photoshop (if necessary)
a) remove blue/purple fringing as needed
b) "shadows/highlights" processing as needed
c) cropping, composition
d) cleanup dust, dirt, light artefacts
e) scale down
f) unsharpmasking
g) save (still as TIF)
6) Do any last minor tweaks and adjustments in Picasa
(my image management program) and save (as JPEG)
7) Export for BG as needed (scale and resharpen as needed)

Here's a quick example:

Must have had a dozen or so image layers -- sounds tedious, but once you are comfortable with the stacking process, it all goes very quickly.

Image Stacking
I have used Combine ZM (CZM)to stack bug photos for 2.1 years. I have a dedicated "rig" in the basement for stacked bug photography. Since CZM uses JPG files, I photograph the insects using the highest JPG resolution and sharpness that my Pentax *ist DSLR body will allow.
Initially I processed the stacks using the default "do stack" macro in CZM. The results were mixed. When the background was distant, I often got fringing around the crisply focused wings, legs etc.

I did some experiments with the settings in CZM (the CZM help described setting modifications that might work better in certain situations) and found a "formula" that worked much better. The fringing was substantially reduced, image clarity remained very good. I have been using those settings for the past 6 months or so.

I have designed/constructed lighting for bug illumination that is helpful with shiny beetles. Also I have constructed an actuator/controller that translates the bug (dead unfortunately, but usually necessicary for the stacked process) and triggers the shutter to help automate the stacking process. This works well for tiny critters such as pseudo-scorpions etc.

Most if not all of the images I have posted on BugGuide are stacked.

Let us see a picture of your motion set-up sometime when you get a chance. My stacked images are produced with the microscope, so the specimen is stationary and everything else (except platen and lighting) moves.

My photo stacking rig...
This is a link to a youtube video of my bug actuator in action.
The actuator uses guide rails salvaged from a broken CD ROM drive and an inexpensive stepper motor I purchased on e-bay. I move the bug and keep the relatively heavy camera stationary. I made the controller using a programmable microcontroller chip and some pots, switches and connectors I purchased at RadioShack. Getting the controller going was a 4 month project. I had to refresh my C programming skills which had not been dusted off for 12 years. This was an excellent melding of my bug photography and electronics tinkering hobbies. My wife accuses me of wanting to build an electron microscope in the basement. Prior to building the actuator I moved the camera (mounted to a small x-y machining table) but it was fatiguing to accurately shift the camera a few thousandths of an inch, take a photo, shift take a photo etc. Particularly when the subject is “thick” and the stack can be 30-50 frames deep.
I have since constructed a second actuator that uses the same controller. The second generator actuator uses a stepper motor purchased directly from the manufacturer. It moves in smaller steps and allows the use of microscope lenses. The smallest travel increment that I can make with the first actuator is .001”. With the second actuator about 18 steps are required to travel .001”.
As you may be able to see in the video, I use a DSLR with extension tubes, (currently 4 sets of tubes). I have a PENTAX 50mm macro lens. I often use a 7X triplet loupe that is glued to a drilled out lens cap in front of the 50mm lens. That allows me to get in quite close to my subjects. A photo I took a few days ago of the eyeball of a moth substantially filled the frame. If I want to get even closer I have an inexpensive microscope lens that replaces the 50mm. Unfortunately that lens has poor color correction so a higher quality microscope lens is on my wish list.
There are commercially available actuator/controller packages (Cognisys Inc.) for photo stacking. The adds suggest some degree of portability which would be a big advantage. Currently, I am pleased with the results using my actuator/controller rig and don’t plan to replace it.

Tiff vs Jpg
Great work flow sequence. Although I'm using Combine ZM (and pondering the thought of Helicon Focus), I also shoot in RAW and then utilize the camera software (Canon) to prepare for stacking. Combine ZM does not support RAW, so I sharpen each RAW "slice" by the same amount, and then convert each to *.jpg. So, at this stage, do you believe there's an advantage to the more lossless *.tiff? Are you thinking that all of these little compromises will add up in the stack, so you use *.tiff? Helicon Focus must not support RAW, either, or it could be "RAW all the way," until the submission to BG. For some reason, I'm thinking my finished result is better if I sharpen each image a bit, rather than waiting for the end to sharpen.

Helicon Focus
I've used Helicon Focus a bit and find it both excellent and easy to use. Well worth the cost.
I've even gotten some good results from sequential exposures in the field, though that's really hit and miss.
Normally, I just focus my ancient Nikon dissecting scope a tiny fraction at a time, photographing with a Nikon Coolpix 995 mounted on one eyepiece.

I think any normal focussing method is going to change the geometry of the sequential shots. I think Helicon Focus may compensate somewhat for this, though you can occasionally see problems in the resulting image.
Maybe specialized lenses could avoid this problem.

Helicon focus
I started using the Helicon Focus software this past week, and it has produced some fantastic results on some micro fossil mammal jaws that a colleague of mine is working on, I am going to take some images this week of small cerambycids and post some of the results on here. I think its well worth the 100 or so dollars they are charging.

Sample results
I've used Helicon focus to create several stitched images of beetles, but waited till I had a beetle larger than pinhead size to make a multi-layer image for show & tell. Following are thumbnails of the images that went into making up the final image of a water beetle from the bed of the Rio Grande in Las Cruces, New Mexico.

And here is the final composite photo. It was not a perfect job due to slight movement of camera on final two images that led to a margin around the beetle that I had to clean up with the clone-stamping tool in PhotoShop. Absolute steadiness of camera and subject are necessary.

Time's up!
I had placed the photos in Frass, and they have expired.

Nice work!
Nice work Jim.

True camera alignment is a real pain but could probably save an hour in Photoshop if done properly. That's only speculation, as I have yet to do it properly. :-)

I did this one with either 4 or 5 stacked frames at 5:1, shot at f/4:

It wasn't enough frames, aperture was too small (softer image), and if you look close you can see some rotation artifacts. Since the widest part of the palp was .27mm I really have zero room for error. It was actually good enough for positive ID on this one, but I have other specimens that aren't as "easy".

Do you know of any good focusing rails that take Arca-Swiss plates and collared lenses? RRS makes a sweet rail, but it requires a gigantic add-on to accept collared lenses.

Jay Barnes

You're way ahead of me Jay. I've thought about focusing rails but have not investigated.

What I've been doing is cranking my camera up and down on my flimsy tripod, and I get some position changes as a result. (I understand this program does make small re-alignments.)

I made a heavy plexiglass closeup shooting table that clamps securely onto the shaft housing of my tripod. It has two undercut-beveled plexi strips glued down with superglue that serve as guides for the actual shooting surface -- a wider strip of beveled plexi with a ruler double-stick-taped onto it, and I line my small-fry insects up along the ruler.

My camera is pointed at right angles to this ruler so I can nudge the shooting surface along and the subjects pass directly under the center of the lens. This has aleady saved me hours of trying to position bugs under the lens.

After a couple carless bumps of the setup that sent insects scattering, I've recently taken to placing the smallfry on a sticky strip cut off a colored PostIt. They stay put better, but at a cost of greater likelihood of antenna and leg loss or other damage due to the glue.

I do not have an ideal illumination setup. I'm using two stacked circline flourescent bulbs that are elevated on small plexi rectangles glued to my plexi shooting table, It might be better to use my ring flash, with maybe a reflecting ring made from a large yogurt container or something. However, my homemade closeup lens would need to be modified so the ring flash could be secured to the end of it. My lens was salvaged from a junked photocopier and taped with packing tape onto a haze filter so it can be threaded into my official Canon 1.5x so-called closeup lens. At some point I suppose I'll invest in a real closeup lens that can accept threaded fittings, adapters, ring flash, etc.

A focusing approach I plan to try today is to run my focus out to infinity, drop my f-stop to wide bore (for greater clarity. I've been shooting everything at f-8.), and crank the tripod down to a sharp image on the shooting surface. Then I'll sequence my shots by backing my focus down from infinity one click each shot. I have an idea that might result in less camera motion. I'll report back.

I'll be looking for them.
And thanks for the recommendation. You're right, 100 bucks is nothing if it'll do the job. However, I'm opting for the one-year license at $29.95.

Thanks Guy.
The Fargo system is out of my league for now.

I use the sharpen filters quite a bit myself. And the clone stamp to get rid of any identifiable maculae -- and dirt of course ;-)

I wonder if someone makes a camera that allows bracket photos that vary in focus instead of exposure. And maybe you could select the degree of change between shots -- say 0.5 millimeters variation over 5 or 7 shots. That way a rapid sequence of stitchable images could be made of a live insect if it held perfectly still for an instant.

There is an article in Outdoor Photographer July 2005. It's all about flowers and making macro panaramas, but I'm sure it would apply to what you want as well.

Thank you Lynette.
Seems like a trip to the library and/or bookstore is in order.

Tony has

Hey Jim,

I use Photoshop quite regularly to compensate for the shallow depth of field in subjects shot at odd angles. (without a tripod, I can't always get a clean shot with the aperture more open, which would solve this).

Photoshop takes some getting used to, so you are gonna have to play around with it. In short, I use one image, with the majority of the subject in focus, as my main image. I then cut and paste parts that are in focus from other shots (In this case, the face of the spider).

I paste this to its own layer and align it on top of the background by bringing the opacity down so it becomes more transparent.

I use the eraser tool to feather out the edges and remove the excess, bring the opacity back up, and repeat if there are other patches I want to add.

It sounds confusing, but once you get the hang of it, it goes pretty quick. Here are some other examples where more than one photo was used:

Thanks Tony
I'll try the cut & paste method in PhotoShop.

The PhotoShop Method
I used PhotoShop to merge areas of two photos to make this shot:

Nice work
When I click on this image and look at the two other shots of your beetle I can clearly see the difference your merge makes.