Functions
cloud_geometry::nearest Namespace Reference

Functions

void computeCentroid (const sensor_msgs::PointCloud &points, geometry_msgs::Point32 &centroid)
 Compute the centroid of a set of points and return it as a Point32 message.
void computeCentroid (const geometry_msgs::Polygon &poly, geometry_msgs::Point32 &centroid)
 Compute the centroid of a 3D polygon and return it as a Point32 message.
void computeCentroid (const sensor_msgs::PointCloud &points, const std::vector< int > &indices, sensor_msgs::PointCloud &centroid)
 Compute the centroid of a set of points using their indices and return it as a PointCloud message with 1 value.
void computeCentroid (const sensor_msgs::PointCloud &points, const std::vector< int > &indices, geometry_msgs::Point32 &centroid)
 Compute the centroid of a set of points using their indices and return it as a Point32 message.
void computeCentroid (const sensor_msgs::PointCloudConstPtr &points, const std::vector< int > &indices, geometry_msgs::Point32 &centroid)
 Compute the centroid of a set of points using their indices and return it as a Point32 message.
void computeCentroid (const sensor_msgs::PointCloud &points, const std::vector< int > &indices, std::vector< double > &centroid)
 Compute the centroid of a set of points using their indices and return it as a Point32 message.
void computeCentroid (const sensor_msgs::PointCloud &points, sensor_msgs::PointCloud &centroid)
 Compute the centroid of a set of points and return it as a PointCloud message with 1 value.
void computeCentroid (const sensor_msgs::PointCloud &points, std::vector< int > &indices, sensor_msgs::PointCloud &centroid)
void computeCovarianceMatrix (const sensor_msgs::PointCloud &points, Eigen::Matrix3d &covariance_matrix, geometry_msgs::Point32 &centroid)
 Compute the 3x3 covariance matrix of a given set of points. The result is returned as a Eigen::Matrix3d.
void computeCovarianceMatrix (const sensor_msgs::PointCloud &points, Eigen::Matrix3d &covariance_matrix)
 Compute the 3x3 covariance matrix of a given set of points. The result is returned as a Eigen::Matrix3d.
void computeCovarianceMatrix (const sensor_msgs::PointCloud &points, const std::vector< int > &indices, Eigen::Matrix3d &covariance_matrix, geometry_msgs::Point32 &centroid)
 Compute the 3x3 covariance matrix of a given set of points using their indices. The result is returned as a Eigen::Matrix3d.
void computeCovarianceMatrix (const sensor_msgs::PointCloudConstPtr &points, const std::vector< int > &indices, Eigen::Matrix3d &covariance_matrix, geometry_msgs::Point32 &centroid)
 Compute the 3x3 covariance matrix of a given set of points using their indices. The result is returned as a Eigen::Matrix3d.
void computeCovarianceMatrix (const sensor_msgs::PointCloud &points, const std::vector< int > &indices, Eigen::Matrix3d &covariance_matrix)
 Compute the 3x3 covariance matrix of a given set of points using their indices. The result is returned as a Eigen::Matrix3d.
void computeMomentInvariants (const sensor_msgs::PointCloud &points, double &j1, double &j2, double &j3)
 Compute the 3 moment invariants (j1, j2, j3) for a given set of points.
void computeMomentInvariants (const sensor_msgs::PointCloud &points, const std::vector< int > &indices, double &j1, double &j2, double &j3)
 Compute the 3 moment invariants (j1, j2, j3) for a given set of points, using their indices.
void computeOrganizedPointCloudNormals (sensor_msgs::PointCloud &points, const sensor_msgs::PointCloud &surface, int k, int downsample_factor, int width, int height, double max_z, const geometry_msgs::Point32 &viewpoint)
 Estimate the point normals and surface curvatures for a given organized point cloud dataset (points) using the data from a different point cloud (surface) for least-squares planar estimation.
