pcl_utils
|
#include <pcl_utils.h>
Static Public Member Functions | |
static pcl::visualization::PCLVisualizer::Ptr | pclViewer () |
static pcl::visualization::PCLVisualizer::Ptr | pclViewer (typename PclCloud::Ptr &cloud) |
static void | showCloud (typename PclCloud::Ptr &cloud) |
static void | addColoredCloud (pcl::visualization::PCLVisualizer::Ptr &viewer, typename PclCloud::Ptr &cloud, float r=255.0f, float g=0.0f, float b=0.0f) |
static void | downsample (typename PclCloud::Ptr &cloud, typename PclCloud::Ptr &outcloud, const float leaf=0.005f) |
template<typename PointNT > | |
static void | estimateNormal (typename pcl::PointCloud< PointNT >::Ptr &cloud, typename pcl::PointCloud< PointNT >::Ptr &outcloud, const float radius=0.01) |
static PclCloud::Ptr | cropPointCloud (typename PclCloud::Ptr &cloud, Eigen::Vector2i &topleft, Eigen::Vector2i &bottomright) |
static PclCloud::Ptr | cropPointCloud (typename PclCloud::Ptr &cloud, const Eigen::Vector4i &box) |
static void | filterOutliers (typename PclCloud::Ptr &cloud, std::string axis, float min, float max) |
static PclCloud::Ptr | extractIndices (typename PclCloud::Ptr &cloud, std::vector< int > &indices, bool negative=false, bool keep_organized=false) |
static PclCloud::Ptr | extractIndices (typename PclCloud::Ptr &cloud, pcl::PointIndices::Ptr &indices, bool negative=false, bool keep_organized=false) |
static void | extractIndices (typename PclCloud::Ptr &cloud, pcl::PointIndices::Ptr &indices, typename PclCloud::Ptr &out_cloud, bool negative=false, bool keep_organized=false) |
static void | segmentPlane (typename PclCloud::Ptr &cloud, pcl::ModelCoefficients::Ptr &coeff, pcl::PointIndices::Ptr &inliers) |
static void | filterTableTop (typename PclCloud::Ptr &cloud, float min_table_z, float min_table_x) |
static void | convertToXYZRGB (typename pcl::PointCloud< T > &cloud, Eigen::Vector3i &color, pcl::PointCloud< pcl::PointXYZRGB > &out_cloud) |
static void | cluster (typename PclCloud::Ptr &cloud, std::vector< pcl::PointIndices > &cluster_indices) |
static Eigen::Vector4i | findBox (const pcl::PointIndices &indices, typename PclCloud::Ptr &cloud) |
static T | findNearestNonNan (typename PclCloud::Ptr &cloud, int cx, int cy) |
static T | createPoint (float x, float y, float z) |
static PclCloud::Ptr | createCloud (const Eigen::Ref< const Eigen::MatrixXf > &mat) |
static Eigen::Matrix< float, 3, 8 > | createOrientedBox (typename PclCloud::Ptr &cloud) |
Utility functions for PCL library
Once the class is templated, the static methods act as common utiltiy functions for that specific type unless it accepts another type.
|
inlinestatic |
Add pointcloud to the visualizer with colored option. Default color is RED
viewer | PCL Visualizer object that is created either using pcl-utils or PCL. |
cloud | Input pointcloud pointer. |
r | Red component. To choose random color, pass r as any negative number. |
g | Green component. |
b | Blue component. |
|
inlinestatic |
Cluster pointcloud by Euclidean distance.
ClusterTolerance: 0.02 // 2cm Min cluster size: 600 Max cluster size: 50000
cloud | Input pointcloud pointer. |
cluster_indices | Output vector of PointIndices of all the clusters |
|
inlinestatic |
Convert XYZ cloud to XYZRGB cloud.
|
inlinestatic |
Factory method to create pointcloud from the Eigen matrix
mat | Eigen matrix of size 3xn. |
|
inlinestatic |
Creates a 3D oriented bounding box around the given pointcloud.
cloud | Input pointcloud pointer. |
|
inlinestatic |
Factory method to create a Point of templated type.
|
inlinestatic |
Crop an organized pointcloud using the given bounding box.
cloud | Input pointcloud pointer. |
topleft | Eigen vector for (x,y) value to represent topleft corner of the bounding box. |
bottomright | Eigen vector for bottom-right corner. |
|
inlinestatic |
Crop an organized pointcloud using the given bounding box.
cloud | Input pointcloud pointer. |
box | Eigen vector that contains (x,y,x2,y2) denoting a bounding box. |
|
inlinestatic |
Downsample pointcloud using given leaf size.
Refer pcl::VoxelGrid for details.
cloud | Input pointcloud pointer. |
outcloud | Output pointcloud pointer. |
leaf | Leaf size for VoxelGrid downsampling (default is 0.005) |
|
inlinestatic |
Surface normal estimation for the given pointcloud
Refer pcl::NormalEstimationOMP for details
cloud | Input pointcloud pointer. |
outcloud | Output pointcloud pointer. |
radius | Radius search parameter for Normal Estimation. |
|
inlinestatic |
Indices points extractor. Extract the points from the pointcloud based on the input indices.
cloud | Input pointcloud pointer. |
indices | Vector of indices of the points in the pointcloud. |
negative | If true, the indices are excluded and remaining points are retained. Default is false. |
keep_organized | If true, the points that does not met the condition will be set to NaN. |
|
inlinestatic |
Indices points extractor. Extract the points from the pointcloud based on the input indices.
cloud | Input pointcloud pointer. |
indices | PointIndices object that represents the input indices. |
negative | If true, the indices are excluded and remaining points are retained. Default is false. |
keep_organized | If true, the points that does not met the condition will be set to NaN. |
|
inlinestatic |
Indices points extractor. Extract the points from the pointcloud based on the input indices.
cloud | Input pointcloud pointer. |
indices | Vector of indices of the points in the pointcloud. |
outcloud | Output pointcloud pointer. |
negative | If true, the indices are excluded and remaining points are retained. Default is false. |
keep_organized | If true, the points that does not met the condition will be set to NaN. |
|
inlinestatic |
Pass-Through filter for any axis. Filters the points that meets the given minmax criteria. Filter is applied on the input pointcloud itself.
cloud | Input pointcloud pointer. |
axis | A string denoting the axis. Either "x" / "y" / "z". |
min | Minimum allowed value for the given axis. |
max | Maximum allowed value for the given axis. |
|
inlinestatic |
Filter out the pointcloud and keep only table-top points.
This utility can be used to filter the objects on top of the table. Input cloud is modified directly.
cloud | Input pointcloud pointer. |
min_table_z | Minimum z value to be considered. |
min_table_x | Minimum x value to be considered. |
|
inlinestatic |
Find the enclosing 2D bouding box of the given cluster
indices | Cluster indices in the pointcloud |
cloud | Input pointcloud pointer. |
|
inlinestatic |
Finds the closest Non-NaN point around the given location. Searches for the NonNan point in a circular way by increasing radius on each iteration.
cloud | Input pointcloud pointer. |
cx | Center point x-value. |
cy | Center point y-value. |
|
inlinestatic |
Creates a PCL Visualizer with general settings such as black background and added coordinate system (xyz axes).
|
inlinestatic |
Creates a PCL Visualizer with the input cloud added in it.
|
inlinestatic |
Fits a plane in the given pointcloud using RANSAC.
cloud | Input pointcloud pointer. |
coeff | Output plane coefficients of the fitten plane. |
inliers | Output point indices of the inlier points. |
|
inlinestatic |
Opens the PCL Visualizer and shows up the given point cloud.
cloud | The input pointcloud pointer |