The Capture Sharpening documentation is online

The brand new English documentation for the Capture Sharpening tool has finally arrived at RawPedia!

You can read it in the Capture Sharpening documentation page.

Feedback will be welcomed.

I want to express my gratitude to @heckflosse and @Wayne_Sutton for their invaluable help while writing it. Thanks! :smiley:

And for the rest of you: enjoy! :wink:


Hello @XavAL

Thanks a lot! :slight_smile:

1 Like

Thank you for the well detailed explanation of the tool with graphics examples - I enjoyed it very much and learned more about the capture sharpening tool.

My two unanswered questions after read (maybe this points should be in the doc, or maybe not)

  1. corner boost - what is the value in the corner after aplying corner boost - is it additive / multiplicative ? E.g. when radius is set to 0.8, and corner boost is set to 0.5, what is the value of the radius in the corner ?
  2. if it is possible to explain it in 1-2 sentences in english without equations - how is the radius automatically calculated ?
1 Like

It’s 1.3


It’s calculated from the raw green pixels using inverse gaussian sigma calculation

1 Like

Thank you for both answers, and I have to confess that the second answer fulfilled the requested requirements (in english, no equations:) ), but did not cause me to understand more about the process. But I fully understand that it is complicated and sometimes equations and matematics is the best answer, especially perhaps when dealing with de-convolution.


let G1,G2 be the diagonal pair of green pixels with distance sqrt(2) with the maximum ratio r of all such pairs of pixels, where r is defined as max(G1,G2)/min(G1,G2). Also let’s assume that G1 and G2 > 0 and neither G1 nor G2 are clipped highlights.

The resulting sigma for gaussian blur then is

sigma = sqrt((1 / (log(1 / r) /  2)) / -2)

Edit, simplified formula:

sigma = sqrt(-1 / log(1.f / r))

Edit, even more simplified formula:

sigma = sqrt(1.f / log(r));

so … I try to interpret the equations …

if the lens / camera is extra sharp, and transmits the contrast signal (e.g. black to white) ideally, then the difference in the sharpest place is very high.

if the lens / camera is less sharp, then there will be some bleeding between those two pixels, and then there will be some mix-up between the two.

So I assume that the automatic radius is calculated using the sharpest region in the picture to determine the accurate radius of aberrations … ? somewhat correct ?

Hmm, if it is true, than the parameter is calculated using only one pair of pixels - what about the noise ?


Too much noise usually leads to a lower calculated radius. Though for low to medium ISO files it works quite well.

Interesting, Thank you.

I was about to learn how it works, but now I cannot help myself and ask - maybe it would be beneficial if we use top 10 max values and average them instead of one ?

On the other side - if it works at low iso than it is ok, because in my experience deconvolution at high iso leads to more noise more grain and often I turn it off.

In case you want to take a look at the code:

Hmm question is - how to determine when the automatic radius calculation algorihm is “good” ?

Maybe - use a tripod, make a iso 100 picture, and 3200 and 12800 picture and when the radius is consistently calculated across iso’s - then it’s good ?

what do you think ?

The current algorithm is only based on math and the assumption that the max ratio is not caused by noise.
Have a look at the calculation of gaussian blur kernels.

Now assume you have a maximum ratio of r between two pixels

Treat the larger pixel as the center pixel of the kernel. Lower pixel has distance x = 1 and y = 1 to center pixel.

Now use the formula

G(x,y) as described above

What we want is the following:

G(0,0) = r * G(1,1)

the first term can be eliminated as it does not depend on distance
So we get:

1 = r * e^(-2 / (2 * sigma^2))

1 = r * e^(-1/ sigma^2)

1/r = e^(-1 / sigma^2)

log(1/r) = -1 / sigma^2

sigma^2 = -1 / log(1/r)

sigma^2 = -1 / (log(1) - log(r))

sigma^2 = -1 / -log(r)

sigma = sqrt(1 / log(r))

My question about “good” radius calculation was about the empirical / numerical way to assess whether the algorithm for radius made a good job or not.

Below is the experiment. I took some photos from with different isos, the picture appears to be the same with the same equipment/aperture and tripod. Different iso’s.
The radius should be the same (assumption is that as equipment and lens and aperture is the same, maybe the radius also should be the same). The results:
Iso 100 → radius 0.66
Iso 6400 → radius 0.41
Iso 12800 → radius 0.40

Another thing is that, when radius is small, then the artifacts are also small, so it can be beneficial for higher isos not to introduce more grain, so we have some kind of self-turning off of capture sharpening mechanism.

If this discussion is off topic, or should be performed somewhere else tell me. I also tried to modify the code to use average of top 10 pixel pairs to check what happens (my first try to edit RT code:) ).