Fix check that tesseract can detect orientation.

parent 0ffeca80
......@@ -37,7 +37,8 @@ __all__ = [
def can_detect_orientation():
return True
langs = get_available_languages()
return 'osd' in langs
def detect_orientation(image, lang=None):
......
......@@ -152,10 +152,11 @@ def _set_environment():
def can_detect_orientation():
version = get_version()
langs = get_available_languages()
return (
version[0] > 3 or
(version[0] == 3 and version[1] >= 3)
)
) and 'osd' in langs
def psm_parameter():
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment