pytesseract
#Tesseract
https://pypi.org/project/pytesseract/
メンテされているのは https://pypi.org/project/unstructured.pytesseract/ ?
pytesseract.image_to_string(image, lang='jpn')(Code Interpreterで知った)
imageはPILのImage.openの返り値
インストールされているtesseractコマンドを呼び出す実装
run_tesseract https://github.com/madmaze/pytesseract/blob/v0.3.13/pytesseract/pytesseract.py#L261
image_to_string
-> run_and_get_output https://github.com/madmaze/pytesseract/blob/v0.3.13/pytesseract/pytesseract.py#L332
-> run_tesseract
実装を見て気付いたが、txt以外にもboxやdataとして出力できるらしい
extension (dataはtsv指定)
config (boxの設定値参照)