Struct XRCameraIntrinsics
Camera intrinsics describe physical characteristics of a camera.
Namespace: UnityEngine.XR.ARSubsystems
Syntax
public struct XRCameraIntrinsics : IEquatable<XRCameraIntrinsics>
Remarks
These intrinsics are based on a pinhole camera model. A pinhole camera is a simple type of lens-less camera, a box with a single pinhole in one side. Rays of light enter the pinhole and land on the opposite wall of the box (the image plane), forming an image. Most cameras use larger apertures with lenses to focus the light, but the pinhole camera provides a simplified mathematical model.
Constructors
XRCameraIntrinsics(Vector2, Vector2, Vector2Int)
Constructs a XRCameraIntrinsics from the given parameters.
Declaration
public XRCameraIntrinsics(Vector2 focalLength, Vector2 principalPoint, Vector2Int resolution)
Parameters
Type | Name | Description |
---|---|---|
Vector2 | focalLength | The focal length in pixels. |
Vector2 | principalPoint | The principal point from the top-left of the image, in pixels. |
Vector2Int | resolution | The dimensions of the image. |
Properties
focalLength
The focal length in pixels.
Declaration
public readonly Vector2 focalLength { get; }
Property Value
Type | Description |
---|---|
Vector2 | The focal length in pixels. |
Remarks
The focal length is the distance between the camera's pinhole and the image plane. In a pinhole camera, the x and y values would be the same, but these can vary for real cameras.
principalPoint
The principal point from the top-left corner of the image, expressed in pixels.
Declaration
public readonly Vector2 principalPoint { get; }
Property Value
Type | Description |
---|---|
Vector2 | The principal point from the top-left corner of the image, expressed in pixels. |
Remarks
The principal point is the point of intersection between the image plane and a line perpendicular to the image plane passing through the camera's pinhole.
resolution
The dimensions of the image in pixels.
Declaration
public readonly Vector2Int resolution { get; }
Property Value
Type | Description |
---|---|
Vector2Int | The dimensions of the image in pixels. |
Methods
Equals(System.Object)
Declaration
public override bool Equals(System.Object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj |
Returns
Type | Description |
---|---|
Boolean |
Equals(XRCameraIntrinsics)
Declaration
public bool Equals(XRCameraIntrinsics other)
Parameters
Type | Name | Description |
---|---|---|
XRCameraIntrinsics | other |
Returns
Type | Description |
---|---|
Boolean |
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
Int32 |
ToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
String |
Operators
Equality(XRCameraIntrinsics, XRCameraIntrinsics)
Declaration
public static bool operator ==(XRCameraIntrinsics lhs, XRCameraIntrinsics rhs)
Parameters
Type | Name | Description |
---|---|---|
XRCameraIntrinsics | lhs | |
XRCameraIntrinsics | rhs |
Returns
Type | Description |
---|---|
Boolean |
Inequality(XRCameraIntrinsics, XRCameraIntrinsics)
Declaration
public static bool operator !=(XRCameraIntrinsics lhs, XRCameraIntrinsics rhs)
Parameters
Type | Name | Description |
---|---|---|
XRCameraIntrinsics | lhs | |
XRCameraIntrinsics | rhs |
Returns
Type | Description |
---|---|
Boolean |