Commit Graph

1971 Commits

Author SHA1 Message Date
zdenop
30ad392423 Merge pull request #579 from stweil/master
Fix page range in log message
2016-12-15 11:47:42 +01:00
Amit D
06fb88495c Update Android.mk 2016-12-15 12:08:10 +02:00
Stefan Weil
23a7330c85 Fix page range in log message
The internal range is 0...(n-1), but for users a page range 1...n is
more natural. Showing a range 0...n is wrong because it would imply
n+1 pages.

Change printed text from

    Loaded 72/72 pages (0-72) of document ...

to

    Loaded 72/72 pages (1-72) of document ...

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-12-15 11:05:22 +01:00
Egor Pugin
ead87a7180 Fix build. 2016-12-15 12:43:13 +03:00
zdenop
831e161066 Merge pull request #569 from stweil/nullptr
training: Replace NULL by nullptr
2016-12-15 09:05:20 +01:00
zdenop
d77a9b7375 Merge pull request #577 from stweil/config
Simplify configuration for Leptonica
2016-12-15 08:30:48 +01:00
zdenop
a0201831c3 Merge pull request #576 from stweil/shellcheck
Fix some issues reported by shellcheck (SC2004, SC2006)
2016-12-15 08:30:30 +01:00
zdenop
da4c064c2e Merge pull request #531 from stweil/guards
Fix header file guards and replace reserved identifiers
2016-12-15 08:29:32 +01:00
Stefan Weil
cb6e9e0071 training: Replace NULL by nullptr
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-12-14 21:08:36 +01:00
Ray Smith
9d6e4f6c50 Fixed capi to remove cube part 2 2016-12-14 11:37:51 -08:00
Ray Smith
4b0dae5e22 Fixed capi to remove cube 2016-12-14 11:35:46 -08:00
Ray Smith
0b76f26497 More makefile changes to remove cube 2016-12-14 11:18:52 -08:00
Ray Smith
81ebba0394 More makefile changes to remove cube 2016-12-14 11:17:06 -08:00
Ray Smith
5c3839bdb4 Delete cube code 2016-12-14 11:00:43 -08:00
Ray Smith
432684dd6e Makefile changes to remove cube 2016-12-14 10:58:24 -08:00
Ray Smith
9f5ba9105f Removed dependency on cube from the code 2016-12-14 10:55:15 -08:00
Ray Smith
5129c43579 Stopped error messages from pixaGetCount 2016-12-14 10:46:27 -08:00
Stefan Weil
d70f3c3663 Simplify configuration for Leptonica
All relevant versions of Leptonica support pkg-config, so the old
configuration code can be removed.

Update also the error message for missing Leptonica.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-12-14 14:51:49 +01:00
Stefan Weil
b75beda7f9 Fix some issues reported by shellcheck (SC2004, SC2006)
Examples:

In training/tesstrain.sh line 64:
if (( ${LINEDATA} )); then
      ^-- SC2004: $/${} is unnecessary on arithmetic variables.

In training/tesstrain.sh line 56:
source `dirname $0`/language-specific.sh
       ^-- SC2006: Use $(..) instead of legacy `..`.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-12-14 14:11:24 +01:00
Ray Smith
13e46ae1c4 Made LSTM the default engine, pushed cube out 2016-12-13 14:37:40 -08:00
zdenop
dc124043ec Merge pull request #572 from stweil/mingw64
Address some build issues (mainly for Mingw-w64)
2016-12-13 16:41:56 +01:00
Stefan Weil
3a5446bb52 Use pkg-config for Leptonica compiler flags
The old settings don't work for cross compilations (wrong include path)
or require setting LIBLEPT_HEADERSDIR. They are used as fallback if
there is no pkg-config configuration.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-12-13 15:52:29 +01:00
Stefan Weil
9ec0c4fa9c api: Add missing dependency on libtiff
It is needed because of a direct call to TIFFSetWarningHandler.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-12-13 13:29:34 +01:00
Stefan Weil
a9b300dc1d Use pkg-config for icu compiler and linker flags
The old settings are used as fallback if there is no configuration.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-12-13 13:29:34 +01:00
Stefan Weil
aa964b548a opencl: Fix runtime crash when no device was found
The native CPU is always available and needs an initialized profile.

