Commit Graph

212 Commits

Author SHA1 Message Date
Ray Smith
0169969b6f Merge branch 'opt' of https://github.com/stweil/tesseract into stweil-opt
Testing before pulling.
2016-11-22 09:55:41 -08:00
Ray Smith
5913d7344f Added missing license headers 2016-11-18 15:53:11 -08:00
Stefan Weil
94be4be4be ccutil/ambigs: Optimize tesseract::UnicharIdArrayUtils::compare
The compare method is called very often, so even small improvements
are important.

The new code avoids one comparison in each loop iteration.
This results in smaller code (60 bytes for x86_64, gcc).

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-11-12 19:21:57 +01:00
Ray Smith
c1c1e426b3 Added new LSTM-based neural network line recognizer 2016-11-07 15:38:07 -08:00
Ray Smith
a987e6d87c Major bug fixes to pango renderer and resolved issue of hash_map vs unordered_map 2016-11-07 11:35:45 -08:00
Ray Smith
2c837dffc3 Result of clang tidy on recent merge 2016-11-07 10:46:33 -08:00
zdenop
da89ff9ece Merge pull request #447 from stweil/leak
Fix some memory leaks
2016-10-24 20:45:57 +02:00
Stefan Weil
53c572b47a ccutils/params: Fix memory leak for static variable global_params
It is possible to avoid the dynamic memory allocation here.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-10-24 20:20:24 +02:00
Stefan Weil
a351dae29b ccutil/tessdatamanager: Fix resource leak
Coverity report:

