How to get page orientation?
See original GitHub issueHello,
I’m a bit confused about the proper way to get the page orientation with tesseract. I have tried the following:
using (var pi = page.AnalyseLayout())
{
pi.Begin();
return pi.GetProperties().Orientation;
}
But it always returns PageUp
.
I have also tried page.DetectBestOrientation(out int orientation, out _)
but this returns 270 even for a page that is supposed to be PageUp
.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Change PDF orientation from landscape to portrait
Open your PDF in Adobe Reader. Select View and then Rotate View. Select Clockwise or Counterclockwise to rotate in 90-degree increments. How to...
Read more >Change A Single Page To Landscape In Word - YouTube
In this video, I'm going to show you how to change the orientation of a single page to landscape in Microsoft Word.
Read more >How to Change Page Orientation in Adobe Acrobat - YouTube
Learn two ways to change page orientation in Adobe Acrobat. Plus, learn how to view pages in a different orientation without changing the ......
Read more >Changing the Page Orientation in Microsoft Word - YouTube
... .simonsezit.com/article/how-to-change- orientation -of-one- page -in-word/ Get ... Check out our free video playlist for Microsoft Office ...
Read more >How to have multiple page orientations in one document
This is a Microsoft Word tutorial. Page orientation. How to have multiple page orientations in one document #msword Join this channel to get...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@tudorserbanuipath You need to have “osd.traineddata” file in the tessdata folder and when initializing the engine set language to “osd” - this worked for me to detect orientation e.g.
using var engine = new TesseractEngine(@"./tessdata", "osd", EngineMode.Default);
@samtigall Replace
using (var page = engine.Process(img))
byusing (var page = engine.Process(img, PageSegMode.AutoOsd))