void computeOrganizedPointCloudNormals (sensor_msgs::PointCloud &points, const sensor_msgs::PointCloudConstPtr &surface, int k, int downsample_factor, int width, int height, double max_z, const geometry_msgs::Point32 &viewpoint)
 Estimate the point normals and surface curvatures for a given organized point cloud dataset (points) using the data from a different point cloud (surface) for least-squares planar estimation.
void computeOrganizedPointCloudNormalsWithFiltering (sensor_msgs::PointCloud &points, const sensor_msgs::PointCloud &surface, int k, int downsample_factor, int width, int height, double max_z, double min_angle, double max_angle, const geometry_msgs::Point32 &viewpoint)
 Estimate the point normals and surface curvatures for a given organized point cloud dataset (points) using the data from a different point cloud (surface) for least-squares planar estimation.
void computePatchEigen (const sensor_msgs::PointCloud &points, Eigen::Matrix3d &eigen_vectors, Eigen::Vector3d &eigen_values)
 Compute the eigenvalues and eigenvectors of a given surface patch.
void computePatchEigen (const sensor_msgs::PointCloud &points, const std::vector< int > &indices, Eigen::Matrix3d &eigen_vectors, Eigen::Vector3d &eigen_values)
 Compute the eigenvalues and eigenvectors of a given surface patch.
void computePatchEigenNormalized (const sensor_msgs::PointCloud &points, Eigen::Matrix3d &eigen_vectors, Eigen::Vector3d &eigen_values, geometry_msgs::Point32 &centroid)
 Compute the eigenvalues and eigenvectors of a given surface patch from its normalized covariance matrix.
void computePatchEigenNormalized (const sensor_msgs::PointCloud &points, const std::vector< int > &indices, Eigen::Matrix3d &eigen_vectors, Eigen::Vector3d &eigen_values, geometry_msgs::Point32 &centroid)
 Compute the eigenvalues and eigenvectors of a given surface patch from its normalized covariance matrix.
void computePointCloudNormals (sensor_msgs::PointCloud &points, const sensor_msgs::PointCloud &surface, int k, const geometry_msgs::PointStamped &viewpoint)
 Estimate (in place) the point normals and surface curvatures for a given point cloud dataset (points) using the data from a different point cloud (surface) for least-squares planar estimation.
void computePointCloudNormals (sensor_msgs::PointCloud &points, const sensor_msgs::PointCloud &surface, double radius, const geometry_msgs::PointStamped &viewpoint)
 Estimate (in place) the point normals and surface curvatures for a given point cloud dataset (points) using the data from a different point cloud (surface) for least-squares planar estimation.
void computePointCloudNormals (sensor_msgs::PointCloud &points, int k, const geometry_msgs::PointStamped &viewpoint)
 Estimate (in place) the point normals and surface curvatures for a given point cloud dataset (points)
void computePointCloudNormals (sensor_msgs::PointCloud &points, double radius, const geometry_msgs::PointStamped &viewpoint)
 Estimate (in place) the point normals and surface curvatures for a given point cloud dataset (points)
void computePointNormal (const sensor_msgs::PointCloud &points, Eigen::Vector4d &plane_parameters, double &curvature)
 Compute the Least-Squares plane fit for a given set of points, and return the estimated plane parameters together with the surface curvature.
void computePointNormal (const sensor_msgs::PointCloud &points, const std::vector< int > &indices, Eigen::Vector4d &plane_parameters, double &curvature)
 Compute the Least-Squares plane fit for a given set of points, using their indices, and return the estimated plane parameters together with the surface curvature.
void computePointNormal (const sensor_msgs::PointCloudConstPtr &points, const std::vector< int > &indices, Eigen::Vector4d &plane_parameters, double &curvature)
 Compute the Least-Squares plane fit for a given set of points, using their indices, and return the estimated plane parameters together with the surface curvature.
void extractEuclideanClusters (const sensor_msgs::PointCloud &points, const std::vector< int > &indices, double tolerance, std::vector< std::vector< int > > &clusters, int nx_idx, int ny_idx, int nz_idx, double eps_angle, unsigned int min_pts_per_cluster)
 Decompose a region of space into clusters based on the euclidean distance between points, and the normal angular deviation : assumes normalized point normals !
void extractEuclideanClusters (const sensor_msgs::PointCloud &points, double tolerance, std::vector< std::vector< int > > &clusters, int nx_idx, int ny_idx, int nz_idx, double eps_angle, unsigned int min_pts_per_cluster)
 Decompose a region of space into clusters based on the euclidean distance between points, and the normal angular deviation : assumes normalized point normals !
void filterJumpEdges (const sensor_msgs::PointCloud &points, sensor_msgs::PointCloud &points_filtered, int k, int width, int height, double min_angle, double max_angle, const geometry_msgs::Point32 &viewpoint)
 Filter jump edges in an organized point cloud dataset (e.g., acquired using TOF or dense stereo, etc)
double getAngleWithViewpoint (float px, float py, float pz, float qx, float qy, float qz, float vp_x=0, float vp_y=0, float vp_z=0)
 Computes the angle between the lines created from 2 points and the viewpoint: [vp->p1], [p1->p2] Returns the angle (in degrees).
bool isBoundaryPoint (const sensor_msgs::PointCloud &points, int q_idx, const std::vector< int > &neighbors, const Eigen::Vector3d &u, const Eigen::Vector3d &v, double angle_threshold)
 Check whether a point is a boundary point in a planar patch of projected points given by indices.

Function Documentation

void cloud_geometry::nearest::computeCentroid ( const sensor_msgs::PointCloud points,
geometry_msgs::Point32 &  centroid 
) [inline]

Compute the centroid of a set of points and return it as a Point32 message.

Parameters:
pointsthe input point cloud
centroidthe output centroid

Definition at line 57 of file nearest.h.

void cloud_geometry::nearest::computeCentroid ( const geometry_msgs::Polygon &  poly,
geometry_msgs::Point32 &  centroid 
) [inline]

Compute the centroid of a 3D polygon and return it as a Point32 message.

Parameters:
polythe input polygon
centroidthe output centroid

Definition at line 80 of file nearest.h.

void cloud_geometry::nearest::computeCentroid ( const sensor_msgs::PointCloud points,
const std::vector< int > &  indices,
sensor_msgs::PointCloud centroid 
)

Compute the centroid of a set of points using their indices and return it as a PointCloud message with 1 value.

Parameters:
pointsthe input point cloud
indicesthe point cloud indices that need to be used
centroidthe output centroid

Definition at line 92 of file nearest.cpp.

void cloud_geometry::nearest::computeCentroid ( const sensor_msgs::PointCloud points,
const std::vector< int > &  indices,
geometry_msgs::Point32 &  centroid 
) [inline]

Compute the centroid of a set of points using their indices and return it as a Point32 message.

Parameters:
pointsthe input point cloud
indicesthe point cloud indices that need to be used
centroidthe output centroid

Definition at line 103 of file nearest.h.

void cloud_geometry::nearest::computeCentroid ( const sensor_msgs::PointCloudConstPtr points,
const std::vector< int > &  indices,
geometry_msgs::Point32 &  centroid 
) [inline]

Compute the centroid of a set of points using their indices and return it as a Point32 message.

Parameters:
pointsthe input point cloud
indicesthe point cloud indices that need to be used
centroidthe output centroid

Definition at line 126 of file nearest.h.

void cloud_geometry::nearest::computeCentroid ( const sensor_msgs::PointCloud points,
const std::vector< int > &  indices,
std::vector< double > &  centroid 
) [inline]

Compute the centroid of a set of points using their indices and return it as a Point32 message.

Parameters:
pointsthe input point cloud
indicesthe point cloud indices that need to be used
centroidthe output centroid

Definition at line 149 of file nearest.h.

Compute the centroid of a set of points and return it as a PointCloud message with 1 value.

Parameters:
pointsthe input point cloud
centroidthe output centroid

Definition at line 55 of file nearest.cpp.

