Loading...
Searching...
No Matches
pcl::Edge< PointInT, PointOutT > Class Template Reference

`#include <pcl/2d/edge.h>`

## Public Types

enum | OUTPUT_TYPE { OUTPUT_Y , OUTPUT_X , OUTPUT_X_Y , OUTPUT_MAGNITUDE , OUTPUT_DIRECTION , OUTPUT_MAGNITUDE_DIRECTION , OUTPUT_ALL }
enum | DETECTOR_KERNEL_TYPE { CANNY , SOBEL , PREWITT , ROBERTS , LOG , DERIVATIVE_CENTRAL , DERIVATIVE_FORWARD , DERIVATIVE_BACKWARD }
using | Ptr = shared_ptr< Edge< PointInT, PointOutT > >
using | ConstPtr = shared_ptr< const Edge< PointInT, PointOutT > >

## Public Member Functions

| Edge ()
void | setOutputType (OUTPUT_TYPE output_type)
| Set the output type.
void | setHysteresisThresholdLow (float threshold)
void | setHysteresisThresholdHigh (float threshold)
void | sobelMagnitudeDirection (const pcl::PointCloud< PointInT > &input_x, const pcl::PointCloud< PointInT > &input_y, pcl::PointCloud< PointOutT > &output)
void | canny (const pcl::PointCloud< PointInT > &input_x, const pcl::PointCloud< PointInT > &input_y, pcl::PointCloud< PointOutT > &output)
| Perform Canny edge detection with two separated input images for horizontal and vertical derivatives.
void | detectEdge (pcl::PointCloud< PointOutT > &output)
| This is a convenience function which performs edge detection based on the variable detector_kernel_type_.
void | detectEdgeCanny (pcl::PointCloud< PointOutT > &output)
| All edges of magnitude above t_high are always classified as edges.
void | detectEdgeSobel (pcl::PointCloud< PointOutT > &output)
| Uses the Sobel kernel for edge detection.
void | detectEdgePrewitt (pcl::PointCloud< PointOutT > &output)
| Uses the Prewitt kernel for edge detection.
void | detectEdgeRoberts (pcl::PointCloud< PointOutT > &output)
| Uses the Roberts kernel for edge detection.
void | detectEdgeLoG (const float kernel_sigma, const float kernel_size, pcl::PointCloud< PointOutT > &output)
| Uses the LoG kernel for edge detection.
void | computeDerivativeXCentral (pcl::PointCloud< PointOutT > &output)
| Computes the image derivatives in X direction using the kernel kernel::derivativeYCentralKernel.
void | computeDerivativeYCentral (pcl::PointCloud< PointOutT > &output)
| Computes the image derivatives in Y direction using the kernel kernel::derivativeYCentralKernel.
void | computeDerivativeXForward (pcl::PointCloud< PointOutT > &output)
| Computes the image derivatives in X direction using the kernel kernel::derivativeYForwardKernel.
void | computeDerivativeYForward (pcl::PointCloud< PointOutT > &output)
| Computes the image derivatives in Y direction using the kernel kernel::derivativeYForwardKernel.
void | computeDerivativeXBackward (pcl::PointCloud< PointOutT > &output)
| Computes the image derivatives in X direction using the kernel kernel::derivativeXBackwardKernel.
void | computeDerivativeYBackward (pcl::PointCloud< PointOutT > &output)
| Computes the image derivatives in Y direction using the kernel kernel::derivativeYBackwardKernel.
void | applyFilter (pcl::PointCloud< PointOutT > &)
| Override function to implement the pcl::Filter interface.
void | setInputCloud (PointCloudInPtr input)
| Set the input point cloud pointer.

## Detailed Description

template<typename PointInT, typename PointOutT>
class pcl::Edge< PointInT, PointOutT >

Definition at line 49 of file edge.h.

## Member Typedef Documentation

## ConstPtr

template<typename PointInT , typename PointOutT >

using pcl::Edge< PointInT, PointOutT >::ConstPtr = shared_ptr<const Edge<PointInT, PointOutT> >

