UnorganizedPointCloudVoxelDownsampled Method |
Create a new point cloud that is a voxel downsampling of this point cloud
Namespace:
Zivid.NET
Assembly:
ZividCoreNET (in ZividCoreNET.dll) Version: 2.16.0.0
Syntaxpublic UnorganizedPointCloud VoxelDownsampled(
float voxelSize,
int minPointsPerVoxel
)
Public Function VoxelDownsampled (
voxelSize As Single,
minPointsPerVoxel As Integer
) As UnorganizedPointCloud
public:
UnorganizedPointCloud^ VoxelDownsampled(
float voxelSize,
int minPointsPerVoxel
)
Parameters
- voxelSize
- Type: SystemSingle
The size of the voxel cubes (must be greater than 0.0) - minPointsPerVoxel
- Type: SystemInt32
The minimum number of points required to fill a voxel (must be 1 or greater)
Return Value
Type:
UnorganizedPointCloudA new point cloud containing the voxel downsampled data
Remarks
Voxel downsampling subdivides 3D space into a grid of cubic voxels with a given size. If a given voxel
contains a number of points at or above the given limit, all those source points are replaced with a single
point with the following properties:
-
Position (XYZ) is an SNR-weighted average of the source points' positions, i.e. a high-confidence
source point will have a greater influence on the resulting position than a low-confidence one.
-
Color (RGBA) is the average of the source points' colors.
-
Signal-to-noise ratio (SNR) is sqrt(sum(SNR^2)) of the source points' SNR values, i.e. the SNR of
a new point will increase with both the number and the confidence of the source points that were used
to compute its position.
Using `minPointsPerVoxel > 1` is particularly useful for removing noise and artifacts from unorganized
point clouds that are a combination of structured point clouds captured from different angles. This is
because a given artifact is most likely only present in one of the captures, and `minPointsPerVoxel` can be
used to only fill voxels that both captures "agree" on.
See Also