In order to gain the basic data for the intelligent welding system,a laser grating vision system is built to measure digital contour of weld bore. Firstly,through the fringe images are analyzed under different working distances and grating projection angles,the preconditions are determined for obtaining grating fringe images representing the contour of weld bore. At the same time,it is discussed how to obtain the information of weld bore contour by means of fringe images when fringes continuous scan. And the established algorithm of laser grating scanning speed and camera exposure interval time provides a decision basis for the determination of system measurement speed and accuracy. Secondly,based on the algorithm of segmentation and refinement of the fringe image,the three-dimensional coordinates of discrete point is gained,the digital contour of weld bore is established by the means of three-dimensional reconstruction. Finally,the verification results show that the system can obtain the digital contour of the weld bore in real time,and the coincidence degree of width or depth values is up to 99.75% between the visual measurement system and the manual measuring.