A real-time approach to 3D object tracking in complex scenes