Frame

public class Frame

Captures the state and changes to the AR system from a call to Session.update().

Public Methods

Image
acquireCameraImage()
Attempts to acquire an image from the camera that corresponds to the current frame.
Image
acquireDepthImage()
This method is deprecated. Please use acquireDepthImage16Bits() instead, which expands the depth range from 8191mm to 65535mm. This deprecated version may be slower than acquireDepthImage16Bits() due to the clearing of the top 3 bits per pixel.
Image
acquireDepthImage16Bits()
Attempts to acquire a depth Android Image object that corresponds to the current frame.
PointCloud
acquirePointCloud()
Acquires the current set of estimated 3d points attached to real-world geometry.
Image
acquireRawDepthConfidenceImage()
Attempts to acquire the confidence Android Image object corresponding to the raw depth image of the current frame.
Image
acquireRawDepthImage()
This method is deprecated. Please use acquireRawDepthImage16Bits() instead, which expands the depth range from 8191mm to 65535mm. This deprecated version may be slower than acquireRawDepthImage16Bits() due to the clearing of the top 3 bits per pixel.
Image
acquireRawDepthImage16Bits()
Attempts to acquire a "raw", mostly unfiltered, depth Android Image object that corresponds to the current frame.
Image
acquireSemanticConfidenceImage()
Attempts to acquire the semantic confidence image corresponding to the current frame.
Image
acquireSemanticImage()
Attempts to acquire the semantic image corresponding to the current frame.
long
getAndroidCameraTimestamp()
Returns the (Android Camera timestamp) of the image.
Pose
getAndroidSensorPose()
Returns the pose of the Android Sensor Coordinate System in the world coordinate space for this frame.
Camera
getCamera()
Returns the Camera object for the session.
int
getCameraTextureName()
Returns the OpenGL ES camera texture name (id) associated with this frame.
HardwareBuffer
getHardwareBuffer()
Gets the HardwareBuffer for this frame.
ImageMetadata
getImageMetadata()
Returns the camera metadata for the current camera image, if available.
LightEstimate
getLightEstimate()
Returns the current ambient light estimate, if light estimation was enabled.
float
getSemanticLabelFraction(SemanticLabel queryLabel)
Retrieves the percentage of pixels in the most recent semantics image that are queryLabel.
long
getTimestamp()
Returns the timestamp in nanoseconds when this image was captured.
Collection<Anchor>
getUpdatedAnchors()
Returns the anchors that were changed by the Session.update() that returned this Frame.
Collection<TrackData>
getUpdatedTrackData(UUID trackUuid)
Retrieve all track data that was written to the specified track during the current frame.
<T extends Trackable> Collection<T>
getUpdatedTrackables(Class<T> filterType)
Returns the trackables of a particular type that were changed by the Session.update() that returned this Frame.
boolean
hasDisplayGeometryChanged()
Checks if the display rotation or viewport geometry changed since the previous Frame.
List<HitResult>
hitTest(MotionEvent motionEvent)
Similar to hitTest(float, float), but will take values from Android MotionEvent.
List<HitResult>
hitTest(float[] origin3, int originOffset, float[] direction3, int directionOffset)
Similar to hitTest(float, float), but takes an arbitrary ray in world space coordinates instead of a screen-space point.
List<HitResult>
hitTest(float xPx, float yPx)
Performs a ray cast from the user's device in the direction of the given location in the camera view.
List<HitResult>
hitTestInstantPlacement(float xPx, float yPx, float approximateDistanceMeters)
Performs a ray cast that can return a result before ARCore establishes full tracking.
void
recordTrackData(UUID trackId, ByteBuffer sample)
Writes a data sample in the specified track.
void
transformCoordinates2d(Coordinates2d inputCoordinates, FloatBuffer inputVertices2d, Coordinates2d outputCoordinates, FloatBuffer outputVertices2d)
Transforms a list of 2D coordinates from one 2D coordinate system to another 2D coordinate system.
void
transformCoordinates2d(Coordinates2d inputCoordinates, float[] inputVertices2d, Coordinates2d outputCoordinates, float[] outputVertices2d)
Transforms a list of 2D coordinates from one 2D coordinate system to another 2D coordinate system.
void
transformCoordinates3d(Coordinates2d inputCoordinates, FloatBuffer inputVertices2d, Coordinates3d outputCoordinates, FloatBuffer outputVertices3d)
Transforms a list of 2D coordinates from one 2D coordinate system to 3D coordinate space.
void
transformCoordinates3d(Coordinates2d inputCoordinates, float[] inputVertices2d, Coordinates3d outputCoordinates, float[] outputVertices3d)
Transforms a list of 2D coordinates from one 2D coordinate system to another 3D coordinate system.
void
transformDisplayUvCoords(FloatBuffer uvCoords, FloatBuffer outUvCoords)
This method is deprecated. Replaced by frame.transformCoordinates2d(Coordinates2d.VIEW_NORMALIZED, .., Coordinates2d.TEXTURE_NORMALIZED, ..).

Inherited Methods

Public Methods