Image thinning with a cellular neural network