Skip to content

Commit

Permalink
Make some PCL functions accessible as filters
Browse files Browse the repository at this point in the history
* Statistical Outlier
* Radius Outlier
* Voxel Grid
* Moving Least Squares
* Grid Projection
* Poisson Surface Reconstruction
* Greedy Projection Triangulation

Enable pngmath extension within Sphinx.

Glob readers, writers, and filters in stage documentation.
  • Loading branch information
chambbj committed Sep 14, 2015
1 parent b9490d5 commit 170cc99
Show file tree
Hide file tree
Showing 29 changed files with 2,001 additions and 73 deletions.
3 changes: 1 addition & 2 deletions doc/conf.py
Expand Up @@ -25,7 +25,7 @@

# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = ['breathe', 'sphinx.ext.autodoc','rst2pdf.pdfbuilder']
extensions = ['breathe', 'sphinx.ext.autodoc', 'rst2pdf.pdfbuilder', 'sphinx.ext.pngmath']

# Add any paths that contain templates here, relative to this directory.
# templates_path = ['_templates']
Expand Down Expand Up @@ -304,4 +304,3 @@ def read_version(filename):
'project' : 'api',
'no-link' : False
}

20 changes: 20 additions & 0 deletions doc/stages/filters.greedyprojection.rst
@@ -0,0 +1,20 @@
.. _filters.greedyprojection:

===============================================================================
filters.greedyprojection
===============================================================================

The Greedy Projection filter passes data through the Point Cloud Library
(`PCL`_) GreedyProjectionTriangulation algorithm.

GreedyProjectionTriangulation is an implementation of a greedy triangulation
algorithm for 3D points based on local 2D projections. It assumes locally smooth
surfaces and relatively smooth transitions between areas with different point
densities.

.. _`PCL`: http://www.pointclouds.org

Options
-------------------------------------------------------------------------------

None at the moment. Relying on defaults within PCL.
20 changes: 20 additions & 0 deletions doc/stages/filters.gridprojection.rst
@@ -0,0 +1,20 @@
.. _filters.gridprojection:

===============================================================================
filters.gridprojection
===============================================================================

The Grid Projection filter passes data through the Point Cloud Library (`PCL`_)
GridProjection algorithm.

GridProjection is an implementation of the surface reconstruction method
described in [Li2010]_.

.. [Li2010] Li, Ruosi, et al. "Polygonizing extremal surfaces with manifold guarantees." Proceedings of the 14th ACM Symposium on Solid and Physical Modeling. ACM, 2010.
.. _`PCL`: http://www.pointclouds.org

Options
-------------------------------------------------------------------------------

None at the moment. Relying on defaults within PCL.
42 changes: 42 additions & 0 deletions doc/stages/filters.ground.rst
@@ -0,0 +1,42 @@
.. _filters.ground:

===============================================================================
filters.ground
===============================================================================

The Ground filter passes data through the Point Cloud Library (`PCL`_)
ProgressiveMorphologicalFilter algorithm.

ProgressiveMorphologicalFilter is an implementation of the method described in
[Zhang2003]_.

.. [Zhang2003] Zhang, Keqi, et al. "A progressive morphological filter for removing nonground measurements from airborne LIDAR data." Geoscience and Remote Sensing, IEEE Transactions on 41.4 (2003): 872-882.
.. _`PCL`: http://www.pointclouds.org

Options
-------------------------------------------------------------------------------

maxWindowSize
Maximum window size. [Default: **33**]

slope
Slope. [Default: **1.0**]

maxDistance
Maximum distance. [Default: **2.5**]

initialDistance
Initial distance. [Default: **0.15**]

cellSize
Cell Size. [Default: **1**]

classify
Apply classification labels? [Default: **true**]

extract
Extract ground returns? [Default: **false**]

approximate
Use approximate algorithm? [Default:: **false**]
22 changes: 22 additions & 0 deletions doc/stages/filters.movingleastsquares.rst
@@ -0,0 +1,22 @@
.. _filters.movingleastsquares:

===============================================================================
filters.movingleastsquares
===============================================================================

The Moving Least Squares filter passes data through the Point Cloud Library
(`PCL`_) MovingLeastSquares algorithm.