Definition at line 93 of file edge.h.

## Ptr

template<typename PointInT , typename PointOutT >

using pcl::Edge< PointInT, PointOutT >::Ptr = shared_ptr<Edge<PointInT, PointOutT> >

Definition at line 92 of file edge.h.

## Member Enumeration Documentation

## DETECTOR_KERNEL_TYPE

template<typename PointInT , typename PointOutT >

enum pcl::Edge::DETECTOR_KERNEL_TYPE

Enumerator
CANNY |
SOBEL |
PREWITT |
ROBERTS |
LOG |
DERIVATIVE_CENTRAL |
DERIVATIVE_FORWARD |
DERIVATIVE_BACKWARD |

Definition at line 105 of file edge.h.

## OUTPUT_TYPE

template<typename PointInT , typename PointOutT >

enum pcl::Edge::OUTPUT_TYPE

Enumerator
OUTPUT_Y |
OUTPUT_X |
OUTPUT_X_Y |
OUTPUT_MAGNITUDE |
OUTPUT_DIRECTION |
OUTPUT_MAGNITUDE_DIRECTION |
OUTPUT_ALL |

Definition at line 95 of file edge.h.

## Constructor & Destructor Documentation

## Edge()

template<typename PointInT , typename PointOutT >

pcl::Edge< PointInT, PointOutT >::Edge | ( |  | ) |

inline

Definition at line 128 of file edge.h.

## Member Function Documentation

## applyFilter()

template<typename PointInT , typename PointOutT >

void pcl::Edge< PointInT, PointOutT >::applyFilter | ( | pcl::PointCloud< PointOutT > & |  | ) |

inline

Override function to implement the pcl::Filter interface.

Definition at line 288 of file edge.h.

## canny()

template<typename PointInT , typename PointOutT >

void pcl::Edge< PointInT, PointOutT >::canny | ( | const pcl::PointCloud< PointInT > & | input_x,
|  | const pcl::PointCloud< PointInT > & | input_y,
|  | pcl::PointCloud< PointOutT > & | output
| ) |  |

Perform Canny edge detection with two separated input images for horizontal and vertical derivatives.

All edges of magnitude above t_high are always classified as edges. All edges below t_low are discarded. Edge values between t_low and t_high are classified as edges only if they are connected to edges having magnitude > t_high and are located in a direction perpendicular to that strong edge.

Parameters

  [in] | input_x | Input point cloud passed by reference for the first derivative in the horizontal direction
  [in] | input_y | Input point cloud passed by reference for the first derivative in the vertical direction
  [out] | output | Output point cloud passed by reference

Definition at line 376 of file edge.hpp.

References pcl::PointCloud< PointT >::height, pcl::PointCloud< PointT >::makeShared(), pcl::PointCloud< PointT >::resize(), and pcl::PointCloud< PointT >::width.

Referenced by pcl::OrganizedEdgeFromNormals< PointT, PointNT, PointLT >::extractEdges().

## computeDerivativeXBackward()

template<typename PointInT , typename PointOutT >

void pcl::Edge< PointInT, PointOutT >::computeDerivativeXBackward | ( | pcl::PointCloud< PointOutT > & | output | ) |

Computes the image derivatives in X direction using the kernel kernel::derivativeXBackwardKernel.

This function does NOT include a smoothing step. The image should be smoothed before using this function to reduce noise.

Parameters

  output | Output point cloud passed by reference

## computeDerivativeXCentral()

template<typename PointInT , typename PointOutT >

void pcl::Edge< PointInT, PointOutT >::computeDerivativeXCentral | ( | pcl::PointCloud< PointOutT > & | output | ) |

Computes the image derivatives in X direction using the kernel kernel::derivativeYCentralKernel.

This function does NOT include a smoothing step. The image should be smoothed before using this function to reduce noise.

Parameters

  [out] | output | Output point cloud passed by reference

## computeDerivativeXForward()

template<typename PointInT , typename PointOutT >

