In this paper, we propose an automatic banknote stain detection method based on brightness ratio analysis. The method uses median filtering, edge detection and connected component analysis. A median filter was used to eliminate small differences such as serial numbers. The brightness difference between a reference banknote and a target banknote was normalized by using the average brightness and the maximum brightness ratio. Sobel edge detection was used to remove differences created by slight mismatches in the edge areas. After applying a thresholding operation to the difference image, connected component analysis was used to remove spurious stain areas.
Jiho Yoon, Sangwook Baek, Euisun Choi, Hyunji Jo, Chulhee Lee, "Automatic Banknote Stain Detection" in Proc. IS&T Int’l. Symp. on Electronic Imaging: Image Processing: Algorithms and Systems XVI, 2018, pp 307-1 - 307-4, https://doi.org/10.2352/ISSN.2470-1173.2018.13.IPAS-307