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 <noreply@anthropic.com>
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user