Blur & Sharpen

Blur

-/blur/
-/blur/:strength/

Blurs images by the :strength factor. The filtering mode is Gaussian Blur, where :strength parameter sets the blur radius — effect intensity. Technically, :strength controls the Gaussian Blur standard deviation multiplied by ten. The value of :strength might come up to 5000, while the default value is 10. Note, different :strength values do not affect the operation performance.

Original image
Original image. 17Kb
Blurred image
/blur/20/ 10Kb
Max image blur
/blur/100/ 6Kb

Blur Region

-/blur-region/:two_dimensions/:two_coords/ -/blur-region/:two_dimensions/:two_coords/:strength/

Blurs the specified region of the image by the :strength factor. The filtering mode is Gaussian Blur, where :strength parameter sets the blur radius — effect intensity. Technically, :strength controls the Gaussian Blur standard deviation multiplied by ten. The value of :strength might come up to 5000, while the default value is determined automatically based on the size of the region. Note, larger :strength values do not affect the operation performance.

Original image
Original image.
Blurred image region at coordinates
/blur_region/130x180/220,25/
Smart object blur on an image
/blur_region/30%x80%/50%,10%/20/

Blur Faces

-/blur-region/faces/
-/blur-region/faces/:strength/

When faces is specified the regions are selected automatically by utilizing face detection.

Original image (face)
Original image.
Face image blur
/blur-regions/faces/
default strength
Max face image blur
/blur-regions/faces/250/
stength 250

Unsharp Masking

-/blur/:strength/:amount/

There is no specific operation for unsharp masking. Instead, you can adjust the :amount of the blur applied. :amount can be set in the range from –200 to 100 and defaults to 100.

Where the :amount of:

  • 100 stands for the opaque blur image.
  • 0 stands for no changes in the image, the output is equal to the original.
  • Any negative number would mean subtracting the difference between the blurred and original images from the original. That is the unsharp masking behavior.

You can implement unsharp masking with a large blur :strength (100;300) and a small negative :amount (–50;–10) to increase local contrast. Fine-tuned local contrast gives a “pop” to an image and mimics the look created by camera lenses. Local contrast enhancements let you minimize the effects of haze, lens flare, and “dull look.”

When implemented with a small :strength, unsharp masking increases image sharpness. For instance, the /blur/10/-200/ transformation is the full equivalent of /sharp/20/ with the exception that sharp operates much faster.

You can combine unsharp masking with the sharp operation to increase both local contrast and sharpness.

Original image
Original image. 16Kb
Unsharp masking (reduce blur)
/blur/100/-50/ 19Kb
Unsharp masking (reduce blur)
/blur/100/-120/ 22Kb
Sharpen
/sharp/20/ 20Kb
Reduce blur
/blur/10/-200/ 20Kb
Sharp and blur
/sharp/10/-/blur/90/-50/ 21Kb

Sharpen

-/sharp/
-/sharp/:strength/

Sharpens an image, might be especially useful with images that were subjected to downscaling. :strength can be in the range from 0 to 20 and defaults to the value of 5.

Downscaled image
Downscaled image. 15Kb
Sharpen
/sharp/10/ 17Kb
Max sharpen
/sharp/20/ 19Kb