The structured light can be used to extract the 3D information through obtaining the three-dimensional points from being measured object, and this method is simple, fast and accurate. However, the key factor of this process is how to inspect the stripes accurately. To improve the accuracy, in this paper, we firstly locate the stripes of the structured light roughly by use of the gray code images, and then locate it accurately by utilizing the line-shift stripes code images. Finally we turn the two dimensions search into one dimension search in the image match by using of epipolar constraint, and the intersection points of the stripes of structured light and the epipolar line are final match points. Finally, space intersection has been used to obtain three-dimensional points. Repeated experiments prove that wonderful effect can be obtained by this method.