36 #ifndef __POINTMATCHER_CORE_H 37 #define __POINTMATCHER_CORE_H 39 #ifndef EIGEN_USE_NEW_STDVECTOR 40 #define EIGEN_USE_NEW_STDVECTOR 41 #endif // EIGEN_USE_NEW_STDVECTOR 45 #define EIGEN_NO_DEBUG 47 #include "Eigen/StdVector" 49 #include "Eigen/Geometry" 52 #include <boost/thread/mutex.hpp> 60 #include <boost/cstdint.hpp> 62 #include "DeprecationWarnings.h" 63 #include "Parametrizable.h" 64 #include "Registrar.h" 72 #define POINTMATCHER_VERSION "1.3.1" 74 #define POINTMATCHER_VERSION_INT 10301 103 virtual void beginInfoEntry(
const char *file,
unsigned line,
const char *func);
105 virtual void finishInfoEntry(
const char *file,
unsigned line,
const char *func);
107 virtual void beginWarningEntry(
const char *file,
unsigned line,
const char *func);
112 void setLogger(std::shared_ptr<Logger> newLogger);
117 typedef std::map<std::string, std::vector<std::string> >
CsvElements;
129 #define ZERO_PLUS_EPS (0. + std::numeric_limits<double>::epsilon()) 130 #define ONE_MINUS_EPS (1. - std::numeric_limits<double>::epsilon()) 153 typedef typename Eigen::Matrix<T, Eigen::Dynamic, 1>
Vector;
155 typedef std::vector<Vector, Eigen::aligned_allocator<Vector> >
VectorVector;
161 typedef typename Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic>
Matrix;
163 typedef typename Eigen::Matrix<int, Eigen::Dynamic, Eigen::Dynamic>
IntMatrix;
165 typedef typename Eigen::Matrix<std::int64_t, Eigen::Dynamic, Eigen::Dynamic>
Int64Matrix;
167 typedef typename Eigen::Array<T, Eigen::Dynamic, Eigen::Dynamic>
Array;
202 typedef Eigen::Block<Matrix>
View;
210 typedef typename Matrix::Index
Index;
226 bool contains(
const std::string& text)
const;
228 friend std::ostream& operator<< (std::ostream& stream,
const Labels& labels)
230 for(
size_t i=0; i<labels.size(); i++)
232 stream << labels[i].text;
233 if(i != (labels.size() -1))
266 void save(
const std::string& fileName,
bool binary =
false)
const;
287 bool featureExists(
const std::string& name,
const unsigned dim)
const;
308 void allocateTime(
const std::string& name,
const unsigned dim);
317 bool timeExists(
const std::string& name)
const;
318 bool timeExists(
const std::string& name,
const unsigned dim)
const;
331 void assertConsistency(
const std::string& dataName,
const int dataRows,
const int dataCols,
const Labels& labels)
const;
332 template<
typename MatrixType>
333 void allocateFields(
const Labels& newLabels,
Labels& labels, MatrixType& data)
const;
334 template<
typename MatrixType>
335 void allocateField(
const std::string& name,
const unsigned dim,
Labels& labels, MatrixType& data)
const;
336 template<
typename MatrixType>
337 void addField(
const std::string& name,
const MatrixType& newField,
Labels& labels, MatrixType& data)
const;
338 template<
typename MatrixType>
339 void removeField(
const std::string& name,
Labels& labels, MatrixType& data)
const;
340 template<
typename MatrixType>
341 const Eigen::Block<const MatrixType> getConstViewByName(
const std::string& name,
const Labels& labels,
const MatrixType& data,
const int viewRow = -1)
const;
342 template<
typename MatrixType>
343 Eigen::Block<MatrixType> getViewByName(
const std::string& name,
const Labels& labels, MatrixType& data,
const int viewRow = -1)
const;
344 bool fieldExists(
const std::string& name,
const unsigned dim,
const Labels& labels)
const;
345 unsigned getFieldDimension(
const std::string& name,
const Labels& labels)
const;
346 unsigned getFieldStartingRow(
const std::string& name,
const Labels& labels)
const;
348 template<
typename MatrixType>
349 void concatenateLabelledMatrix(
Labels* labels, MatrixType* data,
const Labels extraLabels,
const MatrixType extraData);
369 static constexpr
int InvalidId = -1;
370 static constexpr T
InvalidDist = std::numeric_limits<T>::infinity();
374 Matches(
const int knn,
const int pointsCount);
381 T getStandardDeviation()
const;
440 virtual void inPlaceFilter(
DataPoints& cloud) = 0;
470 void resetVisitCount();
471 unsigned long getVisitCount()
const;
474 virtual void init(
const DataPoints& filteredReference) = 0;
541 T getPointUsedRatio()
const;
542 T getWeightedPointUsedRatio()
const;
544 virtual T getOverlap()
const;
545 virtual Matrix getCovariance()
const;
590 const Vector& getLimits()
const;
591 const Vector& getConditionVariables()
const;
624 virtual void addStat(
const std::string& name,
double data);
625 virtual void dumpStats(std::ostream& stream);
626 virtual void dumpStatsHeader(std::ostream& stream);
630 virtual void finish(
const size_t iterationCount);
659 virtual void setDefault();
661 void loadFromYaml(std::istream& in);
662 unsigned getPrefilteredReadingPtsCount()
const;
663 unsigned getPrefilteredReferencePtsCount()
const;
665 bool getMaxNumIterationsReached()
const;
676 virtual void loadAdditionalYAMLContent(PointMatcherSupport::YAML::Node& doc);
680 const std::string& createModulesFromRegistrar(
const std::string& regName,
const PointMatcherSupport::YAML::Node& doc,
const R& registrar, std::vector<std::shared_ptr<typename R::TargetType> >& modules);
684 const std::string& createModuleFromRegistrar(
const std::string& regName,
const PointMatcherSupport::YAML::Node& doc,
const R& registrar, std::shared_ptr<typename R::TargetType>& module);
687 std::string nodeVal(
const std::string& regName,
const PointMatcherSupport::YAML::Node& doc);
736 PM_DEPRECATED(
"Use getPrefilteredInternalMap instead. " 737 "Function now always returns map with filter chain applied. " 738 "This may have altered your program behavior." 739 "Reasons for this stated here and in associated PR: " 740 "https://github.com/ethz-asl/libpointmatcher/issues/209.")
743 PM_DEPRECATED(
"Use getPrefilteredMap instead. " 744 "Function now always returns map with filter chain applied. " 745 "This may have altered your program behavior." 746 "Reasons for this stated here and in associated PR: " 747 "https://github.com/ethz-asl/libpointmatcher/issues/209")
767 #endif // __POINTMATCHER_CORE_H Matrix OutlierWeights
Weights of the associations between the points in Matches and the points in the reference.
Definition: PointMatcher.h:389
std::vector< Vector, Eigen::aligned_allocator< Vector > > VectorVector
A vector of vector over ScalarType, not a matrix.
Definition: PointMatcher.h:155
A vector of Label.
Definition: PointMatcher.h:221
Matrix getFeatureCopyByName(const std::string &name) const
Get feature by name, return a matrix containing a copy of the requested feature.
Definition: DataPoints.cpp:451
const DataPoints getPrefilteredMap() const
Return the map, in global coordinates (slow)
Definition: ICP.cpp:521
A matcher links points in the reading to points in the reference.
Definition: PointMatcher.h:462
void allocateDescriptor(const std::string &name, const unsigned dim)
Makes sure a descriptor of a given name exists, if present, check its dimensions.
Definition: DataPoints.cpp:518
Logger()
Construct without parameter.
Definition: Logger.cpp:45
void allocateTime(const std::string &name, const unsigned dim)
Makes sure a time of a given name exists, if present, check its dimensions.
Definition: DataPoints.cpp:621
void allocateTimes(const Labels &newLabels)
Make sure a vector of time of given names exist.
Definition: DataPoints.cpp:628
const Eigen::Block< const Int64Matrix > TimeConstView
a view on a const time
Definition: PointMatcher.h:208
Parametrizable::ParametersDoc ParametersDoc
alias
Definition: PointMatcher.h:180
A structure holding data ready for minimization. The data are "normalized", for instance there are no...
Definition: PointMatcher.h:522
unsigned getTimeDimension(const std::string &name) const
Return the dimension of a time with a given name. Return 0 if the name is not found.
Definition: DataPoints.cpp:701
DataPointsFilters::const_iterator DataPointsFiltersConstIt
alias
Definition: PointMatcher.h:452
The logger interface, used to output warnings and informations.
Definition: PointMatcher.h:96
unsigned getTimeDim() const
Return the total number of times.
Definition: DataPoints.cpp:193
bool hasMap() const
Return whether the object currently holds a valid map.
Definition: ICP.cpp:457
Matrix descriptors
descriptors of points in the cloud, might be empty
Definition: PointMatcher.h:325
void removeTime(const std::string &name)
Remove a descriptor by name, the whole matrix will be copied.
Definition: DataPoints.cpp:643
bool timeExists(const std::string &name) const
Look if a time with a given name exist.
Definition: DataPoints.cpp:687
static constexpr T InvalidDist
In case of too few matches the ids are filled with InvalidId.
Definition: PointMatcher.h:370
Eigen::Block< Int64Matrix > TimeView
A view on a time.
Definition: PointMatcher.h:204
void setColFrom(Index thisCol, const DataPoints &that, Index thatCol)
Set column thisCol equal to column thatCol of that, copy features and descriptors if any....
Definition: DataPoints.cpp:392
void assertDescriptorConsistency() const
Assert if descriptors are not consistent with features.
Definition: DataPoints.cpp:610
InvalidModuleType(const std::string &reason)
Construct an invalid–module-type exception.
Definition: ICP.cpp:59
void setLogger(std::shared_ptr< Logger > newLogger)
Set a new logger, protected by a mutex.
Definition: Logger.cpp:98
A point cloud.
Definition: PointMatcher.h:199
Point matcher did not converge.
Definition: PointMatcher.h:140
ConstView getFeatureRowViewByName(const std::string &name, const unsigned row) const
Get a const view on a feature row by name and number, throw an exception if it does not exist.
Definition: DataPoints.cpp:472
Matrix::Index Index
An index to a row or a column.
Definition: PointMatcher.h:210
Eigen::Quaternion< T > Quaternion
A quaternion over ScalarType.
Definition: PointMatcher.h:157
ConstView getDescriptorViewByName(const std::string &name) const
Get a const view on a descriptor by name, throw an exception if it does not exist.
Definition: DataPoints.cpp:554
void validateFile(const std::string &fileName)
Throw a runtime_error exception if fileName cannot be opened.
Definition: IO.cpp:355
bool setMap(const DataPoints &map)
Set the map using inputCloud.
Definition: ICP.cpp:464
PointMatcherSupport::Parametrizable Parametrizable
alias
Definition: PointMatcher.h:177
TransformationCheckers::iterator TransformationCheckersIt
alias
Definition: PointMatcher.h:605
unsigned getNbPoints() const
Return the number of points contained in the point cloud.
Definition: DataPoints.cpp:158
ConvergenceError(const std::string &reason)
Construct the exception with an error message.
Definition: Exceptions.cpp:42
virtual void finishInfoEntry(const char *file, unsigned line, const char *func)
Finish the entry into the info channel.
Definition: Logger.cpp:74
DataPointsFilters referenceDataPointsFilters
filters for reference
Definition: PointMatcher.h:649
unsigned getFeatureStartingRow(const std::string &name) const
Return the starting row of a feature with a given name. Return 0 if the name is not found.
Definition: DataPoints.cpp:507
T weightedPointUsedRatio
the ratio of how many points were used (with weight) for error minimization
Definition: PointMatcher.h:531
TransformationParameters operator()(const DataPoints &cloudIn)
Apply ICP to cloud cloudIn, with identity as initial guess.
Definition: ICP.cpp:555
Matrix Dists
Squared distances to closest points, dense matrix of ScalarType.
Definition: PointMatcher.h:365
ICP alogrithm, taking a sequence of clouds and using a map Warning: used with caution,...
Definition: PointMatcher.h:722
bool maxNumIterationsReached
store if we reached the maximum number of iterations last time compute was called
Definition: PointMatcher.h:670
unsigned getNbGroupedDescriptors() const
Return the number of grouped descriptors (e.g., normals can have 3 components but would count as only...
Definition: DataPoints.cpp:179
TransformationParameters compute(const DataPoints &cloudIn, const TransformationParameters &initialTransformationParameters)
Apply ICP to cloud cloudIn, with initial guess.
Definition: ICP.cpp:573
Labels featureLabels
labels of features
Definition: PointMatcher.h:324
TransformationCheckers transformationCheckers
transformation checkers
Definition: PointMatcher.h:654
DataPoints reference
reference point cloud
Definition: PointMatcher.h:525
TimeConstView getTimeRowViewByName(const std::string &name, const unsigned row) const
Get a const view on a time row by name and number, throw an exception if it does not exist.
Definition: DataPoints.cpp:672
DataPoints mapPointCloud
point cloud of the map, always in global frame (frame of first point cloud)
Definition: PointMatcher.h:752
Eigen::Matrix< int, Eigen::Dynamic, Eigen::Dynamic > IntMatrix
A dense integer matrix.
Definition: PointMatcher.h:163
unsigned getDescriptorDimension(const std::string &name) const
Return the dimension of a descriptor with a given name. Return 0 if the name is not found.
Definition: DataPoints.cpp:596
OutlierWeights compute(const DataPoints &filteredReading, const DataPoints &filteredReference, const Matches &input)
Apply outlier-detection chain.
Definition: OutlierFilter.cpp:64
An error minimizer will compute a transformation matrix such as to minimize the error between the rea...
Definition: PointMatcher.h:519
PointMatcher()
Constructor, populates the registrars.
Definition: Registry.cpp:61
TransformationCheckers::const_iterator TransformationCheckersConstIt
alias
Definition: PointMatcher.h:606
unsigned long visitCounter
number of points visited
Definition: PointMatcher.h:464
Labels timeLabels
labels of times.
Definition: PointMatcher.h:328
The name for a certain number of dim.
Definition: PointMatcher.h:213
unsigned getDescriptorStartingRow(const std::string &name) const
Return the starting row of a descriptor with a given name. Return 0 if the name is not found.
Definition: DataPoints.cpp:603
std::map< std::string, std::vector< std::string > > CsvElements
Data from a CSV file.
Definition: PointMatcher.h:117
Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > Matrix
A dense matrix over ScalarType.
Definition: PointMatcher.h:161
int nbRejectedPoints
number of points with all matches set to zero weights
Definition: PointMatcher.h:529
TimeConstView getTimeViewByName(const std::string &name) const
Get a const view on a time by name, throw an exception if it does not exist.
Definition: DataPoints.cpp:658
const DataPoints & getPrefilteredInternalMap() const
Return the map, in internal coordinates (fast)
Definition: ICP.cpp:542
Parametrizable::Parameters Parameters
alias
Definition: PointMatcher.h:178
DataPointsFilters readingDataPointsFilters
filters for reading, applied once
Definition: PointMatcher.h:647
Matrix getDescriptorCopyByName(const std::string &name) const
Get descriptor by name, return a matrix containing a copy of the requested descriptor.
Definition: DataPoints.cpp:547
T getDistsQuantile(const T quantile) const
Get the distance at the T-ratio closest point.
Definition: Matches.cpp:61
virtual void beginInfoEntry(const char *file, unsigned line, const char *func)
Start a new entry into the info channel.
Definition: Logger.cpp:64
unsigned getHomogeneousDim() const
Return the dimension of the point cloud in homogeneous coordinates (one more than Euclidean dimension...
Definition: DataPoints.cpp:172
std::map< std::string, Parameter > Parameters
Parameters stored as a map of string->string.
Definition: Parametrizable.h:156
DataPoints readingFiltered
reading point cloud after the filters were applied
Definition: PointMatcher.h:717
OutlierWeights weights
weights for every association
Definition: PointMatcher.h:526
int nbRejectedMatches
number of matches with zero weights
Definition: PointMatcher.h:528
T ScalarType
The scalar type.
Definition: PointMatcher.h:151
Functions and classes that are not dependant on scalar type are defined in this namespace.
Definition: PointMatcher.h:78
virtual std::ostream * warningStream()
Return the warning stream, 0 if hasWarningChannel() returns false.
Definition: Logger.cpp:88
Parametrizable::ParameterDoc ParameterDoc
alias
Definition: PointMatcher.h:179
An inspector allows to log data at the different steps, for analysis.
Definition: PointMatcher.h:613
An exception thrown when one tries to use a module type that does not exist.
Definition: PointMatcher.h:83
void removeDescriptor(const std::string &name)
Remove a descriptor by name, the whole matrix will be copied.
Definition: DataPoints.cpp:539
const Eigen::Block< const Matrix > ConstView
A view on a const feature or const descriptor.
Definition: PointMatcher.h:206
virtual std::ostream * infoStream()
Return the info stream, 0 if hasInfoChannel() returns false.
Definition: Logger.cpp:68
TransformationParameters operator()(const DataPoints &readingIn, const DataPoints &referenceIn)
Perform ICP and return optimised transformation matrix.
Definition: ICP.cpp:244
void concatenate(const DataPoints &dp)
Add another point cloud after the current one. Faster merge will be achieved if all descriptor and ti...
Definition: DataPoints.cpp:225
Functions and classes that are dependant on scalar type are defined in this templatized class.
Definition: PointMatcher.h:122
InvalidField(const std::string &reason)
Construct the exception with an error message.
Definition: DataPoints.cpp:51
Transformations::const_iterator TransformationsConstIt
alias
Definition: PointMatcher.h:419
OutlierFilters outlierFilters
outlier filters
Definition: PointMatcher.h:652
unsigned getTimeStartingRow(const std::string &name) const
Return the starting row of a time with a given name. Return 0 if the name is not found.
Definition: DataPoints.cpp:708
static const PointMatcher & get()
Return instances.
Definition: Registry.cpp:141
const DataPoints & getReadingFiltered() const
Return the filtered point cloud reading used in the ICP chain.
Definition: PointMatcher.h:708
bool featureExists(const std::string &name) const
Look if a feature with a given name exist.
Definition: DataPoints.cpp:486
Result of the data-association step (Matcher::findClosests), before outlier rejection.
Definition: PointMatcher.h:363
std::vector< Quaternion, Eigen::aligned_allocator< Quaternion > > QuaternionVector
A vector of quaternions over ScalarType.
Definition: PointMatcher.h:159
bool descriptorExists(const std::string &name) const
Look if a descriptor with a given name exist.
Definition: DataPoints.cpp:582
A data filter takes a point cloud as input, transforms it, and produces another point cloud as output...
Definition: PointMatcher.h:429
std::shared_ptr< ErrorMinimizer > errorMinimizer
error minimizer
Definition: PointMatcher.h:653
Parameters parameters
parameters with their values encoded in string
Definition: Parametrizable.h:161
bool contains(const std::string &text) const
Return whether there is a label named text.
Definition: DataPoints.cpp:75
void swapCols(Index iCol, Index jCol)
Swap column i and j in the point cloud, swap also features and descriptors if any....
Definition: DataPoints.cpp:405
An outlier filter removes or weights links between points in reading and their matched points in refe...
Definition: PointMatcher.h:488
Eigen::Matrix< std::int64_t, Eigen::Dynamic, Eigen::Dynamic > Int64Matrix
A dense signed 64-bits matrix.
Definition: PointMatcher.h:165
Matches()
In case of too few matches the dists are filled with InvalidDist.
Definition: Matches.cpp:43
The documentation of a parameter.
Definition: Parametrizable.h:117
A chain of DataPointsFilter.
Definition: PointMatcher.h:444
TransformationParameters compute(const DataPoints &readingIn, const DataPoints &referenceIn, const TransformationParameters &initialTransformationParameters)
Perform ICP from initial guess and return optimised transformation matrix.
Definition: ICP.cpp:265
ConstView getDescriptorRowViewByName(const std::string &name, const unsigned row) const
Get a const view on a descriptor row by name and number, throw an exception if it does not exist.
Definition: DataPoints.cpp:568
bool operator==(const DataPoints &that) const
Return whether two point-clouds are identical (same data and same labels)
Definition: DataPoints.cpp:200
Parametrizable::InvalidParameter InvalidParameter
alias
Definition: PointMatcher.h:181
void allocateFeatures(const Labels &newLabels)
Make sure a vector of features of given names exist.
Definition: DataPoints.cpp:428
The superclass of classes that are constructed using generic parameters. This class provides the para...
Definition: Parametrizable.h:98
An exception thrown when one tries to fetch the value of an unexisting parameter.
Definition: Parametrizable.h:101
virtual bool hasWarningChannel() const
Return whether this logger provides the warning channel.
Definition: Logger.cpp:78
DataPoints()
Construct an empty point cloud.
Definition: DataPoints.cpp:97
Transformations::iterator TransformationsIt
alias
Definition: PointMatcher.h:418
virtual ~Logger()
Virtual destructor, do nothing.
Definition: Logger.cpp:54
void conservativeResize(Index pointCount)
Resize the cloud to pointCount points, conserving existing ones.
Definition: DataPoints.cpp:327
std::vector< ParameterDoc > ParametersDoc
The documentation of all parameters.
Definition: Parametrizable.h:144
A chain of OutlierFilter.
Definition: PointMatcher.h:501
void addFeature(const std::string &name, const Matrix &newFeature)
Add a feature by name, remove first if already exists. The 'pad' field will stay at the end for homog...
Definition: DataPoints.cpp:435
std::shared_ptr< Matcher > matcher
matcher
Definition: PointMatcher.h:651
IntMatrix Ids
Identifiers of closest points, dense matrix of integers.
Definition: PointMatcher.h:366
DataPointsFilters::iterator DataPointsFiltersIt
alias
Definition: PointMatcher.h:451
size_t span
number of data dimensions the label spans
Definition: PointMatcher.h:216
TransformationParameters T_refIn_refMean
offset for centered map
Definition: PointMatcher.h:753
virtual void finishWarningEntry(const char *file, unsigned line, const char *func)
Finish the entry into the warning channel.
Definition: Logger.cpp:94
ErrorElements lastErrorElements
memory of the last computed error
Definition: PointMatcher.h:560
void assertTimesConsistency() const
Assert if times are not consistent with features.
Definition: DataPoints.cpp:715
TransformationParameters computeWithTransformedReference(const DataPoints &readingIn, const DataPoints &reference, const TransformationParameters &T_refIn_refMean, const TransformationParameters &initialTransformationParameters)
Perferm ICP using an already-transformed reference and with an already-initialized matcher.
Definition: ICP.cpp:317
std::shared_ptr< Inspector > inspector
inspector
Definition: PointMatcher.h:655
Eigen::Block< Matrix > View
A view on a feature or descriptor.
Definition: PointMatcher.h:202
virtual void beginWarningEntry(const char *file, unsigned line, const char *func)
Start a new entry into the warning channel.
Definition: Logger.cpp:84
Transformations transformations
transformations
Definition: PointMatcher.h:650
const std::string className
name of the class
Definition: Parametrizable.h:159
void save(const std::string &fileName, bool binary=false) const
Save a point cloud to a file, determine format from extension.
Definition: IO.cpp:809
unsigned prefilteredReadingPtsCount
remaining number of points after prefiltering but before the iterative process
Definition: PointMatcher.h:668
An exception thrown when one tries to access features or descriptors unexisting or of wrong dimension...
Definition: PointMatcher.h:242
T pointUsedRatio
the ratio of how many points were used for error minimization
Definition: PointMatcher.h:530
void allocateFeature(const std::string &name, const unsigned dim)
Makes sure a feature of a given name exists, if present, check its dimensions.
Definition: DataPoints.cpp:421
Int64Matrix times
time associated to each points, might be empty
Definition: PointMatcher.h:327
Dists dists
squared distances to closest points
Definition: PointMatcher.h:376
virtual bool hasInfoChannel() const
Return whether this logger provides the info channel.
Definition: Logger.cpp:58
std::vector< Label >::const_iterator const_iterator
alias
Definition: PointMatcher.h:223
void apply(DataPoints &cloud)
Apply this chain to cloud, mutates cloud.
Definition: DataPointsFilter.cpp:107
void addTime(const std::string &name, const Int64Matrix &newTime)
Add a time by name, remove first if already exists.
Definition: DataPoints.cpp:636
static void swapDataPoints(DataPoints &a, DataPoints &b)
Exchange in place point clouds a and b, with no data copy.
Definition: DataPoints.cpp:1022
Eigen::Array< T, Eigen::Dynamic, Eigen::Dynamic > Array
A dense array over ScalarType.
Definition: PointMatcher.h:167
Eigen::Matrix< T, Eigen::Dynamic, 1 > Vector
A vector over ScalarType.
Definition: PointMatcher.h:153
Matches matches
associations
Definition: PointMatcher.h:527
OutlierFilters::iterator OutlierFiltersIt
alias
Definition: PointMatcher.h:509
size_t totalDim() const
Return the sum of the spans of each label.
Definition: DataPoints.cpp:87
Ids ids
identifiers of closest points
Definition: PointMatcher.h:377
Matrix features
features of points in the cloud
Definition: PointMatcher.h:323
DataPoints createSimilarEmpty() const
Create an empty DataPoints of similar dimensions and labels for features, descriptors and times.
Definition: DataPoints.cpp:339
unsigned getFeatureDimension(const std::string &name) const
Return the dimension of a feature with a given name. Return 0 if the name is not found.
Definition: DataPoints.cpp:500
unsigned getDescriptorDim() const
Return the total number of descriptors.
Definition: DataPoints.cpp:186
DataPointsFilters readingStepDataPointsFilters
filters for reading, applied at each step
Definition: PointMatcher.h:648
static DataPoints load(const std::string &fileName)
Load a point cloud from a file, determine format from extension.
Definition: IO.cpp:375
void addDescriptor(const std::string &name, const Matrix &newDescriptor)
Add a descriptor by name, remove first if already exists.
Definition: DataPoints.cpp:532
Stuff common to all ICP algorithms.
Definition: PointMatcher.h:644
Labels()
Construct empty Labels.
Definition: DataPoints.cpp:64
OutlierFilters::const_iterator OutlierFiltersConstIt
alias
Definition: PointMatcher.h:508
void allocateDescriptors(const Labels &newLabels)
Make sure a vector of descriptors of given names exist.
Definition: DataPoints.cpp:525
unsigned getEuclideanDim() const
Return the dimension of the point cloud.
Definition: DataPoints.cpp:165
ICP algorithm.
Definition: PointMatcher.h:691
DataPoints reading
reading point cloud
Definition: PointMatcher.h:524
std::string text
name of the label
Definition: PointMatcher.h:215
Matrix TransformationParameters
A matrix holding the parameters a transformation.
Definition: PointMatcher.h:174
void clearMap()
Clear the map (reset to same state as after the object is created)
Definition: ICP.cpp:512
Label(const std::string &text="", const size_t span=0)
Construct a label from a given name and number of data dimensions it spans.
Definition: DataPoints.cpp:44
Int64Matrix getTimeCopyByName(const std::string &name) const
Get time by name, return a matrix containing a copy of the requested time.
Definition: DataPoints.cpp:650
void removeFeature(const std::string &name)
Remove a feature by name, the whole matrix will be copied.
Definition: DataPoints.cpp:444
DataPointsFilters()
Construct an empty chain.
Definition: DataPointsFilter.cpp:73
bool operator==(const Label &that) const
Return whether two labels are equals.
Definition: DataPoints.cpp:57
unsigned prefilteredReferencePtsCount
remaining number of points after prefiltering but before the iterative process
Definition: PointMatcher.h:669
void init()
Init the chain.
Definition: DataPointsFilter.cpp:97
T getMedianAbsDeviation() const
Calculate the Median of Absolute Deviation(MAD), which is median(|x-median(x)|), a kind of robust sta...
Definition: Matches.cpp:91
Labels descriptorLabels
labels of descriptors
Definition: PointMatcher.h:326
ConstView getFeatureViewByName(const std::string &name) const
Get a const view on a feature by name, throw an exception if it does not exist.
Definition: DataPoints.cpp:458