The paper describes a versatile machine vision system for correcting off-line programmed nominal robot trajectories for advanced welding. Weld trajectory corrections are needed due to slight variations in weld joints. Such variations occur naturally because of varying tolerances in parts and to heat induced deformations during earlier weld sequences. The developed system uses one camera and a weld tool mounted on the robot hand. As a first step, the whole system, including the camera, is calibrated. Then the system takes images of the weld joint from different positions and orientations, and determines the weld joint geometry in 3D using a stereo vision algorithm and a novel camera model. The weld trajectory is then updated in the robot control system, and weld operation is performed. These steps are repeated for all weld sequences of the work piece. The strategy has successfully been demonstrated for a standard industrial welding robot and a standard FireWire CMOS camera. The maximum deviation of the trajectory found by the system compared to a reference (coordinate measuring machine) is 0.7 mm and the mean deviation is 0.23 mm. Thus, the system shows high potential for industrial implementation. ©2010 IEEE.