lf_aperture_mask — LIGHTFIELD refocus op

• 資料種類:無 → image2d(僅由參數決定的運算子 —— 不接受影像或資料輸入)

• 呼叫: import fullseye as fs; fs.ledger.lf_aperture_mask(angular=(5, 5), shape='circle', *, radius=None, inner=0.0, sigma=None, normalize=True)(要直接呼叫實作,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 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 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 族使用指南

參考(範例資料、文獻)

• 範例資料目錄(下載 URL / 授權) —— 2-D 用 skimage.data(BSD/公有領域)加合成圖,3-D 給出真實資料源(Stanford/PDS 等)的下載 URL。

• 運算子來歷與參考文獻 —— 該運算子族所依據的研究/方法出處。

• 演算法的正典(作者、年份)與用途見上面的族使用指南。

可執行的範例(實際呼叫該運算子並已驗證的樣例)

• lightfield_depth — py -3.11 examples/lightfield_depth.py

• poc_compound_eye — py -3.11 examples/poc_compound_eye.py

型別可銜接的下一個運算子(可接受 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 運算子登記表。本條目由 tools/opdocs.py md 自動產生(請勿手動編輯)。*

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