Remove dead colour-model/despill code; simplify despill; refresh stale docs
- chroma: drop BackgroundModel.hsv_center/hue_sigma (unused since the green gating went away), their estimation, _hue_distance, and the now-unused hsv channel from convert_color_spaces (one fewer cvtColor per image). - despill: delete the dead green-channel-algebra path (the pipeline always passes a colour) and fold the remaining Lab-direction despill into a single despill() with no screen_color arg (127 -> 60 lines). Renamed despill_green -> despill. - settings: remove the now-dead ChromaSettings.hue_sigma_min and DespillSettings.green_excess_margin (plus the matching config lines). - docs/comments: generalise stale "green" wording to "background colour" (module docstring, alpha_post/trimap/foreground/settings) and rename the trimap variable green_bg -> screen_bg. Kept: the unmix foreground fallback, --matting-method chroma, and green/blue as illustrative examples. Verified: package compiles, both configs parse, and an auto-detect end-to-end run is unchanged. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -55,7 +55,6 @@ despill:
|
||||
enabled: true
|
||||
edge_low: 0.005
|
||||
strength: 0.92
|
||||
green_excess_margin: 0.015
|
||||
edge_expand_radius: 2
|
||||
alpha_weight_floor: 0.35
|
||||
color_margin_lab: 4.0
|
||||
|
||||
@@ -62,7 +62,6 @@ despill:
|
||||
enabled: true
|
||||
edge_low: 0.005
|
||||
strength: 0.92
|
||||
green_excess_margin: 0.015
|
||||
edge_expand_radius: 2
|
||||
alpha_weight_floor: 0.35
|
||||
color_margin_lab: 4.0 # custom-screen despill: Lab chroma margin (screen_color set)
|
||||
color_margin_lab: 4.0 # Lab chroma margin along the background-colour direction
|
||||
|
||||
Reference in New Issue
Block a user