Point Cloud Library (PCL)
1.9.1
|
#include <pcl/2d/morphology.h>
Public Types | |
enum | MORPHOLOGICAL_OPERATOR_TYPE { EROSION_GRAY, DILATION_GRAY, OPENING_GRAY, CLOSING_GRAY, EROSION_BINARY, DILATION_BINARY, OPENING_BINARY, CLOSING_BINARY } |
![]() | |
typedef pcl::PointCloud< PointT > | PointCloud |
typedef PointCloud::Ptr | PointCloudPtr |
typedef PointCloud::ConstPtr | PointCloudConstPtr |
typedef boost::shared_ptr < PointIndices > | PointIndicesPtr |
typedef boost::shared_ptr < PointIndices const > | PointIndicesConstPtr |
Public Member Functions | |
Morphology () | |
void | openingBinary (pcl::PointCloud< PointT > &output) |
This function performs erosion followed by dilation. More... | |
void | closingBinary (pcl::PointCloud< PointT > &output) |
This function performs dilation followed by erosion. More... | |
void | erosionBinary (pcl::PointCloud< PointT > &output) |
Binary dilation is similar to a logical disjunction of sets. More... | |
void | dilationBinary (pcl::PointCloud< PointT > &output) |
Binary erosion is similar to a logical addition of sets. More... | |
void | openingGray (pcl::PointCloud< PointT > &output) |
Grayscale erosion followed by dilation. More... | |
void | closingGray (pcl::PointCloud< PointT > &output) |
Grayscale dilation followed by erosion. More... | |
void | erosionGray (pcl::PointCloud< PointT > &output) |
Takes the min of the pixels where kernel is 1. More... | |
void | dilationGray (pcl::PointCloud< PointT > &output) |
Takes the max of the pixels where kernel is 1. More... | |
void | subtractionBinary (pcl::PointCloud< PointT > &output, const pcl::PointCloud< PointT > &input1, const pcl::PointCloud< PointT > &input2) |
Set operation output = input1 - input2. More... | |
void | unionBinary (pcl::PointCloud< PointT > &output, const pcl::PointCloud< PointT > &input1, const pcl::PointCloud< PointT > &input2) |
Set operation ![]() | |
void | intersectionBinary (pcl::PointCloud< PointT > &output, const pcl::PointCloud< PointT > &input1, const pcl::PointCloud< PointT > &input2) |
Set operation ![]() | |
void | structuringElementCircular (pcl::PointCloud< PointT > &kernel, const int radius) |
Creates a circular structing element. More... | |
void | structuringElementRectangle (pcl::PointCloud< PointT > &kernel, const int height, const int width) |
Creates a rectangular structing element of size height x width. More... | |
void | applyMorphologicalOperation (pcl::PointCloud< PointT > &output) |
void | setStructuringElement (const PointCloudInPtr &structuring_element) |
![]() | |
PCLBase () | |
Empty constructor. More... | |
PCLBase (const PCLBase &base) | |
Copy constructor. More... | |
virtual | ~PCLBase () |
Destructor. More... | |
virtual void | setInputCloud (const PointCloudConstPtr &cloud) |
Provide a pointer to the input dataset. More... | |
PointCloudConstPtr const | 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 (size_t row_start, size_t col_start, size_t nb_rows, size_t nb_cols) |
Set the indices for the points laying within an interest region of the point cloud. More... | |
IndicesPtr const | getIndices () |
Get a pointer to the vector of indices used. More... | |
IndicesConstPtr const | getIndices () const |
Get a pointer to the vector of indices used. More... | |
const PointT & | operator[] (size_t pos) const |
Override PointCloud operator[] to shorten code. More... | |
Public Attributes | |
MORPHOLOGICAL_OPERATOR_TYPE | operator_type |
Additional Inherited Members | |
![]() | |
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... | |
![]() | |
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... | |
Definition at line 46 of file morphology.h.
enum pcl::Morphology::MORPHOLOGICAL_OPERATOR_TYPE |
Enumerator | |
---|---|
EROSION_GRAY | |
DILATION_GRAY | |
OPENING_GRAY | |
CLOSING_GRAY | |
EROSION_BINARY | |
DILATION_BINARY | |
OPENING_BINARY | |
CLOSING_BINARY |
Definition at line 170 of file morphology.h.
|
inline |
Definition at line 57 of file morphology.h.
void pcl::Morphology< PointT >::applyMorphologicalOperation | ( | pcl::PointCloud< PointT > & | output | ) |
[out] | output | Output point cloud passed by reference |
void pcl::Morphology< PointT >::closingBinary | ( | pcl::PointCloud< PointT > & | output | ) |
This function performs dilation followed by erosion.
It is useful for filling up (holes/cracks/small discontinuities) in a binary segmented region
[out] | output | Output point cloud passed by reference |
Definition at line 158 of file morphology.hpp.
void pcl::Morphology< PointT >::closingGray | ( | pcl::PointCloud< PointT > & | output | ) |
Grayscale dilation followed by erosion.
This is used to remove small dark artifacts from the image. Bright features or large dark features are relatively undisturbed.
[out] | output | Output point cloud passed by reference |
Definition at line 265 of file morphology.hpp.
void pcl::Morphology< PointT >::dilationBinary | ( | pcl::PointCloud< PointT > & | output | ) |
Binary erosion is similar to a logical addition of sets.
At each pixel having value 1, if at least one pixel in the structuring element is 1 and the corresponding point in the input image is 1, the center pixel is set to 1. Otherwise, it is set to 0.
[out] | output | Output point cloud passed by reference |
Definition at line 99 of file morphology.hpp.
References pcl::PointCloud< PointT >::height, pcl::PointCloud< PointT >::resize(), and pcl::PointCloud< PointT >::width.
void pcl::Morphology< PointT >::dilationGray | ( | pcl::PointCloud< PointT > & | output | ) |
Takes the max of the pixels where kernel is 1.
[out] | output | Output point cloud passed by reference |
Definition at line 211 of file morphology.hpp.
References pcl::PointCloud< PointT >::height, pcl::PointCloud< PointT >::resize(), and pcl::PointCloud< PointT >::width.
void pcl::Morphology< PointT >::erosionBinary | ( | pcl::PointCloud< PointT > & | output | ) |
Binary dilation is similar to a logical disjunction of sets.
At each pixel having value 1, if for all pixels in the structuring element having value 1, the corresponding pixels in the input image are also 1, the center pixel is set to 1. Otherwise, it is set to 0.
[out] | output | Output point cloud passed by reference |
Definition at line 44 of file morphology.hpp.
References pcl::PointCloud< PointT >::height, pcl::PointCloud< PointT >::resize(), and pcl::PointCloud< PointT >::width.
void pcl::Morphology< PointT >::erosionGray | ( | pcl::PointCloud< PointT > & | output | ) |
Takes the min of the pixels where kernel is 1.
[out] | output | Output point cloud passed by reference |
Definition at line 168 of file morphology.hpp.
References pcl::PointCloud< PointT >::height, pcl::PointCloud< PointT >::resize(), and pcl::PointCloud< PointT >::width.
void pcl::Morphology< PointT >::intersectionBinary | ( | pcl::PointCloud< PointT > & | output, |
const pcl::PointCloud< PointT > & | input1, | ||
const pcl::PointCloud< PointT > & | input2 | ||
) |
Set operation .
[out] | output | Output point cloud passed by reference |
[in] | input1 | |
[in] | input2 |
Definition at line 319 of file morphology.hpp.
References pcl::PointCloud< PointT >::height, pcl::PointCloud< PointT >::resize(), pcl::PointCloud< PointT >::size(), and pcl::PointCloud< PointT >::width.
void pcl::Morphology< PointT >::openingBinary | ( | pcl::PointCloud< PointT > & | output | ) |
This function performs erosion followed by dilation.
It is useful for removing noise in the form of small blobs and patches.
[out] | output | Output point cloud passed by reference |
Definition at line 147 of file morphology.hpp.
void pcl::Morphology< PointT >::openingGray | ( | pcl::PointCloud< PointT > & | output | ) |
Grayscale erosion followed by dilation.
This is used to remove small bright artifacts from the image. Large bright objects are relatively undisturbed.
[out] | output | Output point cloud passed by reference |
Definition at line 255 of file morphology.hpp.
void pcl::Morphology< PointT >::setStructuringElement | ( | const PointCloudInPtr & | structuring_element | ) |
[in] | structuring_element | The structuring element to be used for the morphological operation |
Definition at line 375 of file morphology.hpp.
void pcl::Morphology< PointT >::structuringElementCircular | ( | pcl::PointCloud< PointT > & | kernel, |
const int | radius | ||
) |
Creates a circular structing element.
The size of the kernel created is 2*radius x 2*radius. Center of the structuring element is the center of the circle. All values lying on the circle are 1 and the others are 0.
[out] | kernel | structuring element kernel passed by reference |
[in] | radius | Radius of the circular structuring element. |
Definition at line 341 of file morphology.hpp.
References pcl::PointCloud< PointT >::height, pcl::PointCloud< PointT >::resize(), and pcl::PointCloud< PointT >::width.
void pcl::Morphology< PointT >::structuringElementRectangle | ( | pcl::PointCloud< PointT > & | kernel, |
const int | height, | ||
const int | width | ||
) |
Creates a rectangular structing element of size height x width.
[out] | kernel | structuring element kernel passed by reference |
[in] | height | height number of rows in the structuring element |
[in] | width | number of columns in the structuring element |
Definition at line 363 of file morphology.hpp.
References pcl::PointCloud< PointT >::height, pcl::PointCloud< PointT >::resize(), pcl::PointCloud< PointT >::size(), and pcl::PointCloud< PointT >::width.
void pcl::Morphology< PointT >::subtractionBinary | ( | pcl::PointCloud< PointT > & | output, |
const pcl::PointCloud< PointT > & | input1, | ||
const pcl::PointCloud< PointT > & | input2 | ||
) |
Set operation output = input1 - input2.
[out] | output | Output point cloud passed by reference |
[in] | input1 | |
[in] | input2 |
Definition at line 275 of file morphology.hpp.
References pcl::PointCloud< PointT >::height, pcl::PointCloud< PointT >::resize(), pcl::PointCloud< PointT >::size(), and pcl::PointCloud< PointT >::width.
void pcl::Morphology< PointT >::unionBinary | ( | pcl::PointCloud< PointT > & | output, |
const pcl::PointCloud< PointT > & | input1, | ||
const pcl::PointCloud< PointT > & | input2 | ||
) |
Set operation .
[out] | output | Output point cloud passed by reference |
[in] | input1 | |
[in] | input2 |
Definition at line 297 of file morphology.hpp.
References pcl::PointCloud< PointT >::height, pcl::PointCloud< PointT >::resize(), pcl::PointCloud< PointT >::size(), and pcl::PointCloud< PointT >::width.
MORPHOLOGICAL_OPERATOR_TYPE pcl::Morphology< PointT >::operator_type |
Definition at line 182 of file morphology.h.