PointCloudHelper

Static utilities for depth data transformations.

Types

Link copied to clipboard
open class ToFIntrinsics
Link copied to clipboard

Functions

Link copied to clipboard
open fun convertCamera2ToFToCameraSpace(tofDepthImage: Image, confidenceImage: Image, tofIntrinsics: PointCloudHelper.ToFIntrinsics, confidenceThreshold: Int, maxPoints: Int): Array<FloatBuffer>
Converts Camera2 ToF depth image to 3D points in camera space (no ARCore required).
Link copied to clipboard
open fun convertCamera2ToFToWorldSpace(tofDepthImage: Image, confidenceImage: Image, tofIntrinsics: PointCloudHelper.ToFIntrinsics, tofToRGBTransform: PointCloudHelper.ToFToRGBTransform, arCameraPose: Pose, confidenceThreshold: Int, maxPoints: Int): Array<FloatBuffer>
Converts Camera2 ToF depth image to 3D world-space points using ARCore tracking.
Link copied to clipboard
open fun convertImageToColorBuffer(color: Image, depth: Image, imageCoords: FloatBuffer, pointLimit: Int): FloatBuffer
Creates a linear buffer of RGB color values corresponding to the values in the depth image.
Link copied to clipboard
open fun convertImageToToFColorBuffer(cameraImage: Image, tofDepthImage: Image, tofIntrinsics: PointCloudHelper.ToFIntrinsics, imageCoords: FloatBuffer, maxPoints: Int): FloatBuffer
Matches RGB colors from ARCore camera image to ToF depth points.
Link copied to clipboard
open fun convertRawDepthImagesTo3dPointBuffer(depth: Image, confidence: Image, cameraTextureIntrinsics: CameraIntrinsics, pointLimit: Int): FloatBuffer
Creates a linear buffer of 3D point positions in the world space and the corresponding confidence values.
Link copied to clipboard
open fun convertToFDepthAndColorsInOnePass(yuvData: YuvData, rawDepthData: RawDepthData, tofIntrinsics: PointCloudHelper.ToFIntrinsics, imageCoords: FloatBuffer, maxPoints: Int): Array<FloatBuffer>
ULTRA-OPTIMIZED: Fused single-pass ToF depth unprojection + color matching.
Link copied to clipboard
open fun convertToFDepthTo3dPointBuffer(tofDepthImage: Image, tofIntrinsics: PointCloudHelper.ToFIntrinsics, maxPoints: Int): FloatBuffer
Converts ToF depth image to 3D points in camera space (matching ARCore convention).
Link copied to clipboard
Creates the transform from ToF camera to RGB camera coordinate systems.
Link copied to clipboard
Calculates the CPU image region that corresponds to the area covered by the depth image.
Link copied to clipboard
open fun getImageCoordinatesForToFTexture(cameraImage: Image, tofIntrinsics: PointCloudHelper.ToFIntrinsics, rgbIntrinsics: CameraIntrinsics): FloatBuffer
Calculates the CPU image region for ToF camera coordinates.
Link copied to clipboard
open fun unprojectDepthPixelToWorld(cameraImageX: Int, cameraImageY: Int, cameraImage: Image, depthImage: Image, cameraTextureIntrinsics: CameraIntrinsics, cameraPose: Pose): Vector3
Unprojects a single 2D pixel coordinate (from the camera image) into a 3D world-space coordinate.
Link copied to clipboard
open fun unprojectFromBuffers(pixelX: Int, pixelY: Int, yuvData: YuvData, rawDepthData: RawDepthData, intrinsics: CameraIntrinsics, cameraPose: Pose): Vector3
Unprojects a 2D pixel coordinate from the camera image to a 3D world-space coordinate.