Struct CameraIntrinsics | Package Manager UI website
docs.unity3d.com
    Show / Hide Table of Contents

    Struct CameraIntrinsics

    Camera intrinsics describe physical characteristics of a camera.

    Inherited Members
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetType()
    Namespace: UnityEngine.XR.ARExtensions
    Syntax
    public struct CameraIntrinsics : IEquatable<CameraIntrinsics>
    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

    CameraIntrinsics(Vector2, Vector2, Vector2Int)

    Constructs a CameraIntrinsics from the given parameters

    Declaration
    public CameraIntrinsics(Vector2 focalLength, Vector2 principalPoint, Vector2Int resolution)
    Parameters
    Type Name Description
    Vector2 focalLength

    The focal length in pixels

    Vector2 principalPoint

    The principla 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 Vector2 focalLength { get; }
    Property Value
    Type Description
    Vector2
    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 Vector2 principalPoint { get; }
    Property Value
    Type Description
    Vector2
    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 Vector2Int resolution { get; }
    Property Value
    Type Description
    Vector2Int

    Methods

    Equals(Object)

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    System.Object obj
    Returns
    Type Description
    System.Boolean
    Overrides
    System.ValueType.Equals(System.Object)

    Equals(CameraIntrinsics)

    Declaration
    public bool Equals(CameraIntrinsics other)
    Parameters
    Type Name Description
    CameraIntrinsics other
    Returns
    Type Description
    System.Boolean

    GetHashCode()

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    System.Int32
    Overrides
    System.ValueType.GetHashCode()

    ToString()

    Converts the intrinsics to a string, suitable for debug logging.

    Declaration
    public override string ToString()
    Returns
    Type Description
    System.String

    A human-readable string representation of the intrinsics

    Overrides
    System.ValueType.ToString()

    Operators

    Equality(CameraIntrinsics, CameraIntrinsics)

    Declaration
    public static bool operator ==(CameraIntrinsics lhs, CameraIntrinsics rhs)
    Parameters
    Type Name Description
    CameraIntrinsics lhs
    CameraIntrinsics rhs
    Returns
    Type Description
    System.Boolean

    Inequality(CameraIntrinsics, CameraIntrinsics)

    Declaration
    public static bool operator !=(CameraIntrinsics lhs, CameraIntrinsics rhs)
    Parameters
    Type Name Description
    CameraIntrinsics lhs
    CameraIntrinsics rhs
    Returns
    Type Description
    System.Boolean
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023