sharpenUnsharpMask() - Media Method
The sharpenUnsharpMask() method enhances the edges and details of an image by exaggerating the differences between the original image and a Gaussian-blurred version.
Note: This function is “selection aware”—if a selection is made, the system applies the function based on the current selection. For more information about making selections, see selection() - Media Method.
Syntax
sharpenUnsharpMask(
[Radius @ <value 0.10..250>]
[Amount @ <value 1..500>]
[Threshold @ <value 1..255>]
);
Parameters
Radius - specifies the extent of the blurring effect. The default is 1.
Amount - specifies the extent of the enhancing effect. The default is 50.
Threshold - specifies the degree to which a blurred version of a pixel must be different from the original version before the enhancement takes effect. The default is 0.
Example
var image = new Media();
image.load(name @ "peppers.tga");
image.sharpenUnsharpMask(Radius @ 18, Amount @ 450, Threshold @ 125);
image.save(type @ "jpeg");
On-Line Documentation