Commit Graph

4086 Commits

Author SHA1 Message Date
Stefan Weil
75a9926f01 FPRow: Add missing initialisation for scalar (CID 1402754)
Modernize the code also a little bit.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-11-01 12:28:11 +01:00
Stefan Weil
cad3433dc8 Fix format strings for size_t arguments (CID 1402762, 1402767)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-11-01 12:28:03 +01:00
Stefan Weil
c2839ecfd6 Fix format string for 64 bit integer (CID 1402986)
Commit c1264c189e was not the right fix.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-11-01 12:26:28 +01:00
Stefan Weil
595e263ceb tfnetwork: Add missing return statement (CID 1402992)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-11-01 12:26:21 +01:00
Egor Pugin
cc1486d270 [cmake] Hide unnecessary find_package. 2019-11-01 12:26:15 +01:00
Egor Pugin
3afc185ad4 Implement CMake+SW build.
Currently only Windows is supported.
You could try it as following:

    mkdir build_sw && cd build_sw && cmake .. -DSW_BUILD=1
2019-11-01 12:26:09 +01:00
theirix
5688c26b03 Avoid using experimental C++14/17 support in CMake
This commit points CMAKE_CXX_STANDARD to the latest non-experimental standard.

CMake announces C++14 and C++17 support even if the
compiler supports it only experimentally (c++1y and c++1z).
It breaks cmake standard detection and requires workarounds
for old compilers.
2019-11-01 12:26:03 +01:00
zhuangzhuang1988
4b4e1f1e8d fix tesstrain.py error 2019-11-01 12:25:57 +01:00
zhuangzhuang
b8014ee1c1 fix windows stdout messy code (#2546)
* fix windows stdout messy code

* fix type name error

* remoe unnecessary  codepoint check.
2019-11-01 12:25:48 +01:00
zdenop
d93346ffef cmake: do not report unused-command-line-argument for clan released target 2019-11-01 12:25:36 +01:00
Zdenko Podobný
5280bbcade 4.1.0 Release 2019-07-07 14:34:08 +02:00
Stefan Weil
22fb70cb85 Fix handling of single pages from multipage TIFF files (issue #2537)
That case now uses Leptonica to deliver the desired image instead of
using an inefficient loop in the Tesseract code.

See commit 54fafc4e2e which used similar
code in the past.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-07-06 10:00:46 +02:00
Stefan Weil
08ca7b8416 Fix linker error with disabled legacy engine (issue #2532)
Commit 3871caae86 introduced a build
regression when the legacy engine was disabled.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-07-06 10:00:46 +02:00
Stefan Weil
48641b0791 Remove outdated build information for Android
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-07-06 10:00:46 +02:00
Stefan Weil
e53e10503a genericvector: Remove redundant declarations
tesseract::FileReader and tesseract::FileWriter are already declared
in serialis.h which is included by genericvector.h.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-07-06 09:53:00 +02:00
Stefan Weil
f4698154b3 Revert "Replace callback by direct function calls in TessBaseAPI::GetComponentImages"
This reverts commit 1a44ce3178.
It removed global symbols, so the binary API was incompatible.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-07-06 07:54:15 +02:00
Stefan Weil
792b39d5c8 Revert "Move LSTMTrainer from libtesseract to libtesseract_training"
This reverts commit a30d433356.

That commit removed LSTMTrainer also from libtesseract.so which breaks
the ABI compatibility.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-07-06 07:41:22 +02:00
zdenop
b101d58621
Merge pull request #2543 from db4/4.1
Fix crash in Tesseract::classify_word_and_language()
2019-07-05 12:35:10 +02:00
Dmitry Bely
c310fef8f0 Fix crash in Tesseract::classify_word_and_language() when tessedit_timing_debug is enabled 2019-07-05 10:00:48 +03:00
Stefan Weil
d8494f3215 Revert "Simplify indirect call of LMPainPoints::GeneratePainPoint"
This reverts commit 6a0fc4f89f.
It removed global symbols, so the binary API was incompatible.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-07-02 06:39:53 +02:00
Stefan Weil
1d5a320d4a Revert "Simplify class LSTMTrainer"
This reverts commit 563a1717d4.
It removed global symbols, so the binary API was incompatible.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-07-02 06:38:19 +02:00
zdenop
10f5bffa48 decrease reuired version of cmake to build as 3.6 is still in use. Side effect no support for c++17 in CXX_STANDARD 2019-07-01 19:46:36 +02:00
zdenop
6157b8b5da update Changelog (main 4.1 changes) 2019-07-01 19:21:51 +02:00
Stefan Weil
1a205b8bed cmake: Fix build with OpenMP (issue #2462)
Builds with gcc wrongly used /openmp instead of -fopenmp.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-06-25 14:55:03 +02:00
Stefan Weil
3dff32e407 Fix check for icu 52.1 or newer
It detected old versions but did not disable the training build.
This completes commit 66da4df11d.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-06-25 14:55:03 +02:00
Stefan Weil
4535e4605b Update enum from unicode/uchar.h
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-06-25 14:55:03 +02:00
Stefan Weil
4b03d13fff unittest: Fix function QCHECK (issue #2517)
The function must print an error message if the condition fails.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-06-25 14:55:03 +02:00
Egor Pugin
afb36b35e4 Add VS2019 2019-06-25 14:55:03 +02:00
Stefan Weil
20a0c61444 Fix format string for 64 bit integer
This fixes also a warning from gcc.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-06-25 14:55:03 +02:00
Stefan Weil
daac30e6c4 baseapi: Remove old code
The workaround is no longer needed because _splitpath and _MAX_FNAME
were removed in commit cc0d87c5b8.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-06-25 14:55:03 +02:00
Stefan Weil
1ce4c2f83c Replace code using _splitpath_s (win32)
That simplifies the code and removes a dependency on "newer"
versions of Windows.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-06-25 14:55:03 +02:00
Stefan Weil
1a279d11fc Remove outdated comment
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-06-23 08:55:15 +02:00
Stefan Weil
dc2dada0b5 Remove dummy code from LSTMTrainer::InitTensorFlowNetwork
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-06-23 08:54:58 +02:00
Stefan Weil
7b58962246 Simplify unittest/Makefile.am
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-06-23 08:54:40 +02:00
Stefan Weil
f44be2e81a cmake: Build training tools also on Linux and macOS
This enables CI tests for the code in src/training on Linux and macOS.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-06-23 08:54:26 +02:00
Stefan Weil
c967f8927c Add package libpango1.0-dev to Travis configuration
It is needed to build the training tools.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-06-23 08:54:13 +02:00
Stefan Weil
a30d433356 Move LSTMTrainer from libtesseract to libtesseract_training
LSTMTrainer is only used for training, so the shared library for
Tesseract can be made smaller.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-06-23 08:53:21 +02:00
Stefan Weil
1a44ce3178 Replace callback by direct function calls in TessBaseAPI::GetComponentImages
The new code avoids dynamic memory allocation, uses faster function calls
and allows removing more code from tesscallback.h.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-06-23 08:52:31 +02:00
Stefan Weil
563a1717d4 Simplify class LSTMTrainer
The function pointers and callbacks file_reader_, file_writer_,
checkpointer_reader_ and checkpoint_writer_ are always set to
the same values. Replacing them by direct function calls
simplifies the code and allows removing more code from tesscallback.h.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-06-23 08:51:44 +02:00
Stefan Weil
c5525c4458 Remove wrong description for GenericVector::set_compare_callback and simplify code
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-06-23 08:50:01 +02:00
Stefan Weil
6a0fc4f89f Simplify indirect call of LMPainPoints::GeneratePainPoint
It does neither need a temporary TessResultCallback2 nor the function
LMPainPoints::GenerateForBlamer.

This also allows removing more code from tesscallback.h.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-06-23 08:49:18 +02:00
zdenop
c614907ea0 tesstrain_utils.sh: remove redundant code 2019-06-23 08:48:23 +02:00
Stefan Weil
6a39b81d45 tesscallback: Remove more unused code
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-06-20 14:14:00 +02:00
Stefan Weil
3cdafa0fa1 4.1.0 Release candidate 4
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-06-18 09:48:36 +02:00
Stefan Weil
d7d0500030 Remove code for embedded build
That code is unrelated to Tesseract and can be easily implemented
by external projects which require it.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-06-18 09:46:16 +02:00
Egor Pugin
4d5eb6d304 Remove old and misguiding build steps on windows. 2019-06-18 09:39:25 +02:00
Stefan Weil
2f51af0f60 ocrfeatures: Remove locally used functions from global interface
ReadFeature, WriteFeature are only used locally.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-06-18 09:38:32 +02:00
Stefan Weil
9491538fb9 unittest: Add missing Leptonica library for textlineprojection_test
It is needed for builds with --enable-shared.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-06-17 15:07:42 +02:00
Stefan Weil
9a5f72479a Replace TessBaseAPI::CatchSignals by a dummy function
That function is now a dummy which just exists to be API compatible.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-06-17 14:55:05 +02:00
zdenop
cf512d3804 4.1.0-rc3 => VERSION 2019-06-17 10:25:37 +02:00