Abstract:To solve the problems of local exposure, fracture and distortion of printed characters, and background pollution in natural environment during character recognition, a character image recognition algorithm combining block processing and convolution neural network (CNN) is proposed. Firstly, using the OpenCV library, the printed characters on the surface of product parts were preprocessed by block processing, gamma operation and parameter adjustment, and the local exposure and character breaking of images were preliminarily solved. Secondly, in order to obtain a single character image, the image processed in the early stage is multiple segmented by the mathematical morphology algorithm, so as to remove the useless information between characters. Finally, the API provided by Keras for character recognition was used to build CNN model. After over 100 characters recognition training, the accuracy rate was as high as 96.9%, the model provides a reliable basis for character recognition in automatic production of an auto parts.