Number of branches per branch point

10 visualizzazioni (ultimi 30 giorni)
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?

Risposta accettata

Matt J
Matt J il 21 Lug 2021
Modificato: Matt J il 21 Lug 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.

Più risposte (0)

Community Treasure Hunt

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

Start Hunting!

Translated by