This paper describes localization and error correction of a mobile robot with a visual device which we have developed. The device can track floor image with natural texture and estimate the motion of a camera mounted in the robot. The robot is localized and controlled in real time according to information of position and direction estimated by the device. As a benefit of this method, accumulated errors of position and direction for a section in a path can be eliminated by finding an original floor image memorized at each target point where the robot reaches in the whole running. The robot have run a closed path repeatedly without a digression of the track by correcting the accumulated error. The method has a feature that double roles of both internal and external sensor are realized by a single image sensor.