diff options
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); |
