project.android.imageprocessing.filter.colour
Class ToneCurveFilter

java.lang.Object
  extended by project.android.imageprocessing.GLRenderer
      extended by project.android.imageprocessing.input.GLTextureOutputRenderer
          extended by project.android.imageprocessing.filter.BasicFilter
              extended by project.android.imageprocessing.filter.MultiInputFilter
                  extended by project.android.imageprocessing.filter.colour.ToneCurveFilter
All Implemented Interfaces:
GLTextureInputRenderer

public class ToneCurveFilter
extends MultiInputFilter

Adjusts the colors of an image based on spline curves for each color channel. The tone curve takes in a series of control points that define the spline curve for each color component, or for all three in the composite. These are stored as Points in an array, with X and Y coordinates from 0 - 255.

Author:
Chris Batt

Field Summary
 
Fields inherited from class project.android.imageprocessing.GLRenderer
ATTRIBUTE_POSITION, ATTRIBUTE_TEXCOORD, UNIFORM_TEXTURE0, VARYING_TEXCOORD
 
Constructor Summary
ToneCurveFilter(android.graphics.Point[] red, android.graphics.Point[] green, android.graphics.Point[] blue, android.graphics.Point[] rgbComposite)
           
 
Method Summary
 void destroy()
          Cleans up the opengl objects for this renderer.
 void newTextureReady(int texture, GLTextureOutputRenderer source)
          Signals that a new texture is available and the image should be reprocessed.
 
Methods inherited from class project.android.imageprocessing.filter.MultiInputFilter
clearRegisteredFilterLocations, registerFilterLocation, registerFilterLocation
 
Methods inherited from class project.android.imageprocessing.input.GLTextureOutputRenderer
addTarget, getLockObject, getTargets, removeTarget
 
Methods inherited from class project.android.imageprocessing.GLRenderer
getBackgroundAlpha, getBackgroundBlue, getBackgroundGreen, getBackgroundRed, getHeight, getWidth, onDrawFrame, reInitialize, rotateClockwise90Degrees, rotateCounterClockwise90Degrees, setBackgroundAlpha, setBackgroundBlue, setBackgroundColour, setBackgroundGreen, setBackgroundRed, setRenderSize
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ToneCurveFilter

public ToneCurveFilter(android.graphics.Point[] red,
                       android.graphics.Point[] green,
                       android.graphics.Point[] blue,
                       android.graphics.Point[] rgbComposite)
Method Detail

destroy

public void destroy()
Description copied from class: GLRenderer
Cleans up the opengl objects for this renderer. Must be called with opengl context. Normally called by FastImageProcessingPipeline.

Overrides:
destroy in class GLTextureOutputRenderer

newTextureReady

public void newTextureReady(int texture,
                            GLTextureOutputRenderer source)
Description copied from interface: GLTextureInputRenderer
Signals that a new texture is available and the image should be reprocessed.

Specified by:
newTextureReady in interface GLTextureInputRenderer
Overrides:
newTextureReady in class MultiInputFilter
Parameters:
texture - The texture id to be used as input.
source - The GLTextureOutputRenderer which produced the texture.