mittagessen / kraken

OCR engine for all the languages
http://kraken.re
Apache License 2.0
751 stars 131 forks source link

fix --no-segmentation bug #630

Closed josef821 closed 3 months ago

josef821 commented 4 months ago

if use --no-segmentation tag it not working. i found this bug in kraken.py in line 220: bounds = Segmentation(type='bbox', text_direction='horizontal-lr', imagename=ctx.meta['base_image'], script_detection=False, lines=[BBoxLine(id=str(uuid.uuid4()), bbox=(0, 0, im.size[1], im.size[0]))]) must change to : bounds = Segmentation(type='bbox', text_direction='horizontal-lr', imagename=ctx.meta['base_image'], script_detection=False, lines=[BBoxLine(id=str(uuid.uuid4()), bbox=(0, 0, im.size[0], im.size[1]))])

image width and height must change.