Spatial mapping (also called 3D reconstruction) is the ability to create a 3D map of the environment. It allows a device to understand and interact with the real world. Spatial mapping is useful for collision avoidance, motion planning and realistic blending of the real and virtual world.

How It Works

The ZED continuously scans its surroundings and creates a 3D map of what it sees. This map is updated as the device is moved around and capturing new elements in the scene. Since the camera perceives distances beyond the range of traditional RGB-D sensors, it can quickly reconstruct 3D maps of large indoor and outdoor areas.

Mapping data is saved relative to a fixed reference coordinate frame, the World Frame. If Spatial Memory is enabled and an Area file is used, the map can be loaded repeatedly across sessions and will always appear in the same physical location.

Capturing a 3D Mesh

Spatial mapping represents the real-world geometry as a single triangular mesh. The mesh can be extracted continuously as it gets updated or just once after mapping a whole area.

Spatial Mapping Parameters

Spatial mapping creates triangle meshes with vertices, faces and normals attached to each vertex. Spatial mapping resolution and range can be adjusted at initialization, and texture can be recorded to color the final model. The final mesh can also be decimated using mesh filter to reduce polygon count. To learn more, see the Using the API page.

Mapping Resolution

Controls the level of detail of the mesh. The higher the number of faces on a model, the finer the detail you can capture. Resolution can be set between 1cm and 12cm. Capturing maps with high triangle density requires more memory and resources, use the lowest density possible for your application.

Mapping Range

Controls the range of the depth data used to build the model. Increasing the range allows to capture larger volumes quickly at the cost of accuracy. Range can be set between 1m to 12m. Reduce the range to improve spatial mapping performance.

Mesh Filtering

To improve performance, it is often desirable to reduce the number of polygons per mesh after capture. Mesh filter lets you decimate and optimize 3D models to reduce polygon count while preserving desirable geometric features.

Three presets are available: HIGH, MEDIUM and LOW. The LOW filtering mode simply fills holes and cleans mesh outliers, while the two other modes perform mesh decimation. Try the different presets to select the one that best suits your application.

Mesh Texturing

The mesh can be colored by projecting the 2D images captured during spatial mapping onto the 3D model surface. This step is called mesh texturing.

To create the texture, a subset of the left camera images is recorded during mapping. Each image is processed and assembled into a single texture map. This texture map is then projected onto each face of the 3D mesh using UV coordinates automatically generated.