From 4e74eeebbaa441cda3a6846c47d82516878f8f05 Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Wed, 25 Dec 2024 14:25:09 +0530 Subject: Add searching indication text for search mode + a lot of refactoring --- include/libchelleport.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'include/libchelleport.h') 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 +#include + // 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 extractTextCoordinates(const char *imagePath); + +void showMatch(const OCRMatch &match); -- cgit v1.3.1