project.android.imageprocessing.filter.colour
Class ColourMatrixFilter

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.colour.ColourMatrixFilter
All Implemented Interfaces:
GLTextureInputRenderer
Direct Known Subclasses:
BrightnessFilter, RGBFilter, SepiaFilter

public class ColourMatrixFilter
extends BasicFilter

A colour matrix filter implementation of BasicFilter. This filter takes in a 4x4 matrix that will be applied to each pixel in the input image. It does not take into account the alpha values which will always be the same as the input alpha values. The percentage of the resulting RGB value that should be factor into the output texture can be controlled by the intensity.

Author:
Chris Batt

Field Summary
 
Fields inherited from class project.android.imageprocessing.GLRenderer
ATTRIBUTE_POSITION, ATTRIBUTE_TEXCOORD, UNIFORM_TEXTURE0, VARYING_TEXCOORD
 
Constructor Summary
ColourMatrixFilter(float[] colorMatrix, float intensity)
          Creates a ColourMatrixFilter with the given matrix as the multiplicand and the given intensity as the percentage of the colorMatrix product that should be factor into the output.
 
Method Summary
 
Methods inherited from class project.android.imageprocessing.filter.BasicFilter
newTextureReady
 
Methods inherited from class project.android.imageprocessing.input.GLTextureOutputRenderer
addTarget, destroy, 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

ColourMatrixFilter

public ColourMatrixFilter(float[] colorMatrix,
                          float intensity)
Creates a ColourMatrixFilter with the given matrix as the multiplicand and the given intensity as the percentage of the colorMatrix product that should be factor into the output.

Parameters:
colorMatrix - The 4x4 matrix that will be multiplied by a rgba vector of each pixel.
intensity - The percentage of the of the colorMatrix and pixel product that should factor into the output.