From: "Joe Sababa" <joesababa@yahoo.com>
Path: news.mathworks.com!newsfeed-00.mathworks.com!webx
Newsgroups: comp.soft-sys.matlab
Subject: Re: removal of  branches from skeleton
Message-ID: <eef9252.0@webx.raydaftYaTP>
Date: Fri, 21 Jan 2005 11:58:43 -0500
References: <eef9252.-1@webx.raydaftYaTP>
Lines: 34
NNTP-Posting-Host: 81.218.245.169
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
Xref: news.mathworks.com comp.soft-sys.matlab:255736


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/>