point_cloud_library / 1.12.1 / classpcl_1_1_segment_differences.html /

SegmentDifferences obtains the difference between two spatially aligned point clouds and returns the difference between them for a maximum given distance threshold. More...

#include <pcl/segmentation/segment_differences.h>

Public Types

using PointCloud = pcl::PointCloud< PointT >
using PointCloudPtr = typename PointCloud::Ptr
using PointCloudConstPtr = typename PointCloud::ConstPtr
using KdTree = pcl::search::Search< PointT >
using KdTreePtr = typename KdTree::Ptr
using PointIndicesPtr = PointIndices::Ptr
using PointIndicesConstPtr = PointIndices::ConstPtr
- Public Types inherited from pcl::PCLBase< PointT >
using PointCloud = pcl::PointCloud< PointT >
using PointCloudPtr = typename PointCloud::Ptr
using PointCloudConstPtr = typename PointCloud::ConstPtr
using PointIndicesPtr = PointIndices::Ptr
using PointIndicesConstPtr = PointIndices::ConstPtr

Public Member Functions

SegmentDifferences ()
Empty constructor. More...
void setTargetCloud (const PointCloudConstPtr &cloud)
Provide a pointer to the target dataset against which we compare the input cloud given in setInputCloud. More...
const PointCloudConstPtr getTargetCloud ()
Get a pointer to the input target point cloud dataset. More...
void setSearchMethod (const KdTreePtr &tree)
Provide a pointer to the search object. More...
KdTreePtr getSearchMethod ()
Get a pointer to the search method used. More...
void setDistanceThreshold (double sqr_threshold)
Set the maximum distance tolerance (squared) between corresponding points in the two input datasets. More...
double getDistanceThreshold ()
Get the squared distance tolerance between corresponding points as a measure in the L2 Euclidean space. More...
void segment (PointCloud &output)
Segment differences between two input point clouds. More...
- Public Member Functions inherited from pcl::PCLBase< PointT >
PCLBase ()
Empty constructor. More...
PCLBase (const PCLBase &base)
Copy constructor. More...
virtual ~PCLBase ()=default
Destructor. More...
virtual void setInputCloud (const PointCloudConstPtr &cloud)
Provide a pointer to the input dataset. More...
const PointCloudConstPtr getInputCloud () const
Get a pointer to the input point cloud dataset. More...
virtual void setIndices (const IndicesPtr &indices)
Provide a pointer to the vector of indices that represents the input data. More...
virtual void setIndices (const IndicesConstPtr &indices)
Provide a pointer to the vector of indices that represents the input data. More...
virtual void setIndices (const PointIndicesConstPtr &indices)
Provide a pointer to the vector of indices that represents the input data. More...
virtual void setIndices (std::size_t row_start, std::size_t col_start, std::size_t nb_rows, std::size_t nb_cols)
Set the indices for the points laying within an interest region of the point cloud. More...
IndicesPtr getIndices ()
Get a pointer to the vector of indices used. More...
const IndicesConstPtr getIndices () const
Get a pointer to the vector of indices used. More...
const PointT & operator[] (std::size_t pos) const
Override PointCloud operator[] to shorten code. More...

Protected Member Functions

virtual std::string getClassName () const
Class getName method. More...
bool initCompute ()
This method should get called before starting the actual computation. More...
bool deinitCompute ()
This method should get called after finishing the actual computation. More...
- Protected Member Functions inherited from pcl::PCLBase< PointT >
bool initCompute ()
This method should get called before starting the actual computation. More...
bool deinitCompute ()
This method should get called after finishing the actual computation. More...

Protected Attributes

KdTreePtr tree_
A pointer to the spatial search object. More...
PointCloudConstPtr target_
The input target point cloud dataset. More...
double distance_threshold_
The distance tolerance (squared) as a measure in the L2 Euclidean space between corresponding points. More...
PointCloudConstPtr input_
The input point cloud dataset. More...
IndicesPtr indices_
A pointer to the vector of point indices to use. More...
- Protected Attributes inherited from pcl::PCLBase< PointT >
PointCloudConstPtr input_
The input point cloud dataset. More...
IndicesPtr indices_
A pointer to the vector of point indices to use. More...
bool use_indices_
Set to true if point indices are used. More...
bool fake_indices_
If no set of indices are given, we construct a set of fake indices that mimic the input PointCloud. More...

Detailed Description

template<typename PointT>
class pcl::SegmentDifferences< PointT >

SegmentDifferences obtains the difference between two spatially aligned point clouds and returns the difference between them for a maximum given distance threshold.

Author
Radu Bogdan Rusu

Definition at line 72 of file segment_differences.h.

Member Typedef Documentation

KdTree

template<typename PointT >
using pcl::SegmentDifferences< PointT >::KdTree = pcl::search::Search<PointT>

Definition at line 81 of file segment_differences.h.

KdTreePtr

template<typename PointT >
using pcl::SegmentDifferences< PointT >::KdTreePtr = typename KdTree::Ptr

Definition at line 82 of file segment_differences.h.

PointCloud

template<typename PointT >
using pcl::SegmentDifferences< PointT >::PointCloud = pcl::PointCloud<PointT>

Definition at line 77 of file segment_differences.h.

PointCloudConstPtr

template<typename PointT >
using pcl::SegmentDifferences< PointT >::PointCloudConstPtr = typename PointCloud::ConstPtr

Definition at line 79 of file segment_differences.h.

PointCloudPtr

template<typename PointT >
using pcl::SegmentDifferences< PointT >::PointCloudPtr = typename PointCloud::Ptr

Definition at line 78 of file segment_differences.h.

PointIndicesConstPtr

Definition at line 85 of file segment_differences.h.

PointIndicesPtr

