Skip to main content

SHARPENING: UNSHARP MASK


SHARPENING: UNSHARP MASK

An "unsharp mask" is actually used to sharpen an image, contrary to what its name might lead you to believe. Sharpening can help you emphasize texture and detail, and is critical when post-processing most digital images. Unsharp masks are probably the most common type of sharpening, and can be performed with nearly any image editing software (such as Photoshop). An unsharp mask cannot create additional detail, but it can greatly enhance the appearance of detail by increasing small-scale acutance.

CONCEPT

The sharpening process works by utilizing a slightly blurred version of the original image. This is then subtracted away from the original to detect the presence of edges, creating the unsharp mask (effectively a high-pass filter). Contrast is then selectively increased along these edges using this mask — leaving behind a sharper final image.
Step 1: Detect Edges and Create Mask   Step 2: Increase Contrast at Edges
  Original   Higher Contrast Original
- Blurred Copy   Unsharp Mask
Original
     
= Unsharp Mask Image Unsharp Mask   = Sharpened Final Image
Note: The "mask overlay" is when image information from the layer above the unsharp mask passes through and replaces the layer below in a way which is proportional to the brightness in that region of the mask. The upper image does not contribute to the final for regions where the mask is black, while it completely replaces the layer below in regions where the unsharp mask is white.
If the resolution in the above image is not increasing, then why is the final text so much sharper? We can better see how it works if we magnify and examine the edge of one of these letters as follows:
Original Sharpened
Note how it does not transform the edges of the letter into an ideal "step," but instead exaggerates the light and dark edges of the transition. An unsharp mask improves sharpness by increasing acutance, although resolution remains the same (see sharpness: resolution and acutance).
Note: Unsharp masks are not new to photography. They were traditionally performed with film by utilizing a softer, slightly out of focus image (which would act as the unsharp mask). The positive of the unsharp mask was then sandwiched with the negative of the original image and made into a print. This was used more to enhance local contrast than small-scale detail.

BIOLOGICAL MOTIVATION

Why are these light and dark over/undershoots so effective at increasing sharpness? It turns out that an unsharp mask is actually utilizing a trick performed by our own human visual system. The human eye sees what are called "Mach bands" at the edges of sharp transitions, named after their discovery by physicist Ernst Mach in the 1860's. These enhance our ability to discern detail at an edge. Move your mouse on and off of the following image to see the mach band effect:
(Alternating with a smooth gradient enhances the mach band effect)
Note how the brightness within each step of the gradient does not appear constant. On the right side of each step you will notice it is lighter, whereas on the left it is darker — very similar to the behavior of an unsharp mask. Move your mouse over the plot below to see what is happening:

IN PRACTICE

Fortunately, sharpening with an unsharp mask in Photoshop and other image editing programs is quick and easy. It can be accessed in Adobe Photoshop by clicking on the following drop-down menus: Filter > Sharpen > Unsharp Mask. Using the unsharp mask requires understanding its three settings: "Amount," "Radius," and "Threshold."
Unsharp Mask Settings In Photoshop
Amount is usually listed as a percentage, and controls the magnitude of each overshoot. This can also be thought of as how much contrast is added at the edges.
Radius controls the amount to blur the original for creating the mask, shown by "blurred copy" in the TEXT illustration above. This affects the size of the edges you wish to enhance, so a smaller radius enhances smaller-scale detail.
Threshold sets the minimum brightness change that will be sharpened. This is equivalent to clipping off the darkest non-black pixel levels in the unsharp mask. The threshold setting can be used to sharpen pronounced edges, while leaving subtle edges untouched. This is especially useful to avoid amplifying noise, or to sharpen an eye lash without also roughening skin texture.

COMPLICATIONS

