Packagede.popforge.imageprocessing.filters.convolution
Classpublic final class Sharpen
InheritanceSharpen Inheritance Convolution Inheritance NativeFilter

The Sharpen class is a filter that uses a convolution matrix to sharpen an image. You can define your own strength or use a version optimized for SSE if you do not pass any arguments.

The convolution matrix depends on the strength:
[ -s,    -s, -s ]
[ -s, 8*s+1, -s ]
[ -s,    -s, -s ]

Supported formats:


Example
  
  var filter: Sharpen = new Sharpen();
  
  var video: WebCam = new WebCam( 160, 120 );
  var image: Image = new Image( 160, 120, ImageFormat.GRAYSCALE );
  
  image.loadBitmapData( video.getCurrentFrame(), true );
  
  filter.apply( image );
  



Protected Properties
 PropertyDefined by
 Inheritedfilter : BitmapFilter
The native filter that will be overridden by a subclass of NativeFilter.
NativeFilter
Public Methods
 MethodDefined by
  
Sharpen(strength:Number = -1)
Creates a new Shapren object.
Sharpen
 Inherited
apply(image:Image):void
Applies the filter to the given Image object.
NativeFilter
  
toString():String
Builds and returns a string containing the name of the class.
Sharpen
Constructor detail
Sharpen()constructor
public function Sharpen(strength:Number = -1)

Creates a new Shapren object. Passing no parameter or any strength less than zero results in a predefined convolution matrix optimized to work with SSE.

Parameters
strength:Number (default = -1) — The strength of the sharpening effect.
Method detail
toString()method
public override function toString():String

Builds and returns a string containing the name of the class.

Returns
String — A string containing the name of the class.