LoginSignup
8
13

More than 5 years have passed since last update.

Android OCRライブラリ tess-two

Last updated at Posted at 2017-04-26

OCRライブラリ tess-two

AndroidでOCRライブラリを利用する必要があり、有名どころっぽいtess-twoを試してみることに。
今回は日本語の読み込み精度を見ることが目的なので、サンプルアプリを利用して動作確認をする。

サンプルアプリを実行する

サンプルプロジェクトをクローン

git clone https://github.com/bieliaievays/Tess-two_example

サンプルではtess-twoのバージョンが古いので最新にしておく

build.gradle
dependencies {
    compile 'com.rmtheis:tess-two:6.3.0'
}

今回は日本語を試したいので、下記から日本語データをダウンロードし
https://github.com/tesseract-ocr/tessdata

下記ディレクトリに追加しておく

/assets/tessdata/jpn.traineddata

MainActivityの定数をengからjpnに変更

MainActivity
private static final String lang = "jpn";

これで準備が整ったのでアプリを実行

結果

準備中

8
13
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
8
13