Skip to the lesson
FixTheRobot Explore Robotics / Localization & SLAM / M5 LiDAR SLAM / M5-T3

Localization & SLAM · Theory · M5

M5-T3 — Feature Extraction

Match the points that are easy to match: the sharp ones and the clearly flat ones.

  • Lesson 3 of 11
  • Module 5: LiDAR SLAM
  • Theory
  • About 8 minutes to read

A registration algorithm does not need every point; it needs the ones that constrain the pose. On a flat wall every point is as good as its neighbour, and the matcher can slide along it. Corners and edges are different: they pin the position in more than one direction. LOAM’s insight was to find them cheaply by looking at how smooth the scan line is around each point.

Learning objectives

After this lesson, you should be able to:

  • Compute the LOAM smoothness c for a point and classify it as edge, planar or neither.
  • Describe the selection scheme: regions, quotas and rejection of unreliable points.
  • Explain why feature selection speeds up registration and what it can lose.
  • Identify when feature-based extraction is the wrong choice (direct methods, solid-state sensors).

The problem and the intuition

Run a finger along a line drawn by the LiDAR on the surface it sees. On a smooth wall the line is straight: moving along it you feel no change. At a corner it turns sharply. Curvature, the amount the line bends, is what distinguishes a corner from a wall. LOAM measures it from the neighbours of each point on the same scan line: if the neighbours on both sides are symmetric about the point, the point sits on a straight piece; if they are all on one side, it is a corner or an end.

A flat patch constrains only the direction perpendicular to it. A corner or edge constrains the pose in several directions.

Smoothness along a scan lineA plot of the smoothness c along a scan line that crosses a corner at index 20. The smoothness is zero on straight sections and peaks at the corner, where an edge feature is selected.51015202500.0250.050.0750.1point index along the scan linesmoothness ccorner: edge feature planar features c = || Σ_j ( X_i − X_j ) || / ( |S| · ||X_i|| ) j runs over the 5 neighbours on each side. small c: surface point (plane feature)large c: edge point (corner, pole, edge)
Smoothness along a scan line that meets a corner. The corner stands out; straight sections score zero.

The algorithm: smoothness-based selection

Problem. From the ordered points of a scan (ring by ring), pick a small set of points that carry most of the information for registration, and label them edge or planar.

Assumptions. The points are ordered along each scan line, so that neighbours in the list are neighbours in space; the scene has planar surfaces and sharp edges; the cloud has been deskewed.

Smoothness

For the point Xi on scan line k, let S be the set of its neighbours on that line: the 5 points on each side. Then

LOAM smoothness (Zhang and Singh, 2014)
c=∥∑j∈S, j≠i(Xi−Xj) ∥∣S∣⋅∥Xi∥c=\frac{\lVert \sum _{j\in S,\,j\ne i}(X_{i}-X_{j})\,\rVert }{\lvert S\rvert \cdot \lVert X_{i}\rVert }
Xi
the position of the point in the sensor frame.
S
the neighbouring points on the same scan line (typically 5 on each side, 10 in all).
‖Xi‖
the range of the point: it normalises c so that distant points are judged like near ones.
c
near 0 for points on a straight line, large for corners and isolated points.

The sum of differences is the vector from the neighbours’ centroid to the point: it vanishes if the neighbours are symmetric about it on a straight surface.

Pipeline

  1. Compute c for every point that has enough neighbours (skip the first and last 5 of each line).
  2. Divide each scan into regions (typically 4–6 azimuthal sectors) so that features are spread around the sensor, not all in one direction. Sort the points of each region by c.
  3. Select edge points: the points with the largest c above a threshold cedge, at most 2 per region (LOAM) and not neighbours of an already selected one (mask the 5 points around each pick).
  4. Select planar points: the points with the smallest c below a threshold cplane, at most 4 per region, with the same neighbour masking.
  5. Reject unreliable points beforehand: points near the edge of an occluding object (a depth jump greater than a threshold between neighbours; the apparent “edge” is a shadow), and points on surfaces nearly parallel to the laser beam (large incidence angle: the range jumps along the surface).

Strengths, limits and failure modes

Feature selection compared
StrengthLimitation / failure mode
Few points (hundreds) are matched: registration in millisecondsNeeds a structured scene: in a field or forest there are neither planes nor sharp edges
Edges and planes constrain different directions: complementaryFeatures depend on viewpoint: an “edge” seen from one side is a smooth curve from another
Cheap: O(N) on ordered dataDepends on the scan-line ordering: breaks on solid-state, merged or shuffled clouds
Thresholds are intuitiveThresholds are scene- and sensor-specific; noise creates false edges

Direct methods (FAST-LIO2, KISS-ICP) skip feature extraction and match all (downsampled) points, which is robust where features are scarce and works on any sensor, at the price of more points per match (M5-T9).

A worked example: a corner on one scan line

