# Thread: Sharpening - how come the radius is measured in 'points' of a pixel?

1. ## Sharpening - how come the radius is measured in 'points' of a pixel?

Hi,

I've been reading all the tutorials on sharpening and now have a much better understanding of how it all works. I am confused though about how the radius works in 'Unsharp Mask' and the like. My understanding is that a pixel is only able to be one tone/colour so how can the radius sharpen by 0.1 of a pixel?

Hopefully someone can explain this to me :-)

Clare

2. ## Re: Sharpening - how come the radius is measured in 'points' of a pixel?

Originally Posted by Clare West
Hi,

I've been reading all the tutorials on sharpening and now have a much better understanding of how it all works. I am confused though about how the radius works in 'Unsharp Mask' and the like. My understanding is that a pixel is only able to be one tone/colour so how can the radius sharpen by 0.1 of a pixel?

Hopefully someone can explain this to me :-)

Clare
Hi Clare,

Welcome to the CiC forums from me, great to have you start with such a good question

This is my theory; I'm an ex-engineer with an understanding of digital image processing (albeit video) and it is my firm belief that they achieve this by a technique known as "over sampling", this brings many beneifits when it comes to "digital maths" necessary to transform the pixels of an image in any way. I'm not talking of changing levels here (exposure or blacks, curves, etc.), but pixel position; so I mean rotations, re-sizings, morphing, cloning and sharpening, etc.

What happens is that when an image is opened in your computer's memory for editing, instead of creating one number per pixel (ok 3 if you consider Red, Green and Blue), they digitise at 10 times that spacial resolution. This allows the maths relating to transform operations to be more accurate and avoid the positional equivalent to quantising errors that can result in posterisation of an 8 bit level image.

The pixel position oversampling is of no benefit (or detriment) if all you do is change the exposure, black level, etc., but as soon as you do one of those other listed operations above, it pays dividends, and they are greater the more you process the image; e.g. perspective correction, and multiple operations, one after the other.

Sure, it gets converted back to 'whole pixels' when saved back at a usable resolution, but that process then sets the levels of those pixels based on the average of the values across the ten sub-pixels that make it up, almost certainly with reference to neighboring pixels (at 4 sides and four corners) to assist in even gradient slopes where they should be. To my mind, this must result in a less 'jaggy' output image.

To me it is the obvious engineering way to do it.
You wouldn't do your accounts without the pence or cents, even if you did only want answer rounded to the nearest whole pound, dollar or euro.

Clear as mud?
Well, I know what I mean, and I hope I have explained well enough for you (and others) to understand - but explaining things is not always my strongpoint, I'm told

If I have confused things further, do ask for clarification.

If anyone else with firm 'inside knowledge' of the workings of Photoshop/GIMP, etc. can confirm or deny my theory, don't hold back either.

All the best,

3. ## Re: Sharpening - how come the radius is measured in 'points' of a pixel?

Hi Clare,

Image sharpening is performed by using the values of neighbour pixels to increase the contrast at your pixel of interest. This is done by enhancing any gradient of the image intensity along a given axis. For example in a black and white image a light grey pixel next to a dark grey pixel may define an edge line. This can be made sharper by increasing the gradient between the light and dark. Making the light pixel white and the dark pixel black will make the local contrast higher and the line will look sharper.

This works well but to maintain the global tone the effect has to be reduced further away from the edge. This causes the characteristic halos around high contrast edges where the lightening and darkening has been overdone and then reduces away again to the original level. Take a look at the overshoot and undershoot example in the CiC tutorial:

https://www.cambridgeincolour.com/tu...sharpening.htm

This process can get more complicated by how the pixels values are used and how many neighbours are involved. In the case of an unsharp mask the effect is produced by using Gaussian curves to assign weights to each of the pixel neighbours. A Gaussian curve looks like a bell. You can see one here:

http://en.wikipedia.org/wiki/Normal_distribution

As you can see the bell shape can be narrow or wide. If you put the centre of the bell on your pixel of interest then the rest of the curve will cover the neighbours. The further from the centre the smaller the weights for the neighbours until the weight is effectively zero.

For a Gaussian curve the width is described by the standard deviation. Over 99% of the area under the curve is within 3 standard deviations of the middle. It is normal to ignore the curve outside this to save calculation time. The radius of an unsharp mask is actually the standard deviation of the Gaussian curve that is used. So you can use a value smaller than 1 and still have weights applied to the neighbours.

Given that the curve drops smoothly to zero there reaches a point where the effect of the neighbour pixels is negligible. This is usually set as the smallest value for your sharpening radius. In Adobe Lightroom this is 0.5. However other software may use different scaling factors, for example the Fineness setting in Canon's Digital Photo Professional (DPP) goes from 0 to 10. Rest assured that the lowest value possible in your software is the value at which minimal sharpening is applied. Anything below this you would not be able to notice.

You can see the effect that radius has by setting the strength of sharpening to maximum and any masking/protection of texture to zero. In Lightroom this is the Detail slider, DPP calls it Threshold. This setting basically protects some edges from being sharpened. With these settings simply adjust the radius and you should see the sharpening halos grow around high contrast edges as more neighbours are involved in the calculation.

Hope this helps.

Alex

4. ## Re: Sharpening - how come the radius is measured in 'points' of a pixel?

Alex and Dave,

Thank you for the explanations - I am now going away for a few days to try and process this information :-) no in all seriousness this helps a lot. If I have understood correctly (in very simple terms) 'to make sure that you acheive the best result the value (colour and tone) of the pixels is in effect divided by 10 in order that the program can calculate the most appropraite solution to the what you are asking it to do.'

I might stick to some slightly simpler questions from now on :-)

This forum is great though very glad I joined

Thank you
Clare

5. ## Re: Sharpening - how come the radius is measured in 'points' of a pixel?

Hi Clare,

A simpler way to put it would be that the radius can have a value of less than 1 pixel because the sharpening effect extends beyond the radius. The minimum value for the radius is set at the level where no neighbour pixels are involved, i.e. there is no effect when using a smaller radius.

As with most image processing tools the best way to learn is to experiment. Just remember to keep your original image so you can always start again if you decide you do not like your edits.

There are many different editing tools available for free and others at low to medium cost. If you need more advice then there are plenty of previous forum posts about this or you could ask specific questions. You will get a lot of useful advice.

Alex