Automatic recognition of numerals via Fourier shape descriptors and boundary line encodings