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