OCR-D / ocrd_anybaseocr

DFKI Layout Detection for OCR-D
Apache License 2.0
48 stars 12 forks source link

crop: add 'padding' parameter (default to 10px) #75

Closed bertsky closed 3 years ago

bertsky commented 3 years ago

Cropping is almost always too tight. The inactive internal print/debug facilities seem to have used 20px horizontal and 40px vertical (which seems rather large). This adds padding – as a parameter with 10px default.

Also contains some basic sanity fixes:

The code is in pretty bad shape, with bad English and virtually no documentation. I'll probably address this in a separate PR.