Just a couple of experiments with transitions between focus stacked subject and the background:
Both images were shot by moving the camera, not the subject.
This one was shot at f5.6 starting just in front of the pistil and continuing to the break in the petal. I then backed up several steps and shot one frame at f/16. These were stacked in Zerene Stacker, then the PMax output was merged in Photoshop with the image shot at f16.
This one was shot at f5.6 for the pistil, then backed up until the focus point was centered under the pistil and one frame was shot at f1.8. The f5.6 frames were stacked in Zerene Stacker then merged with the last frame in Photoshop.
Transitions
Moderators: rjlittlefield, ChrisR, Chris S., Pau
-
- Posts: 674
- Joined: Sat May 01, 2010 6:12 am
- Location: Nice, France (I'm British)
-
- Posts: 674
- Joined: Sat May 01, 2010 6:12 am
- Location: Nice, France (I'm British)
I wonder if it would be possible for focus stacking programs to accumulate a mask buffer, ie a greyscale image of the same size as the input images, where all pixels start off as black and become progressively whiter as the stacker gains confidence in having found an in-focus sample for that pixel.
Such an image could then be used as a layer mask, perhaps with some threasholding.
Such an image could then be used as a layer mask, perhaps with some threasholding.
CombineZM will create a depth map that might be able to do this. I think Zerene Stacker could do it easily for the DMap output, but only Rik could tell you if it's possible for the PMax output.ChrisLilley wrote:I wonder if it would be possible for focus stacking programs to accumulate a mask buffer, ie a greyscale image of the same size as the input images, where all pixels start off as black and become progressively whiter as the stacker gains confidence in having found an in-focus sample for that pixel.
Such an image could then be used as a layer mask, perhaps with some threasholding.
- rjlittlefield
- Site Admin
- Posts: 23561
- Joined: Tue Aug 01, 2006 8:34 am
- Location: Richland, Washington State, USA
- Contact:
Chris, can you spell out for me how such data might be used?ChrisLilley wrote:I wonder if it would be possible for focus stacking programs to accumulate a mask buffer, ie a greyscale image of the same size as the input images, where all pixels start off as black and become progressively whiter as the stacker gains confidence in having found an in-focus sample for that pixel.
Such an image could then be used as a layer mask, perhaps with some threasholding.
As background information, let me explain that OOF regions are difficult to analyze. It is easy to identify the best-focused frame when there is crisp detail at one depth. This is the classic case for non-overlapping geometry with a subject containing fine detail. When the subject does not contain fine detail, or when it does but no frame is sharply focused, then both the accuracy and confidence go way down.
That is why ZS provides the contrast threshold slider for DMap. It provides a simple way for the user to tell ZS in general where ZS's judgments are correct and where they are not.
Well, I'm not going to tell you that it's not possible, but I will say that I don't see offhand how to do it. PMax analyzes the image simultaneously at a bunch of different of resolution scales. At each scale, the situation is roughly the same as for DMap, but results at various scales can conflict with each other and it's not immediately obvious how to combine them into a single "confidence" number at each pixel position.elf wrote:CombineZM will create a depth map that might be able to do this. I think Zerene Stacker could do it easily for the DMap output, but only Rik could tell you if it's possible for the PMax output.
--Rik
As is often the case, Elf's thoughtful work deserves more discussion than it is getting. As we improve our stacking skills, most of us are working to increase and perfect the area in focus to contain the entire subject. Here, Elf has bounded the in-focus area with an out-of-focus area that also uses increased diffraction for softening.
So I'll respond. In your top image, Elf, your approach works for me. Nothing jars my eye--the portions my eyes are interested in are nice and sharp, and the other portions, less interesting to my eye, are undistractingly softer. So I think your approach worked here pretty nicely.
In the bottom image, my brain is bothered that the pistil has no visible means of support. But the in-focus, out of focus regions don't bother me.
Thanks for exploring this needed subject (gentle out of focus areas bounding our sharp, stacked focus areas). I suspect that as focus stacking matures, many of us will be doing what you are doing now to put the icing on our cakes, so to speak. Your approach looks natural and not jarring.
Cheers,
--Chris
So I'll respond. In your top image, Elf, your approach works for me. Nothing jars my eye--the portions my eyes are interested in are nice and sharp, and the other portions, less interesting to my eye, are undistractingly softer. So I think your approach worked here pretty nicely.
In the bottom image, my brain is bothered that the pistil has no visible means of support. But the in-focus, out of focus regions don't bother me.
Thanks for exploring this needed subject (gentle out of focus areas bounding our sharp, stacked focus areas). I suspect that as focus stacking matures, many of us will be doing what you are doing now to put the icing on our cakes, so to speak. Your approach looks natural and not jarring.
Cheers,
--Chris
-
- Posts: 674
- Joined: Sat May 01, 2010 6:12 am
- Location: Nice, France (I'm British)
First just to check that I was clear about what the data *is*. In elf's second image, there would be a black or grey field with a roughly circular whitish blob in the middle (where in-focus areas have been found) and also a greyish area at the bottom right where a linear in-focus feature has been found.rjlittlefield wrote:Chris, can you spell out for me how such data might be used?ChrisLilley wrote:I wonder if it would be possible for focus stacking programs to accumulate a mask buffer, ie a greyscale image of the same size as the input images, where all pixels start off as black and become progressively whiter as the stacker gains confidence in having found an in-focus sample for that pixel.
Such an image could then be used as a layer mask, perhaps with some threasholding.
In other words increasing whiteness corresponds in some way to increasing confidence that the pixel contains in-focus data.
Moving on now to usage - in both of elf's examples the output from stacking was merged with a second image taken with different aperture parameters. One way to perform such a merge is to work away with an eraser tool, deleting parts of a foreground image (the stack) so thata background image on a different layer shows through. Its difficult to undelete or to carefully adjust, that way.
A second way is to use selections, 'magic wand' tools, lasso, to select the areas that are to be cut away or faded back. Typically such a selection, which corresponds to an alpha mask, is saved to a separate channel and can be worked on as if it were a greyscale image - black or white areas added, the whole thing blurred to soften transitions or threasholded (put through a transfer curve with a steep central portion and shallow start and end) to accentuate transitions.
Although that gives more control and a better result, it takes time to construct and refine such a mask. Often a magic wand type tool, which is looking for areas of similar colour, sees differences in colour where we see softly changing blurred background. But if the tolerance is set too low, the selection eats into areas of foreground detail that contain similar colours.
It occurred to me that a stacking program might well be accumulating similar data - it might be a bit noisy, it might require a bit of work with levels or blurring etc, but it would be a better as a start for this layer mask that would be used to blend the stacked image with the desired background image. So an option to collect and write out such a mask might be interesting.
Essentially what I am asking for is an extra image which is a confidence map of the main, stacked image.rjlittlefield wrote: As background information, let me explain that OOF regions are difficult to analyze. It is easy to identify the best-focused frame when there is crisp detail at one depth. This is the classic case for non-overlapping geometry with a subject containing fine detail. When the subject does not contain fine detail, or when it does but no frame is sharply focused, then both the accuracy and confidence go way down.
That makes sense. (And thanks for the description of what PMax actually is).rjlittlefield wrote:Well, I'm not going to tell you that it's not possible, but I will say that I don't see offhand how to do it. PMax analyzes the image simultaneously at a bunch of different of resolution scales. At each scale, the situation is roughly the same as for DMap, but results at various scales can conflict with each other and it's not immediately obvious how to combine them into a single "confidence" number at each pixel position.elf wrote:CombineZM will create a depth map that might be able to do this. I think Zerene Stacker could do it easily for the DMap output, but only Rik could tell you if it's possible for the PMax output.
Thanks for the compliment. I think when both images are displayed together, the apparent non-supported subject in image 2 is understood. If the image was displayed by itself, then it would be hard to figure it out. I usually try to get the support into the picture even if the support is OOF, but I wanted this one to be floating. I thought about adding a radial blur to the subject just to really mess with your mindChris S. wrote:As is often the case, Elf's thoughtful work deserves more discussion than it is getting. As we improve our stacking skills, most of us are working to increase and perfect the area in focus to contain the entire subject. Here, Elf has bounded the in-focus area with an out-of-focus area that also uses increased diffraction for softening.
So I'll respond. In your top image, Elf, your approach works for me. Nothing jars my eye--the portions my eyes are interested in are nice and sharp, and the other portions, less interesting to my eye, are undistractingly softer. So I think your approach worked here pretty nicely.
In the bottom image, my brain is bothered that the pistil has no visible means of support. But the in-focus, out of focus regions don't bother me.
Thanks for exploring this needed subject (gentle out of focus areas bounding our sharp, stacked focus areas). I suspect that as focus stacking matures, many of us will be doing what you are doing now to put the icing on our cakes, so to speak. Your approach looks natural and not jarring.
Cheers,
--Chris
That would be handy, I expect that this could be generated from the final image just as easily as accumulating it during the stack.ChrisLilley wrote: It occurred to me that a stacking program might well be accumulating similar data - it might be a bit noisy, it might require a bit of work with levels or blurring etc, but it would be a better as a start for this layer mask that would be used to blend the stacked image with the desired background image. So an option to collect and write out such a mask might be interesting.
Elf, very nice results!
Just in case you missed it I thought I'd mention that I've been experimenting with similar techniques - scroll down to the bottom of the first page of this thread for some examples blending wide open stacks with various stopped down exposures: http://www.photomacrography.net/forum/v ... 21&start=0
In the second shot you seem to be doing the opposite of what I've been trying and I must say it works beautifully – very interesting!
Just in case you missed it I thought I'd mention that I've been experimenting with similar techniques - scroll down to the bottom of the first page of this thread for some examples blending wide open stacks with various stopped down exposures: http://www.photomacrography.net/forum/v ... 21&start=0
In the second shot you seem to be doing the opposite of what I've been trying and I must say it works beautifully – very interesting!
Yes, I did see that thread. There was also another one recently with stopping down at the bottom of the stack. One of the things I was trying in the first image was to see what effect backing up a bit before making the stopped down images. It should allow a little more leeway for blending the images together. When I'm shooting panoramas, I've been shooting the stopped down images after completing the focus stacked frames. I think it should work just as well, if not better, to include them in the focus stacked frames.