Number of branches per branch point

8 Ansichten (letzte 30 Tage)
Daniele Cossellu
Daniele Cossellu am 21 Jul. 2021
Kommentiert: Daniele Cossellu am 22 Jul. 2021
Hi! I have a skeleton image (the attached one) and i want to compute how many branches there are for each branch point. Eg: there are two branchpoints with four branches, three branchpoints with three branches, etc. Anyone knows how to do this?

Akzeptierte Antwort

Matt J
Matt J am 21 Jul. 2021
Bearbeitet: Matt J am 21 Jul. 2021
Perhaps as follows:
k=ones(3); k(5)=0;
neighborCount=conv2(double(BW),k,'same');
neighborCount=neighborCount.*(neighborCount>2);
[row, col, numBranches]=find(neighborCount); %branch point (row,col) coordinates and number of branches.

Weitere Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by