Monty.Frameworks.Models.Salience.Strategies.Vocus2.DepthSalience (ExTbpMonty.Core v0.1.0)

Copy Markdown View Source

How much a patch of surface stands out in depth.

Mirrors tbp/monty/frameworks/models/salience/strategies/vocus2/vocus2.py::DepthSalience. VOCUS2 is a colour attention model; this is the extension that makes it work on depth, and it is why a salience config can care about a shape rather than a colour.

Two details carry the meaning:

  • the depth is first replaced by its negative logarithm, so a depth difference is read as a ratio. On a log scale a step from 10 cm to 11 cm is as interesting as one from 1 m to 1.1 m, which is not true of raw depth and is what makes a distant object as findable as a near one;
  • a depth of zero means "nothing there", and its negative logarithm is minus infinity — Monty maps the infinities to zero. On a log-depth scale zero is above every real depth, so an empty pixel reads as the nearest patch in the view rather than as an absence. That is what the code does, it is reproduced here on purpose, and docs/monty-differences.md §1.14 records why it is probably not what was meant.

Only the brighter side of the difference is kept, because depth has no "dark side": a log-depth above its surround is a nearer patch, which is salient; a log-depth below is merely further away.

Summary

Functions

The depth salience map: where the surface is nearer than its surroundings.

Types

t()

@type t() :: %Monty.Frameworks.Models.Salience.Strategies.Vocus2.DepthSalience{
  center_sigma: float(),
  collapse:
    (Monty.Frameworks.Models.Salience.Strategies.Vocus2.Pyramids.Pyramid.t() ->
       [[float()]]),
  max_octaves: pos_integer() | nil,
  n_scales: pos_integer(),
  operating_limits:
    Monty.Frameworks.Models.Salience.Strategies.Vocus2.OperatingLimits.t(),
  surround_sigma: float()
}

Functions

new(options \\ [])

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

process(salience, ctx, image)

@spec process(t(), Monty.Context.t(), [[float()]]) :: [[float()]]

The depth salience map: where the surface is nearer than its surroundings.