Convert bwboundaries to graph

2 visualizaciones (últimos 30 días)
Ahmet Burak Erdogan
Ahmet Burak Erdogan el 9 de Mayo de 2023
Editada: Image Analyst el 9 de Mayo de 2023
I want to convert bwboundaries data to a graph, so I can use findpeaks.
B = bwboundaries(L,'noholes');
imshow(label2rgb(L, @jet, [.5 .5 .5]))
hold on
for k = 1:length(B)
boundary = B{k};
plot(boundary(:,2), boundary(:,1), 'w', 'LineWidth', 2)
end
[EDIT] Formatted as code.

Respuestas (1)

Image Analyst
Image Analyst el 9 de Mayo de 2023
I don't think that is the right approach. Usually what is done is you find the centroid and find the distance of the boundary points to the centroid. Then you use findpeaks on those distances. I do that in my attached demos on shape recognition.

Categorías

Más información sobre Time-Frequency Analysis en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by