Page 1 of 1

focus stacking

PostPosted: Mon Jul 02, 2012 10:27 am
by Mr Darcy
I had a go at focus stacking yesterday.
I had moderate success, but didn't quite nail it.
Any suggestions as to what is going on? And how to improve the technique? My daughter is already at me to photograph her knitting projects this way.

Image
This is the final image. I created. It mostly worked except for the pommel and a patch or two in the scabbard that are not really visible at this resolution.
I used Koloskov's method to create the photo. Slightly modified - I used "Merge to Panorama" in LR4 to open the photos as layers rather than do it all within CS5. I also simplified his lighting setup. Though perhaps I shouldn't have. That reflection bothers me.

Here's one of the photos from the stack:
Image
This is the one I would probably use (reframed) if I wasn't stacking.

Re: focus stacking

PostPosted: Mon Jul 02, 2012 10:40 am
by aim54x
Nicely done.....that pommel still is out but I like what I see.

Re: focus stacking

PostPosted: Mon Jul 02, 2012 9:54 pm
by Mr Darcy
Two more attempts. Again close but no cigar
Image

and even further from the mark...
Image

If I knew how to change the mask on each layer I would be able to adjust things manually, but I haven't been able to crack that particular nut yet.

Suggestions more than welcome.

Re: focus stacking

PostPosted: Mon Jul 02, 2012 10:26 pm
by photohiker
Have you tried Helicon Focus?

Re: focus stacking

PostPosted: Tue Jul 03, 2012 12:11 am
by Mr Darcy
photohiker wrote:Have you tried Helicon Focus?

No I didn't even know it existed. Thanks for the link. :up:
I see now there are a number of specialist programs out there. I will have to look into it further.
I also liked to look of the motorised rail too. While I am doing product type shots at the moment, this is just to get me familiar with the technology. Ultimately I am thinking natural world shots.

However, the blog that got me started on this claimed CS5 works, and for me it nearly does. I am sure I could get the rest of the way if I only knew what I was doing wrong.
Or if it is CS5 getting it wrong, if only knew how to wrestle it into submission.

Re: focus stacking

PostPosted: Tue Jul 03, 2012 11:18 am
by Mj
Greg... this forum post may help http://forums.adobe.com/message/4520288
It suggests to me that the process you are following may not be the best option.
I've not tried this myself so cannot warrant the accuracy of the info provided.
Are you using rails etc to adjust focal point? Yet another piece of kit I'd like to avoid buying if I can help it !!!

Re: focus stacking

PostPosted: Tue Jul 03, 2012 12:56 pm
by Mr Darcy
Mj wrote:Greg... this forum post may help http://forums.adobe.com/message/4520288

Thanks for that. It does indeed suggest I am using the wrong tool to create the layers. It will add an extra step though as I use LR to open in CS5. The OpenAsLayers in LR does not expose the AutoAlign option, and as it works well for star trails, I assume it is turned off. That means I will have to decide on the images to use, note them down, then open them directly in PS or possibly Bridge. I have never used the latter.


I did do some reading overnight and worked out how to adjust layer masks. Manual intervention led to a much better result, though it is a bit hit and miss.
Image

Mj wrote:Are you using rails etc to adjust focal point?

I used the RRS MPR-CLII rail that I bought for adjusting the nodal point when doing panoramas. It is not as schmick as one of the screw adjustable or motor drive ones designed specifically for macro work, but it did the job nicely.
I moved the camera about 5mm between exposures. If I was doing fine work where I was moving less than a mm between exposures, e.g. for insect work, I would really want one of the specialist macro rails.
Image

Re: focus stacking

PostPosted: Thu Jul 05, 2012 3:02 am
by Murray Foote
Moving the camera rather than the focus is only going to work for macro images. I haven't had problems with image size through changing lens focus on normal image sets.

Did you mean to say "merge to panorama" or was that a glitch? I would have thought Edit In/ Open as layers in Photoshop from Lightroom, then select both layers, Edit/ Auto-align layers, then Edit/ Auto-Blend layers/ Stack images.

Then if you get glitches such as you have shown, the easy way is to shift-drag another copy of the relevant image in as a new layer, add a black mask (which hides it) and paint the detail in with a white brush. The Photoshop auto-blending is weird because it takes chunks out of the individual images as well as creating masks. Oh, and you'll have to auto-align the new layer with the others first. For that matter, it's sometimes easier to manually create a mask and not bother with the auto-blend.

