Hi,
When I run something like:
Pointer utf8Text = TessAPI1.TessBaseAPIGetUTF8Text(handle); String result = utf8Text.getString(0); TessAPI1.TessDeleteText(utf8Text); System.out.println(result);
I get the result fine and according to the original file. However, when I try:
TessAPI1.TessResultIterator ri = TessAPI1.TessBaseAPIGetIterator(handle); TessAPI1.TessPageIterator pi = TessAPI1.TessResultIteratorGetPageIterator(ri); TessAPI1.TessPageIteratorBegin(pi); Pointer ptr = TessAPI1.TessResultIteratorGetUTF8Text(ri, TessAPI1.TessPageIteratorLevel.RIL_WORD);
I get a value of null for ptr. What could be wrong? (BTW, if I run exactly the same code trying to read the famous eurotext.tif it works perfectly).
Thanks.
If it worked with the sample image files, then it could be something wrong with your test image. Have you tried stepping through Tess4J's unit tests?
Log in to post a comment.
Hi,
When I run something like:
I get the result fine and according to the original file. However, when I try:
I get a value of null for ptr. What could be wrong? (BTW, if I run exactly the same code trying to read the famous eurotext.tif it works perfectly).
Thanks.
If it worked with the sample image files, then it could be something wrong with your test image. Have you tried stepping through Tess4J's unit tests?