Commit Graph

1577 Commits

Author SHA1 Message Date
Stefan Weil
6fcfcc85ac Use portable data types #709 2017-03-10 11:51:16 +01:00
Leo Arias
35a93348c0 Add the packaging metadata to build the tesseract snap 2017-03-10 11:32:40 +01:00
Bryce Glover
d9a9876a70 [autogen.sh:] Improve libtoolize invocation message.
Use the `$LIBTOOLIZE` variable inside the message to abstract over the two possible variants of the tool which
can be invoked.
2017-03-10 11:32:35 +01:00
Bryce Glover
3671de002d [autogen.sh:] Clarify libtoolize/glibtoolize existence check error message.
Explicitly mention the latter variant of the tool inside said error message.
2017-03-10 11:32:30 +01:00
Bryce Glover
ed49959d2a [autogen.sh:] Reduce in-script comment block width to 80 characters.
This is with respect to the comment preceding the `libtoolize`/`glibtoolize` existence check I introduced.
2017-03-10 11:32:25 +01:00
Bryce Glover
efb89f8133 [autogen.sh:] Abstract the absolute path of libtoolize or glibtoolize away into $LIBTOOLIZE.
Increase portability by insulating `autogen.sh` from platform variance.
2017-03-10 11:32:19 +01:00
Zdenko Podobný
697c3dc4da Fix indentation after conditional [-Wmisleading-indentation]
The indentation is wrong since commit
fd0683f9e0 and results in a gcc warning:

api/baseapi.cpp: In member function 'bool tesseract::TessBaseAPI::ProcessPagesMultipageTiff(const l_uint8*, size_t, const char*, const char*, int, tesseract::TessResultRenderer*, int)':
api/baseapi.cpp:986:5: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
     if (tessedit_page_number >= 0)
     ^~
