project.android.imageprocessing.filter.effect
Class ToonFilter

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.MultiPixelRenderer
                  extended by project.android.imageprocessing.filter.effect.ToonFilter
All Implemented Interfaces:
GLTextureInputRenderer

public class ToonFilter
extends MultiPixelRenderer

This uses Sobel edge detection to place a black border around objects, and then it quantizes the colors present in the image to give a cartoon-like quality to the image. threshold: The sensitivity of the edge detection, with lower values being more sensitive. Ranges from 0.0 to 1.0 quantizationLevels: The number of color levels to represent in the final image.

Author:
Chris Batt

Field Summary
 
Fields inherited from class project.android.imageprocessing.GLRenderer
ATTRIBUTE_POSITION, ATTRIBUTE_TEXCOORD, UNIFORM_TEXTURE0, VARYING_TEXCOORD
 
Constructor Summary
ToonFilter(float threshold, float quantizationLevels)
           
 
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

ToonFilter

public ToonFilter(float threshold,
                  float quantizationLevels)