Unsharp mask

An unsharp mask sharpens a picture by blurring a copy of it, subtracting the blurred copy from the original to leave only the fine detail, and adding that detail back at a chosen strength. Edges gain contrast, so the picture looks crisper, though no detail is added that the original did not hold.

Sharpening does not add detail. It adds contrast at the edges a picture already has, and the eye reads that contrast as sharpness. An unsharp mask is the standard way to do it, and its three settings explain most of what can go right or wrong.

The three steps

First a copy of the picture is blurred. The blur keeps the broad shapes and loses everything finer than its radius. Then the blurred copy is subtracted from the original. What is left is only the fine part: edges, texture and noise. Last, that difference is added back to the original, multiplied by the amount. At an edge from grey to a lighter grey, the dark side becomes a little darker and the light side a little lighter.

The settings

Amount is the strength of what is added back. Radius is the blur’s width: a small radius picks out fine texture, a large one works more like a local contrast boost. Threshold is the smallest difference worth sharpening; it stops the faint grain of a clear sky or smooth skin from being roughened.

The same building blocks, a blur and a comparison with the original, make other effects. A pencil sketch is a colour dodge of a picture by its own blurred negative, so flat areas turn white and edges stay dark. Pixelation goes the other way and averages detail away inside each block. ASCII art reduces a picture to one brightness value per character cell, much like a very coarse pixelation read out as text.

Frequently asked questions

Why is it called unsharp if it sharpens?

The name comes from the darkroom. A blurred, unsharp copy of the negative was laid over it while printing, and the difference between the two made edges stand out. Software does the same with numbers.

What do radius and threshold mean?

Radius is how wide the blur is, so how wide an edge counts as detail. Threshold is the smallest difference that is sharpened, so smooth areas such as skin and sky are left alone.

Can an unsharp mask rescue a blurred photo?

It makes a slightly soft photo look crisper. It cannot recover detail a shaken camera or a missed focus never recorded, and pushed too far it draws light and dark halos along edges.