Struct XRCameraFrame
Represents a frame captured by the device camera with included metadata.
Implements
Inherited Members
Namespace: UnityEngine.XR.ARSubsystems
Assembly: solution.dll
Syntax
public struct XRCameraFrame : IEquatable<XRCameraFrame>
Constructors
Properties
| Name | Description |
|---|---|
| ambientSphericalHarmonics | The ambient spherical harmonic coefficients that represent the real-world lighting. |
| averageBrightness | The average pixel intensity of the frame in gamma color space, used to match the intensity of light in the real-world environment. Values are in the range [0.0, 1.0] with zero being black and one being white. |
| averageColorTemperature | The estimated color temperature of ambient light in the frame, in degrees Kelvin. |
| averageIntensityInLumens | The estimated intensity of the real-world environment, in lumens. Represents an average of directional light sources. |
| cameraGrain | A texture that simulates the camera's noise. |
| colorCorrection | The estimated color correction value of the frame. |
| displayMatrix | The 4x4 display matrix for the frame. Defines how to render the frame to the screen. |
| exposureDuration | The camera exposure duration of the frame, in seconds with sub-millisecond precision. |
| exposureOffset | The camera exposure offset of the frame for lighting scaling. |
| hasAmbientSphericalHarmonics | Indicates whether ambientSphericalHarmonics was assigned a value. |
| hasAverageBrightness | Indicates whether averageBrightness was assigned a value. |
| hasAverageColorTemperature | Indicates whether averageColorTemperature was assigned a value. |
| hasAverageIntensityInLumens | Indicates whether averageIntensityInLumens was assigned a value. |
| hasCameraGrain | Indicates whether cameraGrain was assigned a value. |
| hasColorCorrection | Indicates whether colorCorrection was assigned a value. |
| hasDisplayMatrix | Indicates whether displayMatrix was assigned a value. |
| hasExposureDuration | Indicates whether exposureDuration was assigned a value. |
| hasExposureOffset | Indicates whether exposureOffset was assigned a value. |
| hasMainLightColor | Indicates whether mainLightColor was assigned a value. |
| hasMainLightDirection | Indicates whether mainLightDirection was assigned a value. |
| hasMainLightIntensityLumens | Indicates whether mainLightIntensityLumens was assigned a value. |
| hasNoiseIntensity | Indicates whether noiseIntensity was assigned a value. |
| hasProjectionMatrix | Indicates whether projectionMatrix was assigned a value. |
| hasTimestamp | Indicates whether timestampNs was assigned a value. |
| mainLightColor | The estimated color of the strongest directional light source in the real-world environment. |
| mainLightDirection | The estimated direction of the strongest directional light source in the real-world environment. |
| mainLightIntensityLumens | The estimated intensity in lumens of the strongest directional light source in the real-world environment. |
| nativePtr | The native pointer associated with this frame. The data pointed to by this pointer is specific to provider implementation. |
| noiseIntensity | The level of intensity of camera grain noise in a scene. |
| projectionMatrix | The 4x4 projection matrix for the frame. |
| properties | The set of flags that indicates which properties are included in the frame. |
| timestampNs | The timestamp of the frame, in nanoseconds. |
| trackingState | The camera's TrackingState when this frame was captured. |
Methods
| Name | Description |
|---|---|
| Equals(object) | Compares for equality. |
| Equals(XRCameraFrame) | Compares for equality. |
| GetHashCode() | Generates a hash code suitable for use in |
| ToString() | Generates a string representation of this XRCameraFrame suitable for debugging purposes. |
| TryGetAverageBrightness(out float) | Get the average brightness of the frame if possible. |
| TryGetAverageColorTemperature(out float) | Get the estimated color temperature of the frame if possible. |
| TryGetAverageIntensityInLumens(out float) | Get the estimated intensity in lumens of the real-world environment, if possible. |
| TryGetDisplayMatrix(out Matrix4x4) | Get the display matrix for the frame if possible. |
| TryGetExifData(out XRCameraFrameExifData) | Get the frame's EXIF data, if possible. |
| TryGetProjectionMatrix(out Matrix4x4) | Get the projection matrix for the frame if possible. |
| TryGetTimestamp(out long) | Get the timestamp of the frame if possible. |
Operators
| Name | Description |
|---|---|
| operator ==(XRCameraFrame, XRCameraFrame) | Compares |
| operator !=(XRCameraFrame, XRCameraFrame) | Compares |