37 #ifndef PCL_FEATURES_IMPL_SHOT_LRF_OMP_H_
38 #define PCL_FEATURES_IMPL_SHOT_LRF_OMP_H_
44 template<
typename Po
intInT,
typename Po
intOutT>
52 if (this->getKSearch () != 0)
55 "[pcl::%s::computeFeature] Error! Search method set to k-neighborhood. Call setKSearch(0) and setRadiusSearch( radius ) to use this class.\n",
56 getClassName().c_str ());
59 tree_->setSortedResults (
true);
61 int data_size =
static_cast<int> (indices_->size ());
62 #pragma omp parallel for num_threads(threads_)
63 for (
int i = 0; i < data_size; ++i)
67 PointOutT& output_rf = output[i];
72 std::vector<int> n_indices;
73 std::vector<float> n_sqr_distances;
74 this->searchForNeighbors ((*indices_)[i], search_parameter_, n_indices, n_sqr_distances);
75 if (getLocalRF ((*indices_)[i], rf) == std::numeric_limits<float>::max ())
77 output.is_dense =
false;
80 output_rf.x_axis.getNormalVector3fMap () = rf.row (0);
81 output_rf.y_axis.getNormalVector3fMap () = rf.row (1);
82 output_rf.z_axis.getNormalVector3fMap () = rf.row (2);
87 template<
typename Po
intInT,
typename Po
intOutT>
95 if (this->getKSearch () != 0)
98 "[pcl::%s::computeFeatureEigen] Error! Search method set to k-neighborhood. Call setKSearch(0) and setRadiusSearch( radius ) to use this class.\n",
99 getClassName().c_str ());
102 tree_->setSortedResults (
true);
104 int data_size =
static_cast<int> (indices_->size ());
107 output.
channels[
"shot_lrf"].name =
"shot_lrf";
108 output.
channels[
"shot_lrf"].offset = 0;
109 output.
channels[
"shot_lrf"].size = 4;
110 output.
channels[
"shot_lrf"].count = 9;
114 output.
points.resize (data_size, 9);
116 #pragma omp parallel for num_threads(threads_)
117 for (
int i = 0; i < data_size; ++i)
124 if (getLocalRF ((*indices_)[i], rf) == std::numeric_limits<float>::max ())
129 output.
points.block<1, 3> (i, 0) = rf.row (0);
130 output.
points.block<1, 3> (i, 3) = rf.row (1);
131 output.
points.block<1, 3> (i, 6) = rf.row (2);
136 #define PCL_INSTANTIATE_SHOTLocalReferenceFrameEstimationOMP(T,OutT) template class PCL_EXPORTS pcl::SHOTLocalReferenceFrameEstimationOMP<T,OutT>;
138 #endif // PCL_FEATURES_IMPL_SHOT_LRF_H_