How to pass from a set of points to lines interpolating them?
Mostrar comentarios más antiguos
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 comentarios
Image Analyst
el 12 de Jun. de 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
el 12 de Jun. de 2022
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Convert Image Type 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!

