38#ifndef PCL_FEATURES_IMPL_PPFRGB_H_
39#define PCL_FEATURES_IMPL_PPFRGB_H_
41#include <pcl/features/ppfrgb.h>
42#include <pcl/features/pfhrgb.h>
45template <
typename Po
intInT,
typename Po
intNT,
typename Po
intOutT>
57template <
typename Po
intInT,
typename Po
intNT,
typename Po
intOutT>
void
61 output.resize (indices_->size () * input_->size ());
68 std::size_t i = (*indices_)[
index_i];
69 for (std::size_t j = 0 ; j < input_->size (); ++j)
77 p.f1, p.f2, p.f3, p.f4, p.r_ratio, p.g_ratio, p.b_ratio))
95 PCL_ERROR (
"[pcl::%s::computeFeature] Computing pair feature vector between points %lu and %lu went wrong.\n", getClassName ().c_str (), i, j);
96 p.f1 = p.f2 = p.f3 = p.f4 = p.alpha_m = p.r_ratio = p.g_ratio = p.b_ratio = 0.f;
102 p.f1 = p.f2 = p.f3 = p.f4 = p.alpha_m = p.r_ratio = p.g_ratio = p.b_ratio = 0.f;
104 output[index_i*input_->size () + j] = p;
113template <
typename Po
intInT,
typename Po
intNT,
typename Po
intOutT>
121template <
typename Po
intInT,
typename Po
intNT,
typename Po
intOutT>
void
124 PCL_INFO (
"before computing output size: %u\n",
output.
size ());
125 output.resize (indices_->size ());
142 float f1, f2, f3, f4, r_ratio, g_ratio, b_ratio;
146 f1, f2, f3, f4, r_ratio, g_ratio, b_ratio))
158 PCL_ERROR (
"[pcl::%s::computeFeature] Computing pair feature vector between points %lu and %lu went wrong.\n", getClassName ().c_str (), i, j);
163 float normalization_factor =
static_cast<float> (nn_indices.size ());
164 average_feature_nn.f1 /= normalization_factor;
165 average_feature_nn.f2 /= normalization_factor;
166 average_feature_nn.f3 /= normalization_factor;
167 average_feature_nn.f4 /= normalization_factor;
168 average_feature_nn.r_ratio /= normalization_factor;
169 average_feature_nn.g_ratio /= normalization_factor;
170 average_feature_nn.b_ratio /= normalization_factor;
171 output[index_i] = average_feature_nn;
173 PCL_INFO (
"Output size: %zu\n",
static_cast<std::size_t
>(output.size ()));
177#define PCL_INSTANTIATE_PPFRGBEstimation(T,NT,OutT) template class PCL_EXPORTS pcl::PPFRGBEstimation<T,NT,OutT>;
178#define PCL_INSTANTIATE_PPFRGBRegionEstimation(T,NT,OutT) template class PCL_EXPORTS pcl::PPFRGBRegionEstimation<T,NT,OutT>;
Iterator class for point clouds with or without given indices.
std::size_t size() const
Size of the range the iterator is going through.
Feature represents the base feature class.
std::string feature_name_
The feature name.
PPFRGBEstimation()
Empty Constructor.
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.