Code covered by the BSD License  

Highlights from
Better Skeletonization

5.0

5.0 | 10 ratings Rate this file 99 Downloads (last 30 days) File Size: 10.8 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 file inspired Anaskel Written In Matlab, Tree Labelling, and Vessel Branch Segmentation.

Required Products Image Processing Toolbox
MATLAB release MATLAB 7.0.4 (R14SP2)
Tags for This File  
Everyone's Tags
alternative, binary images, image process, morphology, segmentation, skeletonization(3)
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (16)
10 Apr 2013 Athanasios Balomenos

Nice work, but can I ask you something. How we may compute the threshold (you demostrate in demo file) automatically according to the given object nowing only its shape apriori? Can you give the exact reference of the algorithm?

15 Dec 2012 Paul

Good

11 Aug 2011 donny jason

i got it already. It works. Thank you

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?

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.

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.

03 Sep 2009 Matt Fetterman

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

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.

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

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.

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

06 May 2008 Luis Felipe

Very good.

28 Apr 2008 Jinghong Low

Thanks for your contribution

24 Apr 2008 Scooter NGC  
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!

06 Jul 2006 Arvin Fan

It works.

Updates
19 Jul 2007

Bug fix.

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

Contact us