Thinning and skeletonizing

thin(M, b) Returns the thinned version of matrix M binarized with threshold b.

skeleton(B) Returns binary matrix B eroded to its innermost level.

skeleton2(M, b) Returns the skeleton of matrix M binarized with threshold b.

Arguments: