Registry.cpp
Go to the documentation of this file.
1 // vim: ts=4:sw=4:noexpandtab
2 /*
3 
4 Copyright (c) 2010--2012,
5 François Pomerleau and Stephane Magnenat, ASL, ETHZ, Switzerland
6 You can contact the authors at <f dot pomerleau at gmail dot com> and
7 <stephane at magnenat dot net>
8 
9 All rights reserved.
10 
11 Redistribution and use in source and binary forms, with or without
12 modification, are permitted provided that the following conditions are met:
13  * Redistributions of source code must retain the above copyright
14  notice, this list of conditions and the following disclaimer.
15  * Redistributions in binary form must reproduce the above copyright
16  notice, this list of conditions and the following disclaimer in the
17  documentation and/or other materials provided with the distribution.
18  * Neither the name of the <organization> nor the
19  names of its contributors may be used to endorse or promote products
20  derived from this software without specific prior written permission.
21 
22 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
23 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
24 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
25 DISCLAIMED. IN NO EVENT SHALL ETH-ASL BE LIABLE FOR ANY
26 DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
27 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
28 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
29 ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
31 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 
33 */
34 
35 #include "PointMatcher.h"
36 #include "PointMatcherPrivate.h"
37 
38 #include "LoggerImpl.h"
39 #include "TransformationsImpl.h"
40 #include "DataPointsFiltersImpl.h"
41 #include "MatchersImpl.h"
42 #include "OutlierFiltersImpl.h"
43 #include "ErrorMinimizersImpl.h"
45 #include "InspectorsImpl.h"
46 
47 #include <cassert>
48 #include <iostream>
49 #include <limits>
50 
51 using namespace std;
52 using namespace PointMatcherSupport;
53 
55 InvalidElement::InvalidElement(const std::string& reason):
56  runtime_error(reason)
57 {}
58 
60 template<typename T>
62 {
63  ADD_TO_REGISTRAR_NO_PARAM(Transformation, RigidTransformation, typename TransformationsImpl<T>::RigidTransformation)
64  ADD_TO_REGISTRAR_NO_PARAM(Transformation, PureTranslation, typename TransformationsImpl<T>::PureTranslation)
65 
92 
93  ADD_TO_REGISTRAR_NO_PARAM(Matcher, NullMatcher, typename MatchersImpl<T>::NullMatcher)
94  ADD_TO_REGISTRAR(Matcher, KDTreeMatcher, typename MatchersImpl<T>::KDTreeMatcher)
95  ADD_TO_REGISTRAR(Matcher, KDTreeVarDistMatcher, typename MatchersImpl<T>::KDTreeVarDistMatcher)
96 
97  ADD_TO_REGISTRAR_NO_PARAM(OutlierFilter, NullOutlierFilter, typename OutlierFiltersImpl<T>::NullOutlierFilter)
98  ADD_TO_REGISTRAR(OutlierFilter, MaxDistOutlierFilter, typename OutlierFiltersImpl<T>::MaxDistOutlierFilter)
99  ADD_TO_REGISTRAR(OutlierFilter, MinDistOutlierFilter, typename OutlierFiltersImpl<T>::MinDistOutlierFilter)
100  ADD_TO_REGISTRAR(OutlierFilter, MedianDistOutlierFilter, typename OutlierFiltersImpl<T>::MedianDistOutlierFilter)
101  ADD_TO_REGISTRAR(OutlierFilter, TrimmedDistOutlierFilter, typename OutlierFiltersImpl<T>::TrimmedDistOutlierFilter)
102  ADD_TO_REGISTRAR(OutlierFilter, VarTrimmedDistOutlierFilter, typename OutlierFiltersImpl<T>::VarTrimmedDistOutlierFilter)
103  ADD_TO_REGISTRAR(OutlierFilter, SurfaceNormalOutlierFilter, typename OutlierFiltersImpl<T>::SurfaceNormalOutlierFilter)
104  ADD_TO_REGISTRAR(OutlierFilter, GenericDescriptorOutlierFilter, typename OutlierFiltersImpl<T>::GenericDescriptorOutlierFilter)
105  ADD_TO_REGISTRAR(OutlierFilter, RobustOutlierFilter, typename OutlierFiltersImpl<T>::RobustOutlierFilter)
106 
113 
114  ADD_TO_REGISTRAR(TransformationChecker, CounterTransformationChecker, typename TransformationCheckersImpl<T>::CounterTransformationChecker)
115  ADD_TO_REGISTRAR(TransformationChecker, DifferentialTransformationChecker, typename TransformationCheckersImpl<T>::DifferentialTransformationChecker)
116  ADD_TO_REGISTRAR(TransformationChecker, BoundTransformationChecker, typename TransformationCheckersImpl<T>::BoundTransformationChecker)
117 
118  ADD_TO_REGISTRAR_NO_PARAM(Inspector, NullInspector, typename InspectorsImpl<T>::NullInspector)
119  ADD_TO_REGISTRAR(Inspector, PerformanceInspector, typename InspectorsImpl<T>::PerformanceInspector)
120  ADD_TO_REGISTRAR(Inspector, VTKFileInspector, typename InspectorsImpl<T>::VTKFileInspector)
121 
124 }
125 
126 // static instances plus wrapper function to get them from templatized static method in PointMatcher
127 
130 
131 template<typename T>
132 const PointMatcher<T>& _getPM();
133 
134 template<>
136 template<>
138 
140 template<typename T>
142 {
143  return _getPM<T>();
144 }
145 
SimpleSensorNoiseDataPointsFilter
Sick LMS-xxx noise model.
Definition: SimpleSensorNoise.h:41
FixStepSamplingDataPointsFilter
Systematic sampling, with variation over time.
Definition: FixStepSampling.h:41
PointToPointSimilarityErrorMinimizer
Definition: PointToPointSimilarity.h:42
ErrorMinimizersImpl::PointToPointWithCovErrorMinimizer
::PointToPointWithCovErrorMinimizer< T > PointToPointWithCovErrorMinimizer
Definition: ErrorMinimizersImpl.h:53
OutlierFiltersImpl::SurfaceNormalOutlierFilter
Definition: OutlierFiltersImpl.h:176
_PointMatcherDouble
PointMatcher< double > _PointMatcherDouble
Definition: Registry.cpp:129
DataPointsFiltersImpl::IdentityDataPointsFilter
::IdentityDataPointsFilter< T > IdentityDataPointsFilter
Definition: DataPointsFiltersImpl.h:69
OutlierFiltersImpl::GenericDescriptorOutlierFilter
Definition: OutlierFiltersImpl.h:196
DataPointsFiltersImpl::FixStepSamplingDataPointsFilter
::FixStepSamplingDataPointsFilter< T > FixStepSamplingDataPointsFilter
Definition: DataPointsFiltersImpl.h:82
PointMatcherSupport::FileLogger
Definition: LoggerImpl.h:55
LoggerImpl.h
BoundingBoxDataPointsFilter
Subsampling. Remove point laying in a bounding box.
Definition: BoundingBox.h:41
_PointMatcherFloat
PointMatcher< float > _PointMatcherFloat
Definition: Registry.cpp:128
OrientNormalsDataPointsFilter
Reorientation of normals.
Definition: OrientNormals.h:41
DistanceLimitDataPointsFilter
Subsampling. Filter points based on distance measured on a specific axis.
Definition: DistanceLimit.h:41
MaxQuantileOnAxisDataPointsFilter
Subsampling. Filter points beyond a maximum quantile measured on a specific axis.
Definition: MaxQuantileOnAxis.h:41
InspectorsImpl::PerformanceInspector
Definition: InspectorsImpl.h:72
DataPointsFiltersImpl::MaxDistDataPointsFilter
::MaxDistDataPointsFilter< T > MaxDistDataPointsFilter
Definition: DataPointsFiltersImpl.h:71
MinDistDataPointsFilter
Subsampling. Filter points before a minimum distance measured on a specific axis.
Definition: MinDist.h:41
OutlierFiltersImpl.h
IdentityErrorMinimizer
Definition: ErrorMinimizers/Identity.h:42
ObservationDirectionDataPointsFilter
Extract observation direction.
Definition: ObservationDirection.h:41
RemoveSensorBiasDataPointsFilter
Definition: RemoveSensorBias.h:41
ADD_TO_REGISTRAR
#define ADD_TO_REGISTRAR(name, elementName, element)
Definition: Registrar.h:223
PointMatcher< float >
PointMatcherPrivate.h
PointMatcherSupport::Logger
The logger interface, used to output warnings and informations.
Definition: PointMatcher.h:104
DataPointsFiltersImpl::ShadowDataPointsFilter
::ShadowDataPointsFilter< T > ShadowDataPointsFilter
Definition: DataPointsFiltersImpl.h:83
DataPointsFiltersImpl::SimpleSensorNoiseDataPointsFilter
::SimpleSensorNoiseDataPointsFilter< T > SimpleSensorNoiseDataPointsFilter
Definition: DataPointsFiltersImpl.h:84
DataPointsFiltersImpl::RemoveNaNDataPointsFilter
::RemoveNaNDataPointsFilter< T > RemoveNaNDataPointsFilter
Definition: DataPointsFiltersImpl.h:70
MaxDistDataPointsFilter
Subsampling. Filter points beyond a maximum distance measured on a specific axis.
Definition: MaxDist.h:41
ADD_TO_REGISTRAR_NO_PARAM
#define ADD_TO_REGISTRAR_NO_PARAM(name, elementName, element)
Definition: Registrar.h:227
OutlierFiltersImpl::NullOutlierFilter
Definition: OutlierFiltersImpl.h:59
DataPointsFiltersImpl::ObservationDirectionDataPointsFilter
::ObservationDirectionDataPointsFilter< T > ObservationDirectionDataPointsFilter
Definition: DataPointsFiltersImpl.h:85
_getPM< float >
const PointMatcher< float > & _getPM< float >()
Definition: Registry.cpp:135
ErrorMinimizersImpl.h
testing::internal::string
::std::string string
Definition: gtest.h:1979
OutlierFiltersImpl::MaxDistOutlierFilter
Definition: OutlierFiltersImpl.h:70
GestaltDataPointsFilter
Gestalt descriptors filter as described in Bosse & Zlot ICRA 2013.
Definition: Gestalt.h:41
SurfaceNormalDataPointsFilter
Surface normals estimation. Find the normal for every point using eigen-decomposition of neighbour po...
Definition: SurfaceNormal.h:43
_getPM
const PointMatcher< T > & _getPM()
DataPointsFiltersImpl::SurfaceNormalDataPointsFilter
::SurfaceNormalDataPointsFilter< T > SurfaceNormalDataPointsFilter
Definition: DataPointsFiltersImpl.h:76
DataPointsFiltersImpl::VoxelGridDataPointsFilter
::VoxelGridDataPointsFilter< T > VoxelGridDataPointsFilter
Definition: DataPointsFiltersImpl.h:86
_getPM< double >
const PointMatcher< double > & _getPM< double >()
Definition: Registry.cpp:137
TransformationCheckersImpl::DifferentialTransformationChecker
Definition: TransformationCheckersImpl.h:81
DataPointsFiltersImpl::IncidenceAngleDataPointsFilter
::IncidenceAngleDataPointsFilter< T > IncidenceAngleDataPointsFilter
Definition: DataPointsFiltersImpl.h:79
OutlierFiltersImpl::MedianDistOutlierFilter
Definition: OutlierFiltersImpl.h:109
DataPointsFiltersImpl::MaxPointCountDataPointsFilter
::MaxPointCountDataPointsFilter< T > MaxPointCountDataPointsFilter
Definition: DataPointsFiltersImpl.h:81
OctreeGridDataPointsFilter
Data Filter based on Octree representation.
Definition: OctreeGrid.h:54
DataPointsFiltersImpl::OctreeGridDataPointsFilter
::OctreeGridDataPointsFilter< T > OctreeGridDataPointsFilter
Definition: DataPointsFiltersImpl.h:90
TransformationsImpl::PureTranslation
Definition: TransformationsImpl.h:79
DataPointsFiltersImpl::NormalSpaceDataPointsFilter
::NormalSpaceDataPointsFilter< T > NormalSpaceDataPointsFilter
Definition: DataPointsFiltersImpl.h:91
PointMatcher::PointMatcher
PointMatcher()
Constructor, populates the registrars.
Definition: Registry.cpp:61
PointToPlaneErrorMinimizer
Definition: PointToPlane.h:42
ErrorMinimizersImpl::IdentityErrorMinimizer
::IdentityErrorMinimizer< T > IdentityErrorMinimizer
Definition: ErrorMinimizersImpl.h:55
OutlierFiltersImpl::TrimmedDistOutlierFilter
Definition: OutlierFiltersImpl.h:128
ElipsoidsDataPointsFilter
Subsampling Surfels (Elipsoids) filter. First decimate the space until there is at most knn points,...
Definition: Elipsoids.h:41
DataPointsFiltersImpl::MinDistDataPointsFilter
::MinDistDataPointsFilter< T > MinDistDataPointsFilter
Definition: DataPointsFiltersImpl.h:72
MatchersImpl.h
VoxelGridDataPointsFilter
Definition: VoxelGrid.h:40
SamplingSurfaceNormalDataPointsFilter
Sampling surface normals. First decimate the space until there is at most knn points,...
Definition: SamplingSurfaceNormal.h:41
RandomSamplingDataPointsFilter
Random sampling.
Definition: RandomSampling.h:43
OutlierFiltersImpl::MinDistOutlierFilter
Definition: OutlierFiltersImpl.h:90
OutlierFiltersImpl::RobustOutlierFilter
Definition: OutlierFiltersImpl.h:223
TransformationsImpl::RigidTransformation
Definition: TransformationsImpl.h:54
IncidenceAngleDataPointsFilter
Incidence angle, compute the incidence angle of a surface normal with the observation direction.
Definition: IncidenceAngle.h:41
IdentityDataPointsFilter
IdentityDataPointsFilter, does nothing.
Definition: DataPointsFilters/Identity.h:41
RemoveNaNDataPointsFilter
Remove points having NaN as coordinate.
Definition: RemoveNaN.h:41
DataPointsFiltersImpl::GestaltDataPointsFilter
::GestaltDataPointsFilter< T > GestaltDataPointsFilter
Definition: DataPointsFiltersImpl.h:89
PointToPlaneWithCovErrorMinimizer
Definition: PointToPlaneWithCov.h:43
ErrorMinimizersImpl::PointToPointSimilarityErrorMinimizer
::PointToPointSimilarityErrorMinimizer< T > PointToPointSimilarityErrorMinimizer
Definition: ErrorMinimizersImpl.h:54
TransformationsImpl.h
MatchersImpl::KDTreeMatcher
Definition: MatchersImpl.h:74
PointMatcherSupport::NullLogger
Definition: LoggerImpl.h:44
DataPointsFiltersImpl::ElipsoidsDataPointsFilter
::ElipsoidsDataPointsFilter< T > ElipsoidsDataPointsFilter
Definition: DataPointsFiltersImpl.h:88
DataPointsFiltersImpl::SamplingSurfaceNormalDataPointsFilter
::SamplingSurfaceNormalDataPointsFilter< T > SamplingSurfaceNormalDataPointsFilter
Definition: DataPointsFiltersImpl.h:77
DataPointsFiltersImpl::MaxDensityDataPointsFilter
::MaxDensityDataPointsFilter< T > MaxDensityDataPointsFilter
Definition: DataPointsFiltersImpl.h:75
TransformationCheckersImpl::CounterTransformationChecker
Definition: TransformationCheckersImpl.h:58
CovarianceSamplingDataPointsFilter
Definition: CovarianceSampling.h:40
DataPointsFiltersImpl::OrientNormalsDataPointsFilter
::OrientNormalsDataPointsFilter< T > OrientNormalsDataPointsFilter
Definition: DataPointsFiltersImpl.h:78
DataPointsFiltersImpl::MaxQuantileOnAxisDataPointsFilter
::MaxQuantileOnAxisDataPointsFilter< T > MaxQuantileOnAxisDataPointsFilter
Definition: DataPointsFiltersImpl.h:74
std
MaxDensityDataPointsFilter
Subsampling. Reduce the points number by randomly removing points with a dentsity higher than a tresh...
Definition: MaxDensity.h:41
OutlierFiltersImpl::VarTrimmedDistOutlierFilter
Definition: OutlierFiltersImpl.h:147
DataPointsFiltersImpl::RandomSamplingDataPointsFilter
::RandomSamplingDataPointsFilter< T > RandomSamplingDataPointsFilter
Definition: DataPointsFiltersImpl.h:80
DataPointsFiltersImpl::DistanceLimitDataPointsFilter
::DistanceLimitDataPointsFilter< T > DistanceLimitDataPointsFilter
Definition: DataPointsFiltersImpl.h:93
TransformationCheckersImpl::BoundTransformationChecker
Definition: TransformationCheckersImpl.h:111
ErrorMinimizersImpl::PointToPointErrorMinimizer
::PointToPointErrorMinimizer< T > PointToPointErrorMinimizer
Definition: ErrorMinimizersImpl.h:52
DataPointsFiltersImpl::CutAtDescriptorThresholdDataPointsFilter
::CutAtDescriptorThresholdDataPointsFilter< T > CutAtDescriptorThresholdDataPointsFilter
Definition: DataPointsFiltersImpl.h:87
TransformationCheckersImpl.h
InspectorsImpl.h
CutAtDescriptorThresholdDataPointsFilter
Subsampling. Cut points with value of a given descriptor above or below a given threshold.
Definition: CutAtDescriptorThreshold.h:43
InspectorsImpl::VTKFileInspector
Definition: InspectorsImpl.h:158
PointMatcher::get
static const PointMatcher & get()
Return instances.
Definition: Registry.cpp:141
MaxPointCountDataPointsFilter
Maximum number of points.
Definition: MaxPointCount.h:41
DataPointsFiltersImpl::BoundingBoxDataPointsFilter
::BoundingBoxDataPointsFilter< T > BoundingBoxDataPointsFilter
Definition: DataPointsFiltersImpl.h:73
PointMatcherSupport
Functions and classes that are not dependant on scalar type are defined in this namespace.
Definition: Bibliography.cpp:45
ErrorMinimizersImpl::PointToPlaneWithCovErrorMinimizer
::PointToPlaneWithCovErrorMinimizer< T > PointToPlaneWithCovErrorMinimizer
Definition: ErrorMinimizersImpl.h:51
ShadowDataPointsFilter
Shadow filter, remove ghost points appearing on edges.
Definition: Shadow.h:41
DataPointsFiltersImpl::CovarianceSamplingDataPointsFilter
::CovarianceSamplingDataPointsFilter< T > CovarianceSamplingDataPointsFilter
Definition: DataPointsFiltersImpl.h:92
MatchersImpl::KDTreeVarDistMatcher
Definition: MatchersImpl.h:105
PointMatcher.h
public interface
DataPointsFiltersImpl.h
InspectorsImpl::NullInspector
Definition: InspectorsImpl.h:60
PointToPointErrorMinimizer
Definition: PointToPoint.h:42
MatchersImpl::NullMatcher
Definition: MatchersImpl.h:62
PointToPointWithCovErrorMinimizer
Definition: PointToPointWithCov.h:43
ErrorMinimizersImpl::PointToPlaneErrorMinimizer
::PointToPlaneErrorMinimizer< T > PointToPlaneErrorMinimizer
Definition: ErrorMinimizersImpl.h:50
NormalSpaceDataPointsFilter
Definition: NormalSpace.h:40
DataPointsFiltersImpl::RemoveSensorBiasDataPointsFilter
::RemoveSensorBiasDataPointsFilter< T > RemoveSensorBiasDataPointsFilter
Definition: DataPointsFiltersImpl.h:94


mp2p_icp
Author(s):
autogenerated on Wed Oct 23 2024 02:45:41