Signed-off-by: Stefan Weil <stefan.weil@bib.uni-mannheim.de>
2016-12-12 20:16:08 +01:00
zdenop
9234b4c62d Merge pull request #565 from stweil/openmp
openmp: Fix OpenMP support
2016-12-12 08:42:34 +01:00
Stefan Weil
224eb8ae04 openmp: Fix OpenMP support
Replace OPENMP_CFLAGS by OPENMP_CXXFLAGS.
This completes commit 6140be6a55.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-12-11 22:48:26 +01:00
zdenop
faeb0d6f99 Merge pull request #563 from stweil/java
java: Improve build rules
2016-12-11 22:27:29 +01:00
Stefan Weil
92f2eda2c7 java: Improve build rules
* Fix builds in subdirectories:
  * Add srcdir to Manifest.txt.
  * Remove srcdir from piccolo2d-core-3.0.jar and piccolo2d-extras-3.0.jar.

* Add dependency of SCROLLVIEW_CLASSES on SCROLLVIEW_LIBS.
  The SCROLLVIEW_LIBS are now automatically fetched when needed.

* Add .PHONY target for fetch-jars.

* Improve rule for clean target.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-12-11 22:04:17 +01:00
Egor Pugin
49401e6d82 Merge pull request #558 from stweil/typo
Fix two typos in comments
2016-12-11 13:19:52 +03:00
Stefan Weil
a87d073bae Fix two typos in comments
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-12-11 09:20:17 +01:00
zdenop
0c7ada4e11 Merge pull request #551 from amitdo/del-unused-listio
Remove unused code
2016-12-09 19:41:36 +01:00
amitdo
1901aaef42 Remove 'listio.cpp' and 'listio.h' from vs2010 vcxproj 2016-12-09 16:19:02 +02:00
alankila@bel.fi
d2d708cad5 Remove unused code.
Remove 'cutil/listio.cpp' and 'cutil/listio.h'. Also remove 'strsave' and 'strfree' defines from 'cutil/cutil.h'.
2016-12-09 15:28:43 +02:00
zdenop
3a47adcbe1 Merge pull request #544 from jbarlow83/master
Add new C API for detecting orientation and script, remove old one (4.00)
2016-12-09 13:34:18 +01:00
James R. Barlow
56b6f061cd Revise after code review 2016-12-08 15:08:48 -08:00
zdenop
3c0c54f059 Merge pull request #353 from pnordhus/remove_dawgpositionvector_dtor
Remove redundant destructor
2016-12-08 13:04:58 +01:00
James R. Barlow
fb7298e82e Remove unsafe API TessBaseAPIDetectOS entirely 2016-12-07 13:26:54 -08:00
James R. Barlow
bc95798e01 Implement a new orientation and script detection API for C and C++
See issue #424.

The existing C API for TessBaseAPIDetectOS requires a C caller to successfully allocate struct OSResults which is actually a C++ class.  Generally it won't
be possible for a regular C compiler to do this properly.

It's also assumed that most API level users of Tesseract are only interested in Tesseract's best guess as to script and orientation, not the individual values for all possible scripts.

This introduces a new API with a better name that is more closely aligned with the output of 'tesseract -psm 0'.  Both tesseract -psm 0 and this API now share the same code in baseapi.cpp.
2016-12-07 13:21:05 -08:00
Jeff Breidenbach
ed4c4c6bf5 Produce warning for invalid resolution. Fix #453 2016-12-07 22:06:00 +01:00
zdenop
94aebb1791 Merge pull request #543 from stweil/leptonica
tesseract: Disable Leptonica messages
2016-12-07 21:52:27 +01:00
Stefan Weil
217a4dda43 tesseract: Disable Leptonica messages
Disable debugging and informational messages from Leptonica
for release builds.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-12-07 21:37:23 +01:00
zdenop
929d25ca67 Merge pull request #533 from stweil/crlf
doc: Fix line endings
2016-12-07 14:47:17 +01:00
zdenop
7f7cea1ee6 Merge pull request #532 from stweil/openmp
openmp: Fix build with clang++ and compilers without OpenMP support
2016-12-07 14:47:08 +01:00
zdenop
8cf7539a4b Merge pull request #539 from stweil/mingw-w64
training: Update Makefile for current Mingw-w64
2016-12-07 14:37:12 +01:00
Stefan Weil
7755e05e50 training: Update Makefile for current Mingw-w64
Mingw-w64 no longer needs special linker options,
builds with those options fail.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-12-06 23:02:47 +01:00
Ray Smith
d55f462c9c More clang-tidy from previous commits 2016-12-06 13:45:49 -08:00
Ray Smith
025689fad6 Fixed damage to binary images when processing PDFs, issue #535 2016-12-06 13:40:57 -08:00
Ray Smith
7744da9b7d Fixed Android build breakage 2016-12-06 13:37:10 -08:00
Ray Smith
65517794f9 Added missing lstm.train 2016-12-06 08:48:23 -08:00