Thread Subject:
details on bwmorph+skel method

Subject: details on bwmorph+skel method

From: Jason Miller

Date: 6 Jun, 2009 16:01:02

Message: 1 of 3

Dear Matlab-ers,

I'm interested in learning more about how matlab implements its skeletonization function, bwmorph(X, 'skel', n), where X is a binary image and n is the number of times the 'skel' routine is applied.

My quest is to find a way to implement a medial/symmetry axis transform, and matlab's skeleton appears to be close to what I'd expect to get. However, it seems to me that there is some sort of pruning algorithm at work that removes small spurs from the skeleton.

I've looked at bwmorph.m, and in the region of the file that defines the skel function looks like this:

%
% Function SKEL
%
function [c,lut] = skel(a)

lut = [];
skel1 = lutskel1;
skel2 = lutskel2;
skel3 = lutskel3;
skel4 = lutskel4;
skel5 = lutskel5;
skel6 = lutskel6;
skel7 = lutskel7;
skel8 = lutskel8;

c = a;
c = c & ~applylut(c, skel1);
c = c & ~applylut(c, skel2);
c = c & ~applylut(c, skel3);
c = c & ~applylut(c, skel4);
c = c & ~applylut(c, skel5);
c = c & ~applylut(c, skel6);
c = c & ~applylut(c, skel7);
c = c & ~applylut(c, skel8);

What I don't understand is how lutskel* is defined. Can anyone point me to a resource that lays this out? And can anyone comment on any pruning that occurs in bwmorph?

Thanks in advance.

Jason

Subject: details on bwmorph+skel method

From: Mark

Date: 17 Aug, 2012 19:27:08

Message: 2 of 3

Hi Jason,

Out of curiosity - did you ever figure this out? I just ran into the same question...

Cheers,

Mark

"Jason Miller" <millerj@truman.edu> wrote in message <h0e3ru$i3h$1@fred.mathworks.com>...
> Dear Matlab-ers,
>
> I'm interested in learning more about how matlab implements its skeletonization function, bwmorph(X, 'skel', n), where X is a binary image and n is the number of times the 'skel' routine is applied.
>
> My quest is to find a way to implement a medial/symmetry axis transform, and matlab's skeleton appears to be close to what I'd expect to get. However, it seems to me that there is some sort of pruning algorithm at work that removes small spurs from the skeleton.
>
> I've looked at bwmorph.m, and in the region of the file that defines the skel function looks like this:
>
> %
> % Function SKEL
> %
> function [c,lut] = skel(a)
>
> lut = [];
> skel1 = lutskel1;
> skel2 = lutskel2;
> skel3 = lutskel3;
> skel4 = lutskel4;
> skel5 = lutskel5;
> skel6 = lutskel6;
> skel7 = lutskel7;
> skel8 = lutskel8;
>
> c = a;
> c = c & ~applylut(c, skel1);
> c = c & ~applylut(c, skel2);
> c = c & ~applylut(c, skel3);
> c = c & ~applylut(c, skel4);
> c = c & ~applylut(c, skel5);
> c = c & ~applylut(c, skel6);
> c = c & ~applylut(c, skel7);
> c = c & ~applylut(c, skel8);
>
> What I don't understand is how lutskel* is defined. Can anyone point me to a resource that lays this out? And can anyone comment on any pruning that occurs in bwmorph?
>
> Thanks in advance.
>
> Jason

Subject: details on bwmorph+skel method

From: river

Date: 24 Mar, 2013 07:49:19

Message: 3 of 3

http://nesl.ee.ucla.edu/fw/chenni/Chenni_desktop/Documents/gumstix_ubuntu/2.0%20GB%20Filesystem/usr/share/octave/packages/3.0/image-1.0.8/bwmorph.m

    case({'skel','skel-pratt'})
      ## WARNING: Result doesn't look as MATLAB's sample. It has been
      ## WARNING: coded following Pratt's guidelines for what he calls
      ## WARNING: is a "reasonably close approximation". I couldn't find
      ## WARNING: any bug.
      ## WARNING: Perhaps MATLAB uses Blum's algorithm (which Pratt
      ## WARNING: refers to) in: H. Blum, "A Transformation for
      ## WARNING: Extracting New Descriptors of Shape", Symposium Models
      ## WARNING: for Perception of Speech and Visual Form, W.
      ## WARNING: Whaten-Dunn, Ed. MIT Press, Cambridge, MA, 1967.


"Jason Miller" <millerj@truman.edu> wrote in message <h0e3ru$i3h$1@fred.mathworks.com>...
> Dear Matlab-ers,
>
> I'm interested in learning more about how matlab implements its skeletonization function, bwmorph(X, 'skel', n), where X is a binary image and n is the number of times the 'skel' routine is applied.
>
> My quest is to find a way to implement a medial/symmetry axis transform, and matlab's skeleton appears to be close to what I'd expect to get. However, it seems to me that there is some sort of pruning algorithm at work that removes small spurs from the skeleton.
>
> I've looked at bwmorph.m, and in the region of the file that defines the skel function looks like this:
>
> %
> % Function SKEL
> %
> function [c,lut] = skel(a)
>
> lut = [];
> skel1 = lutskel1;
> skel2 = lutskel2;
> skel3 = lutskel3;
> skel4 = lutskel4;
> skel5 = lutskel5;
> skel6 = lutskel6;
> skel7 = lutskel7;
> skel8 = lutskel8;
>
> c = a;
> c = c & ~applylut(c, skel1);
> c = c & ~applylut(c, skel2);
> c = c & ~applylut(c, skel3);
> c = c & ~applylut(c, skel4);
> c = c & ~applylut(c, skel5);
> c = c & ~applylut(c, skel6);
> c = c & ~applylut(c, skel7);
> c = c & ~applylut(c, skel8);
>
> What I don't understand is how lutskel* is defined. Can anyone point me to a resource that lays this out? And can anyone comment on any pruning that occurs in bwmorph?
>
> Thanks in advance.
>
> Jason

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
morphology Jason Miller 6 Jun, 2009 12:04:02
medial axis Jason Miller 6 Jun, 2009 12:04:02
symmetry axis Jason Miller 6 Jun, 2009 12:04:02
bwmorph Jason Miller 6 Jun, 2009 12:04:02
skeletonizatino Jason Miller 6 Jun, 2009 12:04:02
rssFeed for this Thread

Contact us