How to select control points for B-spline smoothing?

조회 수: 5 (최근 30일)
YAAQOB AL-JAMALI
YAAQOB AL-JAMALI 2022년 1월 24일
댓글: YAAQOB AL-JAMALI 2025년 1월 27일
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?

채택된 답변

Abhaya
Abhaya 2025년 1월 23일
편집: Abhaya 2025년 1월 23일
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
YAAQOB AL-JAMALI
YAAQOB AL-JAMALI 2025년 1월 27일
your explanation is meaningful and clear. is it okay of you share with me the code that result the last figure?

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Splines에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by