Learning Zerene Stacker, examine DMAP first.

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

Moderators: rjlittlefield, ChrisR, Chris S., Pau

LVF
Posts: 66
Joined: Sun Apr 23, 2017 4:17 pm
Location: Sequim, Washington

Learning Zerene Stacker, examine DMAP first.

Post by LVF »

I have been using Photoshop CS6 to stack photos and posting the results here. However, since nearly all members of this forum use Zerene Stacker to do stacking, I thought it best that I learn how to use Zerene Stacker.

In my usual method in learning how a program works, I am going to show, in detail, how the variation in DMAP Contrast Threshold (CT) affects a stack. I left the other variables at their default values: Estimation Radius (ER) = 10 and Smoothing Radius (SR) = 5.

The subject used for the photo stack was the 10.5 inch long Lens Align Ruler shown here:

Image

The photo equipment used consisted of a Nikon D500 camera with the Nikkor 300mm f/4E PF lens, and with a Nikon 17E II teleconverter between the camera and lens. This combination gives a 1:2 photo at 4 feet and a 1:3 photo at 6 feet. At 6 feet, which I used to photograph the stack shown in this post, the camera sensor field of view is 2.8 inches wide and 1.9 inches high.

The camera was mounted on a tripod, and I used live view to focus the lens by manually rotating the lens focus ring. I used a Nikon MC-36 Cable Release to fire the shutter, but not before removing my fingers off the focus ring for a few seconds to reduce vibration.

The ruler was laid at a shallow angle so that its full 10.5 inch length was in full view on the camera lcd. The ruler was illuminated with an OTT Lamp which gave a white balance near 5000 degrees Kelvin.

I took 32 photographs of the ruler by rotating the lens in very small increments. I started at the bottom of the ruler and proceeded up the ruler in the small increments. I could see, very clearly, the numbers come in focus on the lcd as I progressed up the ruler.

Here is the first Zerene Stacker stack of the 32 photos with a Contrast Threshold (CT) = 0.2, its default value:

Image

At this low value of CT, there is the dark smudges in white spaces, and ghosting around the edges, as pointed out to me by Rik.

Here is the stack at CT = 10:

Image

Same results.

Here is the stack at CT = 20:

Image

I see no improvement.

Here is the stack at CT = 30:

Image

Still no improvement.

Here is the stack at CT = 40:

Image

The same.

Here is the stack at CT = 50:

Image

Look at that. In one 10 increment step, the photo cleared up. No dark smudges and no ghosting. That is a very good stack of a 10.5 inch ruler. Also, notice that the background is sharp with no ghosting as in the previous stacks.

Lets go on to see what higher CT values do to the stack.

Here is the stack with CT = 60:

Image

It looks like there is no difference but there is. Take a look at the bottom left corner at the partial letter "O or partial D" against the black background. It is slightly blurred. Whereas, at CT =50, it is sharper with little blur. And on the right side, the white sheet of paper at the bottom ol the yellow sheets with green strips, is blurred, but not so much at CT = 50.

here is the stack at CT = 70:

Image

The bottom "0" next to the number 36, is blurring and the bottom half of the right side of the ruler is blurring.

Here is the stack at CT = 80:

Image

Now the top right "0" next to the top number 36, is blurred. And the yellow sheets with green strips, on either side of the ruler is blurring.

here is the stack at CT = 90:

Image

More blurring of the bottom and top right side "0", the edges of the ruler, and the tannish sheets of paper, a book, at the right of the ruler.

Here is the stack at CT = 100:

Image

It can be said that you do not want to use CT = 100, at least not for my stack. Rik, when would CT = 100 be useful?

Clearly, CT = 50, is the value to use, in my case, to get a good stack of the 32 photos of the Lens Align ruler taken at 6 feet, using Zerene Stacker.

Next, to see what variations in Estimation Radius and Smoothing Radius does to a stack.

Leon

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

Post by rjlittlefield »

The contrast threshold percentile value can be understood as the percentage of frame area that contains no detail useful for constructing the depth map. In your test image this means all the areas that are pure white or pure black, except very close to the black/white edges.

CT=100% has no value because that would mean that there is no useful detail anywhere in the frame.

However, values arbitrarily close to 100% can be appropriate when the frame consists of a lot of unfocused surround, with only a small subject in focus.

A situation that I commonly encounter in support requests is to have one or a few flowers photographed against a uniform background. It's not unusual in that case to need CT=80% or higher, corresponding to the percentage of frame area that is composed of either background or the featureless interior of petals. Again, the key is to adjust the slider to whatever point causes the smudges and halos to be covered by the mask.

--Rik

LVF
Posts: 66
Joined: Sun Apr 23, 2017 4:17 pm
Location: Sequim, Washington

Rik

Post by LVF »

Rik

