Commit Graph

1847 Commits

Author SHA1 Message Date
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
Ray Smith
5deebe6c27 Fixed multilang for LSTM, pushed cube to one side without actually deleting it 2016-12-05 14:41:43 -08:00
Stefan Weil
61d0e8f0ff doc: Fix line endings
Remove spaces at line endings and replace CRLF by LF.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-12-04 20:41:37 +01:00
Stefan Weil
6140be6a55 openmp: Fix build with clang++ and compilers without OpenMP support
Builds without support for OpenMP failed with the old code. Fix this:

* Add OPENMP_CXXFLAGS for ccmain.
* Replace unconditional -fopenmp by OPENMP_CXXFLAGS for lstm.
* Always use _OPENMP for conditional compilation.
* Remove OPENMP as there is already _OPENMP.
* Include omp.h conditionally.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-12-04 18:44:03 +01:00
Egor Pugin
798d79aaa5 Update cppan.yml 2016-12-04 20:19:46 +03:00
Stefan Weil
533399e335 Remove unused macro _TESS_FILE_BASENAME
This fixes a compiler warning from clang:

ccutil/platform.h:88:13: warning:
 macro name is a reserved identifier [-Wreserved-id-macro]
    #define _TESS_FILE_BASENAME_                                            \

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-12-04 15:43:03 +01:00
Stefan Weil
70c6f1624c Fix #define guards in header files
Some guards were missing, others were not the first statement.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-12-04 15:43:03 +01:00
Stefan Weil
4897796d57 Replace reserved identifiers used in #define guards header files
Use macro names as suggested by the Google C++ Style Guide
(https://google.github.io/styleguide/cppguide.html#The__define_Guard).

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-12-04 15:43:03 +01:00
zdenop
c1ec06c35f Merge pull request #530 from stweil/clang
Remove extra semicolons after member function definitions
2016-12-04 15:38:08 +01:00
zdenop
9ec5cd37d2 Merge pull request #528 from stweil/opencl
opencl: Add missing checks for OpenCL failures
2016-12-04 15:37:09 +01:00
Stefan Weil
cefc420ddb Remove extra semicolons after member function definitions
clang++ report:
api/baseapi.h:852:4: warning:
 extra ';' after member function definition [-Wextra-semi]
[...]

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-12-04 14:54:52 +01:00
Stefan Weil
2bb0d9a0bf opencl: Add missing checks for OpenCL failures
Fix also text for an existing check.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-12-03 22:34:02 +01:00
Egor Pugin
3e11fc1c3d Merge pull request #524 from stweil/coverity
Fix two new coverity warnings
2016-12-03 12:58:04 +03:00
Stefan Weil
7e3ff36080 cube: Fix coverity warning caused by unneeded null pointer check
Commit 03eec61a2f removed unneeded
null pointer checks after new, but missed one which now raises
a warning from coverity scan. Remove that one, too.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-12-02 22:25:00 +01:00
Stefan Weil
4704fcacb1 cube: Fix use after free regression
Coverity report:

CID 1366758:  Memory - corruptions  (USE_AFTER_FREE)
Calling "operator delete[]" frees pointer "label32"
 which has already been freed.

Commit f60ff4d575 fixed several memory leaks
but also added this wrong delete operation.

label32 is assigned to char_samp->label32_, so it is freed when deleting
char_samp.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-12-02 22:17:41 +01:00
zdenop
4ac54a27c6 Merge pull request #523 from stweil/casts
opencl: Remove unneeded and potentially bad type casts
2016-12-02 17:21:33 +01:00
Stefan Weil
a389b7c8e9 opencl: Remove unneeded and potentially bad type casts
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-12-02 00:02:35 +01:00
zdenop
e4faf95586 Merge pull request #515 from stweil/parameters
Support standard parameter form --oem, --psm for tesseract executable
2016-12-01 20:37:30 +01:00
zdenop
690616279c Merge pull request #514 from stweil/free
Simplify new operations
2016-12-01 20:36:24 +01:00
zdenop
875db240e8 Merge pull request #503 from stweil/modernize
opencl: Use nullptr and POSIX data types
2016-12-01 20:34:30 +01:00
zdenop
906438fa5c Merge pull request #506 from stweil/lstm
lstm: Fix issues reported by Coverity scan
2016-12-01 20:34:04 +01:00
Stefan Weil
dc066213c7 opencl: Replace NULL by nullptr
Remove also some unneeded nullptr assignments.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-12-01 14:50:20 +01:00
Stefan Weil
397bcc66d5 opencl: Replace Tesseract data types by POSIX data types
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-12-01 14:49:27 +01:00