# Focus-stacking experiment



## J.Albert1949 (Feb 3, 2018)

Nothing fancy here, just a quick experiment with "focus-stacking" to produce an image with a deeper depth-of-field.

I used a Canon 77d w/13-135 lens for the pics. Camera was in manual mode, exposures were 3 seconds @ F8. I used "live view" so I could use the back panel wherever I wanted the focus point to be, and the camera would focus and take the pic wherever I touched.

I used 7 or 8 exposures, choosing focus points from "closest" to "furthest".

I then combined the images using "Helicon Focus" on the Mac -- VERY easy to do, took only a few seconds for the software to isolate each "in focus" area of each pic, then combine them into a finished image.

I saved the image, and adjusted the colors a little with Picasa.

What you see below:
- "close" shot
- "midrange" shot
- "far" shot
- final combined image.
(Open and examine the final image full-sized)


----------



## Dennis461 (Jan 5, 2018)

Good job. I was getting ready to try this with a cab forward.


----------



## J.Albert1949 (Feb 3, 2018)

Here's another try:
(be sure to open full-sized)


----------



## Magic (Jan 28, 2014)

'49 the shot looks great but in order to evaluate it's improvement you need 
something to compare it with.

A well focused single layer photo would be good.
I'm no photographer, even a well focused single layer would be a challenge for me. :dunno:

Magic


----------



## wvgca (Jan 21, 2013)

for windows i use Picolay for image stacking, just once in a while though , not normally


----------



## J.Albert1949 (Feb 3, 2018)

Magic wrote:
_"A well focused single layer photo would be good.
I'm no photographer, even a well focused single layer would be a challenge for me"_

OK, here's another experiment.
For this exercise, I first took a "control photo" using the highest possible aperture -- 22.0.
I then took 6 shots at f9.5, using incremental focus "from front to back".
I then merged the 6 images.

I suggest you examine both images by right-clicking and opening them in a new window, then enlarge to maximum size.

Pay attention to the number and keystone logo on the locomotive, also on the two refrigerator cars in the background. Even the front of the truck parked at the feed mill.

Here is the "single shot" taken at f22.0:








Here is the merged image:








Which is more pleasing to the eye?


----------



## Magic (Jan 28, 2014)

To my untrained eye both are very good but the second is a sharper 
image throughout the entire scene. Sharper details even to the back drop.

Magic


----------



## J.Albert1949 (Feb 3, 2018)

Magic wrote:
_"the second is a sharper image throughout the entire scene. Sharper details even to the back drop."_

Yes, that was the point of taking several shots, with each shot focused at a different "distance from the camera", then merging them all into an image that combined the "most focused" portions of each shot.

The "backdrop" is just the old cellar wall that was plastered over and painted many years ago! Touch it and pieces flake and fall off!


----------



## mesenteria (Oct 29, 2015)

If you would be interested, I found with my old Powershot that using the macro for the first one or two exposures really helps the final rendering with close-up focus. Here's an example of how good it can get. The pilot and handrail in this photo were about 2 cm in front of the camera lens. I used CombineZP, a freeware stacking program, to do this shot: Seven images stacked in all


----------



## J.Albert1949 (Feb 3, 2018)

That's a superb photo, mesenteria.

Here's another focus-stacked image.
This one has 6 separate shots combined.

I believe that the app I used (Helicon focus) works best with the images "ordered" from front-to-back in terms of the focus point.

So this was a little trickier, because I had to select the 7617 for the first two shots, then the 8588 for a shot (the front was closer than the cab of the 7617, then back to the cab of the 7617, then two more towards the back of the 8588.

Again, choose to open the image in a new window, and then examine it full-sized (or download it, and open it with an image viewer for examination).


----------



## Dennis461 (Jan 5, 2018)

Thanks again for reminding me I was going to do this...
FYI, 7 pictures taken, Cab forward.
1st one, the cab was in focus, nothing else...
Using CombineZP, which makes some mistakes in the combination file. Takes a couple of tries re-shooting the initial shots with different focus points. Notice the extra connecting rod ends in the first set of drivers on the 2-8-8-2.


----------



## mesenteria (Oct 29, 2015)

I like to see success from people who grit their teeth and delve into these forms of depiction. Much of digital photography, and the effects and manipulation we do, is rather straightforward. On the other hand, some of it is darned tricky, as if we have to outwit our own 'help.'

This was the case with CombineZP, which I urge everyone to tackle at least once. I can talk you through it if you're interested. But, on topic, I found that CZP, and CZM before it, do much better, and have less of a perimeter of 'waste', if you take pains to orient the lens and detector as close to the same from shutter release-to-shutter release as possible. The more you fudge your aim, and the more grossly 'discrete' your focus shift from image-to-image, the worse the result will be.

What this means is that I got used to shooting strictly in manual so that I could control the depth of focus of each image, but that I also took pains to ensure the camera was restored to a jig of sorts before the timer tripped the shutter (oh yeah, you have to use a timer). So, I would go into macro mode, put the camera in a cradle of some kind, half press the shutter release to get the camera to focus, and then start the timer. I'd take up the camera, switch out of macro as appropriate, and then repeat, always using the timer, always restoring the counting-down camera to its cradle before the shutter released. This way, CZP would have minimal 'crud' to crop as it placed erroneous digital information at the edges of the photo, and you'd have a wider field of view to work with when the final focused rendering is finally released by the software, which in the case of CZP can take up to 2 minutes if you have a lot of images to integrate.

Keep it going, boys...


----------



## Patrick1544 (Apr 27, 2013)

This can be done also with a small aperture and slow ISO increasing the depth of field.


----------



## mesenteria (Oct 29, 2015)

True, but it's difficult to get a noise-free image in digital format, or it would require shooting RAW and then PP. Not a biggy if one is already at the computer doing PP...


----------



## J.Albert1949 (Feb 3, 2018)

Here's another picture I made this afternoon using the focus-stacking program.
This one has 8 images from closest to furthest combined into the final image.

It's actually easy to do, the software I used (Helicon Focus on the Mac) takes less than 10 seconds to "render" the image.

I then used Picasa to straighten it a little, then crop it, and then I used the "auto contrast" feature and then "added light" to the shadow areas.

Drag the top image to the desktop and then open it with Preview (Mac) or a graphics viewer in Windows and view full-size to see the details. You can't really see them with the image scaled down to fit into the window of this posting.

There's no way this could have been achieved by "stopping down", because the depth-of-field will be too narrow, even at smaller apertures.

Granted, there are some kinds of photos where one -wants- "bokeh" (such as portraits), but in a model pic like this, the more details that are sharp and clear, the better.


----------

