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 <noreply@anthropic.com>
This commit is contained in:
Benjamin Admin
2026-03-18 08:00:35 +01:00
parent 7a76697f95
commit a19bca6060

View File

@@ -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.