Commit Graph

263 Commits

Author SHA1 Message Date
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
Egor Pugin
644469595c Fix windows build. 2016-11-24 17:32:23 +03:00
Ray Smith
5913d7344f Added missing license headers 2016-11-18 15:53:11 -08:00
Ray Smith
f24ef67df4 Limited max height to 48 even in variable height input, enabled neural nets via ocr engine mode 2016-11-08 14:01:04 -08:00
Ray Smith
c1c1e426b3 Added new LSTM-based neural network line recognizer 2016-11-07 15:38:07 -08:00
Ray Smith
2c837dffc3 Result of clang tidy on recent merge 2016-11-07 10:46:33 -08:00
Stefan Weil
bf334e0477 ccmain/paragraphs: Fix memory leak
Coverity report:

CID 1164737 (#1 of 1): Resource leak (RESOURCE_LEAK)
49. leaked_storage: Variable p going out of scope leaks the storage it points to.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-10-24 13:37:03 +02:00
Zdenko Podobný
c943fc1a33 sets justification for ParagraphInfo; fixes #429 2016-09-18 20:31:45 +02:00
Stefan Weil
a5b61e2b35 ccmain: Remove unused constants
In osdetect.cpp, a local definition of kMinCredibleResolution was
identical to a global one, so the local one could be removed.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-09-06 21:49:27 +02:00
Stefan Weil
f9051083d9 Fix order of arguments for tprintf
Format string and arguments did not match.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-03-17 10:25:12 +01:00
Tom Morris
6700edd8bc Cleanup TSV renderer
Remove all references to hocr, hocr.tsv, etc. Remove dead code for font
info, input filename, HTML escapes. Improved comments. Fixed
indentation.
2016-03-01 13:41:19 -05:00
Sundar M. Vaidya
738fe4f757 Adds BoolParam tessedit_create_hocrtsv in class Tesseract. 2016-03-01 12:30:39 -05:00
Egor Pugin
f4366c1f5a Merge pull request #89 from ceisserer/master
Initialize output parameters of word_char_quality() to zero before early exit
2016-02-17 22:26:36 +03:00
Zdenko Podobný
1db94823a9 Add info for progress monitor, make it visible in doxygen doc; remove commented code 2016-01-05 17:21:53 +01:00
zdenop
c53add706e Merge pull request #27 from tesseract-ocr/monitor
Monitor
2016-01-05 16:28:42 +01:00