api/baseapi.cpp:988:7: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if'
       pix = (data) ? pixReadMemFromMultipageTiff(data, size, &offset)
       ^~~

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-03-10 11:24:53 +01:00
Stefan Weil
6fbd9d2643 Use camel case for GitHub in README.md
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-03-10 11:24:47 +01:00
Mikhail Solomennik
183ee5668b Correct reading config files with \r\n 2017-03-10 11:24:43 +01:00
Egor Pugin
40dc28026b Rename cppan/cmake targets. 2017-02-23 20:20:05 +03:00
Zdenko Podobný
e85a7e2529 replace nullptr with NULL to enable non c++11 build (fixes #727) 2017-02-19 13:49:22 +01:00
Zdenko Podobný
2ca5d0a8e3 Merge branch '3.05' of https://github.com/tesseract-ocr/tesseract into 3.05
* '3.05' of https://github.com/tesseract-ocr/tesseract:
  3.05.00 release
2017-02-16 18:59:48 +01:00
Zdenko Podobný
998d4735d0 3.05.00 release 2017-02-16 18:59:32 +01:00
Zdenko Podobný
db87e210e3 3.05.00 release 2017-02-16 18:51:45 +01:00
Egor Pugin
16563b4df3 Add .cppan to ignore list. 2017-02-15 13:29:24 +03:00
Egor Pugin
77ff65078c Backport cmake fixes. 2017-02-13 23:11:30 +03:00
Egor Pugin
43f3b5f565 Merge branch '3.05' of github.com-egorpugin:tesseract-ocr/tesseract into 3.05 2017-02-13 22:47:22 +03:00
Egor Pugin
a912d70c79 Backport cppan fixes. 2017-02-13 22:47:02 +03:00
Zdenko Podobný
45fd3ede21 fix #712: Ghostscript mangling Tesseract-produced PDFs 2017-02-13 20:09:14 +01:00
Zdenko Podobný
1999aa17cb fix appveyor 2017-01-19 15:55:07 +01:00
Jeff Breidenbach
d500231f06 fix #665 process file list 2017-01-19 15:18:52 +01:00
Zdenko Podobný
aaf49f7a62 leptonica 1.74.1 is needed for cppan 2017-01-06 19:52:31 +01:00
Egor Pugin
73890c38bb Update cppan.yml 2017-01-06 17:19:58 +03:00
Zdenko Podobný
3df54a4318 remove (fake) OPENMP support 2016-12-26 13:44:20 +01:00
Zdenko Podobný
0889940763 fix removal of AC_CHECK_LIB([lept]) 2016-12-26 13:31:47 +01:00
Zdenko Podobný
245eebdf29 Multi-page TIFF buffering is broken - fix #233 2016-12-26 12:11:25 +01:00
Zdenko Podobný
092c7d5690 require leptonica 1.74 or higher 2016-12-26 12:10:31 +01:00
Zdenko Podobný
7f4831bd9b increase min autoconf version (2.59) 2016-12-23 10:37:44 +01:00
zdenop
da50e561af Merge pull request #564 from stweil/3.05
openmp: Fix OpenMP support
2016-12-12 08:43:09 +01:00
Stefan Weil
8af3629e9f openmp: Fix OpenMP support
* Add OPENMP_CXXFLAGS for ccmain.
* Replace OPENMP_CFLAGS by OPENMP_CXXFLAGS.
* 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-11 22:43:37 +01:00
Stefan Weil
d045aaa31a java: Improve build rules
* Fix builds in subdirectories:
  * Add srcdir to Manifest.txt.
  * Remove srcdir from piccolo2d-core-3.0.jar and piccolo2d-extras-3.0.jar.

* Add dependency of SCROLLVIEW_CLASSES on SCROLLVIEW_LIBS.
  The SCROLLVIEW_LIBS are now automatically fetched when needed.

* Add .PHONY target for fetch-jars.

* Improve rule for clean target.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-12-11 22:32:13 +01:00
Stefan Weil
71269e79a5 Fix two typos in comments
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-12-11 22:26:24 +01:00
amitdo
2452051b96 Remove 'listio.cpp' and 'listio.h' from vs2010 vcxproj 2016-12-11 22:26:18 +01:00
alankila@bel.fi
23a08b0b80 Remove unused code.
Remove 'cutil/listio.cpp' and 'cutil/listio.h'. Also remove 'strsave' and 'strfree' defines from 'cutil/cutil.h'.
2016-12-11 22:26:10 +01:00
James R. Barlow
66c03c9166 Revise after code review 2016-12-11 22:26:05 +01:00
James R. Barlow
bdb690ba06 Implement a new orientation and script detection API for C and C++
See issue #424.

The existing C API for TessBaseAPIDetectOS requires a C caller to successfully allocate struct OSResults which is actually a C++ class.  Generally it won't
be possible for a regular C compiler to do this properly.

It's also assumed that most API level users of Tesseract are only interested in Tesseract's best guess as to script and orientation, not the individual values for all possible scripts.

This introduces a new API with a better name that is more closely aligned with the output of 'tesseract -psm 0'.  Both tesseract -psm 0 and this API now share the same code in baseapi.cpp.
2016-12-11 22:25:59 +01:00
Philipp Nordhus
ba5a17b4ba Remove duplicate destructor
Destructor of base class GenericVector calls base class clear()
method, deallocating the memory.
2016-12-08 15:50:27 +01:00
Zdenko Podobn??
59ba80bb3a More clang-tidy from previous commits
# Conflicts:
#	opencl/opencl_device_selection.h
#	opencl/openclwrapper.cpp
2016-12-08 15:50:22 +01:00
Jeff Breidenbach
d969ed1352 Produce warning for invalid resolution. Fix #453 2016-12-07 22:03:28 +01:00
Stefan Weil
f29abea160 tesseract: Disable Leptonica messages
Disable debugging and informational messages from Leptonica
for release builds.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-12-07 21:55:23 +01:00
Zdenko Podobný
f60bfbe55c fix typo 2016-12-07 19:52:18 +01:00
Stefan Weil
e34ab8c3d5 doc: Fix line endings
Remove spaces at line endings and replace CRLF by LF.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-12-07 17:25:24 +01:00
Stefan Weil
ddef7d4a7c training: Update Makefile for current Mingw-w64
Mingw-w64 no longer needs special linker options,
builds with those options fail.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-12-07 17:23:53 +01:00
Ray Smith
2298bdddc5 Fixed damage to binary images when processing PDFs, issue #535 2016-12-07 17:21:58 +01:00
Stefan Weil
4535d24d13 Remove extra semicolons after member function definitions
clang++ report:
api/baseapi.h:852:4: warning:
 extra ';' after member function definition [-Wextra-semi]
[...]

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-12-07 17:18:51 +01:00
Stefan Weil
d009c4fc8c opencl: Add missing checks for OpenCL failures
Fix also text for an existing check.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-12-07 17:18:39 +01:00
Stefan Weil
8a02c4f2e9 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-07 17:18:25 +01:00
Stefan Weil
98d50f6c16 cube: Fix use after free regression
Coverity report:

CID 1366758:  Memory - corruptions  (USE_AFTER_FREE)
Calling "operator delete[]" frees pointer "label32"
 which has already been freed.

Commit f60ff4d575 fixed several memory leaks
but also added this wrong delete operation.

label32 is assigned to char_samp->label32_, so it is freed when deleting
char_samp.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-12-07 17:18:16 +01:00
Zdenko Podobný
1aaff8872b opencl: Remove unneeded and potentially bad type casts
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-12-07 17:17:49 +01:00
Stefan Weil
6933b0618c Change tesseract parameter -psm to --psm
For compatibility reasons the old variant is still supported.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-12-07 17:12:45 +01:00