# Class ARImageAnchor

java.lang.Object
com.codename1.ar.ARAnchor
com.codename1.ar.ARImageAnchor

public class ARImageAnchor extends ARAnchor
An anchor tracking a recognized `ARReferenceImage` in the real world. The anchor pose is centered on the physical image with local X/Z spanning the image surface. Delivered through the session's `ARAnchorListener`; use `instanceof` to distinguish image anchors from plain anchors.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ARImageAnchor(String id, ARPose pose, String referenceImageName, float estimatedPhysicalWidth)`
  Creates an image anchor.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `float`
  `getEstimatedPhysicalWidth()`
  The platform's estimate of the physical image width in meters.
  `String`
  `getReferenceImageName()`
  The name of the recognized reference image.

  ### Methods inherited from class ARAnchor

  `detach, getId, getNode, getPose, getTrackingState, isDetached, setNode`

  ### Methods inherited from class Object

  `clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### ARImageAnchor

    public ARImageAnchor(String id, ARPose pose, String referenceImageName, float estimatedPhysicalWidth)

    Creates an image anchor. Intended for platform implementations and tests.

    ###### Parameters

    - `id`: the stable identifier of this anchor

    - `pose`: the initial world pose, centered on the physical image

    - `referenceImageName`: the `ARReferenceImage#getName()` of the recognized image

    - `estimatedPhysicalWidth`: the platform's estimate of the physical image width in meters

- ## Method Details

  - ### getReferenceImageName

    public String getReferenceImageName()
    The name of the recognized reference image.

  - ### getEstimatedPhysicalWidth

    public float getEstimatedPhysicalWidth()
    The platform's estimate of the physical image width in meters. May differ slightly from the registered `ARReferenceImage#getPhysicalWidthMeters()`.