Commit Graph

2690 Commits

Author SHA1 Message Date
Stefan Weil
ef1d9600b1 Use standard macros for format strings
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-05-11 19:32:51 +02:00
Stefan Weil
f2252fdadc Introduce standard macros for format specifiers
There exist standard macro definitions for the printf format specifiers.
MS Visual Studio does not support that standard (at least not in older
versions), so local definitions are needed there.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-05-11 19:30:49 +02:00
zdenop
2008dafa73 Merge pull request #904 from stweil/rangecheck
Improve index range check
2017-05-11 16:09:33 +02:00
zdenop
64994a2707 Merge pull request #900 from rfschtkt/cast
Reviewed uses of reinterpret_cast
2017-05-11 16:08:12 +02:00
zdenop
9b998a7e0d Merge pull request #897 from rfschtkt/RAII
RAII
2017-05-11 16:06:44 +02:00
Stefan Weil
c273f85092 Improve index range check
A wrong array index must raise an assertion instead of printing an
error message and continuing program execution.

Remove also some float operations which are not needed because the
blob_box coordinates are of type int16_t.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-05-11 11:55:07 +02:00
zdenop
7a99a41fcf Merge pull request #903 from stweil/formatstring
Fix wrong format string
2017-05-11 11:28:50 +02:00
Stefan Weil
3cccae69e5 Fix wrong format string
The local variable intval is of type int.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-05-11 09:06:02 +02:00
Raf Schietekat
190584fec7 RAII: PB_LINE_IT::get_line(): was leaked inside POLY_BLOCK::fill() 2017-05-11 02:02:37 +02:00
Raf Schietekat
8aa0a2dd48 RAII: *::GetUNLVText() 2017-05-11 02:02:37 +02:00
Raf Schietekat
1dab23916f RAII: *::GetBoxText() 2017-05-11 02:02:37 +02:00
Raf Schietekat
b7b68a65dd RAII: *::GetTSVText() 2017-05-11 02:02:37 +02:00
Raf Schietekat
a1fff874b4 RAII: *::GetHOCRText() 2017-05-11 02:02:37 +02:00
Raf Schietekat
986970d6ca RAII: pdfrenderer.cpp: pdftext 2017-05-11 02:02:37 +02:00
Raf Schietekat
3c6e18ecf9 RAII: pdfrenderer.cpp: buffer 2017-05-11 02:02:37 +02:00
Raf Schietekat
936ca00c44 RAII: pdfrenderer.cpp: cidtogidmap 2017-05-11 02:02:37 +02:00
Raf Schietekat
2772f78170 RAII: LTRResultIterator::GetUTF8Text 2017-05-11 02:02:37 +02:00
Raf Schietekat
f75665c34f RAII: TessBaseAPI::GetUTF8Text() 2017-05-11 02:02:37 +02:00
Raf Schietekat
4840c65bf0 RAII: ResultIterator::GetUTF8Text(): was leaked inside TessBaseAPI::GetUTF8Text() 2017-05-11 02:02:37 +02:00
Raf Schietekat
3983d2f76a Reviewed uses of reinterpret_cast 2017-05-11 01:58:40 +02:00
Egor Pugin
3454061334 Update README.md 2017-05-10 23:50:27 +03:00
Egor Pugin
d4b513677f Merge pull request #899 from chongzhe/patch-1
add insight.io badge to README.md
2017-05-10 23:48:57 +03:00
chongzhe
a9c1dde094 Update README.md 2017-05-10 13:35:10 -07:00
Ray Smith
b86b4fa06b Better fix for re-enabling training 2017-05-08 14:26:09 -07:00
Egor Pugin
0afd5939b1 Use NDEBUG macro instead of DEBUG. 2017-05-08 13:01:22 +03:00
Egor Pugin
2ea946d11c Turn on building of text2image. 2017-05-07 20:05:12 +03:00
Egor Pugin
6ba14f3909 Update appveyor.yml 2017-05-06 14:47:04 +03:00
Egor Pugin
7dcd2ff90a Update CMakeLists.txt 2017-05-06 14:46:46 +03:00
Egor Pugin
6d9243c1bc Update appveyor.yml 2017-05-06 14:39:50 +03:00
Egor Pugin
549cf27d47 Update appveyor.yml 2017-05-06 14:18:54 +03:00
Egor Pugin
96ab9c388e Update appveyor.yml 2017-05-06 12:52:13 +03:00
Egor Pugin
afe64eb1b0 Merge pull request #890 from stweil/ci
Cache cppan storage.
2017-05-06 12:51:45 +03:00
Stefan Weil
82b70aa7a5 Add cache to Appveyor CI
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-05-06 08:43:49 +02:00
Stefan Weil
4b832612a2 Don't redirect build output to file for Appveyor CI
This is only used to find build problems, don't commit!

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-05-06 08:43:49 +02:00
Ray Smith
d18931e86e Fixed int types for imported tf networks 2017-05-05 16:42:44 -07:00
Ray Smith
4fa463cd71 Corrected SetEnableTraining for recovery from a recognize-only model. 2017-05-05 16:39:43 -07:00
Egor Pugin
006a56c55a Merge pull request #885 from stweil/ci
Update and improve configuration for Travis CI
2017-05-05 23:50:22 +03:00
Stefan Weil
f5494a7535 Update and improve configuration for Travis CI
* Use container based Ubuntu trusty. This provides a newer gcc version
  by default. CI jobs should now start faster.

