TrueDepth Camera: A tech behind Screen distance alert feature in iOS

Prabakaran Marimuthu
3 min readSep 29, 2023

How iOS uses its one of the best hardware (True Depth camera) feature for better digital wellness.

When I’m texting with my iPhone after upgrading to recent iOS 17, this screen popped-up on my device. Initially I have no clue about what it is exactly, but I personally liked the healthy warning message that showed-up. Following it later, I tweeted (x’ed) about it too.

Screen distance caution

It always advisable to avoid using digital devices too close to eye sight. If you are using digital devices for a long time at close eye-sight, then it leads to eye stain. If you repeat same of a long-time, it may be chance to get Near-sightedness or Short-sightedness (Myopia). This has huge impact in 6–13 aged children and adults too.

To prevent this, Apple came-up with a feature called “Screen distance” to detect and warn user when they use iPhone / iPad at close sight.

The idea is simple. When you hold the screen too close to your face for an extended period, Screen Distance covers the screen with an alert, preventing you from continuing. When you move iPhone more than 12 inches away, you can tap Continue to resume using it.

Curious thing is the tech behind this feature “True Depth Camera” — Tech that backs Face ID to unlock the iPhone.

TrueDepth Camera

TrueDepth camera is one of the intuitive camera technology, developed by Apple. TrueDepth technology is available iPhones from it model X, is a combined system of sensors and cameras.

TrueDepth camera projects thousands of invisible dots on your face and use them to create deep map of your face.

Image: Apple

This technology used by Apple in features like Face ID and Memoji and some other third party 2D & 3D applications as well including:

  1. Face ID: Apple’s advanced biometric authentication system that uses the TrueDepth camera to map and identify the user’s face.
  2. Animoji & Memoji: These are animated emojis that use the TrueDepth camera to track the user’s facial movements and display them as an animated character.
  3. Portrait mode photos: This feature uses the TrueDepth camera to capture professional-looking portrait photos with a blurred background.
  4. AR: The TrueDepth camera can be used to create more immersive and realistic AR experiences, such as those found in games and other apps.

How this calculates screen distance?

At basic, TrueDepth technology uses the Time of Flight (ToF) low behind the scenes.

Time of flight is the measurement of time taken to travel a distance in order to determine distance, speed, or properties of the medium. Time for a signal to reflect off an object is often measured to determine the object’s location.

This method works in this two steps.

  • An infrared light projection system called a grid of illumination points projects thousands of invisible dots. This beam of infrared light reaches your face and then bounces back.
  • Then, the TrueDepth camera measures the time it takes for that invisible beam of light to return, calculating the distance between the sensors and the face.

Once the distance calculated and if it less than 12 inch, then it automatically alerts user with warning and encourages you to move it farther away.

Incredible right! One of the new feature from Apple to support digital wellness for the users.

PS: Screen Distance is only available on devices with a TrueDepth camera,

--

--

Prabakaran Marimuthu

#Engineering #Mobile #Apps #React & #Native @spritle-software