Packagede.popforge.imageprocessing.filters.noise
Classpublic class NoiseFilter
ImplementsIFilter
SubclassesGaussianNoise, UniformNoise

The NoiseFilter class is a basic filter used for most noise based operations.

The formula of this filter is new = (noise() - old) * amount.

Supported formats:



Protected Properties
 PropertyDefined by
  amount : Number
Amount of the noise in percent.
NoiseFilter
  monochrom : Boolean
True uses for each channel the same noise value which results in a monochromatic noise.
NoiseFilter
Public Methods
 MethodDefined by
  
NoiseFilter(amount:Number = 1, monochrom:Boolean = true)
Creates a new NoiseFilter object.
NoiseFilter
  
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.
NoiseFilter
Protected Methods
 MethodDefined by
  
noise():Number
Calculates a new noise value and should be overriden.
NoiseFilter
Property detail
amountproperty
protected var amount:Number

Amount of the noise in percent.

monochromproperty 
protected var monochrom:Boolean

True uses for each channel the same noise value which results in a monochromatic noise.

Constructor detail
NoiseFilter()constructor
public function NoiseFilter(amount:Number = 1, monochrom:Boolean = true)

Creates a new NoiseFilter object.

Parameters
amount:Number (default = 1) — Strengt of the noise in percent.
 
monochrom:Boolean (default = true) — Monochromatic mode uses same noise for each channel.
Method detail
apply()method
public function apply(image:Image):void

Applies the filter to the given Image object.

Parameters
image:Image — The image that will be manipulated.
noise()method 
protected function noise():Number

Calculates a new noise value and should be overriden.

Returns
Number — Noise value.
toString()method 
public function toString():String

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

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