import os
from PIL import Image
from PIL import ImageEnhance
import pyocr
import pyocr.builders
path_tesseract = "C:\\Program Files\\Tesseract-OCR"
if path_tesseract not in os.environ["PATH"].split(os.pathsep):
os.environ["PATH"] += os.pathsep + path_tesseract
tools = pyocr.get_available_tools()
tool = tools[0]
img_org = Image.open("illustrator_sumidamsti_tips_13.jpg")
enhancer = ImageEnhance.Contrast(img_org)
img_org = enhancer.enhance(2.0)
builder = pyocr.builders.TextBuilder()
result = tool.image_to_string(img_org, lang="jpn", builder=builder)
print(result)