|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjjil.core.PipelineStage
jjil.algorithm.RgbClip
public class RgbClip
Pipeline stage performs color clipping, setting all pixels that do not meet the threshold test to 0, otherwise leaving them alone.
The test is abs(pixel.R - red) + abs(pixel.G - green) + abs(pixel.B - blue) < limit.
The test direction can be reversed using the dir parameter.
Constructor Summary | |
---|---|
RgbClip(byte r,
byte g,
byte b,
int l,
boolean dir)
Creates a new instance of RgbClip. |
Method Summary | |
---|---|
void |
push(Image image)
Clips the RGB image and sets all pixels that fail/pass the test (according to bDir) to 0. |
void |
setParameters(byte r,
byte g,
byte b,
int l,
boolean dir)
Change the threshold parameters. |
java.lang.String |
toString()
Return a string describing the clipping operation. |
Methods inherited from class jjil.core.PipelineStage |
---|
getFront, isEmpty |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public RgbClip(byte r, byte g, byte b, int l, boolean dir)
r
- red valueg
- green valueb
- valuel
- the thresholddir
- if true pixels that fail test are set to 0; if false
pixels that pass test are set to 0.Method Detail |
---|
public void push(Image image) throws Error
push
in class PipelineStage
image
- the input image.
Error
- if the cropping window
extends outside the input image, or the input image
is not an RgbImage.public void setParameters(byte r, byte g, byte b, int l, boolean dir)
r
- red valueg
- green valueb
- valuel
- the thresholddir
- if true pixels that fail test are set to 0; if false
pixels that pass test are set to 0.public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |