Counting of finished products such as rebars and steel pipes is the last step in production process. At present, the count of bundled rebars is accomplished by manual in many factories. The work is so boring, labor-consuming and low accuracy and leaves a lot of trouble to selling. The company can not get economic benefit of negative tolerance rolling using the way of selling rebars by weight. So developing counting system of bundled rebars is greatly significant.The paper makes image processing and target recognition as basis, and target recognition and statistics of rebars end image as purpose, then finishes counting algorithm which can realize application of target recognition in system by Matlab. This paper includes image preprocessing, segmentation and statistics. Firstly, this paper analyses carefully the characteristics of the end image of bundled rebars under complex condition. Its characteristics are cross stack, differences of shape and color, uneven illumination and adhesion, etc. Preprocessing algorithm of double filter is proposed with image enhancement. This method can greatly improve the overall contrast, weaken the noise and provide necessary condition for image segmentation. Secondly, according to the characteristics of end images, this paper puts forward Otsu algorithm which is improved from threshold searching scope and threshold criterion. Compared with classical methods, its segmentation effect is best and the problem of mild adhesion can be solved with mathematical morphology. Finally, on the basis of connected regions labeling, rebar recognition algorithm is proposed based on center point extraction in the stage of recognition and statistics. The method realizes recognition and statistics of the bundled rebars. In addition, if the marked image has missing, multiple and wrong choice, tag and remove manually are adopted.Through simulation and test of Matlab, the result shows that the algorithm in this paper is intuitive and efficient, and its adaptive force is high. |