Commit Graph

277 Commits

Author SHA1 Message Date
Justin Hotchkiss Palermo
f057938069 fix filenames in comments 2017-07-02 17:35:47 -04:00
Stefan Weil
1cf8fe51a0 Remove mathfix.h
It was only needed for MS Visual Studio 2012 and older.
Those compilers are not supported for Tesseract.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-06-05 20:26:25 +02:00
Stefan Weil
fef5972d23 EquationDetect: Remove unneeded new / delete operations
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-05-18 07:39:36 +02:00
Stefan Weil
3a67ff930e Optimize code by replacing init_to_size with resize_no_init
There is no need to initialize memory with a fixed value which is
overwritten in the next step.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-05-12 14:34:55 +02:00
Raf Schietekat
c335508e84 Fewer g++ -Wsign-compare warnings 2017-05-11 23:14:52 +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
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
zdenop
64994a2707 Merge pull request #900 from rfschtkt/cast
Reviewed uses of reinterpret_cast
2017-05-11 16:08:12 +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
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
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
Ray Smith
7a116ce8bb More formatting fixes from clang tidy 2017-04-28 13:38:32 -07:00
Ray Smith
1cc511188d Added extra Init that takes a memory buffer or a filereader function pointer to enable read of traineddata from memory or foreign file systems. Updated existing readers to use TFile API instead of FILE. This does not yet add big-endian capability to LSTM, but it is very easy from here. 2017-04-27 15:48:23 -07:00
Stefan Weil
becec34057 Fix some typos in comments (found by codespell)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-03-10 19:50:17 +01:00
Jeff Breidenbach
bd45b3ae4f fix #537: Error in pixClone: pixs not defined 2017-01-29 16:59:52 +01:00
Ray Smith
f566a45b30 clang-tidy changes from sync 2017-01-25 16:20:19 -08:00
Ray Smith
a1c22fb0d0 Fixed issue #557 2017-01-25 16:05:59 -08:00
Ray Smith
b453f74e01 Fixed issue #633 (multi-language mode 2017-01-25 15:58:39 -08:00
zdenop
c768b5867d Merge pull request #668 from Wikinaut/chg-textonly-pdf-parameter-description
Improve textonly_pdf parameter description
2017-01-21 16:29:06 +01:00
Wikinaut
c03299e2b4 Improve textonly_pdf parameter description 2017-01-21 16:18:53 +01:00
Wikinaut
98df78ca8a fix typo in parameter description 2017-01-21 10:48:25 +01:00
Zdenko Podobný
effa5741e6 Implement invisible text only for PDF 2017-01-20 21:26:34 +01:00
Wikinaut
f06ef543fc typo correction "specific" 2017-01-13 04:24:16 +01:00
Wikinaut
39274d8000 typo correction "specific" 2017-01-13 04:17:32 +01:00
Stefan Weil
680bfddb4f Remove code for old versions of Leptonica
Those versions are no longer supported.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-12-27 11:57:44 +01:00
Simon Strandgaard
d38cffc332 Fixed typo 2016-12-15 14:58:53 +00:00
Egor Pugin
ead87a7180 Fix build. 2016-12-15 12:43:13 +03:00
zdenop
da4c064c2e Merge pull request #531 from stweil/guards
Fix header file guards and replace reserved identifiers
2016-12-15 08:29:32 +01:00
Ray Smith
5c3839bdb4 Delete cube code 2016-12-14 11:00:43 -08:00
Ray Smith
432684dd6e Makefile changes to remove cube 2016-12-14 10:58:24 -08:00
Ray Smith
9f5ba9105f Removed dependency on cube from the code 2016-12-14 10:55:15 -08:00
Ray Smith
13e46ae1c4 Made LSTM the default engine, pushed cube out 2016-12-13 14:37:40 -08:00
Jeff Breidenbach
ed4c4c6bf5 Produce warning for invalid resolution. Fix #453 2016-12-07 22:06:00 +01:00
zdenop
7f7cea1ee6 Merge pull request #532 from stweil/openmp
openmp: Fix build with clang++ and compilers without OpenMP support
2016-12-07 14:47:08 +01:00
Ray Smith
d55f462c9c More clang-tidy from previous commits 2016-12-06 13:45:49 -08:00
Ray Smith
025689fad6 Fixed damage to binary images when processing PDFs, issue #535 2016-12-06 13:40:57 -08:00
Ray Smith
7744da9b7d Fixed Android build breakage 2016-12-06 13:37:10 -08:00
Ray Smith
5deebe6c27 Fixed multilang for LSTM, pushed cube to one side without actually deleting it 2016-12-05 14:41:43 -08:00
Stefan Weil
6140be6a55 openmp: Fix build with clang++ and compilers without OpenMP support
Builds without support for OpenMP failed with the old code. Fix this:

* Add OPENMP_CXXFLAGS for ccmain.
* Replace unconditional -fopenmp by OPENMP_CXXFLAGS for lstm.
* Always use _OPENMP for conditional compilation.
* Remove OPENMP as there is already _OPENMP.
* Include omp.h conditionally.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-12-04 18:44:03 +01:00
Stefan Weil
70c6f1624c Fix #define guards in header files
Some guards were missing, others were not the first statement.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-12-04 15:43:03 +01:00
Stefan Weil
4897796d57 Replace reserved identifiers used in #define guards header files
Use macro names as suggested by the Google C++ Style Guide
(https://google.github.io/styleguide/cppguide.html#The__define_Guard).

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-12-04 15:43:03 +01:00
Stefan Weil
7e3ff36080 cube: Fix coverity warning caused by unneeded null pointer check
Commit 03eec61a2f removed unneeded
null pointer checks after new, but missed one which now raises
a warning from coverity scan. Remove that one, too.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-12-02 22:25:00 +01:00
Stefan Weil
a389b7c8e9 opencl: Remove unneeded and potentially bad type casts
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-12-02 00:02:35 +01:00
zdenop
690616279c Merge pull request #514 from stweil/free
Simplify new operations
2016-12-01 20:36:24 +01:00
Ray Smith
ce76d1c569 Fixes to training process to allow incremental training from a recognition model 2016-11-30 15:51:17 -08:00
Stefan Weil
03eec61a2f cube: Simplify new operations
It is not necessary to check for null pointers after new.

Simplify also two delete operations which were missing
in the previous commit.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-11-30 20:24:38 +01:00
Stefan Weil
c46e773758 cube: Simplify delete operations
It is not necessary to check for null pointers.

Remove also unneeded delete operations and add missing delete operations
in cube/bmp_8.cpp.

Simplify also a conditional statement in cube/cube_object.cpp.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-11-28 15:48:36 +01:00
Stefan Weil
85e37798cb Simplify delete operations
It is not necessary to check for null pointers.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-11-24 17:59:13 +01:00