I tried Helican focus for a difficult image set and it didn't work for me any better than Photoshop. At $200 I can't see the justification.

Many image sets are not going to work well in any automated system though the ones you've tried shouldn't be too bad. For example, if you have a foreground tree in front of a distant landscape, there will inevitably be a blur halo around the tree because the blurred tree in distantly focused images will be larger than the tree in focus. Then you have to get into things like delicate cloning as well as adjusting masks.

Re: focus stacking

PostPosted: Thu Jul 05, 2012 9:47 am
by Mr Darcy
Murray Foote wrote:Did you mean to say "merge to panorama"

Yes I did.
I came across this concept accidentally while looking for methods of stacking startrails. While Rodney's method works for that I thought there might be other methods out there that might eliminate the 1sec gaps.

Back to focus stacking.
I used "merge to Panorama" in LR as that opens the photomerge dialog in PS. This what was used by the method I fell across. I thought it a little odd, but it mostly worked so I stayed with it. I thought it might have been something to do with photomerge aligning the layers and resizing them.

Now having read more I realise it is not the best technique to use. I will try again in the next few days with either new images or the same ones.

Murray Foote wrote:For example, if you have a foreground tree in front of a distant landscape, there will inevitably be a blur halo around the tree because the blurred tree in distantly focused images will be larger than the tree in focus.

Ahh. This explains the blurring left in the plane. While not very noticeable in the resized-for-web image this was quite bad where the foreground parts overlapped the background parts of the plane.

Murray Foote wrote:Moving the camera rather than the focus is only going to work for macro images.

At this stage in the game I am only thinking of this for macro, though I can see its application for landscape.
My test subjects are larger than my planned ideas - mainly flowers/fungi. Bugs would be nice, but even plants move too much to make this easy. From what I read the afficionados of bug photography freeze and kill the critters to get those "perfect" shots. No thanks.

Re: focus stacking

PostPosted: Thu Jul 05, 2012 3:51 pm
by Murray Foote
Image

Here's one of a series of a banksia menzeisii I did using focus stacking. No way an automated program could get this right. I used about twelve layers and manual masking.

It was out on the front step, in a pot. I just waited for very still conditions.

Re: focus stacking

PostPosted: Fri Jul 13, 2012 8:42 am
by Mr Darcy
Another attempt
Image

This on used 8 layers, and following the advice here I used "open as layers" rather than "merge to panorama".
This is a more complex image than the others I have attempted, but it is less macro so I shifted focus instead of the camera.

It worked well with only a few areas that needed manual intervention, and all were readily explicable because of the complex overlaps in the photo, unlike the knife shot.
It seemed quicker too, but this may be because there were only a few photos. I really like the way I was able to achieve a really defocused background while keeping all the subject sharp. Compare this single image (f/5.6 as opposed to f/1.4 for the stack)
Image


Areas that still need improvement:
1. Allow room around the image for cropping. The image blooms as you shift focus and you need to take this into account.
2. Ensure I move the focus in small enough increments. There is a section (See "Australian") that is less than optimally focused as I left too big a gap between images
3. I still need to improve my mask adjusting skills.

Re: focus stacking

PostPosted: Sat Jul 14, 2012 11:34 am
by Mj
So i think it time i had a crack at this instead of just understanding the theory... this last attempt was with a set of shots, camera static and with the focus point adjusted in camera? That should be easy to try out having no macro rails and the like which has been my excuse to date.

Re: focus stacking

PostPosted: Sat Jul 14, 2012 2:17 pm
by Mj
My very rough 2 penny tour...

focus 1 (front cup @ 85/1.4)

Image

focus 2 (back cup @ 85/1.4)

Image

Load as 'Files into Stack', then 'auto blend layers' ... this creates a set of masks for each layer for any manual adjustments.... none done here... then... we are done.

stacked

Image

Obviously with 2 layers at f/1.4 it's hardly a finely tuned result... but it works to this level with no stuffing around.
Great for still life composition... might be a challenge for low-light sports or live-gig work though :roll:

Note... no coffee was damaged in the creation of these images.

Re: focus stacking

