Commit Graph

5871 Commits

Author SHA1 Message Date
Stefan Weil
ca9ea78494 Format code with clang-format
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-10-30 09:42:41 +02:00
Stefan Weil
57af712f2f Fix some compiler warnings for unused parameters
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-10-30 09:39:05 +02:00
Stefan Weil
20203de8d9 Fix format strings
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-10-30 09:37:30 +02:00
Stefan Weil
8b6390846e Create new release 5.0.0-rc1
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-10-29 22:32:11 +02:00
Stefan Weil
b4b2cacd40 Avoid segmentation fault with classify_enable_adaptive_matcher == false (issue #256)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-10-29 19:42:34 +02:00
Stefan Weil
676b86be4d Fix automake warning because of redefined DEFAULT_INCLUDES
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-10-28 22:14:06 +02:00
Stefan Weil
612ff9b7e8 Fix sw build error by using TESS_API for global variable log_level
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-10-28 22:13:21 +02:00
Stefan Weil
b4e4e00653 Fix two memory leaks in LineFinder::FindAndRemoveLines
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-10-28 21:09:46 +02:00
Stefan Weil
1f8835d731 Fix compiler error in try / catch statement
Fixes: 1a6c298696 ("Add new command line option --loglevel")
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-10-28 20:55:46 +02:00
Stefan Weil
69e0a02399 Remove banner message completely
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-10-28 20:43:23 +02:00
Stefan Weil
491e60296c Add missing include statement
Fixes: 1a6c298696 ("Add new command line option --loglevel")
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-10-28 15:14:55 +02:00
Amit D
fe16277fad Disable music staff detection and removal
Change the default value of pageseg_apply_music_mask to false. See #1255.
2021-10-28 15:04:27 +02:00
Stefan Weil
73a1bfc4e8 Run ReCachePages synchronously during training (fix issue #3111)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-10-28 14:40:27 +02:00
Stefan Weil
1a6c298696 Add new command line option --loglevel
By default some less important log messages are suppressed now.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-10-28 14:26:48 +02:00
zdenop
3ca273f914 cmake silent message about changed behaviour 2021-10-28 12:07:53 +02:00
zdenop
62566abece cmake: Hide some warnings for MSVC release target 2021-10-28 11:56:22 +02:00
Stefan Weil
a7a729f6c3 Disable CI checks which are no longer valid with NFC normalization
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-10-27 19:15:44 +02:00
Stefan Weil
5cc649e5f9 Remove code which is wrong in combination with NFC
See comments in https://github.com/tesseract-ocr/tesseract/pull/3420.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-10-27 18:52:03 +02:00
Stefan Weil
5cee9a0cec Merge remote-tracking branch 'nickjwhite/nfc'
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-10-27 18:40:02 +02:00
Stefan Weil
282685d531 Enable fast float32 LSTM by default
It is still possible to build Tesseract with double LSTM:

    # autoconf
    ./configure --disable-float32

    # cmake
    cmake .. -DFAST_FLOAT=ON

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-10-27 18:37:27 +02:00
Stefan Weil
c602624012 Prepare support for image width and height larger than 32767 (continued)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-10-27 08:58:31 +02:00
Stefan Weil
59fbad0dd5 Prepare support for image width and height larger than 32767
Avoid using int16_t and use a new data type TDimension where needed.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-10-27 08:45:33 +02:00
Stefan Weil
56f54c24de Fix heap use after free (issue #3523)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-10-26 19:19:59 +02:00
Amit D
cea2a6015e
Thresholding: Improve some debug messages 2021-10-26 19:09:06 +03:00
Stefan Weil
d6de055acf Set default language for tesseract only if required
When running with --list-langs, --print-parameters or --print-fonts-table
no default language is needed.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-10-26 11:05:06 +02:00
Stefan Weil
f5d22d0bcc Don't set a default language in TessBaseAPI::Init (API change)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-10-26 11:05:06 +02:00
zdenop
48c5d426ca
Merge pull request #3609 from stweil/api
Remove TessBaseAPI::InitLangMod (API change)
2021-10-26 07:23:52 +02:00
Stefan Weil
255d7c9675 Fix CID 1400763 Using invalid iterator (fixes issue #2806)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-10-25 22:20:45 +02:00
Stefan Weil
c2df9ce57b Remove Tesseract::init_tesseract_lm which is no longer used
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-10-25 21:28:23 +02:00
Stefan Weil
5738c44d40 Remove TessBaseAPI::InitLangMod (API change)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-10-25 21:28:23 +02:00
Stefan Weil
cdd19d561b Remove old comment
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-10-25 21:26:32 +02:00
Amit D
7f6519cd13
Merge pull request #3595 from amitdo/thresholder-scale
Thresholding: Change the window & tile size params to relative numbers
2021-10-15 21:28:46 +03:00
Amit Dovev
0aeb2e7913 Thresholding: Change smooth scaling logic
As suggested by @bertsky.
2021-10-15 19:34:39 +03:00
Amit D
9a1ad4333e
Apply suggestions from code review
Extend help message for 2 parameters

Co-authored-by: Robert Sachunsky <38561704+bertsky@users.noreply.github.com>
2021-10-15 18:14:49 +03:00
Amit D
0d2d6e3b2a
Fix a mismatch between tprintf format string and args 2021-10-14 20:56:48 +03:00
Amit Dovev
a268c3092f Thresholding: Change the window and tile size parameters to relative numbers
They are relative to the pixel density of the image.
2021-10-14 20:21:28 +03:00
Amit D
0d5705fe50
ThresholdMethod enum: AdaptiveOtsu -> LeptonicaOtsu (#3593) 2021-10-13 15:03:39 +03:00
Amit D
7f349a47b6
Fix a bug in the thresholder 2021-10-11 19:29:39 +03:00
Egor Pugin
5a36943de4
Merge pull request #3592 from stweil/unsigned
Fix compiler warnings (mainly signed / unsigned mismatches) and modernize some code
2021-10-10 23:44:47 +03:00
Stefan Weil
d935502b48 Fix two LGTM alerts (Comparison between i of type int16_t and wider type int32_t)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-10-10 21:37:04 +02:00
Stefan Weil
4a56136d34 Disable conditional which is currently always false (reported by LGTM)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-10-10 21:21:12 +02:00
Stefan Weil
cc085f6bd6 Fix format string (reported by LGTM)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-10-10 21:19:58 +02:00
Stefan Weil
988102c41d Disable incomplete code
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-10-10 20:11:57 +02:00
Stefan Weil
842cca1d49 Fix more signed/unsigned compiler warnings
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-10-10 20:11:57 +02:00
Stefan Weil
86d981eee6 wordrec: Fix some signed/unsigned compiler warnings
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-10-10 20:00:31 +02:00
Stefan Weil
cb10da06be training: Fix some signed/unsigned compiler warnings
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-10-10 20:00:31 +02:00
Stefan Weil
5cce7342e5 textord: Fix some signed/unsigned compiler warnings
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-10-10 20:00:31 +02:00
Stefan Weil
3bb8263b3e lstm: Fix some signed/unsigned compiler warnings
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-10-10 20:00:31 +02:00
Stefan Weil
a274f4a531 dict: Fix some signed/unsigned compiler warnings
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-10-10 20:00:31 +02:00
Stefan Weil
bcc71c675a classify: Fix some signed/unsigned compiler warnings
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-10-10 20:00:31 +02:00