Pages: [1]   Go Down

Author Topic: Focus stacking example  (Read 13810 times)

bill t.

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 3011
    • http://www.unit16.net
Focus stacking example
« on: February 14, 2012, 11:50:20 pm »

There's been some talk about tilt-shift lenses and focus stacking recently, so I thought I would post this example of Helicon focus stacking.

The image was made with a 5d2, it's part of a much bigger stitched pano.  5 focus planes, 85mm lens, f11.  Most of the picture was pulled up a lot with "Fill Light" which introduced quite a bit of noise and some artifacts at the skyline.  Not much sharpening.  For the most part this is a fairly typical result.  It was pretty windy and you can see a few problems from that here and there, although I did a pretty good job shooting between breezes.  The 5 planes are close to minimal for this level of result.  Optimal would probably have been about 7 planes, grouped more tightly in the foreground than the background.  This example is maybe a little focus starved around the 5 meter distance.

If you view this image in PS at 50%, that's close to a 30" high print.  At 100% that would be 60".  I haven't pushed the sharpening very far, but even so this image holds together very credibly at the 30" size which is roughly 190 camera_pixels per inch_of_print.

I suspect this particular image might have not worked quite as well with a tilt-shift lens, since for instance I probably could not have kept the cactus in the depression at the lower right in crisp focus without compromises elsewhere.

20 megabytes of nuthin' but deep focus.
Logged

Mark D Segal

  • Contributor
  • Sr. Member
  • *
  • Offline Offline
  • Posts: 12512
    • http://www.markdsegal.com
Re: Focus stacking example
« Reply #1 on: February 15, 2012, 12:26:44 am »

Good job. Thanks for sharing.
Logged
Mark D Segal (formerly MarkDS)
Author: "Scanning Workflows with SilverFast 8....."

Alan Smallbone

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 788
    • APS Photography
Re: Focus stacking example
« Reply #2 on: February 15, 2012, 09:49:08 am »


A couple of questions, since I have been thinking of trying some focus stacking. Say your pano was 5 panels in width, for example, so you would take the first 5 panels of the pano and then rotate back to the starting position and then adjust the focus and then shoot the 5 panels, etc. Or are you taking the first panel in the different focus planes and then move on to the next panel? What criteria made you decided on 5 focus points and may ask why 7 would be better and at what point do you see diminishing returns on focus planes? Do you do the focus positions manually or are you automating it with something like the Promote Controller? I would suspect that with a number of panels and a number of focus positions that the light might change significantly during the shoot, depending on the time of day.

Sorry for the amount of questions but I am curious, thanks for you patience.  :)

Alan
Logged
Alan Smallbone
Orange County, CA

Bart_van_der_Wolf

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 8914
Re: Focus stacking example
« Reply #3 on: February 15, 2012, 11:01:09 am »

A couple of questions, since I have been thinking of trying some focus stacking. Say your pano was 5 panels in width, for example, so you would take the first 5 panels of the pano and then rotate back to the starting position and then adjust the focus and then shoot the 5 panels, etc.

Hi Alan,

Yes, that is ithe easiest manual workflow with the least amount of risk for errors or discontinuous focus planes. It helps in such a pano scenario if you use a click stop rotating device which allows to reposition at a given angle interval. So focus once for each row, refocus for the next row, if your scene looks similar to Bill's example.

Quote
Or are you taking the first panel in the different focus planes and then move on to the next panel?

That shooting scenario works best when there are occlusions in some of the images, but focus stacking of partially occluded subjects may cause some difficulties. That's when the focus layer retouching capabilities of Helicon Focus Pro or Zerene stacker pay off.

Quote
What criteria made you decided on 5 focus points and may ask why 7 would be better and at what point do you see diminishing returns on focus planes?

Just do the math in advance, calculating the DOF zones so they meet or slightly overlap. Use the correct COC value for pixel perfect DOF resolution, i.e. a maximum of 1.5x - 2x the sensel pitch or larger for diffraction limited narrower apertures. If your camera offers Live View with DOF preview, you may be succesful in guessing the next zone based on what you see.

Especially for longer focal lengths, you may be able to use Auto-Focus, which means you need to figure out how many degrees Pitch (or row overlap) the next row requires for correct DOF overlap.

Quote
Do you do the focus positions manually or are you automating it with something like the Promote Controller? I would suspect that with a number of panels and a number of focus positions that the light might change significantly during the shoot, depending on the time of day.

