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

Switch to ImageMagick auto-orient instead of a hard coded 90 degree rotation #34

Open
bram-atmire opened this issue Oct 26, 2019 · 4 comments

Comments

@bram-atmire
Copy link
Contributor

No description provided.

@bram-atmire
Copy link
Contributor Author

Sorry, after trying this out, it seems to be a stupid idea. This relies on orientation attributes being present in the file, but if they are not there, auto orient doesn't really help.

Still, it would be nice to have some kind of an auto-orientation solution, instead of relying on all images being presented in the same orientation.

@mre
Copy link
Member

mre commented Oct 26, 2019

Hehe, no worries. If we find a good heuristic to auto-rotate the receipts, we can add it.
Will keep that open for the time being.

@jantznick
Copy link

This is over a year old, but what about doing a basic text recognition on the image, rotating it 90 degrees and doing again until the receipt has been scanned in all 4 orientations, then just take whichever orientation had the highest recognized words?

If this sounds like a reasonable enough solution I'd be happy to look into implementing it.

@mre
Copy link
Member

mre commented Nov 8, 2020

Some thoughts:

  • The runtime would be four times as long. Don't think it's a deal breaker, but it's something to be aware of.
  • The text recognition might be false positives because the date- and price recognition are based on regular expressions that could detect matches for different rotations.

Both points might be non-issues. We could just try, I guess.

An alternative might be to start with making the rotation configurable. It might even serve as a basis for future work: if there is no rotation given in the config, we can use the rotation heuristic you describe.
Does that make sense? Would you be interested in working on that?

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

No branches or pull requests

3 participants