Code covered by the BSD License  

Highlights from
Better Skeletonization

5.0

5.0 | 8 ratings Rate this file 60 Downloads (last 30 days) File Size: 10.83 KB File ID: #11123
image thumbnail

Better Skeletonization

by Nicholas Howe

 

19 May 2006 (Updated 19 Jul 2007)

Provides an alternative to the image toolbox skeletonization implemented in bwmorph.

| Watch this File

File Information
Description

The files in this package comprise the Matlab implementation of a method for skeletonizing binary images. These are my own implementation
of a skeletonization method communicated to me by Alex Telea
(http://www.win.tue.nl/~alext/). See his papers for more details.

Skeletonization is (roughly speaking) the "thinning" of a binary image or silhouette to a one-pixel width spine. The image processing toolbox provides support for skeletonization via the bwmorph function, but its results do not always conform with our intuition. I have found that the approach used herein usually generates a more pleasing result.

There is also a routine for locating endpoints and junctions in skeletonized images.

(Note: This code has not been optimized for speed.)

Bug fix 7/18/07: In rare instances, isolated points would incorrectly be assigned an infinite value for skg.

Acknowledgements
This submission has inspired the following:
tree labelling
Required Products Image Processing Toolbox
MATLAB release MATLAB 7.0.4 (R14SP2)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (14)
06 Jul 2006 Arvin Fan

It works.

26 Jul 2007 Vincent Pelletier

Nice. For me it turns out that anaskel is the useful routine after all. I'm glad I tried it!

24 Apr 2008 Scooter NGC  
28 Apr 2008 Jinghong Low

Thanks for your contribution

06 May 2008 Luis Felipe

Very good.

23 Jun 2008 Fadi Bazzi

This thing do not work right. Can someone help me? I am getting those errors:

??? Attempt to execute SCRIPT skeleton as a function:
C:\Users\Fkb\Documents\MATLAB\test\skeleton.m

Error in ==> demo at 9
imshow(bwmorph(skeleton(img)>35,'skel',Inf));

20 Aug 2008 elden fisher

it works. you have to modify and run first skeleton.m and anaskel.m as they contain absolute path to the two cpp files for compilation.

08 Mar 2009 Sravanti

I am a Matlab novice, having said that, this code also doesn't work for me, i ran the mex setup, chose a compiler, changed the file path names in skeleton.m and anaskel.m to the correct ones for the cpp files (from the download) - do I need to make any modifications in the C-code? how does it read the image?
I get lots of errors from the .cpp files

23 Jun 2009 Casey Ta

For those having trouble compiling skeleton.m and anaskel.m, I had the same issue at first. The Lcc-win32 C 2.4.1 compiler that comes with MATLAB wouldn't compile these files. You'll have to try a different compiler. These files compiled just fine for me after I chose Microsoft Visual Studio 2008 in mex -setup.

03 Sep 2009 Matt Fetterman

It is very good. I have suggestions for additional features if you are interested in collaboration.

15 Sep 2009 Christopher MacMinn

This package is very useful.

A question: does anyone know what the local radius values correspond to, or what units they are measured in? They are not in pixels.

16 Sep 2009 Christopher MacMinn

With regard to my question above (15 Sep 2009), I think I've figured it out -- it looks like the local radius output of the function skeleton() is actually the radius SQUARED. Take the sqrt to get the radius in pixels.

11 Aug 2011 donny jason

I have try other compiler.I'm using mic studio professional 2008. It seems it is still the same..
how to solve it?

11 Aug 2011 donny jason

i got it already. It works. Thank you

Please login to add a comment or rating.
Updates
19 Jul 2007

Bug fix.

In rare instances, isolated points would incorrectly be assigned an infinite value for skg.

Tag Activity for this File
Tag Applied By Date/Time
morphology Nicholas Howe 22 Oct 2008 08:26:06
segmentation Nicholas Howe 22 Oct 2008 08:26:06
skeletonization Nicholas Howe 22 Oct 2008 08:26:06
alternative Nicholas Howe 22 Oct 2008 08:26:06
binary images Nicholas Howe 22 Oct 2008 08:26:06
image process Nicholas Howe 22 Oct 2008 08:26:06

Contact us at files@mathworks.com