Would you please look closely at the stack at CT = 50. Do you see any of the artifacts that you see in my previous flower stack photo?

I took these 32 photos with the same camera and lens. And I processed the 32 photos of the ruler exactly as I processed the flower photos, using Camera Raw CS6 and Photoshop CS6. I output the files as 32 tiff files for stacking.

So if it is my processing to tiff files, then the artifacts should show up here on the ruler stack.

However, if there are no artifacts using Zerene Stacker, then maybe it is Photoshop stacking the 32 tiff files that may be the problems.

Let me know what you find.

I decided to look at the CT = 50 stack more closely in Photoshop. To me the photo looks pretty clean at 100%.

At 200%, all the slanted black edges are starting to show the typical jaggies of slanted lines, but nothing uncommon for slanted edges.

At 300% the slanted black edges are definitely showing jaggies but no irregularities that I can see.

However, look at the right edge of the ruler. Where it overlaps the background tan book pages and yellow green stripped sheets of paper, the edge of the ruler at those locations is blurred. Very strange.

Leon

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

Re: Rik

Post by rjlittlefield »

LVF wrote:So if it is my processing to tiff files, then the artifacts should show up here on the ruler stack.
That's an attractive line of thought, but unfortunately digital imaging is more complicated than that. The images in this ruler stack are dominated by regions of uniform brightness bounded by high contrast edges. In contrast, the images of your flowers are dominated by smooth gradients. It would not be unusual for something like a sharpening algorithm to have quite different effects given those different inputs.
However, if there are no artifacts using Zerene Stacker, then maybe it is Photoshop stacking the 32 tiff files that may be the problems.
Possibly. But I know pretty well how Photoshop does its work, and from what I know those ripply textures in your flowers are not something that could be produced by their stacking method.
However, look at the right edge of the ruler. Where it overlaps the background tan book pages and yellow green stripped sheets of paper, the edge of the ruler at those locations is blurred. Very strange.
Not strange at all. This is a classic problem.

In your scene, there is a foreground object that is featureless and has a hard edge, partially occluding a background object that shows strong detail.

Looking at the source images with our human intelligence, it is simple to recognize the geometry that I just described, and then to imagine how we want the image to look: featureless white up to a hard edge, and then crisp background detail starting immediately beyond the edge and continuing outward beyond that. This is the image as it would be captured by a pinhole camera, or as it would be painted by a human artist.

But the aperture of your lens is not a pinhole. Instead it is a pretty broad disk, which accepts light in a sort of double cone that is quite narrow (limited mostly by diffraction) in the plane of focus, and progressively broader at greater and lesser distances. This finite aperture allows the lens to "see around" the foreground edge, so that your source images actually show background detail at places that would be hidden from the pinhole camera.

Again, given human intelligence it would not be difficult to recognize the geometry and to paint the scene as it would be seen by a pinhole camera. But our computer algorithms are not smart enough yet to do that. Instead, they make one or another compromises.

In the case of DMap, what happens is that the copious detail from the sheets of paper simply dominates the limited detail from the edge of the ruler, so the result image ends up showing a clean image of just the sheets of paper, with the ruler fuzzy in front of them.

If you were to run PMax, then this same region would be rendered differently, showing both the sheets of paper and a sharp edge of the ruler, with some of the paper detail showing "inside" the ruler, as if it were transparent. This is called "transparent foreground artifact".

These issues are discussed in more detail in the photomacrography.net thread "What causes halo?", and in the Zerene Stacker tutorial "Using Stack Selected to Retouch Transparent Foreground".

--Rik

mawyatt
Posts: 2497
Joined: Thu Aug 22, 2013 6:54 pm
Location: Clearwater, Florida

Post by mawyatt »

Rik,

The Nikkor 300mm f/4E PF lens has a Fresnel element, could this have any effect? Maybe in combo with the TC?


Best,

Mike

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

Post by rjlittlefield »

mawyatt wrote:The Nikkor 300mm f/4E PF lens has a Fresnel element, could this have any effect? Maybe in combo with the TC?
I have never run into such an effect, and offhand I can't think how it could be produced by a Fresnel element. For a while certain Nikon compact cameras were famous for producing large concentric rings when used to photograph through a microscope eyepiece, but that effect looked nothing at all like the ripple patterns that appear in Leon's flowers.

--Rik

LVF
Posts: 66
Joined: Sun Apr 23, 2017 4:17 pm
Location: Sequim, Washington

Rik

Post by LVF »

You, and probably most of your members, are way over my head when it comes to understanding stacking, and how to take several photos to be used for stacking.

I am going to bow out until I learn stacking at possibly near your members capability.

I will keep working at stacking but not posting for now.

Thank you for your comments and making me realize I have a lot to learn.

Leon

Post Reply Previous topicNext topic