142 descLength_ = nr_grid_sector_ * (nr_shape_bins_ + 1);
144 sqradius_ = search_radius_ * search_radius_;
145 radius3_4_ = (search_radius_ * 3) / 4;
146 radius1_4_ = search_radius_ / 4;
147 radius1_2_ = search_radius_ / 2;
149 assert(descLength_ == 352);
151 output.is_dense =
true;
153#pragma omp parallel for \
156 num_threads(threads_) \
157 schedule(dynamic, chunk_size_)
158 for (std::ptrdiff_t idx = 0; idx < static_cast<std::ptrdiff_t> (indices_->size ()); ++idx)
161 Eigen::VectorXf shot;
162 shot.setZero (descLength_);
164 bool lrf_is_nan =
false;
165 const PointRFT& current_frame = (*frames_)[idx];
166 if (!std::isfinite (current_frame.x_axis[0]) ||
167 !std::isfinite (current_frame.y_axis[0]) ||
168 !std::isfinite (current_frame.z_axis[0]))
170 PCL_WARN (
"[pcl::%s::computeFeature] The local reference frame is not valid! Aborting description of point with index %d\n",
171 getClassName ().c_str (), (*indices_)[idx]);
178 std::vector<float> nn_dists (k_);
180 if (!
isFinite ((*input_)[(*indices_)[idx]]) || lrf_is_nan || this->searchForNeighbors ((*indices_)[idx], search_parameter_, nn_indices,
184 for (Eigen::Index d = 0; d < shot.size (); ++d)
185 output[idx].descriptor[d] = std::numeric_limits<float>::quiet_NaN ();
186 for (
int d = 0; d < 9; ++d)
187 output[idx].rf[d] = std::numeric_limits<float>::quiet_NaN ();
189 output.is_dense =
false;
194 this->computePointSHOT (idx, nn_indices, nn_dists, shot);
197 for (Eigen::Index d = 0; d < shot.size (); ++d)
198 output[idx].descriptor[d] = shot[d];
199 for (
int d = 0; d < 3; ++d)
201 output[idx].rf[d + 0] = (*frames_)[idx].x_axis[d];
202 output[idx].rf[d + 3] = (*frames_)[idx].y_axis[d];
203 output[idx].rf[d + 6] = (*frames_)[idx].z_axis[d];
226 descLength_ = (b_describe_shape_) ? nr_grid_sector_ * (nr_shape_bins_ + 1) : 0;
227 descLength_ += (b_describe_color_) ? nr_grid_sector_ * (nr_color_bins_ + 1) : 0;
229 assert( (!b_describe_color_ && b_describe_shape_ && descLength_ == 352) ||
230 (b_describe_color_ && !b_describe_shape_ && descLength_ == 992) ||
231 (b_describe_color_ && b_describe_shape_ && descLength_ == 1344)
234 sqradius_ = search_radius_ * search_radius_;
235 radius3_4_ = (search_radius_ * 3) / 4;
236 radius1_4_ = search_radius_ / 4;
237 radius1_2_ = search_radius_ / 2;
239 output.is_dense =
true;
241#pragma omp parallel for \
244 num_threads(threads_) \
245 schedule(dynamic, chunk_size_)
246 for (std::ptrdiff_t idx = 0; idx < static_cast<std::ptrdiff_t> (indices_->size ()); ++idx)
248 Eigen::VectorXf shot;
249 shot.setZero (descLength_);
254 std::vector<float> nn_dists (k_);
256 bool lrf_is_nan =
false;
257 const PointRFT& current_frame = (*frames_)[idx];
258 if (!std::isfinite (current_frame.x_axis[0]) ||
259 !std::isfinite (current_frame.y_axis[0]) ||
260 !std::isfinite (current_frame.z_axis[0]))
262 PCL_WARN (
"[pcl::%s::computeFeature] The local reference frame is not valid! Aborting description of point with index %d\n",
263 getClassName ().c_str (), (*indices_)[idx]);
267 if (!
isFinite ((*input_)[(*indices_)[idx]]) ||
269 this->searchForNeighbors ((*indices_)[idx], search_parameter_, nn_indices, nn_dists) == 0)
272 for (Eigen::Index d = 0; d < shot.size (); ++d)
273 output[idx].descriptor[d] = std::numeric_limits<float>::quiet_NaN ();
274 for (
int d = 0; d < 9; ++d)
275 output[idx].rf[d] = std::numeric_limits<float>::quiet_NaN ();
277 output.is_dense =
false;
282 this->computePointSHOT (idx, nn_indices, nn_dists, shot);
285 for (Eigen::Index d = 0; d < shot.size (); ++d)
286 output[idx].descriptor[d] = shot[d];
287 for (
int d = 0; d < 3; ++d)
289 output[idx].rf[d + 0] = (*frames_)[idx].x_axis[d];
290 output[idx].rf[d + 3] = (*frames_)[idx].y_axis[d];
291 output[idx].rf[d + 6] = (*frames_)[idx].z_axis[d];