|
| static RegularGridAdjacency2D | requireProjectionAdjacency (const MorphologicalTree &tree, const char *context="HierarchySaliencyMap::requireProjectionAdjacency") |
| | Returns the unambiguous adjacency stored by a hierarchy.
|
| |
| static std::vector< int > | computeTopologicalLevels (const MorphologicalTree &tree) |
| | Computes a dense topological level buffer indexed by internal NodeId.
|
| |
| static std::vector< int > | computePartitionAppearanceLevels (const MorphologicalTree &tree) |
| | Computes partition-appearance indexes for the proper-part completion.
|
| |
| template<class NodeValue > |
| static auto | computeEdgeMap (const MorphologicalTree &tree, const RegularGridAdjacency2D &adjacency, NodeValue &&nodeValue) -> EdgeSaliencyMap< std::decay_t< std::invoke_result_t< NodeValue, NodeId > > > |
| | Computes an edge saliency map using an explicit adjacency relation.
|
| |
| template<class Value > |
| static EdgeSaliencyMap< Value > | computeSaliencyEdgeMap (const MorphologicalTree &tree, const RegularGridAdjacency2D &adjacency, std::span< const Value > valuation, HierarchyValuationPolicy policy=HierarchyValuationPolicy::AllowLevelCollapse, HierarchyLevelConvention levelConvention=HierarchyLevelConvention::EdgeSaliencyValue, HierarchyConnectivityPolicy connectivityPolicy=HierarchyConnectivityPolicy::ValidateConnected) |
| | Computes the formal edge-indexed saliency map induced by a valuation.
|
| |
| template<class Value > |
| static EdgeSaliencyMap< Value > | computeSaliencyEdgeMap (const MorphologicalTree &tree, std::span< const Value > valuation, HierarchyValuationPolicy policy=HierarchyValuationPolicy::AllowLevelCollapse, HierarchyLevelConvention levelConvention=HierarchyLevelConvention::EdgeSaliencyValue, HierarchyConnectivityPolicy connectivityPolicy=HierarchyConnectivityPolicy::ValidateConnected) |
| | Computes a formal saliency map using one unambiguous stored graph.
|
| |
| template<class Value > |
| static EdgeSaliencyMap< int > | computeCanonicalRankedSaliencyEdgeMap (const MorphologicalTree &tree, const RegularGridAdjacency2D &adjacency, std::span< const Value > valuation, HierarchyValuationPolicy policy=HierarchyValuationPolicy::AllowLevelCollapse, HierarchyConnectivityPolicy connectivityPolicy=HierarchyConnectivityPolicy::ValidateConnected) |
| | Computes the canonical dense integer saliency scale of a valuation.
|
| |
| template<class Value > |
| static EdgeSaliencyMap< int > | computeCanonicalRankedSaliencyEdgeMap (const MorphologicalTree &tree, std::span< const Value > valuation, HierarchyValuationPolicy policy=HierarchyValuationPolicy::AllowLevelCollapse, HierarchyConnectivityPolicy connectivityPolicy=HierarchyConnectivityPolicy::ValidateConnected) |
| | Stored-adjacency overload of computeCanonicalRankedSaliencyEdgeMap.
|
| |
| template<class Value > |
| static EdgeSaliencyMap< int > | rankEdgeSaliencyMap (const EdgeSaliencyMap< Value > &edgeMap) |
| | Densely ranks the values already present in an edge saliency map.
|
| |
| template<class NodeValue > |
| static auto | computeEdgeMap (const MorphologicalTree &tree, NodeValue &&nodeValue) -> EdgeSaliencyMap< std::decay_t< std::invoke_result_t< NodeValue, NodeId > > > |
| | Computes an edge saliency map using one unambiguous stored graph.
|
| |
| static EdgeSaliencyMap< int > | computeTopologicalLevelEdgeMap (const MorphologicalTree &tree, const RegularGridAdjacency2D &adjacency) |
| | Computes a topological-level edge saliency map with explicit adjacency.
|
| |
| static EdgeSaliencyMap< int > | computeTopologicalLevelEdgeMap (const MorphologicalTree &tree) |
| | Computes a topological-level map using one unambiguous stored graph.
|
| |
| template<AltitudeValue T> |
| static EdgeSaliencyMap< double > | computeNormalizedAltitudeEdgeMap (const ValuedMorphologicalTree< T > &tree, const RegularGridAdjacency2D &adjacency) |
| | Computes a normalized-altitude edge saliency map with explicit adjacency.
|
| |
| template<AltitudeValue T> |
| static EdgeSaliencyMap< double > | computeNormalizedAltitudeEdgeMap (const ValuedMorphologicalTree< T > &tree) |
| | Computes a normalized-altitude map using one unambiguous stored graph.
|
| |
Projects a morphological tree hierarchy onto an image adjacency graph.
The generic computeEdgeMap primitive finds the smallest nodes of each graph edge endpoint, takes their lowest common ancestor in the hierarchy, and writes nodeValue(lca) as the edge value. The formal computeSaliencyEdgeMap path additionally assigns the base value 0 to edges whose endpoints already belong to the same finest region represented by the tree. With a connected complete hierarchy and a compatible valuation, this is the Phi(H) saliency-map representation from Cousty et al., "Hierarchical segmentations with graphs: quasi-flat zones, minimum spanning
trees, and saliency maps". This class implements that edge-indexed hierarchy projection only; it does not build the full Psi(w) = Phi(QFZ(G, w)) pipeline from an arbitrary edge-valuedTree graph, nor the paper's MST characterization.
- Primary reference
- Jean Cousty, Laurent Najman, Yukiko Kenmochi, and Silvio GuimarĂ£es, "Hierarchical segmentations with graphs: quasi-flat zones, minimum spanning
trees, and saliency maps," Journal of Mathematical Imaging and Vision, 60(4):479-502, 2018. DOI 10.1007/s10851-017-0768-7. The direct projection corresponds to Section 4, Equations (5)-(6), and Section 7, Algorithm 1.
Definition at line 101 of file HierarchySaliencyMap.hpp.
| static EdgeSaliencyMap< Value > mmcfilters::HierarchySaliencyMap::computeSaliencyEdgeMap |
( |
const MorphologicalTree & |
tree, |
|
|
const RegularGridAdjacency2D & |
adjacency, |
|
|
std::span< const Value > |
valuation, |
|
|
HierarchyValuationPolicy |
policy = HierarchyValuationPolicy::AllowLevelCollapse, |
|
|
HierarchyLevelConvention |
levelConvention = HierarchyLevelConvention::EdgeSaliencyValue, |
|
|
HierarchyConnectivityPolicy |
connectivityPolicy = HierarchyConnectivityPolicy::ValidateConnected |
|
) |
| |
|
inlinestatic |
Computes the formal edge-indexed saliency map induced by a valuation.
This is the API that matches the saliency map Phi(H) defined in Cousty et al., "Hierarchical segmentations with graphs: quasi-flat zones, minimum
spanning trees, and saliency maps": the result is a function on graph edges, not a raster contour image. The input valuation is validated before projection so arbitrary node valuations cannot be mislabeled as a quasi-flat-zone saliency map. The caller provides H through the tree topology; this method does not construct QFZ(G, w) from an arbitrary edge-valuedTree graph.
Formal saliency valuations must be non-negative because edges internal to the finest represented regions use the fixed base level 0. Use HierarchySaliencyMapValidation::rankHierarchyValuation or computeNormalizedScores before projection when the original compatible valuation contains negative values.
For every adjacency edge (p, q), the returned value is the base level 0 when both endpoints already belong to the same finest region exposed by the tree. Otherwise, under EdgeSaliencyValue the returned value is:
valuation(LCA(smallestNode(p), smallestNode(q)))
Under PartitionAppearanceLevel, the returned transition value is instead valuation(LCA(...)) - 1, following Algorithm 1 of Cousty et al. In that convention, live-node values must be positive integer partition indexes. Here smallestNode maps a pixel to its smallest hierarchy node. This keeps the saliency map defined on the full graph edge set while respecting the paper's cut-based definition: edges internal to a finest region are not contour transitions at any positive hierarchy level.
- Parameters
-
| tree | Tree topology. |
| adjacency | Adjacency relation. |
| valuation | Node valuation. |
| policy | Policy controlling the operation. |
| levelConvention | Interpretation of live-node valuation levels. |
| connectivityPolicy | Whether to validate connected hierarchy supports. |
- Returns
- The computed formal edge-indexed saliency map induced by a valuation.
Definition at line 331 of file HierarchySaliencyMap.hpp.