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) (implementation को सीधे call करना हो तो import imagemorph; imagemorph.warp_piecewise_affine(img, src_pts, dst_pts, order=1), registry से लेना हो तो opsshape2d.get("warp_piecewise_affine"))

उपयोग

img के src_pts पर की सामग्री को dst_pts तक ले जाने वाला piecewise affine warp।

dst_pts का Delaunay triangulation करके, हर output pixel जिस triangle में है उसके barycentric coordinates निकालता है, उन्हीं barycentric coordinates से src_pts की ओर के corresponding triangle पर map करके inverse mapping से sample करता है। convex hull के बाहर (किसी triangle में न आने वाले pixels) identity (मूल position) से sample होते हैं, इसलिए चारों कोनों को corresponding points में शामिल करने पर (add_frame_corners) पूरी image बिना छेद के ढक जाती है।

arguments:

img: (H,W) या (H,W,C), [0,1]।

src_pts, dst_pts: (K,2) के (x,y)। समान संख्या और समान क्रम के corresponding points।

order: interpolation order (1=bilinear)।

return value: img जैसे ही shape का, [0,1] का float64।

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

• shape_description_2d 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 करते हैं)

• shape2d_morph_descriptor_tour — py -3.11 examples/shape2d_morph_descriptor_tour.py

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

warp_tps_image · blend · morph · morph_sequence

इसी category के (morph)

add_frame_corners · warp_tps_image · blend · morph · morph_sequence


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

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