CID 1340278 (#1 of 1): Resource leak (RESOURCE_LEAK)
11. leaked_storage: Variable output_file going out of scope leaks the storage it points to.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-10-24 16:00:57 +02:00
Stefan Weil
1274874e90 ccutil: Fix and simplify implementation of variadic macro
The implementation for MS C did not pass the variable arguments to
tprintf.

The standard is supported since C99 / C++11, so one implementation
is sufficient.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-08-29 08:15:00 +02:00
Marco Atzeri
b1c921b59e Fix Cygwin compatibility 2016-06-17 15:52:01 +03:00
Heiko Oberdiek
dec38db7ce Fix for constant kMaxDoubleSize (from 15 to 16),
which is used by method STRING::add_str_double.
2016-05-25 16:26:41 +02:00
Michael McConville
eb00574c4a Remove conditional definition of off_t
As pointed out by Stefan Weil, conditionally defining off_t using a
macro isn't a valid approach. off_t does not have a fixed size and is
used in ABI definitions (e.g. syscalls), so silently guessing its size
risks breaking the build. Additionally, all sane and modern platforms
will have off_t.
2016-04-13 15:15:56 -04:00
zdenop
6f6953a972 Merge pull request #180 from stweil/master
Remove unneeded definition for NULL
2016-01-05 17:22:57 +01: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
Stefan Weil
7334572c4c Remove unneeded definition for NULL
NULL is already defined in stddef.h,
so a local definition is not be needed.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2015-12-25 12:25:54 +01:00
Stefan Weil
450efa68cd Get tessdata prefix from executable path (only for Windows)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2015-12-11 10:06:21 +01:00
Stefan Weil
4fdf272ffa Remove checks for this == NULL
This fixes warnings from clang.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2015-11-07 13:09:53 +01:00
Stefan Weil
4a92ff5862 Fix compiler warnings for copy constructors
gcc reports these warnings with -Wextra:

ccstruct/pageres.h:330:3: warning:
 base class 'class ELIST_LINK' should be explicitly initialized
 in the copy constructor [-Wextra]
ccstruct/ratngs.cpp:115:1: warning:
 base class 'class ELIST_LINK' should be explicitly initialized
 in the copy constructor [-Wextra]
ccstruct/ratngs.h:291:3: warning:
 base class 'class ELIST_LINK' should be explicitly initialized
 in the copy constructor [-Wextra]
ccutil/genericvector.h:435:3: warning:
 base class 'class GenericVector<WERD_RES*>' should be explicitly initialized
 in the copy constructor [-Wextra]

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2015-11-05 09:19:37 +01:00
Stefan Weil
edf765b952 Remove unneeded const qualifiers
This fixes compiler warnings like this one:

api/baseapi.h:739:32: warning:
 type qualifiers ignored on function return type [-Wignored-qualifiers]

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2015-11-05 06:36:42 +01:00
Stefan Weil
38f3db8ca5 Fix more typos in comments (found by codespell)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2015-11-04 21:58:42 +01:00
Felix Janda
87c21aaa5c Detect presence of 'off_t' by configure test 2015-10-31 11:54:37 +01:00
zdenop
b882590491 Merge pull request #65 from ws233/master
Type mismatch on 64bit platforms
2015-10-28 20:02:20 +01:00
Egor Pugin
f369585f56 Merge branch 'master' of github.com:tesseract-ocr/tesseract 2015-10-02 12:02:04 +03:00
Stefan Weil
539b7fbbab ccutil: Fix typos in comments and strings
Most of them were found by codespell.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2015-09-14 22:09:18 +02:00
Tom Morris
a1e14ea93c Add ULL to constants which overflow 32 bits 2015-09-09 16:51:45 -04:00
Egor Pugin
da3852dc77 Fix cygwin build. 2015-09-07 02:49:18 +03:00
zdenop
cb05aba905 Merge pull request #24 from tesseract-ocr/hashfn-clang
fix to compile tesseract with clang
2015-08-21 16:39:10 +02:00
Jaka Konda
0c492cb8bd Fixed VC14 compiler issue.
In VC14 snprintf function is provided in standard library there triggering error. "snprintf Do not define snprintf as a macro. Macro definition of snprintf conflicts with Standard Library function declaration"

Signed-off-by: Jaka Konda <jaka.konda@outlook.com>
2015-08-13 16:23:47 +02:00
Zdenko Podobný
66a76a9477 Revert "temporary add config/*, configure and Makefile.in for release"
This reverts commits ec9581d8f2, 1afe382c4e, 4b2cfabcc1
2015-07-31 21:44:43 +02:00
Zdenko Podobný
bedc46f16d remove empty header file secname.h 2015-07-31 17:32:54 +02:00
ws233
0146185c04 Type mismatch on a 64bit platforms has been fixed. 2015-07-26 11:37:15 +03:00
Zdenko Podobný
301eaeca5f replace vs2008 directory with vs2010 directory (fixes cygwin build) 2015-07-20 20:35:52 +02:00
Jim O'Regan
524a61452d Doxygen
Squashed commit from https://github.com/tesseract-ocr/tesseract/tree/more-doxygen
closes #14

Commits:
6317305  doxygen
9f42f69  doxygen
0fc4d52  doxygen
37b4b55  fix typo
bded8f1  some more doxy
020eb00  slight tweak
524666d  doxygenify
2a36a3e  doxygenify
229d218  doxygenify
7fd28ae  doxygenify
a8c64bc  doxygenify
f5d21b6  fix
5d8ede8  doxygenify
a58a4e0  language_model.cpp
fa85709  lm_pain_points.cpp lm_state.cpp
6418da3  merge
06190ba  Merge branch 'old_doxygen_merge' into more-doxygen
84acf08  Merge branch 'master' into more-doxygen
50fe1ff  pagewalk.cpp cube_reco_context.cpp
2982583  change to relative
192a24a  applybox.cpp, take one
8eeb053  delete docs for obsolete params
52e4c77  modernise classify/ocrfeatures.cpp
2a1cba6  modernise cutil/emalloc.cpp
773e006  silence doxygen warning
aeb1731  silence doxygen warning
f18387f  silence doxygen; new params are unused?
15ad6bd  doxygenify cutil/efio.cpp
c8b5dad  doxygenify cutil/danerror.cpp
784450f  the globals and exceptions parts are obsolete; remove
8bca324  doxygen classify/normfeat.cpp
9bcbe16  doxygen classify/normmatch.cpp
aa9a971  doxygen ccmain/cube_control.cpp
c083ff2  doxygen ccmain/cube_reco_context.cpp
f842850  params changed
5c94f12  doxygen ccmain/cubeclassifier.cpp
15ba750  case sensitive
f5c71d4  case sensitive
f85655b  doxygen classify/intproto.cpp
4bbc7aa  partial doxygen classify/mfx.cpp
dbb6041  partial doxygen classify/intproto.cpp
2aa72db  finish doxygen classify/intproto.cpp
0b8de99  doxygen training/mftraining.cpp
0b5b35c  partial doxygen ccstruct/coutln.cpp
b81c766  partial doxygen ccstruct/coutln.cpp
40fc415  finished? doxygen ccstruct/coutln.cpp
6e4165c  doxygen classify/clusttool.cpp
0267dec  doxygen classify/cutoffs.cpp
7f0c70c  doxygen classify/fpoint.cpp
512f3bd  ignore ~ files
5668a52  doxygen classify/intmatcher.cpp
84788d4  doxygen classify/kdtree.cpp
29f36ca  doxygen classify/mfoutline.cpp
40b94b1  silence doxygen warnings
6c511b9  doxygen classify/mfx.cpp
f9b4080  doxygen classify/outfeat.cpp
aa1df05  doxygen classify/picofeat.cpp
cc5f466  doxygen training/cntraining.cpp
cce044f  doxygen training/commontraining.cpp
167e216  missing param
9498383  renamed params
37eeac2  renamed param
d87b5dd  case
c8ee174  renamed params
b858db8  typo
4c2a838  h2 context?
81a2c0c  fix some param names; add some missing params, no docs
bcf8a4c  add some missing params, no docs
af77f86  add some missing params, no docs; fix some param names
01df24e  fix some params
6161056  fix some params
68508b6  fix some params
285aeb6  doxygen complains here no matter what
529bcfa  rm some missing params, typos
cd21226  rm some missing params, add some new ones
48a4bc2  fix params
c844628  missing param
312ce37  missing param; rename one
ec2fdec  missing param
05e15e0  missing params
d515858  change "<" to &lt; to make doxygen happy
b476a28  wrong place
2015-07-20 18:48:00 +01:00
Zdenko Podobný
ec9581d8f2 temporary add configure and Makefile.in for release 2015-07-11 09:42:43 +02:00
Ray Smith
44122698d7 Removed debug messages, forward compatability of traineddata files, further bug fix. 2015-07-09 14:50:25 -07:00
Ray Smith
a303ab9d00 Misc fixes, mostly clang formatting, but some bug fixes in matrix, werd, and tesstrain_utils. Also updates unicharset to match traineddata files. 2015-07-09 14:28:20 -07:00
Renard Wellnitz
49a7ed13ea fix to compile tesseract on mac with clang 2015-05-18 09:59:10 +01:00
Zdenko Podobný
917e994caa extend ETEXT_DESC by progress_callback 2015-05-17 21:56:40 +02:00
Ray Smith
941d87057e Fixed training build 2015-05-13 17:46:58 -07:00
Jim O'Regan
b13691fda0 Merge conflict: going with Ray's version 2015-05-13 08:54:28 +01:00
Ray Smith
164897210a Improved newlines and spaces in a box file so it works better with RTL languages. 2015-05-12 17:51:03 -07:00
Ray Smith
84920b92b3 Font and classifier output structure cleanup.
Font recognition was poor, due to forcing a 1st and 2nd choice at
a character level, when the total score for the correct font is often
correct at the word level, so allowed the propagation of a full set
of fonts and scores to the word recognizer, which can now decide word
level fonts using the scores instead of simple votes.

Change precipitated a cleanup of output data structures for classifier
results, eliminating ScoredClass and INT_RESULT_STRUCT, with a few
extra elements going in UnicharRating, and using that wherever possible.
That added the extra complexity of 1-rating due to a flip between 0 is
good and 0 is bad for the internal classifier scores before they are
converted to rating and certainty.
2015-05-12 17:24:34 -07:00
Zdenko Podobný
53eab2ee92 fix issue 1354 2015-04-15 22:37:58 +02:00
Ray Smith
f927728169 Fixed issue 1207 2014-10-09 13:28:03 -07:00
Ray Smith
f77d01eb7b Fixed issue 1302 2014-10-07 09:25:53 -07:00
Ray Smith
bfd2cb83d5 Fixed issue 1303 2014-10-07 09:21:17 -07:00
Zdenko Podobný
c0640a4bef fix cygwin build (issue 1289) 2014-09-28 23:19:52 +02:00
Ray Smith
d3448c37ab Fixed issue 1264 2014-09-17 18:29:32 -07:00