Skip to content

Commit

Permalink
Format doxygen comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Heiko Thiel committed Jan 3, 2022
1 parent 73f77da commit 2d4864e
Show file tree
Hide file tree
Showing 13 changed files with 176 additions and 94 deletions.
60 changes: 42 additions & 18 deletions apps/in_hand_scanner/include/pcl/apps/in_hand_scanner/icp.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,9 @@ class PCL_EXPORTS ICP {
/** @{ */
/** \brief Convergence is detected when the change of the fitness between the current
* and previous iteration becomes smaller than the given epsilon (set in cm^2). The
* fitness is the mean squared euclidean distance between corresponding points. \note
* Only accepted if it is greater than 0.
* fitness is the mean squared euclidean distance between corresponding points.
*
* \note Only accepted if it is greater than 0.
*/
void
setEpsilon(const float epsilon);
Expand All @@ -83,7 +84,9 @@ class PCL_EXPORTS ICP {

/** @{ */
/** \brief The registration fails if the number of iterations exceeds the maximum
* number of iterations. \note Must be greater than 0. Smaller values are set to 1.
* number of iterations.
*
* \note Must be greater than 0. Smaller values are set to 1.
*/
void
setMaxIterations(const unsigned int max_iter);
Expand All @@ -96,6 +99,7 @@ class PCL_EXPORTS ICP {
/** \brief The registration fails at the state of convergence if the overlap between
* the model and data shape is smaller than a minimum overlap. The overlap is the
* fraction of correspondences (after rejection) to the initial number of data points.
*
* \note Must be between zero and one. Values outside this range are clamped to the
* nearest valid value.
*/
Expand All @@ -108,7 +112,9 @@ class PCL_EXPORTS ICP {

/** @{ */
/** \brief The registration fails at the state of convergence if the fitness is bigger
* than this threshold (set in cm^2) \note Must be greater than zero.
* than this threshold (set in cm^2)
*
* \note Must be greater than zero.
*/
void
setMaxFitness(const float fitness);
Expand All @@ -121,8 +127,9 @@ class PCL_EXPORTS ICP {
/** \brief Correspondences are rejected if the squared distance is above a threshold.
* This threshold is initialized with infinity (all correspondences are accepted in
* the first iteration). The threshold of the next iterations is set to the fitness of
* the current iteration multiplied by the factor set by this method. \note Must be
* greater or equal one. Smaller values are set to one.
* the current iteration multiplied by the factor set by this method.
*
* \note Must be greater or equal one. Smaller values are set to one.
*/
void
setCorrespondenceRejectionFactor(const float factor);
Expand All @@ -133,8 +140,10 @@ class PCL_EXPORTS ICP {

/** @{ */
/** \brief Correspondences are rejected if the angle between the normals is bigger
* than this threshold. Set in degrees. \note Must be between 180 degrees and 0.
* Values outside this range are clamped to the nearest valid value.
* than this threshold. Set in degrees.
*
* \note Must be between 180 degrees and 0. Values outside this range are clamped to
* the nearest valid value.
*/
void
setMaxAngle(const float angle);
Expand All @@ -144,9 +153,13 @@ class PCL_EXPORTS ICP {
/** @} */

/** \brief Find the transformation that aligns the data cloud (source) to the model
* mesh (target). \param[in] mesh_model Model mesh (target). \param[in] cloud_data
* Data cloud (source). \param[in] T_init Initial guess for the transformation.
* \paran[out] T_final The computed transformation.
* mesh (target).
*
* \param[in] mesh_model Model mesh (target).
* \param[in] cloud_data Data cloud (source).
* \param[in] T_init Initial guess for the transformation.
* \param[out] T_final The computed transformation.
*
* \return true if success.
*/
bool
Expand All @@ -166,27 +179,38 @@ class PCL_EXPORTS ICP {
using KdTreeConstPtr = KdTree::ConstPtr;

/** \brief Selects the model points that are pointing towards to the camera (data
* coordinate system = camera coordinate system). \param[in] mesh_model Input mesh.
* coordinate system = camera coordinate system).
*
* \param[in] mesh_model Input mesh.
* \param[in] T_inv Transformation that brings the model mesh into the camera
* coordinate system. \return Cloud containing the selected points (the connectivity
* coordinate system.
*
* \return Cloud containing the selected points (the connectivity
* information of the mesh is currently not used during the registration).
*/
CloudNormalConstPtr
selectModelPoints(const MeshConstPtr& mesh_model, const Eigen::Matrix4f& T_inv) const;

/** \brief Selects the valid data points. The input cloud is organized -> contains
* nans which are removed \param[in] cloud_data Input cloud. \return Cloud containing
* the selected points.
* nans which are removed
*
* \param[in] cloud_data Input cloud.
*
* \return Cloud containing the selected points.
*/
CloudNormalConstPtr
selectDataPoints(const CloudXYZRGBNormalConstPtr& cloud_data) const;

/** \brief Finds the transformation that minimizes the point to plane distance from
* the source to the target cloud. The input clouds must be arranged to have one to
* one correspondences (point 0 in source corresponds to point 0 in target, point 1 in
* source to point 1 in target and so on). \param[in] cloud_source Source cloud
* (data). \param[in] cloud_target Target cloud (model). \param[out] T The computed
* transformation. \return true if success
* source to point 1 in target and so on).
*
* \param[in] cloud_source Source cloud (data).
* \param[in] cloud_target Target cloud (model).
* \param[out] T The computed transformation.
*
* \return true if success
*/
bool
minimizePointPlane(const CloudNormal& cloud_source,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,15 +119,12 @@ struct PointIHS : public pcl::ihs::_PointIHS {
this->directions = 0;
}

// inline Eigen::Vector3i getRGBVector3i () {return (Eigen::Vector3i (r,
// g, b));}
inline const Eigen::Vector3i
getRGBVector3i() const
{
return (Eigen::Vector3i(r, g, b));
}
// inline Eigen::Vector4i getRGBVector4i () {return (Eigen::Vector4i (r,
// g, b, a));}

inline const Eigen::Vector4i
getRGBVector4i() const
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ public Q_SLOTS:
reset();

/** \brief Saves the model mesh in a file with the given filename and filetype.
*
* \note The extension of the filename is ignored!
*/
void
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,21 +71,28 @@ class PCL_EXPORTS InputDataProcessing {
InputDataProcessing();

/** \brief Apply the segmentation on the input cloud (XYZ and HSV).
*
* \param[in] cloud_in The input cloud.
* \param[out] cloud_out The segmented cloud.
* \param[out] cloud_discarded Cloud containing all points that were removed during
* the HSV segmentation. The points in the XYZ segmentation are NOT used! \return true
* if success. \note Converts from m to cm.
* the HSV segmentation. The points in the XYZ segmentation are NOT used!
*
* \return true if success.
*
* \note Converts from m to cm.
*/
bool
segment(const CloudXYZRGBAConstPtr& cloud_in,
CloudXYZRGBNormalPtr& cloud_out,
CloudXYZRGBNormalPtr& cloud_discarded) const;

/** \brief Calculate the normals of the input cloud.
*
* \param[in] cloud_in The input cloud.
* \param[out] cloud_out Input cloud with normals appended.
*
* \return true if success.
*
* \note Converts from m to cm.
*/
bool
Expand Down Expand Up @@ -167,7 +174,9 @@ class PCL_EXPORTS InputDataProcessing {
/** @{ */
/** \brief Simple color segmentation in the HSV color space. Points inside of H - S -
* V min / max are discarded. H must be in the range 0 and 360, S and V in the range 0
* and 1. \note If you set values outside of the allowed range the member variables
* and 1.
*
* \note If you set values outside of the allowed range the member variables
* are clamped to the next best value. E.g. H is set to 0 if you pass -1.
*/
inline void
Expand Down Expand Up @@ -316,10 +325,12 @@ class PCL_EXPORTS InputDataProcessing {
dilate(MatrixXb& mask, const int k) const;

/** \brief Calculates the manhattan distance map for the input matrix.
* \param[in] mat Input matrix.
*
* \param[in] mat Input matrix.
* \param[in] comp Compared value. mat==comp will have zero distance.
*
* \return Matrix containing the distances to mat==comp
* \see http://ostermiller.org/dilate_and_erode.html
* \see http://ostermiller.org/dilate_and_erode.html
*/
MatrixXi
manhattan(const MatrixXb& mat, const bool comp) const;
Expand Down
46 changes: 32 additions & 14 deletions apps/in_hand_scanner/include/pcl/apps/in_hand_scanner/integration.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,18 +73,22 @@ class PCL_EXPORTS Integration {
Integration();

/** \brief Reconstructs a mesh from an organized cloud.
*
* \param[in] cloud_data Input cloud. Must be organized.
* \param[in] mesh_model Reconstructed mesh.
*
* \return true if success.
*/
bool
reconstructMesh(const CloudXYZRGBNormalConstPtr& cloud_data,
MeshPtr& mesh_model) const;

/** \brief Merge the organized cloud into the mesh.
/** \brief Merge the organized cloud into the mesh.#
*
* \param[in] cloud_data Input cloud. Must be organized.
* \param[in,out] mesh_model Mesh with new points integrated.
* \param[in] T Transformation that aligns the data cloud with the model mesh.
*
* \return true if success.
*/
bool
Expand All @@ -96,22 +100,27 @@ class PCL_EXPORTS Integration {
* again age by one iteration. Points that are observed again get an age of 0. Once a
* point reaches the maximum age it is decided if the point is removed or kept in the
* mesh. A point is removed if it has not been observed from a minimum number of
* directions. \param[in,out] mesh The mesh which should be processed. \param[in]
* cleanup Calls mesh.cleanup () if true.
* directions.
*
* \param[in,out] mesh The mesh which should be processed.
* \param[in] cleanup Calls mesh.cleanup() if true.
*/
void
age(const MeshPtr& mesh, const bool cleanup = true) const;

/** \brief Removes unfit vertices regardless of their age. Unfit vertices are those
* that have not been observed from enough directions. \param[in,out] mesh The which
* should be processed. \param[in] cleanup Calls mesh.cleanup () if true.
* that have not been observed from enough directions.
*
* \param[in,out] mesh The which should be processed.
* \param[in] cleanup Calls mesh.cleanup() if true.
*/
void
removeUnfitVertices(const MeshPtr& mesh, const bool cleanup = true) const;

/** @{ */
/** \brief Corresponding points are averaged out if their distance is below a distance
* threshold. Else the points are added to the mesh as new vertices (Set in cm^2).
*
* \note Must be greater than zero.
*/
void
Expand All @@ -122,28 +131,34 @@ class PCL_EXPORTS Integration {

/** @{ */
/** \brief Corresponding points are only averaged out if the angle between the normals
* is smaller than an angle threshold. \note Must be between 0 and 180. Values outside
* this range are clamped to the nearest valid value.
* is smaller than an angle threshold.
*
* \note Must be between 0 and 180. Values outside this range are clamped to the
* nearest valid value.
*/
void
setMaxAngle(const float angle);
float
getMaxAngle() const;
/** @} */

/** @{ */
/** @{ */
/** \brief Once a point reaches the maximum age it is decided if the point is removed
* or kept in the mesh. \note Must be greater than zero.
* or kept in the mesh.
*
* \note Must be greater than zero.
*/
void
setMaxAge(const unsigned int age);
unsigned int
getMaxAge() const;
/** @} */

/** @{ */
/** @{ */
/** \brief A point is removed if it has not been observed from a minimum number of
* directions. \note Must be greater than zero.
* directions.
*
* \note Must be greater than zero.
*/
void
setMinDirections(const unsigned int directions);
Expand Down Expand Up @@ -217,18 +232,21 @@ class PCL_EXPORTS Integration {
float max_squared_distance_;

/** \brief Maximum angle between normals below which points are averaged out. In
* degrees. */
* degrees.
*/
float max_angle_;

/** \brief Minimum weight above which points are added. */
float min_weight_;

/** \brief Once a point reaches the maximum age it is decided if the point is removed
* or kept in the mesh. */
* or kept in the mesh.
*/
unsigned int max_age_;

/** \brief A point is removed if it has not been observed from a minimum number of
* directions. */
* directions.
*/
unsigned int min_directions_;
};
} // End namespace ihs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@
namespace pcl {
namespace ihs {
/** \brief Contains methods that take advantage of the connectivity information in the
* mesh. \author Martin Saelzle \ingroup apps
* mesh.
*
* \author Martin Saelzle
* \ingroup apps
*/
class MeshProcessing {
public:
Expand All @@ -59,9 +62,11 @@ class MeshProcessing {
MeshProcessing();

/** \brief Inserts triangles into jagged boundaries, removes isolated triangles and
* closes triangular holes. \param[in,out] mesh The mesh which should be processed.
* closes triangular holes.
*
* \param[in,out] mesh The mesh which should be processed.
* \param[in] boundary_collection Collection of boundary half-edges.
* \param[in] cleanup Calls mesh.cleanup () if true.
* \param[in] cleanup Calls mesh.cleanup() if true.
*/
void
processBoundary(Mesh& mesh,
Expand Down
Loading

0 comments on commit 2d4864e

Please sign in to comment.