Window Treatment Processor

Overview

The Window Treatment processor cleans up and stylizes automotive windows by masking out unwanted artifacts (reflections, people, stickers) and applying visual effects (tint, blur, gradient, saturation, brightness-tint). If no explicit mask is provided, it falls back to the image’s alpha channel.


Example Usage

- processor:
    processor: "window_treatment"
    inputs:
      source: "mem/source.png" # original RGBA image
      mask: "mem/mask_windows.png" # optional window-region mask (grayscale/RGBA)
    params:
      color1: "#00000080" # primary hue + alpha defines tint strength
      color2: "#00115480" # optional secondary hue for vertical gradient
      saturation: "0.5" # color saturation (0=grayscale, 1=full color)
      blur: 5 # Gaussian blur radius (pixels) inside mask
      fill: "True" # fill small holes in mask shapes
      feather: 1 # mask-edge feather radius (pixels)
      tint: "0.8" # brightness tint ratio (0=flat to darkest, 1=no change)
    outputs:
      target: "mem/treated.png" # final composited result

Parameters

Key Type Req’d Default Description
color1 str No "#00000080" Primary tint hue; its alpha channel defines blend strength.
color2 str No Secondary tint hue; used for a top→bottom gradient if provided.
saturation float No 1.0 Masked-area color saturation (0=gray, 1=unchanged).
tint float No 1.0 Brightness-tint ratio (0=flatten all to darkest mask pixel, 1=none).
fill bool No false Fill small holes in the mask before processing.
feather int No 0 Feather (blur) mask edge by this many pixels.
blur int No 0 Gaussian blur radius (pixels) applied inside the masked region.