lf_aperture_mask — LIGHTFIELD refocus op

データ種: なしimage2d(引数だけで決まる op —— 画像やデータの入力を取らない)

呼び出し: import lightfield; lightfield.lf_aperture_mask(angular=(5, 5), shape='circle', *, radius=None, inner=0.0, sigma=None, normalize=True) (または opslightfield.get("lf_aperture_mask"))

使い方

角度方向の重みマスク —— 絞る/形を変える合成開口そのもの。

> 以下の詳細説明は原文のままです —— 要約と見出しは訳出済み。

Returns a `(V, U)` 2-D array of per-view weights, indexed the same way as

the light field's angular axes, for :func:lf_synthetic_aperture. The

radius is measured in angular steps from the centre ``((V-1)/2,

(U-1)/2)`, so radius=0` selects the single centre view (an infinitely

small aperture: everything in focus, no light) and the default

`radius = max(V-1, U-1)/2` is the largest circle that fits.

• `circle` — hard-edged disc, the physical iris.

• `square` — Chebyshev disc; separable, the cheapest to reason about.

• `gaussian — apodised pupil (sigma` in angular steps, default

`radius/2`); no ringing in the defocus PSF.

• `annulus` — ring between *inner* and *radius*; a coded aperture whose

defocus PSF has more high-frequency content, which is what makes

depth-from-defocus work better.

With `normalize=True` (default) the weights sum to exactly 1, so a masked

reduction is a weighted mean and its result is directly comparable with

:func:lf_refocus. Set it to `False` to keep 0/1 selection weights.

Raises `ValueError: an angular shape outside [1, MAX_ANGULAR]`, a

negative *radius* / *inner* / *sigma*, `inner >= radius`, an unknown

*shape*, and — explicitly rather than returning a field of zeros — a mask

that selects no view at all (an opaque aperture), which would make every

downstream weighted mean a 0/0.

詳しい使い方ガイド

lightfield_depth ファミリ ガイド

参考(サンプルデータ・文献)

• サンプルデータ カタログ(DL URL / ライセンス) — 2-D は skimage.data(BSD/public)+ 合成、3-D は実データ源(Stanford/PDS 等)の DL URL。

• 演算子の来歴・参考文献 — この op 族の元になった研究/手法の出典。

• アルゴリズムの正典(著者・年)と用途は上記ファミリ使い方ガイドに記載。

実行できる例(この op を実際に呼ぶ検証済みサンプル)

lightfield_depthpy -3.11 examples/lightfield_depth.py

型が繋がる次の op(image2d を入力に取れる)

lf_from_mla · lf_disparity_to_depth · lf_all_in_focus

同カテゴリ(refocus)

lf_refocus · lf_focal_stack · lf_synthetic_aperture


*Provenance: lightfield.py — LIGHTFIELD operator registry. この per-op ノートは tools/opdocs.py md が自動生成(手編集しない)。*

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