Skip to content
CoreSource checked

Unsharp Masking

Sharpens an image by adding back high-frequency detail separated by blur.

Quick Facts

Compact metadata for implementation and discovery.

Category
Image Processing
Difficulty
Beginner
Family
Image Enhancement
Tier
Core
Status
Verified
Review
Source Checked
Sources
1
Formulas
1
Relationships
1
Code example
Ready
Visualization
Ready

Overview

Unsharp masking blurs an image, subtracts the blur to find detail, and adds scaled detail to the original image.

Core Concepts

blurred imagedetail layersharpening amounthigh-frequency boost

Quick facts

Complexity

Runtime and memory behavior at a glance.

Best

O(pixels)

Average

O(pixels * kernel)

Worst

O(pixels * kernel)

Space

O(pixels)

When to Use

  • Use when image enhancement needs blurred image.
  • Use when the input matches the assumptions behind image Enhancement.

When Not to Use

  • Avoid when image noise, lighting, or scale breaks the algorithm's assumptions.
  • Avoid when a simpler algorithm gives the required result with less setup.

What It Does

  • Sharpens an image by adding back high-frequency detail separated by blur
  • Uses blurred image and detail layer to guide the work.
  • Produces processed image.

Use Cases

  • Image enhancement
  • Feature extraction
  • Segmentation and motion analysis

Inputs

  • Image or image sequence
  • Kernel, threshold, or model parameters

Outputs

  • Processed image
  • Mask
  • Feature map or motion field

Key Formulas (1)

Unsharp mask

output = image + amount · (image − blur(image))
output = image + amount * (image - blur(image))

Adds scaled high-frequency detail back to the image.

Pseudocode

  1. 1.Normalize the image and choose border handling
  2. 2.Evaluate the local filter, statistic, model, or response for each relevant pixel or region
  3. 3.Threshold, rank, refine, or combine the responses
  4. 4.Return the mask, transformed image, feature set, or geometric estimate

Canonical Example

Input
a small grayscale image patch with a clear edge, corner, or region
Output
Processed image
Explanation
Unsharp Masking applies blurred image to produce processed image.

Implementation Notes

  • Handle borders and pixel coordinate conventions consistently.
  • Keep the blurred image step separate enough to test independently.
  • Keep coordinate conventions, border handling, and image normalization explicit in tests.

Common Pitfalls

  • Applying operations in the wrong color space can distort the result.
  • Test edge cases, not only clean examples.
  • Thresholds tuned on one clean image can fail under different lighting, scale, blur, or noise.

Interactive Mechanism Walkthrough

Spatial Primitive & Sweep-Line Canvas

Show the source image beside masks, filters, or motion vectors produced by the algorithm.

Unsharp Masking mechanism walkthrough step 1 of 4
Step 1 of 4: Normalize the image and choose border handling
image-processing-mechanism

Notes

Unsharp Masking should be used with the assumptions and tradeoffs of image Enhancement in mind.

Sources (1)

What each reference supports for this entry.

Digital Image Processing

Book

Image-processing textbook support for Unsharp Masking's pixel-neighborhood operations, filtering rules, and image-analysis role.

Explore Next

Good next jumps from the relationship graph, ranked for useful discovery.

Unsharp masking subtracts a blurred image to emphasize high-frequency detail.

Tags

Image ProcessingFilteringSmoothingEdge Enhancement