Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040 #ifndef PCL_FEATURES_IMPL_SHOT_LRF_OMP_H_
00041 #define PCL_FEATURES_IMPL_SHOT_LRF_OMP_H_
00042
00043 #include <utility>
00044 #include <pcl/features/shot_lrf_omp.h>
00045 #include <pcl/features/shot_lrf.h>
00046
00047 template<typename PointInT, typename PointOutT>
00048 void
00049 pcl::SHOTLocalReferenceFrameEstimationOMP<PointInT, PointOutT>::computeFeature (PointCloudOut &output)
00050 {
00051
00052 if (this->getKSearch () != 0)
00053 {
00054 PCL_ERROR(
00055 "[pcl::%s::computeFeature] Error! Search method set to k-neighborhood. Call setKSearch(0) and setRadiusSearch( radius ) to use this class.\n",
00056 getClassName().c_str ());
00057 return;
00058 }
00059 tree_->setSortedResults (true);
00060
00061 int data_size = static_cast<int> (indices_->size ());
00062 #ifdef _OPENMP
00063 #pragma omp parallel for num_threads(threads_)
00064 #endif
00065 for (int i = 0; i < data_size; ++i)
00066 {
00067
00068 Eigen::Matrix3f rf;
00069 PointOutT& output_rf = output[i];
00070
00071
00072
00073
00074 std::vector<int> n_indices;
00075 std::vector<float> n_sqr_distances;
00076 this->searchForNeighbors ((*indices_)[i], search_parameter_, n_indices, n_sqr_distances);
00077 if (getLocalRF ((*indices_)[i], rf) == std::numeric_limits<float>::max ())
00078 {
00079 output.is_dense = false;
00080 }
00081
00082 for (int d = 0; d < 3; ++d)
00083 {
00084 output_rf.x_axis[d] = rf.row (0)[d];
00085 output_rf.y_axis[d] = rf.row (1)[d];
00086 output_rf.z_axis[d] = rf.row (2)[d];
00087 }
00088 }
00089
00090 }
00091
00092 #define PCL_INSTANTIATE_SHOTLocalReferenceFrameEstimationOMP(T,OutT) template class PCL_EXPORTS pcl::SHOTLocalReferenceFrameEstimationOMP<T,OutT>;
00093
00094 #endif // PCL_FEATURES_IMPL_SHOT_LRF_H_