Plane

readonly struct NatML.Devices.CameraImage.Plane

The Plane defines a plane buffer within a planar or semi-planar image.

Accessing the Pixel Buffer

/// <summary>
/// Pixel buffer.
/// </summary>
NativeArray<byte> buffer { get; }

The buffer contains the pixel data for this plane.

Inspecting the Plane Size

Camera image planes provide information about their size:

Plane Width

/// <summary>
/// Plane width.
/// </summary>
int width { get; }

The plane width.

Plane Height

/// <summary>
/// Plane height.
/// </summary>
int height { get; }

The plane height.

Inspecting the Row Stride

/// <summary>
/// Row stride in bytes.
/// </summary>
int rowStride { get; }

The buffer might contain padding bytes to satisfy alignment requirements, so the rowStride defines the byte size of each scan line in the plane data.

Inspecting the Pixel Stride

/// <summary>
/// Pixel stride in bytes.
/// </summary>
int pixelStride { get; }

For semi-planar images, the planeStride determines the stride of the plane pixels in bytes.

Last updated