Commit Graph

2037 Commits

Author SHA1 Message Date
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
5f8ecdb2b3 Remove local implementation of strtok_r
MS Visual Studio does not provide that function, but can use strtok_s
which does exactly the same.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-06-05 19:52:25 +02:00
Egor Pugin
22bcf4d1a2 Merge pull request #979 from stweil/update
Update from Leptonica 1.74.1 to 1.74.2
2017-06-05 16:03:15 +03:00
Stefan Weil
a2404ae735 Fix Travis CI for Leptonica 1.74.2
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-06-05 13:30:49 +02:00
Stefan Weil
44a5e3da40 Update from Leptonica 1.74.1 to 1.74.2
The newer version contains fixes for the pixUnsharpMaskingGray*
functions which are relevant for Tesseract (used in ImageData::PreScale
which calls pixScale).

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-06-05 10:31:53 +02:00
zdenop
1e5522d321 Merge pull request #975 from stweil/ocl
Clean OpenCL code
2017-06-03 19:55:44 +02:00
Stefan Weil
1bbcbd89d0 opencl: Fix some compiler warnings
Remove several unused variables and fix some signed / unsigned mismatches.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-06-03 17:21:58 +02:00
Stefan Weil
1cf098dc2c opencl: Remove unused code
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-06-03 16:52:02 +02:00
zdenop
34bdf99774 Merge pull request #970 from Shreeshrii/patch-1
Make less verbose
2017-06-03 15:31:44 +02:00
zdenop
59de660386 Merge pull request #969 from stweil/clean
PangoFontInfo: Remove some unused methods
2017-06-03 15:30:46 +02:00
Shreeshrii
1263941f1d Make less verbose
Eariler version as displayed when opening a new issue was not readable (too much markdown). 
Now made shorter/simpler.
2017-06-03 15:30:48 +05:30
Stefan Weil
2843739843 PangoFontInfo: Remove unused method is_italic
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-06-03 11:42:44 +02:00
Stefan Weil
e420417c85 PangoFontInfo: Remove unused method is_bold
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-06-03 11:42:44 +02:00
Stefan Weil
0d411cb5c5 PangoFontInfo: Remove unused method is_smallcaps
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-06-03 11:42:44 +02:00
Stefan Weil
8786e56084 PangoFontInfo: Remove unused method is_monospace
Remove also some macros which are no longer needed.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-06-03 11:42:19 +02:00
Egor Pugin
4950b7e065 Merge pull request #964 from Shreeshrii/master
Reorder README text
2017-06-03 12:35:44 +03:00
Egor Pugin
916da39da5 Merge pull request #965 from Shreeshrii/docs
Add Issue Template
2017-06-03 12:33:51 +03:00
Egor Pugin
4ed4864dd6 Merge pull request #966 from rfschtkt/pen_color_
StringRenderer::pen_color_: int[3]->double[3]
2017-06-03 12:32:26 +03:00
Egor Pugin
d0a2f1c8fd Merge pull request #967 from leonoverweel/patch-1
Change Mac OS X -> macOS
2017-06-03 12:30:40 +03:00
Egor Pugin
945590d518 Merge pull request #968 from stweil/autoconf
Remove unused code
2017-06-03 12:30:28 +03:00
Stefan Weil
8ec67a940d Remove strcasestr which is no longer needed
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-06-03 10:11:44 +02:00
Stefan Weil
25e0c1accb PangoFontInfo: Remove unused method is_fraktur
That allows removing a dirty hack which used the
non-portable function strcasestr.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-06-03 10:08:21 +02:00
Leon Overweel
3e1099157f Change Mac OS X -> macOS
The official name of Apple's desktop / laptop operating system is macOS, not Mac OS X.
2017-06-02 21:50:17 +02:00
Raf Schietekat
2981c6c585 StringRenderer::pen_color_: int[3]->double[3] 2017-06-02 09:58:26 +02:00
Shree Devi Kumar
4506133aa2 Update readme for 3.05.01 2017-06-02 09:14:47 +05:30
Shreeshrii
79d866af74 fix typo 2017-06-01 17:01:57 +05:30
Shreeshrii
f17697b85f Add badges for Doxygen and Wiki documentation 2017-06-01 17:00:19 +05:30
Shreeshrii
063d2ed73e Add link to guidelines for this repository 2017-06-01 16:45:59 +05:30
Shreeshrii
d2471e4595 Add link to the guidelines for this repository 2017-06-01 16:18:10 +05:30
Shree Devi Kumar
781c4c1456 Update Issue Template 2017-06-01 14:11:10 +05:30
Shree Devi Kumar
47cc64a41f Reorganize Readme.md 2017-06-01 12:34:28 +05:30
zdenop
42066ce690 Merge pull request #953 from stweil/doc
Update documentation for installation
2017-05-26 08:16:38 +02:00
Stefan Weil
add00edfba Update documentation for installation
Add two build dependencies which were missing and update the hints for
building ScrollView.jar.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-05-25 20:57:02 +02:00
Zdenko Podobný
5b43c9bbec use correct name for Mac OS X, correct link to training wiki; fix #818 2017-05-23 09:30:49 +02:00
zdenop
6dd871bfb6 Merge pull request #942 from stweil/openmp
Optimize LSTM code for builds without OpenMP
2017-05-22 13:10:10 +02:00
Stefan Weil
15b3596ec4 Optimize LSTM code for builds without OpenMP
The constant value kNumThreads is not only used to configure the number
of threads but also to allocate vectors used in those threads.

