|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sourceforge.javaocr.ocr.AbstractBaseSlicer
public abstract class AbstractBaseSlicer
abstract base slicer class encapsulating common functionality
| Field Summary | |
|---|---|
protected int |
border
|
protected int |
currentPosition
|
(package private) int |
empty
|
(package private) Image |
image
|
(package private) int |
tolerance
|
| Constructor Summary | |
|---|---|
AbstractBaseSlicer(int empty,
Image image,
int border)
|
|
| Method Summary | |
|---|---|
protected abstract Image |
chisel(int imageStart)
|
boolean |
hasNext()
whether we have next image chunk available |
protected abstract void |
iterateSpan()
|
Image |
next()
chisel out sub-image with pre configured tolerance |
ImageSlicer |
slice(int fromY)
start slicing from designated position with zero tolerance |
ImageSlicer |
slice(int from,
int tolerance)
start horizontal slicing from designated position tolerating some empty rows |
protected boolean |
spanEmpty()
whether current image span is empty |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
Image image
int empty
protected int currentPosition
int tolerance
protected int border
| Constructor Detail |
|---|
public AbstractBaseSlicer(int empty,
Image image,
int border)
| Method Detail |
|---|
public ImageSlicer slice(int fromY)
slice in interface ImageSlicerfromY - starting Ypublic boolean hasNext()
hasNext in interface ImageSlicer
public ImageSlicer slice(int from,
int tolerance)
slice in interface ImageSlicerfrom - starting positiontolerance - amount of empty rows allowed inside consecutive imageprotected boolean spanEmpty()
public Image next()
next in interface ImageSlicerprotected abstract Image chisel(int imageStart)
protected abstract void iterateSpan()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||