Wolfram Research

Function Repository Resource:


Source Notebook

Morph an image from one shape into another

Contributed by: Manan Aggarwal


reshapes image into the shape of mask.

Details and Options

ResourceFunction["ImageShapeMorph"] effectively uses semantic segmentation and geometric interpolation to conform the shape of the input image to the mask.
ResourceFunction["ImageShapeMorph"] works well with arbitrary 2D images, provided the images are aligned.


Basic Examples

Morph the shape of a fish:

(* Evaluate this cell to get the example input *) CloudGet["https://www.wolframcloud.com/obj/6ac9c915-2d78-4375-b382-a1e78bad28ad"]

Possible Issues

ImageShapeMorph creates unnatural morphs if image backgrounds are blurry:

(* Evaluate this cell to get the example input *) CloudGet["https://www.wolframcloud.com/obj/eadc97d8-3293-4ed6-8d84-c0ff6b7a87df"]

Resource History

Source Metadata

Author Notes

Extract matching features for image alignment and local warping
Implement a shape interpolation scheme to produce results with a bounded amount of conformal distortion
Develop a morphing sequence from automatically generated sparse correspondence points

License Information