template<typename PointT >
using pcl::SegmentDifferences< PointT >::PointIndicesPtr = PointIndices::Ptr

Definition at line 84 of file segment_differences.h.

Constructor & Destructor Documentation

SegmentDifferences()

template<typename PointT >
pcl::SegmentDifferences< PointT >::SegmentDifferences ( )
inline

Empty constructor.

Definition at line 88 of file segment_differences.h.

Member Function Documentation

deinitCompute()

template<typename PointT >
bool pcl::PCLBase< PointT >::deinitCompute
protected

This method should get called after finishing the actual computation.

Definition at line 174 of file pcl_base.hpp.

getClassName()

template<typename PointT >
virtual std::string pcl::SegmentDifferences< PointT >::getClassName ( ) const
inlineprotectedvirtual

Class getName method.

Definition at line 154 of file segment_differences.h.

getDistanceThreshold()

template<typename PointT >
double pcl::SegmentDifferences< PointT >::getDistanceThreshold ( )
inline

Get the squared distance tolerance between corresponding points as a measure in the L2 Euclidean space.

Definition at line 126 of file segment_differences.h.

References pcl::SegmentDifferences< PointT >::distance_threshold_.

getSearchMethod()

template<typename PointT >
KdTreePtr pcl::SegmentDifferences< PointT >::getSearchMethod ( )
inline

Get a pointer to the search method used.

Definition at line 112 of file segment_differences.h.

References pcl::SegmentDifferences< PointT >::tree_.

getTargetCloud()

template<typename PointT >
const PointCloudConstPtr pcl::SegmentDifferences< PointT >::getTargetCloud ( )
inline

Get a pointer to the input target point cloud dataset.

Definition at line 102 of file segment_differences.h.

References pcl::SegmentDifferences< PointT >::target_.

initCompute()

template<typename PointT >
bool pcl::PCLBase< PointT >::initCompute
protected

This method should get called before starting the actual computation.

Internally, initCompute() does the following:

  • checks if an input dataset is given, and returns false otherwise
  • checks whether a set of input indices has been given. Returns true if yes.
  • if no input indices have been given, a fake set is created, which will be used until:
    • either a new set is given via setIndices(), or
    • a new cloud is given that has a different set of points. This will trigger an update on the set of fake indices

Definition at line 138 of file pcl_base.hpp.

segment()

template<typename PointT >
void pcl::SegmentDifferences< PointT >::segment ( PointCloud & output )

Segment differences between two input point clouds.

Parameters
output the resultant difference between the two point clouds as a PointCloud

Definition at line 91 of file segment_differences.hpp.

References pcl::PointCloud< PointT >::clear(), pcl::getPointCloudDifference(), pcl::PointCloud< PointT >::header, pcl::PointCloud< PointT >::height, and pcl::PointCloud< PointT >::width.

setDistanceThreshold()

template<typename PointT >
void pcl::SegmentDifferences< PointT >::setDistanceThreshold ( double sqr_threshold )
inline

Set the maximum distance tolerance (squared) between corresponding points in the two input datasets.

Parameters
sqr_threshold the squared distance tolerance as a measure in L2 Euclidean space

Definition at line 120 of file segment_differences.h.

References pcl::SegmentDifferences< PointT >::distance_threshold_.

setSearchMethod()

template<typename PointT >
void pcl::SegmentDifferences< PointT >::setSearchMethod ( const KdTreePtr & tree )
inline

Provide a pointer to the search object.

Parameters
tree a pointer to the spatial search object.

Definition at line 108 of file segment_differences.h.

References pcl::SegmentDifferences< PointT >::tree_.

setTargetCloud()

template<typename PointT >
void pcl::SegmentDifferences< PointT >::setTargetCloud ( const PointCloudConstPtr & cloud )
inline

Provide a pointer to the target dataset against which we compare the input cloud given in setInputCloud.

Parameters
cloud the target PointCloud dataset

Definition at line 98 of file segment_differences.h.

References pcl::SegmentDifferences< PointT >::target_.

Member Data Documentation

distance_threshold_

template<typename PointT >
double pcl::SegmentDifferences< PointT >::distance_threshold_
protected

The distance tolerance (squared) as a measure in the L2 Euclidean space between corresponding points.

Definition at line 150 of file segment_differences.h.

Referenced by pcl::SegmentDifferences< PointT >::getDistanceThreshold(), and pcl::SegmentDifferences< PointT >::setDistanceThreshold().

indices_

template<typename PointT >
IndicesPtr pcl::PCLBase< PointT >::indices_
protected

A pointer to the vector of point indices to use.

Definition at line 150 of file pcl_base.h.

input_

template<typename PointT >
PointCloudConstPtr pcl::PCLBase< PointT >::input_
protected

The input point cloud dataset.

Definition at line 147 of file pcl_base.h.

target_

template<typename PointT >
PointCloudConstPtr pcl::SegmentDifferences< PointT >::target_
protected

The input target point cloud dataset.

Definition at line 145 of file segment_differences.h.

Referenced by pcl::SegmentDifferences< PointT >::getTargetCloud(), and pcl::SegmentDifferences< PointT >::setTargetCloud().

tree_

template<typename PointT >
KdTreePtr pcl::SegmentDifferences< PointT >::tree_
protected

A pointer to the spatial search object.

Definition at line 142 of file segment_differences.h.

Referenced by pcl::SegmentDifferences< PointT >::getSearchMethod(), and pcl::SegmentDifferences< PointT >::setSearchMethod().


The documentation for this class was generated from the following files:

© 2009–2012, Willow Garage, Inc.
© 2012–, Open Perception, Inc.
Licensed under the BSD License.
https://pointclouds.org/documentation/classpcl_1_1_segment_differences.html