Calculate distance between edge and skeleton

Good morning to all,
I have an image with the skeleton and the object’s edge, and I have to find, for each skeleton pixel, the closest edge pixel. How can I do it?
One option maybe could be to calculate the distance between one edge and the skeleton to obtain the half-width. I know there’s the cv2.distanceTransform, but I don’t know how I should set all the arguments.
Thank you