matlabimage-processingbinarymathematical-morphology

What is the algorithm of Skeleton


This function bwmorph(Img,'skel',Inf) return the skeleton of a binary image.

What I'm looking for is the algorithm used by this function to do it manualy ?


Solution

  • If you want to see the actual code within a function in MATLAB, you can try using the TYPE command:

    type bwmorph       %# Command form
    type('bwmorph.m')  %# Function form
    

    Keep in mind, this will not work on all MATLAB functions. You may get a message that says the function is a built-in function, in which case the code will not be displayed. You can also try opening the file in the MATLAB Editor using the EDIT command:

    edit bwmorph.m     %# Command form
    edit('bwmorph.m')  %# Function form