Automatically generate spheres and capsules for cloth-body collision detection?

Hi, there. I have a problem about PxCloth cloth-body collision detection. As the user guide says,
“Spheres and capsules are therefore the prefered choice to model the character shape.”
I’m wondering is there any algorithm (paper or software) that is able to automatically generate spheres and capsules for a human body, which is represented as triangle mesh. Thanks in advance.:)

It should be possible, but I don’t know of a reliable algorithm available already. I think you would start with the bone representation, and assign spheres to each end of each bone, then adjust the radius of the spheres based on the radial distance of the vertices relative to the bone axis.

Thank you very much for your advice.