40#ifndef PCL_FEATURES_IMPL_PFHRGB_H_
41#define PCL_FEATURES_IMPL_PFHRGB_H_
43#include <pcl/features/pfhrgb.h>
46template <
typename Po
intInT,
typename Po
intNT,
typename Po
intOutT>
bool
50 float &f1,
float &f2,
float &f3,
float &f4,
float &f5,
float &f6,
float &f7)
58 f1, f2, f3, f4, f5, f6, f7);
63template <
typename Po
intInT,
typename Po
intNT,
typename Po
intOutT>
void
74 float hist_incr = 100.0f /
static_cast<float> (indices.size () * (indices.size () - 1) / 2);
77 for (
const auto&
index_i: indices)
79 for (
const auto&
index_j: indices)
87 pfhrgb_tuple_[0], pfhrgb_tuple_[1], pfhrgb_tuple_[2], pfhrgb_tuple_[3],
88 pfhrgb_tuple_[4], pfhrgb_tuple_[5], pfhrgb_tuple_[6]))
92 f_index_[0] =
static_cast<int> (std::floor (
nr_split * ((pfhrgb_tuple_[0] +
M_PI) * d_pi_)));
94 for (
int i = 1; i < 3; ++i)
100 for (
int i = 4; i < 7; ++i)
105 for (
auto& feature: f_index_)
107 feature = std::min(
nr_split - 1, std::max(0, feature));
113 for (
int d = 0; d < 3; ++d)
123 for (
int d = 4; d < 7; ++d)
134template <
typename Po
intInT,
typename Po
intNT,
typename Po
intOutT>
void
138 pfhrgb_histogram_.setZero (2 * nr_subdiv_ * nr_subdiv_ * nr_subdiv_);
139 pfhrgb_tuple_.setZero (7);
147 for (std::size_t idx = 0; idx < indices_->size (); ++idx)
152 computePointPFHRGBSignature (*surface_, *normals_,
nn_indices, nr_subdiv_, pfhrgb_histogram_);
154 std::copy_n (pfhrgb_histogram_.data (), pfhrgb_histogram_.size (),
159#define PCL_INSTANTIATE_PFHRGBEstimation(T,NT,OutT) template class PCL_EXPORTS pcl::PFHRGBEstimation<T,NT,OutT>;
Iterator class for point clouds with or without given indices.
ConstCloudIterator(const PointCloud< PointT > &cloud)
bool computeRGBPairFeatures(const pcl::PointCloud< PointInT > &cloud, const pcl::PointCloud< PointNT > &normals, int p_idx, int q_idx, float &f1, float &f2, float &f3, float &f4, float &f5, float &f6, float &f7)
typename Feature< PointInT, PointOutT >::PointCloudOut PointCloudOut
void computeFeature(PointCloudOut &output) override
Abstract feature estimation method.
void computePointPFHRGBSignature(const pcl::PointCloud< PointInT > &cloud, const pcl::PointCloud< PointNT > &normals, const pcl::Indices &indices, int nr_split, Eigen::VectorXf &pfhrgb_histogram)
PCL_EXPORTS bool computeRGBPairFeatures(const Eigen::Vector4f &p1, const Eigen::Vector4f &n1, const Eigen::Vector4i &colors1, const Eigen::Vector4f &p2, const Eigen::Vector4f &n2, const Eigen::Vector4i &colors2, float &f1, float &f2, float &f3, float &f4, float &f5, float &f6, float &f7)
IndicesAllocator<> Indices
Type used for indices in PCL.