void cloud_geometry::nearest::computeCentroid ( const sensor_msgs::PointCloud points,
std::vector< int > &  indices,
sensor_msgs::PointCloud centroid 
)
void cloud_geometry::nearest::computeCovarianceMatrix ( const sensor_msgs::PointCloud points,
Eigen::Matrix3d &  covariance_matrix,
geometry_msgs::Point32 &  centroid 
) [inline]

Compute the 3x3 covariance matrix of a given set of points. The result is returned as a Eigen::Matrix3d.

Note:
The (x-y-z) centroid is also returned as a Point32 message.
Parameters:
pointsthe input point cloud
covariance_matrixthe 3x3 covariance matrix
centroidthe computed centroid

Definition at line 174 of file nearest.h.

void cloud_geometry::nearest::computeCovarianceMatrix ( const sensor_msgs::PointCloud points,
Eigen::Matrix3d &  covariance_matrix 
) [inline]

Compute the 3x3 covariance matrix of a given set of points. The result is returned as a Eigen::Matrix3d.

Parameters:
pointsthe input point cloud
covariance_matrixthe 3x3 covariance matrix

Definition at line 205 of file nearest.h.

void cloud_geometry::nearest::computeCovarianceMatrix ( const sensor_msgs::PointCloud points,
const std::vector< int > &  indices,
Eigen::Matrix3d &  covariance_matrix,
geometry_msgs::Point32 &  centroid 
) [inline]

Compute the 3x3 covariance matrix of a given set of points using their indices. The result is returned as a Eigen::Matrix3d.

Note:
The (x-y-z) centroid is also returned as a Point32 message.
Parameters:
pointsthe input point cloud
indicesthe point cloud indices that need to be used
covariance_matrixthe 3x3 covariance matrix
centroidthe computed centroid

Definition at line 221 of file nearest.h.

void cloud_geometry::nearest::computeCovarianceMatrix ( const sensor_msgs::PointCloudConstPtr points,
const std::vector< int > &  indices,
Eigen::Matrix3d &  covariance_matrix,
geometry_msgs::Point32 &  centroid 
) [inline]

Compute the 3x3 covariance matrix of a given set of points using their indices. The result is returned as a Eigen::Matrix3d.

Note:
The (x-y-z) centroid is also returned as a Point32 message.
Parameters:
pointsthe input point cloud
indicesthe point cloud indices that need to be used
covariance_matrixthe 3x3 covariance matrix
centroidthe computed centroid

Definition at line 254 of file nearest.h.

void cloud_geometry::nearest::computeCovarianceMatrix ( const sensor_msgs::PointCloud points,
const std::vector< int > &  indices,
Eigen::Matrix3d &  covariance_matrix 
) [inline]

Compute the 3x3 covariance matrix of a given set of points using their indices. The result is returned as a Eigen::Matrix3d.

Parameters:
pointsthe input point cloud
indicesthe point cloud indices that need to be used
covariance_matrixthe 3x3 covariance matrix

Definition at line 285 of file nearest.h.

void cloud_geometry::nearest::computeMomentInvariants ( const sensor_msgs::PointCloud points,
double &  j1,
double &  j2,
double &  j3 
)

Compute the 3 moment invariants (j1, j2, j3) for a given set of points.

Parameters:
pointsthe input point cloud
j1the first moment invariant
j2the second moment invariant
j3the third moment invariant

Definition at line 352 of file nearest.cpp.

void cloud_geometry::nearest::computeMomentInvariants ( const sensor_msgs::PointCloud points,
const std::vector< int > &  indices,
double &  j1,
double &  j2,
double &  j3 
)

Compute the 3 moment invariants (j1, j2, j3) for a given set of points, using their indices.

Parameters:
pointsthe input point cloud
indicesthe point cloud indices that need to be used
j1the first moment invariant
j2the second moment invariant
j3the third moment invariant

Definition at line 389 of file nearest.cpp.

void cloud_geometry::nearest::computeOrganizedPointCloudNormals ( sensor_msgs::PointCloud points,
const sensor_msgs::PointCloud surface,
int  k,
int  downsample_factor,
int  width,
int  height,
double  max_z,
const geometry_msgs::Point32 &  viewpoint 
)