PostPosted: Sat Jul 14, 2012 5:38 pm
by Mr Darcy
Mj wrote:this last attempt was with a set of shots, camera static and with the focus point adjusted in camera?


Exactly, as you have apparently found out. ;)
While using rails and moving the camera seems to be the preferred method wherever I have seen this written up, a moment's thought will reveal that this method will ONLY work if the front to back distance of the subject is shorter than the length of rails you possess. Good luck finding a set long enough to do a landscape with a floozie in the foreground :lol:

For larger subjects, you will need to hold the camera still and move the focus as I have done in the last stacked image. And you seem to have done as well.
You could potentially pick up the tripod and move it instead but I think that would be asking a lot of the AutoAlign feature in PS.

Re: focus stacking

PostPosted: Sun Jul 15, 2012 7:02 pm
by Matt. K
Greg
Those bottles are still full????? :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock: :shock:

Re: focus stacking

PostPosted: Sun Jul 15, 2012 9:01 pm
by zafra52
...Now I understand what this is all about! :!:
I could not understand why not using a higher f number
to get the full object into focus. :roll:

Re: focus stacking

PostPosted: Sun Jul 15, 2012 9:10 pm
by Steffen
I guess those shots are from early in the session :)

Cheers
Steffen.

Re: focus stacking

PostPosted: Mon Jul 16, 2012 12:01 am
by Mr Darcy
Matt. K wrote:Those bottles are still full?????

Apart from the Jones Apero, these are the in-law's bottles. You will note that the Jones is suitably low ( it is even lower now :D )

zafra52 wrote:I could not understand why not using a higher f number

There are three reasons.
1. As you have picked up, to provide very precise control over Depth Of Field. You can have all of the subject in focus and all of the background thoroughly OOF.
2. If you are close enough, even F/1000 won't give you enough DOF. This technique can.
3. As you shut down the aperture, the DOF gets better only up to a point. After that the limitations of the lens and sensor start to make focus worse. Basically what is happening is that as the aperture gets smaller, diffraction starts to play a significant part in the image. This degrades the image. If your sensor has a fine pitch (high megapixel count), then this becomes a real issue sooner rather than later. By using focus stacking you can stay in the camera's sweet spot & still get the DOF you crave.

Re: focus stacking

PostPosted: Mon Jul 16, 2012 12:10 am
by Mr Darcy
Today's attempt:
Image
This is getting closer to the sorts of things I actually want to capture with this technique.
A bit of confusion among the floaty bits, but hell why wouldn't there be?

Re: focus stacking

PostPosted: Mon Jul 16, 2012 10:01 am
by Mj
Hi there Greg... looking good...
Up close there are still some pods oof on the front left of of the shot... I'm guessing a couple of etc focus points would have dealt with that.
Also appears to be some purple fringing along a couple of stems high on the left.
Were you using/adjusting rails for this or changing focus points in camera? Having now played a little (very little) with this technique and can see that a very very rigid and controllable setup would be required to get everything spot on... if I were to do any amount of commercial work with this I'd have to really seriously consider what a motorised system could bring to the party. A set of bellows, motorised rails, and computer controlled batch shooting would make (I think) doing 20+ stacks a little less painful.

Re: focus stacking

PostPosted: Mon Jul 16, 2012 10:54 am
by Mr Darcy
Mj wrote:Were you using/adjusting rails for this or changing focus points in camera?

I used the RRS rail I showed above ( That photo BTW is a link to their website)
I moved the camera 1 - 2 mm along the rail between each exposure. This is getting to the size of object where a motorized or screw threaded system would come into its own. This Rail would be better for the job, or even better one of the motorised ones I saw when I was looking a few weeks ago. But ATM this is just a curiosity for me & so doesn't justify the expense (yet :roll: ).

Mj wrote:Up close there are still some pods oof on the front left of of the shot... I'm guessing a couple of etc focus points would have dealt with that.
Also appears to be some purple fringing along a couple of stems high on the left.

Thanks. I'll have a closer look at the original and see if I can improve things. I started with every thing OOF with the focus in front of the flower and ended with the focus point behind the flower so I should have something that will help. It is possible though that using the nudge method of moving the camera means that there is a depth I missed. Basically what I am doing is using AF to select a focus, then turning off AF. Then I move the camera back until the subject is completely OOF, then start taking photos and moving forward slightly between frames until the subject is completely OOF again. The fringing may be an artefact of the process or it may be the lens.

