smoothing op• Data kinds: image → image
• Call: fullseye.apply(img, "kuwahara", 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):
▸ kuwahara: knob a sweep (docs site)
*Knob b does not change the output (measured: identical at 0.1 / 0.5 / 0.9).*
On other images (synthetic scene / photo / coins. Top row: inputs, bottom row: their outputs. Knobs at default):
▸ kuwahara: 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).*
Kuwahara filter (1976): edge-preserving smoothing that outputs the mean of whichever of four overlapping windows has the smallest variance.
> The detailed description below is the original text — the summary and the headings are translated.
油絵調の見た目にも使われる。
各画素について、その画素を角に含む (r+1) x (r+1) の窓を 4 つ(左上・右上・左下・右下。隣り合う窓は中心の行と列を共有して重なる)とり、分散がいちばん小さい窓の平均を出力する。縁をまたぐ窓は分散が大きいので選ばれず、画素は縁の「自分と同じ側」の窓の平均になる。だから平坦部は均され、段差は鈍らない(gaussian は段差をなだらかにしてしまう)。
a が窓の半径 r = 1 + floor(9a + 0.5)(1〜10、窓の一辺は r+1)を振る。大きいほど均す範囲が広がり、細い構造は消える。b は未使用。
計算量は O(N): 窓の和と二乗和を軸ごとの累積和で求めるので、半径に依存しない(分散は E[x^2] - E[x]^2、全体の平均を引いてから計算して桁落ちを抑える)。分散の同点は、小数 10 桁に丸めた値で比べ、宣言順(左上・右上・左下・右下)で決める。
端の扱い: 端の画素を複製する(最近傍)。端の画素の窓は、画像の外を端の値で埋めて作る。
適用条件: (1) 4 象限の方向は軸に揃っているので、斜めの縁では選ばれた窓が縁に沿わず、角の丸まりや「ブロック状」の模様が出る(一般化 Kuwahara はこれを直す)。
(2) 半径が大きいと細い線は消える。(3) 出力は入力の局所平均だけから作るので、値域は
入力の外に出ない。
• gallery2d_smoothing_rank 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.
kuwahara 0.35 0.50
▸ Load this pipeline · Load & run
• gallery2d_smoothing_rank — py -3.11 examples/gallery2d_smoothing_rank.py
image as input)identity · gaussian · mean_box · bilateral · unsharp · median · min_filter · max_filter
smoothing)gaussian · mean_box · bilateral · unsharp · sk_tv · sk_wavelet · sk_rolling_ball · sk_nlm
*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.