| Nowadays in the Banknote printing industry, the mechanical counting machine is widely used. However, this kind of machine is noisy, may damage the edge of the banknotes and can not be assembled in the automation line. In this thesis, we propose an online banknote counting algorithm. This kind of non-touching counting mode is quiet, will not damage the banknote and can used in the automation line, which will have a bright future.After contrasting with and analyzing the current non-touching counting system, the author proposes an accurate and robust algorithm. The algorithms include 4 steps: preprocessing, segmentation, post-processing and counting. The preprocessing contains extraction of the sub image and foreground, noisy reduction. The thesis discusses 3 methods: Median filter, Morphology filter and Mean filter for noisy reduction. Improved Mean filter will lose some edge information, but enhance the striated character and make the edge smooth. Gabor filter is used to enhance the image and combined with the p-tile thresholding to get rid of the noisy striation. The p-tile thresholding is proposed based on the number of a pile of banknotes. The Directional filter and optimized filter is also discussed and compared in the thesis. The post-processing is based on the character of the striation to deal with the banknote whose width is not in the normal range. In order to improve the robustness, 3 sub images of every picture is processed to vote for the final result.According to the experiment, the proposed algorithm is robust and has a good result even if the edge of the banknotes is curved or coarse. The precision of the algorithm is very high. |