# `Monty.Frameworks.Models.Salience.Strategies.Vocus2.ColorChannelSalience`
[🔗](https://github.com/d-led/ex.tbp.monty/blob/v0.1.0/packages/ex_tbp_monty_core/lib/monty/frameworks/models/salience/strategies/vocus2/color_channel_salience.ex#L1)

How much one colour channel stands out from its own surroundings.

Mirrors
`tbp/monty/frameworks/models/salience/strategies/vocus2/vocus2.py::ColorChannelSalience`.

The whole idea in three steps: blur the channel a little (centre) and a lot
(surround); subtract, so only what the wide blur could not explain is left;
and keep the two sides of that difference as separate pyramids — `on`, where
the centre is brighter, and `off`, where it is darker — before combining them.
Splitting the two matters because a dark patch on a bright background and a
bright patch on a dark one are both salient, and a plain difference would let
them cancel each other in the combination.

Returns the feature map and the centre pyramid, because the orientation channel
is computed from the lightness pyramid rather than from the map.

# `t`

```elixir
@type t() :: %Monty.Frameworks.Models.Salience.Strategies.Vocus2.ColorChannelSalience{
  center_sigma: float(),
  collapse:
    (Monty.Frameworks.Models.Salience.Strategies.Vocus2.Pyramids.Pyramid.t() -&gt;
       [[float()]]),
  combine: ([
              Monty.Frameworks.Models.Salience.Strategies.Vocus2.Pyramids.Pyramid.t()
            ] -&gt;
              Monty.Frameworks.Models.Salience.Strategies.Vocus2.Pyramids.Pyramid.t()),
  max_octaves: pos_integer() | nil,
  n_scales: pos_integer(),
  operating_limits:
    Monty.Frameworks.Models.Salience.Strategies.Vocus2.OperatingLimits.t(),
  surround_sigma: float()
}
```

# `new`

```elixir
@spec new(keyword()) :: t()
```

# `process`

```elixir
@spec process(t(), Monty.Context.t(), [[float()]]) ::
  {[[float()]],
   Monty.Frameworks.Models.Salience.Strategies.Vocus2.Pyramids.Pyramid.t()}
```

The salience of one colour channel, and the centre pyramid it came from.

The image must be a single channel in `[0, 1]`. A config outside the operating
limits either raises or, when the run suppresses runtime errors, is used
anyway with a warning — which is Monty's behaviour, and is how a large image
can be tried with sigmas nobody has validated.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
