Function Repository Resource:

ImageAlignFaces

Source Notebook

Align images so that facial features coincide

Contributed by: Jon McLoone

ResourceFunction["ImageAlignFaces"][img1,img2]

returns a list of images where the first face in each image is aligned.

ResourceFunction["ImageAlignFaces"][img1,img2,{i,j}]

returns a list of images where the ith face in img1 is aligned with the jth face in img2.

ResourceFunction["ImageAlignFaces"][img1,img2,{i,j},s]

returns a list of images of size s.

Examples

Basic Examples (2) 

Align two images by facial features:

In[1]:=
(* Evaluate this cell to get the example input *) CloudGet["https://www.wolframcloud.com/obj/621261d0-87c7-4052-8a91-3607b2086488"]
Out[1]=

Superimposing the resulting images shows the facial match:

In[2]:=
ImageCompose[res[[1]], {res[[2]], 1/2}]
Out[2]=

Publisher

Jon McLoone

Version History

  • 1.0.0 – 08 July 2019

License Information