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 .

Photoshop Photo Effects Tutorials 2024

  Photoshop Photo Effects Tutorials Everyone loves Photoshop effects. Not only are photo effects fun to create, but they’re a great way to learn Photoshop since they often introduce us to tools, commands or other features we might otherwise never know about! All of our Photoshop effects tutorials are written with beginners in mind, with easy-to-follow, step-by-step instructions. See our complete list below, or download our tutorials as  print-ready PDFs ! Fade an Image to Color in Photoshop Faster with Live Gradients Learn how to fade an image to color with Photoshop the new and easy way using live gradients! How to Add Falling Snow to Photos with Photoshop Learn how to add realistic falling snow to your winter photos with Photoshop. Get Better Color Halftone Effects in Photoshop Learn how to create more realistic color halftone patterns using Photoshop’s Color Halftone filter and this simple trick. How to Create a Halftone Dot Pattern in Photoshop Learn how to turn your photo into a h

Ridiculously Cool Photoshop Text Effect Tutorials

  Easy Photoshop Text Tutorials for Beginners If you’re still learning the fundamentals of design or want some quick-and-easy text ideas to jazz up your print designs, these beginner tutorials will be a big asset. In your lessons you’ll learn how to apply texture and 3D effects, create logos, utilize masks and other simple techniques for enhancing your text. 1.  Using Text As A Container For More Text In Photoshop 2.  Glossy Emblem Text Effects 3.  Create a Realistic Emboss/Deboss Effect 4.  Icy Styles in Photoshop 5.  How To Create a Gold Text Effect in Photoshop 6. Moon Shine Text Effect 7. Simple Styled Text with Stars Effect 8.  Elegant Glossy Gold Text Effect 9.  Hipster Text Effect in Photoshop CS6 10.  The Sugar Bag Effect 11.  Easy Chalk Ornament Typography in Photoshop 12.  Abstract Shining Text Effect with Groovy Font 13.  Easy Plastic Text with Layer Styles In Photoshop 14.  Papercraft Text Effect 15.  Making a Clipping Mask With Text In Photoshop 16.  Simple Bokeh Text Effe