Skip to main content Link Search Menu Expand Document (external link)

@pointcloud attribute

:electric_plug: dp.kinect dp.kinect2 dp.kinect3 dp.oak
:information_source: signature
pointcloud {POINTCLOUD_STRING | POINTCLOUD_INT}
:house: values
off or 0
no pointcloud output default
xyz or 1
pointcloud with XYZ values
xyzw or 2
pointcloud with XYZW values, W=1.0
:bulb: examples
gldepth @pointcloud xyz
gldepth @pointcloud 1

Format of pointcloud output as three or four floating point values.

  • XYZ: real-world XYZ location of the point with three float32 values
  • XYZW: real-world XYZW location of the point with four float32 values. W is always 1.0. This format is often useful when transforming the pointcloud with matrix math or OpenGL shaders.

:warning: Pointcloud output requires the optional fifth outlet enabled with the plugin argument gldepth.

The matrix output on this fifth outlet is a jitter matrix having three or four planes, same dimensions as the depthmap, and contains floating point values representing the real-world location of every depth pixel in the depthmap.

Send an XYZ pointcloud matrix to the first inlet of a (jit.gl.mesh) to visually see a point cloud. These 3-value matrices are compatible with the OpenGL matrix format.

Use @align to align color/depth/ir/playermap data with the pointcloud xyz values. This enables scenarios like overlaying the colormap pixels on to the pointcloud points.

Optional Pointcloud Outlet

Plugins only have four matrix outlets by default. Enable the optional fifth outlet for pointclouds by typing the argument gldepth when you create your plugin object. Next, control the pointcloud output format using @pointcloud.

dp.kinect2 gldepth @depthmap 1 @pointcloud 1