In order to improve the accuracy of structured light measurement, this paper proposes a color surface structured light three-dimensional reconstruction method based on DB sequence. In the encoding stage, according to the principle that the greater the Euclidean distance between two points in the RGB space model, the greater the color difference, the color of adjacent stripes in the stripe pattern is constrained; in the decoding stage, in order to eliminate the influence of ambient light on the edge color of the stripes, Based on the threshold method, an improved algorithm is proposed. First, the color of the main area of the stripe is corrected by setting the RGB three-channel threshold. For the point where noise is generated by the crosstalk on the stripe boundary, a single-channel threshold and the other two-channel color are proposed. The method of co-constraining the size of the components. The experimental results show that for the measurement of achromatic objects, this method has high measurement accuracy and can be used for actual measurement.