|
GEORGE wrote:
>
>
> Hi,
>
> has anyone come up with a problem of the following type:
>
> I have an image and by using the 'bwmorph' command I managed to
> create the skeleton of it.
>
> I want to be able to remove the smallest branches of the skeleton
> and
> keep the biggest ones. I know that somehow I have to label them and
> differentiate them from the rest. Is there any command that I could
> use to do it?
>
> Thanks
>
> George
Hi,
1)remove all tails from your skelton , S, to get a new matrix, K.
This can be done by 'shrink' or 'spur', I can't recall.
2) Subtract K from S to get a matrix of tails, T.
3) Spur (bwmorph( ,'spur') T [n/2] times and clean once to get ride
of tails shorter than n pixels.
4)Dilate the result matrix [n/2] times and add the result to the
matrix K (created at step (1)) to get S1.
5) Skelton S1.
Joe Sababa
BSTeX - Equation viewer for Matlab
<http://www.geocities.com/bstex2001/>
|