Skip to main content
API Reference com.nianticspatial.nsdk

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 FrameData

Properties

NameTypeSummary
cameraImageFormatInt
Format of the camera image data. Should be ImageFormat.YUV_420_888 for valid image data, or 0 if no image data is provided.
cameraImageHeightInt
Height of the camera image in pixels. Should match the height of the image data in [cameraImagePlanes].
cameraImagePlanesArray<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.
cameraImageWidthInt
Width of the camera image in pixels. Should match the width of the image data in [cameraImagePlanes].
cameraIntrinsicsCameraIntrinsics?
Camera intrinsic calibration parameters. Contains focal length, principal point, and lens distortion parameters needed for accurate 3D reconstruction and computer vision processing.
cameraPosePose?
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.
cameraTimestampMsLong
-
compassCompass?
Most recent compass/magnetometer data from the device. Provides magnetic heading information that can improve ARDK's localization accuracy, especially for VPS.
depthConfidenceDataByteArray?
Per-pixel depth confidence (UInt8). Same dimensions as [depthImageData].
depthImageDataFloatArray?
Depth image buffer (Float32, meters per pixel). Used with [depthConfidenceData] and [depthImageDataWidth]/[depthImageDataHeight].
depthImageDataHeightInt
Height of the depth image in pixels.
depthImageDataWidthInt
Width of the depth image in pixels.
depthImageIntrinsicsCameraIntrinsics?
Depth camera intrinsics; when null, native may use camera intrinsics with depth dimensions.
frameIdLong
-
locationLocation?
Most recent GPS location data from the device. Provides coarse geographic location that helps ARDK with area-based features like VPS coverage queries.
screenOrientationOrientation
Device orientation when this frame was captured. The physical orientation of the device (portrait, landscape, etc.) which affects how ARDK interprets camera data.
trackingStateTrackingState
ARCore tracking state when this frame was captured. Indicates the quality and reliability of the camera pose and tracking information for this frame.