lf_synthesize — LIGHTFIELD synthesis op

• Data kinds: कोई नहीं → lightfield (केवल arguments से तय होने वाला op — यह कोई image या data input नहीं लेता)

• Call: import fullseye as fs; fs.ledger.lf_synthesize(slopes=(0.0,), angular=(5, 5), shape=(64, 64), *, occlusion=True, coverage=0.55, texture_sigma=2.0, interp='linear', edge='wrap', seed=0) (implementation को सीधे call करना हो तो import lightfield; lightfield.lf_synthesize(slopes=(0.0,), angular=(5, 5), shape=(64, 64), *, occlusion=True, coverage=0.55, texture_sigma=2.0, interp='linear', edge='wrap', seed=0), registry से लेना हो तो opslightfield.get("lf_synthesize"))

• Ledger के ज़रिए return value: fullseye.ledger.lf_synthesize(...) केवल घोषित out type lightfield का value लौटाता है (मूल function सहायक जानकारी भी लौटाता है)। जो हिस्सा छोड़ दिया गया है उसकी ज़रूरत हो तो fullseye.ledger.lf_synthesize.raw(...) का उपयोग करें, या lightfield.lf_synthesize को सीधे call करें।

उपयोग

ज्ञात slopes पर textured layers का light field बनाता है (test bed)।

> नीचे का विस्तृत विवरण मूल text में है — सारांश और headings का अनुवाद हो चुका है।

Each entry of *slopes* is one fronto-parallel layer, given as its slope s = dx/du in pixels of image shift per angular step; the layer's texture is band-limited noise (Gaussian-smoothed, texture_sigma px) and view (v, u) sees it displaced by (s*(v - v_c), s*(u - u_c)). Because the displacement is exactly linear in the angular index, every downstream answer is closed-form: the refocus sharpness peaks at s, the EPI lines have slope s, and the disparity between the extreme views is s * (U - 1).

*angular* is (V, U) and *shape* is (H, W).

With occlusion=True (default) the layers are composited front-to-back by |slope| (largest |s| = nearest = drawn last) through random binary masks covering roughly *coverage* of the frame, and the layer with the smallest |slope| is forced opaque as the background — regardless of its position in *slopes* (a tie goes to the earlier entry, the sort is stable). (0.0, 2.0) and (2.0, 0.0) therefore describe the same scene with the same slope_map; only the per-layer textures are drawn in a different order. That is what makes a see-through synthetic-aperture test meaningful. With occlusion=False the layers are averaged instead — a transparent superposition, which is the cleanest possible input for refocusing because each layer survives the average untouched.

Returns (light_field, slope_map): the (V, U, H, W) array and the (H, W) map of the front-most layer's slope at each pixel — the ground truth for lf_depth_from_focus and lf_epi_slope. The map is in centre-view coordinates (the masks are stated unshifted, and the centre view is the one view whose shift is zero), which is also the frame a refocused image lands in. With occlusion=False the light field also contains the *other* layers at every pixel, so a depth estimator will legitimately disagree with the map wherever layers overlap; the single-layer case is unambiguous and is what the exactness tests use.

edge="wrap" (default) makes the scene periodic so an integer slope is a pure np.roll and the whole pipeline is bit-exact end to end (measured round-trip error 5.6e-16); edge="nearest" reproduces a real camera's border clamping.

Raises ValueError: an empty or over-long *slopes* list (MAX_LAYERS), a non-finite or over-large slope (MAX_ABS_SLOPE), an angular or spatial shape outside [1, MAX_ANGULAR] / [1, MAX_SPATIAL], a total size over MAX_LF_ELEMENTS, *coverage* outside (0, 1], a *texture_sigma* so large the smoothed texture's dynamic range falls below MIN_TEXTURE_RANGE, and an unknown *interp* / *edge*.

उपयोग की विस्तृत guide

• lightfield_depth family guide

संदर्भ (sample data, साहित्य)

• Sample data catalog (DL URL / license) — 2-D के लिए skimage.data (BSD/public) + synthetic, 3-D के लिए real data sources (Stanford/PDS आदि) के DL URL।

• Operators का स्रोत और संदर्भ — इस op family के मूल research/methods के स्रोत।

• Algorithm का मानक स्रोत (लेखक, वर्ष) और उपयोग ऊपर की family usage guide में दिए गए हैं।

चलाए जा सकने वाले उदाहरण (verified samples जो सच में यह op call करते हैं)

• lightfield_depth — py -3.11 examples/lightfield_depth.py

• poc_compound_eye — py -3.11 examples/poc_compound_eye.py

वे अगले ops जिनसे type जुड़ता है (lightfield को input के रूप में लेते हैं)

lf_to_mla · lf_stats · lf_subaperture · lf_center_view · lf_views · lf_epi · lf_refocus · lf_focal_stack

इसी category के (synthesis)

—


*Provenance: lightfield.py — LIGHTFIELD operator registry. यह per-op note tools/opdocs.py md से अपने-आप generate होता है (हाथ से edit न करें)।*

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