An Optimization Based Framework for Human Pose Estimation in Monocular Video