Commit e73a78bc authored by Jerome Flesch's avatar Jerome Flesch

Merge pull request #27 from voyageur/master

Filter tesseract  log lines in orientation detection
parents c2e48063 4504b7db
......@@ -164,7 +164,7 @@ def detect_orientation(image, lang=None):
output = output.decode("utf-8")
output = output.strip()
output = output.split("\n")
output = [line.split(": ") for line in output]
output = [line.split(": ") for line in output if (": " in line)]
output = {x: y for (x, y) in output}
angle = int(output['Orientation in degrees'])
# Tesseract reports the angle in the opposite direction the one we want
......
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