How infrared lets a phone see a face in the dark

Visible-light cameras struggle when a room is dark, but some facial-unlock systems use infrared, a kind of light that people cannot see. The phone briefly illuminates the face with an infrared emitter and captures the reflected light with a sensor. Because the phone supplies its own illumination, it can gather facial information without turning on the screen or using a visible flash.

More advanced systems project a pattern of infrared dots onto the face. A sensor reads how that pattern bends across the nose, eye sockets, and other contours, building a depth map—a record of the face’s three-dimensional shape. That makes the scan less dependent on ordinary lighting and harder to fool with a flat photograph than a simple camera image would be.

The scan is checked against a protected template

During setup, the phone records facial features and converts them into a mathematical representation, often called a template. When someone tries to unlock it, the phone creates a fresh scan and checks whether its features match the stored representation closely enough. The process is designed to recognize the enrolled face despite ordinary changes such as a different expression or angle.

The template is typically kept in protected hardware on the device, rather than treated as an ordinary photo sent to an online service. That separation helps limit access to sensitive biometric data. The phone also uses a matching threshold: a scan must be sufficiently similar, rather than merely resembling the owner in a general way.

Not every face-unlock system works the same way

The darkness advantage depends on the hardware. A system that relies only on a standard front-facing camera may need some ambient light, while infrared-equipped systems can capture a face in near-darkness. In either case, facial recognition is a balance: stricter matching can improve security but may reject the owner more often; looser matching is more convenient but can increase the chance of an incorrect match.

So the key is not that the phone can see in the dark like a person can. It brings its own invisible light, measures the face, and performs the comparison inside the device.