Murray suggested a technique where you drop in a new layer on top of the stacked image for recalcitrant areas. I'll give that a try if I can work out which original image to use.

I am also not entirely happy with the crop so I'll revisit that too. I'll move the viewpoint slightly to the right.

Re: focus stacking

PostPosted: Mon Jul 16, 2012 2:51 pm
by Mr Darcy
Mj wrote:Up close there are still some pods oof on the front left of of the shot... I'm guessing a couple of etc focus points would have dealt with that.
Also appears to be some purple fringing along a couple of stems high on the left.

I had a go at fixing this up. Next time remind me to use a simpler subject.

1. I used Murray's idea of dropping a new layer on top of the final flattened image and painting in the corrections. It took me a while to work out how to add a mask to a layer that didn't have one, but after that it was a relatively easy task. I did that in two areas - the stems Upper left and the seed pods lower left. There seems to be a missing focus point in the latter area, and the upper region is so complex in its overlaps I have new admiration for the folks at Adobe. Bloody hell this is hard. There are still a few parachutes that are missing their stalks, but C'est La Vie.
2. Once the image had its focus points corrected , I attempted to remove some of the colour fringing back in LR. I used the correction paintbrush to a. lower saturation of the worst colour fringing and b. reduce exposure of some of the worst OOF stalks. These tended to be just inside the colour fringes. I could still spend several more days and still not get them all.
3. I reapplied the crop slightly differently and reapplied the contrast etc settings that I had to remove to get the composite image to match the single images I used for manual intervention

And yes I did blow the Max 5 minute editing rule somewhat. :mrgreen:
Image

Re: focus stacking

PostPosted: Mon Jul 16, 2012 3:40 pm
by biggerry
getting there Greg, you can see some funny anomalies in that last one but overall it looks pretty sweet, even a bit too sharp!

Re: focus stacking

PostPosted: Mon Jul 16, 2012 4:11 pm
by Mr Darcy
biggerry wrote:even a bit too sharp

Oddly enough, I haven't applied any sharpening at all. It simply comes out of the focus stack and the LR Contrast and Clarity adjustments.
I think the last does something akin to the unsharp mask, but I am not sure exactly what. I just know I like the results at about +20. unless people are involved. Then (0 - their age) seems to work well. This photo is Clarity +24.

Re: focus stacking

PostPosted: Mon Jul 16, 2012 5:23 pm
by Remorhaz
Greg - I reckon this looks pretty freakin awesome :) I love that front to back sharpness with the buttery bokeh in the background at the same time

