Commit Graph

1644 Commits

Author SHA1 Message Date
Zdenko Podobn??
ed0c60bc65 backport from 4.00: use ".empty()" instead of ".size() > 0" 2016-11-30 11:33:35 +01:00
Zdenko Podobn??
5882261969 backport from 4.00: use "const TBOX&" instead of "TBOX box" in textord 2016-11-30 11:14:34 +01:00
Zdenko Podobn??
6234da6686 backport from 4.00: changes in wordrec + FakeWordFromRatings 2016-11-30 10:56:25 +01:00
Zdenko Podobn??
70ed782ab5 style fix 2016-11-30 10:38:08 +01:00
Zdenko Podobný
382fdd52df backport from 4.00: changes in cube 2016-11-30 09:35:35 +01:00
Zdenko Podobný
493312c06e backport from 4.00: fix of destroy_nodes (oldlist.cpp) 2016-11-29 16:59:26 +01:00
Zdenko Podobný
c778cd50c0 backport from 4.00: changes in scrollviewer 2016-11-29 16:56:04 +01:00
Zdenko Podobný
01cf9c25cf increase GENERIC_MINOR_VERSION 2016-11-29 16:51:12 +01:00
Zdenko Podobný
aa9be096a8 add License info to cmake files 2016-11-29 16:50:57 +01:00
Zdenko Podobný
c8e2be63d0 backport from 4.00: fix pdfrenderer 2016-11-29 11:21:21 +01:00
Zdenko Podobný
d01dd0bdd4 backport from 4.00: show PSM 11-13 2016-11-29 11:18:52 +01:00
Zdenko Podobný
7169545a86 fix code style 2016-11-29 11:16:10 +01:00
Ray Smith
8a7de59f5d Fixed the memory leak/double free cleanly 2016-11-28 19:32:26 +01:00
Ray Smith
fe9fa88f1d Missing pdf font file from previous sync 2016-11-28 19:32:10 +01:00
Zdenko Podobný
6d47e9027d use leptonica from master git repository (1.74) 2016-11-27 21:39:23 +01:00
Amit D
0dccbeddcb AUTHORS: Add more contributors
and fix typo
2016-11-27 21:34:06 +01:00
Zdenko Podobný
6dcafe64f8 revert TessHashMap to hash_map in training/stringrenderer.h from 90651e1 (to fix build) 2016-11-27 21:26:29 +01:00
Zdenko Podobný
bf0f9013ef add license info to autogen.sh 2016-11-25 15:16:39 +01:00
Zdenko Podobný
8e7e27238f Merge branch '3.05' of https://github.com/tesseract-ocr/tesseract into 3.05 2016-11-25 15:15:17 +01:00
Zdenko Podobný
90651e111f backport style changes from 4.00 for better identification of fixes and new code 2016-11-25 15:14:46 +01:00
Zdenko Podobný
e5743fd647 backport style changes from 4.00 for better identification of fixes and new code 2016-11-25 13:43:57 +01:00
Zdenko Podobný
e9785a0018 downgrade to leptonica 1.73 2016-11-25 13:17:23 +01:00
Zdenko Podobný
057b932f02 backport from 4.00: add missing License information 2016-11-25 13:13:28 +01:00
Zdenko Podobný
e8d5152ab7 Increase version number in VS2010 and fix year 2016-11-25 09:37:57 +01:00
Amit D
f8e1c7e2a0 AUTHORS - Add community contributors
... and Jeff
2016-11-25 09:33:34 +01:00
Stefan Weil
054205f8fd Fix compiler warning (-Wmaybe-uninitialized)
gcc report:

ccstruct/blamer.cpp:343:65: warning:
 'truth_x' may be used uninitialized in this function [-Wmaybe-uninitialized]

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-11-25 09:32:59 +01:00
Ray Smith
4f3cc9c795 Fixed failed merge of memory leak 2016-11-25 09:32:16 +01:00
Stefan Weil
b0a2189c25 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-25 09:31:52 +01:00
Zdenko Podobný
b04a910932 opencl: Fix typo in name of local variable
Signed-off-by: Stefan Weil <sw@weilnetz.de>

Conflicts:
	opencl/openclwrapper.cpp
2016-11-25 09:31:22 +01:00
Stefan Weil
56dc7d14b9 Fix typo in documentation
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-11-25 09:18:40 +01:00
Cristian Ciupitu
e5a86c47dd Fix a typo in tesseract(1) man page
C++ needs to escaped as C\+\+ in the AsciiDoc source code.
2016-11-25 09:18:17 +01:00
Zdenko Podobný
07ce98b7fc add option "make training-uninstall" 2016-11-25 09:17:48 +01:00
Stefan Weil
67fa73c95a training: Fix compiler warnings (deprecated register keyword)
training/commontraining.cpp:824:3: warning:
 'register' storage class specifier is deprecated and incompatible with C++1z [-Wdeprecated-register]
...

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-11-25 09:17:08 +01:00
Zdenko Podobný
f8cac770a3 backport from 4.00: issue #242 - different results when same image is lossless-encoded at different bpp 2016-11-25 09:06:58 +01:00
Stefan Weil
c097dd3592 opencl: Fix type of parameter for clGetProgramInfo
CL_PROGRAM_NUM_DEVICES expects a cl_uint.

Passing size_t results in a wrong value for numDevices on hosts where
sizeof(cl_uint) != sizeof(size_t).

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-11-24 13:55:21 +01:00
Stefan Weil
0518bb549f opencl: Fix type of parameter for clGetContextInfo
CL_CONTEXT_NUM_DEVICES expects a cl_uint.

