diff options
author | Iliyan Malchev <malchev@google.com> | 2008-10-13 20:38:25 -0700 |
---|---|---|
committer | Iliyan Malchev <malchev@google.com> | 2008-10-13 20:38:25 -0700 |
commit | 1218d39c83c7e715aa8afe939a92572707adfbf1 (patch) | |
tree | f81c512d34e720c32975808961be9a237691d97f | |
parent | 7413a5358e2bdc2982845f73cd354e8186473479 (diff) | |
download | tesseract-temp.tar.gz |
fix build for SetPageSegMode-less patchtemp
Signed-off-by: Iliyan Malchev <malchev@google.com>
-rw-r--r-- | ccmain/jni.cpp | 5 | ||||
-rw-r--r-- | ccmain/test.cpp | 2 |
2 files changed, 2 insertions, 5 deletions
diff --git a/ccmain/jni.cpp b/ccmain/jni.cpp index 5427128..bb2a379 100644 --- a/ccmain/jni.cpp +++ b/ccmain/jni.cpp @@ -103,8 +103,6 @@ void test_ocr(const char *infile, int x, int y, int bpp, LOGI("set rectangle to cover entire image\n"); api.SetRectangle(0, 0, x, y); - LOGI("set page seg mode to single character\n"); - api.SetPageSegMode(tesseract::PSM_SINGLE_CHAR); LOGI("recognize\n"); char * text = api.GetUTF8Text(); if (tessedit_write_images) { @@ -118,7 +116,7 @@ void test_ocr(const char *infile, int x, int y, int bpp, fwrite(text, strlen(text), 1, fp); fclose(fp); } - else LOGI("could not write to output %s\n", outfile); + else LOGI("could not write to output %s\n", outfile); int mean_confidence = api.MeanTextConf(); LOGI("mean confidence: %d\n", mean_confidence); @@ -395,7 +393,6 @@ ocr_set_page_seg_mode(JNIEnv *env, jobject thiz, jint mode) { LOGV(__FUNCTION__); native_data_t *nat = get_native_data(env, thiz); - nat->api.SetPageSegMode((tesseract::PageSegMode)mode); } static void class_init(JNIEnv* env, jclass clazz) { diff --git a/ccmain/test.cpp b/ccmain/test.cpp index a3654dc..84d0fcc 100644 --- a/ccmain/test.cpp +++ b/ccmain/test.cpp @@ -69,7 +69,7 @@ int main(int argc, char **argv) { api.SetImage((const unsigned char *)buffer, x, y, bpp, bpp*x); printf("set rectangle to cover entire image\n"); - api.SetRectangle(0, 0, x, y); + api.SetRectangle(2, 2, 10, 10); printf("set page seg mode to single character\n"); //api.SetPageSegMode(tesseract::PSM_AUTO); |