warp_piecewise_affine — SHAPE2D morph op

• Data kinds: image2d × pairs × pairs → image2d

• Call: import fullseye as fs; fs.ledger.warp_piecewise_affine(img, src_pts, dst_pts, order=1) (to call the implementation directly, import imagemorph; imagemorph.warp_piecewise_affine(img, src_pts, dst_pts, order=1); from the registry, opsshape2d.get("warp_piecewise_affine"))

Usage

Piecewise affine warp that moves the content at src_pts of img to dst_pts.

Delaunay-triangulates dst_pts, finds for each output pixel the barycentric coordinates in the triangle it belongs to, maps them with the same barycentric coordinates to the corresponding triangle on the src_pts side, and samples by inverse mapping. Outside the convex hull (pixels belonging to no triangle) is sampled with the identity (original position), so including the four corners as corresponding points (add_frame_corners) covers the whole image without holes.

Arguments:

img: (H,W) or (H,W,C), [0,1].

src_pts, dst_pts: (K,2) (x,y). Corresponding points, same count and same order.

order: interpolation order (1=bilinear).

Returns: float64 of the same shape as img, [0,1].

Detailed usage guide

• shape_description_2d family guide

References (sample data, literature)

• 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.

Runnable examples (verified samples that actually call this op)

• shape2d_morph_descriptor_tour — py -3.11 examples/shape2d_morph_descriptor_tour.py

Ops the type connects to (they accept image2d as input)

warp_tps_image · blend · morph · morph_sequence

Same category (morph)

add_frame_corners · warp_tps_image · blend · morph · morph_sequence


*Provenance: imagemorph.py — SHAPE2D 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.