First time here? Check out the FAQ!
A good example of Skeletonization using OpenCV-Python is in https://stackoverflow.com/questions/33095476/is-there-any-b