Monty. Frameworks. Models. Salience. Strategies. Vocus2. ColorChannelSalience
(ExTbpMonty.Core v0.1.0)
Copy Markdown
View Source
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.
Summary
Functions
The salience of one colour channel, and the centre pyramid it came from.
Types
@type t() :: %Monty.Frameworks.Models.Salience.Strategies.Vocus2.ColorChannelSalience{ center_sigma: float(), collapse: (Monty.Frameworks.Models.Salience.Strategies.Vocus2.Pyramids.Pyramid.t() -> [[float()]]), combine: ([ Monty.Frameworks.Models.Salience.Strategies.Vocus2.Pyramids.Pyramid.t() ] -> 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() }
Functions
@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.