Feature extraction for range sensor can be very useful. This usually deals with geometric primitives such as lines, circles, etc. We will look at line extraction techniques as these are the simplest features to extract and provide a basis for more complex feature extraction techniques.

For line extraction, we need to answer:

  1. How many lines are present in the scan?
  2. Which points belong to which line?
  3. Given these points, what is the line equation?

Least Squares Line Fit

First, we convert range data (such as from LiDAR) from polar coordinates to Cartesian:

We want to fit a line:

which is equivalent to slope-intercept .

We can expand this to write:

Taking the orthogonal distance between the measured point and the line, we have:

To find the best line, we minimize the total squared error:

which can be solved by the roots of .

Unfortunately, this least squares method is not robust to uncertain data (i.e. outliers).

A more typical approach is to use RANSAC, which is more robust to noise.