STRUCT
ArdkFrameData.CameraPlane
public struct CameraPlane: Equatable
A single plane of camera image data.
Camera images often contain multiple planes of data (Y, U, V for YUV format, etc.). This structure describes the memory layout and dimensions of a single image plane.
Properties
dataPtr
public var dataPtr: UnsafePointer\<UInt8\>
Pointer to the raw pixel data for this plane.
The data format depends on the image format and plane index. For example, in YUV format, plane 0 contains luminance data.
dataSize
public var dataSize: UInt32
Total size of the data in bytes.
This represents the complete size of the memory buffer
pointed to by dataPtr.
pixelStride
public var pixelStride: UInt32
Number of bytes between adjacent pixels in the same row.
For packed formats this is typically 1, but some formats may have multiple bytes per pixel or padding between pixels.
rowStride
public var rowStride: UInt32
Number of bytes between the start of adjacent rows.
This may be larger than width * pixelStride if there
is padding at the end of each row.
Methods
init(dataPtr:dataSize:pixelStride:rowStride:)
public init(dataPtr: UnsafePointer\<UInt8\>,
dataSize: UInt32,
pixelStride: UInt32,
rowStride: UInt32)
Creates a camera plane with the specified memory layout parameters.
- Parameters:
- dataPtr: Pointer to the raw pixel data
- dataSize: Total size of the data in bytes
- pixelStride: Bytes between adjacent pixels
- rowStride: Bytes between adjacent rows
Parameters
| Name | Description |
|---|---|
| dataPtr | Pointer to the raw pixel data |
| dataSize | Total size of the data in bytes |
| pixelStride | Bytes between adjacent pixels |
| rowStride | Bytes between adjacent rows |