Lulumoy Studio

Math guide

Sharpen

Unsharp mask: subtracts a blurred version from the image to extract the detail and adds it back amplified.

I′=I+a(I−Gσ∗I)=(1+a)I−a(Gσ∗I)
Gσ ∗ I is the Gaussian blur. I − Gσ ∗ I is a high-pass filter: edges and textures smaller than a few σ pixels.

Parameters

ParameterMeaning
Amounta, detail gain. 0 = no change; high values create halos.
Radius (sigma)Blur σ: scale of the details that are boosted.

References

  1. OpenCV 4.x documentation — Image Filtering (GaussianBlur, blur, medianBlur, bilateralFilter, morphologyEx). docs.opencv.org/4.x/d4/d86/group__imgproc__filter.html
  2. R. C. Gonzalez, R. E. Woods. Digital Image Processing, 4th ed. Pearson, 2018.