CameraIntrinsics

public class CameraIntrinsics

Provides information about the physical characteristics of the device camera, for the camera image (CPU) or texture (GPU). The CameraIntrinsics is a long-lived object, and the properties of CameraIntrinsics may be updated every time Session.update() is called.

Public Methods

float[]
getFocalLength()
Returns the camera's focal length in pixels.
void
getFocalLength(float[] focalLength, int offset)
Returns the camera's focal length in pixels.
void
getImageDimensions(int[] dimensions, int offset)
Returns the camera's image dimensions.
int[]
getImageDimensions()
Returns a int[2] containing the image dimensions.
float[]
getPrincipalPoint()
Returns a float[2] containing the principal point.
void
getPrincipalPoint(float[] principalPoint, int offset)
Returns the camera's principal point.

Inherited Methods

Public Methods

getFocalLength

public float[] getFocalLength()

Returns the camera's focal length in pixels.

The focal length is conventionally represented in pixels. For a detailed explanation, please see Disecting the Camera Matrix, Part 3: The Intrinsic Matrix. Pixels-to-meters conversion can use SENSOR_INFO_PHYSICAL_SIZE and SENSOR_INFO_PIXEL_ARRAY_SIZE in the Android Characteristics API.

Details
Returns a float[2] containing the focal length. The order of values is {fx, fy}.

getFocalLength

public void getFocalLength(
  float[] focalLength,
  int offset
)

Returns the camera's focal length in pixels.

The focal length is conventionally represented in pixels. For a detailed explanation, please see Disecting the Camera Matrix, Part 3: The Intrinsic Matrix. Pixels-to-meters conversion can use SENSOR_INFO_PHYSICAL_SIZE and SENSOR_INFO_PIXEL_ARRAY_SIZE in the Android Characteristics API.

Details
Parameters
focalLength storage for at least 2 floats representing the focal length. The order of values is {fx, fy}.
offset the offset in focalLength at which to begin writing the focal length values.

getImageDimensions

public void getImageDimensions(
  int[] dimensions,
  int offset
)

Returns the camera's image dimensions. The order of values is {width, height}.

Details
Parameters
dimensions storage for at least 2 ints representing the image's width and height.
offset the offset in dimensions at which to begin writing the image dimension's values.

getImageDimensions

public int[] getImageDimensions()

Returns a int[2] containing the image dimensions. The order of values is {width, height}.

getPrincipalPoint

public float[] getPrincipalPoint()

Returns a float[2] containing the principal point. The order of values is {cx, cy}.

getPrincipalPoint

public void getPrincipalPoint(
  float[] principalPoint,
  int offset
)

Returns the camera's principal point. The order of values is {cx, cy}.

Details
Parameters
principalPoint storage for at least 2 floats representing the principal point.
offset the offset in principalPoint at which to begin writing the principal point's values.