How do I locate the end points of a bridge-like structure in an image?
Below is a generalized representation.
One interesting feature that found is the junction point in the skeleton which has the least value of the distance function of the complement of the object associated with it.
X - object set in black in input image D(X) - Distance function of object X D(~X) - Distance function of the complement of the object - this would usually resemble the skeletonization of the object set by itself.
Thus the basic intuition here is that the object X's topology is such that near the heavy heads one finds pinch - a place where you are sure to have a junction point in the skeleton - and at the same time a low value of the distance function of the complement of the object. The neck or pinch produces a minimum here at the junction point.
Maybe this idea needs some tuning - but i guess one can work around.