Commit Graph

6394 Commits

Author SHA1 Message Date
zdenop
b0a10bbe1a
Update cmake-win64.yml
Use libpng 1.6.43
2024-06-07 07:13:54 +02:00
zdenop
6db748d1fc
Update cmake-win64.yml
actions/upload-artifact@v3.1.1 is depreciated
2024-06-07 06:41:38 +02:00
Stefan Weil
1be261dc22 Create new release 5.4.0
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2024-06-06 15:29:45 +02:00
Stefan Weil
34693cd772 Make function Network::spec pure virtual
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2024-05-28 15:21:45 +02:00
Amit D
a7c0a952b0
Update issue-bug.yml 2024-05-27 05:40:06 +03:00
Stefan Weil
c5b0c2f421 Replace strcpy and strncpy by new inline helper function
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2024-05-24 15:24:35 +02:00
Egor Pugin
ea82f919a6
Merge pull request #4249 from stweil/codacy
Avoid redundant conversion from std::string to char * to std::string
2024-05-24 01:15:03 +03:00
Stefan Weil
6e73a80e10 Avoid redundant conversion from std::string to char * to std::string
This fixes two issues reported by Codacy.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2024-05-23 17:13:18 +02:00
Stefan Weil
5712e16957 Add nullptr check in for statement of function RecodeBeamSearch::ContinueContext
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2024-05-23 16:56:45 +02:00
Yu Xiao
cf7231f370 Fixes #4247: remove unnecessary nullptr checks 2024-05-23 16:56:45 +02:00
Stefan Weil
5d5a633a5d Fix compiler warnings [-Wdeprecated-declarations]
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2024-05-20 12:50:00 +02:00
Stefan Weil
bdc64229ca Fix compiler warnings [-Wmaybe-uninitialized]
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2024-05-20 12:50:00 +02:00
Stefan Weil
f1a45db977 Remove unused xmlns:xlink from ALTO renderer
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2024-05-20 07:46:48 +02:00
Stefan Weil
0366613526 Avoid some float / double conversions in class Classify
This also fixes several compiler warnings ([-Wimplicit-float-conversion],
[-Wdouble-promotion]).

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2024-05-20 07:46:07 +02:00
Stefan Weil
d0b3d0915e Fix compiler warnings [-Wunused-but-set-variable]
- Use conditional compilation for variables which might be useful for debugging.
- Remove all other unused variables.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2024-05-20 07:46:07 +02:00
Stefan Weil
1644205d9e Fix compiler warnings [-Wold-style-cast]
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2024-05-20 07:46:07 +02:00
Stefan Weil
24dd72603b Fix compiler warnings [-Wunreachable-code-return]
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2024-05-20 07:46:07 +02:00
Stefan Weil
36d44a1497 Fix compiler warnings [-Wzero-as-null-pointer-constant]
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2024-05-20 07:46:07 +02:00
zdenop
531597fbea
Merge pull request #4244 from stweil/buildfix
Use AM_CPPFLAGS also for compilation of all sources
2024-05-19 20:47:31 +02:00
Stefan Weil
d72567ad45 Use AM_CPPFLAGS also for compilation of all sources
It was not used for all sources before. Therefore some parts of the
code (especially the code for training) used different compiler
options. For example NDEBUG was not defined, and so the training
code was built with debug assertions (resulting in potentially
slower execution).

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2024-05-19 18:43:55 +02:00
Stefan Weil
9a30816783 Create new release 5.3.5-rc1
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2024-05-19 11:57:23 +02:00
Stefan Weil
74e4381696
Fix FP exception in Wordrec::angle_change (issue #4242) (#4243)
std::asin only allows arguments in [-1, 1], but rounding errors can
produce values which are slightly outside of this range and which
would cause a FP exception (or wrong calculation results).

Rename also the internally used function `TPOINT::length` to `TPOINT::length2`
because it calculates the square of the length.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2024-05-17 18:14:00 +03:00
Stefan Weil
bcfdd5e511 Fix setup of datadir on installations with Conda (issue #4230)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2024-05-15 16:56:23 +02:00
Egor Pugin
f3974d422c
Update sw.yml 2024-05-12 19:06:46 +03:00
Stefan Weil
0ad6efc948 Replace release 5.3.5-rc1 by 5.4.0-rc1
The new release includes API changes, therefore the minor version
must be updated.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2024-05-12 17:45:22 +02:00
Stefan Weil
cab5658659 Create new release 5.3.5-rc1
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2024-05-12 15:42:06 +02:00
Stefan Weil
0418ec28f3 Create new release 5.3.5-rc1
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2024-05-12 15:32:22 +02:00
Balearica
c23792bc31
Allow for text angle/gradient to be retrieved (#4070)
* Added GetGradient function
2024-05-12 15:24:02 +02:00
Stefan Weil
6a31e36e0c
Improve CCUtil::main_setup (fixes issue #4230)
Conda installations patch TESSDATA_PREFIX in the binary.
That does not work for std::string because the length
won't be patched, so use a normal C string which can be
patched.

Simplify also the code which checks the last character
of datadir.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2024-05-12 09:39:07 +02:00
Stefan Weil
6648d5bcac Fix some issues which were reported by GitHub code scanning
GitHub code scanning report:

    Incorrect return-value check for a 'scanf'-like function

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2024-05-03 17:34:14 +02:00
Stefan Weil
0f9d507740 Update documentation
The last contribution from Google was in 2018
(see commit ce88adbf32).

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2024-05-03 16:15:31 +02:00
Stefan Weil
dff5ebd299 Fix CID 1544762 and CID 1544763 (Uninitialized scalar variable)
Use also enum names instead of numeric values where possible.

Fixes: 577e8a8b93 ("Add PAGE XML renderer / export (#4214)")
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2024-05-03 08:48:40 +02:00
Stefan Weil
4a49e0340f Remove trailing whitespace from PAGE XML <Unicode> output
Fixes: 577e8a8b93 ("Add PAGE XML renderer / export (#4214)")
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2024-05-03 08:48:40 +02:00
Sadra Barikbin
d461867812
Refactor function Textord::clean_noise_from_row (#4225)
Co-authored-by: Stefan Weil <sw@weilnetz.de>
2024-04-26 07:53:31 +02:00
Sadra Barikbin
a1837f18e0 Remove the variable 2024-04-26 07:48:57 +02:00
Sadra Barikbin
77c99e0782 A few typo fix 2024-04-26 07:48:27 +02:00
Sadra Barikbin
072b5d47c1 Apply the change 2024-04-26 07:47:22 +02:00
Sadra Barikbin
6802705cf0 Apply the changes 2024-04-26 07:46:30 +02:00
Stefan Weil
d6f0073c75 Remove unused local variables in PAGE renderer
Fixes: 577e8a8b93 ("Add PAGE XML renderer / export (#4214)")
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2024-04-24 10:33:39 +02:00
Stefan Weil
549b8767e9 Support training without lstmf files
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2024-04-24 10:32:47 +02:00
Stefan Weil
88771ca4c6 Add missing new function prototypes for PAGE renderer to C API
Fixes: 577e8a8b93 ("Add PAGE XML renderer / export (#4214)")
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2024-04-24 10:22:27 +02:00
Jan Kamlah
577e8a8b93 Add PAGE XML renderer / export (#4214)
Add PAGE XML export and documentation.
To generate PAGE XML output just add 'page' to the tesseract command.

The output is outputname + '.page.xml' to avoid conflicts with ALTO export.

The output can be customized with the flags:
tessedit_create_page_polygon and tessedit_create_page_wordlevel.

Co-authored-by: Stefan Weil <sw@weilnetz.de>
2024-04-19 21:12:39 +02:00
Mahesh Madhav
bae520ea00
Facilitate vectorization for generic build (#4223)
* Update intsimdmatrix.cpp

Unroll loop into chunks of four operations to facilitate compilers recognizing vectorization opportunity.

* Apply suggestions from code review

Co-authored-by: Stefan Weil <sw@weilnetz.de>
2024-04-16 19:28:55 +02:00
Stefan Weil
d5e000bc58
Remove unsupported OpenCL code and related API functions (#4220)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2024-04-11 19:15:39 +03:00
Stefan Weil
912deb3978 Fix comments for function ReCachePages
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2024-04-04 11:08:53 +02:00
zdenop
87a152c0eb cmake: target_compile_features instead of set_property 2024-03-30 11:25:27 +01:00
Amit D
2b07505e0e
issue-bug.yml: Add a link to Supported Operating Systems page 2024-03-17 05:08:20 +02:00
Amit D
cc3c507003
Update autotools.yml
Remove the gcc-8 job.
2024-03-11 06:50:05 +02:00
Amit D
872ca6db73
Update cmake.yml
Remove the gcc-8 job
2024-03-11 06:45:54 +02:00
Egor Pugin
d9ae5c356b
Merge pull request #4205 from stweil/docker
Remove broken Dockerfile
2024-03-09 16:17:47 +03:00