Estimate the point normals and surface curvatures for a given organized point cloud dataset (points) using the data from a different point cloud (surface) for least-squares planar estimation.

Note:
The main difference between this method and its computePointCloudNormals () sibblings is that assumptions are being made regarding the organization of points in the cloud. For example, point clouds acquired using camera sensors are assumed to be row-major, and the width and height of the depth image are assumed to be known, etc.
Parameters:
pointsthe input point cloud (on output, 4 extra channels will be added: nx, ny, nz, and curvatures)
surfacethe point cloud data to use for least-squares planar estimation
kthe windowing factor (i.e., how many pixels in the depth image in all directions should the neighborhood of a point contain)
downsample_factorfactor for downsampling the input data, i.e., take every Nth row and column in the depth image
widththe width in pixels of the depth image
heightthe height in pixels of the depth image
max_zmaximum distance threshold (on Z) between the query point and its neighbors (set to -1 to ignore the check)
viewpointthe viewpoint where the cloud was acquired from (used for normal flip)

Definition at line 676 of file nearest.cpp.

void cloud_geometry::nearest::computeOrganizedPointCloudNormals ( sensor_msgs::PointCloud points,
const sensor_msgs::PointCloudConstPtr surface,
int  k,
int  downsample_factor,
int  width,
int  height,
double  max_z,
const geometry_msgs::Point32 &  viewpoint 
)

Estimate the point normals and surface curvatures for a given organized point cloud dataset (points) using the data from a different point cloud (surface) for least-squares planar estimation.

Note:
The main difference between this method and its computePointCloudNormals () sibblings is that assumptions are being made regarding the organization of points in the cloud. For example, point clouds acquired using camera sensors are assumed to be row-major, and the width and height of the depth image are assumed to be known, etc.
Parameters:
pointsthe input point cloud (on output, 4 extra channels will be added: nx, ny, nz, and curvatures)
surfacethe point cloud data to use for least-squares planar estimation
kthe windowing factor (i.e., how many pixels in the depth image in all directions should the neighborhood of a point contain)
downsample_factorfactor for downsampling the input data, i.e., take every Nth row and column in the depth image
widththe width in pixels of the depth image
heightthe height in pixels of the depth image
max_zmaximum distance threshold (on Z) between the query point and its neighbors (set to -1 to ignore the check)
viewpointthe viewpoint where the cloud was acquired from (used for normal flip)

Definition at line 773 of file nearest.cpp.

void cloud_geometry::nearest::computeOrganizedPointCloudNormalsWithFiltering ( sensor_msgs::PointCloud points,
const sensor_msgs::PointCloud surface,
int  k,
int  downsample_factor,
int  width,
int  height,
double  max_z,
double  min_angle,
double  max_angle,
const geometry_msgs::Point32 &  viewpoint 
)

Estimate the point normals and surface curvatures for a given organized point cloud dataset (points) using the data from a different point cloud (surface) for least-squares planar estimation.

Note:
The main difference between this method and its computePointCloudNormals () sibblings is that assumptions are being made regarding the organization of points in the cloud. For example, point clouds acquired using camera sensors are assumed to be row-major, and the width and height of the depth image are assumed to be known, etc.
Parameters:
pointsthe input point cloud (on output, 4 extra channels will be added: nx, ny, nz, and curvatures)
surfacethe point cloud data to use for least-squares planar estimation
kthe windowing factor (i.e., how many pixels in the depth image in all directions should the neighborhood of a point contain)
downsample_factorfactor for downsampling the input data, i.e., take every Nth row and column in the depth image
widththe width in pixels of the depth image
heightthe height in pixels of the depth image
max_zmaximum distance threshold (on Z) between the query point and its neighbors (set to -1 to ignore the check)
min_anglethe minimum angle allowed between the viewpoint ray and the line formed by two subsequent points(used for filtering jump edge data)
max_anglethe maximum angle allowed between the viewpoint ray and the line formed by two subsequent points(used for filtering jump edge data)
viewpointthe viewpoint where the cloud was acquired from (used for normal flip)

