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).

Nested Classes

enum AugmentedImage.TrackingMethod Indicates whether an image is being tracked using the camera image, or is being tracked based on its last known pose. 

Public Methods

Anchor
createAnchor(Pose pose)
Creates an anchor that is attached to this trackable, using the given initial pose in the world coordinate space.
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.
AugmentedImage.TrackingMethod
TrackingState
getTrackingState()
Gets this trackable's TrackingState.
int
hashCode()
Returns a hash code value for the object.

Inherited Methods

Public Methods

createAnchor

public Anchor createAnchor(
  Pose pose
)

Creates an anchor that is attached to this trackable, using the given initial pose in the world coordinate space. 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.

Details
Parameters
pose

equals

public boolean equals(
  Object obj
)

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

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

getAnchors

public Collection<Anchor> getAnchors()

Gets the Anchors attached to this trackable.

getCenterPose

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.

getExtentX

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.

getExtentZ

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.

getIndex

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.

getName

public String getName()

Returns the name of this augmented image.

The image name is not guaranteed to be unique.

getTrackingMethod

public AugmentedImage.TrackingMethod getTrackingMethod()

getTrackingState

public TrackingState getTrackingState()

Gets this trackable's TrackingState.

hashCode

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.

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