Depth Map
The CloneableDepthMap
structure enhances the basic depth map with additional, detailed information and capabilities. The depth map is typically collected from an iPhone lidar senser It includes the following:
depthMap
: A 2D array of floating-point numbers, providing the exact distance in meters for each pixel from the camera. Each array item corresponds to a pixel in an associated imageunprojectedDepth
: A 3D array of floating-point numbers representing the X, Y, and Z coordinates of each pixel in the scene. This unprojected data forms a 3D representation of the scene which can be used for further processing. Each coordinate corresponds to a pixel location in an imageconfidenceMap
: An optional 2D array of integers that indicate the confidence level of the depth data for each pixel. High values suggest that the depth data is highly reliable.refImgSize
: A tuple holding the width and height (in pixels) of the reference image from which the depth map was generated.depthSize
: A tuple holding the width and height (in pixels) of the depth data.
The CloneableDepthMap
also includes a unique identifier (UUID
), making it possible to track and manage individual depth maps in larger systems. Additionally, it implements the CloneableDataType
protocol, allowing it to be cloned, compared, and converted into other formats (like JSON) for use in different contexts or programming languages.
The depth information, combined with the regular image captured by the camera, enables software to understand the spatial layout and distance of objects in the scene. This is crucial for many applications, such as enhancing photography, constructing 3D models, and providing augmented reality experiences.
Last updated