AugmentedImage

public class AugmentedImage

Describes the current best knowledge of a real-world augmented image.

ARCore will return an AugmentedImage once it initially detects the image in the environment, even if it does not yet have enough information to estimate its pose and physical size. In that case, the AugmentedImage will have the tracking state Paused. Specifying the optional physical size in the database will help speed up the initial pose and physical size estimation process. Note that an AugmentedImage can have tracking state PAUSED even if the overall motion tracking system is tracking (i.e. the frame's camera tracking state is TRACKING).

Public Methods

Anchor
createAnchor(Pose pose)
Creates an Anchor at the given Pose in the world coordinate space that is attached to this Trackable.
boolean
equals(Object obj)
Indicates whether some other object is a Trackable referencing the same logical trackable as this one.
Collection<Anchor>
getAnchors()
Gets the Anchors attached to this Trackable.
Pose
getCenterPose()
Returns the pose of the center of the augmented image, in world coordinates.
float
getExtentX()
Returns the estimated width, in metres, of the corresponding physical image, as measured along the local X-axis of the coordinate space centered on the image.
float
getExtentZ()
Returns the estimated height, in metres, of the corresponding physical image, as measured along the local Z-axis of the coordinate space centered on the image.
int
getIndex()
Returns the zero-based positional index of this augmented image from its originating image database.
String
getName()
Returns the name of this augmented image.
TrackingState
getTrackingState()
Gets this trackable's TrackingState.
int
hashCode()
Returns a hash code value for the object.

Inherited Methods

Public Methods

public Anchor createAnchor (Pose pose)

Creates an Anchor at the given Pose in the world coordinate space that is attached to this Trackable. The type of Trackable will determine the semantics of attachment and how the Anchor's Pose will be updated to maintain this relationship. Note that the relative offset between the Pose of multiple Anchors attached to a Trackable may adjust slightly over time as ARCore updates its model of the world.

Parameters
pose

public boolean equals (Object obj)

Indicates whether some other object is a Trackable referencing the same logical trackable as this one.

Parameters
obj the reference object with which to compare.
Returns
  • true if this object is the same as the obj argument; false otherwise.

public Collection<Anchor> getAnchors ()

Gets the Anchors attached to this Trackable.

public Pose getCenterPose ()

Returns the pose of the center of the augmented image, in world coordinates. The pose's transformed +Y axis will be the normal out of the plane. The pose's transformed +X axis points from left to right on the image, and the transformed +Z axis points from top to bottom on the image.

If the tracking state is PAUSED/STOPPED, this returns the pose when the image state was last TRACKING, or the identity pose if the image state has never been TRACKING.

public float getExtentX ()

Returns the estimated width, in metres, of the corresponding physical image, as measured along the local X-axis of the coordinate space centered on the image.

ARCore will attempt to estimate the physical image's width based on its understanding of the world. If the optional physical size is specified in the database, this estimation process will happen more quickly. However, the estimated size may be different from the specified size.

If the tracking state is PAUSED/STOPPED, this returns the estimated width when the image state was last TRACKING. If the image state has never been TRACKING, this returns 0, even the image has a specified physical size in the image database.

public float getExtentZ ()

Returns the estimated height, in metres, of the corresponding physical image, as measured along the local Z-axis of the coordinate space centered on the image.

ARCore will attempt to estimate the physical image's height based on its understanding of the world. If an optional physical size is specified in the database, this estimation process will happen more quickly. However, the estimated size may be different from the specified size.

If the tracking state is PAUSED/STOPPED, this returns the estimated height when the image state was last TRACKING. If the image state has never been TRACKING, this returns 0, even the image has a specified physical size in the image database.

public int getIndex ()

Returns the zero-based positional index of this augmented image from its originating image database.

This index serves as the unique identifier for the image in the database.

public String getName ()

Returns the name of this augmented image.

The image name is not guaranteed to be unique.

public TrackingState getTrackingState ()

Gets this trackable's TrackingState.

public int hashCode ()

Returns a hash code value for the object. This method is supported for the benefit of hash tables such as those provided by HashMap.

Returns
  • a hash code value for this object.
See Also

Send feedback about...