Point Cloud Library (PCL)  1.9.1-dev
List of all members | Public Types | Public Member Functions
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
}
 
typedef boost::shared_ptr< EdgePtr
 
typedef boost::shared_ptr< const EdgeConstPtr
 

Public Member Functions

 Edge ()
 
void setOutputType (OUTPUT_TYPE output_type)
 Set the output type. More...
 
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. More...
 
void detectEdge (pcl::PointCloud< PointOutT > &output)
 This is a convenience function which performs edge detection based on the variable detector_kernel_type_. More...
 
void detectEdgeCanny (pcl::PointCloud< PointOutT > &output)
 All edges of magnitude above t_high are always classified as edges. More...
 
void detectEdgeSobel (pcl::PointCloud< PointOutT > &output)
 Uses the Sobel kernel for edge detection. More...
 
void detectEdgePrewitt (pcl::PointCloud< PointOutT > &output)
 Uses the Prewitt kernel for edge detection. More...
 
void detectEdgeRoberts (pcl::PointCloud< PointOutT > &output)
 Uses the Roberts kernel for edge detection. More...
 
void detectEdgeLoG (const float kernel_sigma, const float kernel_size, pcl::PointCloud< PointOutT > &output)
 Uses the LoG kernel for edge detection. More...
 
void computeDerivativeXCentral (pcl::PointCloud< PointOutT > &output)
 Computes the image derivatives in X direction using the kernel kernel::derivativeYCentralKernel. More...
 
void computeDerivativeYCentral (pcl::PointCloud< PointOutT > &output)
 Computes the image derivatives in Y direction using the kernel kernel::derivativeYCentralKernel. More...
 
void computeDerivativeXForward (pcl::PointCloud< PointOutT > &output)
 Computes the image derivatives in X direction using the kernel kernel::derivativeYForwardKernel. More...
 
void computeDerivativeYForward (pcl::PointCloud< PointOutT > &output)
 Computes the image derivatives in Y direction using the kernel kernel::derivativeYForwardKernel. More...
 
void computeDerivativeXBackward (pcl::PointCloud< PointOutT > &output)
 Computes the image derivatives in X direction using the kernel kernel::derivativeXBackwardKernel. More...
 
void computeDerivativeYBackward (pcl::PointCloud< PointOutT > &output)
 Computes the image derivatives in Y direction using the kernel kernel::derivativeYBackwardKernel. More...
 
void applyFilter (pcl::PointCloud< PointOutT > &)
 Override function to implement the pcl::Filter interface. More...
 
void setInputCloud (PointCloudInPtr input)
 Set the input point cloud pointer. More...
 

Detailed Description

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

Definition at line 47 of file edge.h.

Member Typedef Documentation

template<typename PointInT, typename PointOutT>
typedef boost::shared_ptr<const Edge> pcl::Edge< PointInT, PointOutT >::ConstPtr

Definition at line 87 of file edge.h.

template<typename PointInT, typename PointOutT>
typedef boost::shared_ptr<Edge> pcl::Edge< PointInT, PointOutT >::Ptr

Definition at line 86 of file edge.h.

Member Enumeration Documentation

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 100 of file edge.h.

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 89 of file edge.h.

Constructor & Destructor Documentation

template<typename PointInT, typename PointOutT>
pcl::Edge< PointInT, PointOutT >::Edge ( )
inline

Definition at line 124 of file edge.h.

Member Function Documentation

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 290 of file edge.h.

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_xInput point cloud passed by reference for the first derivative in the horizontal direction
[in]input_yInput point cloud passed by reference for the first derivative in the vertical direction
[out]outputOutput point cloud passed by reference

Definition at line 403 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(), and pcl::Edge< PointInT, PointOutT >::setHysteresisThresholdHigh().

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
outputOutput point cloud passed by reference

Referenced by pcl::Edge< PointInT, PointOutT >::setHysteresisThresholdHigh().

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]outputOutput point cloud passed by reference

Referenced by pcl::Edge< PointInT, PointOutT >::setHysteresisThresholdHigh().

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]outputOutput point cloud passed by reference

Referenced by pcl::Edge< PointInT, PointOutT >::setHysteresisThresholdHigh().

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]outputOutput point cloud passed by reference

Referenced by pcl::Edge< PointInT, PointOutT >::setHysteresisThresholdHigh().

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]outputOutput point cloud passed by reference

Referenced by pcl::Edge< PointInT, PointOutT >::setHysteresisThresholdHigh().

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]outputOutput point cloud passed by reference

Referenced by pcl::Edge< PointInT, PointOutT >::setHysteresisThresholdHigh().

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

Referenced by pcl::Edge< PointInT, PointOutT >::setHysteresisThresholdHigh().

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]outputOutput point cloud passed by reference

Definition at line 329 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(), and pcl::Edge< PointInT, PointOutT >::setHysteresisThresholdHigh().

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_sigmavariance of the LoG kernel used.
[in]kernel_sizea LoG kernel of dimensions kernel_size x kernel_size is used.
[out]outputOutput point cloud passed by reference.

Definition at line 479 of file edge.hpp.

Referenced by pcl::Edge< PointInT, PointOutT >::setHysteresisThresholdHigh().

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]outputOutput point cloud passed by reference

Definition at line 133 of file edge.hpp.

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

Referenced by pcl::Edge< PointInT, PointOutT >::setHysteresisThresholdHigh().

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]outputOutput point cloud passed by reference

Definition at line 172 of file edge.hpp.

References pcl::PointXYZIEdge::direction, pcl::PointCloud< PointT >::height, pcl::_PointXYZI::intensity, pcl::PointXYZIEdge::magnitude, pcl::rad2deg(), pcl::PointCloud< PointT >::resize(), pcl::PointCloud< PointT >::size(), and pcl::PointCloud< PointT >::width.

Referenced by pcl::Edge< PointInT, PointOutT >::setHysteresisThresholdHigh().

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]outputOutput point cloud passed by reference

Definition at line 47 of file edge.hpp.

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

Referenced by pcl::Edge< PointInT, PointOutT >::setHysteresisThresholdHigh().

template<typename PointInT, typename PointOutT>
void pcl::Edge< PointInT, PointOutT >::setHysteresisThresholdHigh ( float  threshold)
inline
template<typename PointInT, typename PointOutT>
void pcl::Edge< PointInT, PointOutT >::setHysteresisThresholdLow ( float  threshold)
inline
template<typename PointInT, typename PointOutT>
void pcl::Edge< PointInT, PointOutT >::setInputCloud ( PointCloudInPtr  input)
inline

Set the input point cloud pointer.

Parameters
[in]inputpointer to input point cloud

Definition at line 296 of file edge.h.

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

template<typename PointInT, typename PointOutT>
void pcl::Edge< PointInT, PointOutT >::setOutputType ( OUTPUT_TYPE  output_type)
inline

Set the output type.

Parameters
[in]output_typethe output type

Definition at line 140 of file edge.h.

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 
)

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