public class PageIterator extends Object
| Modifier and Type | Method and Description |
|---|---|
void |
begin()
Resets the iterator to point to the start of the page.
|
int[] |
getBoundingBox(int level)
Get bounding box: x, y, w, h
============= Accessing data ==============.
|
boolean |
next(int level)
Moves to the start of the next object at the given level in the page
hierarchy, and returns false if the end of the page was reached.
|
public void begin()
public boolean next(int level)
NOTE that TessBaseAPI.PageIteratorLevel.RIL_SYMBOL will skip non-text blocks,
but all other TessBaseAPI.PageIteratorLevel level values will visit each
non-text block once. Think of non text blocks as containing a single
para, with a single line, with a single imaginary word.
Calls to next(int) with different levels may be freely intermixed.
This function iterates words in right-to-left scripts correctly, if the appropriate language has been loaded into Tesseract.
level - the page iterator level. See TessBaseAPI.PageIteratorLevel.false if the end of the page was reached, true
otherwise.public int[] getBoundingBox(int level)
level - the page iterator level. See TessBaseAPI.PageIteratorLevel.Copyright © 2014. All rights reserved.