Table of Contents

EasyAR sparse spatial map

EasyAR Sparse Spatial Map is used to scan small-scale environments around the user, room-level, generate a 3D visual map of the environment, and provide visual localization tracking. It is suitable for developing persistent AR applications or multi-user interactive AR applications.

How EasyAR sparse spatial map works

Based on motion tracking, EasyAR Sparse Spatial Map uses computer vision algorithms on the device to analyze features in camera data and build a spatial 3D map of the environment. Users can save visual maps or share them in real time between multiple devices. When other devices load the corresponding map, they determine the device position and orientation relative to the map through localization in the loaded map, enabling persistent AR applications or multi-user interactive AR applications.

Sparse Spatial Map currently requires a stable motion tracking system, such as EasyAR Motion Tracker, ARCore, or ARKit, to provide six-degree-of-freedom position and orientation for mapping and for continuous tracking after successful localization. During mapping, Sparse Spatial Map uses camera images and corresponding poses to build a 1:1 visual map of the environment. During localization, after visual localization succeeds, the device pose relative to the map is continuously updated by the motion tracking system.

EasyAR Sparse Spatial Map supports loading multiple maps, localizing in multiple maps, and returning the corresponding map ID and the device position and orientation relative to that map.

ssmintro

Mapping best practices

When creating a Sparse Spatial Map, fully consider where and from which viewpoints users will perform localization, and optimize the mapping process accordingly. During mapping, try to cover all possible localization viewpoints, including viewing angles and distances.

Best practices for improving mapping results:

  • Move translationally or rotate slowly relative to the scanned area or scene as much as possible.
  • Move as fully as possible to scan and cover the positions where users may localize.
  • Try to map in areas with rich, stable, and static visual features.
  • The range of a single map should not exceed 1000 square meters.
  • The distance from the mapping device to the scene should be less than 10 meters.

Avoid the following during scanning and mapping:

  • Avoid mapping in large areas without visual features, such as white walls.
  • Avoid mapping in large areas with reflective materials, such as glass or mirror-like objects.
  • Avoid mapping in areas with repetitive textures.

After mapping is complete, you can test localization in the created Sparse Spatial Map and check the success rate and accuracy. If the result is not satisfactory, consider creating a more complete map again.

Localization best practices

To ensure the localization result of Sparse Spatial Map and improve the user experience, follow these practices.

  • Guide users to localize in the scene corresponding to the map, for example by providing a preview image of the target scene to help users find it.
  • Guide users to move the device slowly and try localization from multiple angles.
  • Avoid localizing in areas without visual features, mirror-like surfaces, or repetitive textures.

Common causes of localization failure

Localization may fail when the user's localization environment differs greatly from the environment in which the map was built, such as:

  • Viewpoint changes

    Make sure mapping covers potential localization angles as much as possible. If the localization angle differs from the closest mapping angle by more than 45°, the localization success rate will drop significantly.

  • Lighting differences

    Localization success rate is highest when mapping lighting and localization lighting are similar. For example, avoid mapping during the day and then trying to localize in a completely dark night.

  • Distance changes

    Move the phone during mapping and cover positions at different distances. For example, after mapping near a target at a distance of 1 meter, trying to localize from 10 meters away is likely to fail.

Further reading