tesseractを使う
つまり、画像から文字を読み取ります。
tesseractのインストール
$ brew install tesseract
簡単。
tesseractを使う
書式は以下のとおり
tesseract imagename outputbase [-l lang] [-psm pagesegmode] [configfile...]
今回は以下の画像(tesseract.png)を使います。
$ tesseract tesseract.png out
これでout.txtが生成されました。
out.txtの内容はこうなりました
Running Tesseract Tesseract is a command-line program, so first open a terminal or command prompt. The command is used like this: tesseract imagename outputbase [—1 lang] [—psm pagesegmode] [configfile...] 80 basic usage to do OCR on an image called 'myscan.png' and save the result to 'out.txt' would be: tesseract myscan.png out
間違いは2箇所でしょうか。なかなかの精度ですね。