class DepthPointCloudGenerator (Niantic.ARDK.AR.Awareness.Depth.Generators.DepthPointCloudGenerator)

Overview

This class takes in a frame of DepthBuffer raw data and generates a point cloud based on it and the camera intrinsics. More...

class DepthPointCloudGenerator: IDisposable {
public:
    // properties

    Vector3[] PointCloud;

    // methods

    DepthPointCloudGenerator();
    void Dispose();
    IDepthPointCloud GeneratePointCloud(IDepthBuffer depthBuffer, IARCamera camera);
};

Detailed Documentation

This class takes in a frame of DepthBuffer raw data and generates a point cloud based on it and the camera intrinsics.

Properties

Vector3[] PointCloud

The output of this class. Contains a point for every point on the DepthBuffer, stored as a flat two-dimensional array.

Methods

DepthPointCloudGenerator()

Constructs a new generator.

Parameters:

settings

User-controlled settings specific to this generator. Cached.

depthBuffer

Depth buffer used to initialize the generator. Not cached.

IDepthPointCloud GeneratePointCloud(IDepthBuffer depthBuffer, IARCamera camera)

Uses the compute shaders to generate the a point cloud from the depth image. Each pixel in the depth image will be turned into a 3d point in world space (defined by the inverseViewMat and the focal length). Each 3d point can optionally be categorized.

Parameters:

depthBuffer

A depth buffer with which to generate a point cloud

Returns:

A point cloud based on the depth buffer