Find centroid of curve
Mostrar comentarios más antiguos
Given this curve,I would like to find the centroid of the curve.
Currently I am selecting the piece wise splines and using the Inter X module to find out where the projection of one spline will intersect the other spline.
However the issue with this method is that some points are not matched properly.
Therefore is there a way to find the centroid of the following set of spline points.
Result figure

As you can see at some points interX returns Null I tried doing it from right to left,but that gives indice exceeds error.
Also given the set of points can I skeletonize them?
Respuesta aceptada
Más respuestas (1)
Image Analyst
el 8 de Sept. de 2021
Maybe you can convert the points to a digital image and then skeletonize it. Something like
binaryImage = poly2mask(x, y, rows, columns);
skelImage = bwskel(binaryImage);
% Get rows and columns of the skeleton
[rows, columns] = find(skelImage);
Requires the Image Processing Toolbox.
2 comentarios
sparsh garg
el 9 de Sept. de 2021
Editada: sparsh garg
el 9 de Sept. de 2021
sparsh garg
el 9 de Sept. de 2021
Categorías
Más información sobre Read, Write, and Modify Image en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!