MovingLeastSquares is an implementation of the MLS (Moving Least Squares)
algorithm for data smoothing and improved normal estimation described in
[Alexa2003]_. It also contains methods for upsampling the resulting cloud based
on the parametric fit.

.. [Alexa2003] Alexa, Marc, et al. "Computing and rendering point set surfaces." Visualization and Computer Graphics, IEEE Transactions on 9.1 (2003): 3-15.
.. _`PCL`: http://www.pointclouds.org

Options
-------------------------------------------------------------------------------

None at the moment. Relying on defaults within PCL.
23 changes: 23 additions & 0 deletions doc/stages/filters.poisson.rst
@@ -0,0 +1,23 @@
.. _filters.poisson:

===============================================================================
filters.poisson
===============================================================================

The Poisson filter passes data through the Point Cloud Library (`PCL`_) Poisson
surface reconstruction algorithm.

Poisson is an implementation of the method described in [Kazhdan2006]_.

.. [Kazhdan2006] Kazhdan, Michael, Matthew Bolitho, and Hugues Hoppe. "Poisson surface reconstruction." Proceedings of the fourth Eurographics symposium on Geometry processing. Vol. 7. 2006.
.. _`PCL`: http://www.pointclouds.org

Options
-------------------------------------------------------------------------------

depth
Maximum depth of the tree used for reconstruction. [Default: **8**]

pointWeight
Importance of interpolation of point samples in the screened Poisson equation. [Default: **4.0**]
31 changes: 31 additions & 0 deletions doc/stages/filters.radiusoutlier.rst
@@ -0,0 +1,31 @@
.. _filters.radiusoutlier:

===============================================================================
filters.radiusoutlier
===============================================================================

The Radius Outlier filter passes data through the Point Cloud Library (`PCL`_)
RadiusOutlierRemoval algorithm.

RadiusOutlierRemoval filters points in a cloud based on the number of neighbors
they have. Iterates through the entire input once, and for each point, retrieves
the number of neighbors within a certain radius. The point will be considered an
outlier if it has too few neighbors, as determined by ``min_neighbors``. The
radius can be changed using ``radius``.

.. _`PCL`: http://www.pointclouds.org

Options
-------------------------------------------------------------------------------

min_neighbors
Minimum number of neighbors in radius. [Default: **2**]

radius
Radius. [Default: **1.0**]

classify
Apply classification labels? [Default: **true**]

extract
Extract ground returns? [Default: **false**]
40 changes: 40 additions & 0 deletions doc/stages/filters.statisticaloutlier.rst
@@ -0,0 +1,40 @@
.. _filters.statisticaloutlier:

===============================================================================
filters.statisticaloutlier
===============================================================================

The Statistical Outlier filter passes data through the Point Cloud Library
(`PCL`_) StatisticalOutlierRemoval algorithm.

StatisticalOutlierRemoval uses point neighborhood statistics to filter outlier
data. The algorithm iterates through the entire input twice. During the first
iteration it will compute the average distance that each point has to its
nearest k neighbors. The value of k can be set using ``mean_k``. Next, the mean
and standard deviation of all these distances are computed in order to determine
a distance threshold. The distance threshold will be equal to:
:math:`mean + stddev_mult * stddev`. The multiplier for the standard deviation
can be set using ``multiplier``. During the next iteration the points will be
classified as inlier or outlier if their average neighbor distance is below or
above this threshold respectively.

See [Rusu2008]_ for more information.

.. [Rusu2008] Rusu, Radu Bogdan, et al. "Towards 3D point cloud based object maps for household environments." Robotics and Autonomous Systems 56.11 (2008): 927-941.
.. _`PCL`: http://www.pointclouds.org

Options
-------------------------------------------------------------------------------

mean_k
Mean number of neighbors. [Default: **2**]

multiplier
Standard deviation threshold. [Default: **0.0**]

classify
Apply classification labels? [Default: **true**]

extract
Extract ground returns? [Default: **false**]
30 changes: 30 additions & 0 deletions doc/stages/filters.voxelgrid.rst
@@ -0,0 +1,30 @@
.. _filters.voxelgrid:

===============================================================================
filters.voxelgrid
===============================================================================

