alpha_tree — SEGMENTATION graph op

• Data kinds: image2d → table

• Call: import fullseye as fs; fs.ledger.alpha_tree(image, alphas: 'Sequence[float]' = (0.0,), *, connectivity: 'int' = 4) -> 'Dict[str, object]' (to call the implementation directly, import seggraph; seggraph.alpha_tree(image, alphas: 'Sequence[float]' = (0.0,), *, connectivity: 'int' = 4) -> 'Dict[str, object]'; from the registry, opssegmentation.get("alpha_tree"))

Usage

α-tree: builds the minimum spanning tree of the grid weighted by neighbour differences (Kruskal in scipy) and returns the partition for each α using only the tree edges of weight ≤ α (alpha_tree).

scipy reads edges of weight 0 as "no edge", so only edges of weight 0 are replaced by "half the smallest positive weight" before building the tree (the edge order does not change = the minimum spanning tree is the same). Adding 1 to all edges is not used: when a difference of 0.3 is split in floating point into 0.29999999999999993 and 0.30000000000000004, rounding after +1 made the 2 equal, the tree picked the heavier one and the cut at α = 0.3 shifted (measured, test test_quasi_flat_zones_equal_mst_cut). The tree's edge weights are recomputed as |f_p − f_q| from the indices.

Returns: labels ((A, H, W) stacking the (H, W) for each α), n_zones, mst_i / mst_j / mst_w, merge_levels (tree edge weights in ascending order = merge heights), nested (whether nested in ascending order of α).

Detailed usage guide

• halcon_segmentation family guide

Background guides (the physics and conventions behind this op)

• graph_hierarchy_and_thresholds — Segmentation from graph, hierarchy and threshold theorems — what is exact, and where the partition breaks down

References (sample data, literature)

• Sample-data catalog (download URLs / licences) — 2-D uses skimage.data (BSD/public domain) plus synthetic images; 3-D lists download URLs for real data sources (Stanford, PDS, …).

• Operator provenance and references — the sources of the research/methods this op family came from.

• The canonical algorithm (author, year) and its uses are named in the family usage guide above.

Runnable examples (verified samples that actually call this op)

• poc_graph_hierarchy_segmentation — py -3.11 examples/poc_graph_hierarchy_segmentation.py

Ops the type connects to (they accept table as input)

class_ndim_norm

Same category (graph)

graph_cut_binary · alpha_expansion · statistical_region_merging · max_tree · area_opening_attr · quasi_flat_zones · hierarchical_watershed · ultrametric_contour_map


*Provenance: seggraph.py — SEGMENTATION operator registry. This per-op note is generated by tools/opdocs.py md (do not hand-edit).*

© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.