* Add caching. Leptonica is now only built once for each platform.

* Get Leptonica tar instead of zip file. It's smaller,
  and there is no need to store it on disk.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-05-05 22:30:08 +02:00
zdenop
00d6d9466c Merge pull request #877 from stweil/opencl
opencl: Add 'static' attributes for local functions and variables
2017-05-05 08:58:18 +02:00
Stefan Weil
d53254e2f0 opencl: Add 'static' attributes for local functions and variables
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-05-04 19:32:36 +02:00
Ray Smith
8e79297dce Final part of endian improvement. Adds big-endian support to lstm and fixes issue 518 2017-05-03 16:09:44 -07:00
Ray Smith
6ac31dcbdd Fixed DetectOS so it doesn't crash with a big image 2017-05-03 15:50:31 -07:00
zdenop
926a066d77 Merge pull request #867 from stweil/fix
genericvector: Fix minimum size
2017-05-03 12:46:33 +02:00
Stefan Weil
46c887b77e genericvector: Fix minimum size
Commit 907de5995f tried to improve
GenericVector, but missed a case where vectors with less than
kDefaultVectorSize were allocated. This resulted in additional
alloc / free operations.

Commit a28b2a033d (before memory optimization)
oem 0: total heap usage: 739,238 allocs, 739,237 frees, 161,699,214 bytes allocated
oem 1: total heap usage: 690,182 allocs, 690,175 frees, 144,470,400 bytes allocated
oem 2: total heap usage: 728,213 allocs, 728,206 frees, 182,885,824 bytes allocated

Commit fd3f8f9b2d without genericvector change
oem 0: total heap usage: 738,980 allocs, 738,979 frees, 161,697,150 bytes allocated
oem 1: total heap usage: 690,182 allocs, 690,175 frees, 144,470,400 bytes allocated
oem 2: total heap usage: 728,213 allocs, 728,206 frees, 182,885,824 bytes allocated
=> Improvements for oem 0, no change for oem 1 and oem 2.

Commit fd3f8f9b2d
oem 0: total heap usage: 772,648 allocs, 772,647 frees, 160,083,901 bytes allocated
oem 1: total heap usage: 748,591 allocs, 748,584 frees, 143,581,672 bytes allocated
oem 2: total heap usage: 764,796 allocs, 764,789 frees, 181,212,197 bytes allocated
=> Less bytes allocated, but more allocs / frees = bad for performance.

Commit fd3f8f9b2d with this patch
oem 0: total heap usage: 677,537 allocs, 677,536 frees, 160,444,634 bytes allocated
oem 1: total heap usage: 653,812 allocs, 653,805 frees, 143,423,008 bytes allocated
oem 2: total heap usage: 670,029 allocs, 670,022 frees, 181,517,760 bytes allocated
=> Improvements for all three cases.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-05-03 09:49:23 +02:00
zdenop
b2454d2f2e Merge pull request #865 from stweil/posix
Replace Tesseract data types by POSIX data types
2017-05-03 08:42:07 +02:00
Stefan Weil
5cc8c058fa ccmain: Replace Tesseract data types by POSIX data types
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-05-02 18:21:51 +02:00
Stefan Weil
e7794c0c72 arch: Replace Tesseract data types by POSIX data types
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-05-02 18:21:44 +02:00
Stefan Weil
c1d649ebbc api: Replace Tesseract data types by POSIX data types
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-05-02 18:21:44 +02:00
zdenop
b4d77057d6 Merge pull request #863 from stweil/warnings
Remove unused local variables
2017-05-02 14:46:02 +02:00
Stefan Weil
048cf9d06a Remove unused local variables
This fixes some compiler warnings.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-05-02 09:43:29 +02:00