InputFrame Class

This type is an EasyAR Sense API in C#: InputFrame . Some descriptions may not apply to Unity environment on this page.

Some parts of the Sense API may have already been wrapped into Unity components, and directly usages may not be necessary.

Description

Input frame.

It includes image, camera parameters, timestamp, camera transform matrix against world coordinate system, and tracking status,

among which, camera parameters, timestamp, camera transform matrix and tracking status are all optional, but specific algorithms may have special requirements on the input.


Methods

index

C#

public virtual int index()

Index, an automatic incremental value, which is different for every input frame.

image

C#

public virtual Image image()

Gets image.

hasCameraParameters

C#

public virtual bool hasCameraParameters()

Checks if there are camera parameters.

cameraParameters

C#

public virtual CameraParameters cameraParameters()

Gets camera parameters.

hasTemporalInformation

C#

public virtual bool hasTemporalInformation()

Checks if there is temporal information (timestamp).

timestamp

C#

public virtual double timestamp()

Timestamp. In seconds.

hasSpatialInformation

C#

public virtual bool hasSpatialInformation()

Checks if there is spatial information (cameraTransform and trackingStatus).

cameraTransform

C#

public virtual Matrix44F cameraTransform()

Camera transform matrix against world coordinate system. Camera coordinate system and world coordinate system are all right-handed. For the camera coordinate system, the origin is the optical center, x-right, y-up, and z in the direction of light going into camera. (The right and up, is right and up in the camera image, which can be different from these in the natural orientation of the device.) The data arrangement is row-major, not like OpenGL’s column-major.

cameraTransformType

C#

public virtual CameraTransformType cameraTransformType()

Camera transform type.

trackingStatus

C#

public virtual MotionTrackingStatus trackingStatus()

Gets device motion tracking status: MotionTrackingStatus .

motion

C#

public virtual Optional< MotionInputData > motion()

Motion input data.

tryCreate

C#

public static Optional<InputFrame> tryCreate( Image image, CameraParameters cameraParameters, double timestamp, Matrix44F cameraTransform, CameraTransformType cameraTransformType, MotionTrackingStatus trackingStatus)

Creates an instance.

createWithImageAndCameraParametersAndTemporal

C#

public static InputFrame createWithImageAndCameraParametersAndTemporal( Image image, CameraParameters cameraParameters, double timestamp)

Creates an instance with image, camera parameters, and timestamp.

createWithImageAndCameraParameters

C#

public static InputFrame createWithImageAndCameraParameters( Image image, CameraParameters cameraParameters)

Creates an instance with image and camera parameters. Nothing but CloudRecognizer can work with input created by this method.

createWithImage

C#

public static InputFrame createWithImage( Image image)

Creates an instance with image. Nothing but CloudRecognizer can work with input created by this method.