Pixastic Docs

JavaScript Image Processing Library

Documentation: Unsharp Mask

Description

Performs an unsharp mask operation on the image by first creating a blurred version of the image and then using the difference between the two images to sharpen the image.The blur method is the same as used in the Blur fast action. The radius parameter impacts performance the most.

Demo

Amount:
Radius:
Threshold:

Example usage

var img = new Image();
img.onload = function() {
	Pixastic.process(img, "unsharpmask", {amount:0.5});
}
document.body.appendChild(img);
img.src = "myimage.jpg";

Parameters

  • amount (float)
    The strength of the sharpening effect. Value between 0 and 500.
  • radius (float)
    The radius of the blur effect used in the unsharp mask. Value between 0 and 5.
  • threshold (float)
    The threshold of the sharpening effect. Value between 0 and 255.

View source: unsharpmask.js

Browser support