Feature extraction method for character recognition