A: 

See http://opencv.willowgarage.com/documentation/cpp/index.html

I don't see anything for clustering/centroids, but you might try FindContours: http://opencv.willowgarage.com/documentation/cpp/structural_analysis_and_shape_descriptors.html#findcontours .

It sounds like you want to do visualization analysis and this library is more suited to machine vision.

Potatoswatter
Actually 2d skeleton estimation is very common in machine vision. A common example is finding holes in objects, a routine QA check. A machine vision implementation of that check can be done by finding 2D skeletons; objects with holes have skeletons with loops.
MSalters
Thankx salter plese can you provide me any documents or code or links for the same as above
kumar