refocus op• Data kinds: lightfield → images
• Call: import lightfield; lightfield.lf_focal_stack(lf, slopes=(-2.0, -1.0, 0.0, 1.0, 2.0), *, interp='linear', edge='nearest') (or opslightfield.get("lf_focal_stack"))
Refocus at every slope in *slopes* — a focal stack from one exposure.
Returns a `list of (H, W) images (the images` type), in the order
given, so :mod:focus_stack's fusion and any multi-image operator applies
unchanged. The physical camera equivalent is racking the focus N times; here
it costs one exposure and `len(slopes) * V * U` image shifts.
Raises `ValueError`: *lf* not a valid light field, *slopes* empty or
longer than :data:MAX_STACK_SLICES, any slope non-finite or over
:data:MAX_ABS_SLOPE, a stack larger than :data:MAX_STACK_ELEMENTS,
unknown *interp* / *edge*.
• lightfield_depth 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.
• lightfield_depth — py -3.11 examples/lightfield_depth.py
images as input)—
refocus)lf_refocus · lf_aperture_mask · lf_synthetic_aperture
*Provenance: lightfield.py — LIGHTFIELD 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.