Table of Contents

EasyAR sparse spatial map

EasyAR Sparse Spatial Map is designed to scan small-scale environments around users (room-level), generate 3D visual maps of the surroundings, and provide visual positioning and tracking capabilities. It is suitable for developing persistent AR applications or multi-user interactive AR applications.

EasyAR sparse spatial map principle

Building upon motion tracking, EasyAR Sparse Spatial Map utilizes computer vision algorithms on the device side to analyze camera data features and construct a spatial 3D map of the environment. Users can save visual maps or share them in real-time across multiple devices. When other devices load the corresponding map and determine their position and orientation relative to the map through localization, persistent AR applications or multi-user interactive AR applications can be developed.

Sparse Spatial Map currently requires a stable motion tracking system (e.g., EasyAR Motion Tracker, ARCore, ARKit) to provide six-degree-of-freedom position and orientation for mapping and 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, once visual positioning succeeds, the device's pose relative to the map is continuously updated via the motion tracking system.

EasyAR Sparse Spatial Map supports loading multiple maps, localizing within them, and returning the corresponding map ID along with the device's position and orientation relative to that map.

ssmintro

Best practices for map building

When creating a sparse spatial map, you should fully consider where and from which perspectives users will perform localization to optimize the mapping process. Strive to cover all potential localization viewpoints during mapping, including observation angles and distances.

Best practices to improve mapping effectiveness:

  • Prefer translational movement or slow rotation relative to the scanned area/scene.
  • Move sufficiently to cover all positions where users might localize.
  • Conduct mapping in areas with rich, stable, and static visual features.
  • Limit individual map coverage to under 1000 square meters.
  • Maintain a distance of less than 10 meters between the mapping device and the scene.

Avoid the following during scanning and mapping:

  • Avoid mapping large areas lacking visual features, such as blank walls.
  • Avoid mapping large areas with reflective materials, like glass or mirrored surfaces.
  • Avoid mapping areas with repetitive textures.

After mapping is complete, test localization within the built sparse spatial map to check success rates and accuracy. If results are unsatisfactory, consider rebuilding a more comprehensive map.

Best practices for localization

To ensure optimal localization performance with sparse spatial maps, follow these practices to increase success rates and enhance user experience:

  • Guide users to localize within the scene corresponding to the map, e.g., by providing preview images of the target scene.
  • Instruct users to move the device slowly and attempt localization from multiple angles.
  • Avoid localizing in areas without visual features, mirrored surfaces, or repetitive textures.

Common causes of localization failure

Significant differences between the user's environment and the mapped environment may cause localization failure, such as:

  • Perspective changes
    Ensure mapping covers potential localization angles. Success rates drop significantly if the localization angle differs by over 45° from the closest mapped angle.
  • Lighting differences
    Localization success is highest when mapping and localization lighting conditions are similar. Avoid scenarios like mapping in daylight and localizing in complete darkness.
  • Distance variations
    Move the device during mapping to cover different distances. Localization often fails if attempted 10 meters away from a target mapped at 1 meter.

Further reading