How to recursively sharpen using Rawtherapee?

I think it’s an interesting question whether it should or not (I think it should apply the second round of sharpening as long as the tool is activated by the user). Please let me know if you’d like to me open an issue.

I agree that it should call pr-sharpening in this case.

1 Like

No need to do that. I’m already working on a fix :wink:

1 Like

Live support. :+1:

2 Likes

While I don’t think this objection to the referenced article is related to my inquiry I do get your point. As it happens I came across that article by reading this article in Wikipedia. It is one of the only “External Links” that still works. Wikipedia is widely used and I think you are much better positioned than me to undertake correction of the problem for Wikipedia.

As it turns out, I did also perform the test case being described in the article and it seemed to re-enforce the point the author was making. There is reason to believe that I’m not the only one subjected to this misinformation.

Oh my! It looks like I am guilty of some carelessness when it comes to choice of terminology. I certainly was not trying to invent any new concepts when it comes to sharpening. After reviewing the excellent lesson provided herein regarding the terms “recursive” and “iteration” I’m inclined to think that I meant neither. I was simple trying to ask how a user of RT could request to have the “Unsharp Mask” applied multiple times. Possibly the word “repeatedly” would have been a better choice than “recursively”. Sorry about that but I am grateful for the lesson.

1 Like

The Wikipedia article is reasonable, although I wouldn’t distinguish artificially between “sharpness” and “local contrast enhancement”. I would say it always increases local contrast, and “local” is determined by the radius and “amount” determines how much the contrast is increased.

If we repeat a USM at a certain radius, the overall effect is roughly the same as one USM at the same radius but an increased amount. This is quite different to a USM at a larger radius, because the definition of “local” is different.

As with many operations, the concepts are not easy to explain. It’s best to play with images and see what happens.

I show an image subjected to USM in different ways. The four numbers are ImageMagick parameters: radius (0 means auto-calculated), sigma, gain (ie “amount”) and threshold.



Doing a USM twice:

Doing a USM once, with a larger gain (amount):

(If some images shrink on your computer, right-click to see them full size, or download them, or something.)

We can see that doing a USM twice is closer to one USM with a larger gain, than it is to one USM at a larger radius.

2 Likes

I might add:

  1. Negative amounts will extrapolate from the original past the blur. This is not often useful.

  2. Amounts greater than one are possible, to exaggerate the effect.

  3. In the above post, I have used large radii and amounts to make the effects obvious. We often want more subtle effects.

  4. Are two consecutive USMs ever useful, or can we always make the same effect with a single USM? I think they can be useful. For example, a heavy amount with a small radius, followed by a small amount of a large radius:

magick toes.png -unsharp 0x1+1+0 -unsharp 0x5+0.2+0 usm_u6.jpg


I don’t think the same effect can be obtained from a single USM.

Ah, I thought you were quoting something you had read. No worries, the discussion we’ve had surrounding it has been interesting.

Not sure I follow. Could you elaborate?

Sure. The USM process works from two images: the original input, and a blur. The output is an image that is an interpolation between those images, or an extrapolation on the same continuum usually beyond the original, but it can be in the opposite direction, beyond the blur.

The “amount” parameter in ImageMagick “-unsharp” is called “gain”. (The GMIC “unsharp” command works in much the same way, but prohibits negative amounts.)

A gain of zero gives no change, so output=input.

A gain greater than zero gives an extrapolation from the blur beyond the original, so the result is sharper than the original.

A gain between zero and minus one is an interpolation between the original and the blur.

A gain less than minus one gives an extrapolation from the original beyond the blur, so the result is blurrier than the blur. However, that result isn’t like an ordinary blur, but gives a kind of ghosting effect.

1 Like