diff options
| author | Akshay Nair <phenax5@gmail.com> | 2024-12-25 14:25:09 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2024-12-25 14:25:09 +0530 |
| commit | 4e74eeebbaa441cda3a6846c47d82516878f8f05 (patch) | |
| tree | 7a67bfd8cfbef2092931fd4d12a8ce69b3b3d2d4 /include | |
| parent | 82d612b7c37b432bc4abd8e158d6fe076d391ddc (diff) | |
| download | chelleport-4e74eeebbaa441cda3a6846c47d82516878f8f05.tar.gz chelleport-4e74eeebbaa441cda3a6846c47d82516878f8f05.zip | |
Add searching indication text for search mode + a lot of refactoring
Diffstat (limited to '')
| -rw-r--r-- | include/libchelleport.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/libchelleport.h b/include/libchelleport.h index adb9f5d..ef693cb 100644 --- a/include/libchelleport.h +++ b/include/libchelleport.h @@ -1,3 +1,6 @@ +#include <tesseract/publictypes.h> +#include <vector> + // NOTE: Remember to update size and alignment in ocr hs module on change struct OCRMatch { int startX, startY; @@ -5,6 +8,15 @@ struct OCRMatch { const char *text; }; +#define CONFIDENCE_THRESHOLD 25. +#define MIN_CHARACTER_COUNT 2 + +const tesseract::PageIteratorLevel RESULT_ITER_MODE = tesseract::RIL_WORD; + extern "C" { OCRMatch *findWordCoordinates(const char *image_path, /* returns */ int *size); } + +std::vector<OCRMatch> extractTextCoordinates(const char *imagePath); + +void showMatch(const OCRMatch &match); |
