Stefan Weil
eeb67e8ae8
Replace find / insert by insert on unordered set to optimize GridSearch
...
Both find and insert can be slow for a large unordered set.
Instead of using both methods, it is sufficient to simply try only
the insert method which returns whether the insertion was possible
or not.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-04-05 18:11:33 +02:00
Egor Pugin
50aec308b3
Remove unnecessary pointer hasher for uset.
2021-04-04 14:00:46 +03:00
Stefan Weil
23ed59bd7b
Fix CI and update package list before installation
...
Run `apt-get update` before installing packages because otherwise
the installation can fail.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-04-03 23:06:53 +02:00
Egor Pugin
5cfdb2fa8a
Merge pull request #3376 from stweil/master
...
Disable more code with GRAPHICS_DISABLED
2021-04-02 17:55:45 +03:00
Stefan Weil
0611c892b6
Disable more code with GRAPHICS_DISABLED
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-04-02 16:43:26 +02:00
Egor Pugin
7a73875bd1
Merge pull request #3375 from amitdo/viewer
...
Disable more code with GRAPHICS_DISABLED
2021-04-02 12:27:24 +03:00
Amit Dovev
6d94b22c80
Disable more code with GRAPHICS_DISABLED
2021-04-02 11:12:38 +03:00
Stefan Weil
bfe1616b4e
Create new pre-release 5.0.0-alpha-20210401
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-04-01 21:41:15 +02:00
Egor Pugin
34e0d017ab
Add Image::operator&=().
2021-04-01 19:15:58 +03:00
Egor Pugin
9e3da4a724
Add Image::operator|=().
2021-04-01 19:10:48 +03:00
Egor Pugin
e077b7255d
Remove arg from Image::copy().
2021-04-01 19:08:47 +03:00
Egor Pugin
d5fb7f9843
Init variable.
2021-04-01 17:16:46 +03:00
Egor Pugin
fe02ba2363
Add Image::isZero().
2021-04-01 17:15:48 +03:00
Egor Pugin
306d296979
Add Image::clone().
2021-04-01 17:06:30 +03:00
Egor Pugin
2aca22439e
Add Image::copy().
2021-04-01 16:55:43 +03:00
Stefan Weil
3f0ac1185c
Add new files ccstruct/image.cpp and ccstruct/image.h to Makefile
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-04-01 14:00:08 +02:00
Stefan Weil
5159f9aa12
Fix name conflict between class and function named Image
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-04-01 14:00:08 +02:00
Egor Pugin
e429b607ae
[misc] Update header guard.
2021-04-01 01:36:22 +03:00
Egor Pugin
1628a9aae3
Revert 4fa05b9147
. Make a note.
2021-04-01 01:35:50 +03:00
Egor Pugin
a792b67983
Basic usage of new Image class. Only pixDestroy is wrapped at the moment.
...
Add new methods to Image class and replace them in non-public code.
2021-03-31 22:39:43 +03:00
Egor Pugin
ce6e2f1821
Initial tesseract Image wrapper.
...
Provide basic Pix conversions.
Add destroy() method.
It can be extended later to 1) image owner (raii), 2) different image libraries.
2021-03-31 22:38:32 +03:00
Egor Pugin
4fa05b9147
Remove unused ifdef.
2021-03-31 21:54:12 +03:00
Stefan Weil
722767633e
Partially fix issue #3374
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-03-31 19:23:07 +02:00
Stefan Weil
b7c6d971f3
Fix some compiler warnings
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-03-31 07:08:53 +02:00
Stefan Weil
6684a727c1
Improve some structs further (fixes several CID issues)
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-03-30 14:20:52 +02:00
Nick White
abea25ee2f
lstm: Include missing header
2021-03-29 18:53:35 +02:00
Stefan Weil
2e349dbba5
Fix compilation for Tensorflow code
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-03-29 16:19:06 +02:00
Stefan Weil
3c03d70e64
Fix some compiler warnings
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-03-29 16:12:52 +02:00
Egor Pugin
7568a3625b
Merge pull request #3368 from stweil/master
...
Replace remaining malloc / strdup / free
2021-03-29 13:13:27 +03:00
Stefan Weil
f639500a81
Add missing TESS_API for sw builds
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-03-29 11:34:23 +02:00
Stefan Weil
5c4de14567
Replace strdup / free by std::string in SVSync::StartProcess
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-03-29 11:24:58 +02:00
Stefan Weil
3790413cc5
Replace remaining malloc / free in training code
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-03-29 11:24:58 +02:00
Stefan Weil
7c1bea505a
Replace strdup / free by std::string for StringRenderer::features_
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-03-29 11:24:58 +02:00
Stefan Weil
201686feb8
Use lept_free instead of free for memory which was allocated by Leptonica
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-03-29 10:55:33 +02:00
Stefan Weil
1b95eb1d19
Replace malloc / free by std::string for LABELEDLISTNODE
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-03-29 10:29:08 +02:00
Stefan Weil
1620daffcd
Replace malloc / free by std::string in LABELEDLISTNODE and MERGE_CLASS_NODE
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-03-29 10:17:42 +02:00
Egor Pugin
b7009245d1
Merge pull request #3367 from stweil/master
...
Replace most malloc / realloc / free by new / delete / std::vector
2021-03-29 10:03:06 +03:00
Stefan Weil
0976e23387
Replace malloc / free by new / delete for KDTREE
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-03-28 23:19:46 +02:00
Stefan Weil
c05d849381
Replace malloc / free by new / delete for NORM_PROTOS
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-03-28 22:37:47 +02:00
Stefan Weil
174210c849
Replace malloc / free by new / delete for MFEDGEPT
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-03-28 22:24:51 +02:00
Stefan Weil
0c3d244238
Replace new / delete by std::vector for INT_CLASS_STRUCT::ProtoLengths
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-03-28 22:09:06 +02:00
Stefan Weil
486c257f42
Replace malloc / free by new / delete for MICROFEATURE
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-03-28 21:20:59 +02:00
Stefan Weil
30f44f333a
Replace malloc / free by new / delete for KDNODE
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-03-28 21:11:22 +02:00
Stefan Weil
47a1fd7b45
Replace malloc / free by new / delete for INT_CLASS_STRUCT::ProtoLengths
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-03-28 20:41:37 +02:00
Stefan Weil
d6caae3793
Replace malloc / free by std::vector for BUCKETS
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-03-28 20:32:57 +02:00
Stefan Weil
78f8a47d05
Replace malloc / free by std::vector for PROTOTYPE::Distrib
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-03-28 20:31:35 +02:00
Stefan Weil
b8488dac7a
Replace malloc / free for TEMPCLUSTER
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-03-28 20:31:35 +02:00
Stefan Weil
2a569c9cfb
Replace malloc / free for FLOATUNION::Elliptical
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-03-28 20:31:35 +02:00
Stefan Weil
5bf1af257c
Use std::vector<BIT_VECTOR> for CLASS_STRUCT::Configurations
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-03-28 20:31:35 +02:00
Stefan Weil
6f499f7fb5
Use std::vector<PROTO_STRUCT> for CLASS_STRUCT::Prototypes
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-03-28 20:31:35 +02:00