Packagede.popforge.imageprocessing.filters.color
Classpublic final class ToneMapping
ImplementsIFilter

The ToneMapping class is a filter that applies a simple tone mapping to the image.

This filter calculates the world luminance first using \small\exp(\frac{\sum_{x,y}{log(1+Y(x,y))}}{width \cdot height}).

The scale for the luminance is defined by dividing the world luminance by 18. After all for each pixel is the new luminance function \small lum(x,y) = \frac{Y(x,y) \cdot scale}{1+Y(x,y) \cdot scale} used.

Supported formats:


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



Public Methods
 MethodDefined by
  
apply(image:Image):void
Applies the filter to the given Image object.
ToneMapping
  
toString():String
Builds and returns a string containing the name of the class.
ToneMapping
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.
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.