How to select control points for B-spline smoothing?

5 views (last 30 days)
I have an initial path that resulted from RRT-connect algorithm in the form (xi,yi) and i want to smooth it using B-spline algorithm. The question is "Shall i consider all the returned (xi,yi) values as control points or shall i choose some? and if the second what are the criteria to choose some waypoints as control points and not the others?

Accepted Answer

Abhaya
Abhaya on 23 Jan 2025
Edited: Abhaya on 23 Jan 2025
Hi Yaaqob,
The question of whether to use all the waypoints from your RRT-connect path as control points, or to select some, depends on the trade-off between smoothness and adherence to the original path.
In the first case, if you select all (xi,yi) points from your RRT-connect path as control points for the B-spline, the result will likely closely follow the original path. However, the resulting curve may not be smooth and could have overfitting to the noisy or unnecessary waypoints.
In the latter case,choosing a subset of control points would capture the essential shape of the path, while ignoring any points that are unnecessary or noisy. However it can miss some important details of the curve.
To select a subset of control points, you can use following criterias:
  • Curvature-based Selection: Points where the curvature changes significantly are good candidates for control points.
  • Uniform Spacing: This helps to evenly distribute the control points and avoid clustering too many control points in certain areas of the path.
  • Smoothing with a Threshold: If some parts of the path have too many points, you might want to eliminate intermediate points that are not contributing significantly to the path’s shape.
  • Algorithmic Approach: There are also optimization algorithms that can choose control points based on minimizing the difference between the original path and the smoothed curve.
The given figure demonstrates the difference between using all points as control points and using a subset of control points, selected with uniform spacing, for B-spline smoothing.
I hope this addresses your query.
  1 Comment
YAAQOB AL-JAMALI
YAAQOB AL-JAMALI on 27 Jan 2025
your explanation is meaningful and clear. is it okay of you share with me the code that result the last figure?

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!