Skip to content
New issue

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

Does not work with images rotated around 90 degrees #155

Closed
tytuseczek opened this issue Feb 10, 2022 · 3 comments · Fixed by #160
Closed

Does not work with images rotated around 90 degrees #155

tytuseczek opened this issue Feb 10, 2022 · 3 comments · Fixed by #160

Comments

@tytuseczek
Copy link

Deskew works great for me for small angles. However, it totally fails for me if images are orientated around 90 degrees.

This is strange, as I have clear horizontal lines through all the documents which should be very easy to detect

I can send example files with private message as this is medical data and I am not at ease to shere it publicly, even after anonymization.

@tytuseczek
Copy link
Author

I am using as library using your example code.

@sbrunner
Copy link
Owner

This took is not relay do to rotate the images 90°, I use tesseract --psm 0 to determine the 90°, 180°, -90° rotation, then in the latest version I do rotation only between -45° and 45°.
I can add an option to allow rotation between -90° and 90° if it can unblock you...

@tytuseczek
Copy link
Author

tytuseczek commented Feb 10, 2022

  1. It would be nice to write in Readme, that rotation should be between -45° and 45°.
  2. I also thought of using tesseract, but this is very slow. Morever, it could not work for rotations like 50°. Option of using agles up to 90° could be useful. Maybe there is a way to return sum kind of "score" which could be comapred between original image or image rotated 90°. In this case it will be possible to manually avoid adding a lot of blank space (we rotate first and then deskew).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants