Vision based control of a ball and beam testbed