Definition at line 872 of file nearest.cpp.

void cloud_geometry::nearest::computePatchEigen ( const sensor_msgs::PointCloud points,
Eigen::Matrix3d &  eigen_vectors,
Eigen::Vector3d &  eigen_values 
)

Compute the eigenvalues and eigenvectors of a given surface patch.

Parameters:
pointsthe input point cloud
eigen_vectorsthe resultant eigenvectors
eigen_valuesthe resultant eigenvalues

Definition at line 129 of file nearest.cpp.

void cloud_geometry::nearest::computePatchEigen ( const sensor_msgs::PointCloud points,
const std::vector< int > &  indices,
Eigen::Matrix3d &  eigen_vectors,
Eigen::Vector3d &  eigen_values 
)

Compute the eigenvalues and eigenvectors of a given surface patch.

Parameters:
pointsthe input point cloud
indicesthe point cloud indices that need to be used
eigen_vectorsthe resultant eigenvectors
eigen_valuesthe resultant eigenvalues

Definition at line 150 of file nearest.cpp.

void cloud_geometry::nearest::computePatchEigenNormalized ( const sensor_msgs::PointCloud points,
Eigen::Matrix3d &  eigen_vectors,
Eigen::Vector3d &  eigen_values,
geometry_msgs::Point32 &  centroid 
)

Compute the eigenvalues and eigenvectors of a given surface patch from its normalized covariance matrix.

Parameters:
pointsthe input point cloud
eigen_vectorsthe resultant eigenvectors
eigen_valuesthe resultant eigenvalues
centroidthe centroid of the points

Definition at line 171 of file nearest.cpp.

void cloud_geometry::nearest::computePatchEigenNormalized ( const sensor_msgs::PointCloud points,
const std::vector< int > &  indices,
Eigen::Matrix3d &  eigen_vectors,
Eigen::Vector3d &  eigen_values,
geometry_msgs::Point32 &  centroid 
)

Compute the eigenvalues and eigenvectors of a given surface patch from its normalized covariance matrix.

Parameters:
pointsthe input point cloud
indicesthe point cloud indices that need to be used
eigen_vectorsthe resultant eigenvectors
eigen_valuesthe resultant eigenvalues
centroidthe centroid of the points

Definition at line 202 of file nearest.cpp.

void cloud_geometry::nearest::computePointCloudNormals ( sensor_msgs::PointCloud points,
const sensor_msgs::PointCloud surface,
int  k,
const geometry_msgs::PointStamped &  viewpoint 
)

Estimate (in place) the point normals and surface curvatures for a given point cloud dataset (points) using the data from a different point cloud (surface) for least-squares planar estimation.

Parameters:
pointsthe input point cloud (on output, 4 extra channels will be added: nx, ny, nz, and curvatures)
surfacethe point cloud data to use for least-squares planar estimation
kuse a fixed number of k-nearest neighbors for the least-squares fit
viewpointthe viewpoint where the cloud was acquired from (used for normal flip)

Definition at line 480 of file nearest.cpp.

void cloud_geometry::nearest::computePointCloudNormals ( sensor_msgs::PointCloud points,
const sensor_msgs::PointCloud surface,
double  radius,
const geometry_msgs::PointStamped &  viewpoint 
)

Estimate (in place) the point normals and surface curvatures for a given point cloud dataset (points) using the data from a different point cloud (surface) for least-squares planar estimation.

Parameters:
pointsthe input point cloud (on output, 4 extra channels will be added: nx, ny, nz, and curvatures)
surfacethe point cloud data to use for least-squares planar estimation
radiususe a neighbor fixed radius search for the least-squares fit
viewpointthe viewpoint where the cloud was acquired from (used for normal flip)

Definition at line 525 of file nearest.cpp.

void cloud_geometry::nearest::computePointCloudNormals ( sensor_msgs::PointCloud points,
int  k,
const geometry_msgs::PointStamped &  viewpoint 
)

