pub struct DepthFrameCapture { /* private fields */ }Expand description
Manages the Kinect sensor and provides access to depth frame data.
This struct is responsible for initializing and holding the necessary Kinect resources to capture depth frames.
Implementations§
Source§impl DepthFrameCapture
impl DepthFrameCapture
Sourcepub fn new() -> Result<Self, Error>
pub fn new() -> Result<Self, Error>
Creates a new DepthFrameCapture instance.
This function initializes the default Kinect sensor, opens it, and sets up the depth frame source and reader.
§Errors
Returns an error if the Kinect sensor cannot be initialized, opened, or if the depth frame source is not active.
Sourcepub fn iter(&self) -> Result<DepthFrameCaptureIter, Error>
pub fn iter(&self) -> Result<DepthFrameCaptureIter, Error>
Returns an iterator over depth frames.
The iterator will block waiting for new frames. Each item yielded by
the iterator is a Result<DepthFrameData, Error>, allowing for error
handling during frame acquisition.
§Errors
Returns an error if it fails to subscribe to the frame arrived event, which is necessary for the iterator to function.