A Background Subtraction Algorithm For A Pan-Tilt Camera