Skip to content
This repository has been archived by the owner on Mar 17, 2022. It is now read-only.

Commit

Permalink
Update for Tesseract v3.03 r990
Browse files Browse the repository at this point in the history
  • Loading branch information
rmtheis committed Jan 16, 2014
1 parent 7b8dcb2 commit 3afb2c3
Show file tree
Hide file tree
Showing 341 changed files with 107,647 additions and 18,083 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ convenience due to its dependency on Leptonica.
Build
=====

This project is set up to build on Android SDK Tools r19+ and Android NDK r7c+. The build works on Linux, Mac OS X, and Windows 7. See [Issues](https://github.com/rmtheis/tess-two/issues) for reported build issues.
This project is set up to build on Android SDK Tools r22.3+ and Android NDK r9c+. The build works on Linux, Mac OS X, and Windows 7/8. See [Issues](https://github.com/rmtheis/tess-two/issues) for reported build issues.

On 64-bit Ubuntu, you may need to install the `ia32-libs` 32-bit compatibility library.

Expand Down
155 changes: 79 additions & 76 deletions tess-two/jni/com_googlecode_tesseract_android/Android.mk
Original file line number Diff line number Diff line change
@@ -1,76 +1,79 @@
LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

LOCAL_MODULE := libtess

# tesseract (minus executable)

BLACKLIST_SRC_FILES := \
%api/tesseractmain.cpp \
%viewer/svpaint.cpp

TESSERACT_SRC_FILES := \
$(wildcard $(TESSERACT_PATH)/api/*.cpp) \
$(wildcard $(TESSERACT_PATH)/ccmain/*.cpp) \
$(wildcard $(TESSERACT_PATH)/ccstruct/*.cpp) \
$(wildcard $(TESSERACT_PATH)/ccutil/*.cpp) \
$(wildcard $(TESSERACT_PATH)/classify/*.cpp) \
$(wildcard $(TESSERACT_PATH)/cube/*.cpp) \
$(wildcard $(TESSERACT_PATH)/cutil/*.cpp) \
$(wildcard $(TESSERACT_PATH)/dict/*.cpp) \
$(wildcard $(TESSERACT_PATH)/image/*.cpp) \
$(wildcard $(TESSERACT_PATH)/neural_networks/runtime/*.cpp) \
$(wildcard $(TESSERACT_PATH)/textord/*.cpp) \
$(wildcard $(TESSERACT_PATH)/viewer/*.cpp) \
$(wildcard $(TESSERACT_PATH)/wordrec/*.cpp)

LOCAL_SRC_FILES := \
$(filter-out $(BLACKLIST_SRC_FILES),$(subst $(LOCAL_PATH)/,,$(TESSERACT_SRC_FILES)))

LOCAL_C_INCLUDES := \
$(TESSERACT_PATH)/api \
$(TESSERACT_PATH)/ccmain \
$(TESSERACT_PATH)/ccstruct \
$(TESSERACT_PATH)/ccutil \
$(TESSERACT_PATH)/classify \
$(TESSERACT_PATH)/cube \
$(TESSERACT_PATH)/cutil \
$(TESSERACT_PATH)/dict \
$(TESSERACT_PATH)/image \
$(TESSERACT_PATH)/neural_networks/runtime \
$(TESSERACT_PATH)/textord \
$(TESSERACT_PATH)/viewer \
$(TESSERACT_PATH)/wordrec \
$(LEPTONICA_PATH)/src

LOCAL_CFLAGS := \
-DHAVE_LIBLEPT \
-DUSE_STD_NAMESPACE \
-D'VERSION="Android"' \
-include ctype.h \
-include unistd.h \
-fpermissive \
-Wno-deprecated

# jni

LOCAL_SRC_FILES += \
pageiterator.cpp \
resultiterator.cpp \
tessbaseapi.cpp

LOCAL_C_INCLUDES += \
$(LOCAL_PATH)

LOCAL_LDLIBS += \
-ljnigraphics \
-llog

# common

LOCAL_PRELINK_MODULE := false
LOCAL_SHARED_LIBRARIES := liblept
LOCAL_DISABLE_FORMAT_STRING_CHECKS := true

include $(BUILD_SHARED_LIBRARY)
LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

LOCAL_MODULE := libtess

# tesseract (minus executable)

BLACKLIST_SRC_FILES := \
%api/tesseractmain.cpp \
%viewer/svpaint.cpp

TESSERACT_SRC_FILES := \
$(wildcard $(TESSERACT_PATH)/api/*.cpp) \
$(wildcard $(TESSERACT_PATH)/ccmain/*.cpp) \
$(wildcard $(TESSERACT_PATH)/ccstruct/*.cpp) \
$(wildcard $(TESSERACT_PATH)/ccutil/*.cpp) \
$(wildcard $(TESSERACT_PATH)/classify/*.cpp) \
$(wildcard $(TESSERACT_PATH)/cube/*.cpp) \
$(wildcard $(TESSERACT_PATH)/cutil/*.cpp) \
$(wildcard $(TESSERACT_PATH)/dict/*.cpp) \
$(wildcard $(TESSERACT_PATH)/opencl/*.cpp) \
$(wildcard $(TESSERACT_PATH)/neural_networks/runtime/*.cpp) \
$(wildcard $(TESSERACT_PATH)/textord/*.cpp) \
$(wildcard $(TESSERACT_PATH)/viewer/*.cpp) \
$(wildcard $(TESSERACT_PATH)/wordrec/*.cpp)

LOCAL_SRC_FILES := \
$(filter-out $(BLACKLIST_SRC_FILES),$(subst $(LOCAL_PATH)/,,$(TESSERACT_SRC_FILES)))

LOCAL_C_INCLUDES := \
$(TESSERACT_PATH)/api \
$(TESSERACT_PATH)/ccmain \
$(TESSERACT_PATH)/ccstruct \
$(TESSERACT_PATH)/ccutil \
$(TESSERACT_PATH)/classify \
$(TESSERACT_PATH)/cube \
$(TESSERACT_PATH)/cutil \
$(TESSERACT_PATH)/dict \
$(TESSERACT_PATH)/opencl \
$(TESSERACT_PATH)/neural_networks/runtime \
$(TESSERACT_PATH)/textord \
$(TESSERACT_PATH)/viewer \
$(TESSERACT_PATH)/wordrec \
$(LEPTONICA_PATH)/src

LOCAL_CFLAGS := \
-DHAVE_LIBLEPT \
-DGRAPHICS_DISABLED \
--std=c++11 \
-DUSE_STD_NAMESPACE \
-D'VERSION="Android"' \
-include ctype.h \
-include unistd.h \
-fpermissive \
-Wno-deprecated \
-D_GLIBCXX_PERMIT_BACKWARD_HASH # fix for android-ndk-r8e/sources/cxx-stl/gnu-libstdc++/4.6/include/ext/hash_map:61:30: fatal error: backward_warning.h: No such file or directory

# jni

LOCAL_SRC_FILES += \
pageiterator.cpp \
resultiterator.cpp \
tessbaseapi.cpp

LOCAL_C_INCLUDES += \
$(LOCAL_PATH)

LOCAL_LDLIBS += \
-ljnigraphics \
-llog

# common

LOCAL_PRELINK_MODULE := false
LOCAL_SHARED_LIBRARIES := liblept
LOCAL_DISABLE_FORMAT_STRING_CHECKS := true

include $(BUILD_SHARED_LIBRARY)
8 changes: 7 additions & 1 deletion tess-two/jni/com_googlecode_tesseract_android/src/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
2013-09-20 v3.03
2014-01-09 v3.03
* Added new training tool text2image to generate box/tif file pairs from
text and truetype fonts.
* Added support for PDF output with searchable text.
* Removed entire IMAGE class and all code in image directory.
* Tesseract executable: support for output to stdout; limited support for one
page images from stdin (especially on Windows)
* Added Renderer to API to allow document-level processing and output
of document formats, like hOCR, PDF.
* Major refactor of word-level recognition, beam search, eliminating dead code.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ endif

.PHONY: install-langs ScrollView.jar install-jars $(TRAINING_SUBDIR)

SUBDIRS = ccutil viewer cutil image opencl ccstruct dict classify wordrec neural_networks/runtime textord cube ccmain api . tessdata
SUBDIRS = ccutil viewer cutil opencl ccstruct dict classify wordrec neural_networks/runtime textord cube ccmain api . tessdata

EXTRA_DIST = eurotext.tif phototest.tif ReleaseNotes \
aclocal.m4 config configure.ac autogen.sh tesseract.spec contrib \
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
AM_CPPFLAGS += -DLOCALEDIR=\"$(localedir)\"\
-I$(top_srcdir)/ccutil -I$(top_srcdir)/ccstruct \
-I$(top_srcdir)/image -I$(top_srcdir)/viewer \
-DUSE_STD_NAMESPACE \
-I$(top_srcdir)/ccutil -I$(top_srcdir)/ccstruct -I$(top_srcdir)/cube \
-I$(top_srcdir)/viewer \
-I$(top_srcdir)/textord -I$(top_srcdir)/dict \
-I$(top_srcdir)/classify -I$(top_srcdir)/ccmain \
-I$(top_srcdir)/wordrec -I$(top_srcdir)/cutil \
Expand Down Expand Up @@ -29,7 +30,6 @@ libtesseract_api_la_LIBADD = \
../classify/libtesseract_classify.la \
../dict/libtesseract_dict.la \
../ccstruct/libtesseract_ccstruct.la \
../image/libtesseract_image.la \
../cutil/libtesseract_cutil.la \
../viewer/libtesseract_viewer.la \
../ccutil/libtesseract_ccutil.la \
Expand All @@ -40,7 +40,7 @@ libtesseract_api_la_CPPFLAGS = $(AM_CPPFLAGS)
if VISIBILITY
libtesseract_api_la_CPPFLAGS += -DTESS_EXPORTS
endif
libtesseract_api_la_SOURCES = baseapi.cpp capi.cpp renderer.cpp
libtesseract_api_la_SOURCES = baseapi.cpp capi.cpp pdfrenderer.cpp renderer.cpp

lib_LTLIBRARIES += libtesseract.la
libtesseract_la_LDFLAGS =
Expand All @@ -58,7 +58,6 @@ libtesseract_la_LIBADD = \
../classify/libtesseract_classify.la \
../dict/libtesseract_dict.la \
../ccstruct/libtesseract_ccstruct.la \
../image/libtesseract_image.la \
../cutil/libtesseract_cutil.la \
../viewer/libtesseract_viewer.la \
../ccutil/libtesseract_ccutil.la \
Expand All @@ -68,7 +67,7 @@ libtesseract_la_LDFLAGS += -version-info $(GENERIC_LIBRARY_VERSION)

bin_PROGRAMS = tesseract
tesseract_SOURCES = $(top_srcdir)/api/tesseractmain.cpp
tesseract_LDADD = libtesseract.la
tesseract_LDADD = libtesseract.la -lrt
tesseract_CPPFLAGS = $(AM_CPPFLAGS)
if USE_OPENCL
tesseract_LDADD += $(OPENCL_LIB)
Expand Down
Loading

0 comments on commit 3afb2c3

Please sign in to comment.