I found some helpful code on the forum
<https://groups.google.com/d/msg/tesseract-ocr/g5aE_OvgyTU/4KRPdBgj3vAJ>:
OSResults *orientationStruct = new OSResults();
bool gotOrientation = myTess->DetectOS(orientationStruct);
int bestOrientation = -1;
float bestOrientationScore = 0;
if ((gotOrientation) && (orientationStruct->orientations != NULL)) {
for (int i=0; i<4; i++) {
if (orientationStruct->orientations[i] > bestOrientationScore) {
bestOrientation = i;
bestOrientationScore = orientationStruct->orientations[i];
}
}
}
// This is the result we were asked for
results.textOrientation = bestOrientation;
But unfortunately, OSResults
<https://zdenop.github.io/tesseract-doc/struct_o_s_results.html> isn't
implemented in the c-api.
<https://fossies.org/dox/tesseract-3.04.01/capi_8cpp.html#aae7d8f59b4757edde9afbdf64e649fb9>
Any suggestions?
On Friday, May 20, 2016 at 9:32:36 AM UTC+3, Reuben Cummings wrote:
>
> If i try to run the script with psm mode=0 (like the executable) i dont
> get any results either. Further research has led me to the DetectOS
> function which seems useful.
--
You received this message because you are subscribed to the Google Groups
"tesseract-ocr" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tesseract-ocr.
To view this discussion on the web visit
https://groups.google.com/d/msgid/tesseract-ocr/71cd1eea-a15b-4695-88b5-f3375dfa929d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.