Commit Graph

4080 Commits

Author SHA1 Message Date
zdenop
5d23dfa5ce create OUTPUT_DIR did not exist; fixes #2497 2019-06-16 18:37:03 +02:00
Stefan Weil
153b921c35 unittest: Catch missing eng.traineddata in baseapi_test
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-06-16 18:37:03 +02:00
Stefan Weil
ce82facc2f unittest: Fix and enable normstrngs_test
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-06-16 18:37:03 +02:00
Stefan Weil
c01b3229fe unittest: Fix and enable textlineprojection_test
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-06-16 18:37:03 +02:00
Stefan Weil
bb2ea347b1 unittest: Fix and enable scanutils_test
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-06-16 18:36:21 +02:00
Shree
3729b7b321 Allow saving of box/tiff pairs during base tesseract training 2019-06-16 18:36:21 +02:00
Shree
dfcdfe565f Allow saving of box/tiff pairs during base tesseract training 2019-06-16 18:36:21 +02:00
Shree
706a2330e2 Allow saving of box/tiff pairs during base tesseract training 2019-06-16 18:35:37 +02:00
Stefan Weil
35b8826289 unittest: Fix and enable ligature_table_test
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-06-16 18:35:19 +02:00
Egor Pugin
15da5c1206 [sw] Remove inexistent include dirs. 2019-06-16 18:35:19 +02:00
Egor Pugin
5b32be82f4 [sw] Exclude missing include dir. 2019-06-16 18:35:19 +02:00
Egor Pugin
f9da14eca1 Update appveyor.yml 2019-06-16 18:35:19 +02:00
Egor Pugin
b6f9ab6616 Update sw script. 2019-06-16 18:34:31 +02:00
zdenop
249acaed28 cmake: using c++ standard for g++ 2019-06-16 18:34:14 +02:00
Stefan Weil
2f6f77bb55 Revert "Do not hardcode c++11 for unix builds"
This reverts commit 4348793bd5.
It is needed for Travis CI based on Ubuntu Trusty.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-06-16 18:34:02 +02:00
İsmail Dönmez
796129ea58 Fix OpenMP builds on Unix 2019-06-16 18:33:42 +02:00
İsmail Dönmez
9fcef36bbb Do not hardcode c++11 for unix builds 2019-06-16 18:33:30 +02:00
İsmail Dönmez
911a991657 Detect and use C++17 support for CMake builds 2019-06-16 18:33:03 +02:00
Stefan Weil
8204ca0848 Add dot product implementation using std::inner_product
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-06-16 18:32:31 +02:00
Stefan Weil
d33ced1958 Use C++17 compiler if possible
This allows using new features of C++17 conditionally.
Simplify also the code which checks and sets the C++ version.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-06-16 18:32:21 +02:00
Shree
26f4126115 Update documentation for unicharset_extractor 2019-06-16 18:32:12 +02:00
zdenop
ff45801dc5 fix packaging appveyor artifacts 2019-06-16 18:32:03 +02:00
Stefan Weil
6e7dcc12e0 Fix crash in PreloadRenderers with nullptr outputbase
The crash could be triggered by a wrong command line.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-06-16 18:31:50 +02:00
Stefan Weil
b0e0e27abf Fix build for unittests
Commit 29f2cff203 was the wrong fix
for the compiler warnings because it broke the unittest build.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-06-16 18:31:42 +02:00
Stefan Weil
90b12b3afa scanedg: Add const attributes
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-06-16 18:31:10 +02:00
Stefan Weil
fdb3f58c6c unittest: Remove unused methods
This fixes compiler warnings.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-06-16 18:31:01 +02:00
Stefan Weil
9b9d4bf0fa Remove EXTERN macro
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-06-16 18:30:54 +02:00
Stefan Weil
927d1b8f9e Remove unused macros
This fixes compiler warnings from clang++ like these ones:

    src/ccutil/params.cpp:34:9: warning: macro is not used [-Wunused-macros]
    src/cutil/oldlist.cpp:67:9: warning: macro is not used [-Wunused-macros]
    src/cutil/oldlist.cpp:68:9: warning: macro is not used [-Wunused-macros]
    src/cutil/oldlist.cpp:78:9: warning: macro is not used [-Wunused-macros]

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-06-16 18:30:44 +02:00
Stefan Weil
831a3e6167 configure: Fix cross builds (check for TensorFlow header)
AC_CHECK_FILE does not work in cross builds. Such builds aborted.
Replace it by AC_CHECK_HEADERS. This fixes cross builds.

