From e8453c02eb873272e84aeeee799924f902cb997f Mon Sep 17 00:00:00 2001 From: Plamen Dimitrov Date: Thu, 16 Mar 2023 14:16:19 +0200 Subject: [PATCH] Consider an alternative option of just retrieving words We could try this instead and compile lines post-detection but at present the Tesseract-based text detection interface is not as successful as we have hoped (and not easy to fine-tune either) so only continue development here in case of sufficient interest from users and contributors. --- guibot/finder.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/guibot/finder.py b/guibot/finder.py index 47b0c699..d15f46e8 100644 --- a/guibot/finder.py +++ b/guibot/finder.py @@ -2313,6 +2313,10 @@ def _detect_text_boxes(self, haystack): offset_x, offset_y, next_region = recursive_regions.pop() region_w, region_h = next_region.shape[1], next_region.shape[0] + # TODO: activate flag for word-only matching if there is enough interest for this + #output = self.tbox.image_to_boxes(next_region, self.params["tdetect"]["language"].value, + # config=self.tbox_config, output_type=self.tbox.Output.DICT) + # ...process dict output = self.tbox.run_and_get_output(next_region, 'box', self.params["tdetect"]["language"].value, config=self.tbox_config)