runlength_smear — 2D morphology op

Data kinds: imageimage

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

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

runlength_smear: knob a sweep (docs site)

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

runlength_smear: knob b sweep (docs site)

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

runlength_smear: 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

> This operator's description has not been translated yet. The original text follows as it is.

走査長平滑化(RLSA)。行内の字の隙間を埋めて、字を「行」の塊にまとめる。

版面解析(どこが行で、どこが段か)の基本部品。`a` が埋める隙間の長さ

`3,5,9,15,25,41,65 画素(b の向きに沿った線)に振り、b` が向きと

合成を選ぶ: `b <= 0.5 は**水平のみ**、0.5 < b <= 0.75` は垂直のみ

`b > 0.75` は水平と垂直の小さい方(= 古典 RLSA の 2 パス AND 合成。

両方向で埋まった所だけが残るので、行だけでなく段組みの塊が出る)。

★**既存の `gclose と一部重なる**。gcloseb` で水平線の構造要素を

選べるので、水平 RLSA は原理的に書ける。ここが足すのは 2 つ ——

(1) 隙間が 3〜9 画素でなく 65 画素まで振れる(`_k` の上限では行がつながらない。

文字の間隔は 96 px の字なら 10〜30 画素ある)、(2) 2 方向の AND 合成

単一の構造要素による閉じでは書けない。片方だけなら `gclose` を使うほうが速い。

濃淡画像にそのまま掛かる(内部で二値化しない)。灰色の閉じ演算なので、

暗い隙間を埋める方向に働く —— 字が明るく背景が暗い画像で使うこと。

逆なら先に `invert を通す。端の扱いは scipy.ndimage の既定の reflect`。

空フレーム(定数画像)はそのまま返る(埋めるべき隙間が無い)。値域は入力のまま

[0,1] に収まり、画像ごとの正規化はしない(値は画像間で比較できる)。

Detailed usage guide

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

runlength_smear 0.35 0.50

▸ Load this pipeline  ·  Load & run

Runnable examples (verified samples that actually call this op)

gallery2d_morphologypy -3.11 examples/gallery2d_morphology.py

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

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

Same category (morphology)

gerode · gdilate · gopen · gclose · tophat · bothat · morph_grad · persistence_map


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