Fast and accurately extracting the centre line of light stripe of image is one of the most important problems of 3D measurement based on line-structure light. A new centre extracted method that combined the alterable direction template with barycenter method was proposed for the implementation of real-time image processing. First, the threshold of laser stripe was computed by the host computer and laser stripe was determined in real time by the neighbor attribute of grey level of pixel. Second, the sketch was obtained by thinning the light of stripe and pruning the branch. Third, the normal direction of the point on the sketch line was computed by using the alterable direction template. Finally, the centre-line of light was detected by using barycenter method. It has been proved by examination that this method can efficiently extracted the centre-line of light stripe.