Wolfram Research

Function Repository Resource:

ImageShapeMorph

Source Notebook

Morph an image from one shape into another

Contributed by: Manan Aggarwal

ResourceFunction["ImageShapeMorph"][image,mask]

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.

Examples

Basic Examples

Morph the shape of a fish:

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

Possible Issues

ImageShapeMorph creates unnatural morphs if image backgrounds are blurry:

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

Resource History

Source Metadata

License Information