Vision Systems & Engineering

Point Cloud Library (PCL)

The open-source C++ template library for 2D/3D image and point cloud processing, with its PointCloud<PointT> data model, its modules, releases and licence, and a port of its plane segmentation and Euclidean cluster extraction checked against the exact single-linkage partition of a synthetic tabletop.

intermediate

The Point Cloud Library (PCL) is, in its README’s words, “a standalone, large scale, open project for 2D/3D image and point cloud processing”. It is a C++ library of class templates over a point type, released under the BSD licence, with modules for the classical processing of 3D scans: filtering, normals and other local features, registration, model fitting by sample consensus, segmentation, surface reconstruction, search structures, file input and output, and visualization. Several articles on this site meet it: Point Cloud introduces its PCD file format and its statistical outlier removal, Point Cloud Registration follows its FPFH descriptors and its RANSAC-based alignment, and ROS lists the PCL version each ROS distribution depends on.

This article describes what PCL is built from (its point cloud class and point types, its modules and its search structures), how it is governed and released as far as its repository states, and one pipeline in detail: segmenting a table plane with SACSegmentation and splitting the rest into objects with EuclideanClusterExtraction, which no other article here covers. It was written from PCL 1.15.1 (tag pcl-1.15.1, commit 3346843), read in its source repository in November 2026, and every statement about PCL’s code names the file and lines of that version. PCL could not be installed where this article was written, so the example is a NumPy and SciPy port of that pipeline, and its outcomes test the port, not PCL.

Purpose

PCL’s repository states its own history only in a few places. The licence file, LICENSE.txt, carries the copyright lines “Willow Garage, Inc.” for 2009–2012 and “Open Perception, Inc.” from 2012, followed by “XXX, respective authors”; some source files, such as extract_clusters.hpp, still carry “Copyright (c) 2009, Willow Garage, Inc.” alone. The README says PCL is “financially supported by a consortium of commercial companies, with our own non-profit organization, Open Perception”, and that it is “free for commercial and research use” under the BSD licence. It encourages researchers who use PCL to cite Rusu and Cousins (2011), an ICRA paper that we have not read. The README also points to the project’s website, pointclouds.org, and warns that the old website “was hacked before” and that its archived copy could still host malicious code.

In our reading, the library’s design follows from its data. A depth camera, a stereo rig or a lidar returns sets of 3D points rather than images, and the pipelines in PCL’s tutorials are built from a few shared operations: neighbour search, local plane fits, robust model fitting and grouping by distance. PCL writes them as templates over the point type, and its tutorials, kept in the repository under doc/tutorials/content, show them on small programs.

Core Capabilities

The point cloud and point types

The basic data type, as the tutorial “Getting Started / Basic Structures” (basic_structures.rst) describes it, is pcl::PointCloud<PointT>, a C++ class holding a vector of points of type PointT and a few fields:

  • width and height. For an unorganized cloud, width is the number of points and height is 1; for an organized cloud, which “resemble[s] an organized image (or matrix) like structure”, width is the number of points per row and height the number of rows, so a 640 × 480 depth camera gives 307,200 points. The tutorial says knowing which points are adjacent pixels makes neighbour operations “much more efficient”, and it recommends isOrganized() over testing whether height equals 1.
  • is_dense, true if every point is finite and false if some coordinates may be Inf or NaN. In our reading, a depth camera’s organized cloud keeps a NaN point wherever a pixel has no measurement, so that the grid stays intact.
  • sensor_origin_ and sensor_orientation_, the acquisition pose, which the tutorial calls “usually optional, and not used by the majority of the algorithms in PCL”.

The same tutorial defines a projectable cloud as an organized one whose index (u,v)(u, v) follows a pinhole projection of its point, written there as u=fx/zu = f x/z and v=fy/zv = f y/z; the pinhole camera model adds the principal point. PointT is a point type such as pcl::PointXYZ; the walkthrough lists types for points, surface normals, RGB colour values and feature descriptors in the common module. The point coordinates are float: the plane model’s coefficients, for instance, are an Eigen::VectorXf (sac_model_plane.hpp, line 82), and the cluster tolerance is cast to float before the search (extract_clusters.hpp, line 245).

Modules

The walkthrough (walkthrough.rst) lists the most important released modules as filters, features, keypoints, registration, kd-tree, octree, segmentation, sample consensus, surface, range image, I/O, visualization, common and search. In its descriptions:

  • common holds the PointCloud class, the point types and functions for distances, means and covariances, angular conversions and geometric transformations;
  • filters removes noise, for example the statistical outlier removal that Point Cloud demonstrates; the voxel grid that Voxel Grid describes is also a filter (pcl/filters/voxel_grid.h in the cluster extraction tutorial’s program);
  • features estimates local descriptors such as normals and curvature from a point’s neighbourhood; Point Cloud Registration covers its FPFH;
  • keypoints contains interest point detectors, with NARF keypoints on a range image as the walkthrough’s figure;
  • registration combines datasets into one model by estimating correspondences, rejecting bad ones and estimating transformations robustly; its IterativeClosestPoint, the iterative closest point algorithm, gained OpenMP multi-threading in 1.15.0 (CHANGES.md);
  • kd-tree provides a k-d tree built on the FLANN library; octree a hierarchical tree whose nodes have eight children or none, used for partitioning, downsampling and search; search offers neighbour search by k-d tree, octree, brute force, and a specialized search for organized datasets;
  • sample consensus holds methods such as RANSAC and models such as planes and cylinders, “combined freely” to detect models in clouds; segmentation splits a cloud into clusters and is “best suited” to clouds made of spatially isolated regions;
  • surface reconstructs hulls, meshes or smoothed, resampled surfaces with normals (compare Surface Reconstruction);
  • range image represents depth maps from the sensor’s origin and converts them to clouds; io reads and writes PCD files and captures from devices; visualization, for quick prototyping, renders clouds and basic shapes and uses the VTK library.

The walkthrough also names command-line tools, among them pcl_viewer for PCD files and converters between ASCII and binary PCD and to VTK. The 1.15.1 change log has further modules, among them libpcl_cuda, libpcl_gpu, libpcl_ml, libpcl_outofcore and libpcl_simulation. We found no official Python binding in the repository’s file tree at the tag and claim none.

Sample consensus and plane segmentation

SACSegmentation wraps a sample consensus method and a model. Its defaults, in sac_segmentation.h at 1.15.1, are a distance threshold of 0 (line 263), coefficient refinement on (266), 50 iterations at most (284), a success probability of 0.99 (290) and no threading (threads_ −1, 287). In our reading, a threshold of 0 accepts no point, since the inlier test below is a strict inequality, so the threshold must always be set; the tutorials use 0.01 (planar_segmentation.cpp) and 0.02 (cluster_extraction.cpp). The comment on the constructor SACSegmentation(bool random = false) says it sets the random seed “to the current time” if random is true, “else set to 12345” (lines 81–86); the constructor stores the flag, and initSACModel passes it to the model (impl/sac_segmentation.hpp, line 148), whose seeding code (sac_model.h) we did not read. By that comment, a segmentation with the default is reproducible from run to run.