There is not a single shooting scenario that works best for all situations, so it's up to the photographer to figure out which is the most efficient, especially when it involves different slopes in the terrain and or changing light conditions due to clouds or near dusk/dawn. A companion program that comes with Helicon Focus Pro, called Helicon Remote, allows to automate the sequence of focusing at a given focus interval. For that you need to take a laptop to run the software and drive the lens' focus. There are also iPhone and Android tablet Apps (amongst others Helicon Remote, currently in Beta) available for a few cameras to do the repetitive work.

Cheers,
Bart
Logged
== If you do what you did, you'll get what you got. ==

Alan Smallbone

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 788
    • APS Photography
Re: Focus stacking example
« Reply #4 on: February 15, 2012, 02:19:13 pm »

Bart,

Thanks for the detailed reply, much appreciated.

Alan
Logged
Alan Smallbone
Orange County, CA

Hening Bettermann

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 945
    • landshape.net
Re: Focus stacking example
« Reply #5 on: February 15, 2012, 06:23:16 pm »

Bart,

> Just do the math in advance, calculating the DOF zones so they meet or slightly overlap. Use the correct COC value for pixel perfect DOF resolution, i.e. a maximum of 1.5x - 2x the sensel pitch or larger for diffraction limited narrower apertures.

Uff! How would you do this calculation? How would sensel pitch translate to say the mm scale I have glued around my lenses, covering the original meter scale? I have so far just looked at the focus difference on this scale, then divided it up in a number of shots that seemed reasonable, typically at around 2-5 mm distance between slices.

Bart_van_der_Wolf

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 8914
Re: Focus stacking example
« Reply #6 on: February 15, 2012, 07:58:49 pm »

Bart,

> Just do the math in advance, calculating the DOF zones so they meet or slightly overlap. Use the correct COC value for pixel perfect DOF resolution, i.e. a maximum of 1.5x - 2x the sensel pitch or larger for diffraction limited narrower apertures.

Uff! How would you do this calculation? How would sensel pitch translate to say the mm scale I have glued around my lenses, covering the original meter scale?

Hi Hening,

