From 4c75483865973604de771769402f3885280ff0a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20P=C3=B6sel?= Date: Mon, 15 May 2017 12:50:57 +0200 Subject: [PATCH 1/2] Add missing PSM_RAW_LINE mode It was added in Tesseract v3.04 --- .../src/com/googlecode/tesseract/android/TessBaseAPI.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tess-two/src/com/googlecode/tesseract/android/TessBaseAPI.java b/tess-two/src/com/googlecode/tesseract/android/TessBaseAPI.java index 33846c6df..da9c37797 100644 --- a/tess-two/src/com/googlecode/tesseract/android/TessBaseAPI.java +++ b/tess-two/src/com/googlecode/tesseract/android/TessBaseAPI.java @@ -90,8 +90,11 @@ public static final class PageSegMode { /** Sparse text with orientation and script detection. */ public static final int PSM_SPARSE_TEXT_OSD = 12; + /** Treat the image as a single text line, bypassing hacks that are Tesseract-specific. */ + public static final int PSM_RAW_LINE = 13; + /** Number of enum entries. */ - public static final int PSM_COUNT = 13; + public static final int PSM_COUNT = 14; } /** Whitelist of characters to recognize. */ From 65a598754a50a8f1e0e2eac5e76613e3a5d57b4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20P=C3=B6sel?= Date: Mon, 15 May 2017 12:59:10 +0200 Subject: [PATCH 2/2] Remove PSM_COUNT constant It is useless to have this in Java API. --- tess-two/src/com/googlecode/tesseract/android/TessBaseAPI.java | 3 --- 1 file changed, 3 deletions(-) diff --git a/tess-two/src/com/googlecode/tesseract/android/TessBaseAPI.java b/tess-two/src/com/googlecode/tesseract/android/TessBaseAPI.java index da9c37797..f7ff12bcc 100644 --- a/tess-two/src/com/googlecode/tesseract/android/TessBaseAPI.java +++ b/tess-two/src/com/googlecode/tesseract/android/TessBaseAPI.java @@ -92,9 +92,6 @@ public static final class PageSegMode { /** Treat the image as a single text line, bypassing hacks that are Tesseract-specific. */ public static final int PSM_RAW_LINE = 13; - - /** Number of enum entries. */ - public static final int PSM_COUNT = 14; } /** Whitelist of characters to recognize. */