With SACMODEL_PLANE and SAC_RANSAC, segment (impl/sac_segmentation.hpp, lines 79–133) runs three steps:

  1. RANSAC (sample_consensus/impl/ransac.hpp, computeModel, lines 56–217). Each trial draws three points and builds the plane through them: n=(p1−p0)×(p2−p0)\mathbf{n} = (\mathbf{p}_1 - \mathbf{p}_0) \times (\mathbf{p}_2 - \mathbf{p}_0), normalized, and d=−n⋅p0d = -\mathbf{n}\cdot\mathbf{p}_0 (sac_model_plane.hpp, lines 80–118). A sample whose cross product has a norm below Eigen’s float dummy_precision() is rejected as collinear and not counted as a trial; after 10×10 \times the maximum number of iterations such rejections, the loop gives up (ransac.hpp lines 79 and 127–139). A point is an inlier if ∣n⋅p+d∣<t|\mathbf{n}\cdot\mathbf{p} + d| < t, strictly (sac_model_plane.hpp, lines 180 and 224). When a model has more inliers than the best so far, it becomes the best and the number of trials needed is recomputed as
k=log⁡(1−p)log⁡(1−w3),k = \frac{\log(1 - p)}{\log(1 - w^{3})},

with ww the best inlier count divided by the number of points and the term 1−w31 - w^3 clamped away from 0 and 1 (lines 170–175). The loop stops when the trial count exceeds kk or the maximum number of iterations, both tested with a strict “greater than” (lines 195–200). This is the adaptive stopping rule that the RANSAC article derives; PCL counts the best model’s inliers, not a robust cost. 2. Refinement. With refinement on, the best model’s inliers are refitted by least squares (optimizeModelCoefficients, sac_model_plane.hpp, lines 311–360): more than three inliers are required, their mean and covariance are computed with a shifted accumulation around the first finite point (common/impl/centroid.hpp, lines 580–651), pcl::eigen33 gives the normal, and d=−n⋅pˉd = -\mathbf{n}\cdot\bar{\mathbf{p}}. We did not read eigen33; a least-squares plane’s normal is the eigenvector of the smallest eigenvalue, the principal component analysis that Point Cloud uses for normals. 3. Reselection. The inliers are selected again with the refined plane and the same threshold (sac_segmentation.hpp, line 124), so the returned inliers can differ from RANSAC’s best set.

In our reading, the sign of the normal is not fixed by either step (the cross product depends on the order of the sample, and optimizeModelCoefficients applies no sign rule to the eigenvector, lines 345–353), and it does not change which points are inliers. Removing the inliers is the job of the filters module’s ExtractIndices, which the cluster extraction tutorial calls with setNegative(true) to keep everything else.

Euclidean cluster extraction

The cluster extraction tutorial (cluster_extraction.rst) describes the algorithm, which it takes from a dissertation by Rusu that it cites as “[RusuDissertation]” and that we have not read, as “essentially similar to a flood fill”. Starting from each point not yet assigned, a queue grows by adding every neighbour within a radius of the points already in it; when the queue stops growing, it is one cluster. In the code (segmentation/impl/extract_clusters.hpp at 1.15.1), EuclideanClusterExtraction::extract (lines 223–254) calls the overload of extractEuclideanClusters that takes point indices (defined at lines 124–217, called at line 245). In that overload:

  • seeds are taken in index order, and every point is marked processed the moment it joins a queue (lines 157–166 and 190), so it is never queued twice;
  • each queued point gets a radius search with the cluster tolerance (line 171); neighbours are read from position 1 if the search returns sorted results, since the first result is then the query point itself, and from 0 otherwise (lines 149 and 183);
  • a finished queue is kept only if its size lies between the minimum and maximum cluster sizes, inclusive (line 197), and its indices are sorted (line 206);
  • a queue outside that range is discarded with a debug message (lines 211–215), and its points stay marked processed: they are not split, not handed to another cluster and not considered again.

extract finally sorts the clusters by size, largest first (line 251). If no search object was set, it creates OrganizedNeighbor for an organized cloud and an unsorted search::KdTree(false) otherwise (lines 235–241); the tutorial passes its own search::KdTree, whose constructor sorts results by default (search/kdtree.h, line 89). The defaults, in extract_clusters.h, are a tolerance of 0 (line 429), a minimum size of 1 (432) and a maximum of the largest pcl::uindex_t value (435). The k-d tree’s radius search hands the squared radius to FLANN as a float (kdtree/impl/kdtree_flann.hpp, lines 372–414); whether FLANN counts a point at exactly the radius we did not read.

In our reading, a flood fill with radius rr returns the connected components of the graph that joins every pair of points at most rr apart (or less than rr, by the search’s rule). That is single-linkage clustering cut at distance rr, which Clustering describes as reading components off the edges of a distance graph added in order of length; with a minimum of one point, it is also DBSCAN with a minimum count of one, where every point is a core point. The components are therefore exactly those of the Euclidean minimum spanning tree with its edges longer than rr removed, which is what the example checks.

The tutorial’s advice on the tolerance is candid: with a very small value an object “can be seen as multiple clusters”, with a value too high several objects merge, and “our recommendation is to just test and try out which value suits your dataset.” Its program voxel-downsamples a table scene read from a PCD file (table_scene_lms400.pcd) at 1 cm, removes planes with a threshold of 0.02 and 100 iterations while more than 30 % of the points remain, then extracts clusters with tolerance 0.02, minimum 100 and maximum 25,000. Its printed output shows two planes removed and five clusters.

Region growing and normals

pcl::RegionGrowing segments by smoothness instead of distance. As its tutorial describes it, the algorithm sorts points by curvature, grows a region from the flattest unlabelled point, adds a neighbour to the region if the angle between its normal and the seed’s is below a threshold, and makes it a further seed if its own curvature is below a threshold; its header’s defaults include 30 neighbours and a curvature threshold of 0.05 (region_growing.h, lines 303–306). Region Growing covers the method on images.

