StrataQuest Home › StrataQuest Glossary › Unsharp filter
BOM Operation

Unsharp filter

Subtract a blurred copy to lower a high background

View
Definition
Unsharp filter removes or attenuates high background. It blurs the input with a Gaussian or an Average filter to build a background model, then subtracts that model from the input. The blur keeps fine details out of the model, which is where the name comes from: the background model is unsharp. Kernel radius (px), default 25, sets the blur, and the output is darker where the background was high.
Kernel radius sets the scale
Default 25; wider than what you keep
Method picks the blur
Gaussian (default) or Average
Not a sharpening mask
Textbook unsharp masking adds detail back
Brightness is not preserved
High background darkens; levels shift

The math, in two registers

Start with the engine. Call the input I and the blurred background model B(I), where B is a Gaussian or Average blur over a window set by Kernel radius (px). StrataQuest's Unsharp filter outputs O = I − B(I). That is all the Engines Reference describes: generate a background model by blurring, subtract it, and the high background is attenuated.

The subtraction removes background as follows. Take a DAPI image where the tissue glows faintly everywhere and nuclei sit on top. If the nuclei are much smaller than a 51-pixel window (the default radius of 25), the blur averages each one into its surroundings, so B(I) follows the faint glow and hardly registers any single nucleus. Subtract it, and the glow drops toward zero while the nuclei, standing above it, remain.

The subtraction has a cost, general to any background model made by blurring. Near a bright object the blur is lifted by the object itself, so the model sits a little too high there, and the object's edges and the background just around it come out darker than they should. The wider the window relative to the objects, the smaller this effect; the reference example uses radius 60, a 121 × 121 window, on DAPI. How the engine handles values that would fall below zero isn't stated.

Now the textbook register, which is where the name usually comes from. In photography and most image software, an unsharp mask sharpens: O = I + α·(I − G_σ * I), the image plus a scaled copy of its own detail, where G_σ is a Gaussian of width σ. Its response is 1 for broad structure and rises toward 1 + α for fine detail, so overall brightness is kept and edges gain halos.

StrataQuest's engine keeps only the detail term, I − B(I), and drops both the add-back and α. That turns a sharpener into a background remover, and it is why the reference explains the name through the background model: the model is unsharp because fine details are left out of it. The darkroom origin of the word, a deliberately blurred negative used as a mask, is general history, not part of the engine.

Two other tools subtract a background estimate. The Background RemovalLoading... engine, added in Pre-Processing, builds a background model sized by Object Radius and subtracts it. The Top-hatLoading... operation subtracts a morphological opening, and in morphology generally an opening drops bright features narrower than its kernel without being lifted by them. If dark rims around bright objects get in your way, Top-hat may be worth comparing.

Source: StrataQuest 8.1 Engines Reference, ch. 6.3 (Unsharp filter pp. 152–154; Sharp filter p. 141; Average filter p. 117), ch. 5 (p. 15) and ch. 6.8 (Top-hat pp. 282–283).

Simplified

Blur an image hard and the fine details melt away, leaving only the slow, broad background. Subtract that blurred copy from the original and the background falls toward zero while small bright things, such as nuclei, stay. That is what StrataQuest's Unsharp filter does. Despite its name, it doesn't sharpen; the Sharp filter does that.

Share This Term
Term Connections