To enable TensorFlow in cross builds, more work is needed.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-06-16 18:30:22 +02:00
Stefan Weil
337a467d60 Fix compiler errors for old gcc
Travis CI with gcc 4.8 failed with errors.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-06-16 18:30:09 +02:00
Stefan Weil
4712a5ebd8 Remove some unused functions, constants and variables
This fixes compiler warnings, for example:

    src/ccutil/strngs.cpp:36:11: warning: unused variable 'kMaxDoubleSize' [-Wunused-const-variable]
    src/viewer/svutil.cpp:320:13: warning: unused function 'TessFreeAddrInfo' [-Wunused-function]
    src/ccstruct/werd.cpp:32:19: warning: unused variable 'CANT_SCALE_EDGESTEPS' [-Wunused-const-variable]
    src/textord/bbgrid.cpp:103:10: warning: unused variable 'old_tright' [-Wunused-variable]

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-06-16 18:29:59 +02:00
Stefan Weil
38f348627b training: Add missing static attributes
That fixes several warnings from clang++ like the following one:

    src/training/combine_lang_model.cpp:36:1: warning: no previous extern declaration for non-static variable 'FLAGS_lang_is_rtl' [-Wmissing-variable-declarations]

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-06-16 18:29:49 +02:00
Stefan Weil
66e5689167 training: Move declarations from cpp files to h file
That fixes several warnings from clang++ like the following one:

    src/training/commontraining.cpp:95:1: warning: no previous extern declaration for non-static variable 'FLAGS_D' [-Wmissing-variable-declarations]

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-06-16 18:29:37 +02:00
Stefan Weil
6dfb049ccf featdefs: Add missing include statement
It is needed for PicoFeatureLength. This fixes a compiler warning.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-06-16 18:29:26 +02:00
Stefan Weil
b4a7f51cd6 Add missing static attributes
This fixes lots of compiler warnings like these ones:

    src/api/baseapi.cpp:113:13: warning: no previous extern declaration for non-static variable 'kInputFile' [-Wmissing-variable-declarations]
    src/api/baseapi.cpp:117:13: warning: no previous extern declaration for non-static variable 'kOldVarsFile' [-Wmissing-variable-declarations]
    src/api/baseapi.cpp:97:10: warning: no previous extern declaration for non-static variable 'stream_filelist' [-Wmissing-variable-declarations]
    src/ccmain/equationdetect.cpp:46:10: warning: no previous extern declaration for non-static variable 'equationdetect_save_bi_image' [-Wmissing-variable-declarations]

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-06-16 18:29:15 +02:00
Stefan Weil
7f32cb659b bits16: Modernize code
This also fixes warnings like the following one from clang++:

    src/ccmain/pgedit.cpp:114:15: warning: declaration requires a global constructor [-Wglobal-constructors]

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-06-16 18:29:05 +02:00
Raphael Graf
d809200b6b Do not link librt on OpenBSD 2019-06-16 18:28:45 +02:00
Stefan Weil
2160ebfd03 unicodes: Optimize code by using constexpr and removing unused globals
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-06-16 18:28:33 +02:00
Stefan Weil
cb6cf802e0 featdefs: Optimize code by using constexpr
This also fixes some warnings from clang++:

    src/classify/featdefs.cpp:47:15: warning: declaration requires a global constructor [-Wglobal-constructors]
    src/classify/featdefs.cpp:57:15: warning: declaration requires a global constructor [-Wglobal-constructors]
    src/classify/featdefs.cpp:66:15: warning: declaration requires a global constructor [-Wglobal-constructors]
    src/classify/featdefs.cpp:75:15: warning: declaration requires a global constructor [-Wglobal-constructors]

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-06-16 18:28:23 +02:00
Stefan Weil
a4e1378218 Fix broken build for Leptonica < 1.77
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-06-16 18:28:06 +02:00
Stefan Weil
9e23dc2857 Remove classify/cutoffs.h
It only defined CLASS_CUTOFF_ARRAY and some unused definitions.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-06-16 18:27:57 +02:00
zdenop
8b875c00ad fix '--enable-visibility' build 2019-06-16 18:27:28 +02:00
zdenop
516ada66e8 cmake: respect -DTESSDATA_PREFIX=/path (on linux) 2019-06-16 18:27:18 +02:00
Stefan Weil
227452f872 Replace Tensorflow by TensorFlow
The name is written in camel case, see https://www.tensorflow.org/.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-06-16 18:27:08 +02:00
Stefan Weil
34311b36d9 Fix linking of unittest with Tensorflow
This does not add Tensorflow tests. It only fixes the linker errors.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-06-16 18:26:51 +02:00
Stefan Weil
6c68f08460 Implement check for Tensorflow header file
This looks for one of the header files which are included by Tesseract.
It currently uses a hard coded path which works for Debian / Ubuntu.

Simplify also the rules for linking Tensorflow.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-06-16 18:26:42 +02:00
Stefan Weil
bed089092a Remove "third_party/" in comments and update path names
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-06-16 18:26:28 +02:00
Stefan Weil
b7537e94a0 Support build with Tensorflow
It expects include files in /usr/include/tensorflow.

* Add configure option --with-tensorflow (disabled by default)
* Fix data type tensorflow::int64
* Remove "third_party/" in include statements
* Add dummy implementations for Backward and DebugWeights in TFNetwork
* Add files generated with protoc from tfnetwork.proto
  (so the Tensorflow sources are not needed for the build)
* Update Makefiles

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-06-16 18:26:18 +02:00
Zdenko Podobný
39c800950f cmake: fix tiff linking to executable if tiffio.h is found 2019-06-16 18:26:08 +02:00
Zdenko Podobný
e27a07e0c7 fix missing tiff format 2019-06-16 18:24:24 +02:00