Stefan Weil
de7676c88e
unittest: Fix and enable heap_test
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-08-25 18:39:40 +02:00
Stefan Weil
778092838a
Add ARRAYSIZE macro for Google test environment
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-08-25 18:39:40 +02:00
Stefan Weil
2dc0b68147
unittest: Fix and enable denorm_test
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-08-25 18:16:46 +02:00
Stefan Weil
bb101defdb
unittest: Fix and enable colpartition_test
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-08-25 18:16:46 +02:00
Stefan Weil
68db6aa5df
unittest: Fix and enable cleanapi_test
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-08-25 18:16:46 +02:00
Stefan Weil
0dc5c8ef3f
unittest: Fix and enable bitvector_test
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-08-25 18:16:46 +02:00
Stefan Weil
2b7df59187
Add more unittests from Google
...
They were provided by Jeff Breidenbach <jbreiden@google.com>.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-08-25 18:16:46 +02:00
Stefan Weil
f0337c2d1a
Add more portability hacks for Google test environment
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-08-25 18:16:46 +02:00
Stefan Weil
7a2f8d9010
Move class tesseract::File from training to ccutil
...
This allows using the class for unittests, too.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-08-25 18:16:46 +02:00
Egor Pugin
f5705da1d9
Merge pull request #1859 from stweil/fix
...
Fix whitespace issues
2018-08-24 19:16:27 +03:00
Stefan Weil
f24426cd1b
Convert CRLF line endings to LF
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-08-23 18:18:15 +02:00
Stefan Weil
63965bd750
Fix new whitespace issues
...
- add linefeed after last line
- remove blanks at line endings
This fixes some warnings from clang:
src/training/validate_javanese.h:63:51: warning:
no newline at end of file [-Wnewline-eof]
src/training/validate_javanese.cpp:269:26: warning:
no newline at end of file [-Wnewline-eof]
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-08-23 18:18:15 +02:00
Egor Pugin
07acc2b260
Merge pull request #1856 from stweil/fix
...
Fix assertion caused by access to default TBOX
2018-08-23 00:08:38 +03:00
Stefan Weil
b08966addf
Fix assertion caused by access to default TBOX
...
Instead of adding an empty TBOX at the end of the box list,
that corner case is now handled by passing a nullptr (like
it was already done for the first box in the list).
This avoids the calls of BoxMissMetric with a TBOX
which raises an assertion there (b == 0).
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-08-22 21:40:26 +02:00
Egor Pugin
97f6864420
Merge pull request #1854 from stweil/cov
...
Fix several issues reported by Coverity Scan
2018-08-22 18:28:47 +03:00
Stefan Weil
7910a766fa
Fix CID 1164567 (Dereference after null check)
...
It looks like the check cblob_ptr != nullptr is not needed.
If cblob_ptr were NULL, we would have seen crashes in compute_bounding_box.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-08-22 13:55:37 +02:00
Stefan Weil
f3c7a17df3
Fix CID 1395108 (Dereference after null check)
...
Let's hope that word->best_choice is never NULL.
Overwise both the old and the new code would abort with SIGSEGV.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-08-22 13:55:37 +02:00
Stefan Weil
6092a8f865
Fix CID 1395109 (Logically dead code)
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-08-22 13:55:37 +02:00
Stefan Weil
ac17663015
Fix CID 1395113 ('Constant' variable guards dead code)
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-08-22 13:55:37 +02:00
Stefan Weil
7e9dfefc5c
Fix CID 1395114 ('Constant' variable guards dead code)
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-08-22 13:55:37 +02:00
Stefan Weil
99efc13de8
Fix CID 1395116 ('Constant' variable guards dead code)
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-08-22 13:55:37 +02:00
Egor Pugin
621a8cd29d
Merge pull request #1851 from noahmetzger/winfix
...
Added the option for character accumulated glyph confidences.
2018-08-20 16:35:14 +03:00
Egor Pugin
1f3acca03a
Merge pull request #1850 from Shreeshrii/new-branch-name
...
add option --save_box_tiff to save box/tiff pairs with lstmf files
2018-08-20 12:39:52 +03:00
Noah Metzger
663be426f6
Added the option for character accumulated glyph confidences.
...
The parameter glyph_confidences is changed from bool to int.
An execution with value 1 outputs the hOCR file enriched with glyph confidences
for every timestep like before. An execution with value 2 outputs the timesteps
accumulated over the recognized characters.
Signed-off-by: Noah Metzger <noah.metzger@bib.uni-mannheim.de>
2018-08-20 10:43:58 +02:00
Shree Devi Kumar
43e3f24bb0
add variable --save_box_tiff to Save box/tiff pairs along with lstmf files.
2018-08-20 08:24:09 +00:00
Egor Pugin
115fe7662c
Merge pull request #1844 from Shreeshrii/new-branch-name
...
Updates to Javanese Script Validation and Training
2018-08-17 13:24:28 +03:00
zdenop
debe3da36d
remove duplicate include
2018-08-16 20:50:28 +02:00
Shree Devi Kumar
b34cf9d424
Javanese script training
2018-08-16 12:15:10 +00:00
Stefan Weil
e1c387c9b3
Fix typo in comments and variable name
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-08-16 11:38:36 +00:00
Stefan Weil
bf33301114
Fix typo in function name
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-08-16 11:38:36 +00:00
zdenop
e731324a08
Merge pull request #1841 from stweil/typo
...
Fix some typos
2018-08-14 16:51:35 +02:00
Stefan Weil
641237495a
Fix typo in comments and variable name
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-08-14 16:20:27 +02:00
Stefan Weil
95ed924d81
Fix typo in function name
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-08-14 16:20:27 +02:00
zdenop
4671e2b0bf
Merge pull request #1840 from stweil/scrollview
...
scrollview: Clean include statements
2018-08-14 13:22:36 +02:00
Stefan Weil
ce135de37c
scrollview: Clean include statements
...
cstring was included twice (reported by Martin Strunz).
Use C++ header files and sort them alphabetically.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-08-14 13:12:51 +02:00
Zdenko Podobný
296309c1f1
remove duplicate include. Fixes #1837
2018-08-14 13:06:14 +02:00
zdenop
fd492062d0
Merge pull request #1825 from atuyosi/fix-tesserocr-129
...
Revert Makefile.am to beta.2
2018-08-06 18:23:53 +02:00
Atsuyoshi Suzuki
4cda775d73
Revert Makefile.am to beta.2
...
thesserocr needs `osdetect.h'.
2018-08-06 23:21:20 +09:00
Egor Pugin
3b723ba102
Merge pull request #1823 from Shreeshrii/javanese
...
Add support for Javanese script - aksara Jawa
2018-08-04 16:08:23 +03:00
Shree Devi Kumar
7957288fd5
chamge validate javanese similar to indic
2018-08-04 09:43:53 +00:00
Shree Devi Kumar
f93f9e8a09
fix typo re Javanese
2018-08-03 14:33:24 +00:00
Shree Devi Kumar
0eb7be1cd1
Initial COmmit to add Aksara Jawa - Javanese script
2018-08-03 13:59:27 +00:00
zdenop
e9b4e21e6f
Merge pull request #1822 from stweil/clean
...
ColPartition: Rename median_size_ -> median_height_
2018-08-03 10:06:03 +02:00
Stefan Weil
6a0f8e8c07
ColPartition: Rename median_size_ -> median_height_
...
This implements a TODO. Rename also some related items.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-08-03 08:46:38 +02:00
Egor Pugin
4370714779
Merge pull request #1819 from stweil/ocl
...
Fix ImageThresholder::OtsuThresholdRectToPix for OpenCL
2018-08-02 02:01:32 +03:00
Stefan Weil
8af80b7ba6
Fix ImageThresholder::OtsuThresholdRectToPix for OpenCL
...
The ThresholdRectToPix OpenCL kernel only supports 4 channels.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-08-01 22:49:28 +02:00
zdenop
c044b8c916
Merge pull request #1818 from stweil/psm
...
Fix potential crash with --psm 0 and use osd.traineddata automatically
2018-08-01 16:56:56 +02:00
zdenop
d22ca6bb06
Merge pull request #1817 from noahmetzger/winfix
...
Fix issue detected by Coverity Scan
2018-08-01 16:55:56 +02:00
Stefan Weil
27ce472666
Fix potential crash with --psm 0 and use osd.traineddata automatically
...
Page segmentation mode "OSD only" requires osd.traineddata,
so use it automatically.
Report a warning if the user specified a different language.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-08-01 16:52:37 +02:00
Noah Metzger
65997bed16
Fix issue detected by Coverity Scan
...
CID: 1340285 (Division or modulo by zero)
Signed-off-by: Noah Metzger <noah.metzger@bib.uni-mannheim.de>
2018-08-01 15:56:19 +02:00