Estimate (in place) the point normals and surface curvatures for a given point cloud dataset (points)

Parameters:
pointsthe input point cloud (on output, 4 extra channels will be added: nx, ny, nz, and curvatures)
kuse a fixed number of k-nearest neighbors for the least-squares fit
viewpointthe viewpoint where the cloud was acquired from (used for normal flip)

Definition at line 568 of file nearest.cpp.

void cloud_geometry::nearest::computePointCloudNormals ( sensor_msgs::PointCloud points,
double  radius,
const geometry_msgs::PointStamped &  viewpoint 
)

Estimate (in place) the point normals and surface curvatures for a given point cloud dataset (points)

Parameters:
pointsthe input point cloud (on output, 4 extra channels will be added: nx, ny, nz, and curvatures)
radiususe a neighbor fixed radius search for the least-squares fit
viewpointthe viewpoint where the cloud was acquired from (used for normal flip)

Definition at line 623 of file nearest.cpp.

void cloud_geometry::nearest::computePointNormal ( const sensor_msgs::PointCloud points,
Eigen::Vector4d &  plane_parameters,
double &  curvature 
)

Compute the Least-Squares plane fit for a given set of points, and return the estimated plane parameters together with the surface curvature.

Parameters:
pointsthe input point cloud
plane_parametersthe plane parameters as: a, b, c, d (ax + by + cz + d = 0)
curvaturethe estimated surface curvature as a measure of

\[ \lambda_0 / (\lambda_0 + \lambda_1 + \lambda_2) \]

Definition at line 236 of file nearest.cpp.

void cloud_geometry::nearest::computePointNormal ( const sensor_msgs::PointCloud points,
const std::vector< int > &  indices,
Eigen::Vector4d &  plane_parameters,
double &  curvature 
)

Compute the Least-Squares plane fit for a given set of points, using their indices, and return the estimated plane parameters together with the surface curvature.

Parameters:
pointsthe input point cloud
indicesthe point cloud indices that need to be used
plane_parametersthe plane parameters as: a, b, c, d (ax + by + cz + d = 0)
curvaturethe estimated surface curvature as a measure of

\[ \lambda_0 / (\lambda_0 + \lambda_1 + \lambda_2) \]

Definition at line 275 of file nearest.cpp.

void cloud_geometry::nearest::computePointNormal ( const sensor_msgs::PointCloudConstPtr points,
const std::vector< int > &  indices,
Eigen::Vector4d &  plane_parameters,
double &  curvature 
)

Compute the Least-Squares plane fit for a given set of points, using their indices, and return the estimated plane parameters together with the surface curvature.

Parameters:
pointsthe input point cloud
indicesthe point cloud indices that need to be used
plane_parametersthe plane parameters as: a, b, c, d (ax + by + cz + d = 0)
curvaturethe estimated surface curvature as a measure of

\[ \lambda_0 / (\lambda_0 + \lambda_1 + \lambda_2) \]

Definition at line 315 of file nearest.cpp.

void cloud_geometry::nearest::extractEuclideanClusters ( const sensor_msgs::PointCloud points,
const std::vector< int > &  indices,
double  tolerance,
std::vector< std::vector< int > > &  clusters,
int  nx_idx,
int  ny_idx,
int  nz_idx,
double  eps_angle,
unsigned int  min_pts_per_cluster 
)

Decompose a region of space into clusters based on the euclidean distance between points, and the normal angular deviation : assumes normalized point normals !

Parameters:
pointsthe point cloud message
indicesa list of point indices to use
tolerancethe spatial tolerance as a measure in the L2 Euclidean space
clustersthe resultant clusters containing point indices
nx_idxthe index of the channel containing the X component of the normal (use -1 to disable the check)
ny_idxthe index of the channel containing the Y component of the normal (use -1 to disable the check)
nz_idxthe index of the channel containing the Z component of the normal (use -1 to disable the check)
eps_anglethe maximum allowed difference between normals in degrees for cluster/region growing (only valid if nx_idx && ny_idx && nz_idx != -1)
min_pts_per_clusterminimum number of points that a cluster may contain (default = 1)

