refocus op• 数据种类:无 → image2d(仅由参数决定的算子 —— 不接受图像或数据输入)
• 调用: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.
• 示例数据目录(下载 URL / 许可证) —— 2-D 用 skimage.data(BSD/公有领域)加合成图,3-D 给出真实数据源(Stanford/PDS 等)的下载 URL。
• 算子来历与参考文献 —— 该算子族所依据的研究/方法出处。
• 算法的正典(作者・年份)与用途见上面的族使用指南。
• lightfield_depth — py -3.11 examples/lightfield_depth.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.