From a19bca60608635f76eb7710aeec8369e40e6853d Mon Sep 17 00:00:00 2001 From: Benjamin Admin Date: Wed, 18 Mar 2026 08:00:35 +0100 Subject: [PATCH] fix: lower color sat_threshold from 70 to 50 for green text detection Green text words like "Insel" and "Internet" had median_sat=65, just below the threshold of 70, causing them to be classified as black. Black text has median_sat=6-7, so threshold=50 provides clear separation (6-7 vs 63-65) without false positives. Co-Authored-By: Claude Opus 4.6 --- klausur-service/backend/cv_color_detect.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/klausur-service/backend/cv_color_detect.py b/klausur-service/backend/cv_color_detect.py index bfcc5f0..0be00b2 100644 --- a/klausur-service/backend/cv_color_detect.py +++ b/klausur-service/backend/cv_color_detect.py @@ -81,7 +81,7 @@ def _hue_to_color_name(hue: float) -> str: def detect_word_colors( img_bgr: np.ndarray, word_boxes: List[Dict], - sat_threshold: int = 70, + sat_threshold: int = 50, min_sat_ratio: float = 0.25, ) -> None: """Annotate each word_box in-place with its detected text color.