How to fit a smooth curve to data in 3D?

7 visualizaciones (últimos 30 días)
Brooke McArthur
Brooke McArthur el 30 de Jul. de 2021
Editada: Matt J el 30 de Jul. de 2021
Hello!
I am currently trying to recreate the path of a fiber in CT scans in MATLAB. I am doing this by finding the midpoint of several line segments of the fiber as it moves through the slices of the data and plotting them. I am trying to fit a relatively smooth line through these points that shouls create a reasonably similar path to the actual fiber.
So far, I have had the most success using the cscvn() function, but the spline is very jagged due to over fitting. Does anyone have any suggestions for how to get a smoother curve? Here is how the spline looks at the moment.
I have tried to use the curve fitting tool app as well, but I am not sure how to use it to create a single line with data in 3 dimensions as opposed to a surface. Any feedback is greatly appreciated. Thank you.

Respuestas (1)

Matt J
Matt J el 30 de Jul. de 2021
Editada: Matt J el 30 de Jul. de 2021
Perhaps with csaps(). There, you have parameters that directly control the level of smoothing.

Categorías

Más información sobre Get Started with Curve Fitting Toolbox en Help Center y File Exchange.

Productos


Versión

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by