A scan line crosses a wall (y = 2 m, x from −1 to 1) and then a second wall at x = 1 m running toward the sensor (y from 2 down to 1). Points are 0.1 m apart: (−1.0, 2.0), …, (1.0, 2.0), (1.0, 1.9), …, (1.0, 1.0). The sensor is at the origin. Use 5 neighbours on each side.

  1. A point on the straight wall, say (−0.2, 2.0): its 10 neighbours are symmetric about it along y = 2, so Σ(Xi − Xj) = 0 and c = 0.000. Planar.
  2. Just before the corner, (0.6, 2.0): four neighbours to the right (0.7 … 1.0) are on the wall, but the fifth is at (1.0, 1.9) (the corner turns). The sum is small and nonzero: c = 0.0068. Still planar.
  3. Approaching: c = 0.020 at (0.7, 2.0), 0.039 at (0.8, 2.0), 0.065 at (0.9, 2.0).
  4. At the corner, (1.0, 2.0): five neighbours lie along the first wall and five along the second. The differences Xi − Xj add up to (1.5, 1.5), of length 2.12 m; dividing by |S| = 10 gives 0.212 m, and dividing by the range ‖Xi‖ = 2.24 m gives c = 0.095, the maximum on the line. It becomes an edge feature.
  5. Past the corner c falls symmetrically: 0.066, 0.041, 0.022, 0.0075 and then 0 on the second wall.
  6. Selection with a threshold cedge = 0.05: the corner and its two nearest neighbours exceed it; the masking rule picks only the corner (the highest) and ignores the 5 points around it. Planar features are drawn from the points where c ≈ 0, spread over the line.
  7. Why this helps. The edge point at (1, 2) is matched in the next scan to the line of the corner (point-to-line distance); the planar points are matched to the walls (point-to-plane). Together, one corner and a few wall points fix x, y and heading in this slice.

The lab asks you to implement exactly this selection on a 2D scan and see the effect on registration.

Engineering implications and limitations

Engineering implications

  • Tune thresholds to your sensor and scene and log the number of features per scan. A sudden drop (for example from 300 to 20) means the environment lost its structure; it is a degeneracy warning.
  • Keep the ring structure. Do not voxel-filter before extracting features; filter the features afterwards.
  • Reject points at depth discontinuities. “Edges” at the boundary of an occluder are not on a real edge and move with the viewpoint.
  • Spread the features (regions and quotas); features all in one direction leave the pose unconstrained in the others.
  • Check for a solid-state or non-repeating-scan sensor. Smoothness along a scan line has no meaning; use curvature on neighbourhoods in space (a k-d tree) or a direct method.
  • Consider direct methods in feature-poor or unstructured scenes: FAST-LIO2 and KISS-ICP match raw points and have no thresholds to tune for features.

Limits

Feature extraction throws away information and depends on thresholds and on the scene having the structure it expects. It is also noise-sensitive: a few centimetres of range noise at 5 cm point spacing makes c fluctuate. These costs are why the newest systems moved toward direct matching on a better map structure, with feature extraction remaining popular for its speed on embedded hardware.

Common misconceptions

“Edge features are better than planar ones.”

They constrain different directions: planes pin the position perpendicular to the plane, edges constrain along two directions. A good pose needs both.

“More features always means better registration.”

Selection is meant to keep the informative ones. Many redundant planar points just add cost and bias toward the largest surface.

“The smoothness is a property of the surface.”

It depends on the viewpoint, the sampling density and the noise. The same curved wall may look planar at 20 m and rough at 2 m.

“Feature extraction is obsolete.”

It remains fast and effective in structured scenes; the choice is a trade-off of speed against robustness.

Engineering takeaways

  1. LOAM’s smoothness c measures how far a point is from the centroid of its scan-line neighbours, normalised by range.
  2. Large c selects edge points; small c selects planar points; selection uses regions and quotas to spread features.
  3. Unreliable points (occlusion edges, grazing incidence) are rejected before selection.
  4. Features make registration fast and well conditioned but depend on structure and on the scan-line ordering.
  5. Direct methods avoid feature extraction at the cost of more points and are more robust in unstructured scenes.

References and further reading

Primary papers and authoritative documentation.

Knowledge check

Three conceptual questions. Write an answer, then reveal the explanation. Your answers stay in your browser.

Question 1

Why does a point at the very end of a wall, next to an open doorway, have a large smoothness and yet make a poor edge feature?

Explanation

The “edge” may just be the boundary of the occluding wall against the far side of the door: from another viewpoint the apparent edge moves along the far surface. Such depth-discontinuity points are exactly the unreliable points that LOAM rejects before selection.

Question 2

A robot drives into a long featureless corridor and the number of edge features per scan falls from 80 to 2. What does that tell you, and what should the system do?

Explanation

The environment no longer has the structure the extractor needs, and registration is probably degenerate along the corridor. The system should warn, lean on other sensors (IMU, wheel odometry) for the unconstrained direction, and not trust the scan matcher’s confidence there.

Question 3

Why must feature extraction run before, not after, voxel downsampling of the whole scan?

Explanation

Smoothness is computed from the ordered neighbours on a scan line. Voxel filtering replaces points by centroids and destroys that ordering and spacing, so c can no longer be computed from true neighbours.

What’s next

With features selected, the next lesson compares the registration methods that match them (or the raw points) between scans.

Practice this lesson

Understand the LOAM Pipeline

Implement smoothness-based edge and plane selection and a two-rate odometry step on 2D scans.

Next lesson

M5-T4 — Scan Registration

Compare point-to-point, point-to-plane and NDT/GICP-style registration and their failure modes.

Nothing below is required to finish this lesson.