Stefan Weil
e219ad195c
classify: Replace memfree by free
...
free also accepts a nullptr argument, so the code can be simplified.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-05-01 18:14:00 +02:00
Stefan Weil
1d6dd03bfc
training: Replace memfree by free
...
free also accepts a nullptr argument, so the code can be simplified.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-05-01 18:14:00 +02:00
Stefan Weil
ca89a11f28
cutil: Remove unused code using memfree
...
The case (destructor == NULL) never occurs in the current code.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-05-01 18:14:00 +02:00
Stefan Weil
80fdb634ba
classify: Remove unused ContextsSeen
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-05-01 18:14:00 +02:00
zdenop
b9dff1607f
Merge pull request #860 from stweil/malloc
...
Replace memalloc / memfree by C++ new / delete
2017-05-01 18:09:17 +02:00
Stefan Weil
300841f9a7
Replace memalloc / memfree by C++ new / delete
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-05-01 17:26:23 +02:00
zdenop
ebea04e67a
Merge pull request #859 from stweil/unused
...
Remove unused code
2017-05-01 17:18:16 +02:00
Stefan Weil
85afda65f5
blobs: Remove unused macro
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-05-01 17:12:43 +02:00
Stefan Weil
aebdcd8bce
Remove unused global function memrealloc
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-05-01 17:12:43 +02:00
Stefan Weil
445befd3cb
Remove unused include statements for freelist.h
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-05-01 17:12:43 +02:00
zdenop
857d920c9b
Merge pull request #856 from stweil/doc
...
RFC – doc: Remove generated files and add rules to build manpages
2017-05-01 16:03:17 +02:00
zdenop
6e80812ac8
Merge pull request #857 from stweil/new_delete
...
Avoid unnecessary new / delete code
2017-05-01 16:02:49 +02:00
Stefan Weil
6d19e7c3c0
SVNetwork: Avoid unneeded new / delete operations
...
The class variable mutex_send_ does not require an indirection
by using a pointer.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-04-30 19:58:58 +02:00
Stefan Weil
83588bc7a1
Classify: Avoid unneeded new / delete operations
...
Both class variables BaselineCutoffs and CharNormCutoffs were pointers
to fixed size arrays which were allocated in the constructor and
deallocated in the destructor. These two extra allocations and two
extra deallocations can be avoided.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-04-30 19:45:50 +02:00
Stefan Weil
bb75793539
ccstruct: Remove unneeded NULL checks
...
It's also not necessary to nullify class variables in the destructor.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-04-30 19:23:24 +02:00
Stefan Weil
aea0d9a8d5
api: Remove unneeded NULL checks
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-04-30 19:23:24 +02:00
zdenop
fd3f8f9b2d
Merge pull request #352 from pnordhus/reduce_mallocs
...
Avoid unnecessary memory allocations
2017-04-30 17:39:31 +02:00
zdenop
a28b2a033d
Merge pull request #855 from stweil/lept
...
Use Leptonica struct names L_Compressed_Data, Pix
2017-04-30 17:38:02 +02:00
zdenop
eaf5629b46
Merge pull request #744 from stweil/malloc
...
Replace alloc_struct, free_struct
2017-04-30 17:35:17 +02:00
Stefan Weil
2794410c9b
doc: Remove generated files and add rules to build manpages
...
Those files can be built by doc/generate_manpages.sh.
The manpages are needed for the installation,
so add Makefile rules for them.
Git must ignore the generated manpages.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-04-30 11:27:17 +02:00
Stefan Weil
1c59914b61
Use Leptonica struct names L_Compressed_Data, Pix
...
The Tesseract project prefers that names, so fix the remaining exceptions.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-04-30 10:50:12 +02:00
Stefan Weil
f8fba59804
Replace alloc_struct, free_struct
...
Both functions simply call malloc, free.
Remove also unneeded null pointer checks and use calloc where possible.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-04-30 09:25:04 +02:00
Ray Smith
7a116ce8bb
More formatting fixes from clang tidy
2017-04-28 13:38:32 -07:00
Ray Smith
77015526fa
Jeff's fixes to pdf rendering
2017-04-28 13:38:13 -07:00
zdenop
13b7900ebf
Merge pull request #778 from cjmayo/singleopts
...
tidy tesseract(1) adding missing options
2017-04-28 18:58:40 +02:00
zdenop
177ceff9dd
Merge pull request #853 from stweil/doc
...
doc: Remove unsupported font name
2017-04-28 18:58:08 +02:00
zdenop
84f78f87c9
Merge pull request #851 from stweil/typo
...
Fix typo in comment
2017-04-28 18:56:47 +02:00
Stefan Weil
151a76ef26
doc: Remove unsupported font name
...
Fix this warning from doxygen:
warning: doxygen no longer ships with the FreeSans font.
You may want to clear or change DOT_FONTNAME.
Otherwise you run the risk that the wrong font is being used for dot generated graphs.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-04-28 16:13:41 +02:00
Stefan Weil
73db84d674
Fix typo in comment
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-04-28 06:59:00 +02:00
Ray Smith
500bfaf315
Added std:: to some stl types
2017-04-27 17:15:35 -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
zdenop
10e04ffe99
Merge pull request #849 from stweil/opencl
...
opencl: Remove more unused functions and related code
2017-04-27 09:02:56 +02:00
zdenop
394162e120
Merge pull request #848 from stweil/lept
...
ccstruct: Fix Leptonica data type
2017-04-27 09:01:43 +02:00
zdenop
72b86e098f
Merge pull request #847 from stweil/crash
...
opencl: Fix crash on hosts with no OpenCL platform
2017-04-27 09:01:11 +02:00
Stefan Weil
582eaeba7d
opencl: Remove more unused functions and related code
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-04-27 08:32:43 +02:00
Stefan Weil
b5abfb53d7
ccstruct: Fix Leptonica data type
...
L_Bmf works for C++ code, but the common form is L_BMF, so use that.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-04-27 07:51:50 +02:00
Stefan Weil
1e11b16d73
opencl: Fix crash on hosts with no OpenCL platform
...
A Tesseract binary with OpenCL support can also run on a host without
any OpenCL platform, as it simply uses the normal CPU based code.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-04-27 07:50:05 +02:00
zdenop
50f92c8f23
Merge pull request #843 from stweil/opencl
...
opencl: Remove unused code
2017-04-26 15:20:10 +02:00
Stefan Weil
e8ca29fb17
opencl: Remove unused function selectedDeviceIsNativeCPU
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-04-26 07:55:54 +02:00
Stefan Weil
bf9160cede
opencl: Remove unused function pixConvertRGBToGray
...
Remove also the related OpenCL kernel code kernel_RGBToGray.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-04-26 07:55:54 +02:00
zdenop
7bb00d9a31
Merge pull request #834 from stweil/master
...
Leptonica related updates
2017-04-23 17:38:49 +02:00
Stefan Weil
e2b1e9f977
Fix ChangeLog for Leptonica 1.74
...
Since commit 245eebdf29
, Tesseract 3.05
requires Leptonica 1.74, so this is not a new requirement for 4.00.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-04-22 18:33:37 +02:00
Stefan Weil
a3e0c10dc7
Remove unneeded code for old Leptonica versions
...
Tesseract requires Leptonica 1.74 or newer,
so that code is no longer needed.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-04-22 18:22:13 +02:00
Stefan Weil
325de57d54
Update Leptonica version for Travis CI
...
Use the latest version which is available.
Remove also some unneeded whitespace.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-04-22 17:51:39 +02:00
Egor Pugin
11b244f6b7
Merge pull request #831 from aleksey-nikolaev/cmake-install
...
Cmake install
2017-04-20 22:06:25 +03:00
Aleksey Nikolaev
be747a501b
Correct include path for installed project
2017-04-20 14:59:13 +03:00
Aleksey Nikolaev
6641989866
Cmake install
2017-04-20 14:50:53 +03:00
zdenop
e18a802994
Merge pull request #823 from RandomDSdevel/typo-fixes
...
Small Typo Fix
2017-04-15 19:12:51 +02:00
zdenop
6614b86bb3
Merge pull request #824 from stweil/typo
...
Fix typo
2017-04-15 19:11:44 +02:00
Bryce Glover
2be86764fe
autogen.sh: Small Typo Fix
...
Implement and contribute one small typographical fix, thereby improving the readability of the script's check
for the existence of the `m4` top-level directory.
2017-04-15 12:31:24 -04:00