View Full Version : Photoshop CS4 Focus Stacking with manual mask work afterwards
Triptoph
7th of May 2009 (Thu), 15:05
Anyone have any experience with Photoshop CS4 focus stacking? After using auto align and auto-blend options, I wanted to do some manual work with the masked layers that result. But when i tried to include more of a layer in a mask, I discovered that the parts of the image that are covered by the mask had been changed in colour, while the parts not included in photoshop's original mask where not changed. The result is that I can't change the masks without adding horribly aliased blocky sections that resemble blocky video-game pixels from a video game made in the 80s blown up to 400%...
Anyone experienced this and know how to avoid it?
LordV
8th of May 2009 (Fri), 03:03
fraid no direct experience of this but you may be able to use the method i use to repair finished stacks. I simply take the finished stack (obviously effectively layer flattened) and all the original slices into PS and then use the healing brush to transfer areas from the original pics to the stacked shot.
Brian v.
Triptoph
8th of May 2009 (Fri), 13:27
Thanks Brian, good idea. I'll try that next time.
Lester Wareham
12th of May 2009 (Tue), 08:35
I use CS3 layers for manual stacking.
I also manually align. This is not as hard as it seems if you align layers by pairs and use the difference blend mode: when aligned the screen goes dark.
Manual alignment has the advantage that you align the bit you are interested in, so small errors of scale or legs flapping around don't mess the process up.
Take a look at the bit on manual stacking here http://www.zen20934.zen.co.uk/photography/Workflow.htm#Focus%20Stacking. Includes an example.
Triptoph
12th of May 2009 (Tue), 18:53
My second attempt at a focus stack, 11 images of a poppy seed husk with poppy in the background, focused on a drop of water on the husk. I tried CS4's focus stacking with an without "Seamless colours and tones" option, as well as Combine ZP's various algorithms. They all look very different, especially ZP's options, and its good to know those options are available, but wow I must admit I did expect more from all of them. I think the poor results have a lot to do with my subject being very complex with thorns/hairs at very different depths of field, and because the DOF in the original set was too thin.
Attached example is from CS4's Focus stacking with seamless colours and tone option enabled, which probably came out the best out of all the methods.
I can see that manual stacking would always have better results, but for something like this it's not too feasible unless i wanted to spend hours on one image. I've manually alligned layers before and found it fairly time-consuming. I didn't find a blend mode that worked well for me, i will try difference next time, thanks.
There's more to learn with sub 1:1 macro than I thought! But looking forward to it :)
Triptoph
12th of May 2009 (Tue), 18:57
Next attempt I will be using manual flash (instead of ETTL used for shot above) for more constant colour - I assume then I will not need CS4's "seamless colours and tones" option, and then I can work with masks afterwards. Might be a nice compromise for a complex-DOF shot like this along with a narrower aperture.
LordV
13th of May 2009 (Wed), 01:45
That is a very difficult subject for any focus stacking prog to work out mainly because The oof spines will look just as detailed to the prog as the texture on the leaf does. AFAIK these progs detect detail by rapid contrast change so low contrast detail doesn't "look" any sharper than oof high contast detail.
Brian V.
Triptoph
13th of May 2009 (Wed), 02:23
I had been thinking this would be a lot less work to stack photos. I've seen some amazing focus stacked images of complex subjects like flies with tiny hairs, so there must be a way... hopefully one that doesn't involve hours of work :)
Lester Wareham
13th of May 2009 (Wed), 03:09
I had been thinking this would be a lot less work to stack photos. I've seen some amazing focus stacked images of complex subjects like flies with tiny hairs, so there must be a way... hopefully one that doesn't involve hours of work :)
You tend to paint zones of focus in rather than individual hairs, though I sometimes do this with prominent long hairs on a spider say.
I think the problem you are having is thinking of focus stacking as if it is pan-focus. In reality you have to choose the important parts of the image in various areas to have in focus, ie mix and match.
To use an analogy or reading an orchestra score for the piano, you have to pick the instrument parts that contain important melodic or harmonic content at a particular moment, you don't have enough fingers to play every part simultaneously.
Triptoph
13th of May 2009 (Wed), 13:24
I'm afraid I don't know what you mean by pan-focus.
I think I would be able to paint zones of focus rather than individual hairs if the DOF had been a fair bit wider than what I had used.
It also occurred to me during some of the other shots that instead of aiming to get everything in focus, the final image sometimes would be more powerful with only specific focal points in focus. I guess that should have been fairly obvious... I'm just getting a bit wrapped up in the technical and loosing sight of what I want the final image to be I suppose.
DQE
14th of May 2009 (Thu), 19:21
FYI - some new software is now available for evaluation. It is obtaining some good reports from some of the specialists at photomacrography.net.
Below is the URL for photomacrography.net:
http://photomacrography.net/forum/viewforum.php?f=27
Next is the URL for the new Zerene Stacker software, in final development. I have no personal experience yet but wanted to pass the info along.
http://zerenesystems.com/stacker/
Good luck in your quest to master focus stacking; I am on the same quest this summer.
Triptoph
14th of May 2009 (Thu), 19:54
Great I will definitely check that out, thanks!
Triptoph
14th of May 2009 (Thu), 20:14
Results from Zerene Stacker are the best I've seen yet. Combining their results with manual work seems a pretty good option. I'll have to keep an eye on the progress of that program, looks promising.
Triptoph
14th of May 2009 (Thu), 20:16
The ZS Image had stronger ghosting parts against the red for some reason, but the texture of the green surface was much better with ZS than CS4.
rjlittlefield
23rd of May 2009 (Sat), 18:15
Triptoth, thanks for checking out Zerene Stacker (ZS). For starters, I need to say that I'm the fellow who wrote ZS. I did that primarily because I shoot a lot of deep stacks of hairy and low contrast subjects, and I got tired of wrestling with the other stacking programs.
ZS's PMax method, which is what I think you used, does quite well at preserving detail even in low contrast regions such as the green surface of your leaf. It also handles overlapping structures like mats of bristles and hairs, where the depth map methods have problems. PMax also often gives less halo than other methods, but it's much more likely to show ghosting if there's the slightest bit of subject movement or misalignment.
When I study carefully the Photoshop and ZS samples that you posted, I'm pretty sure that your results are showing some sort of movement or misalignment. But I'd have to see the full stack to diagnose it any farther.
The other common cause of halo with PMax is shooting with too large of a focus step. That algorithm works a lot better when it gets a chance to see hairs etc. in sharp focus, then just a little OOF, a little more OOF, and so on.
Looking at the continuous surface of the green area, I see that there are periodic bands where nothing is sharp. The same pattern appears in many of the hairs -- sections that are sharp, separated by sections that are not so sharp. This pattern suggests an overly large focus step. Reading back, I see that this stack was only 11 frames. I don't know enough about your subject to say for sure, but I'm inclined to think that best results at this magnification and depth would require more like 40.
These high magnification hairy subjects are very challenging on first encounter, but you'll find they get a lot easier with more experience.
If you'd like to work on this problem further, I'll be happy to help you out. The best bet is probably to contact me via support@zerenesystems.com . I'm very curious to know what's going on with the alignment/movement issue.
Hope this helps -- that's an attractive image you're working on!
Rik Littlefield
Zerene Systems
Triptoph
23rd of May 2009 (Sat), 19:32
Wow, now that's support!
Thank you Rik for your insight. I thought 11 shots would be enough for this subject as it was a few centimeters long, however the aperture was probably a bit wide looking back. The MPE-65 lens I've used here is very new to me, I'm still learning the ropes. I may try this shot again when I find another poppy seed, I've got a much better working setup now than I did then, and a little bit more experience under my belt. I'm sure that you're right in that a good part of the poor results here was from my own inexperience.
I'm currently working on another image stack and have similar problems, though not nearly as pronounced. Will post results another day.
Cheers,
Tony
rjlittlefield
23rd of May 2009 (Sat), 23:37
Tony, you're very welcome. Between answering the support email for Zerene Stacker, and having done high mag stacking myself for over 5 years, I have a pretty good appreciation for what all can go wrong. There's quite a lot.
Most people don't realize how shallow DOF gets at higher magnification.
The standard formula (from Lefkowitz) is that TDF = 2*C*fr*(m+1)/(m*m), where TDF is total depth of field, C is the circle of confusion (typically sensor diagonal/1500), fr is the f-number set on the lens ring, and m is the magnification.
If you crunch through the numbers, using say a 1.6 crop-factor DSLR (C=0.018 mm), at 1:1 (m=1) and f/16 (fr=16), you get only about 1.2 mm TDF. Generally it's a good idea to have 20% overlap or so for stacking, so figure 1 mm per focus step. That's at 1:1 and f/16.
At higher magnifications, the problem gets worse by a factor of almost m*m because you also have to open up the aperture to avoid too much diffraction blur. At 5:1 and a lens setting of f/5.6, TDF = 0.05 mm, about 0.002 inch. This is why the stacking discussions at photomacrography.net talk so much about screw tables and even finer positioners.
My offer to help still stands. That's a nice image you're working on, and I'd like to see it come out well. Besides, I learn something every time I help work through one of these problems.
Best regards,
Rik Littlefield
Zerene Systems
Triptoph
24th of May 2009 (Sun), 00:51
At 0.05mm, that would be 1/25th of a turn on the screw on my focusing rail (RSS B-150B), with a 20% overlap, 1/30th. Yikes. I wish it had exact degrees marked out on it, perhaps I can modify it and add some kind of dial that shows degrees on it.
I think that particular subject is a lost cause as the poppy is long gone now, might get another later though and try again.
Triptoph
24th of May 2009 (Sun), 02:13
100% crop of a photo of the center of a pansy. There is a problem with CS4 in that it seems to assume that the focus drops off gradually throughout the image, resulting in halos around areas that change in DOF quickly, if you know what I mean. These images are from a stack of 12 photos, one processed in CS4 using Blend Layers with Seamless Tones and Colours option enabled, and the other in Zerene Stacker using PMax.
Especially when seeing the full image at 100% on a 30" display there is no real competition here, the ZS image is clearly sharper without the troublesome halo effect. My fiancée who knows little about photography at all, just took a look at the two and said "wow that one is so much better." So I know it's not just me. Hope this comparison shows the issue I'm talking about. No PP has been done other than stacking on purpose.
Still working on the final image, will post it in the Macro sharing forum when finished :)
Triptoph
24th of May 2009 (Sun), 14:29
Final image: http://photography-on-the.net/forum/showthread.php?t=698676
vBulletin® v3.6.12, Copyright ©2000-2012, Jelsoft Enterprises Ltd.