There is only a single thread without OpenMP, so it is sufficient to
allocate vectors with only one element in that case.

Replace also the upper limit in the for loops by the known vector size.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-05-22 10:13:53 +02:00
zdenop
5a06417eb2 Merge pull request #937 from stweil/fix
UNICHARSET: Add missing initialization
2017-05-19 21:16:44 +02:00
Stefan Weil
fb863c97a9 UNICHARSET: Add missing initialization
The member variable default_sid_ was used without being initialized.

Valgrind report for `tesseract --oem 1 hello.png hello`:

    Conditional jump or move depends on uninitialised value(s)
       at 0x14352E: BITS16::set_bit(unsigned char, unsigned char) (bits16.h:50)
       by 0x143E27: WERD::set_flag(WERD_FLAGS, unsigned char) (werd.h:129)
       by 0x27D053: WERD_RES::SetupWordScript(UNICHARSET const&) (pageres.cpp:381)
       by 0x27CAFD: WERD_RES::SetupForRecognition(UNICHARSET const&, tesseract::Tesseract*, Pix*, int, TBOX const*, bool, bool, bool, ROW*, BLOCK const*) (pageres.cpp:316)
       by 0x145903: tesseract::Tesseract::SetupWordPassN(int, tesseract::WordData*) (control.cpp:182)
       by 0x145780: tesseract::Tesseract::SetupAllWordsPassN(int, TBOX const*, char const*, PAGE_RES*, GenericVector<tesseract::WordData>*) (control.cpp:168)
       by 0x146293: tesseract::Tesseract::recog_all_words(PAGE_RES*, ETEXT_DESC*, TBOX const*, char const*, int) (control.cpp:336)
       by 0x12F356: tesseract::TessBaseAPI::Recognize(ETEXT_DESC*) (baseapi.cpp:878)
       by 0x13036D: tesseract::TessBaseAPI::ProcessPage(Pix*, int, char const*, char const*, int, tesseract::TessResultRenderer*) (baseapi.cpp:1184)
       by 0x13014A: tesseract::TessBaseAPI::ProcessPagesInternal(char const*, char const*, int, tesseract::TessResultRenderer*) (baseapi.cpp:1140)
       by 0x12FBCE: tesseract::TessBaseAPI::ProcessPages(char const*, char const*, int, tesseract::TessResultRenderer*) (baseapi.cpp:1040)
       by 0x12C3DF: main (tesseractmain.cpp:515)
     Uninitialised value was created by a heap allocation
       at 0x4C2C21F: operator new(unsigned long) (vg_replace_malloc.c:334)
       by 0x12D88B: tesseract::TessBaseAPI::Init(char const*, int, char const*, tesseract::OcrEngineMode, char**, int, GenericVector<STRING> const*, GenericVector<STRING> const*, bool, bool (*)(STRING const&, GenericVector<char>*)) (baseapi.cpp:320)
       by 0x12D6DA: tesseract::TessBaseAPI::Init(char const*, char const*, tesseract::OcrEngineMode, char**, int, GenericVector<STRING> const*, GenericVector<STRING> const*, bool) (baseapi.cpp:284)
       by 0x12C088: main (tesseractmain.cpp:440)

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-05-19 20:57:39 +02:00
zdenop
da1254dd58 Merge pull request #936 from stweil/opt
Reduce number of new / delete operations
2017-05-19 20:36:58 +02:00
Stefan Weil
e6d683923c Reduce number of new / delete operations for class LanguageModel
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-05-19 18:31:37 +02:00
Stefan Weil
562de89728 Reduce number of new / delete operations for class KDTreeSearch
Add also several TODO comments because it is not clear why expensive
FLOAT64 calculations are used instead of cheaper FLOAT32 ones.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-05-19 18:30:11 +02:00
Egor Pugin
95bf30def1 Update README.md 2017-05-19 17:10:52 +03:00
Egor Pugin
baf6cfe9ec Merge pull request #935 from stweil/coverity
README: Add Coverity badge
2017-05-19 17:10:23 +03:00
Stefan Weil
edeb0a4502 README: Add Coverity badge
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-05-19 16:08:42 +02:00
zdenop
84db453d3a Merge pull request #934 from stweil/opencl
opencl: Remove more unused code
2017-05-19 11:24:49 +02:00
Stefan Weil
df36c85f26 opencl: Remove more unused code
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-05-19 10:11:14 +02:00
zdenop
f5814974b0 Merge pull request #932 from stweil/dockerfile
Fix and improve Dockerfile
2017-05-19 09:21:22 +02:00
Stefan Weil
defb399657 Fix and improve Dockerfile
* Add comment.
* Add missing packages cmake, curl.
* Update bundler (fixes warning).
* Only clone the latest release of travis-build (save time and disk space).
* Remove empty line at end of file.

Signed-off-by: Stefan Weil <stefan@v2201612906741603.powersrv.de>
2017-05-18 21:35:53 +02:00
zdenop
482cd82ca6 Merge pull request #930 from stweil/opt
EquationDetect: Remove unneeded new / delete operations
2017-05-18 08:59:20 +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