pub struct BodyIndexFrameCapture { /* private fields */ }Expand description
Manages the Kinect sensor and provides access to body index frame data.
This struct is responsible for initializing and holding the necessary Kinect resources to capture body index frames.
Implementations§
Source§impl BodyIndexFrameCapture
impl BodyIndexFrameCapture
Sourcepub fn new() -> Result<Self, Error>
pub fn new() -> Result<Self, Error>
Creates a new BodyIndexFrameCapture instance.
This function initializes the default Kinect sensor, opens it, and sets up the body index frame source and reader.
§Errors
Returns an error if the Kinect sensor cannot be initialized, opened, or if the body index frame source is not active.
Sourcepub fn iter(&self) -> Result<BodyIndexFrameCaptureIter, Error>
pub fn iter(&self) -> Result<BodyIndexFrameCaptureIter, Error>
Returns an iterator over body index frames.
The iterator will block waiting for new frames. Each item yielded by
the iterator is a Result<BodyIndexFrameData, 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.