How to use the pytesseract.image_to_osd function in pytesseract

To help you get started, we’ve selected a few pytesseract examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github madmaze / pytesseract / tests / test_pytesseract.py View on Github external
def test_image_to_osd(test_file):
    result = image_to_osd(test_file)
    assert isinstance(result, unicode if IS_PYTHON_2 else str)
    for key in [
        'Page number', 'Orientation in degrees', 'Rotate',
        'Orientation confidence', 'Script', 'Script confidence'
    ]:
        assert key + ':' in result