A single-layer recurrent neural network is proposed to perform thinning of binary images. This network iteratively removes the contour points of an object shape by template matching. The set of templates is specially designed for a one-pass parallel thinning algorithm. The proposed neural network produce the same results as the algorithm. Neurons in the neural network performs a sigma-pi function to collect inputs. To obtain this function, the templates used in the algorithm are transformed to equivalent Boolean expressions. After the neural network converges, a perfectly 8-connected skeleton is derived. Good experimental results show the feasibility of the proposed approach.