Egor Pugin
eeb4121888
Fix warnings.
2022-02-07 00:21:26 +03:00
Egor Pugin
7f6606ccdc
Remove unneeded dtor.
2022-02-07 00:20:07 +03:00
Egor Pugin
f526bf30bb
Fix warnings.
2022-02-07 00:19:52 +03:00
Egor Pugin
968d653f89
Shorten macros.
2022-02-07 00:17:29 +03:00
Stefan Weil
44ddde1692
Remove a local function from class TableRecognizer
...
This allows the compiler to remove the unused function IsWeakTableRow.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2022-02-05 21:14:08 +01:00
Stefan Weil
101ed0036b
Remove some local functions from class ImageFind
...
This allows optimizations like inline code by the compiler.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2022-02-05 20:31:52 +01:00
Stefan Weil
eeda2297ca
Remove unused functions ImageFind::ComposeRGB and ImageFind::ClipToByte
...
Fixes: a1c22fb0d0
("Fixed issue #557 ")
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2022-02-05 20:13:31 +01:00
Stefan Weil
f6250e6dfe
Remove unused function ImageFind::ComputeRectangleColors
...
Fixes: a1c22fb0d0
("Fixed issue #557 ")
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2022-02-05 20:03:31 +01:00
Stefan Weil
14399ceb78
Remove unused resolution parameters
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2022-02-05 16:08:59 +01:00
Stefan Weil
7ea97552c6
Remove some local functions from class LineFinder
...
This allows optimizations like inlining by the compiler.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2022-02-05 15:58:49 +01:00
Stefan Weil
554d14d275
Fix comment
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2022-02-05 15:37:12 +01:00
Egor Pugin
8b5571f8bf
Merge pull request #3742 from stweil/robustness
...
Catch nullptr in PageIterator::Orientation to improve robustness
2022-02-03 14:57:42 +03:00
Stefan Weil
76faf16006
Fix old TODO (STATS::rangemax_)
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2022-02-03 09:15:31 +01:00
Stefan Weil
443933a75a
Catch nullptr in PageIterator::Orientation to improve robustness
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2022-02-03 08:31:31 +01:00
Stefan Weil
24e68b9140
Add new parameter curl_timeout for curl_easy_setop
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2022-01-16 14:58:06 +01:00
Stefan Weil
ad55cec472
Add missing include file for std::max, std::min
...
This fixes a build issue with VS 2019 Version 16.11.9
and platform toolset v141.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2022-01-13 22:15:50 +01:00
Gilles Talis
be15b46c60
Check if platform supports feenableexcept
...
feenableexcept is not supported by uclibc
Signed-off-by: Gilles Talis <gilles.talis@gmail.com>
[Retrieved (and updated to add cmake support and simplify configure.ac)
from
https://git.buildroot.net/buildroot/tree/package/tesseract-ocr/0001-Check-if-platform-supports-feenableexcept.patch ]
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2022-01-11 15:23:56 +01:00
Stefan Weil
04a66b91e6
Don't use <XXX>_LINK_LIBRARIES for cmake before version 3.12
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2022-01-03 16:34:10 +01:00
Stefan Weil
28f854186f
cmake: reformat with cmake-format
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2022-01-03 16:34:10 +01:00
Stefan Weil
b8b2ab225f
Simplify cmake check for Pango related modules
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2022-01-03 16:34:10 +01:00
Stefan Weil
e1764e1bc8
Use cmake policy CMP0074 only with version 3.12 or newer
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2022-01-01 23:00:47 +01:00
Stefan Weil
6727aae7e9
Remove unused include statement
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-12-30 19:44:00 +01:00
Stefan Weil
df227caa87
Add function ERRCODE::error with only 2 parameters
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-12-30 18:46:48 +01:00
Stefan Weil
84e6f44455
Fix some compiler warnings (implicit float to double conversion)
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-12-30 17:58:36 +01:00
Stefan Weil
25d25b5e09
Remove unused forward declaration
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-12-30 17:52:29 +01:00
Stefan Weil
e87969033b
Remove duplicate parameter certainty_scale
...
It was also declared in class Dict and mostly used from that class.
Setting it via API or command line never changed that used value.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-12-30 10:36:37 +01:00
zdenop
86158d3978
Merge pull request #3697 from stweil/opt
...
Small optimizations and fixes for some compiler warnings
2021-12-29 20:13:38 +01:00
Stefan Weil
d754593a31
Catch nullptr in STATS::pile_count (fix isse #3694 )
...
Add also a test case for this issue.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-12-29 17:26:32 +01:00
Stefan Weil
22e86fa75d
Eliminate function NetworkIO::ZeroTimeStepGeneral
...
This allows more inline code (optimization).
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-12-29 17:17:57 +01:00
Stefan Weil
03e82271bb
Fix clang compiler warnings in functions.h
...
The new code avoids some conversions between double and float,
so it should also have a small positive effect on the performance.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-12-27 15:39:46 +01:00
Stefan Weil
7277963e11
Update generator for lookup tables to use TFloat instead of double
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-12-27 10:31:42 +01:00
Stefan Weil
706d3bac62
Fix some clang compiler warnings
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-12-26 17:45:16 +01:00
Stefan Weil
7a218f1d6c
Fix compiler warning [-Wsign-compare]
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-12-25 17:02:45 +01:00
Stefan Weil
34311179f5
Allow printing of bitfield with variadic templates
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-12-23 16:38:00 +01:00
Stefan Weil
edf5c91ab9
Fix compiler warnings caused by empty statements
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-12-23 16:35:47 +01:00
zdenop
f65fae82ac
clean up condition to detect MSCV
2021-12-22 18:57:13 +01:00
Zdenko Podobný
771c1e9c9b
fix lstm.cpp build with clang
2021-12-20 14:40:45 +01:00
Zdenko Podobný
8f02255294
cmake: reformat with cmake-format and check with cmake-lint
2021-12-20 13:18:01 +01:00
Stefan Weil
f728df0cfa
Support up to 8 redirections when running OCR on a URL
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-12-16 14:57:18 +01:00
Amit D
d37dd73439
Fix broken msys2 build with gcc 11
...
Fix #3672 .
2021-12-05 08:57:49 +02:00
Egor Pugin
b5d33a104b
Merge pull request #3664 from stweil/classify
...
Fix some compiler warnings and avoid float / double conversions in class Classify
2021-11-28 23:04:01 +03:00
Stefan Weil
a1f40cadc1
Avoid some unnecessary conversions from float to double
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-11-28 18:55:27 +01:00
Stefan Weil
5e8d877262
Modernize code in class Classify
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-11-28 18:44:20 +01:00
Stefan Weil
ffe2038ea6
Allow compilation with clang-7
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-11-28 10:45:46 +01:00
Stefan Weil
839f528b9a
Remove unused GenericVector::contains_index, UnicityTable::contains_id
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-11-28 09:54:59 +01:00
Stefan Weil
8b21e4f0b8
Remove member function GenericVector<T>::contains
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-11-27 09:40:36 +01:00
Stefan Weil
739057c586
Remove member function UnicityTable<T>::contains
...
It was only used once, and the code using it can be simplified.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-11-27 09:40:17 +01:00
Stefan Weil
99aea21336
Limit BCER to interval [0,1]
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-11-25 08:04:26 +01:00
Stefan Weil
2c4665466e
Format code with clang-format
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-11-22 19:47:39 +01:00
Bernhard Liebl
555aa55f05
Add RowAttributes getter to PageIterator
...
[sw]: Cherry-picked commit from 4.1 branch
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-11-22 19:47:39 +01:00
Stefan Weil
5f27310d22
Fix some compiler warnings with --disable-legacy
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-11-20 14:57:08 +01:00
Amit D
47abbaa48f
Training: Fix compiler warnings ( #3650 )
...
warning: format ‘%c’ expects argument of type ‘int’, but argument 2 has type ‘tesseract::Validator::CharClass’ [-Wformat=]
2021-11-19 21:01:04 +02:00
Stefan Weil
455feb35f2
Replace char error by BCER in more training messages
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-11-18 21:34:16 +01:00
Stefan Weil
981c167f8c
Improve result message from lstmeval
...
Old message:
At iteration 0, stage 0, BCER eval=2.553356, BWER eval=5.586173
New message:
BCER eval=2.553356, BWER eval=5.586173
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-11-17 09:02:49 +01:00
Stefan Weil
c716ebdc42
Improve training messages (issue #3560 ) ( #3644 )
...
The old messages could wrongly be interpreted as CER / WER values,
but Tesseract training currently uses simple bag of characters /
bag of words error rates (see LSTMTrainer::ComputeCharError,
LSTMTrainer::ComputeWordError).
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-11-17 09:39:23 +02:00
Stefan Weil
ef3bf98cc1
lstmtrainer: Fix comment
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-11-15 20:19:54 +01:00
Stefan Weil
83ad8a18de
Clean code with clang-tidy (performance-move-const)
...
Command used:
clang-tidy --checks="-*,performance-move-const-arg"
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-11-15 20:18:29 +01:00
Stefan Weil
f48620fffb
scrollview: Add const attributes
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-11-15 20:17:59 +01:00
Stefan Weil
f0b8c0254b
stepblob: Fix some warnings from clang-tidy
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-11-14 16:40:38 +01:00
Stefan Weil
25cdca6492
combine_tessdata: Print "Version:" instead of "Version string:"
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-11-14 16:38:52 +01:00
Stefan Weil
d8d63fd71b
Optimize performance with clang-tidy
...
The code was partially formatted with clang-format and optimized with
clang-tidy --checks="-*,perfor*" --fix src/*/*.cpp
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-11-14 15:54:04 +01:00
Stefan Weil
e5011c545a
Remove unused function ScrollView::AwaitEventAnyWindow
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-11-14 12:10:37 +01:00
Stefan Weil
37b33749da
ScrollView: Fix memory leak and modernize code
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-11-14 10:34:20 +01:00
Stefan Weil
371ee2232e
Remove spaces at line endings and empty last lines
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-11-13 22:45:47 +01:00
Stefan Weil
e18826cfab
Fix some compiler warnings and modernize code in class TrainingSampleSet
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-11-13 22:33:22 +01:00
Stefan Weil
6360e60877
Modernize code in TessBaseAPI::Init
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-11-13 21:43:46 +01:00
Stefan Weil
03f2cfdf02
Show tessdata directory when listing models
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-11-13 21:43:01 +01:00
Stefan Weil
c2ee0cd06f
Fix listing of languages
...
The last fix for OCR with more than one model introduced
a regression for `tesseract --list-langs`.
Fixes: 9091055783
("Fix loading of additional model files")
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-11-13 21:34:29 +01:00
Stefan Weil
ebce8ab2eb
combine_tessdata: Support -dl and -ld options
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-11-13 11:33:10 +01:00
Stefan Weil
9091055783
Fix loading of additional model files (issue #3635 )
...
Modernize also a for loop statement.
Fixes: d6de055acf
("Set default language for tesseract only if required")
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-11-10 20:34:06 +01:00
Amit D
827900675b
Don't add a page separator for a single page image ( #3632 )
...
This change was requested in issue #3628 .
2021-11-08 20:49:49 +01:00
Stefan Weil
2fbe4f54bb
Fix out-of-memory in fuzzer-api (oss-fuzz issue #39185 )
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-11-07 13:49:30 +01:00
Stefan Weil
183bb3f519
Use TDimension for arguments of make_edgept
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-11-06 10:01:22 +01:00
Stefan Weil
6c7cfe41cc
Remove some unneeded type casts
...
Those type casts were also wrong for large image support.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-11-06 10:01:22 +01:00
Amit D
8865fefdba
Improve the disable legacy build ( #3627 )
...
Undo API changes done in e9b8b840bf
.
2021-11-04 18:26:15 +02:00
Amit D
e9b8b840bf
Improve the disable legacy build ( #3624 )
...
Disable more code related to equation detection and osd.
2021-11-03 19:15:15 +01:00
Stefan Weil
62bfbf5aa4
Use bool instead of int8_t for boolean variable
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-11-03 11:22:14 +01:00
Stefan Weil
333f7bfc5c
Use bool instead of int for boolean variable
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-11-03 11:02:30 +01:00
Stefan Weil
87a5689f8d
Format code with clang-format
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-11-03 10:57:40 +01:00
Stefan Weil
a91ea10924
Optimize function ApproximateOutline
...
The compiler can now inline several functions which are
only used in this compilation unit.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-11-03 10:53:35 +01:00
Stefan Weil
17e795aaae
Add missing include statement for INT_MIN, INT_MAX
...
Fixes: c6b25f3b6e
("Add assertions in IntCastRounded")
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-11-02 10:20:37 +01:00
Stefan Weil
c6b25f3b6e
Add assertions in IntCastRounded
...
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=39185 could be
caused by an integer overflow in IntCastRounded.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-11-02 07:52:31 +01:00
Stefan Weil
565d3912c6
Fix compiler warnings with -Wformat-security
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-11-01 22:58:56 +01:00
Stefan Weil
a5f2f90c8d
Fix legacy build
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-11-01 08:34:34 +01:00
Stefan Weil
104ef8f30e
Move src/api/tesseractmain.cpp to src/tesseract.cpp
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-10-31 21:43:30 +01:00
Stefan Weil
c0b529f2e1
Move declaration of ThresholdMethod from public API to thresholder.h
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-10-30 20:15:25 +02:00
Stefan Weil
97cd07f2a0
Add format attributes
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-10-30 19:55:27 +02:00
Stefan Weil
68017dbf2a
lstmtraining: Handle missing traineddata with error message (fix issue #1075 )
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-10-30 12:27:35 +02:00
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
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
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
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
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 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
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
Stefan Weil
e1d7a21559
ccutil: Fix some signed/unsigned compiler warnings
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-10-10 20:00:31 +02:00
Stefan Weil
97048fe3e4
ccstruct: Fix some signed/unsigned compiler warnings
...
Remove also a local buffer in function REJMAP::print.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-10-10 20:00:31 +02:00
Stefan Weil
2e4bb8f5d7
genericvector: Change function size to return unsigned value
...
Sizes are generally unsigned in the C++ standard library,
and following this standard makes code changes easier.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-10-10 20:00:31 +02:00
Stefan Weil
d040cce990
ccmain: Remove unused local variable
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-10-10 20:00:31 +02:00
Stefan Weil
c8fd23d6dc
ccmain: Fix more signed/unsigned compiler warnings
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-10-10 20:00:31 +02:00
Stefan Weil
3a4828bcf4
ccmain: Fix some signed/unsigned compiler warnings
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-10-10 20:00:31 +02:00
Stefan Weil
a9c3f6d87f
ccmain/paragraphs: Make local function UnicodeFor and fix signed/unsigned
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-10-10 20:00:30 +02:00
Stefan Weil
4c36e2e29a
Fix compiler warnings in TWERD::MergeBlobs and optimize code
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-10-10 20:00:30 +02:00
Stefan Weil
0cdcd0f02b
Remove unused code
...
Fixes: 766b7bd620
("Don't drop words with low certainty")
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-10-10 20:00:30 +02:00
Stefan Weil
ca0e68f046
Avoid implicit conversions from float to double
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-10-10 20:00:30 +02:00
Stefan Weil
9315d4c7e2
Change size and count arguments in TFile from int to size_t
...
This matches standard functions like fread, fwrite.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-10-10 20:00:30 +02:00
Stefan Weil
85cb6678fa
Replace new / delete by std::unique_ptr and std::vector in class Classify
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-10-10 14:08:12 +02:00
Stefan Weil
5d903da1ce
Replace new / delete by std::vector in class Wordrec
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-10-10 14:07:25 +02:00
Stefan Weil
467f24c0b6
Replace new / delete by std::vector in class Trie
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-10-10 14:06:48 +02:00
Stefan Weil
ed1100832c
Replace new / delete by std::vector in class WERD_CHOICE
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-10-10 14:05:47 +02:00
Stefan Weil
0aad8b8619
Fix build with OpenCL and add namespace to OpenCL code
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-10-06 07:51:03 +02:00
Amit D
0cb9c40528
Add configurable variables to control thresholding ( #3577 )
2021-09-29 23:17:22 +03:00
zdenop
ebb214c443
destroy temporary page_pix
2021-09-25 10:26:31 +02:00
Amit D
adaaef87a4
Fix wrong tiles parameters in Sauvola ( #3570 )
...
Thanks to Robert Sachunsky @bertsky that pointed out the issue.
2021-09-23 10:26:07 +03:00