From c129b1df11ada17f5bcc7f6c4ae92df15b6868fd Mon Sep 17 00:00:00 2001 From: AuroraWright Date: Sat, 25 Oct 2025 12:00:09 +0200 Subject: [PATCH] Make vertical furigana check stricter --- owocr/run.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/owocr/run.py b/owocr/run.py index 98e9c62..ca971e3 100644 --- a/owocr/run.py +++ b/owocr/run.py @@ -668,7 +668,7 @@ class TextFiltering: logger.opt(colors=True).debug(f"Furigana check against line: '{other_line_text}'") if is_vertical: - width_threshold = other_line_bbox.width * 0.85 + width_threshold = other_line_bbox.width * 0.7 is_smaller = current_line_bbox.width < width_threshold logger.opt(colors=True).debug(f"Vertical furigana check width: '{other_line_bbox.width}' '{current_line_bbox.width}'") else: @@ -685,7 +685,7 @@ class TextFiltering: continue if is_vertical: - horizontal_threshold = current_line_bbox.width + other_line_bbox.width + horizontal_threshold = (current_line_bbox.width + other_line_bbox.width) * 0.7 horizontal_distance = current_line_bbox.center_x - other_line_bbox.center_x vertical_overlap = self._check_vertical_overlap(current_line_bbox, other_line_bbox)