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. 17Kb

/blur/20/ 10Kb

/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.

/blur_region/130x180/220,25/

/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.

/blur-regions/faces/
default strength

/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. 16Kb

/blur/100/-50/ 19Kb

/blur/100/-120/ 22Kb

/sharp/20/ 20Kb

/blur/10/-200/ 20Kb

/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. 15Kb

/sharp/10/ 17Kb

/sharp/20/ 19Kb