Am very tempted to give focus stacking a try myself now (not so keen on the obliteration of the 5min rule tho - however surely it can't be too much worse than star trails :)) - although in my case I'd probably try the lock down the camera on tripod and adjust manual focus slightly between shots method (although the Tamron 90mm extends a LOT during focus so this may be bad for realignment - might have to borrow a friends 105VR instead).

Mr Darcy wrote:This photo is Clarity +24.


Remember that Clarity effects in LR4 are basically double that of LR3 so Clarity 24 is pretty strong

Re: focus stacking

PostPosted: Mon Jul 16, 2012 11:26 pm
by Mr Darcy
Remorhaz wrote:Remember that Clarity effects in LR4 are basically double that of LR3 so Clarity 24 is pretty strong

I didn't realise that. I worked out my +20 rule on LR3. Maybe I need to rethink it somewhat.

Remorhaz wrote:however surely it can't be too much worse than star trails

Wanna bet? I don't count the time the computer works while I'm off getting lunch or tea or sleeping or...

But also keep in mind 1. I'm a beginner at this - part of the time was working out how to build a layer mask form scratch; 2. This is one complex image - lots of overlapping elements.

Re: focus stacking

PostPosted: Fri Jul 20, 2012 10:24 pm
by colin_12
I have only had a very rough play with this.
There are some macro togs who use it all the time to great effect.
I like the dandylion by the way

Re: focus stacking

PostPosted: Fri Jul 20, 2012 11:22 pm
by Mr Darcy
Welvcome Back Colin! Finished your exams?

Re: focus stacking

PostPosted: Fri Jul 20, 2012 11:38 pm
by chrisk
Mr Darcy wrote:Image


oversharpening aside, this is an absolutely stunning image. :bowdown:

Re: focus stacking

PostPosted: Sat Jul 21, 2012 8:30 pm
by Murray Foote
Mr Darcy wrote:
Remorhaz wrote:Remember that Clarity effects in LR4 are basically double that of LR3 so Clarity 24 is pretty strong

I didn't realise that. I worked out my +20 rule on LR3. Maybe I need to rethink it somewhat.

I used to use a constant amount on import for clarity with LR3 but LR4 clarity is quite different, less halos but more powerful. I now do my clarity adjustments image by image (mind you I often have an HDR component in my processing, too).

Re: focus stacking

PostPosted: Sun Jul 22, 2012 12:54 pm
by Mr Darcy
OK this is the same image as last time but with the Clarity backed off to +11 Any further and it starts to look positively blurry on my monitor at home. Maybe its my eyes.
Image

Re: focus stacking

PostPosted: Sun Jul 22, 2012 4:19 pm
by Murray Foote
I'd be inclined to try a touch of sharpening and see whether it improves or not. Clarity and sharpening are different after all. Clarity is mid-range contrast and sharpening is edge detail, at a broad oversimplification. The danger would be excess micro-detail rather than halos. When sharpening in Lightroom, I now tend to use one of the two sharpening presets (portrait or landscape) for a start and sometimes just vary the masking.

Re: focus stacking

PostPosted: Fri Jul 27, 2012 2:01 pm
by Remorhaz
Remorhaz wrote:Am very tempted to give focus stacking a try myself now (not so keen on the obliteration of the 5min rule tho - however surely it can't be too much worse than star trails :)) - although in my case I'd probably try the lock down the camera on tripod and adjust manual focus slightly between shots method (although the Tamron 90mm extends a LOT during focus so this may be bad for realignment - might have to borrow a friends 105VR instead)


Sorry Greg for hijacking your thread (and your subject and composition :)) but I had to give this a try...

I know it's the same subject but these were growing in the street outside my house and I saw them walking home just now and figured it was time to give it a try.

Note that here I've actually kept within the 5 minute rule (seriously) :)

I locked the camera down on a tripod with the D7000 and Tamron 90mm macro and used manual focus, manual exposure and a remote release to take the images in sequence - moving the focus ring by hand fractionally between shots from front to back. I did this fairly quickly so total time taken was less than two minutes for all the shots. NB: I can see that the image "zooms" when I do this since the Tamron extends considerably with focus but...

I used the Helicon Focus software to stack the frames (it says it "auto aligns images as objects often change their size and position from shot to shot" - and it seems to work very well, it also handles RAW images) - in this case the software took less than two minutes to stack the images and I didn't do any manual adjustments, etc - just let it do it's auto thing

Back in Lightroom I did a few minor adjustments to Contrast, Clarity, Sharpening, etc and here we have in under 5 minutes...

34 Images x 90mm 1/100sec @ f/8 @ ISO 200
Image

Re: focus stacking

PostPosted: Fri Jul 27, 2012 10:16 pm
by Mr Darcy
Remorhaz wrote:Sorry Greg for hijacking your thread (and your subject and composition )

You're more than welcome. Hell I do it often enough & don't even stay on topic :roll:

Excellent attempt, though if I look closely I can see lots of blurring in the "propellers". It was those difficult areas where I blew the 5 minute rule & still didn't get it right.

Anyways, this is my latest attempt:
Image
This one was hand held with the iris wide open (f/1.4). I simply put it on manual focus and let my natural wobble loose while I held the button down. Then I selected the four most promising images in preview and stacked them.

Re: focus stacking

PostPosted: Fri Jul 27, 2012 10:21 pm
by Mr Darcy
Oh and as you lose some of the sense of depth with this technique, this is on of the prestack images:
Image

Re: focus stacking

PostPosted: Sat Jul 28, 2012 6:44 pm
by Matt. K
Hi Greg
This post has really sparked a lot of interest and some great images! Congratulations for that. You are producing some beautiful technical work and I hope you've got that new printer working overtime and spitting out some gallery quality prints? I'll be the first to have a chardonney at your exhibition. :D :D :D