From 64447ad3526e0a440469aaa5841faa7557a7859f Mon Sep 17 00:00:00 2001 From: Benjamin Admin Date: Wed, 18 Mar 2026 09:13:09 +0100 Subject: [PATCH] Raise color sat_threshold from 50 to 55 to avoid scanner blue artifacts Black text has median_sat ~6-7, green text ~63-65. At threshold 50, scanner blue tints (median_sat ~50-54) on words like "Wasser" were falsely classified as blue. Threshold 55 has good margin on both sides. 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 0be00b2..c87a771 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 = 50, + sat_threshold: int = 55, min_sat_ratio: float = 0.25, ) -> None: """Annotate each word_box in-place with its detected text color.