morphology op• Data kinds: image → image
• Call: fullseye.apply(img, "persistence_map", a=0.5, b=0.5) (the 2-D model is one image plus two scalar knobs a,b∈[0,1])

*The figure is the actual output on a synthetic 128×128 input. Left: input, right: output. Point clouds are drawn as a top-down scatter (brightness = z), 1-D series as a line plot, volumes as the maximum-intensity projection along z, videos as the middle frame, complex images as magnitude; return values that are not pictures are shown as the values themselves.*
Sweeping knob a (0.1 / 0.5 / 0.9, the other knob at its default):
▸ persistence_map: knob a sweep (docs site)
Sweeping knob b (0.1 / 0.5 / 0.9, the other knob at its default):
▸ persistence_map: knob b sweep (docs site)
On other images (synthetic scene / photo / coins. Top row: inputs, bottom row: their outputs. Knobs at default):
▸ persistence_map: other inputs (docs site)
*The 4th column is a colour (H,W,3) input. This op handles colour without crossing channels (it does not convolve the colour channel as a third spatial axis).*
Measures the "prominence of peaks" without choosing a threshold (0-dimensional persistence).
Picking a single threshold narrows the range of applicability —— this contradiction is resolved by "trying every threshold and keeping only what does not change". Lower the water level from the top; the difference between the height at which a new peak appears (birth) and the height at which that peak is swallowed by a higher one (death) is taken as that peak's persistence (how much it stands out). It is exactly what topography calls "prominence".
The output is a map holding at each pixel "the persistence of the peak that pixel belongs to". a is the lower limit to keep (peaks below it are set to 0), b the connectivity (below 0.5 a 4-neighbourhood, otherwise an 8-neighbourhood).
h_maxima / MSER compared: xsk2_h_maxima picks one h and returns "the peaks at least that high" —— that is, it picks one threshold. This op folds the answers for every h into a single image, so you can cut at any level you like afterwards. MSER looks for "regions whose area is stable", a similar idea, but it is about region shape whereas this op is about height.
Applicability: (1) The highest peak of the whole image never dies, so max - min is taken as its persistence (by convention). Hence the background holds the global maximum value (1.0) —— the background is processed last, when all components have already merged, so topologically it does belong to the global component. It is a map for reading peak heights, not a map that sets the background to 0. To drop the background, multiply by a threshold op or raise the lower limit with a (measured: with a=0.45 only the peak of height 0.3 vanishes, while 1.0 and 0.6 remain). (2) A flat plateau (a run of equal values) is treated as one peak. (3) The computation is a union-find that scans pixels in descending order, so on large images it is slower than h_maxima.
• gallery2d_morphology family guide
• 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.
The program below has been verified to run (same input as the figure). In Studio's help this block becomes buttons that load and run it on the spot.
persistence_map 0.35 0.50
▸ Load this pipeline · Load & run
• gallery2d_morphology — py -3.11 examples/gallery2d_morphology.py
image as input)identity · gaussian · mean_box · bilateral · unsharp · median · min_filter · max_filter
morphology)gerode · gdilate · gopen · gclose · runlength_smear · tophat · bothat · morph_grad
*Provenance: ops.py — 2D 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.