CameraImage
readonly struct NatML.Devices.CameraImage
Camera images contain pixel buffers along with EXIF metadata captured by CameraDevice
instances.
Inspecting the Image Size
Camera images provide information about their size:
Image Width
The image width.
Image Height
The image height.
Inspecting the Image Timestamp
The image timestamp in nanoseconds.
For camera images generated by CameraDevice
instances, the timestamp is based on the system media clock.
Inspecting the Image Format
The image format. Only a fixed set of image formats are supported:
Image Format
Checking for Mirroring
Some camera devices generate images that are vertically mirrored, depending on their facing. This property reports whether images should be mirrored to correct this transformation.
Accessing the Pixel Buffer
The camera image contains either an interleaved or planar pixel buffer, depending on the image format
.
Interleaved Images
For interleaved images, the pixelBuffer
contains a contiguous pixel buffer with the pixel data.
Pixel buffers may contain padding bytes, defined by the image rowStride
.
For planar images, the pixelBuffer
is uninitialized.
Planar Images
For planar images, the planes
contains an array of CameraImage.Plane
instances referring to each plane within the image.
For interleaved images, the planes
property is null
.
Inspecting the Camera Device
The device
identifies the camera device that the image was generated from.
Inspecting EXIF Metadata
Camera images can provide their EXIF metadata:
All metadata fields are nullable types.
Exposure Bias
The exposure bias value in EV.
Exposure Duration
The exposure duration in seconds.
Sensor Sensitivity (ISO)
The sensor sensitivity ISO value.
Focal Length
The camera focal length in millimeters.
F-number
The image aperture f-number.
Brightness
The ambient brightness.
Intrinsic Matrix
The camera intrinsic matrix in row-major layout.
Last updated