com.meltingice.caman.filters
Class Greyscale

java.lang.Object
  extended by com.meltingice.caman.CamanFilter
      extended by com.meltingice.caman.filters.Greyscale

public class Greyscale
extends CamanFilter

Converts the image to an accurate greyscale representation. This is the preferred method of making an image greyscale over simply using Saturation.Saturation() to desaturate the image because it will produce better results. Params: (void)

Version:
1.0
Author:
Ryan LeFevre

Constructor Summary
Greyscale()
           
 
Method Summary
 int[] process(int[] rgb)
          Processes the given pixel and returns the updated values.
 
Methods inherited from class com.meltingice.caman.CamanFilter
getKernel, getParamDouble, getParamInt, precomputeParams, set, set, type
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Greyscale

public Greyscale()
Method Detail

process

public int[] process(int[] rgb)
Description copied from class: CamanFilter
Processes the given pixel and returns the updated values.

Overrides:
process in class CamanFilter
Parameters:
rgb - The current pixel's color values rgb[0] => red, rgb[1] => green, rgb[2] => blue
Returns:
The updated RGB color values