39#include <pcl/registration/ia_fpcs.h>
42namespace registration {
50template <
typename PointSource,
53 typename Scalar =
float>
59 shared_ptr<KFPCSInitialAlignment<PointSource, PointTarget, NormalT, Scalar>>;
144 float min_translation3d,
159 float min_translation3d,
209 std::vector<pcl::Indices>& matches,
225 float& fitness_score)
override;
233 finalCompute(
const std::vector<MatchingCandidates>& candidates)
override;
265#include <pcl/registration/impl/ia_kfpcs.hpp>
PointCloudConstPtr input_
The input point cloud dataset.
IndicesPtr indices_
A pointer to the vector of point indices to use.
bool deinitCompute()
This method should get called after finishing the actual computation.
typename VectorType::iterator iterator
shared_ptr< PointCloud< PointSource > > Ptr
Registration represents the base registration class for general purpose, ICP-like methods.
Matrix4 final_transformation_
The final transformation matrix estimated by the registration method after N iterations.
std::string reg_name_
The registration method name.
shared_ptr< const Registration< PointSource, PointTarget, Scalar > > ConstPtr
typename PointCloudSource::Ptr PointCloudSourcePtr
shared_ptr< Registration< PointSource, PointTarget, Scalar > > Ptr
KdTreePtr tree_
A pointer to the spatial search object.
typename PointCloudTarget::Ptr PointCloudTargetPtr
bool converged_
Holds internal convergence state, given user parameters.
int ransac_iterations_
The number of iterations RANSAC should run for.
CorrespondencesPtr correspondences_
The set of correspondences determined at this ICP step.
FPCSInitialAlignment computes corresponding four point congruent sets as described in: "4-points cong...
float max_edge_diff_
Maximal difference between the length of the base edges and valid match edges.
float delta_
Delta value of 4pcs algorithm (standard = 1.0).
float coincidation_limit_
Maximal distance between coinciding intersection points to find valid matches.
virtual void linkMatchWithBase(const pcl::Indices &base_indices, pcl::Indices &match_indices, pcl::Correspondences &correspondences)
Sets the correspondences between the base B and the match M by using the distance of each point to th...
float max_inlier_dist_sqr_
Maximal squared point distance between source and target points to count as inlier.
bool normalize_delta_
Normalize delta flag.
float max_mse_
Maximal mean squared errors of a transformation calculated from a candidate match.
float approx_overlap_
Estimated overlap between source and target (standard = 0.5).
virtual int validateMatch(const pcl::Indices &base_indices, const pcl::Indices &match_indices, const pcl::Correspondences &correspondences, Eigen::Matrix4f &transformation)
Validate the matching by computing the transformation between the source and target based on the four...
float fitness_score_
Resulting fitness score of the best match.
float diameter_
Estimated diameter of the target point cloud.
float max_pair_diff_
Maximal difference between corresponding point pairs in source and target.
float score_threshold_
Score threshold to stop calculation with success.
KFPCSInitialAlignment computes corresponding four point congruent sets based on keypoints as describe...
void getTBestCandidates(float t, float min_angle3d, float min_translation3d, MatchingCandidates &candidates)
Get all unique candidate matches with fitness scores above a threshold t.
void setUpperTranslationThreshold(float upper_trl_boundary)
Set the upper translation threshold used for score evaluation.
float getLowerTranslationThreshold() const
pcl::IndicesPtr indices_validation_
Subset of input indices on which we evaluate candidates.
float upper_trl_boundary_
Upper boundary for translation costs calculation.
void finalCompute(const std::vector< MatchingCandidates > &candidates) override
Final computation of best match out of vector of matches.
void handleMatches(const pcl::Indices &base_indices, std::vector< pcl::Indices > &matches, MatchingCandidates &candidates) override
Method to handle current candidate matches.
void setLambda(float lambda)
Set the weighting factor of the translation cost term.
void setLowerTranslationThreshold(float lower_trl_boundary)
Set the lower translation threshold used for score evaluation.
float lambda_
Weighting factor for translation costs (standard = 0.5).
KFPCSInitialAlignment()
Constructor.
void getNBestCandidates(int n, float min_angle3d, float min_translation3d, MatchingCandidates &candidates)
Get the N best unique candidate matches according to their fitness score.
MatchingCandidates candidates_
Container for resulting vector of registration candidates.
int validateTransformation(Eigen::Matrix4f &transformation, float &fitness_score) override
Validate the transformation by calculating the score value after transforming the input source cloud.
~KFPCSInitialAlignment() override=default
Destructor.
float getUpperTranslationThreshold() const
float lower_trl_boundary_
Lower boundary for translation costs calculation.
bool use_trl_score_
Flag if translation score should be used in validation (internal calculation).
bool initCompute() override
Internal computation initialization.
std::vector< MatchingCandidate, Eigen::aligned_allocator< MatchingCandidate > > MatchingCandidates
IndicesAllocator<> Indices
Type used for indices in PCL.
shared_ptr< Indices > IndicesPtr
A point structure representing normal coordinates and the surface curvature estimate.
Container for matching candidate consisting of.