How to smoothing sharp bends
16 views (last 30 days)
Show older comments
Hi I'm dealing with path planning, i did it but now need to smooth the curves for make movements suitable. I want to use circumference for smoothing so i can give car's turning radius as an input. What do you suggest for this problem?

0 Comments
Answers (2)
John D'Errico
on 27 May 2016
Edited: John D'Errico
on 27 May 2016
I'm not sure I see what is the problem. You have two lines that intersect in a known point.
Solve for the equation of a circle (with known radius) that is tangent to both lines. All that is unknown are the coordinates of the center of that circle. In fact, you even can compute a line that must pass through that center point.
As simply, there is a basic formula for the distance to a line from a point . If the radius of the circle is given as r, then the point (x0,y0) must lie at a distance r from the line. Since you have two such lines, this is again a simple problem to solve.
Just sit down with a pencil and paper, and do a little basic algebra. Yeah, I know, you want me to do it for you. But the symbolic toolbox can do it easily enough.
0 Comments
Image Analyst
on 28 May 2016
If you can interpolate a bunch more points along the line, then simple take your x and y vectors and filter each of them with a moving smoothing filter such as conv(), sgolayfilt(), lowess(), etc. The output curve will be smoother around the sharp vertices.
See attached demo that uses the Savitzky-Golay filter to smooth an outline in 2-D.
0 Comments
See Also
Categories
Find more on Smoothing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!