MLDepthFeature
abstract class NatML.Features.MLDepthFeature : MLFeature
This feature is used to provide depth data to predictors that require such data. Implementers can derive from this class and provide custom logic for sampling depth given a pixel location.
Creating the Feature
The depth feature is constructed by specifying the feature size. The data type is assumed to be float32
. If the data type is different, the full feature type can be specified instead:
Inspecting the Feature
The depth feature exposes its underlying type
, along with convenience properties for inspecting the aforementioned type
.
Feature Type
Depth Map Width
The depth feature provides this convenience property for accessing the width
of the feature type
.
Depth Map Height
The depth feature provides this convenience property for accessing the height
of the feature type
.
Sampling Pixel Depth
The depth feature defines the Sample
method for sampling the depth at a given normalized viewport coordinate.
The depth unit is assumed to be in meters, except defined otherwise by implementations.
Projecting to 3D Space
The depth feature defines the ViewportToWorldPoint
for projecting a normalized 2D viewport point into 3D space using its underlying depth data.
Last updated
Was this helpful?