morph — SHAPE2D morph op

• Data kinds: image2d × image2d × pairs × pairs → image2d

• Call: import fullseye as fs; fs.ledger.morph(imgA, imgB, ptsA, ptsB, alpha, method='affine', lam=0.0, with_corners=True) (to call the implementation directly, import imagemorph; imagemorph.morph(imgA, imgB, ptsA, ptsB, alpha, method='affine', lam=0.0, with_corners=True); from the registry, opsshape2d.get("morph"))

Usage

Morphs 2 images A and B via corresponding points and produces the intermediate image at ratio alpha.

Procedure (Beier–Neely style mesh morph):

1. Build the intermediate shape mid = (1-alpha)·ptsA + alpha·ptsB.

2. Warp A by ptsA→mid and B by ptsB→mid (aligning the features of both to mid).

3. Cross-dissolve warp(A), warp(B) with alpha.

alpha=0 matches A, alpha=1 matches B. Unlike a simple blend(A,B,alpha), features such as eyes and nose do not form a double image but overlap into 1 (= "a true intermediate").

Arguments:

imgA, imgB: (H,W[,C]), same shape, [0,1].

ptsA, ptsB: (K,2) (x,y). Corresponding points of A and B (same count, same order).

alpha: blend ratio [0,1].

method: "affine" (piecewise affine, fast) or "tps" (smooth).

lam: TPS smoothing coefficient (when method="tps").

with_corners: True adds the four corners as fixed points, preventing holes at the edges.

Returns: the intermediate image of (H,W[,C]) ([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)

• image_morph — py -3.11 examples/image_morph.py

• poc_vanishing_detail_and_morphing_area — py -3.11 examples/poc_vanishing_detail_and_morphing_area.py

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

warp_tps_image · warp_piecewise_affine · blend · morph_sequence

Same category (morph)

add_frame_corners · warp_tps_image · warp_piecewise_affine · blend · 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.