ARDK for Android/com.nianticlabs.ardk/FrameData
FrameData
class FrameData(val cameraTimestampMs: Long, val frameId: Long)
Container for all frame data sent to ARDK for processing.
FrameData encapsulates camera frames, sensor data, and metadata that ARDK uses for tracking, mapping, VPS localization, and other AR features. Create one FrameData instance per camera frame and populate it with available sensor data before calling ARDKSession.sendFrame.
Required Data
- cameraTimestampMs - Frame timestamp for synchronization
- frameId - Unique identifier for this frame
Optional Data
- cameraImagePlanes - Camera image data (YUV420_888 format)
- cameraPose - Camera pose in world coordinates
- cameraIntrinsics - Camera calibration parameters
- location - GPS location data
- compass - Compass/magnetometer data
- screenOrientation - Device orientation
- trackingState - ARCore tracking state
Parameters
androidJvm
| cameraTimestampMs | Camera image timestamp in milliseconds since epoch |
| frameId | Unique identifier for this frame (increment or use timestamp) |
See also
| ARDKSession.sendFrame |
| ARDKSession.getRequestedDataFormats |
Samples
Constructors
| FrameData | [androidJvm] constructor(cameraTimestampMs: Long, frameId: Long) |
Properties
| Name | Summary |
|---|---|
| cameraImageFormat | [androidJvm] var cameraImageFormat: Int Format of the camera image data. |
| cameraImageHeight | [androidJvm] var cameraImageHeight: Int Height of the camera image in pixels. |
| cameraImagePlanes | [androidJvm] var cameraImagePlanes: Array<Image.Plane>? Camera image data as YUV420_888 format planes. |
| cameraImageWidth | [androidJvm] var cameraImageWidth: Int Width of the camera image in pixels. |
| cameraIntrinsics | [androidJvm] var cameraIntrinsics: CameraIntrinsics? Camera intrinsic calibration parameters. |
| cameraPose | [androidJvm] var cameraPose: Pose? Camera pose in world coordinates. |
| cameraTimestampMs | [androidJvm] val cameraTimestampMs: Long |
| compass | [androidJvm] var compass: Compass? Most recent compass/magnetometer data from the device. |
| frameId | [androidJvm] val frameId: Long |
| location | [androidJvm] var location: Location? Most recent GPS location data from the device. |
| screenOrientation | [androidJvm] var screenOrientation: Orientation Device orientation when this frame was captured. |
| trackingState | [androidJvm] var trackingState: TrackingState ARCore tracking state when this frame was captured. |