|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjjil.core.PipelineStage
jjil.algorithm.RgbSubSample
public class RgbSubSample
Pipeline stage reduces an RgbImage's size by subsampling WITHOUT smoothing. This results in an aliased image but can be done very quickly and the artifacts resulting from the subsampling can themselves be useful for detection of certain kinds of objects such as barcodes. This pipeline stage should be used with caution because of the artifacts introduced by subsampling without smoothing.
Constructor Summary | |
---|---|
RgbSubSample(int cTargetWidth,
int cTargetHeight)
Creates a new instance of RgbSubSample. |
Method Summary | |
---|---|
int |
getTargetHeight()
Returns the target height. |
int |
getTargetWidth()
Returns the target width. |
void |
push(Image image)
Reduces an RgbImage by a factor horizontally and vertically through averaging. |
void |
setTargetSize(int cTargetWidth,
int cTargetHeight)
Sets a new width, height target size. |
java.lang.String |
toString()
Return a string describing the reduction 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 RgbSubSample(int cTargetWidth, int cTargetHeight) throws Error
cTargetWidth
- the new widthcTargetHeight
- the new height
Error
- if the target width or height is less than or equal to zero.Method Detail |
---|
public void push(Image image) throws Error
push
in class PipelineStage
image
- the input image.
Error
- if the input image is not gray, or
the reduction factor does not evenly divide the image size.public int getTargetHeight()
public int getTargetWidth()
public void setTargetSize(int cTargetWidth, int cTargetHeight) throws Error
cTargetWidth
- the target image width.cTargetHeight
- the target image height.
Error
- if either cTargetWidth or cTargetHeight
is less than or equal 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 |