It depends on the shooting scenario, e.g. interior or landscape. Let's assume landscape.
I could use a DOF calculator for a given focal length (e.g. 50mm), and aperture (e.g. f/7.1), and a COC (e.g. 1.5 x 6.4 micron = 9.6 micron. The calculator gives a hyperfocal distance of 36.73m and thus a front of the DOF zone at half that distance 18.36m. Next you try and find a focus distance with the rear of the DOF zone at 18.36m, which is at 12.25m focus distance with a front of the DOF zone at 9.19m (half of the previous zone's front). Next we find 7.36m focus distance, with a front of the DOF zone at 6.14m. Next 5.27m focus distance with, a front of DOF at 4.61m. And so on.

So we would get a range of settings like 36.73m, 12.25m, 7.36m, 5.27m, etc., etc, which we could put in a (laminated) note and re-use that when in the field. How to transfer those distances to the focusing mechanism of our lens, depends on the lens and if we can put marks on it (perhaps a strip of gaffer tape).

One could use a laser distance meter, focus at the laser spot, and mark the tape. Maybe there is a relationship with one of the DOF marks on the lens.

Cheers,
Bart
Logged
== If you do what you did, you'll get what you got. ==

bill t.

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 3011
    • http://www.unit16.net
Re: Focus stacking example
« Reply #7 on: February 15, 2012, 08:41:36 pm »

Using Photoshop, create a scale as shown.

Attach the scale to a part of the lens away from the normal marks, but where you can still see it.

Set the camera up on a tripod in a place with lots of fine texture, as in a field with grass receding from nearby to the far distance.  Dried grass is suggested.

Indexing through the exact marks, shoot exposures over a range of focuses from very near to at least infinity.  Make careful notes about what image file goes with what mark.

Back at the computer, line up the exposures like little ducks in something like Lightroom.  Eyeball subsets from your complete set of exposures that seem to have reasonable overlap.

Send these test subsets to Helicon, and revue the results.

When you have a good subset stack in Helicon that holds focus from nearby to way over yonder, make note of which "marks" correspond to the hero file names.

Now install a clean piece of tape at a place you can easily see on the lens, like near the focus index.

One at a time, line up the focus ring with the original marks that correspond to your selected subset.  Make a corresponding mark on your new, clean tape.

Voila! You now have a set of marks that will keep you in gorgeous focus from here to there by doing nothing but lining up the marks one after the other, and pressing the shutter button.  No calculation, no measuring.  Empiricism Transcendent from start to finish

Oh, leave the original marks in place for those very special times when you might want to favor certain textured objects with more than their fair share of focus.

IMPORTANT EDIT...You need to shoot the calibration images at the same f-stop you plan to use to take your stacked photographs.  f8 is a nice, diffraction-free f-stop on lenses around 50mm, f5.6 might be better for wide angles, f11 is good on many longer lenses.  Takes about 20 minutes to shoot and evaluate a series of test shots made at different apertures, which will quickly show you what your sharpest aperture setting is.  Of course, you can shoot at a tinier aperture than you used for the test, but if you open up the aperture relative to the test your warranty is voided.

Also, marks on the so-called manual focus rings of autofocus lenses will always be an exercise in frustration, because of the slip-fit between the ring and the actual lens elements.  You need pure, unadulterated manual focus lenses to make focus-mark-based stacking work like it should.



« Last Edit: February 16, 2012, 01:52:31 pm by bill t. »
Logged

tim wolcott

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 688
    • http://www.galleryoftheamericanlandscape.com
Re: Focus stacking example
« Reply #8 on: February 16, 2012, 12:30:32 am »

Bill, can you tell when you zoom in that all parts of the image is sharp.  if so very sharp.  I once did a 7 pano stitch with focus stitching by hand and a eraser tool for a project in Texas.  You know Texas they want everything big.  But focus stacking wasn't out yet.  That sure would be easier.  I wonder if that would be easier stitching it horizontal then stacking or going vertical then stitching.  BUt none the less shooting with the Phase would sure take some time processing that monster. 

I'm sure that can't be used on Oceans or lakes.  Good read though very interesting.  T
Logged

bill t.

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 3011
    • http://www.unit16.net
Re: Focus stacking example
« Reply #9 on: February 16, 2012, 01:21:28 am »

In every case, stack first, and only then stitch.

A fact of life about stacking is that focusing changes the image magnification such that Helicon (or whatever) will resize all but one of the input stack images so they can all be exactly superimposed.  Also, if you tried to stitch individual focus layers first, the stitching software would make slighty different alignment decisions on input sets where different areas were sharp or fuzzy on different layers, so things would not match up as well when you went into stacking.  Bottom line...you'd probably get weird moire effects if you tried to stitch before stacking.

And it works fine with oceans, lakes, and other watery subjects.  Helicon offers an editing option where you can selectively pick out pieces of just one of the layers for specific parts of the image.  But even without that, water usually looks very credible.  The main thing that needs a little intervention is moving clouds, and that's easy because they're always on the infinity layer which is the easiest to work on.

Helicon works just fine with medium format.  There's even a 64 bit version that will happily use up all the memory you can throw at it.  Takes about a minute to stack a 5 layer, 5d2 image.
Logged

Scott O.

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 315
    • Photography by Scott and Joyce
Re: Focus stacking example
« Reply #10 on: February 16, 2012, 11:42:13 am »

Excellent image Bill, and terrific discussion.  The first time I tried focus stacking using Helicon was a windy day, and for some reason I never tried it again.  I now use a TS lens, which is a bit more of a pain.  Your example image is excellent and again is a demo of what can be done, although I suspect it would be good for most beginners to master a single stack before moving on to pans!

Alan Smallbone

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 788
    • APS Photography
Re: Focus stacking example
« Reply #11 on: February 16, 2012, 12:05:32 pm »

Bill,

Thanks for all the info and the great idea of how to calibrate the lens focus positions. All great info. Have you compared Zerene stacker with Helicon? I have heard that Zerene was written by a user of Helicon in order to deal with some of the shortcomings with the software. The Helicon examples all look great. I was going to download both and see how they compare. Thanks again for all the info.

Alan
Logged
Alan Smallbone
Orange County, CA

bill t.

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 3011
    • http://www.unit16.net
Re: Focus stacking example
« Reply #12 on: February 16, 2012, 01:35:27 pm »

Yes I tried Zerene and it seemed to work just fine.  I don't remember much about the informal comparison I did, but I don't recall any show-stopper differences.  I lean toward Helicon because I like the interface and the automated updates and I'm used to it.  I tend to take the path least resistance.  The Helicon author has been very actively maintaining it, that's a good sign.

There is also at least one free package out there, CombineZM which might a variation called CombineZP.  Good results, but a little more towards the command-line side of user interfaces.  I remember that the default settings tended to create rather excessive ghosting when nearby objects were superimposed over very far objects, but I'm sure that can be fixed just by figuring out how to change the right parameters.

Would be interested to see a recent comparison of the stacker software packages, any out there?

PS I just made an edit to that big post above describing how to make stacking tape marks.  I should have mentioned that one has to shoot stacks at the same (or tinier) aperture used for the calibration tests!

Logged

Hening Bettermann

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 945
    • landshape.net
Re: Focus stacking example
« Reply #13 on: February 16, 2012, 05:01:05 pm »

Many thanks to Bart and Bill for your detailed instructions!

Bart,

your method seems to require a lens with a distance scale where you can read something like 18.36 m. AFAIK, only Alpa offers an optional focus ring that might come close.

Bill,

> Back at the computer, line up the exposures like little ducks in something like Lightroom.  Eyeball subsets from your complete set of exposures that seem to have reasonable overlap.

>Send these test subsets to Helicon, and revue the results.

I don't understand the plural voice in 'subsets'. If I understand you correctly, you pick say 10 out of 50 exposures. These 10 would form one set. And you would only need one set per lens per f-stop. Correct?

In the end, you would have to transfer your 2nd tape to the focussing ring, meaning the part of the lens that moves against the index, correct? An illustration just to make sure that I got it right. To the right my cm/mm scale covering the original m/feet scale. To the left your 2nd tape, assuming that the marks for the 'hero files' are at equal 5 mm distances. (The Zero mark is the near limit of the lens. - Lens front to the left, like in your image.)

Correct?

bill t.

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 3011
    • http://www.unit16.net
Re: Focus stacking example
« Reply #14 on: February 16, 2012, 06:28:04 pm »

By "subsets" I meant that you would try different combinations selected out of the the total number of test shots, until you found one small set that satisfied for your requirements.  You would normally only use one set.

There are two sets of tape marks.

1. The "test" marks are just an arbitrary, finely spaced scale as shown in my picture of the Micro Nikkor above.  The scale is only temporary, and should be placed perhaps on the opposite side of the lens from the normal focus and f-stop index.  It does not have to be accurately positioned, the infinity focus position can correspond to any number, and the direction of the number magnitude does not matter.

2. The "final" marks are on a piece of tape near the focus and f-stop index.  These marks are the ones you will work with when making focus stacks.  The "final" mark tape is put on the lens before any marks are made on it.

Suppose you found that the files that correspond to the test marks labeled 8, 6.5, 5, 4, 3, 2, 1.5 were sufficient you keep the entire image in focus.

Place a blank piece of "final" tape near the standard focus index mark.  Then align the "test" mark for "8" with the test mark index, and make a mark on the "final" tape near the focus index, the go to test mark 6.5, make another mark on the final tape, and so on.

***********************************

I neglected one compromise, which is that for the final mark corresponding to infinity one should use the liveview screen to find an exact mark position for infinity that might be a slightly different than the closest "test" mark for infinity.
Logged

Hening Bettermann

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 945
    • landshape.net
Re: Focus stacking example
« Reply #15 on: February 16, 2012, 06:55:35 pm »

Thank you for clarifying!

tived

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 714
    • http://
Re: Focus stacking example
« Reply #16 on: March 03, 2012, 04:09:56 am »

Excellent read,

I have to pick up my helicon again and give it another try

Thanks

Henrik
Logged

Alan Smallbone

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 788
    • APS Photography
Re: Focus stacking example
« Reply #17 on: March 15, 2012, 02:59:07 pm »

I have been experimenting with stacking, so far getting pretty good results. I like Helicon's interface and the lightroom plugin, but I am getting less artifacts with Zerene, although they are both pretty close. Zerene also has some different options and a slight different stacking method. I like both but not sure yet what I am going to end up with, but both do a better off the shelf job than Photoshop. Zerene's editing brush was a little more intuitive for me, and I like the price a bit better. It is not something I would use everyday but useful.

Alan
Logged
Alan Smallbone
Orange County, CA
Pages: [1]   Go Up