Transcript
The lens opening on your phone is only a few millimetres wide. That's far too small to blur a background. So Portrait mode fakes the blur. Here's how it does it, in four steps. First, why a big camera blurs at all. A 50 millimetre lens at f/2 has an opening 25 millimetres wide. Light from behind your friend lands as a wide spot, so things just inches behind them go soft. On a phone, that opening is a few millimetres. The spot stays tiny, so everything comes out sharp: your friend, the café, the string lights. Google explained how its Pixel 2 fixes this, in 2017. Step one: take a burst. Several quick, dark frames are lined up and averaged, so the photo is clean and sharp everywhere. Step two: find the person. A neural network, trained on almost a million photos of people, paints a mask. White for the person, black for everything else. Step three: measure depth. Each pixel on the sensor is split into two halves. The left half sees through the right side of the lens, and the right half through the left. That's two viewpoints less than 1 millimetre apart. Near things shift a tiny bit between the two views. Far things barely move. That shift becomes a depth map: bright is near, dark is far. Step four: paint the blur. Every background pixel becomes a see-through disk of its own colour. The farther it is from your friend, the bigger its disk. That's why the string lights turn into soft round balls. The disks are stacked from back to front, so it looks like real lens blur. On the Pixel 2, the whole thing took about four seconds. The catch: its selfie camera had no split pixels. So it used the mask alone, and blurred the whole background evenly. So remember it like this: a mask says who stays sharp, a depth map says how far, and disks paint the blur. Want to practise IT hands-on? Try it free at seclern.com, and follow for more.