Helpful Posts: 0
24th April 2008, 09:04 AM
Unsharp mask: what does a radius of less than one pixel mean?
Lately I've played with the Unsharp Mask in Photoshop, and was amazed by the magic power it offers.
Another (mathematical) question though, how can one create a filter with radius values like 0.2? For integer radius like 1, 2, 4 pixels, I can understand -- we just put a 3x3, 5x5 matrix as in Filter-->Others-->Custom , but 0.2...hmm, it just doesn't make sense to me.
25th April 2008, 07:52 PM
Re: Unsharp mask: what does a radius of less than one pixel mean?
First, let's look at what is happening during an unsharp mask in order to understand where this radius value applies. In this site's tutorial on sharpening using an unsharp mask (USM), we can see that a blurred version of the original photo is effectively subtracted from the original to create a mask. This mask decides which portions of the photo will become higher in contrast:
The radius parameter describes the characteristic radius of the blur used to create the unsharp mask. As you have rightly asked, then what is the relevance of a blur radius which is very small? A radius of 0.2 pixels, for example, should not noticably affect the image...right??? (because the blur would not really extend into adjacent pixels, so all pixels would remain more or less the same)
Photoshop is unfortunately short on details when it comes to the specifics of their algorithms. However, the unsharp mask technique is reasonably standardized so we can look to programs such as Matlab, GIMP, Image Magick and others for guidance. Assuming Photoshop is similar, the key here is that the radius number entered is actually in addition to half the center pixel. The diagram below shows what it looks like when we enter a radius value of 0.5:
(The above diagram shows the radius for just one pixel;
the USM algorithm actually applies this gaussian blur for every pixel in the image.)
Note how the total length of the blue arrow is actually 0.5+0.5=1 pixel. This means that even radius values as small as 0.2 will extend into adjacent pixels---thereby having a visible effect. This is because this radius describes the width of a gaussian blur (which is a blur whose strength falls off like a bell curve), so there is not zero blur beyond the radius, just much much less. This is important because very small values (such as 0.2 or 0.3) will not induce visible halo artifacts because their effect pretty much only extends to adjacent pixels.