Optimize markers to joints