Publications / 2024 / A Point Cloud Contour Extraction Method based on Plane Segmentation

A Point Cloud Contour Extraction Method based on Plane Segmentation

Lei Lu, Ran Gao, Wei Pan, Wenming Tang
Frontiers in Computing and Intelligent Systems, 7(2):21-25

In one sentenceTo outline chips in a circuit-board point cloud, planes are segmented with PCA-refined RANSAC, flattened into 2D images and traced along gradient edges; one chip’s contour takes 64.614 ms, against 745.253 ms with alpha shapes.

The problem

Extracting contour features from point clouds is used in industrial inspection, robot operation and related fields. Point clouds from real devices contain noise and carry no topological relationships between points, which makes contours hard to detect. Plane detection has been approached with Hough transforms, region growing and iterative RANSAC; boundary extraction with triangular meshes, breakline sorting with B-spline fitting, and the alpha shape algorithm. Alpha shapes can extract the inner and outer contour points of polygons, but for point clouds with a large data volume its time complexity is high.

Plain RANSAC has a weak spot of its own: it tolerates obvious noise, but points just off the plane, such as those of an adjacent plane, fall within the distance threshold and introduce errors. The paper targets the contours of the surfaces of an object, here the contours of the chips on a circuit board.

Top: photo of a dark circuit board with chips, connectors and gold contacts. Bottom: the same board as a point cloud coloured by height, with chips in blue on a green-to-red background and a height colour bar on the right.
The experimental object: (a) the circuit board; (b) its point cloud, coloured by height. The task is to extract the contours of the chip surfaces. Fig. 3 of the paper.

How it works

The method has two stages. Plane segmentation fuses RANSAC with PCA to split the cloud into planar point sets. Contour extraction then turns each plane into a 2D image, finds its boundary from the image gradient, and maps the boundary points back into 3D space.

  1. RANSAC proposes planes. Three far-apart points are drawn at random and a plane is fitted through them; points within a distance threshold dth of the plane join its set. After Niterate iterations the largest set is kept as the current plane and removed from the cloud, and the search repeats until fewer than Nminnum points remain.
  2. PCA refines and cleans the planes. Each set is refitted by PCA: the plane passes through the centroid, and its normal is the eigenvector of the covariance matrix with the smallest eigenvalue. Two planes whose normals differ by less than 15° are merged if more than 90% of their points lie within dth of the other plane; plane pairs with too few points are removed. This repeats until no plane can be merged or removed.
  3. Flatten each plane into an image. A rotation matrix turns the planar point cloud parallel to the XOY plane, and a projection with focal lengths and offsets maps it into a 2D image. Pixels holding object points are set to 0, all others to 1.
  4. Find the boundary from gradients. The image is smoothed with a Gaussian filter, and the gradient magnitude and direction are computed. A preliminary edge pixel is kept as a boundary point only if its value is the largest among its neighbours along the gradient direction.
  5. Map back to 3D. The boundary pixels are transformed back through the projection and the inverse rotation, giving the contour points in 3D space.
Flow chart: Input Point Cloud, then a Planar Segmentation box containing RANSAC, PCA and Planar Features, then a Contour Extraction box containing Dimensionality Reduction, Gradient Calculation and Ascending Dimension, then Output Contour Points.
Algorithm flow: plane segmentation (RANSAC, PCA, planar features) followed by contour extraction (dimensionality reduction, gradient calculation, return to 3D). Fig. 1 of the paper.

Results

The experiments extract the contours of the chips on a circuit board, running on an Intel i7-12700 CPU with 16 GB of memory. For plane segmentation, the method is compared with region growing and conventional RANSAC on the same data. On the chip shown below, region growing also takes in a neighbouring region and RANSAC a strip attached below the chip, whereas PCA-RANSAC returns the chip surface alone; the paper describes its result as the one least affected by noise.

Three panels of a white planar point set on a grey background. (a) The square chip surface with an extra blob attached on the right. (b) The square with an extra strip attached below. (c) The square alone.
Plane segmentation of one chip surface: (a) region growing, (b) RANSAC, (c) PCA-RANSAC. Fig. 5 of the paper.

For boundary extraction the method is compared with the alpha shape algorithm. On a single chip, alpha shapes returns a sparse, broken outline, while the proposed method returns a denser, continuous one in less time.

Two panels with a white square outline on grey. (a) A dotted, broken outline. (b) A continuous outline that also follows a small notch at the lower left.
Boundary extraction for one chip: (a) alpha shapes, (b) the proposed method. Fig. 6 of the paper.
Grey background with eight rectangular outlines in different colours, scattered across the frame at the positions of the chips.
Contour points extracted for all target chips on the board, one colour per chip. Fig. 7 of the paper.

Cite

@article{lu2024point,
  title={A Point Cloud Contour Extraction Method based on Plane Segmentation},
  author={Lu, Lei and Gao, Ran and Pan, Wei and Tang, Wenming},
  journal={Frontiers in Computing and Intelligent Systems},
  volume={7},
  number={2},
  pages={21--25},
  year={2024},
  doi={10.54097/jfqs4b09}
}
Type
Article Journal
Topic
Geometry Processing
Venue
Frontiers in Computing and Intelligent Systems, 7(2):21-25
Year
2024
DOI