FrameData
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 [NSDKSession.sendFrame]. ## Required Data - [cameraTimestampMs] - Frame timestamp for synchronization - [frameId] - Unique identifier for this frame ## Optional Data - [cameraImagePlanes] - Camera image data (YUV420_888 format) - [cameraImageWidth] - Width of the camera image in pixels - [cameraImageHeight] - Height of the camera image in pixels - [cameraImageFormat] - Format of the camera image (YUV_420_888 or 0 if none) - [cameraPose] - Camera pose in world coordinates - [cameraIntrinsics] - Camera calibration parameters - [depthImageData] - Depth buffer (Float32, meters per pixel) - [depthConfidenceData] - Per-pixel depth confidence (UInt8) - [depthImageDataWidth] - Width of the depth image in pixels - [depthImageDataHeight] - Height of the depth image in pixels - [depthImageIntrinsics] - Depth camera intrinsics (falls back to scaled camera intrinsics if null) - [location] - GPS location data - [compass] - Compass/magnetometer data - [screenOrientation] - Device orientation - [trackingState] - ARCore tracking state
Declaration
class FrameDataProperties
| Name | Type | Summary |
|---|---|---|
| cameraImageFormat | Int | |
| cameraImageHeight | Int | Height of the camera image in pixels. Should match the height of the image data in [cameraImagePlanes]. |
| cameraImagePlanes | Array<Plane>? | Camera image data as YUV420_888 format planes. The raw camera image data used for computer vision processing. Should be in Android's YUV_420_888 format from the camera. |
| cameraImageWidth | Int | Width of the camera image in pixels. Should match the width of the image data in [cameraImagePlanes]. |
| cameraIntrinsics | CameraIntrinsics? | Camera intrinsic calibration parameters. Contains focal length, principal point, and lens distortion parameters needed for accurate 3D reconstruction and computer vision processing. |
| cameraPose | Pose? | Camera pose in world coordinates. The 6-DOF pose (position and orientation) of the camera in world space. This is typically provided by ARCore's tracking system. |
| cameraTimestampMs | Long | - |
| compass | Compass? | Most recent compass/magnetometer data from the device. Provides magnetic heading information that can improve ARDK's localization accuracy, especially for VPS. |
| depthConfidenceData | ByteArray? | Per-pixel depth confidence (UInt8). Same dimensions as [depthImageData]. |
| depthImageData | FloatArray? | Depth image buffer (Float32, meters per pixel). Used with [depthConfidenceData] and [depthImageDataWidth]/[depthImageDataHeight]. |
| depthImageDataHeight | Int | Height of the depth image in pixels. |
| depthImageDataWidth | Int | Width of the depth image in pixels. |
| depthImageIntrinsics | CameraIntrinsics? | Depth camera intrinsics; when null, native may use camera intrinsics with depth dimensions. |
| frameId | Long | - |
| location | Location? | Most recent GPS location data from the device. Provides coarse geographic location that helps ARDK with area-based features like VPS coverage queries. |
| screenOrientation | Orientation | Device orientation when this frame was captured. The physical orientation of the device (portrait, landscape, etc.) which affects how ARDK interprets camera data. |
| trackingState | TrackingState | ARCore tracking state when this frame was captured. Indicates the quality and reliability of the camera pose and tracking information for this frame. |
ImageFormat.YUV_420_888for valid image data, or0if no image data is provided.