The paper addresses the problem of person tracking in indoor and outdoor environments with significant light variations. This is achieved in part by real-time control of camera parameters affecting the light exposure, i.e. camera gain, shutter speed and iris. Several other new strategies are also formulated to recognize and segment the person from the environment, and to reacquire the person when he is lost during difficult walking maneuvers. The centroid of person's image, which is a critical quantity for person tracking, is determined using a new method based on detected regions and color of the regions. In addition to the camera exposure control, the camera pan and tilt and the moving platform's speed and steering are controlled using the characteristics of the detected person's image such as mass (area) and centroid. The system has been implemented on a Segway robotic platform that has been equipped with a camera, an onboard computer, loud speakers, game-pad, etc. Extensive trials have been carried out both indoors and outdoors, and a video has been prepared that shows the person following under a variety of conditions.