Transitions

A forum to ask questions, post setups, and generally discuss anything having to do with photomacrography and photomicroscopy.

Moderators: rjlittlefield, ChrisR, Chris S., Pau

elf
Posts: 1416
Joined: Sun Nov 18, 2007 12:10 pm

Transitions

Post by elf »

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.
Image

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.
Image

ChrisLilley
Posts: 674
Joined: Sat May 01, 2010 6:12 am
Location: Nice, France (I'm British)

Post by ChrisLilley »

So the idea in the first set is to have a more gradual transition between sharp and oof areas, to integrate the background; and in the second series to have a more diffuse, oof background to isolate from the background?

elf
Posts: 1416
Joined: Sun Nov 18, 2007 12:10 pm

Post by elf »

Yes, that is correct. I think once we start focus stacking, we try to get everything in sharp focus. Sometimes it might be better to combine the ultra sharp and and not-so-sharp.

ChrisLilley
Posts: 674
Joined: Sat May 01, 2010 6:12 am
Location: Nice, France (I'm British)

Post by ChrisLilley »

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.

elf
Posts: 1416
Joined: Sun Nov 18, 2007 12:10 pm

Post by elf »

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.
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.

rjlittlefield
Site Admin
Posts: 23561
Joined: Tue Aug 01, 2006 8:34 am
Location: Richland, Washington State, USA
Contact:

Post by rjlittlefield »

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.
Chris, can you spell out for me how such data might be used?

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.
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.
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.

--Rik

Chris S.
Site Admin
Posts: 4042
Joined: Sun Apr 05, 2009 9:55 pm
Location: Ohio, USA

Post by Chris S. »

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

ChrisLilley
Posts: 674
Joined: Sat May 01, 2010 6:12 am
Location: Nice, France (I'm British)

Post by ChrisLilley »

rjlittlefield wrote:
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.
Chris, can you spell out for me how such data might be used?
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.

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.
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.
Essentially what I am asking for is an extra image which is a confidence map of the main, stacked image.
rjlittlefield wrote:
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.
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.
That makes sense. (And thanks for the description of what PMax actually is).

elf
Posts: 1416
Joined: Sun Nov 18, 2007 12:10 pm

Post by elf »

Chris 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
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 mind :)
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.
That would be handy, I expect that this could be generated from the final image just as easily as accumulating it during the stack.

morfa
Posts: 554
Joined: Mon Oct 12, 2009 2:14 pm
Location: Stockholm, Sweden
Contact:

Post by morfa »

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!

elf
Posts: 1416
Joined: Sun Nov 18, 2007 12:10 pm

Post by elf »

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.

Post Reply Previous topicNext topic