개정판 7196ff9e
issue #000: fix text error from tesseract
Change-Id: I35e5c780b438aef152c18d96f501aa80f95f116e
DTI_PID/DTI_PID/tesseract_ocr_module.py | ||
---|---|---|
204 | 204 |
|
205 | 205 |
if cropped.width == 0 or cropped.height == 0: |
206 | 206 |
continue |
207 |
text = pytesseract.image_to_string(cropped, config=_conf, lang=oCRLang).replace('\n', '')
|
|
207 |
text = ' '.join(pytesseract.image_to_string(cropped, config=_conf, lang=oCRLang).replace('\n', '').split())
|
|
208 | 208 |
|
209 | 209 |
if long_img: |
210 | 210 |
text = text[:int(len(text)/ 3)] |
내보내기 Unified diff