42 #include <pcl/keypoints/keypoint.h>
43 #include <pcl/common/intensity.h>
52 template <
typename Po
intInT,
typename Po
intOutT,
typename IntensityT = pcl::common::IntensityFieldAccessor<Po
intInT> >
56 using Ptr = shared_ptr<HarrisKeypoint2D<PointInT, PointOutT, IntensityT> >;
57 using ConstPtr = shared_ptr<const HarrisKeypoint2D<PointInT, PointOutT, IntensityT> >;
85 , window_width_ (window_width)
86 , window_height_ (window_height)
88 , min_distance_ (min_distance)
90 name_ =
"HarrisKeypoint2D";
168 Eigen::MatrixXf derivatives_rows_;
169 Eigen::MatrixXf derivatives_cols_;
174 greaterIntensityAtIndices (
int a,
int b)
const
176 return (response_->
at (a).intensity > response_->
at (b).intensity);
183 int half_window_width_;
185 int half_window_height_;
191 IntensityT intensity_;
195 #include <pcl/keypoints/impl/harris_2d.hpp>
HarrisKeypoint2D detects Harris corners family points.
unsigned int threads_
number of threads to be used
void setNumberOfThreads(unsigned int nr_threads=0)
Initialize the scheduler and set the number of threads to use.
ResponseMethod method_
cornerness computation method
void setNonMaxSupression(bool=false)
whether non maxima suppression should be applied or the response for each point should be returned
HarrisKeypoint2D(ResponseMethod method=HARRIS, int window_width=3, int window_height=3, int min_distance=5, float threshold=0.0)
Constructor.
typename Keypoint< PointInT, PointOutT >::KdTree KdTree
void setSkippedPixels(int skipped_pixels)
Set number of pixels to skip.
void responseTomasi(PointCloudOut &output) const
void responseLowe(PointCloudOut &output) const
void setRefine(bool do_refine)
whether the detected key points should be refined or not.
void detectKeypoints(PointCloudOut &output) override
void responseNoble(PointCloudOut &output) const
void setMinimalDistance(int min_distance)
Set minimal distance between candidate keypoints.
void setMethod(ResponseMethod type)
set the method of the response to be calculated.
shared_ptr< HarrisKeypoint2D< PointInT, PointOutT, IntensityT > > Ptr
void computeSecondMomentMatrix(std::size_t pos, float *coefficients) const
calculates the upper triangular part of unnormalized covariance matrix over intensities given by the ...
void setWindowHeight(int window_height)
Set window height.
shared_ptr< const HarrisKeypoint2D< PointInT, PointOutT, IntensityT > > ConstPtr
void responseHarris(PointCloudOut &output) const
gets the corner response for valid input points
bool nonmax_
non maximas suppression
float threshold_
threshold for non maxima suppression
typename Keypoint< PointInT, PointOutT >::PointCloudOut PointCloudOut
bool initCompute() override
void setThreshold(float threshold)
set the threshold value for detecting corners.
typename PointCloudIn::ConstPtr PointCloudInConstPtr
void setWindowWidth(int window_width)
Set window width.
typename Keypoint< PointInT, PointOutT >::PointCloudIn PointCloudIn
bool refine_
corner refinement
Keypoint represents the base class for key points.
std::string name_
The key point detection method's name.
const PointT & at(int column, int row) const
Obtain the point given by the (column, row) coordinates.
shared_ptr< PointCloud< PointT > > Ptr