Type Definition realsense_rust::frame::DepthFrame[][src]

pub type DepthFrame = ImageFrame<Depth>;
Expand description

An ImageFrame type holding the raw pointer and derived metadata for an RS2 Depth frame.

All fields in this struct are initialized during struct creation (via try_from). Everything called from here during runtime should be valid as long as the Frame is in scope… like normal Rust.

Implementations

Given the 2D depth coordinate (x,y) provide the corresponding depth in metric units.

Warning

It is fairly expensive to use this in practice as it will copy the underlying pixel into a f32 value that gives you the direct distance. In practice getting DepthFrame::depth_units and then applying that to the raw data with ImageFrame::get is a much more efficient way to handle this.

Get the metric units currently used for reporting depth information.

Trait Implementations

Identifies the corresponding Rs2Extension for the type implementing this trait.

Identifies the stream kind corresponding to a given type implementing this trait.

Predicate for checking if the RS2 frame’s stream has the same kind as the frame category.