Comment #3 on issue 1144 by
p.vorb...@gmail.com:
Sorry, it seems I didn't receive an email notification.
I attached an image that (sometimes) causes the error.
I get the errors through my own custom Java wrapper, which isn't released
yet. Today I tried to get the error through C++ code, but I couldn't.
Here's the code I used:
Pix *image = pixRead("fries_example.png");
tesseract::TessBaseAPI *api = new tesseract::TessBaseAPI();
api->Init(NULL, "deu-frak");
api->SetImage(image);
api->Recognize(0);
tesseract::ResultIterator* ri = api->GetIterator();
tesseract::PageIteratorLevel level = tesseract::RIL_WORD;
if (ri != 0) {
do {
const char* word = ri->GetUTF8Text(level);
float conf = ri->Confidence(level);
int x1, y1, x2, y2;
ri->BoundingBox(level, &x1, &y1, &x2, &y2);
printf("word: '%s'; BoundingBox: %d,%d,%d,%d;\n",
word, x1, y1, x2, y2);
delete[] word;
} while (ri->Next(level));
}
My Java code is basically doing the same using the C API.
Since I didn't get the error in my C++ program, it has got something to do
with the Java wrapper I am using or the way I am initializing the
recognition process. I'll look into the Java code again and let you know
when I find the problem.
Attachments:
fries_example.png 51.8 KB