Attributed skeleton graphs using mathematical morphology