This method uses the value of Threshold to binarize the image.
The output of this filter is an image where skeleton points are labeled according to what their connectivity is. By selecting the appropriate branch mode, the user can generate an image consisting of, for example, only branch points, only end points, or only unconnected line segments.
Points classified as mcBranchMode.bmEnd have only one neighbor, as an endpoint. mcBranchMode.bmSkeleton is applied to skeleton points with two neighbors, and will be the classification of most points in the skeleton. mcBranchMode.bmBranch3 is applied to three way branch points; mcBranchMode.bmBranchN is applied to four or more way branch points, possible in some degenerate cases.
The set of points labeled in an image is dertermined by the Classify bit mask, which can be the sum of all four-branch modes.
Points in the filtered image are assigned their classification values, i.e. endpoints will be assigned the mcBranchMode.bmEnd value.