40 #ifndef PCL_KEYPOINTS_BRISK_KEYPOINT_2D_IMPL_H_
41 #define PCL_KEYPOINTS_BRISK_KEYPOINT_2D_IMPL_H_
43 #include <pcl/common/io.h>
49 template <
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 ());
68 template <
typename Po
intInT,
typename Po
intOutT,
typename IntensityT>
void
72 const int width = int (input_->width);
73 const int height = 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)
100 bilinearInterpolation (input_, output[i].x, output[i].y, pt);
104 output_clean.push_back (output[i]);
106 output = output_clean;
107 output.is_dense =
true;