Monty. Frameworks. Models. Salience. Strategies. Vocus2. Pyramids. Pyramid
(ExTbpMonty.Core v0.1.0)
Copy Markdown
View Source
An image's scales, by octave and by blur.
Mirrors tbp/monty/frameworks/models/salience/strategies/vocus2/pyramids.py::Pyramid,
a two-dimensional array of images: one row per octave (each half the
resolution of the one above) and one column per scale (each more blurred than
the one before). VOCUS2 compares a scale against its neighbours to find
whatever is unlike its surroundings at that size, and a pyramid is how "that
size" becomes an index.
Monty stores the planes in a numpy object array; here an octave is a list of
planes and the pyramid is a list of octaves, so planes read
pyramid.planes |> Enum.at(octave) |> Enum.at(scale).
A pyramid with no planes is an error: nothing downstream can tell an empty pyramid from an image with nothing in it.
Summary
Functions
Two pyramids added plane by plane.
The same pyramid with function applied to every plane.
Every plane, octave by octave and scale by scale.
How many octaves the pyramid holds.
How many scales each octave holds.
A pyramid of octaves, each a list of scales planes of the same shape.
How many octaves and how many scales: {octaves, scales}.
How many planes the pyramid holds.
Two pyramids subtracted plane by plane.
Types
Functions
Two pyramids added plane by plane.
The same pyramid with function applied to every plane.
Every plane, octave by octave and scale by scale.
@spec n_octaves(t()) :: pos_integer()
How many octaves the pyramid holds.
@spec n_scales(t()) :: pos_integer()
How many scales each octave holds.
A pyramid of octaves, each a list of scales planes of the same shape.
@spec shape(t()) :: {pos_integer(), pos_integer()}
How many octaves and how many scales: {octaves, scales}.
@spec size(t()) :: pos_integer()
How many planes the pyramid holds.
Two pyramids subtracted plane by plane.