Commit Graph

5871 Commits

Author SHA1 Message Date
Egor Pugin
03435adca0 [elist] Rework macro into template and small macro. Move common iterator template into 'list_iterator.h'. 2021-04-07 00:04:30 +03:00
Egor Pugin
b9329e599f Misc. 2021-04-06 23:45:28 +03:00
Egor Pugin
746b87363b Remove unused methods. 2021-04-06 23:45:22 +03:00
Egor Pugin
29e75d0f51 [elist] Remove unused macros QUOTE_IT. 2021-04-06 23:40:56 +03:00
Egor Pugin
539f4b8255 [clist] Remove unused methods. 2021-04-06 23:40:35 +03:00
Egor Pugin
18e61d10ce Rework big clist macro into template and small macro. Remove unused macros QUOTE_IT and CLISTIZE (source file macro). 2021-04-06 23:37:14 +03:00
Egor Pugin
0c189908ec
Merge pull request #3382 from Shreeshrii/windows
Actions CI: Build Tesseract on Windows using cmake
2021-04-06 21:33:49 +03:00
Shree Devi Kumar
efc2a035cd Actions CI: Windows cmake build 2021-04-06 17:28:55 +00:00
Shree Devi Kumar
2e076e6b1b Actions CI: Windows cmake build 2021-04-06 17:15:08 +00:00
Raf Schietekat
6bbfef7c85 RAII: TessBaseAPI::GetIterator()
Co-authored-by: Stefan Weil <sw@weilnetz.de>
2021-04-06 17:57:23 +02:00
Raf Schietekat
d71413f4aa RAII: TessBaseAPI::AnalyseLayout()
Co-authored-by: Stefan Weil <sw@weilnetz.de>
2021-04-06 17:46:26 +02:00
Stefan Weil
897e59613d Clean code for hOCR renderer
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-04-06 16:36:23 +02:00
Egor Pugin
6479aaa0bc
Merge pull request #3380 from stweil/gridsearch
Optimize Gridsearch and proprietary list classes
2021-04-06 17:31:29 +03:00
Stefan Weil
3705989c94 Optimize length method for ELIST, ELIST2
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-04-06 15:57:12 +02:00
Stefan Weil
4104876b08 Add const attribute to some methods of ELIST, ELIST2 and related classes
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-04-06 15:48:18 +02:00
Stefan Weil
fb904d2265 Remove redundant debug code for CLIST
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-04-06 15:26:04 +02:00
Stefan Weil
b47ce5643b Modernize CLIST code
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-04-06 15:16:57 +02:00
Stefan Weil
fd187b0c18 Optimize CLIST
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-04-06 15:08:35 +02:00
Stefan Weil
4a628729b2 Delete assignment and copy constructor for ELIST
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-04-05 19:59:31 +02:00
Stefan Weil
b0b5600c30 Delete assignment and copy constructor for ELIST2, ELIST2_LINK
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-04-05 19:59:00 +02:00
Stefan Weil
24f91fab0b Delete assignment and copy constructor for CLIST, CLIST_LINK
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-04-05 19:42:01 +02:00
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