How to smoothing sharp bends
14 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Risposte (2)
John D'Errico
il 27 Mag 2016
Modificato: John D'Errico
il 27 Mag 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 Commenti
Image Analyst
il 28 Mag 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 Commenti
Vedere anche
Categorie
Scopri di più su Smoothing in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!