void pcl::Edge< PointInT, PointOutT >::computeDerivativeXForward | ( | pcl::PointCloud< PointOutT > & | output | ) |

Computes the image derivatives in X direction using the kernel kernel::derivativeYForwardKernel.

This function does NOT include a smoothing step. The image should be smoothed before using this function to reduce noise.

Parameters

  [out] | output | Output point cloud passed by reference

## computeDerivativeYBackward()

template<typename PointInT , typename PointOutT >

void pcl::Edge< PointInT, PointOutT >::computeDerivativeYBackward | ( | pcl::PointCloud< PointOutT > & | output | ) |

Computes the image derivatives in Y direction using the kernel kernel::derivativeYBackwardKernel.

This function does NOT include a smoothing step. The image should be smoothed before using this function to reduce noise.

Parameters

  [out] | output | Output point cloud passed by reference

## computeDerivativeYCentral()

template<typename PointInT , typename PointOutT >

void pcl::Edge< PointInT, PointOutT >::computeDerivativeYCentral | ( | pcl::PointCloud< PointOutT > & | output | ) |

Computes the image derivatives in Y direction using the kernel kernel::derivativeYCentralKernel.

This function does NOT include a smoothing step. The image should be smoothed before using this function to reduce noise.

Parameters

  [out] | output | Output point cloud passed by reference

## computeDerivativeYForward()

template<typename PointInT , typename PointOutT >

void pcl::Edge< PointInT, PointOutT >::computeDerivativeYForward | ( | pcl::PointCloud< PointOutT > & | output | ) |

Computes the image derivatives in Y direction using the kernel kernel::derivativeYForwardKernel.

This function does NOT include a smoothing step. The image should be smoothed before using this function to reduce noise.

Parameters

  [out] | output | Output point cloud passed by reference

## detectEdge()

template<typename PointInT , typename PointOutT >

void pcl::Edge< PointInT, PointOutT >::detectEdge | ( | pcl::PointCloud< PointOutT > & | output | ) |

This is a convenience function which performs edge detection based on the variable detector_kernel_type_.

Parameters

  [out] | output |

## detectEdgeCanny()

template<typename PointInT , typename PointOutT >

void pcl::Edge< PointInT, PointOutT >::detectEdgeCanny | ( | pcl::PointCloud< PointOutT > & | output | ) |

All edges of magnitude above t_high are always classified as edges.

All edges below t_low are discarded. Edge values between t_low and t_high are classified as edges only if they are connected to edges having magnitude > t_high and are located in a direction perpendicular to that strong edge.

Parameters

  [out] | output | Output point cloud passed by reference

Definition at line 312 of file edge.hpp.

References pcl::PointCloud< PointT >::height, pcl::PointCloud< PointT >::resize(), and pcl::PointCloud< PointT >::width.

Referenced by pcl::OrganizedEdgeFromRGB< PointT, PointLT >::extractEdges().

## detectEdgeLoG()

template<typename PointInT , typename PointOutT >

void pcl::Edge< PointInT, PointOutT >::detectEdgeLoG | ( | const float | kernel_sigma,
|  | const float | kernel_size,
|  | pcl::PointCloud< PointOutT > & | output
| ) |  |

Uses the LoG kernel for edge detection.

Zero crossings of the Laplacian operator applied on an image indicate edges. Gaussian kernel is used to smoothen the image prior to the Laplacian. This is because Laplacian uses the second order derivative of the image and hence, is very sensitive to noise. The implementation is not two-step but rather applies the LoG kernel directly.

Parameters

  [in] | kernel_sigma | variance of the LoG kernel used.
  [in] | kernel_size | a LoG kernel of dimensions kernel_size x kernel_size is used.
  [out] | output | Output point cloud passed by reference.

Definition at line 450 of file edge.hpp.

## detectEdgePrewitt()

template<typename PointInT , typename PointOutT >

void pcl::Edge< PointInT, PointOutT >::detectEdgePrewitt | ( | pcl::PointCloud< PointOutT > & | output | ) |

