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

cropper sanity #84

Merged
merged 33 commits into from
Apr 23, 2021
Merged

cropper sanity #84

merged 33 commits into from
Apr 23, 2021

Conversation

bertsky
Copy link
Contributor

@bertsky bertsky commented Apr 15, 2021

Fixes #83.

We could do so much more, but this already should give a boost in robustness and quality in many scenarios. It also makes identifier and parameter names readable.

I'll probably add some basic DPI relativity later-on, as there are so many parameters here, that were probably fitted to some 300 DPI assumption.

bertsky added 6 commits April 16, 2021 01:36
… recursively (not just outer) and use exact contour area (without drawing to intermediate image)
- use margin parameters in places where this was forgotten
- add margin parameter for top side
- edge/textline detector based heuristic: fix right/bottom margin criterion
- sane identifiers, code readibility
- optional debug images for most steps
bertsky added 3 commits April 16, 2021 11:06
- instead of fake/coarse approximations, cluster and aggregate
  line segments by
  - using linear regressors for grouping and representation
  - joining nearby points (if linearly consistent)
  - joining similar groups (if consistent and no gaps between)
- instead of crude selection heuristics, filter line groups
  such that candidates
  - have minimum total length
  - range over non-margin area
  - reside in margin-area
- instead of just innermost result, choose candidate with
  both largest length and inner-most position on each side
Copy link
Member

@kba kba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks.

@bertsky
Copy link
Contributor Author

bertsky commented Apr 22, 2021

For a gallery sample images, see here (Github markdown is too impoverished for large images and TIFFs).

@kba From my side this is ready to be merged.

@kba kba merged commit 17640b7 into OCR-D:master Apr 23, 2021
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 this pull request may close these issues.

cropper screws up royally
2 participants