edge_transition_width — 2D edges op

• Data kinds: image → image

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

edge_transition_width: input → output

*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):

▸ edge_transition_width: knob a sweep (docs site)

Sweeping knob b (0.1 / 0.5 / 0.9, the other knob at its default):

▸ edge_transition_width: knob b sweep (docs site)

On other images (synthetic scene / photo / coins. Top row: inputs, bottom row: their outputs. Knobs at default):

▸ edge_transition_width: 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).*

Usage

Measures the edge transition width (= the spread of the effective PSF at that location) in pixels.

a sweeps the side length of the measurement window over 3,5,7,9 (_k(a)). b selects the estimator for amplitude and

gradient: b <= 0.5 uses the in-window max − min (simple and sharp but weak against outliers), b > 0.5 uses quantiles, and the higher b, the more the quantiles move from 90/10 towards 60/40, becoming duller to noise (and steps get rounded correspondingly = it is a trade-off).

Width ≒ local amplitude ÷ local maximum gradient. If a step rises within 1 pixel the width is around 1; if it is blurred and rises over 5 pixels, around 5. It is the counterpart of simulate_defocus, which creates blur; this op is the side that measures it. Usable for focus judgement, amount of motion blur, resolution limit and judging whether text is large enough to read.

If the window is narrower than the transition, the width is underestimated (because the full amplitude does not fit in the window). The practical rule: if the output exceeds 0.7, raise a and measure again.

Normalisation is not per image (it only divides by the constant window side), so values can be compared across images. An output of 1.0 means "the transition width equals the window = it may be wider than the window and was not fully measured", and is the signal to raise a and measure again. Flat areas and places without edges give 0.

★Returns all 0 on an empty frame ("no edge"). If the floor is set only as a quantity relative to the image's own amplitude, then on a uniform image even the reference turns into rounding dust and the ratio of dust to dust turns into structure ——

measured: an image that was just a flat 0.5 with 1e-12 noise added returned a width of 3.49 (= half the window). We state flatly that an image whose amplitude itself does not reach the absolute floor 1e-6 has no edge. Border handling is the scipy.ndimage default reflect. There is no internal step that drops to 8 bit.

Detailed usage guide

• gallery2d_edges family guide

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.

Try it in Studio

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.

edge_transition_width 0.40 0.50

▸ Load this pipeline  ·  Load & run

Runnable examples (verified samples that actually call this op)

• gallery2d_edges — py -3.11 examples/gallery2d_edges.py

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

identity · gaussian · mean_box · bilateral · unsharp · median · min_filter · max_filter

Same category (edges)

sobel_mag · prewitt_mag · roberts_mag · dog · grad_dir · log · corner_response · sk_scharr


*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.