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

image API: increase tolerance for coordinate checks #367

Closed
bertsky opened this issue Dec 4, 2019 · 0 comments · Fixed by #371
Closed

image API: increase tolerance for coordinate checks #367

bertsky opened this issue Dec 4, 2019 · 0 comments · Fixed by #371
Assignees

Comments

@bertsky
Copy link
Collaborator

bertsky commented Dec 4, 2019

Currently, when skew is present (in the annotation of) a page / region, image_from_page / image_from_segment will validate the resulting image has the exact same dimensions as the bounding box of the element after rotation (with an increase in size). But due to rounding of the angle (@orientation) or different methods of binary image rotation, there can always be slight differences, which we should not consider an error:

ERROR ocrd.workspace - page "phys00026" image (binarized,cropped,deskewed; 2579x3717) has not been reshaped properly (2577x3716) during rotation

So we should allow 1 or 2 Pixels tolerance here.

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

Successfully merging a pull request may close this issue.

1 participant