Skip to content

Commit 30da705

Browse files
authored
Refactoring the osd logic
1 parent 3cf6df5 commit 30da705

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/pytesseract.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ def image_to_osd(image,
342342
'''
343343
Returns string containing the orientation and script detection (OSD)
344344
'''
345-
config += ' -psm 0' if get_tesseract_version() < '3.05' else ' --psm 0'
345+
config += ' -{}psm 0'.format('' if get_tesseract_version() < '3.05' else '-')
346346
args = [image, 'osd', lang, config, nice]
347347

348348
if output_type == Output.DICT:

0 commit comments

Comments
 (0)