www.photomacrography.net :: View topic - DMap settings
www.photomacrography.net Forum Index
An online community dedicated to the practices of photomacrography, close-up and macro photography, and photomicrography.
Photomacrography Front Page Amateurmicrography Front Page
Old Forums/Galleries
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
DMap settings

 
Post new topic   Reply to topic    www.photomacrography.net Forum Index -> Macro and Micro Technique and Technical Discussions
View previous topic :: View next topic  
Author Message
ChrisR
Site Admin


Joined: 14 Mar 2009
Posts: 7255
Location: Near London, UK

PostPosted: Sun Mar 07, 2010 11:10 am    Post subject: DMap settings Reply with quote

I have noticed that Dmap can preserve detail better than PMax in some cases, but I have trouble with the Estimation and Smoothing settings.
Rik, is it possible to use the numbers to predict when this sort of thing will happen? The frame on the right is the DMap output.



I'm not sure about what stage this "stuff" pops up, but it can take (my pc!)an hour or more to run a stack so it would be worth avoiding.

Increasing the settings, purely by trial and error, gets rid of it, but what do they mean? Estimation of what? Smoothing of what?

I like that way that contrast is not boosted in DMap, and it handles specular highlights better, but I've hardly ever produced a usable image with it. Always there are the "contours" round focused parts on top of other focused parts at differernt depth, which are no good unless the image is to be used small enough, and there are too many to retouch.

Usually with Pmax I find I turn down the colours and contrast in Photoshop.
Back to top
View user's profile Send private message
rjlittlefield
Site Admin


Joined: 01 Aug 2006
Posts: 18244
Location: Richland, Washington State, USA

PostPosted: Sun Mar 07, 2010 1:13 pm    Post subject: Reply with quote

I think it's impossible to give an exact answer to your questions, so let me try giving one that is short and fairly accurate.

Recommendation Part 1: Make a copy of your image and shrink it in Photoshop until it appears really crisp when viewed at 100%. Note the shrink factor. Then in ZS, set Estimation Radius = 2 * Shrink Factor. Always set Smoothing Radius = 0.5 * Estimation Radius. Example: Suppose your image is 4K pixels wide, but you have to shrink it to 1K pixels wide before it looks crisp at 100%. Then Shrink Factor = 4 and you should try Estimation Radius = 8.

Recommendation Part 2: When ZS asks you to "Set contrast threshold", start with the slider full left (no added black in the preview window), then slide it right until all or most of the "blotches" in smooth areas are turned to black in the preview. See HERE for example.

Now, a bit of explanation.

At each pixel position, DMap estimates the best focused frame by analyzing pixel values in a small neighborhood around that position. The size of the neighborhood is specified by Estimation Radius.

If the neighborhood is too big, then it may include a substantial range of depths on the subject. In this case, some sort of average will be used. That average tends to be weighted in favor of image contrast, which causes loss-of-detail halos in low contrast areas that happen to be adjacent to high contrast areas at a different depth.

If the neighborhood is too small and does not contain much detail, then the estimate becomes vulnerable to pixel noise. In this case, the analysis is liable to produce a "depth" that is nonsense, essentially a random number. This causes blotches that are not focused and are often brighter or darker than the focused frame would be. The "contrast threshold" specifies which estimates will be ignored because they are too likely to be wrong. Places where the estimate is ignored get their depths filled in by interpolation from surrounding areas.

The goal of Recommendation Part 1 is to set a neighborhood size that is big enough to find most real detail, while being small enough to avoid most loss-of-detail halos.

The goal of Recommendation Part 2 is to set the best possible threshold, where "best possible" means the one that corresponds closest to human judgement.

The biggest limitation in DMap (and similar algorithms in other software) is that a single neighborhood size is used for all areas of the image. This essentially assumes (pretends) that all areas of the image contain identifiable detail at the same scale. For some images this is true enough, for others it is not.

In the example you show, it looks to me that the green leaves have strong detail at a fairly small scale, while the red petals and of course the OOF background do not. This is why you get blotches in the petals and background when the slider is set full left (Percentile: 0.0).

With DMap, when a single neighborhood size is not workable for an entire image, then at present your only recourse is to make two or more DMap runs using different radii, and combine those results by manual retouching.

The key difference between DMap and PMax is that PMax operates simultaneously at a wide range of neighborhood sizes, ranging from a couple of pixels wide to hundreds of pixels. This avoids some difficulties and introduces others, as you've noted.

It would be nice to have yet another stacking method that would combine all the good characteristics while throwing away all the bad. Not there yet, sorry!

