We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I think I know the cause here.
/** Make a text string from the internal data structures. */ char* TessBaseAPI::GetUTF8Text() { if (tesseract_ == NULL || (!recognition_done_ && Recognize(NULL) < 0)) return NULL; STRING text(""); ResultIterator *it = GetIterator(); do { if (it->Empty(RIL_PARA)) continue; char *para_text = it->GetUTF8Text(RIL_PARA); text += para_text; delete []para_text; } while (it->Next(RIL_PARA)); char* result = new char[text.length() + 1]; strncpy(result, text.string(), text.length() + 1); delete it; return result; }
The GetUTF8Text() function in tesseract does not pass a monitor to Recognize, so recognition will never be canceled and will always block.
The text was updated successfully, but these errors were encountered:
Yup, that's definitely the problem. Calling TessBaseAPI.getHOCRText(0) instead allows you to stop and cancel the recognition.
TessBaseAPI.getHOCRText(0)
Sorry, something went wrong.
Fixed, as well as fixing some code upstream: rmtheis/tess-two#186
0xbad1d3a5
No branches or pull requests
I think I know the cause here.
The GetUTF8Text() function in tesseract does not pass a monitor to Recognize, so recognition will never be canceled and will always block.
The text was updated successfully, but these errors were encountered: