Commit Graph

2451 Commits

Author SHA1 Message Date
Raf Schietekat
7f382df5ec Fewer g++ -Wsign-compare warnings (cont.) 2017-05-11 23:14:52 +02:00
Raf Schietekat
c335508e84 Fewer g++ -Wsign-compare warnings 2017-05-11 23:14:52 +02:00
Raf Schietekat
1bd561d431 Fewer g++ -Wmaybe-uninitialized warnings 2017-05-11 23:14:52 +02:00
zdenop
da3c462f45 Merge pull request #906 from stweil/casts
Remove some type casts
2017-05-11 21:27:01 +02:00
Stefan Weil
7831a35dbb ccutil: Simplify code (removes type cast)
There is no need for an intermediate variable char_buffer.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-05-11 20:10:17 +02:00
Stefan Weil
8c75d26657 Remove unneeded type casts when using Leptonica macro GET_DATA_BYTE
The first parameter is casted to an unsigned byte by Leptonica,
so we don't need additional type casts in Tesseract code.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-05-11 20:08:27 +02:00
zdenop
8b65bb3ae7 Merge pull request #905 from stweil/formatstring
Replace Tesseract's format macros by standard macros and fix some related issues
2017-05-11 19:41:51 +02:00
Stefan Weil
121a7c6489 ccstruct: Fix non portable and wrong format strings
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-05-11 19:32:51 +02:00
Stefan Weil
9abbc4c6f3 ccstruct: Fix wrong format string
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-05-11 19:32:51 +02:00
Stefan Weil
0c88b72909 training: Fix format error and some compiler warnings
The size() method returns a size_type value which is an unsigned type.
As there is no portable format string for that type, a type cast is needed.

Fix also several signed / unsigned mismatches which resulted in compiler
warnings.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-05-11 19:32:51 +02:00
Stefan Weil
9266f01857 Remove macros which are no longer needed
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-05-11 19:32:51 +02:00
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