Point Cloud Library (PCL)
1.14.1-dev
|
#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 } |
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 | |
Morphology ()=default | |
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 . More... | |
void | intersectionBinary (pcl::PointCloud< PointT > &output, const pcl::PointCloud< PointT > &input1, const pcl::PointCloud< PointT > &input2) |
Set operation . More... | |
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) |
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... | |
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 (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... | |
IndicesConstPtr const | 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... | |
Public Attributes | |
MORPHOLOGICAL_OPERATOR_TYPE | operator_type |
Additional Inherited Members | |
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 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... | |
Definition at line 45 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 177 of file morphology.h.
|
default |
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 154 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 259 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 98 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 206 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 47 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 164 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 309 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 143 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 249 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 362 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 329 of file morphology.hpp.
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 349 of file morphology.hpp.
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 269 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 289 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 188 of file morphology.h.