Skip to main content
API Reference NSDK

NSDKImage

Provides a view into the data buffer of an image output by the NSDK....

Declaration

struct NSDKImage

Summary

Provides a view into the data buffer of an image output by the NSDK. NSDKImage provides access to image data in various formats (RGB, grayscale, depth, etc.) used by NSDK features like depth processing, semantic segmentation, and image analysis.

Memory Management

The image provides a non-copying view into native image data managed by NSDK. Access to the pixel buffer is only valid for the duration of withUnsafeBytes(_:). The raw pointer passed to the closure must not be stored or used outside its scope.


Properties

NameTypeSummary
let heightUInt
Height of the image in pixels.
This represents the number of rows in the image.
let typeImageType
Format and type of the image data.
This indicates how the pixel data should be interpreted, including
the number of channels, data type, and color space.
let widthUInt
Width of the image in pixels.
This represents the number of pixels in each row of the image.

Methods

NameTypeSummary
withUnsafeBytes<R>(_ bodyR
Provides temporary, read-only access to the raw pixel buffer backing the image.

Nested Types

Enums

NameTypeSummary
ImageTypeImageType
Enum representing various image types supported by NSDK.