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 (1) 

Morph the shape of a fish:

In[1]:=
(* Evaluate this cell to get the example input *) CloudGet["https://www.wolframcloud.com/obj/c77c0620-1734-45b0-afb5-fb07af64f16b"]
Out[1]=

Possible Issues (1) 

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/04ed8473-1ec6-4fea-8060-871c50316a2f"]
Out[2]=

Publisher

Wolfram Summer School

Version History

  • 1.0.0 – 28 June 2019

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