40 #include <pcl/2d/convolution.h>
41 #include <pcl/2d/kernel.h>
42 #include <pcl/memory.h>
43 #include <pcl/pcl_base.h>
44 #include <pcl/pcl_macros.h>
48 template <
typename Po
intInT,
typename Po
intOutT>
54 PointCloudInPtr input_;
68 cannyTraceEdge(
int rowOffset,
92 using Ptr = shared_ptr<Edge<PointInT, PointOutT>>;
93 using ConstPtr = shared_ptr<const Edge<PointInT, PointOutT>>;
119 bool non_maximal_suppression_{
false};
120 bool hysteresis_thresholding_{
false};
122 float hysteresis_threshold_low_{20.0f};
123 float hysteresis_threshold_high_{80.0f};
124 float non_max_suppression_radius_x_{3.0f};
125 float non_max_suppression_radius_y_{3.0f};
136 output_type_ = output_type;
142 hysteresis_threshold_low_ = threshold;
148 hysteresis_threshold_high_ = threshold;
235 const float kernel_size,
305 #include <pcl/2d/impl/edge.hpp>
shared_ptr< PointCloud< PointInT > > Ptr
void computeDerivativeYBackward(pcl::PointCloud< PointOutT > &output)
Computes the image derivatives in Y direction using the kernel kernel::derivativeYBackwardKernel.
shared_ptr< const Edge< ImageType, ImageType >> ConstPtr
void setOutputType(OUTPUT_TYPE output_type)
Set the output type.
#define PCL_MAKE_ALIGNED_OPERATOR_NEW
Macro to signal a class requires a custom allocator.
void setHysteresisThresholdHigh(float threshold)
void applyFilter(pcl::PointCloud< PointOutT > &)
Override function to implement the pcl::Filter interface.
void sobelMagnitudeDirection(const pcl::PointCloud< PointInT > &input_x, const pcl::PointCloud< PointInT > &input_y, pcl::PointCloud< PointOutT > &output)
void setInputCloud(PointCloudInPtr input)
Set the input point cloud pointer.
void computeDerivativeXBackward(pcl::PointCloud< PointOutT > &output)
Computes the image derivatives in X direction using the kernel kernel::derivativeXBackwardKernel.
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 detectEdgePrewitt(pcl::PointCloud< PointOutT > &output)
Uses the Prewitt kernel for edge detection.
void setHysteresisThresholdLow(float threshold)
void detectEdge(pcl::PointCloud< PointOutT > &output)
This is a convenience function which performs edge detection based on the variable detector_kernel_ty...
shared_ptr< Edge< ImageType, ImageType >> Ptr
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 detectEdgeSobel(pcl::PointCloud< PointOutT > &output)
Uses the Sobel 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 computeDerivativeYCentral(pcl::PointCloud< PointOutT > &output)
Computes the image derivatives in Y direction using the kernel kernel::derivativeYCentralKernel.
void computeDerivativeXCentral(pcl::PointCloud< PointOutT > &output)
Computes the image derivatives in X direction using the kernel kernel::derivativeYCentralKernel.
void detectEdgeCanny(pcl::PointCloud< PointOutT > &output)
All edges of magnitude above t_high are always classified as edges.
void detectEdgeRoberts(pcl::PointCloud< PointOutT > &output)
Uses the Roberts kernel for edge detection.