This Software Can Undistort Faces at the Edges of Wide-Angle Photos

If you’ve ever found yourself at the edges of a group photo captured with a wide-angle lens, you may have noticed some strange stretching, squishing, and/or skewing that distort your face. Researchers have now created software that can automatically fix these wide-angle face distortions without affecting other parts of the photo.

In a paper titled “Distortion-Free Wide-Angle Portraits on Camera Phones,” a group of researchers at Google and MIT led by YiChang Shih introduce a new algorithm they created that allows for, as the name states, distortion-free wide-angle portraits shot using camera phones.

“In spite of the rapid proliferation of wide-angle cameras on mobile phones, a wider field-of-view (FOV) introduces a stronger perspective distortion,” the paper’s abstract states. “Correcting such distortions requires professional editing skills, as trivial manipulations can introduce other kinds of distortions.”

The researchers’ solution to this problem is an algorithm that, when given a photo, creates a content-aware warping mesh that works on the areas of the frame where faces are detected. It then corrects for the faces without adversely impacting the non-facial areas of the photo.

Promising results were obtained on photos with a wide field-of-view ranging from 70° to 120°, and the automatic correction is fast enough to be done “at an interactive rate” on a smartphone.

Here are some before (on left) and after (on right) examples of portraits corrected by the algorithm:

Here’s a 2.5-minute video introducing the new algorithm and explaining how it works:

Given that all the researchers behind this project are employed by Google, we could presumably see some form of this technology show up on a future Pixel smartphone.

(via YiChang Shih via Gizmodo)

Discussion