pipeline: fix bbox coordinates
This commit is contained in:
@@ -593,9 +593,9 @@ def select_ocr_image(
|
||||
bbox = textarea
|
||||
xscale, yscale = float(xres) / 72.0, float(yres) / 72.0
|
||||
pixcoords = [bbox[0] * xscale,
|
||||
im.height - bbox[1] * yscale,
|
||||
im.height - bbox[3] * yscale,
|
||||
bbox[2] * xscale,
|
||||
im.height - bbox[3] * yscale]
|
||||
im.height - bbox[1] * yscale]
|
||||
pixcoords = [int(round(c)) for c in pixcoords]
|
||||
log.debug('blanking %r', pixcoords)
|
||||
draw.rectangle(pixcoords, fill=white)
|
||||
|
||||
Reference in New Issue
Block a user