Unsharp masks are wonderful at sharpening images, however too much sharpening can also introduce "halo artifacts." These are visible as light/dark outlines or halos near edges. Halos artifacts become a problem when the light and dark over and undershoots become so large that they are clearly visible at the intended viewing distance.
Soft Original
Mild Sharpening
Over Sharpening
Remedies: The appearance of halos can be greatly reduced by using a smaller radius value for the unsharp mask. Alternatively, one could employ one of the more advanced sharpening techniques (coming soon).
Another complication of using an unsharp mask is that it can introduce subtle color shifts. Normal unsharp masks increase the over and undershoot of the RGB pixel values similarly, as opposed to only increasing the over and undershoots of luminance. In situations where very fine color texture exists, this can selectively increase some colors while decreasing others. Consider the following example:
Soft Original
Normal RGB Sharpening
(Visible Cyan Outline)
Luminance Sharpening
When red is subtracted away from the neutral gray background at the edges (middle image), this produces cyan color shifts where the overshoot occurs (see subtractive color mixing). If the unsharp mask were only performed on the luminance channel (right image), then the overshoot is light red and the undershoot (barely visible) becomes dark red — avoiding the color shift.
Remedies: Color shifts can be avoided entirely by performing the unsharp mask within the "lightness" channel in LAB mode. A better technique, which avoids converting between color spaces and minimizes posterization, is to:
  1. Create a duplicate layer
  2. Sharpen this layer like normal using the unsharp mask
  3. Blend sharpened layer with the original using "luminosity" mode in the layers window

REAL-WORLD EXAMPLE

Move your mouse over unsharp mask and sharpened to see how the sharpened image compares with the softer original image. The difference can often be quite striking.
Unsharp Mask Example Image
Original Unsharp Mask Sharpened
(Unsharp mask brightened slightly to increase visibility)

Comments

Popular posts from this blog

Use x-ray techniques in Photoshop to show naked skin through clothing

    Do those new naked body scanners have you freaked out at the airports? As far as the TSA is concerned, those x-ray machines are here to stay, but you might as well take comfort in knowing that airport security guards aren't the only ones looking at your private parts. Practically anyone with a computer can manage to see through your clothes, and it's all thanks to a little program called Photoshop. Thanks, Adobe. With a few tweaks using the tools in Photoshop, you can see those boobs in no time, male or female. The video is in German, but it's not hard to figure our what's going on, especially if you're familiar with Photoshop. First, create a few duplicate layers, then get a handle on some of these tools to make the naked body through the clothes: * Auswahl erstellen (Create Selection) * Tonwertspreizung (Input Levels) * Belichtung (Exposure) You can also do this see-through clothing effect in free design programs, such as  GIMP .

40 latest creative photoshop text effects

Create a Glowing Liquid Text with Water Splash Effect in Photoshop In this tutorial, we will show you the steps we took to create a Glowing Liquid Text Effect in Photoshop. We will be practising the use of liquify filter, layer blending options, as well as some image adjustments. Create a Realistic Wooden 3D Text Image In this tutorial we are going to take a few 2D textures as well as a few Photoshop techniques to create a realistic 3D text image. Easy X-Ray Typography In Photoshop In this tutorial we will show you how to create a simple x-ray effect of a letter, in this case the Abduzeedo logo A. The whole process is quite simple but it will require a couple of hours to pull it off. Easy Furry Text In Photoshop In this tutorial we will show you how to create a really cool and super simple furry text in Photoshop CS6. We will use basic filters and tools but it’s nice to say that we took advantage of the a new feature in Photoshop CS6 that is to apply layer...

Royal 3D Text Effect in Photoshop CS6

  Just make sure to check the 3D settings under Edit -> Preferences -> Performance, and Edit -> Preferences -> 3D. Default values should work fine, but if anything seems to be not working properly you can always check those settings. Step 1 - Create a new 1600 x 1200 px document and Fill the Background with black. Create the text in white using the font Dunkin Sans. The font size is 400 pt and the text is better written in All Caps (if you’re not using only numbers). Step 2 - With the text layer selected, go to 3D -> New Extrusion from Selected Layer. This will instantly convert the text layer into a 3D layer. All the 3D scene elements can be found in the 3D panel (Window -> 3D). Click the main mesh name to edit its settings. - The 3D Mesh settings and attributes can be accessed and modified through the Properties panel (Window -> Properties). If you scroll down the Properties panel you’ll find the Character Panel button, which ...