--
You received this message because you are subscribed to the Google
Groups "tesseract-ocr" group.
To post to this group, send email to tesser...@googlegroups.com
To unsubscribe from this group, send email to
tesseract-oc...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/tesseract-ocr?hl=en
OSD returns emty text when I tried. Can anyone please clarify if
this is a bug or I m doing things wrong?
inputfile = "/usr/src/tesseract-3.02/eurotextUpsideDown.png";
image = pixRead(inputfile);
api->Init("/usr/src/tesseract-3.02/", "eng");
api->SetPageSegMode(tesseract::PSM_AUTO_OSD);
api->SetImage(image); api->Recognize(0);
tesseract::PageIterator* it = api->AnalyseLayout();
tesseract::Orientation orientation;
tesseract::WritingDirection direction;
tesseract::TextlineOrder order;
float deskew_angle;
it->Orientation(&orientation, &direction, &order, &deskew_angle);
printf("Orientation: %d;\nWritingDirection: %d\nTextlineOrder: %d\n" \
"Deskew angle: %.4f\n",
orientation, direction, order, deskew_angle);
Orientation: 2;
WritingDirection: 0
TextlineOrder: 2
Deskew angle: -0.0038
[1] http://code.google.com/p/tesseract-ocr/source/browse/trunk/ccstruct/publictypes.h?r=716#81
[2] http://code.google.com/p/tesseract-ocr/source/browse/trunk/ccstruct/publictypes.h?r=716#111
[3] http://code.google.com/p/tesseract-ocr/source/browse/trunk/ccstruct/publictypes.h?r=716#125
[4] http://code.google.com/p/tesseract-ocr/source/browse/trunk/ccmain/pageiterator.h?r=716#239
Hello,Chirag.
I am also trying to find a way to detect the script of the input document.
Kindly let me know if you have some progress.
Thanks and Regards,
Alex
在 2012年3月14日星期三UTC+8下午7时17分29秒,Chirag Jain写道:
it->Orientation(&orientation, &direction, &order, &deskew_angle);
Any idea what is wrong?
Thanks,
Mikayel
tesseract::Orientation orientation;
tesseract::WritingDirection direction;
tesseract::TextlineOrder order;
float deskew_angle;
it->Orientation(&orientation, &direction, &order, &deskew_angle);
printf("Orientation: %d;\nWritingDirection: %d\nTextlineOrder: %d\n" \
"Deskew angle: %.4f\n",
orientation, direction, order, deskew_angle);
When I use PSM_OSD_ONLY, the orientation finder doesn't work.
any ideas?
do I have to upgrade to Tesseract 3.04?