The normals it needs come from NormalEstimation in the features module, which fits a plane to each point’s neighbours as Point Cloud describes and then orients the result. PCL flips each normal towards a viewpoint: flipNormalTowardsViewpoint negates the normal when its dot product with the vector from the point to the viewpoint is negative (features/normal_3d.h at 1.15.1, the overload on nx, ny, nz at lines 169–188, called in impl/normal_3d.hpp at lines 71 and 91), which is the condition ni⋅(vp−pi)>0\mathbf{n}_i \cdot (\mathbf{v}_p - \mathbf{p}_i) > 0 of the normal estimation tutorial. The viewpoint defaults to the origin (line 402), use_sensor_origin_ is initialized to true (line 411) so that setInputCloud copies the cloud’s sensor origin into the viewpoint (lines 326–336), and setViewPoint sets one by hand. The tutorial notes that this orientation does not hold for data from several viewpoints. Open3D 0.20.0 differs: its PointCloud::EstimateNormals (EstimateNormals.cpp, lines 290–322) orients nothing towards a viewpoint and only flips a new normal to agree with a normal the cloud already has; orientation towards a camera location is a separate call, OrientNormalsTowardsCameraLocation (line 348).

Minimal Example

The example ports the tabletop pipeline above to NumPy 2.3.5 and SciPy 1.16.3 and checks it against an exact prediction. It follows PCL 1.15.1 at commit 3346843: ransac.hpp (computeModel, lines 56–217), sac_model_plane.hpp (lines 80–118, 152–230 and 311–360), centroid.hpp (lines 580–651), sac_segmentation.hpp (segment, lines 79–133) and extract_clusters.hpp (lines 124–217 and 223–254). Because the code ports PCL’s files, it carries PCL’s BSD licence in full. The outcomes test our port, not PCL.

Scene. The data is a synthetic depth image rendered by exact ray casting, so every point has a known label. The world frame has z up and the table top at z = 0, in metres; the table is the rectangle ∣x∣≤0.6|x| \le 0.6, 0≤y≤10 \le y \le 1. A pinhole camera with 320 × 240 pixels, f=300f = 300 px and principal point (159.5, 119.5) sits at (0, −0.45, 0.55) and looks at (0, 0.45, 0), so the table is seen obliquely. Camera axes are x right, y down and z forward, and the cloud is expressed in the camera frame, as a depth camera’s would be. On the table stand box A (∣x∣≤0.06|x| \le 0.06, 0.22≤y≤0.320.22 \le y \le 0.32, 8 cm tall), box B (∣x∣≤0.07|x| \le 0.07, 0.332≤y≤0.4320.332 \le y \le 0.432, 12 cm tall), so that B stands 12 mm behind A along the viewing direction, a cylinder of radius 5 cm and height 14 cm at (0.25, 0.50), and a sphere of radius 6 cm resting on the table at (−0.18, 0.78), the object farthest from the camera. The depth image is lifted to an organized 240 × 320 cloud with X=(u−cx)Z/fX = (u - c_x)Z/f and Y=(v−cy)Z/fY = (v - c_y)Z/f, NaN where a ray misses; the NaN points are dropped before the pipeline. The scene is noise-free, and the sample spacing on each surface, roughly Z/fZ/f on surfaces that face the camera, is larger on far and slanted surfaces.

Port. The plane is segmented with the planar tutorial’s threshold of 0.01 m and PCL’s defaults (50 iterations, probability 0.99, refinement on); the remaining points are clustered. The port departs from PCL in stated ways:

  • coordinates and coefficients are float64, where PCL uses float;
  • PCL’s sampler (getSamples, in sac_model.hpp) was not read, so the port draws three distinct indices with NumPy’s default_rng(12345); the seed equals PCL’s default seed only in value, the sequence of samples is our own, and the number of RANSAC trials the port prints is not PCL’s;
  • Eigen’s dummy_precision and PCL’s eigen33 were not read: the collinearity threshold of 10−510^{-5} is ours, and the refit takes the eigenvector of the smallest eigenvalue from NumPy’s eigh;
  • the radius search is SciPy’s cKDTree.query_ball_point, which includes points at distance ≤r\le r, and the port checks every neighbour against the processed flags instead of skipping the first one. In our reasoning the two give the same queues when no two points coincide, since the query point is then the only point at distance 0 and is already processed; the output prints the number of duplicate points.

Prediction. The exact partition comes from single linkage: candidate edges up to 0.045 m from a k-d tree, the minimum spanning forest of those edges (scipy.sparse.csgraph.minimum_spanning_tree), and its connected components after removing the edges longer than the tolerance. Because 0.045 m exceeds every swept tolerance, cutting this forest gives the same components as cutting the full tree. A swept tolerance that equalled an edge length would make the result depend on ≤\le against <<, so the code prints each tolerance’s distance to the nearest tree edge (the margin), which must be at least 10−910^{-9} m.

Measures. M1 prints the plane: RANSAC trials, the refined normal’s angle to the true normal (computed as atan2⁡(∣n×nt∣,∣n⋅nt∣)\operatorname{atan2}(|\mathbf{n}\times\mathbf{n}_t|, |\mathbf{n}\cdot\mathbf{n}_t|), insensitive to the sign), the offset error, and the object points removed with the plane, against two exact counts: object points within 0.01 m of the refined plane and of the true plane. M2 sweeps the tolerance over 0.003, 0.006, 0.010, 0.015, 0.025 and 0.040 m with PCL’s defaults (minimum 1, no maximum) and prints the number of port clusters, of tree components and of port clusters that equal a component as point sets, whether A and B are separate (no cluster holds points of both), whether the sphere is whole (all its points in one cluster), and per object the recall and purity: for the cluster holding most of an object’s remaining points, the share of the object’s points it holds and the share of its points that belong to the object. M3 runs the tutorial’s loop and parameters at their own values, since the scene is a tabletop in metres like the tutorial’s, but without the voxel step, which Voxel Grid covers.

Checks. C-data checks the cloud’s shape, that the lifted points equal the ray-cast hits (to below 10−910^{-9} m) and that no two points coincide; C-labels that every point has one label and lies on its labelled surface (residual below 10−910^{-9} m); C-plane that three exact table points give the true plane (angle below 10−910^{-9} degrees, offset below 10−910^{-9} m) and that a collinear sample is rejected; C-refit that refitting all table points recovers the true plane to the same bars; C-flood that two 3 × 3 grids at 1 cm spacing, 5 cm apart, and a three-point group give three clusters at tolerance 0.04 and two at 0.06; and C-size that a minimum size of 5 drops the three-point group without moving its points into another cluster.

Hypotheses, written before any code ran:

  • H1: the port’s partition equals the exact single-linkage partition at every swept tolerance.
  • H2: no swept tolerance separates A from B and keeps the sphere whole. H2 was written as conditional: it applies only if the sphere’s longest internal minimum-spanning-tree edge exceeds the A–B gap, which a reachable-value script was to compute before the pilot. That script rendered the same scene, removed the points within 0.01 m of the true plane and found the sphere’s longest edge shorter than the gap. The condition does not hold, so H2 is not applicable; the code still prints both lengths and, per tolerance, the two flags.
  • H3: with the size limit between one box and the merged pair, at a tolerance that merges A and B, the merged cluster is dropped and no output cluster contains a point of A or B. The tolerance, 0.025 m, and the maximum cluster size, 2,348, were chosen from the reachable-value script: at 0.025 its partition merges A and B with no other object, and 2,348 is the midpoint, rounded down, of the larger box’s remaining size and the pair’s in that script. The code prints these inputs, from its own plane removal, before the outcome.
  • H4: the object points removed with the plane equal the exact count against the port’s refined plane.
  • For M3, one plane and three clusters (A and B merged, the cylinder, the sphere) were predicted from the construction, since the objects cover a small part of the image.

Before any script ran, we also predicted the partition at each tolerance from the construction alone, with a 12 mm A–B gap from the scene’s dimensions. At 0.015 m that prediction was A and B merged.

The script runs in about one second.

# NumPy/SciPy port of PCL 1.15.1's tabletop pipeline (SACSegmentation with SACMODEL_PLANE,
# SAC_RANSAC and coefficient refinement; then EuclideanClusterExtraction), following
# sample_consensus/impl/ransac.hpp, sample_consensus/impl/sac_model_plane.hpp,
# common/impl/centroid.hpp, segmentation/impl/sac_segmentation.hpp and
# segmentation/impl/extract_clusters.hpp at commit 3346843 (tag pcl-1.15.1).
# The outcomes test this port, not PCL. PCL's licence (LICENSE.txt at 3346843):
#
# Software License Agreement (BSD License)
#
# Point Cloud Library (PCL) - www.pointclouds.org
# Copyright (c) 2009-2012, Willow Garage, Inc.
# Copyright (c) 2012-, Open Perception, Inc.
# Copyright (c) XXX, respective authors.
#
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
#  * Redistributions of source code must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
#  * Redistributions in binary form must reproduce the above
#    copyright notice, this list of conditions and the following
#    disclaimer in the documentation and/or other materials provided
#    with the distribution.
#  * Neither the name of the copyright holder(s) nor the names of its
#    contributors may be used to endorse or promote products derived
#    from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
import os
for v in ("OMP_NUM_THREADS", "OPENBLAS_NUM_THREADS", "MKL_NUM_THREADS"):
    os.environ[v] = "1"
import numpy as np
import scipy
from scipy.spatial import cKDTree
from scipy.sparse import coo_matrix
from scipy.sparse.csgraph import minimum_spanning_tree, connected_components

print("NumPy", np.__version__, "SciPy", scipy.__version__)
NAMES = ["table", "box A", "box B", "cylinder", "sphere"]

# ---------- scene: exact ray casting into a 320 x 240 depth image ----------
# World: z up, table top z = 0, metres. Camera: x right, y down, z forward.
W, H, F, CX, CY = 320, 240, 300.0, 159.5, 119.5
C = np.array([0.0, -0.45, 0.55]); T = np.array([0.0, 0.45, 0.0])
zc = (T - C) / np.linalg.norm(T - C); xc = np.array([1.0, 0.0, 0.0]); yc = np.cross(zc, xc)
R = np.stack([xc, yc, zc], axis=1)              # camera axes as columns, in world coordinates
BOXES = {1: (np.array([-0.06, 0.22, 0.0]), np.array([0.06, 0.32, 0.08])),     # box A
         2: (np.array([-0.07, 0.332, 0.0]), np.array([0.07, 0.432, 0.12]))}   # box B, 12 mm behind A
CYL_C, CYL_R, CYL_H = np.array([0.25, 0.50]), 0.05, 0.14
SPH_C, SPH_R = np.array([-0.18, 0.78, 0.06]), 0.06

def render():
    u, v = np.meshgrid(np.arange(W), np.arange(H))
    d = np.stack([(u - CX) / F, (v - CY) / F, np.ones((H, W))], -1) @ R.T
    best = np.full((H, W), np.inf); lab = np.full((H, W), -1)
    def take(t, label):
        m = (t > 1e-12) & (t < best); best[m] = t[m]; lab[m] = label
    with np.errstate(divide="ignore", invalid="ignore"):
        t = -C[2] / d[..., 2]; p = C + t[..., None] * d                    # table rectangle
        ok = (np.abs(p[..., 0]) <= 0.6) & (p[..., 1] >= 0) & (p[..., 1] <= 1.0)
        take(np.where(ok, t, np.inf), 0)
        for label, (lo, hi) in BOXES.items():                               # slab method
            t1, t2 = (lo - C) / d, (hi - C) / d
            tn = np.nanmax(np.minimum(t1, t2), -1); tf = np.nanmin(np.maximum(t1, t2), -1)
            take(np.where(tn <= tf, tn, np.inf), label)
        o = C[:2] - CYL_C                                                   # cylinder side
        a = d[..., 0]**2 + d[..., 1]**2; b = 2 * (o[0] * d[..., 0] + o[1] * d[..., 1])
        disc = b * b - 4 * a * (o @ o - CYL_R**2)
        ts = (-b - np.sqrt(disc)) / (2 * a); zs = C[2] + ts * d[..., 2]
        take(np.where((disc >= 0) & (zs >= 0) & (zs <= CYL_H), ts, np.inf), 3)
        tt = (CYL_H - C[2]) / d[..., 2]; pt = C + tt[..., None] * d           # cylinder top
        take(np.where(((pt[..., :2] - CYL_C)**2).sum(-1) <= CYL_R**2, tt, np.inf), 3)
        oc = C - SPH_C                                                      # sphere
        b = 2 * (d @ oc); a = (d * d).sum(-1); disc = b * b - 4 * a * (oc @ oc - SPH_R**2)
        take(np.where(disc >= 0, (-b - np.sqrt(disc)) / (2 * a), np.inf), 4)
        hit = C + best[..., None] * d
        depth = np.where(np.isfinite(best), (hit - C) @ R[:, 2], np.nan)
    return depth, lab, hit

depth, lab, hit = render()
u, v = np.meshgrid(np.arange(W), np.arange(H))
organized = np.stack([(u - CX) * depth / F, (v - CY) * depth / F, depth], -1)   # height 240, width 320
finite = np.isfinite(organized[..., 2])
P, L = organized[finite], lab[finite]           # NaN points dropped, row-major order
n_true = R.T @ np.array([0.0, 0.0, 1.0]); d_true = n_true @ (R.T @ C)   # true table plane, camera frame

# ---------- port ----------
def plane_from_3(p0, p1, p2):                    # sac_model_plane.hpp 80-118
    cross = np.cross(p1 - p0, p2 - p0); norm = np.linalg.norm(cross)
    if norm < 1e-5:                              # our threshold (Eigen's dummy_precision not read)
        return None
    n = cross / norm
    return n, -n @ p0

