DT sharpening is questionable

It is taken from Dabble’s video and it is actually one of the best explanations of the module (with mathematical in-depths).
I didn’t pass all the text here, I wrote a longer argument at Github why things like “laplacian” is rather scaring people away than causing curiosity.

2 Likes

No I don’t claim to know or not know…I do like to confirm which I can’t now but I think that these are pairs of laplacian transforms set to work on more coarse and fine details as determined by the wavelet range targeted in the first sliders…its just that one is the laplacian of the laplacian I think it is referred to so that there are combinations and I think its the one I mentioned that you can try that would give the same result from say slider 1 or 2 if you don’t have different direction settings… so what I was getting at is to call one details and one noise when you could get the same effect means that the targeting of the slider is not specific to details and noise unless you use other sliders to create that sort of adjustment… I am for sure not arguing that if any terminology or simplification could be found that for sure it would help… I find that I get the most impact by using the threshold and edge sliders with some basic movements in the other 8 but for sure it was a bit trial and error, and likely because my ability to “visualize” gradients of light and therefore to manipulate them is pretty poor… :slight_smile:

1 Like

Yes, the fourth slider is laplacian of laplacian.

The correlation is described nicely here.
(which is also, the main source of the details/noise idea)

Anisotropy cannot be reduced/simplified to horizontal and vertical.

How about along edge and perpendicular?

2 Likes

Around 44 min in AP’s very long video he moves very dymanically both the first and second order sliders and says they don’t impact noise again just his words but might negate calling the second order course noise…

So what I was trying to recall was this…

Take the 1st slider and match the change with the 2nd slider in the opposite direction.
Blend the image in difference mode. You will get a black image. If you move them in the same direction say 100% for 1 will be equal to 50% of 1 and 2… in the difference image…but if you move the direction for either the same amount say either 1 or 2 by 500% and then you see the difference in the result so its the combination of the two with a change from a zero value for the direction that makes the effect of order 1 different from order 2 and the same for 3 and 4… Basically what the tool tip says I guess. Given the possible combinations of direction and speed Im not sure detail and noise can be so literally applied to the names fo the sliders but that is just my interpretation and not worth much

As a long-time grumbler of the Diffuse or Sharpen module, I like the idea. Whether your labels are accurate, I can’t say, but I certainly appreciate the effort to make them more understandable.

I have probably done more testing, research and trial & error of that module than the average person, and I have got close to mastering it. Some of my thoughts and ideas are scattered around this forum. But then whenever I take a break from photo editing or that module for any length of time, I forget how to use it properly. Part of the problem is that there are no “anchors”. There are no reference points that help you understand where to start or finish. Compare it to the Contrast Equalizer, where you have nodes that correspond to wavelet levels. It’s clear where you need to go for fine and coarse, high and low, etc.

It is a powerful module that I simply can’t use with any kind of confidence, so I usually don’t bother anymore. Apart from a few presets, I prefer to use other modules that I do understand.

4 Likes

Math terms are tangent and normal IIRC

I’m not sure your labels help there, though. They may seem a more meaningful, but they don’t explain what’s happening either…
E.g. how do you explain that “coarse detail” and “coarse noise” have the same effect, until you start playing with the “direction” sliders. Come to that, what does a horizontal or vertical direction (or tangent and normal) even mean for noise (which should be isotropic, so no gradients) ?

For me, the idea behind the module isn’t all that hard to grasp. Then again, as a chemist I’m familiar with diffusion phenomena, and with their mathematical description. That same math occurs in a lot of places, btw, where change is driven by a gradient.

But let’s face it, the math behind “diffuse or sharpen” is rather more complicated, as it combines several ideas. That makes it hard to deal with in its current general form. (And that’s why there are so many presets provided.)

But putting names on the sliders which only appear descriptive may actually hinder understanding what’s going on.

And perhaps the “how and why” of this module cannot be explained without the math. So then you’ll have to treat it like a black box, and grasp what the sliders do through trail and error. Not much different from the way many deal with e.g. their phones… (or demosaicing, to stay within darktable, but that module gets very little discussion :stuck_out_tongue: )

4 Likes

As I see it, the DnS module is confusing, because it can be used for multiple purposes that don’t appear to overlap at first glance.

Perhaps we could provide different “views” on the underlying sliders, much like there are different views for the color calibration matrix.

