Skip to content

Commit

Permalink
4PCS for initial pairwise point cloud registration
Browse files Browse the repository at this point in the history
  • Loading branch information
theilerp committed Jan 12, 2015
1 parent d491058 commit 2b48da2
Showing 1 changed file with 29 additions and 27 deletions.
56 changes: 29 additions & 27 deletions registration/include/pcl/registration/ia_fpcs.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ namespace pcl
* \param cloud pointer to the input point cloud
* \param max_dist maximum distance of a point to be considered as a neighbor
* \param nr_threads number of threads to use (default = 1, only used if OpenMP flag is set)
* \return the mean point density of a given point cloud
*/
template <typename PointT> inline float
getMeanPointDensity (const typename pcl::PointCloud<PointT>::ConstPtr &cloud, float max_dist, int nr_threads = 1);
Expand All @@ -60,6 +61,7 @@ namespace pcl
* \param indices the vector of point indices to use from \a cloud
* \param max_dist maximum distance of a point to be considered as a neighbor
* \param nr_threads number of threads to use (default = 1, only used if OpenMP flag is set)
* \return the mean point density of a given point cloud
*/
template <typename PointT> inline float
getMeanPointDensity (const typename pcl::PointCloud<PointT>::ConstPtr &cloud, const std::vector <int> &indices,
Expand Down Expand Up @@ -118,58 +120,58 @@ namespace pcl
target_indices_ = target_indices;
};

/** \brief Get a pointer to the vector of target indices used. */
/** \return a pointer to the vector of target indices. */
inline IndicesPtr
getTargetIndices () const
{
return (target_indices_);
};


/** \brief Set normals of source point cloud.
* \param[in] source_normals point to the normals of the input source cloud.
/** \brief Provide a pointer to the normals of the source point cloud.
* \param[in] source_normals pointer to the normals of the source pointer cloud.
*/
inline void
setSourceNormals (const NormalsConstPtr &source_normals)
{
source_normals_ = source_normals;
};

/** \brief Get normals of source point cloud. */
/** \return the normals of the source point cloud. */
inline NormalsConstPtr
getSourceNormals () const
{
return (source_normals_);
};


/** \brief Set normals of target point cloud.
* \param[in] target_normals point to the normals of the input target cloud.
/** \brief Provide a pointer to the normals of the target point cloud.
* \param[in] target_normals point to the normals of the target point cloud.
*/
inline void
setTargetNormals (const NormalsConstPtr &target_normals)
{
target_normals_ = target_normals;
};

/** \brief Get normals of target point cloud. */
/** \return the normals of the target point cloud. */
inline NormalsConstPtr
getTargetNormals () const
{
return (target_normals_);
};


/** \brief Set number of threads used if OpenMP is activated.
* \param[in] nr_threads the number of threads which are used
/** \brief Set the number of used threads if OpenMP is activated.
* \param[in] nr_threads the number of used threads
*/
inline void
setNumberOfThreads (int nr_threads)
{
nr_threads_ = nr_threads;
};

/** \brief Get number of threads used if OpenMP is activated. */
/** \return the number of threads used if OpenMP is activated. */
inline int
getNumberOfThreads () const
{
Expand All @@ -188,7 +190,7 @@ namespace pcl
normalize_delta_ = normalize;
};

/** \brief Get the constant factor delta which weights the internally calculated parameters. */
/** \return the constant factor delta which weights the internally calculated parameters. */
inline float
getDelta () const
{
Expand All @@ -197,15 +199,15 @@ namespace pcl


/** \brief Set the approximate overlap between source and target.
* \param[in] approx_overlap the estimated overlap between the source and target
* \param[in] approx_overlap the estimated overlap
*/
inline void
setApproxOverlap (float approx_overlap)
{
approx_overlap_ = approx_overlap;
};

/** \brief Get the approximated overlap between source and target. */
/** \return the approximated overlap between source and target. */
inline float
getApproxOverlap () const
{
Expand All @@ -214,49 +216,49 @@ namespace pcl


/** \brief Set the scoring threshold used for early finishing the method.
* \param[in] score_threshold early terminating criteria
* \param[in] score_threshold early terminating score criteria
*/
inline void
setScoreThreshold (float score_threshold)
{
score_threshold_ = score_threshold;
};

/** \brief Get the scoring threshold used for early finishing the method. */
/** \return the scoring threshold used for early finishing the method. */
inline float
getScoreThreshold () const
{
return (score_threshold_);
};


/** \brief Set the number of source samples to use during alignment
* \param[in] nr_samples the number of samples to use during alignment
/** \brief Set the number of source samples to use during alignment.
* \param[in] nr_samples the number of source samples
*/
inline void
setNumberOfSamples (int nr_samples)
{
nr_samples_ = nr_samples;
};

/** \brief Get the number of samples to use during each iteration, as set by the user */
/** \return the number of source samples to use during alignment. */
inline int
getNumberOfSamples () const
{
return (nr_samples_);
};


/** \brief Set the maximum normal difference in degree.
* \param[in] max_norm_diff the maximum difference between corresponding normals in degree
/** \brief Set the maximum normal difference between valid point correspondences in degree.
* \param[in] max_norm_diff the maximum difference in degree
*/
inline void
setMaxNormalDifference (float max_norm_diff)
{
max_norm_diff_ = max_norm_diff;
};

/** \brief Get the maximum normal difference in degree. */
/** \return the maximum normal difference between valid point correspondences in degree. */
inline float
getMaxNormalDifference () const
{
Expand All @@ -273,15 +275,15 @@ namespace pcl
max_runtime_ = max_runtime;
};

/** \brief Get the maximum computation time in seconds. */
/** \return the maximum computation time in seconds. */
inline int
getMaxComputationTime () const
{
return (max_runtime_);
};


/** \brief Get the fitness score of the highest scored match. */
/** \return the fitness score of the best scored four-point match. */
inline float
getFitnessScore () const
{
Expand Down Expand Up @@ -352,7 +354,7 @@ namespace pcl
/** \brief Calculate intersection ratios and segment to segment distances of base diagonals.
* \param[in] base_indices indices of base B
* \param[out] ratio diagonal intersection ratios of base points
* \returns quality value of diagonal intersection
* \return quality value of diagonal intersection
*/
float
segmentToSegmentDist (const std::vector <int> &base_indices, float (&ratio)[2]);
Expand All @@ -362,7 +364,7 @@ namespace pcl
* \brief[in] idx1 first index of current base segment (in source cloud)
* \brief[in] idx2 second index of current base segment (in source cloud)
* \brief[out] pairs resulting point pairs with point-to-point distance close to ref_dist
* \returns
* \return
* * < 0 no corresponding point pair was found
* * = 0 at least one point pair candidate was found
*/
Expand All @@ -378,7 +380,7 @@ namespace pcl
* \param[in] pairs_a point pairs corresponding to points of 1st diagonal of base B
* \param[in] pairs_b point pairs corresponding to points of 2nd diagonal of base B
* \param[in] ratio diagonal intersection ratios of base points
* \returns
* \return
* * < 0 no base match could be found
* * = 0 at least one base match was found
*/
Expand Down Expand Up @@ -436,7 +438,7 @@ namespace pcl
* \param[in] match_indices indices of match M
* \param[in] correspondences corresondences between source and target
* \param[out] transformation resulting transformation matrix
* \returns
* \return
* * < 0 MSE bigger than max_mse_
* * = 0 MSE smaller than max_mse_
*/
Expand Down

0 comments on commit 2b48da2

Please sign in to comment.