pub struct DepthFrameData {
pub width: u32,
pub height: u32,
pub timestamp: u64,
pub depth_min_reliable_distance: u16,
pub depth_max_reliable_distance: u16,
pub data: Arc<[u16]>,
}Fields§
§width: u32§height: u32§timestamp: u64§depth_min_reliable_distance: u16§depth_max_reliable_distance: u16§data: Arc<[u16]>Implementations§
Source§impl DepthFrameData
impl DepthFrameData
pub fn new(depth_frame: &DepthFrame) -> Result<Self, Error>
Sourcepub fn depth_to_meters(&self, depth_value: u16) -> f32
pub fn depth_to_meters(&self, depth_value: u16) -> f32
Converts depth values to meters.
The depth values from the Kinect are in millimeters. This method provides a convenient way to convert them to meters.
Sourcepub fn is_depth_reliable(&self, depth_value: u16) -> bool
pub fn is_depth_reliable(&self, depth_value: u16) -> bool
Checks if a depth value is within the reliable range.
The Kinect has minimum and maximum reliable distances. This method helps determine if a depth reading is trustworthy.
Trait Implementations§
Source§impl Clone for DepthFrameData
impl Clone for DepthFrameData
Source§fn clone(&self) -> DepthFrameData
fn clone(&self) -> DepthFrameData
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DepthFrameData
impl Debug for DepthFrameData
Auto Trait Implementations§
impl Freeze for DepthFrameData
impl RefUnwindSafe for DepthFrameData
impl Send for DepthFrameData
impl Sync for DepthFrameData
impl Unpin for DepthFrameData
impl UnwindSafe for DepthFrameData
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more