40#ifndef PCL_KEYPOINTS_BRISK_KEYPOINT_2D_IMPL_H_
41#define PCL_KEYPOINTS_BRISK_KEYPOINT_2D_IMPL_H_
43#include <pcl/common/io.h>
49template <
typename Po
intInT,
typename Po
intOutT,
typename IntensityT>
bool
54 PCL_ERROR (
"[pcl::%s::initCompute] init failed.!\n",
name_.c_str ());
58 if (!
input_->isOrganized ())
60 PCL_ERROR (
"[pcl::%s::initCompute] %s doesn't support non organized clouds!\n",
name_.c_str ());
68template <
typename Po
intInT,
typename Po
intOutT,
typename IntensityT>
void
72 const int width =
static_cast<int>(
input_->width);
73 const int height =
static_cast<int>(
input_->height);
76 std::vector<unsigned char> image_data (width*height);
78 for (std::size_t i = 0; i < image_data.size (); ++i)
79 image_data[i] =
static_cast<unsigned char> (intensity_ ((*
input_)[i]));
88 output.width = output.size ();
90 output.is_dense =
false;
93 if (remove_invalid_3D_keypoints_)
96 for (std::size_t i = 0; i < output.size (); ++i)
104 output_clean.push_back (output[i]);
106 output = output_clean;
107 output.is_dense =
true;
void detectKeypoints(PointCloudOut &output) override
Detects the keypoints.
typename Keypoint< PointInT, PointOutT >::PointCloudOut PointCloudOut
void bilinearInterpolation(const PointCloudInConstPtr &cloud, float x, float y, PointOutT &pt)
bool initCompute() override
Initializes everything and checks whether input data is fine.
virtual bool initCompute()
PointCloudConstPtr input_
PointCloud represents the base class in PCL for storing collections of 3D points.
std::vector< PointT, Eigen::aligned_allocator< PointT > > points
The point data.
BRISK Scale Space helper.
void constructPyramid(const std::vector< unsigned char > &image, int width, int height)
Construct the image pyramids.
void getKeypoints(const int threshold, std::vector< pcl::PointWithScale, Eigen::aligned_allocator< pcl::PointWithScale > > &keypoints)
Get the keypoints for the associated image and threshold.
void copyPointCloud(const pcl::PointCloud< PointInT > &cloud_in, pcl::PointCloud< PointOutT > &cloud_out)
Copy all the fields from a given point cloud into a new point cloud.
bool isFinite(const PointT &pt)
Tests if the 3D components of a point are all finite param[in] pt point to be tested return true if f...