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

Black edges interfering with cropping? #108

Open
lenskatala opened this issue Oct 1, 2024 · 0 comments
Open

Black edges interfering with cropping? #108

lenskatala opened this issue Oct 1, 2024 · 0 comments

Comments

@lenskatala
Copy link

I used this workflow

ocrd-olena-binarize -I IMG -O BIN && ocrd-anybaseocr-crop -I BIN -O CROP && ocrd-cis-ocropy-denoise -I CROP -O DENOISE

on this image to get the following result:

Cropping_orgtiff

And that's fantastic: barely any noise and the cropped area contains the text and nothing else.

However... due to a slight oversight the image has to go through the same workflow again, though with different dimensions and additional black edges on the left- and right-hand side.

original tiff: 1330 x 2163 px
edited tiff: 2479 x 3508 px (including black edges)

The same workflow with the edited image outputs this:
Cropping_edgetiff

I have tried several different compression rates and I kept the size of the image (but added the black edges), but the result is always very similar to the image above, the cropping is not as close to the text as it is with the original tiff. Is there a way to tweak the parameters of anybaseocr-crop to get a better result or is it easiest to crop manually (though still within OCR-D because I need those specific image dimensions in the PAGE file)? Or is there a better way to transform the original tiff?

Any help would be appreciated.

@lenskatala lenskatala changed the title Black edges interfering in cropping? Black edges interfering with cropping? Oct 1, 2024
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

No branches or pull requests

1 participant