The correspondence problem of two captured images, which are obtained by projecting a structured light on the measuring surface, are explored for when three-dimensional information of a given surface is needed. In our system the constraint that codifies the pattern projected on the surface has been simplified by using a random speckle pattern, thus the correspondence problem is reduced tolocal matching between two captured images and solved by a spatial distance computation technique. The performance of our approach, which includes a disparity error analysis, a search range suggestion, and a disparity gradient limit, are investigated and discussed. Some parameters, such as percentile constraint, sampling interval, and subpixel compensation proper for use in this approach are suggested. Experiments have shown the feasibility of the proposed method.