Today , handwritten digits recognition plays a pivotal role in industrial applications . Despite lots of researches have been conducted in this field , it is still a state of the art research line . In general , a handwritten digit recognition system consists of binarization , discrimination , feature extraction , and ltr" In this thesis , various algorithms of handwritten digit recognition is analyzed in order to propose a suitable method for automatic handwritten digit recognition of slabs in Isfahan Steel Co . These images have noisy non-uniform background and digits are destructed by sagging of the color . Therefore , by analyzing various binarization methods , a K-means cluster based algorithm which has higher accuracy than Otsu , Niblack , Sauvola , and multi-scale grid-based Sauvola was utilized in our method . In addition , by using preprocessing methods , shadow removal , sagging elimination and post processing , the quality of digits and their complex background improves which leads to more convenient digit segmentation . For classification of data , a sparse representation based classifier is proposed . The accuracy of proposed algorithm is 98.95% for MNIST standard database and 81.17 % for Isfahan Steel Co . database . Keywords: handwritten digit recognition, slab,binarization, segmentation, feature vector, classification.