Skip to content

How Plane Detection Works in AR

By AR Compare Team ·

Plane detection is how an AR device finds flat surfaces, such as floors, walls and tables, so virtual objects can sit on them. The device tracks small distinct details in its camera images, works out where each one is in 3D, and looks for groups of points that lie on the same flat surface. Each group becomes a plane, with a position, a size and an outline that grows as you look around. Apps then use those planes to place a virtual lamp on a real table or pin a screen to a real wall.

This explainer draws on Google’s ARCore fundamental concepts, Android’s plane detection guide for Android XR, and Google’s ARCore depth guide. If you build AR apps, see AR glasses for developers.

Step 1: track feature points

Plane detection sits on top of motion tracking. Google explains that ARCore finds visually distinct features in each camera image, called feature points, and follows them from frame to frame. Combining how those points move with readings from the motion sensors lets the device estimate where the camera is and where each point sits in 3D. This combined process is called SLAM, short for simultaneous localization and mapping. How 6DoF tracking works covers it in more detail.

Feature points are things like the grain of a wooden table, the edge of a book or a pattern on a rug. Each becomes a dot in the device’s 3D picture of the room.

Step 2: find points that share a surface

Google describes the next step plainly: ARCore looks for clusters of feature points that appear to lie on common horizontal or vertical surfaces, like tables or walls, and makes these available to apps as geometric planes. It also works out each plane’s boundary.

Android’s guide says apps are told when planes are added, updated or removed, so the set of surfaces keeps changing as you look around the room.

Step 3: describe the plane

On Android XR, each detected plane comes with:

  • a center pose, the position and direction of the middle of the surface;
  • extents, its width and depth in meters;
  • a polygon outline, a convex shape that approximates the edge of the surface;
  • a label, one of wall, floor, ceiling or table.

The label lets an app ask for “the first table” rather than any flat thing. Android’s guide shows exactly that: point a ray at the scene, collect every plane it hits, and keep the first one labelled as a table.

How apps use planes

Hit testing. Google explains that a hit test takes a point on the screen, shoots a ray into the scene and returns any planes or feature points the ray meets, with the exact spot of contact. That is how tapping on a table places an object on it.

Anchoring. Planes are trackables: the device keeps updating them. Google’s example is a virtual figure on a desk. If ARCore later adjusts where the desk is, the figure still appears on top of it, because it is anchored to the plane. See how spatial anchors work.

Angled surfaces. For surfaces that are not flat and level, Google describes oriented points: the device looks at feature points around a hit and estimates the angle of the surface there.

Lighting to match. Placing an object is only half the job. Google notes ARCore also reports the average brightness and colour of the camera image, so apps can light a virtual object to match the room it sits in.

Why some surfaces fail

Google’s guide is direct about the main weakness: because ARCore uses feature points to find planes, flat surfaces without texture, such as a white wall, may not be detected properly. With nothing distinct to track, there are no points to cluster.

The same logic means a surface with visible detail on it, such as a patterned rug or a desk with things on it, gives the device more to work with than a bare one.

Planes and depth

Planes model the world as flat shapes. Many surfaces are not flat, and objects in the middle of the room are not surfaces at all. For those, devices also build depth maps. Google’s depth guide says ARCore can estimate depth from camera motion alone and can merge in data from a time-of-flight sensor where the device has one. Depth lets apps hide virtual objects behind real ones and place them on uneven surfaces. See how AR occlusion works and how time-of-flight depth sensing works.

Does this matter when you buy glasses?

Only for some glasses. Display glasses that show a virtual screen do not detect planes; they track head rotation at most. Plane detection matters on headsets and on glasses with cameras and 6DoF tracking, where apps place windows on walls or objects on tables. Android’s plane guide applies to XR headsets and wired XR glasses. Compare 3DoF and 6DoF glasses, or browse AR headsets for work.

For the term itself, see the plane detection glossary entry.

More buying guides: XR glasses.

Frequently asked questions

What is plane detection in AR?

It is how an AR device finds flat surfaces such as floors, walls and tables. The app can then place virtual objects so they appear to rest on those surfaces.

How does a device find a flat surface?

It tracks small, distinct details in the camera image and works out where they sit in 3D. Google's ARCore looks for clusters of those points that lie on a common horizontal or vertical surface.

Why does AR struggle with blank walls?

Plane detection relies on visible detail. Google notes that flat surfaces without texture, such as a white wall, may not be detected properly, because there are few points to track.

Can AR tell a table from the floor?

Some platforms label planes. Android XR's plane detection can label a plane as a wall, floor, ceiling or table.

Do I need plane detection for display glasses?

No. Glasses that only show a screen do not map the room. Plane detection matters for headsets and glasses with 6DoF tracking that place apps and objects around you.