How to pass from a set of points to lines interpolating them?
Afficher commentaires plus anciens
Hi everyone! I have obtained the following skeletonization

However, if you zoom, you see that the pink lines are not lines but they are series of rectangles that contain points, like you can see in this figure here below.

I would like to know how to pass from these points (contained in the rectangles) to approximate lines that trace the skeletonization in pink (Maybe there is an approximative interpolation that can do this (?)). Could anyone help me? Thanks in advance
4 commentaires
Image Analyst
le 12 Juin 2022
Why do they need to be perfectly straight lines? In other words, what are you prevented from doing if the lines are curved as they are now?
Have you see interp1
Do you just want to connect the centers of the pixels with line segments, like in the following?
load Image
warning off
p=cellfun( @polyshape, bwboundaries(Image));
imagesc(Image); colormap(gray); axis image
hold on;
plot(p(1),'EdgeColor','r','FaceColor','none','LineWidth',3);
hold off
Loren99
le 12 Juin 2022
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Convert Image Type dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

