StrataQuest Home StrataQuest Glossary Sharp filter
Image Processing & Correction

Sharp filter

Output = input + α · (input − box-average input) — bring out fine structure by adding back what averaging removed

View
Definition
Sharp filter computes O = I + α · (I − B(I)), where B denotes a small box-average blur and α is a non-negative amount parameter. Equivalently: O = (1 + α) · I − α · B(I). The parenthesized term (I − B(I)) is the local high-pass residual — what averaging would have removed. Multiplying by α and adding back to the input emphasizes fine variation. At α = 0 the output equals the input; at α = 1, the canonical "one unit" of sharpening is applied; at α > 2, sharp boundaries develop visible halos (an artifact called overshoot that's sometimes desirable, sometimes not). The Unsharp filterLoading... substitutes a Gaussian blur for the box, producing smoother frequency response and is the standard scientific imaging choice.
Box-average high-pass
The simplest possible sharpening kernel
Amount α controls aggressiveness
0 = identity, 1 = standard, >2 = pronounced overshoot
Frequency-domain view
Boost of high frequencies, scaled by α
Sharpening amplifies noise too
Use with care for quantitative analysis

The math, in two registers

Start with the high-low decomposition. For any low-pass operator B (the box average, here), define the high-pass residual H = I − B(I). Then trivially I = B(I) + H — the image equals its low-pass plus high-pass parts. The sharp filter outputs:

O = I + αH = B(I) + (1 + α) · H = B(I) + (1 + α)(I − B(I))

Distributing: O = (1 + α)I − α · B(I). This is a single convolutional filter with kernel K = (1 + α)δ − αB, where δ is the unit impulse (the identity kernel, 1 at center and 0 elsewhere) and B is the box-average kernel. The kernel always sums to (1 + α) − α · 1 = 1, so the filter is brightness-preserving for any α.

Overshoot math: consider a step edge where the input transitions from value a on one side to b on the other, with b > a. The box average smears the step into a ramp; at the bright edge of the ramp, B(I) is less than I, so H is positive. The output I + αH is higher than I — that's the bright ridge. Just outside the ramp, on the dark side, B(I) exceeds I (because the box reaches across the step), H is negative, and the output dips below I — the dark moat. Overshoot is the mathematical consequence of high-pass boost combined with edge sharpness.

Simplified

The simple version of the math: each output pixel equals the input pixel plus α × (the difference between the input pixel and its small-neighborhood average). When α is 0, the difference contributes nothing and the output equals the input. When α is 1, the full difference is added. When α is 2, twice the difference is added — more aggressive sharpening with visible halos at edges.

Why halos appear: at a step edge, the local average straddles the step, so on the bright side the average is lower than the input (positive difference, brighter output) and on the dark side the average is higher (negative difference, darker output). This creates the characteristic bright-ridge and dark-moat signature of any sharpening operation.

Share This Term
Term Connections