Controlling machines with smart vision sensors