Packagede.popforge.imageprocessing.filters.noise
Classpublic final class GaussianNoise
InheritanceGaussianNoise Inheritance NoiseFilter

The GaussianNoise class is a filter that generates a gaussian noise.

Supported formats:


Example
  
  var filter: GaussianNoise = GaussianNoise();
  
  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
 Inheritedamount : Number
Amount of the noise in percent.
NoiseFilter
 Inheritedmonochrom : Boolean
True uses for each channel the same noise value which results in a monochromatic noise.
NoiseFilter
Public Methods
 MethodDefined by
  
GaussianNoise(amount:Number = 0.5, monochrom:Boolean = true, mean:int = 0x80, variance:int = 800)
Creates a GaussianNoise object.
GaussianNoise
 Inherited
apply(image:Image):void
Applies the filter to the given Image object.
NoiseFilter
  
toString():String
Builds and returns a string containing the name of the class.
GaussianNoise
Protected Methods
 MethodDefined by
  
noise():Number
GaussianNoise
Constructor detail
GaussianNoise()constructor
public function GaussianNoise(amount:Number = 0.5, monochrom:Boolean = true, mean:int = 0x80, variance:int = 800)

Creates a GaussianNoise object.

Parameters
amount:Number (default = 0.5) — Strengt of the noise in percent.
 
monochrom:Boolean (default = true) — Monochromatic mode uses same noise for each channel.
 
mean:int (default = 0x80) — The mean value for the noise function.
 
variance:int (default = 800) — The variance for the noise function.
Method detail
noise()method
protected override function noise():Number

Returns
Number
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.