One view for denoising, with a smaller number of appropriately labeled sliders, and one view for sharpening, one for local contrast, dehazing…

3 Likes

I don’t know if it’s my perception or an experience shared by others but I do find that the module has a nature such that you might arrive or direct it to an amazing result on one image and the you try to use it on another and it’s not nearly as good or even worse. I have about 4 sharpening presets that I have landed on and I try each one of those and maybe the no AA filter preset… I find it’s generally not bad for 1 to 3 iteration maybe 5 on a really bad images…So 4 or 5 presets one of which usually hits the mark out of the gate and then I tweak that a little if need be… I might be able to then use that on the next image.or two but then I’ll need to reevaluate as the result might make the image worse. It could then be a matter of opacity or iteration changes but often a different combination of setting works much better
I guess what I am trying to say is the way it targets and modifies an image with these diffusion based corrections makes it a very good custom editing tool but perhaps a bit less able to be one that is generically applied to a group of images and that might frustrate some users

Yes, I’ve definitely found the same. I spent ages one time creating a custom preset that created a lovely and subtle soft contrast at the coarse end of the wavelet scale. It works beautifully on some images, and then on others it’s far too obvious and ugly. I’m sure there’s a reason for it, and it’s not the module misbehaving, but it’s definitely a source of frustration when your presets give drastically different results depending on the image.

There’s probably so much overlap with the sliders that this will be too difficult or cumbersome to implement. But I like any idea like this that tries to provide frames of reference in the module.

I have previously suggested some kind of visualization to help us see what we’re working on. For example, the Retouch module has a visualization for the various wavelet scales. A mask or similar that shows what frequency level is being affected would be my dream feature. So, for example, you enable the mask and when you drag the Central Radius slider (which I believe is roughly equivalent to the node positions in Contrast Equalizer), you see an approximation of the wavelet scale being affected (similar to what you see in the Retouch module).

2 Likes

I was wondering if this could be to do with images of differing camera pixel dimensions, specifically high res vs. lower res. I took raws from dpreview.com where they check resolution with a “studio scene”, 20Mp EOS 6D and 50Mp EOS 5DSR. These are from the camera reviews. Taking the etching part of the scene and basic DT processing, here are the two images with D&S Hard Deblur, 6D first. For an easier comparison flicking between the two, I downscaled the 5DSR to the same pixel size as the 6D, which is full res. I think the 6D is perhaps better. It’s complicated by some moire in the 5DSR which the sharpening accentuates. The histogram is noticeably more red in the sharpened image in DT. Should sharpening do that?
etching-6D

etching-5DSR

Here is the 5DSR with no sharpening -
etching-5DSR-NoSharp

A quote from the manual

So using settings on images with different crops can give apparently different results…
Also, downscaling tends to soften the image, so the 5D image looking a bit sharper isn’t surprising.
Nor the the accentuation of the moiré by the sharpening (any sharpening algorithm would do that).

The module also decomposes the image to different frequencies using wavelets, not unlike contrast equalizer, and operates on these using a profile calculated from the two radii and the various “orders”. This aspect is not apparent from the sliders, only the source code (the best way to learn about this is to uncomment this line and watch the log).

FWIW, I think the module combines a lot of sophisticated algorithms and can be very useful, but should be redesigned from the ground up and reintroduced with a different name. The UI should should the profiles I mention above and maybe allow adjustment at different frequencies; it is not apparent that the combination used by the module is the only one that makes sense.

1 Like

Well, exactly like contrast equaliser (says so in the docs). For me, the kind of details behind the decomposition and radius sliders shouldn’t to be evident from the user interface, it’s an “implementation detail”. I really don’t need the extra charge of deciding how many layers I have to use, and how to weigh each of them…
That doesn’t mean it isn’t interesting (or useful) to see how it’s done, but that’s why we have docs and source code.

Go ahead. I know that prior to desiging this module, its author worked on deconvolution-based methods, and didn’t get anywhere usable (deconvolution is very nice on paper, but there are serious practical obstacles, like picking the correct kernel and avoiding artifacts in the result).

1 Like

Or you all can use contrast eq, local contrast, regular old sharpening… We are not exactly starved for options here.

3 Likes

Of course, but those old tools are, well, old, and boring. Not enough bells and whistles…

1 Like

is the 5dsr the one with no lowpass filter? because that might cause moire issues