createFromToF

fun createFromToF(session: Session, frame: Frame, toFCamera: ToFCamera, withAnchor: Boolean = true, toF2DAnalysisLogs: Boolean = false): FrameData?

Creates FrameData from ToF sensor depth with matched RGB colors from ARCore camera. This allows ToF depth to follow the same rendering and collection pipeline as ARCore depth.

Return

FrameData with ToF depth and matched RGB colors, or null on error

Parameters

session

ARCore session

frame

Current ARCore frame (provides camera image and pose)

tofDepthImage

ToF depth image from Camera2 API

tofIntrinsics

ToF camera intrinsics

withAnchor

Whether to create anchor at camera pose