Table of Contents

EasyAR sparse spatial map

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

EasyAR sparse spatial map principle

EasyAR sparse spatial map builds upon motion tracking to analyze feature points from camera data using computer vision algorithms on the device, constructing a spatial 3D map of the environment. Users can save the visual map or share it in real-time among multiple devices. When other devices load the corresponding map and determine their position and orientation relative to the map through localization within the loaded map, they enable 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 6DoF position and orientation for both mapping and continuous tracking after successful localization. During the mapping process, sparse spatial map utilizes camera images and corresponding poses to build a visual map of the environment at a 1:1 scale. During the localization process, once visual localization 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 these maps, and returning the corresponding map ID along with the device's position and orientation relative to that specific map.

ssmintro

Best practices for mapping

When creating a sparse spatial map, you need to fully consider the locations and perspectives from which users will perform localization to optimize the mapping process. During mapping, try to cover all possible localization viewpoints, including observation angles and distances.

Here are the best practices to improve mapping effectiveness:

  • Try to perform translational movements or slow rotations relative to the scanned area or scene.
  • Move as thoroughly as possible to cover all potential user localization positions.
  • Conduct mapping in areas with rich, stable, and static visual features whenever possible.
  • Keep the coverage of a single map under 1,000 square meters.
  • Maintain a distance of less than 10 meters between the mapping device and the scene.

Avoid the following situations during scanning and mapping:

  • Avoid mapping in large areas with no visual features, such as blank walls.
  • Avoid mapping in large areas with reflective materials, such as glass or mirrored objects.
  • Avoid mapping in areas with repetitive textures.

After completing the map, you can test localization within the established sparse spatial map to check the success rate and accuracy. If the results are unsatisfactory, consider rebuilding a more complete map.

Positioning best practices

To ensure optimal positioning performance for users with sparse spatial maps, following these practices can improve success rates and enhance the user experience.

  • Guide users to position themselves within the corresponding scene of the map, such as providing preview images of the target scene to help them locate it.
  • Encourage users to move their devices slowly and attempt positioning from multiple angles.
  • Avoid areas with no visual features, reflective surfaces, or repetitive textures for positioning.

Common reasons for localization failure

When there is a significant difference between the user's localization environment and the environment during map construction, it may lead to localization failure, such as:

  • Perspective variation

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

  • Lighting differences

    Localization success is highest when the lighting conditions during mapping and localization are similar. For example, avoid attempting localization in complete darkness after mapping during the day.

  • Distance variation

    Move the phone during mapping to cover positions at different distances. For example, if mapping is done near a target at a distance of 1 meter, attempting localization at a distance of 10 meters may easily fail.

Further reading