Page Summary
-
CameraIntrinsics provides information about the physical characteristics of the device camera.
-
The properties of CameraIntrinsics may be updated every time Session.update() is called.
-
CameraIntrinsics includes methods to get the camera's focal length, image dimensions, and principal point.
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
public float[] getFocalLength ()
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}. |
public void getFocalLength (float[] focalLength, int offset)
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.
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. |
public void getImageDimensions (int[] dimensions, int offset)
getImageDimensions
public void getImageDimensions ( int [] dimensions , int offset )
Returns the camera's image dimensions. The order of values is {width, height}.
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. |
public int[] getImageDimensions ()
getImageDimensions
public int [] getImageDimensions ()
Returns a int[2]
containing the image dimensions. The order of values is {width,
height}.
public float[] getPrincipalPoint ()
getPrincipalPoint
public float [] getPrincipalPoint ()
Returns a float[2]
containing the principal point. The order of values is {cx, cy}.
public void getPrincipalPoint (float[] principalPoint, int offset)
getPrincipalPoint
public void getPrincipalPoint ( float [] principalPoint , int offset )
Returns the camera's principal point. The order of values is {cx, cy}.
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. |

