Packagede.popforge.imageprocessing.filters.convolution
Classpublic final class ConvolutionBlur
InheritanceConvolutionBlur Inheritance Convolution Inheritance NativeFilter

The ConvolutionBlur class is a filter that uses a convolution matrix to blur an image.

The convolution matrix depends on the scale of the filter. Divisor is scale * scale. A scale of 3 would result in this kernel:
[ 1, 2, 1 ]
[ 2, 3, 2 ]
[ 1, 2, 1 ]

Supported formats:


Example
  
  var filter: ConvolutionBlur = new ConvolutionBlur( 4 );
  
  var video: WebCam = new WebCam( 160, 120 );
  var image: Image = new Image( 160, 120, ImageFormat.RGB );
  
  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
  
ConvolutionBlur(scale:int = 3)
Creates a new ConvolutionBlur object with given scale.
ConvolutionBlur
 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.
ConvolutionBlur
Constructor detail
ConvolutionBlur()constructor
public function ConvolutionBlur(scale:int = 3)

Creates a new ConvolutionBlur object with given scale.

Parameters
scale:int (default = 3) — A scale value to calculate the blur kernel (1 to 64).
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.