def within(model, X, thr):                       # strict |n.p + d| < thr (lines 180, 224)
    n, d = model
    return np.abs(X @ n + d) < thr

def ransac_plane(X, thr, max_iter, prob, rng):   # ransac.hpp computeModel, lines 56-217
    n_pts = len(X); iterations = 0; best_count = 0; best = None
    k = np.finfo(float).max; log_p = np.log(1.0 - prob); eps = np.finfo(float).eps
    skipped, max_skip = 0, 10 * max_iter
    while True:
        s = rng.choice(n_pts, 3, replace=False)  # our sampler, not PCL's getSamples
        model = plane_from_3(*X[s])
        if model is None:
            skipped += 1
            if skipped < max_skip:
                continue
            break
        count = int(within(model, X, thr).sum())
        if count > best_count:
            best_count, best = count, model
            p_out = min(max(eps, 1.0 - (count / n_pts) ** 3), 1.0 - eps)
            k = log_p / np.log(p_out)
        iterations += 1
        if iterations > k or iterations > max_iter:
            break
    return best, iterations

def refit(X, inliers, model):                    # sac_model_plane.hpp 311-360, centroid.hpp 580-651
    if len(inliers) <= 3:
        return model
    Q = X[inliers]; K = Q[0]; Y = Q - K
    acc = np.concatenate([(Y[:, [0, 0, 0, 1, 1, 2]] * Y[:, [0, 1, 2, 1, 2, 2]]).sum(0), Y.sum(0)]) / len(Q)
    m = acc[6:]
    cov = np.array([[acc[0], acc[1], acc[2]], [acc[1], acc[3], acc[4]], [acc[2], acc[4], acc[5]]]) - np.outer(m, m)
    n = np.linalg.eigh(cov)[1][:, 0]             # eigenvector of the smallest eigenvalue
    return n, -n @ (m + K)

def sac_segment(X, thr, max_iter, prob, rng):    # sac_segmentation.hpp segment, lines 79-133
    model, iterations = ransac_plane(X, thr, max_iter, prob, rng)
    inliers = np.flatnonzero(within(model, X, thr))
    refined = refit(X, inliers, model)
    return refined, np.flatnonzero(within(refined, X, thr)), iterations

def euclidean_clusters(X, tol, min_size=1, max_size=None):   # extract_clusters.hpp 124-217, 223-254
    tree = cKDTree(X); processed = np.zeros(len(X), bool); clusters = []
    for i in range(len(X)):
        if processed[i]:
            continue
        queue = [i]; processed[i] = True; q = 0
        while q < len(queue):
            for j in tree.query_ball_point(X[queue[q]], tol):
                if not processed[j]:
                    queue.append(j); processed[j] = True
            q += 1
        if min_size <= len(queue) and (max_size is None or len(queue) <= max_size):
            clusters.append(sorted(queue))       # rejected queues stay processed
    clusters.sort(key=len, reverse=True)
    return clusters

# ---------- independent prediction: exact single linkage ----------
R_MAX = 0.045
def mst_forest(X):
    pairs = cKDTree(X).query_pairs(R_MAX, output_type="ndarray")
    w = np.linalg.norm(X[pairs[:, 0]] - X[pairs[:, 1]], axis=1)
    return minimum_spanning_tree(coo_matrix((w, (pairs[:, 0], pairs[:, 1])), shape=(len(X),) * 2)).tocoo()

def mst_cut(M, n, tol):
    k = M.data <= tol
    return connected_components(coo_matrix((np.ones(k.sum()), (M.row[k], M.col[k])), shape=(n, n)), directed=False)[1]

def angle_deg(n1, n2):
    return np.degrees(np.arctan2(np.linalg.norm(np.cross(n1, n2)), abs(n1 @ n2)))

def offset_err(model):
    n, d = model
    return abs(np.sign(n @ n_true) * d - d_true)

# ---------- checks ----------
Pw = P @ R.T + C
def sdf_box(p, lo, hi):
    q = np.abs(p - (lo + hi) / 2) - (hi - lo) / 2
    return np.linalg.norm(np.maximum(q, 0), axis=1) + np.minimum(q.max(1), 0)
res = [np.abs(Pw[L == 0, 2]),
       np.abs(sdf_box(Pw[L == 1], *BOXES[1])), np.abs(sdf_box(Pw[L == 2], *BOXES[2]))]
pc = Pw[L == 3]; q = np.stack([np.linalg.norm(pc[:, :2] - CYL_C, axis=1) - CYL_R, np.abs(pc[:, 2] - CYL_H / 2) - CYL_H / 2], 1)
res.append(np.abs(np.linalg.norm(np.maximum(q, 0), axis=1) + np.minimum(q.max(1), 0)))
res.append(np.abs(np.linalg.norm(Pw[L == 4] - SPH_C, axis=1) - SPH_R))
counts = [int((L == k).sum()) for k in range(5)]
print("C-data: organized cloud %s, NaN points %d, finite %d, lifted vs ray-cast max diff %.1e m, duplicate points %d"
      % (organized.shape[:2], int((~finite).sum()), len(P),
         np.abs(organized[finite] - (hit[finite] - C) @ R).max(), len(P) - len(np.unique(P, axis=0))))
print("C-labels: counts %s, sum %d, labels outside 0-4: %d, max residual per label (m) %s"
      % (dict(zip(NAMES, counts)), sum(counts), int((L < 0).sum()), " ".join("%.1e" % r.max() for r in res)))