The Voxel Grid filter passes data through the Point Cloud Library (`PCL`_)
VoxelGrid algorithm.

VoxelGrid assembles a local 3D grid over a given PointCloud, and downsamples +
filters the data. The VoxelGrid class creates a *3D voxel grid* (think about a
voxel grid as a set of tiny 3D boxes in space) over the input point cloud data.
Then, in each *voxel* (i.e., 3D box), all the points present will be
approximated (i.e., *downsampled*) with their centroid. This approach is a bit
slower than approximating them with the center of the voxel, but it represents
the underlying surface more accurately.

.. _`PCL`: http://www.pointclouds.org

Options
-------------------------------------------------------------------------------

leaf_x
Leaf size in X dimension. [Default: **1.0**]

leaf_y
Leaf size in Y dimension. [Default: **1.0**]

leaf_z
Leaf size in Z dimension. [Default: **1.0**]
53 changes: 6 additions & 47 deletions doc/stages/index.rst
Expand Up @@ -10,65 +10,24 @@ Readers

.. toctree::
:maxdepth: 1
:glob:

readers.buffer
readers.faux
readers.geowave
readers.greyhound
readers.las
readers.mrsid
readers.nitf
readers.oci
readers.optech
readers.pcd
readers.pgpointcloud
readers.ply
readers.qfit
readers.rxp
readers.sbet
readers.sqlite
readers.*

Writers
=======

.. toctree::
:maxdepth: 1
:glob:

writers.derivative
writers.geowave
writers.las
writers.matlab
writers.nitf
writers.oci
writers.ply
writers.p2g
writers.pcd
writers.pgpointcloud
writers.pclvisualizer
writers.rialto
writers.sqlite
writers.text
writers.*

Filters
=======

.. toctree::
:maxdepth: 1
:glob:

filters.attribute
filters.colorization
filters.chipper
filters.crop
filters.decimation
filters.ferry
filters.hexbin
filters.mortonorder
filters.merge
filters.pclblock
filters.predicate
filters.programmable
filters.range
filters.reprojection
filters.sort
filters.stats
filters.transformation
filters.*
28 changes: 28 additions & 0 deletions plugins/pcl/CMakeLists.txt
Expand Up @@ -131,6 +131,34 @@ PDAL_ADD_PLUGIN(ground_filter_libname filter ground
FILES filters/GroundFilter.hpp filters/GroundFilter.cpp
LINK_WITH ${PCL_LIBRARIES})

PDAL_ADD_PLUGIN(statistical_outlier_filter_libname filter statisticaloutlier
FILES filters/StatisticalOutlierFilter.hpp filters/StatisticalOutlierFilter.cpp
LINK_WITH ${PCL_LIBRARIES})

PDAL_ADD_PLUGIN(radius_outlier_filter_libname filter radiusoutlier
FILES filters/RadiusOutlierFilter.hpp filters/RadiusOutlierFilter.cpp
LINK_WITH ${PCL_LIBRARIES})

PDAL_ADD_PLUGIN(voxelgrid_filter_libname filter voxelgrid
FILES filters/VoxelGridFilter.hpp filters/VoxelGridFilter.cpp
LINK_WITH ${PCL_LIBRARIES})

PDAL_ADD_PLUGIN(movingleastsquares_filter_libname filter movingleastsquares
FILES filters/MovingLeastSquaresFilter.hpp filters/MovingLeastSquaresFilter.cpp
LINK_WITH ${PCL_LIBRARIES})

PDAL_ADD_PLUGIN(gridprojection_filter_libname filter gridprojection
FILES filters/GridProjectionFilter.hpp filters/GridProjectionFilter.cpp
LINK_WITH ${PCL_LIBRARIES})

PDAL_ADD_PLUGIN(poisson_filter_libname filter poisson
FILES filters/PoissonFilter.hpp filters/PoissonFilter.cpp
LINK_WITH ${PCL_LIBRARIES})

PDAL_ADD_PLUGIN(greedyprojection_filter_libname filter greedyprojection
FILES filters/GreedyProjectionFilter.hpp filters/GreedyProjectionFilter.cpp
LINK_WITH ${PCL_LIBRARIES})

#
# PCL Kernel
#
Expand Down

0 comments on commit 170cc99

Please sign in to comment.