morph op• 数据种类:pairs → pairs
• 调用: import fullseye as fs; fs.ledger.add_frame_corners(pts, shape)(要直接调用实现,import imagemorph; imagemorph.add_frame_corners(pts, shape);从台账取用则 opsshape2d.get("add_frame_corners"))
将图像的四个角(+各边中点)作为固定点加入点集。
使变形的三角剖分覆盖整幅图像、防止凸包外侧出现空洞的常规处理。以相同顺序加到 src/dst 两边,四角就作为「不动的对应点」起作用。
添加的 8 点为像素中心坐标 (x, y),以 W-1 / H-1 为边界:
(0,0) (xm,0) (W-1,0) (0,ym) (W-1,ym) (0,H-1) (xm,H-1) (W-1,H-1) (xm = (W-1)/2、ym = (H-1)/2)。按此顺序连接到末尾。
• pts: (N, 2) 的 (x, y)(x = 列,y = 行),有限值。若传入 (row, col), x 与 y 会以对调的状态通过(不会抛出异常)。
• shape: 图像的 shape((H, W) 或 (H, W, C) 都使用前 2 个)。
• 返回值: (N + 8, 2) float64。
• 不检查原有点是否已位于框上或框外。框外的对应点会在 Delaunay 剖分中与框的三角形相交,使变形扭曲。
morph / morph_sequence 在 with_corners=True 时会在内部对两组点集应用此处理。直接调用 warp_piecewise_affine / warp_tps_image 时,请自行把它加到 src 和 dst 两边。
• 示例数据目录(下载 URL / 许可证) —— 2-D 用 skimage.data(BSD/公有领域)加合成图,3-D 给出真实数据源(Stanford/PDS 等)的下载 URL。
• 算子来历与参考文献 —— 该算子族所依据的研究/方法出处。
• 算法的正典(作者、年份)与用途见上面的族使用指南。
• shape2d_morph_descriptor_tour — py -3.11 examples/shape2d_morph_descriptor_tour.py
pairs 作为输入)elliptic_fourier · fourier_smooth · contour_fourier_complex · warp_tps_image · warp_piecewise_affine · morph · morph_sequence
morph)warp_tps_image · warp_piecewise_affine · blend · morph · morph_sequence
*Provenance: imagemorph.py — SHAPE2D 算子登记表。本条目由 tools/opdocs.py md 自动生成(请勿手工编辑)。*
© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.