tab = np.flatnonzero(L == 0)
m3 = plane_from_3(P[tab[0]], P[tab[len(tab) // 2]], P[tab[-1]])
p0, a = P[tab[0]], np.array([0.01, 0.02, 0.03])
print("C-plane: 3-point model angle %.1e deg, offset error %.1e m; collinear sample rejected: %s"
      % (angle_deg(m3[0], n_true), offset_err(m3), plane_from_3(p0, p0 + a, p0 + 2 * a) is None))
mr = refit(P, tab, m3)
print("C-refit: table points only, angle %.1e deg, offset error %.1e m" % (angle_deg(mr[0], n_true), offset_err(mr)))
g = np.array([[x, y, 0.0] for x in (0, 0.01, 0.02) for y in (0, 0.01, 0.02)])
small = np.vstack([g, g + [0.07, 0, 0], [[0.3, 0, 0], [0.31, 0, 0], [0.32, 0, 0]]])
print("C-flood: tol 0.04 sizes %s, tol 0.06 sizes %s"
      % ([len(c) for c in euclidean_clusters(small, 0.04)], [len(c) for c in euclidean_clusters(small, 0.06)]))
cs = euclidean_clusters(small, 0.04, min_size=5)
print("C-size: tol 0.04, min 5: sizes %s, points of the 3-point group in clusters %d"
      % ([len(c) for c in cs], sum(i >= 18 for c in cs for i in c)))

# ---------- M1 and H4: plane segmentation (threshold 0.01 m, PCL defaults 50 and 0.99) ----------
THR = 0.01
model, inl, its = sac_segment(P, THR, 50, 0.99, np.random.default_rng(12345))
removed = np.zeros(len(P), bool); removed[inl] = True
obj = L > 0
print("\nM1: RANSAC iterations %d, plane inliers %d, refined normal angle %.4f deg, offset error %.4f mm"
      % (its, len(inl), angle_deg(model[0], n_true), 1e3 * offset_err(model)))
print("M1: object points removed with the plane %d %s"
      % (int((removed & obj).sum()), {NAMES[k]: int((removed & (L == k)).sum()) for k in range(1, 5)}))
print("H4: object points within %.2f m of the refined plane %d, of the true plane %d"
      % (THR, int((obj & (np.abs(P @ model[0] + model[1]) < THR)).sum()), int((obj & (np.abs(P @ n_true + d_true) < THR)).sum())))
X, LX = P[~removed], L[~removed]
print("remaining after removal: %d %s" % (len(X), {NAMES[k]: int((LX == k).sum()) for k in range(5)}))

# ---------- M2, H1, H2: tolerance sweep (min 1, no max) ----------
M = mst_forest(X)
gap = cKDTree(X[LX == 1]).query(X[LX == 2])[0].min()
sph = X[LX == 4]
emax = minimum_spanning_tree(np.linalg.norm(sph[:, None] - sph[None], axis=-1)).data.max()
print("\nA-B gap %.3f mm; sphere's longest internal MST edge %.3f mm" % (1e3 * gap, 1e3 * emax))
print("   tol  margin(m)  port  MST  matched  A-B separate  sphere whole  recall/purity: " + "  ".join(NAMES[1:]))
for tol in [0.003, 0.006, 0.010, 0.015, 0.025, 0.040]:
    cl = euclidean_clusters(X, tol)
    comp = mst_cut(M, len(X), tol)
    mst_sets = {frozenset(np.flatnonzero(comp == c)) for c in range(comp.max() + 1)}
    matched = sum(frozenset(c) in mst_sets for c in cl)
    cid = np.full(len(X), -1)
    for i, c in enumerate(cl):
        cid[c] = i
    sep = not (set(cid[LX == 1]) & set(cid[LX == 2]))
    whole = len(set(cid[LX == 4])) == 1
    rp = []
    for k in range(1, 5):
        best_c = np.bincount(cid[LX == k]).argmax(); hitk = int((cid[LX == k] == best_c).sum())
        rp.append("%.3f/%.3f" % (hitk / (LX == k).sum(), hitk / len(cl[best_c])))
    print("%6.3f  %.2e  %5d %5d %7d  %-13s %-13s %s"
          % (tol, np.abs(M.data - tol).min(), len(cl), len(mst_sets), matched, sep, whole, "  ".join(rp)))

# ---------- H3: size filter drops the merged pair ----------
TOL3, MAX3 = 0.025, 2348
comp = mst_cut(M, len(X), TOL3)
cA = np.bincount(comp[LX == 1]).argmax()
print("\nH3 input: tol %.3f, max %d; MST component holding A: size %d, all of A %s, all of B %s, labels %s; larger box %d"
      % (TOL3, MAX3, int((comp == cA).sum()), bool((comp[LX == 1] == cA).all()), bool((comp[LX == 2] == cA).all()),
         sorted(set(LX[comp == cA].tolist())), max(int((LX == 1).sum()), int((LX == 2).sum()))))
cl = euclidean_clusters(X, TOL3, max_size=MAX3)
print("H3: clusters %s; points of A or B in any cluster %d"
      % ([(len(c), sorted(set(LX[c].tolist()))) for c in cl], sum(int(((LX[c] == 1) | (LX[c] == 2)).sum()) for c in cl)))

# ---------- M3: the tutorial's loop and parameters (scale factor 1, no voxel step) ----------
rng = np.random.default_rng(12345)
rest = np.arange(len(P)); n0 = len(P); planes = 0
print("\nM3: threshold 0.02, 100 iterations, loop while more than 30% remain; tolerance 0.02, min 100, max 25000")
while len(rest) > 0.3 * n0:
    mdl, inl3, its3 = sac_segment(P[rest], 0.02, 100, 0.99, rng)
    if len(inl3) == 0:
        break
    planes += 1
    print("plane %d: %d inliers %s, iterations %d, angle to table %.4f deg"
          % (planes, len(inl3), {NAMES[k]: int((L[rest[inl3]] == k).sum()) for k in range(5)}, its3, angle_deg(mdl[0], n_true)))
    rest = np.delete(rest, inl3)
print("remaining %d of %d (%.3f)" % (len(rest), n0, len(rest) / n0))
for c in euclidean_clusters(P[rest], 0.02, 100, 25000):
    print("cluster: %d points %s" % (len(c), {NAMES[k]: int((L[rest[c]] == k).sum()) for k in range(5) if (L[rest[c]] == k).any()}))

The printed output:

NumPy 2.3.5 SciPy 1.16.3
C-data: organized cloud (240, 320), NaN points 26947, finite 49853, lifted vs ray-cast max diff 3.3e-16 m, duplicate points 0
C-labels: counts {'table': 44764, 'box A': 1786, 'box B': 1376, 'cylinder': 1321, 'sphere': 606}, sum 49853, labels outside 0-4: 0, max residual per label (m) 2.2e-16 2.4e-16 2.2e-16 4.4e-15 7.1e-15
C-plane: 3-point model angle 1.7e-14 deg, offset error 4.4e-16 m; collinear sample rejected: True
C-refit: table points only, angle 4.4e-11 deg, offset error 4.3e-13 m
C-flood: tol 0.04 sizes [9, 9, 3], tol 0.06 sizes [18, 3]
C-size: tol 0.04, min 5: sizes [9, 9], points of the 3-point group in clusters 0

M1: RANSAC iterations 4, plane inliers 44961, refined normal angle 0.0012 deg, offset error 0.0260 mm
M1: object points removed with the plane 197 {'box A': 126, 'box B': 0, 'cylinder': 68, 'sphere': 3}
H4: object points within 0.01 m of the refined plane 197, of the true plane 196
remaining after removal: 4892 {'table': 0, 'box A': 1660, 'box B': 1376, 'cylinder': 1253, 'sphere': 603}

A-B gap 15.815 mm; sphere's longest internal MST edge 14.255 mm
   tol  margin(m)  port  MST  matched  A-B separate  sphere whole  recall/purity: box A  box B  cylinder  sphere
 0.003  2.60e-06   2998  2998    2998  True          False         0.053/1.000  0.035/1.000  0.001/1.000  0.002/1.000
 0.006  3.23e-06     95    95      95  True          False         1.000/1.000  0.544/1.000  0.879/1.000  0.692/1.000
 0.010  8.89e-05      6     6       6  True          False         1.000/1.000  1.000/1.000  1.000/1.000  0.997/1.000
 0.015  7.45e-04      4     4       4  True          True          1.000/1.000  1.000/1.000  1.000/1.000  1.000/1.000
 0.025  9.19e-03      3     3       3  False         True          1.000/0.547  1.000/0.453  1.000/1.000  1.000/1.000
 0.040  2.42e-02      3     3       3  False         True          1.000/0.547  1.000/0.453  1.000/1.000  1.000/1.000

H3 input: tol 0.025, max 2348; MST component holding A: size 3036, all of A True, all of B True, labels [1, 2]; larger box 1660
H3: clusters [(1253, [3]), (603, [4])]; points of A or B in any cluster 0

M3: threshold 0.02, 100 iterations, loop while more than 30% remain; tolerance 0.02, min 100, max 25000
plane 1: 45165 inliers {'table': 44764, 'box A': 252, 'box B': 0, 'cylinder': 134, 'sphere': 15}, iterations 4, angle to table 0.0044 deg
remaining 4688 of 49853 (0.094)
cluster: 2910 points {'box A': 1534, 'box B': 1376}
cluster: 1187 points {'cylinder': 1187}
cluster: 591 points {'sphere': 591}

Every check held. The cloud has the planned 240 × 320 shape, its lifted points agree with the ray-cast hits to 3.3×10−163.3 \times 10^{-16} m, no two points coincide, and every point lies on its labelled surface to at most 7.1×10−157.1 \times 10^{-15} m. The three-point plane and the refit of the table points recover the true plane to 1.7×10−141.7 \times 10^{-14} and 4.4×10−114.4 \times 10^{-11} degrees, the collinear sample is rejected, and the small cloud gives the cluster sizes [9, 9, 3], [18, 3] and, with a minimum of 5, [9, 9] with none of the three-point group’s points in a cluster. Every tolerance’s margin to the nearest tree edge is at least 2.60×10−62.60 \times 10^{-6} m, above the 10−910^{-9} m bar, so no result depends on whether a point at exactly the tolerance counts.

The plane. RANSAC stopped after 4 trials of our own sample sequence, below the maximum of 50, so at the adaptive bound, and the refined plane lies 0.0012 degrees and 0.0260 mm from the true table. H4 held: the 197 object points removed with the plane equal the 197 object points within 0.01 m of the refined plane; against the true plane the count is 196. The removed object points are 126 of box A, 68 of the cylinder and 3 of the sphere, which in our reading of the construction lie on the parts of their visible surfaces nearest the table: a plane segmentation with a threshold of tt cuts about the bottom tt off every object standing on the plane.

The sweep. H1 held at all six tolerances: the port returned 2,998, 95, 6, 4, 3 and 3 clusters, and each one equals a component of the exact single-linkage partition. The rows show the window a single tolerance has on this scene. At 0.003 m every object falls apart (no object has more than 0.053 of its points in one cluster); at 0.006 m box A is whole while box B, the cylinder and the sphere are not (recalls 0.544, 0.879, 0.692); at 0.010 m only the sphere is still split (recall 0.997); at 0.015 m each of the four objects is one cluster with purity 1.000; from 0.025 m the two boxes share a cluster, whose purity per box is 0.547 and 0.453. Only 0.015 m, of the six tolerances, gives one cluster per object.

H2 was not applicable, as stated above: the sphere’s longest internal edge, 14.255 mm, is shorter than the A–B gap, 15.815 mm, and the 0.015 m row shows a tolerance that separates the boxes and keeps the sphere whole.

The construction prediction missed at the 0.015 m row: we had predicted A and B merged, and the printed partition has them in separate clusters. At the other five tolerances it agreed with the printed partition.

The size filter. H3 held. The input check confirms the case: at 0.025 m the tree component holding box A has 3,036 points, all of A and all of B and no other label, above the limit of 2,348, which is above the larger box’s 1,660. The port’s output is the cylinder (1,253 points) and the sphere (603 points), and no point of A or B appears in any cluster. With max_cluster_size set, two objects disappear from the output without any trace other than PCL’s debug message, because a rejected queue’s points stay processed and are never offered to another cluster (extract_clusters.hpp, lines 211–215).

The tutorial’s parameters. The M3 prediction held: the loop removed one plane, of 45,165 points (the 44,764 table points and 252, 134 and 15 points of box A, the cylinder and the sphere), and stopped with 0.094 of the points left, below its 30 % limit. The tutorial’s tolerance of 0.02 m then returned three clusters, 2,910 points holding both boxes (1,534 of A, 1,376 of B), the cylinder’s 1,187 and the sphere’s 591, all within its size limits. On this scene the tutorial’s settings merge the two boxes, and its 2 cm threshold cuts more of box A’s base than the 1 cm threshold of M1 did (252 points against 126).

The hypotheses, the scene, the tolerances, the checks and their bars were written before any code ran. One reachable-value script then rendered the same scene and computed the exact partition after removing the true plane; H2’s applicability and H3’s tolerance and size limit were set from it, as described above. A pilot ran the full script before the first run and printed the same output; nothing was changed after the first run.

Ecosystem and Integrations

PCL is a C++ library built with CMake: the 1.15.0 change log raises the minimum CMake version to 3.16.3 and requires at least Boost 1.71, and the walkthrough names FLANN behind the k-d tree and VTK behind the visualization module. The README links compilation tutorials for Linux, macOS and Windows, a Stack Overflow tag (point-cloud-library) and a Discord server for questions, and asks for contributions through CONTRIBUTING.md. Version 1.15.1 added nanoflann as a “faster alternative to pcl::search::KdTree” and support for CUDA 13 in the CUDA and GPU modules (CHANGES.md).

Other systems on this site depend on PCL. ROS reports that REP 2000 lists PCL among each distribution’s dependencies, PCL 1.14.0 for Jazzy on Ubuntu Noble. ETH3D’s evaluation program is C++ that depends on PCL, Eigen and Boost. TUM RGB-D reports results that Kerl et al. reported for the PCL implementation of KinectFusion (KinFu), and Point Cloud Registration reports that in Zhou et al.’s (2016) comparison the accuracy of the PCL and Sparse ICP variants they tested degraded once the initialization deviated by 5° in rotation or by 5–10 % of the cloud’s diameter in translation.

Alternatives

  • Open3D is another open-source library for 3D data; its conventions differ from PCL’s in places, the normal orientation stated above among them.
  • scikit-learn provides DBSCAN, OPTICS, HDBSCAN and single-linkage agglomerative clustering for points in Python; Clustering compares them. Euclidean cluster extraction behaves as DBSCAN with a minimum of one point, in our reasoning above.
  • Learned segmentation. Point Cloud Segmentation covers networks that label each point.
  • Known geometry. Robotic Manipulation segments objects by their height above a table whose pose is known, with no plane fit.
  • Images. In our reading, an organized cloud can also be segmented as an image, for example by region growing on depth; PCL’s search module has a specialized search for organized datasets (walkthrough).

Versions and Compatibility

As of November 2026 the latest release is 1.15.1, published on 26 August 2025 after a release candidate on 13 August 2025; the release list shows no later release. Earlier releases in CHANGES.md are:

  • 1.15.0 (22 February 2025): compiles as C++17 by default (“switching back to C++14 currently still possible”), adds a torus RANSAC model, OpenMP multi-threading in IterativeClosestPoint and a minimum number of points per voxel in UniformSampling, and removes APIs deprecated in earlier releases;
  • 1.14.1 (3 May 2024) and 1.14.0 (3 January 2024).

The change log states the deprecation policy: public APIs are deprecated with removal “scheduled … after two minor releases”. SACMODEL_STICK, for instance, warns that it is deprecated in favour of SACMODEL_LINE and “will be removed in PCL 1.17” (sac_segmentation.hpp, line 159). Version 1.15.1 also added getInliers, getModel and getModelCoefficients accessors to the sample consensus classes “to avoid copying data”. Nothing in this article was checked against releases other than 1.15.1.

Limitations

  • One tolerance for the whole cloud. The cluster tolerance is a fixed radius, while the sample spacing of a depth sensor grows with distance and slant. In the example only one of six tolerances gave one cluster per object, and the tutorial itself recommends trial and error.
  • Silent discards. Clusters outside [min, max] are dropped, and their points are not reassigned (H3); an object larger than the maximum, or two objects merged into one, vanish from the output.
  • Plane removal takes object bases. Every point within the threshold of the plane goes with it, including the bottom of each object standing on it (M1, M3), so object heights computed afterwards are short by up to the threshold and their centroids sit too high, in our reasoning.
  • Defaults that must be overridden. The distance threshold and the cluster tolerance both default to 0, and RANSAC’s 50 iterations end early when the adaptive bound is met; the result depends on these settings and on the random draws, which the constructor’s comment says are seeded with 12345 unless random is set.
  • Precision and search rules. Coordinates and model coefficients are float, and whether a point at exactly the search radius counts depends on the search backend, which we did not read; results at a tolerance close to a point spacing can therefore differ between backends, in our reasoning.
  • Normal orientation towards a single viewpoint does not hold for data from several viewpoints, as the normal estimation tutorial notes.
  • Language. PCL is a C++ library; we found no official Python binding in its repository at 1.15.1.

Related

  • Point Cloud Registration

    Estimating the transformation that aligns two or more point clouds of the same object or scene, by local refinement such as ICP, by global methods built on 3D feature correspondences, by globally optimal search, or by probabilistic and non-rigid models, with the benchmarks and metrics used to compare them.

  • Clustering

    Grouping unlabelled data so that similar items share a group; why the task is undefined until a similarity and a scale are chosen, the main families of methods (centroid, mixture, density and mode seeking, hierarchical, graph-based), how a clustering is evaluated with and without ground truth, and where clustering is used in computer vision.

  • Robot Operating System (ROS)

    The open-source robotics middleware ROS 2 as of its Jazzy distribution, covering nodes, topics, services and actions, DDS and the RMW layer, quality of service, discovery, launch and composition, tf2 and the REP 105 frames, the image and camera-info messages, message_filters, bags and distributions, with an example that ports the Python time synchronizers.

  • Iterative Closest Point (ICP)

    An algorithm that rigidly aligns two point clouds without known correspondences by alternating closest-point matching with a least-squares estimate of the rotation and translation.

  • Point Cloud Segmentation

    Assigning a label to every point of a 3D point cloud, by semantic class, by object instance or by object part, with point-based, sparse-voxel, range-image and transformer networks, and the indoor, outdoor and object benchmarks on which they are compared.

  • Vision-Based Robotic Manipulation

    How robots use cameras and depth sensors to pick, place, insert and rearrange objects, covering 6D object pose estimation for picking (PoseCNN, DenseFusion, FoundationPose and the BOP benchmark with its VSD, MSSD and MSPD errors), model-based and model-free pick-and-place, keypoint and affordance representations, assembly, deformable objects, learned visuomotor policies, and how task success is measured.

References

  1. Point Cloud Library (PCL) 1.15.1: LICENSE.txt (BSD 3-clause), commit 3346843 (2025).
  2. Point Cloud Library (PCL) 1.15.1: README.md and CHANGES.md (2025).
  3. Point Cloud Library (PCL) 1.15.1: tutorials Getting Started / Basic Structures and PCL Walkthrough (doc/tutorials/content/basic_structures.rst, walkthrough.rst) (2025).
  4. Point Cloud Library (PCL) 1.15.1: tutorials Plane model segmentation, Euclidean Cluster Extraction, Region growing segmentation and Estimating Surface Normals (doc/tutorials/content/planar_segmentation.rst, cluster_extraction.rst, region_growing_segmentation.rst, normal_estimation.rst, and sources/planar_segmentation/planar_segmentation.cpp, sources/cluster_extraction/cluster_extraction.cpp) (2025).
  5. Point Cloud Library (PCL) 1.15.1: segmentation source code (segmentation/include/pcl/segmentation/sac_segmentation.h, extract_clusters.h, region_growing.h, impl/sac_segmentation.hpp, impl/extract_clusters.hpp) (2025).
  6. Point Cloud Library (PCL) 1.15.1: sample consensus and common source code (sample_consensus/include/pcl/sample_consensus/sac_model_plane.h, impl/ransac.hpp, impl/sac_model_plane.hpp; common/include/pcl/common/impl/centroid.hpp) (2025).
  7. Point Cloud Library (PCL) 1.15.1: features and search source code (features/include/pcl/features/normal_3d.h, impl/normal_3d.hpp; kdtree/include/pcl/kdtree/impl/kdtree_flann.hpp; search/include/pcl/search/kdtree.h) (2025).
  8. Point Cloud Library (PCL). Releases pcl-1.14.1 to pcl-1.15.1, GitHub releases (read through the GitHub releases API, November 2026).
  9. Open3D 0.20.0 source code: cpp/open3d/geometry/EstimateNormals.cpp.
  10. Rusu, R. B. & Cousins, S. (2011). 3D is here: Point Cloud Library (PCL). IEEE International Conference on Robotics and Automation (ICRA), 1–4. (not read)