public class PageIterator
public void begin()
Resets the iterator to point to the start of the page.
public 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.
NOTE that PageIteratorLevel#RIL_SYMBOL will skip non-text blocks, but all other 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. class TessBaseAPI.PageIteratorLevel
Calls to this method 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 class TessBaseAPI.PageIteratorLevel.false if the end of the page was reached, true otherwise.class TessBaseAPI.PageIteratorLevelpublic kotlin.Array[] getBoundingBox(int level)
Get bounding box: x, y, w, h
============= Accessing data ==============.
Coordinate system:
Returns the bounding rectangle of the current object at the given level. See comment on coordinate system above.
The returned bounding box may clip foreground pixels from a grey image.
level - the page iterator level. See class TessBaseAPI.PageIteratorLevel.public android.graphics.Rect getBoundingRect(int level)
Get a bounding box as an Android Rect.
level - the page iterator level. See class TessBaseAPI.PageIteratorLevel.#getBoundingBox(int)