jjil.algorithm
Class Rgb3x3Average

java.lang.Object
  extended by jjil.core.PipelineStage
      extended by jjil.algorithm.Rgb3x3Average

public class Rgb3x3Average
extends PipelineStage

Pipeline stage performs a 3x3 RGB average of the input.

Author:
webb

Constructor Summary
Rgb3x3Average()
          Creates a new instance of Rgb3x3Average
 
Method Summary
 void push(Image imageInput)
          Do a color 3x3 average of the input image.
 
Methods inherited from class jjil.core.PipelineStage
getFront, isEmpty
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Rgb3x3Average

public Rgb3x3Average()
Creates a new instance of Rgb3x3Average

Method Detail

push

public void push(Image imageInput)
          throws Error
Do a color 3x3 average of the input image. The red, green, and blue bands are averaged independently. The code has been written to be as efficient as possible. Borders are handled by duplicating the first or last row, and replacing the first and last column with 0, when doing the average.

Specified by:
push in class PipelineStage
Parameters:
imageInput - the input image
Throws:
Error - if imageInput is not an RgbImage