39 #ifndef PCL_REGISTRATION_CORRESPONDENCE_REJECTION_H_
40 #define PCL_REGISTRATION_CORRESPONDENCE_REJECTION_H_
50 namespace registration
71 input_correspondences_ = correspondences;
86 if (!input_correspondences_ || (input_correspondences_->empty ()))
89 applyRejection (correspondences);
113 std::vector<int>& indices)
115 if (!input_correspondences_ || input_correspondences_->empty ())
117 PCL_WARN (
"[pcl::%s::getRejectedQueryIndices] Input correspondences not set (lookup of rejected correspondences _not_ possible).\n", getClassName ().c_str ());
127 std::string rejection_name_;
133 inline const std::string&
134 getClassName ()
const {
return (rejection_name_); }
157 template <
typename Po
intT,
typename NormalT=pcl::Po
intNormal>
190 tree_->setInputCloud (target_);
219 std::vector<int> indices (1);
220 std::vector<float> distances (1);
221 if (tree_->nearestKSearch (input_->points[index], 1, indices, distances))
223 return (distances[0]);
226 return (std::numeric_limits<double>::max ());
239 return ((src.getVector4fMap () - tgt.getVector4fMap ()).squaredNorm ());
251 assert ( input_normals_ && target_normals_ &&
"Normals are not set for the input and target point clouds");
254 double score = (src.normal[0] * tgt.normal[0]) + (src.normal[1] * tgt.normal[1]) + (src.normal[2] * tgt.normal[2]);
266 NormalsPtr input_normals_;
269 NormalsPtr target_normals_;