How photo morphing works
A morph turns one picture into another so smoothly that every frame in between looks like a real photo. The trick is to do two things at once: bend both pictures so that their features line up, and fade from one to the other. This page explains the points, the triangles and the arithmetic behind it, and how to get a clean morph of your own photos.
A fade is not a morph
The simplest way from one picture to another is a cross-dissolve: show photo 1 and let photo 2 slowly appear on top. Halfway each pixel is half of one photo and half of the other. With two faces that gives a ghost: the eyes of one face float beside the eyes of the other, and you see two mouths, two noses and two chins. A morph avoids that by moving the features first, so that halfway there is only one face, with its eyes, nose and mouth in between where they were on the two photos.
Matching points
The morph has to know which part of photo 1 belongs to which part of photo 2. That is what the points say: point 21 is the outer corner of the left eye on both photos, point 31 the tip of the nose, point 33 the left corner of the mouth. Photo Morph uses 38 points on the face (the outline, the eyebrows, the eyes, the nose and the mouth) and 8 around the head (the hair, the ears and the neck), plus 8 on the border of the picture that hold its edges still. You can add your own points for anything else that should line up.
A mesh of triangles
The points are joined into triangles. The morph uses a Delaunay triangulation: the triangles are chosen so that no point lies inside the circle through the corners of any triangle, which avoids long thin slivers. The triangulation is made once, of the shape halfway between the two photos, and the same triangles are used on both photos and at every moment of the morph, so a triangle around the left eye on photo 1 is the triangle around the left eye on photo 2.
Warping each triangle
At Morph t every point moves to (1 − t) times its place on photo 1 plus t times its place on photo 2. Each triangle of photo 1 is then stretched onto its in-between triangle by an affine map, a combination of moving, turning, scaling and shearing that takes three corners exactly onto three corners; photo 2 is stretched onto the same triangles. Neighbouring triangles share their edges, so the picture bends without tears. To draw the result, every pixel of the in-between picture finds its triangle, works out where it came from in the photo and takes the colour there, blending the four nearest pixels.
Blending the two
Now both photos have the same shape, and the cross-dissolve does no harm: the result is photo 1 times (1 − t) plus photo 2 times t. At the start the picture is photo 1, at the end photo 2, and in between the shape and the colours change together. In the photo editor this is exactly two layers: photo 1 below and photo 2 on top at opacity t. The pencil opens the morph like that, so you can change the blend afterwards, or blend the shape of one face with the colours of the other.
Where morphing comes from
Morphing grew out of film effects in the 1980s. Industrial Light & Magic morphed between animals in Willow (1988), and Terminator 2 (1991) made it famous. In 1991 Michael Jackson's video Black or White morphed a row of faces into each other, the scene most people remember. Thaddeus Beier and Shawn Neely published their feature-based method, which uses pairs of lines instead of points, in 1992. Triangle meshes like the one here are the most common method today, because they are fast and give the user exact control.
Tips for a clean morph
Choose two portraits that look in the same direction, with the face about as large and the light about the same. Put the points on features that really match: the corners of the eyes rather than the middle of the eyelid, the corners of the mouth, the tip of the nose, the bottom of the chin. Where a ghost appears halfway, a hairline, an ear or the edge of a collar that does not line up, double-click to add a point on both photos and drag it to the same feature. Show the mesh helps to see which triangles stretch too far.
Frequently asked questions
What is the difference between a morph and a warp?
A warp bends one picture into another shape without changing its colours: a face can be made wider or its smile bigger. A morph warps two pictures towards a common in-between shape and blends them, so the picture changes from one into the other. Every frame of a morph contains two warps and a blend.
How many points does a good morph need?
For a face, about 40 well-placed points are enough: the outline, the eyebrows, the corners and lids of the eyes, the nose and the mouth. More points help where the two pictures differ a lot, around hair, ears and shoulders. Points in the wrong place hurt more than too few points: a point on the eye in one photo and on the eyebrow in the other tears the face apart halfway.
Can I morph things that are not faces?
Yes. The points can go on anything: a cat into a lion, an apple into a pear, a car into another car. Drag the face points onto matching features of the two pictures, remove the ones you do not need with a double-click, and add new points where something should line up.
Why does the morph look blurry halfway?
Where the two photos still do not line up, their details are blended out of step: two hairlines, two edges of a collar or two backgrounds show through each other. Points that match better remove most of it. Different backgrounds always blend, which is why portraits on plain backgrounds morph best.
Ready to try it?
Open PictorX in your browser — no install, no credit card required to start.
Open Photo Morph