RawImage
A raw image containing pixel data for NSDK operations....
Declaration
struct RawImageSummary
A raw image containing pixel data for NSDK operations.
RawImage provides access to image data in various formats (RGB, grayscale,
depth, etc.) used by NSDK features like depth processing, semantic segmentation,
and image analysis.
Overview
Raw images are used throughout NSDK for:
- Camera frame processing
- Depth map representation
- Semantic segmentation results
- Image format conversions
- Computer vision operations
Example Usage
let (status, depthResult) = depthSession.getDepth()
if status.isOk() {
let image = depthResult.image
print("Image size: \(image.width) x \(image.height)")
print("Image type: \(image.type)")
// Access pixel data
let pixelData = image.data
// Process pixel data based on image type
}
Memory Management
This object's pointers are only valid when the NSDK objects that holds it are still in scope.
Constructors
init(ptr: UnsafeMutableRawPointer, width: UInt, height: UInt, type: ImageType)
Properties
| Name | Type | Summary |
|---|---|---|
| let data | UnsafeMutableRawPointer | |
| let height | UInt | Height of the image in pixels. This represents the number of rows in the image. |
| let type | ImageType | 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 width | UInt | Width of the image in pixels. This represents the number of pixels in each row of the image. |
This provides direct access to the image's pixel data. The format and
interpretation of the data depends on the
typeproperty.