How can I determine the orientation of  a document?  I tried the
following code on several images, but the orientation is always either
ORIENTATION_PAGE_UP or ORIENTATION_PAGE_LEFT, but never PAGE_DOWN or
PAGE_RIGHT even if the image is turned upside down or right.

tesseract::TessBaseAPI tess;
tess.Init(argv[0], "eng");
tess.SetImage(img);
tess.SetPageSegMode(tesseract::PSM_AUTO_OSD);
tesseract::PageIterator* it = tess.AnalyseLayout();

tesseract::Orientation orientation;
tesseract::WritingDirection direction;
tesseract::TextlineOrder order;
float f;
it->Orientation(&orientation, &direction, &order, &f);

-- 
You received this message because you are subscribed to the Google
Groups "tesseract-ocr" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/tesseract-ocr?hl=en

Reply via email to