There are a lot of burrs and branches after thinning the binary image of the light stripe, which will heavily affect the accuracy of the line-structure-light 3D shape measurement, so burrs and branches must be cut at first. A new pruning algorithm based on curve tracing was proposed, which can follow the backbone of the light stripe to find out the branches, and then eliminates branches and produce a high quality skeleton. The experimental results showed this algorithm can cut the branches and remove the false characters more rapidly and effectively, and lead to a good 3D reconstruction result.