Uses the Prewitt kernel for edge detection.

This function does NOT include a smoothing step. The image should be smoothed before using this function to reduce noise.

Parameters

  [out] | output | Output point cloud passed by reference

Definition at line 126 of file edge.hpp.

References pcl::PointCloud< PointT >::height, pcl::PointCloud< PointT >::resize(), pcl::PointCloud< PointT >::size(), and pcl::PointCloud< PointT >::width.

## detectEdgeRoberts()

template<typename PointInT , typename PointOutT >

void pcl::Edge< PointInT, PointOutT >::detectEdgeRoberts | ( | pcl::PointCloud< PointOutT > & | output | ) |

Uses the Roberts kernel for edge detection.

This function does NOT include a smoothing step. The image should be smoothed before using this function to reduce noise.

Parameters

  [out] | output | Output point cloud passed by reference

Definition at line 164 of file edge.hpp.

## detectEdgeSobel()

template<typename PointInT , typename PointOutT >

void pcl::Edge< PointInT, PointOutT >::detectEdgeSobel | ( | pcl::PointCloud< PointOutT > & | output | ) |

Uses the Sobel kernel for edge detection.

This function does NOT include a smoothing step. The image should be smoothed before using this function to reduce noise.

Parameters

  [out] | output | Output point cloud passed by reference

Definition at line 48 of file edge.hpp.

References pcl::PointCloud< PointT >::height, pcl::PointCloud< PointT >::resize(), pcl::PointCloud< PointT >::size(), and pcl::PointCloud< PointT >::width.

## setHysteresisThresholdHigh()

template<typename PointInT , typename PointOutT >

void pcl::Edge< PointInT, PointOutT >::setHysteresisThresholdHigh | ( | float | threshold | ) |

inline

Definition at line 146 of file edge.h.

Referenced by pcl::OrganizedEdgeFromRGB< PointT, PointLT >::extractEdges(), and pcl::OrganizedEdgeFromNormals< PointT, PointNT, PointLT >::extractEdges().

## setHysteresisThresholdLow()

template<typename PointInT , typename PointOutT >

void pcl::Edge< PointInT, PointOutT >::setHysteresisThresholdLow | ( | float | threshold | ) |

inline

Definition at line 140 of file edge.h.

Referenced by pcl::OrganizedEdgeFromRGB< PointT, PointLT >::extractEdges(), and pcl::OrganizedEdgeFromNormals< PointT, PointNT, PointLT >::extractEdges().

## setInputCloud()

template<typename PointInT , typename PointOutT >

void pcl::Edge< PointInT, PointOutT >::setInputCloud | ( | PointCloudInPtr | input | ) |

inline

Set the input point cloud pointer.

Parameters

  [in] | input | pointer to input point cloud

Definition at line 295 of file edge.h.

Referenced by pcl::OrganizedEdgeFromRGB< PointT, PointLT >::extractEdges().

## setOutputType()

template<typename PointInT , typename PointOutT >

void pcl::Edge< PointInT, PointOutT >::setOutputType | ( | OUTPUT_TYPE | output_type | ) |

inline

Set the output type.

Parameters

  [in] | output_type | the output type

Definition at line 134 of file edge.h.

## sobelMagnitudeDirection()

template<typename PointInT , typename PointOutT >

void pcl::Edge< PointInT, PointOutT >::sobelMagnitudeDirection | ( | const pcl::PointCloud< PointInT > & | input_x,
|  | const pcl::PointCloud< PointInT > & | input_y,
|  | pcl::PointCloud< PointOutT > & | output
| ) |  |

Parameters

  [in] | input_x |
  [in] | input_y |
  [out] | output |

Definition at line 85 of file edge.hpp.

References pcl::PointCloud< PointT >::height, pcl::PointCloud< PointT >::makeShared(), pcl::PointCloud< PointT >::resize(), pcl::PointCloud< PointT >::size(), and pcl::PointCloud< PointT >::width.

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

- pcl/2d/edge.h
- pcl/2d/impl/edge.hpp