Several point cloud resampling algorithms (octree-based, random, etc.)
More...
#include <CloudSamplingTools.h>
|
static PointCloud * | resampleCloudWithOctreeAtLevel (GenericIndexedCloudPersist *cloud, unsigned char octreeLevel, RESAMPLING_CELL_METHOD resamplingMethod, GenericProgressCallback *progressCb=nullptr, DgmOctree *inputOctree=nullptr) |
| Resamples a point cloud (process based on the octree) More...
|
|
static GenericIndexedCloud * | resampleCloudWithOctree (GenericIndexedCloudPersist *cloud, int newNumberOfPoints, RESAMPLING_CELL_METHOD resamplingMethod, GenericProgressCallback *progressCb=nullptr, DgmOctree *inputOctree=nullptr) |
| Resamples a point cloud (process based on the octree) More...
|
|
static ReferenceCloud * | subsampleCloudWithOctreeAtLevel (GenericIndexedCloudPersist *cloud, unsigned char octreeLevel, SUBSAMPLING_CELL_METHOD subsamplingMethod, GenericProgressCallback *progressCb=nullptr, DgmOctree *inputOctree=nullptr) |
| Subsamples a point cloud (process based on the octree) More...
|
|
static ReferenceCloud * | subsampleCloudWithOctree (GenericIndexedCloudPersist *cloud, int newNumberOfPoints, SUBSAMPLING_CELL_METHOD subsamplingMethod, GenericProgressCallback *progressCb=nullptr, DgmOctree *inputOctree=nullptr) |
| Subsamples a point cloud (process based on the octree) More...
|
|
static ReferenceCloud * | subsampleCloudRandomly (GenericIndexedCloudPersist *cloud, unsigned newNumberOfPoints, GenericProgressCallback *progressCb=nullptr) |
| Subsamples a point cloud (process based on random selections) More...
|
|
static ReferenceCloud * | resampleCloudSpatially (GenericIndexedCloudPersist *cloud, PointCoordinateType minDistance, const SFModulationParams &modParams, DgmOctree *octree=nullptr, GenericProgressCallback *progressCb=nullptr) |
| Resamples a point cloud (process based on inter point distance) More...
|
|
static ReferenceCloud * | sorFilter (GenericIndexedCloudPersist *cloud, int knn=6, double nSigma=1.0, DgmOctree *octree=nullptr, GenericProgressCallback *progressCb=nullptr) |
| Statistical Outliers Removal (SOR) filter. More...
|
|
static ReferenceCloud * | noiseFilter (GenericIndexedCloudPersist *cloud, PointCoordinateType kernelRadius, double nSigma, bool removeIsolatedPoints=false, bool useKnn=false, int knn=6, bool useAbsoluteError=true, double absoluteError=0.0, DgmOctree *octree=nullptr, GenericProgressCallback *progressCb=nullptr) |
| Noise filter based on the distance to the approximate local surface. More...
|
|
Several point cloud resampling algorithms (octree-based, random, etc.)
◆ applyNoiseFilterAtLevel()
"Cellular" function to apply the noise filter inside an octree cell
This function is meant to be applied to all cells of the octree (it is of the form DgmOctree::localFunctionPtr).
- Parameters
-
cell | structure describing the cell on which processing is applied |
additionalParameters | see method description |
nProgress | optional (normalized) progress notification (per-point) |
◆ applySORFilterAtLevel()
"Cellular" function to apply the SOR filter inside an octree cell
This function is meant to be applied to all cells of the octree (it is of the form DgmOctree::localFunctionPtr).
- Parameters
-
cell | structure describing the cell on which processing is applied |
additionalParameters | see method description |
nProgress | optional (normalized) progress notification (per-point) |
◆ noiseFilter()
Noise filter based on the distance to the approximate local surface.
This filter removes points based on their distance relatively to the best fit plane computed on their neighbors.
- Parameters
-
cloud | the point cloud to resample |
kernelRadius | neighborhood radius |
nSigma | number of sigmas under which the points should be kept |
removeIsolatedPoints | whether to remove isolated points (i.e. with 3 points or less in the neighborhood) |
useKnn | whether to use a constant number of neighbors instead of a radius |
knn | number of neighbors (if useKnn is true) |
useAbsoluteError | whether to use an absolute error instead of 'n' sigmas |
absoluteError | absolute error (if useAbsoluteError is true) |
octree | associated octree if available |
progressCb | the client application can get some notification of the process progress through this callback mechanism (see GenericProgressCallback) |
- Returns
- a reference cloud corresponding to the filtered cloud
◆ resampleCellAtLevel()
"Cellular" function to replace one set of points (contained in an octree cell) by a unique point
This function is meant to be applied to all cells of the octree (it is of the form DgmOctree::localFunctionPtr). It replaces all points in a cell by a unique one, according to different rules. Method parameters (defined in "additionalParameters") are :
- (PointCloud*) point cloud to store new points
- (RESAMPLING_CELL_METHOD*) resampling method
- Parameters
-
cell | structure describing the cell on which processing is applied |
additionalParameters | see method description |
nProgress | optional (normalized) progress notification (per-point) |
◆ resampleCloudSpatially()
Resamples a point cloud (process based on inter point distance)
The cloud is resampled so that there is no point nearer than a given distance to other points It works by picking a reference point, removing all points which are to close to this point, and repeating these two steps until the result is reached
- Parameters
-
cloud | the point cloud to resample |
minDistance | the distance under which a point in the resulting cloud cannot have any neighbour |
modParams | parameters of the subsampling behavior modulation with a scalar field (optional) |
octree | associated octree if available |
progressCb | the client application can get some notification of the process progress through this callback mechanism (see GenericProgressCallback) |
- Returns
- a reference cloud corresponding to the resampling 'selection'
◆ resampleCloudWithOctree()
Resamples a point cloud (process based on the octree)
Same as 'resampleCloudWithOctreeAtLevel' method, apart the fact that instead of giving a specific octree subdivision level as input parameter, one can specify an approximative number of points for the resulting cloud (algorithm will automatically determine the corresponding octree level).
- Parameters
-
cloud | the point cloud to resample |
newNumberOfPoints | desired number of points (approximative) |
resamplingMethod | resampling method (applied to each octree cell) |
progressCb | the client application can get some notification of the process progress through this callback mechanism (see GenericProgressCallback) |
inputOctree | if the octree has been already computed, it can be used by the process (avoid recomputation) |
- Returns
- the resampled cloud (new cloud)
◆ resampleCloudWithOctreeAtLevel()
Resamples a point cloud (process based on the octree)
A resampling algorithm is applied inside each cell of the octree. The different resampling methods are represented as an enumerator (see RESAMPLING_CELL_METHOD) and consist in simple processes such as replacing all the points lying in a cell by the cell center or by the points gravity center.
- Parameters
-
cloud | the point cloud to resample |
octreeLevel | the octree level at which to perform the resampling process |
resamplingMethod | resampling method (applied to each octree cell) |
progressCb | the client application can get some notification of the process progress through this callback mechanism (see GenericProgressCallback) |
inputOctree | if the octree has been already computed, it can be used by the process (avoid recomputation) |
- Returns
- the resampled cloud (new cloud)
◆ sorFilter()
Statistical Outliers Removal (SOR) filter.
This filter removes points based on their mean distance to their distance (by comparing it to the average distance of all points to their neighbors). It is equivalent to PCL StatisticalOutlierRemoval filter (see http://pointclouds.org/documentation/tutorials/statistical_outlier.php)
- Parameters
-
cloud | the point cloud to resample |
knn | number of neighbors |
nSigma | number of sigmas under which the points should be kept |
octree | associated octree if available |
progressCb | the client application can get some notification of the process progress through this callback mechanism (see GenericProgressCallback) |
- Returns
- a reference cloud corresponding to the filtered cloud
◆ subsampleCellAtLevel()
"Cellular" function to select a unique point inside an octree cell
This function is meant to be applied to all cells of the octree (it is of the form DgmOctree::localFunctionPtr). It chooses one point from the set of points inside a cell, according to different rules. Method parameters (defined in "additionalParameters") are :
- (ReferenceCloud*) reference point cloud to store selected points
- (SUBSAMPLING_CELL_METHOD*) subampling method
- Parameters
-
cell | structure describing the cell on which processing is applied |
additionalParameters | see method description |
nProgress | optional (normalized) progress notification (per-point) |
◆ subsampleCloudRandomly()
Subsamples a point cloud (process based on random selections)
A very simple subsampling algorithm that simply consists in selecting "n" different points, in a random way.
- Parameters
-
cloud | point cloud to subsample |
newNumberOfPoints | desired number of points (exact) |
progressCb | the client application can get some notification of the process progress through this callback mechanism (see GenericProgressCallback) |
- Returns
- a reference cloud corresponding to the subsampling 'selection'
◆ subsampleCloudWithOctree()
Subsamples a point cloud (process based on the octree)
Same as 'subsampleCloudWithOctreeAtLevel' method, apart the fact that instead of giving a specific octree subdivision level as input parameter, one can specify an approximative number of points for the resulting cloud (algorithm will automatically determine the corresponding octree level).
- Parameters
-
cloud | point cloud to subsample |
newNumberOfPoints | desired number of points (approximative) |
subsamplingMethod | resampling method (applied to each octree cell) |
progressCb | the client application can get some notification of the process progress through this callback mechanism (see GenericProgressCallback) |
inputOctree | if the octree has been already computed, it can be used by the process (avoid recomputation) |
- Returns
- a reference cloud corresponding to the subsampling 'selection'
◆ subsampleCloudWithOctreeAtLevel()
Subsamples a point cloud (process based on the octree)
A subsampling algorithm is applied inside each cell of the octree. The different subsampling methods are represented as an enumerator (see SUBSAMPLING_CELL_METHOD) and consist in simple processes such as choosing a random point, or the one closest to the cell center.
- Parameters
-
cloud | point cloud to subsample |
octreeLevel | octree level at which to perform the subsampling process |
subsamplingMethod | subsampling method (applied to each octree cell) |
progressCb | the client application can get some notification of the process progress through this callback mechanism (see GenericProgressCallback) |
inputOctree | if the octree has been already computed, it can be used by the process (avoid recomputation) |
- Returns
- a reference cloud corresponding to the subsampling 'selection'
The documentation for this class was generated from the following files:
- CloudSamplingTools.h
- CloudSamplingTools.cpp