1
0
Fork 0
mirror of https://github.com/mikegerber/ocrd_calamari.git synced 2025-06-09 19:59:53 +02:00

Actually binarize the image (not grayscale!)

This commit is contained in:
Gerber, Mike 2019-12-05 13:40:48 +01:00
parent e07b333db1
commit e1b9d381a0

View file

@ -44,7 +44,7 @@ def test_recognize(workspace):
# So I'm going for option c. # So I'm going for option c.
for f in ['INPUT_0017.tif', 'INPUT_0020.tif']: for f in ['INPUT_0017.tif', 'INPUT_0020.tif']:
ff = os.path.join(WORKSPACE_DIR, 'OCR-D-IMG', f) ff = os.path.join(WORKSPACE_DIR, 'OCR-D-IMG', f)
subprocess.call(['convert', ff, '-colorspace', 'Gray', ff]) subprocess.call(['convert', ff, '-threshold', '50%', ff])
# XXX Should remove GT text to really test this # XXX Should remove GT text to really test this