Click or drag to resize

PointCloudDownsample Method

Downsample the point cloud in-place

Namespace:  Zivid.NET
Assembly:  ZividCoreNET (in ZividCoreNET.dll) Version: 2.14.0.0
Syntax
public PointCloud Downsample(
	PointCloudDownsampling downsampling
)

Parameters

downsampling
Type: Zivid.NETPointCloudDownsampling
This enum defines the size of the downsampled point cloud

Return Value

Type: PointCloud
Remarks
Downsampling is used to reduce the number of points in the point cloud. Downsampling is performed by combining a 2x2, 3x3 or 4x4 region of pixels in the original point cloud to one pixel in the new point cloud. A downsampling factor of 2x2 will reduce width and height each to half, and thus the overall number of points to 1/4. 3x3 downsampling reduces width and height each to 1/3, and the overall number of points to 1/9, and so on. X, Y and Z coordinates are downsampled by computing the SNR^2 weighted average of each point in the corresponding NxN region in the original point cloud, ignoring invalid (NaN) points. Color is downsampled by computing the average value for each color channel in the NxN region. SNR value is downsampled by computing the square root of the sum of SNR^2 of each valid (non-NaN) point in the NxN region. If all points in the NxN region are invalid (NaN), the downsampled SNR is set to the max SNR in the region. Downsampling is performed on the compute device. The point cloud is modified in-place. Use Downsampled(PointCloudDownsampling) if you want to downsample to a new PointCloud instance. Downsampling can be repeated multiple times to further reduce the size of the point cloud, if desired. Note that the width or height of the point cloud is not required to divide evenly by the downsampling factor (2, 3 or 4). The new width and height equals the original width and height divided by the downsampling factor, rounded down. In this case the remaining columns at the right and/or rows at the bottom of the original point cloud are ignored.
See Also