Packagede.popforge.imageprocessing.filters.color
Classpublic final class QuickContrastCorrection
InheritanceQuickContrastCorrection Inheritance ColorMatrix Inheritance NativeFilter

The QuickContrastCorrection class is a filter that levels the contrast in an image. Compared to the ContrastCorrection is this filter faster but resulting in different results. In general is the ContrastCorrection producing the best results (because the calculation has the mean value involved). This filter will only make brighter colors brighter. On the other hand is this filter much faster because it uses the ColorMatrix.

The formula of this filter is new = contrast * old.


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

See also

de.popforge.imageprocessing.filters.color.ContrastCorrection


Protected Properties
 PropertyDefined by
 Inheritedfilter : BitmapFilter
The native filter that will be overridden by a subclass of NativeFilter.
NativeFilter
Public Methods
 MethodDefined by
  
QuickContrastCorrection(contrast:Number = 1.2)
Creates a new QuickContrastCorrection object.
QuickContrastCorrection
 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.
QuickContrastCorrection
Constructor detail
QuickContrastCorrection()constructor
public function QuickContrastCorrection(contrast:Number = 1.2)

Creates a new QuickContrastCorrection object.

Parameters
contrast:Number (default = 1.2) — The contrast value. Values greater 1 add contrast, values lower 1 remove contrast.
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.