--Rik
Back to top
View user's profile Send private message Visit poster's website
ChrisR
Site Admin


Joined: 14 Mar 2009
Posts: 7255
Location: Near London, UK

PostPosted: Sun Mar 07, 2010 2:30 pm    Post subject: Reply with quote

Thanks Rik. That will take some more reading to digest.

The "blocks" on the petal were there before the second part of the Dmap processing. Is it wrong to increase the extimation and smooting settings to get rid of it?
I'm puzzled immediately though by "before it looks crisp at 100%". Perhaps I'm being thik but I'm not sure what that means!
Here's the pic, PMax, fiddled with for 5 minutes. Not particularly sharp, due to wobbles I think. Inexpert fiddling. Focus banding, poor lighting, oh well...
here
Back to top
View user's profile Send private message
ChrisR
Site Admin


Joined: 14 Mar 2009
Posts: 7255
Location: Near London, UK

PostPosted: Wed Mar 10, 2010 8:07 am    Post subject: Reply with quote

There isn't much detail in that petal, but whatever I do, Dmap can't get all that there is. I've tried with Estimation Radius in a few steps from 1 to 40. High numbers are only better, as far as I can see, across most of the image.
The petal becomes an area of red fog.
Is that what's expected?
Back to top
View user's profile Send private message
rjlittlefield
Site Admin


Joined: 01 Aug 2006
Posts: 18244
Location: Richland, Washington State, USA

PostPosted: Wed Mar 10, 2010 11:50 am    Post subject: Reply with quote

ChrisR wrote:
I'm puzzled immediately though by "before it looks crisp at 100%". Perhaps I'm being thik but I'm not sure what that means!

Consider again the example I gave: "Suppose your image is 4K pixels wide, but you have to shrink it to 1K pixels wide before it looks crisp at 100%."

What I mean is that at 4K it looks blurred at 100% -- no detail at the pixel level. At 2K it still looks blurred at 100% -- still no detail at the pixel level. Finally at 1K it looks crisp at 100% -- now there is significant change in pixel value from one pixel to the next.

That part of the recommendation has the goal of getting a good Estimation Radius on the first attempt. If you've tried a range of settings already, then the recommendation is not relevant.

Quote:
There isn't much detail in that petal, but whatever I do, Dmap can't get all that there is. I've tried with Estimation Radius in a few steps from 1 to 40. High numbers are only better, as far as I can see, across most of the image.
The petal becomes an area of red fog.
Is that what's expected?

The way I'm interpreting your words, this is a problem that I have not seen before.

The blotchiness shown on right side in your first post is typical appearance when DMap can't find actual detail and is making nearly random decisions based on pixel noise, compression artifacts, or other non-subject content. Each pixel value in the image, at that stage of the method, comes directly from whichever frame was judged as being best focused at each pixel position. The blotchiness is caused by random choice of frames, combined with variation in brightness between frames.

I'm a bit surprised to see this level of blotchiness in a petal, especially in combination with what appears to be subject related structure in the blotchiness. Differences in brightness from frame to frame are common in background areas, where real background gets overlaid with OOF foreground. But it's not so common in foreground, which is what I interpret the petal to be.

If this were my stack, I'd go looking for some frames in the middle that got underexposed for whatever reason. I'm not confident there are some -- it's just a possibility to look for. If there are some, then one possible scenario is that underexposed frames produce blotchiness, which prompts us as users to increase the contrast threshold for DMap, which discards all the useful data, which ends up giving mush because incorrect depths get filled into the "missing" regions. A PMax, in this case, would still look fine because PMax is intrinsically robust against brightness differences.

Another issue that comes to mind... Are the source frames JPEG or TIFF? Sometimes (not often) JPEG will introduce enough compression artifacts to mess up stacking in smooth regions, even though the artifacts are not obvious to us humans.

And one more thought... DMap makes decisions based on grayscale brightness, not directly on RGB triples. If the visible detail consists mostly of hue changes, not brightness, then our eyes might see it while DMap would miss it. I doubt that's the case, but again this might be useful background information sometime.

Bottom line is that I'm struggling for ideas. If you can't figure it out, perhaps you can send the stack to support@zerenesystems.com as discussed previously?

Quote:
Here's the pic, PMax...

Now it's my turn to be puzzled. In the PMax image, I can't find the same leaf and petal that I see in the crop you posted initially. Am I just missing it, or is this a different composition?

--Rik
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    www.photomacrography.net Forum Index -> Macro and Micro Technique and Technical Discussions All times are GMT - 7 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group