An innovative approach to automatic "soft" docking of a spacecraft with a space station (or with another spacecraft) is proposed, using a computer vision system where a camera is rigidly fixed to the spacecraft as a position and orientation measurement device. The emphasis in this paper is on the spacecraft guidance and control loops, which make use of position and orientation estimates obtained by the computer vision system. A simple guidance plan provides the desired input commands to keep the camera always pointed at the space station and to perform precise control of the spacecraft range. Theoretical properties of the control loops, under ideal assumptions, are described. Integration of the computer vision and control loops into a complete docking system and performance analysis of the complete docking system are considered elsewhere.