Passing size_t results in a wrong value for numDevices on hosts where
sizeof(cl_uint) != sizeof(size_t). This results in errors like these:

  Tesseract Open Source OCR Engine v3.05.00dev with Leptonica
  OpenCL error code is -44 at   when clCreateKernel kernel_HistogramRectAllChannels .
  OpenCL error code is -44 at   when clCreateKernel kernel_HistogramRectAllChannelsReduction .
  OpenCL error code is -48 at   when clSetKernelArg imageBuffer .
  ...

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-11-24 13:55:11 +01:00
Zdenko Podobný
c5fdba596e allow combination of enable/disable 2016-11-24 13:54:56 +01:00
Stefan Weil
c4dbc0e0fd Fix crash caused by undefined value of local variable
Commit b1f03cb697 added a call of function
FreeFeatureSet to fix a memory leak, but introduced a new bug because the
local variable FloatFeatures was not always assigned a value.

Now FloatFeatures is always assigned a value, and we only need a single
place where FreeFeatureSet is called.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-11-24 13:54:38 +01:00
Stefan Weil
5919916bc5 opencl: Remove unused function getNumDeviceWithEmptyScore
This fixes compiler warnings.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-11-24 13:53:49 +01:00
Stefan Weil
663ca268cf opencl: Add missing argument for L_WARNING
gcc report:

In file included from /usr/include/leptonica/alltypes.h:36:0,
                 from /usr/include/leptonica/allheaders.h:34,
                 from openclwrapper.h:2,
                 from openclwrapper.cpp:11:
openclwrapper.cpp: In static member function 'static PIX* OpenclDevice::pixReadMemTiffCl(const l_uint8*, size_t, l_int32)':
/usr/include/leptonica/environ.h:442:68: warning: format '%d' expects a matching 'int' argument [-Wformat=]
              (void)fprintf(stderr, "Warning in %s: " a, __VA_ARGS__), \
                                                                    ^
/usr/include/leptonica/environ.h:427:61: note: in definition of macro 'IF_SEV'
       ((l) >= MINIMUM_SEVERITY && (l) >= LeptMsgSeverity ? (t) : (f))
                                                             ^
opencl/openclwrapper.cpp:1162:3: note: in expansion of macro 'L_WARNING'
   L_WARNING("tiff page %d not found", procName);
   ^

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-11-24 13:53:36 +01:00
Stefan Weil
44717c4a60 opencl: Fix wrong implementation of function getNumDeviceWithEmptyScore
gcc report:

opencl_device_selection.h: In function 'ds_status getNumDeviceWithEmptyScore(ds_profile*, unsigned int*)':
opencl_device_selection.h:589:13: warning: value computed is not used [-Wunused-value]
       *num++;
             ^

This is caused by a buggy implementation which increases the value of num
instead of *num.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-11-24 13:52:04 +01:00
zdenop
8972c0e916 Merge pull request #463 from stweil/opencl
opencl: Move declaration of MORPH_BC from .h to .cpp file
2016-11-01 21:20:39 +01:00
Stefan Weil
1a0aadabd3 opencl: Move declaration of MORPH_BC from .h to .cpp file
It is only used locally in opencl/openclwrapper.cpp.

For all other files which include openclwrapper.h, the compiler
complained about an unused static variable:

opencl/openclwrapper.h:175:16: warning:
 ‘MORPH_BC’ defined but not used [-Wunused-variable]

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-11-01 20:15:29 +01:00
zdenop
1dbc8c19a4 Merge pull request #461 from stweil/opencl
opencl: Clean handling of lmask32, rmask32
2016-10-31 10:37:32 +01:00
Stefan Weil
aea20224a1 opencl: Clean handling of lmask32, rmask32
Both arrays are only used in openclwrapper.cpp, so move them into that
file.

The first element of both arrays was unused. Remove it and fix the code
which reads the array elements accordingly. Sort this code, too.

These changes reduce the code size a little bit:

   text	   data	    bss	    dec	    hex	filename
2461743	   6676	2742784	5211203	 4f8443	1/api/tesseract (old)
2461599	   6676	2742784	5211059	 4f83b3	2/api/tesseract (new)

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-10-31 09:56:59 +01:00
zdenop
610b2d2cd6 Merge pull request #459 from stweil/opencl
opencl: Add tiff library needed by openclwrapper
2016-10-30 13:34:00 +01:00
Stefan Weil
3f959e394c opencl: Add tiff library needed by openclwrapper
openclwrapper calls function TIFFReadRGBAImageOriented which is provided
by libtiff, so add that library to OPENCL_LIBS.

This fixes a linker error (unresolved symbol) when opencl is enabled.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-10-30 08:10:07 +01:00
zdenop
44e6e87eae Merge pull request #457 from stweil/opencl
opencl: Fix mismatched new[] / free
2016-10-29 18:43:18 +02:00
Stefan Weil
ab8209cbcb opencl: Fix mismatched new[] / free
valgrind report: Mismatched free() / delete / delete []

gpuInfo->mpArryDevsID is created by "new cl_device_id[1]",
so it must be destroyed by delete[].

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-10-29 16:51:48 +02:00
zdenop
7f57ac4a94 Merge pull request #456 from stweil/opencl
opencl: Fix some issues reported by gcc
2016-10-28 20:08:42 +02:00