morph — SHAPE2D morph op

数据种类:image2d × image2d × pairs × pairsimage2d

调用:import imagemorph; imagemorph.morph(imgA, imgB, ptsA, ptsB, alpha, method='affine', lam=0.0, with_corners=True)(或 opsshape2d.get("morph"))

用法

> 该算子的说明尚无译文,以下照原文给出。

2 枚の画像 A, B を対応点でモーフし、比率 alpha の中間画像を作る。

手順(Beier–Neely 流のメッシュ・モーフ):

1. 中間形状 mid = (1-alpha)·ptsA + alpha·ptsB を作る。

2. A を ptsA→mid へ、B を ptsB→mid へワープ(両者の特徴を mid に揃える)。

3. warp(A), warp(B) を alpha でクロスディゾルブ。

alpha=0 で A、alpha=1 で B に一致する。単純な blend(A,B,alpha) と違い、

目・鼻などの特徴が二重像にならず 1 つに重なる(=「本物の中間」)。

引数:

imgA, imgB: (H,W[,C])、同 shape、[0,1]。

ptsA, ptsB: (K,2) の (x,y)。A と B の対応点(同数・同順)。

alpha: 合成比率 [0,1]。

method: "affine"(区分アフィン, 速い)か "tps"(滑らか)。

lam: TPS の平滑化係数(method="tps" のとき)。

with_corners: True で四隅を固定点に足し、端の穴を防ぐ。

返り値: (H,W[,C]) の中間画像([0,1])。

详细使用指南

shape_description_2d 族使用指南

参考(示例数据・文献)

• 示例数据目录(下载 URL / 许可证) —— 2-D 用 skimage.data(BSD/公有领域)加合成图,3-D 给出真实数据源(Stanford/PDS 等)的下载 URL。

• 算子来历与参考文献 —— 该算子族所依据的研究/方法出处。

• 算法的正典(作者・年份)与用途见上面的族使用指南

可运行的示例(实际调用该算子并已验证的样例)

image_morphpy -3.11 examples/image_morph.py

类型可衔接的下一个算子(可接受 image2d 作为输入)

warp_tps_image · warp_piecewise_affine · blend · morph_sequence

同类别(morph)

add_frame_corners · warp_tps_image · warp_piecewise_affine · blend · morph_sequence


*Provenance: imagemorph.py — SHAPE2D 算子登记表。本条目由 tools/opdocs.py md 自动生成(请勿手工编辑)。*

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