Capture motion

I am new to this forum, I should carry out a thesis project in which through a webcam a learning of the movement of the body must take place so that then the skeleton of the character moves in mase to the user. Could anyone help me?