Skip to main content

STRUCT

ArdkFrameData.CameraIntrinsics

public struct CameraIntrinsics: Equatable

Camera intrinsic parameters for geometric calibration.

This structure contains the internal geometric properties of the camera, including focal length, principal point, and resolution. These parameters are essential for accurate 3D reconstruction and AR tracking.

Properties​

focalLengthX​

public var focalLengthX: Float

Focal length in the X direction (in pixels).

This represents the camera's focal length scaled by the horizontal pixel density. Used for projecting 3D points to 2D image coordinates.

focalLengthY​

public var focalLengthY: Float

Focal length in the Y direction (in pixels).

This represents the camera's focal length scaled by the vertical pixel density. May differ from focalLengthX if pixels are not square.

principalPointX​

public var principalPointX: Float

Principal point X coordinate (in pixels).

The X coordinate of the principal point, which is the intersection of the optical axis with the image plane. Ideally at the image center.

principalPointY​

public var principalPointY: Float

Principal point Y coordinate (in pixels).

The Y coordinate of the principal point, which is the intersection of the optical axis with the image plane. Ideally at the image center.

resolutionX​

public var resolutionX: UInt32

Image width in pixels.

resolutionY​

public var resolutionY: UInt32

Image height in pixels.

Methods​

init(intrinsics:resolution:)​

public init(intrinsics: simd_float3x3, resolution: CGSize)

Creates camera intrinsics from a 3x3 intrinsic matrix and resolution.

  • Parameters:
    • intrinsics: The 3x3 camera intrinsic matrix
    • resolution: Image resolution as CGSize

Parameters​

NameDescription
intrinsicsThe 3x3 camera intrinsic matrix
resolutionImage resolution as CGSize

init(intrinsics:width:height:)​

public init(intrinsics: simd_float3x3, width: UInt32, height: UInt32)

Creates camera intrinsics from a 3x3 intrinsic matrix and dimensions.

The intrinsic matrix should be in the standard computer vision format:

[fx  0  cx]
[ 0 fy cy]
[ 0 0 1]
  • Parameters:
    • intrinsics: The 3x3 camera intrinsic matrix
    • width: Image width in pixels
    • height: Image height in pixels

Parameters​

NameDescription
intrinsicsThe 3x3 camera intrinsic matrix
widthImage width in pixels
heightImage height in pixels