Definition at line 1055 of file nearest.cpp.

void cloud_geometry::nearest::extractEuclideanClusters ( const sensor_msgs::PointCloud points,
double  tolerance,
std::vector< std::vector< int > > &  clusters,
int  nx_idx,
int  ny_idx,
int  nz_idx,
double  eps_angle,
unsigned int  min_pts_per_cluster 
)

Decompose a region of space into clusters based on the euclidean distance between points, and the normal angular deviation : assumes normalized point normals !

Parameters:
pointsthe point cloud message
tolerancethe spatial tolerance as a measure in the L2 Euclidean space
clustersthe resultant clusters containing point indices
nx_idxthe index of the channel containing the X component of the normal (use -1 to disable the check)
ny_idxthe index of the channel containing the Y component of the normal (use -1 to disable the check)
nz_idxthe index of the channel containing the Z component of the normal (use -1 to disable the check)
eps_anglethe maximum allowed difference between normals in degrees for cluster/region growing (only valid if nx_idx && ny_idx && nz_idx != -1)
min_pts_per_clusterminimum number of points that a cluster may contain (default = 1)

Definition at line 1149 of file nearest.cpp.

void cloud_geometry::nearest::filterJumpEdges ( const sensor_msgs::PointCloud points,
sensor_msgs::PointCloud points_filtered,
int  k,
int  width,
int  height,
double  min_angle,
double  max_angle,
const geometry_msgs::Point32 &  viewpoint 
)

Filter jump edges in an organized point cloud dataset (e.g., acquired using TOF or dense stereo, etc)

the input point cloud size is assumed to have (width*height) number of points, in order!

Parameters:
pointsthe input organized point cloud data
points_filteredthe output filtered point cloud data
kthe windowing factor (i.e., how many pixels in the depth image in all directions should the neighborhood of a point contain)
widththe width in pixels of the depth image
heightthe height in pixels of the depth image
min_anglethe minimum angle allowed between the viewpoint ray and the line formed by two subsequent points(used for filtering jump edge data)
max_anglethe maximum angle allowed between the viewpoint ray and the line formed by two subsequent points(used for filtering jump edge data)
viewpointthe viewpoint where the cloud was acquired from (used for normal flip)

Definition at line 975 of file nearest.cpp.

double cloud_geometry::nearest::getAngleWithViewpoint ( float  px,
float  py,
float  pz,
float  qx,
float  qy,
float  qz,
float  vp_x = 0,
float  vp_y = 0,
float  vp_z = 0 
) [inline]

Computes the angle between the lines created from 2 points and the viewpoint: [vp->p1], [p1->p2] Returns the angle (in degrees).

Parameters:
pxX coordinate for the first point
pyY coordinate for the first point
pzZ coordinate for the first point
qxX coordinate for the second point
qyY coordinate for the second point
qzZ coordinate for the second point
vp_xX coordinate of the viewpoint (0 by default)
vp_yY coordinate of the viewpoint (0 by default)
vp_zZ coordinate of the viewpoint (0 by default)

Definition at line 305 of file nearest.h.

bool cloud_geometry::nearest::isBoundaryPoint ( const sensor_msgs::PointCloud points,
int  q_idx,
const std::vector< int > &  neighbors,
const Eigen::Vector3d &  u,
const Eigen::Vector3d &  v,
double  angle_threshold 
)

Check whether a point is a boundary point in a planar patch of projected points given by indices.

Note:
A coordinate system u-v-n must be computed a-priori using getCoordinateSystemOnPlane
Parameters:
pointsa pointer to the input point cloud
q_idxthe index of the query point in points
neighborsthe estimated point neighbors of the query point
uthe u direction
vthe v direction
angle_thresholdthe threshold angle (default $ / 2.0$)

Definition at line 428 of file nearest.cpp.



door_handle_detector
Author(s): Radu Bogdan Rusu, Marius
autogenerated on Wed Dec 11 2013 14:17:01