Local Water-Filling Algorithm for Shadow Detection and Removal of Document Images
Abstract
:1. Introduction
2. The Proposed Method
2.1. Local Water-Filling Algorithm
2.2. Separate Umbra and Penumbra
2.3. Umbra Enhancement
2.4. Local Binarized Water-Filling
Algorithm 1 Algorithm of removing shadows from a document image. |
Input: A document image with shadows: I. |
Output: An unshadowed image: . |
|
3. Experimental Analysis
3.1. Dataset
3.2. Evaluation Metrics
3.3. Comparisons with the State-of-the-Art Methods
3.3.1. Quantitative Comparison
3.3.2. Visual Results
3.3.3. In Comparison with a Deep Learning Method
4. Conclusions
Author Contributions
Funding
Acknowledgments
Conflicts of Interest
References
- Lynch, D.K. Shadows. Appl. Opt. 2015, 54, B154–B164. [Google Scholar] [CrossRef] [PubMed]
- Ibarra-Arenado, M.J.; Tjahjadi, T.; Pérez-Oria, J. Shadow detection in still road images using chrominance properties of shadows and spectral power distribution of the illumination. Sensors 2020, 20, 1012. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Dong, K.; Muhammad, A.; Kang, P. Convolutional Neural Network-Based Shadow Detection in Images Using Visible Light Camera Sensor. Sensors 2018, 18, 960. [Google Scholar]
- Amin, B.; Riaz, M.M.; Ghafoor, A. Automatic shadow detection and removal using image matting. Signal Process. 2020, 170, 107415. [Google Scholar] [CrossRef]
- Hu, X.; Zhu, L.; Fu, C.; Qin, J.; Heng, P. Direction-aware spatial context fea-tures for shadow detection. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Salt Lake City, UT, USA, 18–22 June 2018; pp. 7454–7462. [Google Scholar]
- Wang, B.; Chen, C.L. Optical reflection invariant-based method for moving shadows removal. Opt. Eng. 2018, 57, 093102. [Google Scholar] [CrossRef]
- Lee, G.B.; Lee, M.J.; Lee, W.K.; Park, J.H.; Kim, T.H. Shadow detection based on regions of light sources for object extraction in nighttime video. Sensors 2017, 17, 659. [Google Scholar] [CrossRef] [Green Version]
- Manuel, I.A.; Tardi, T.; Juan, P.-O.; Sandra, R.-G.; Agustín, J.-A. Shadow-based vehicle detection in urban traffic. Sensors 2017, 17, 975. [Google Scholar]
- Michael, S.B.; Yau-Chat, T. Geometric and shading correction for images of printed materials using boundary. IEEE Trans. Image Process. 2006, 15, 1544–1554. [Google Scholar]
- Zhang, L.; Yip, A.; Brown, M.; Tan, C.L. A unified framework for document restoration using inpainting and shape-from-shading. Pattern Recognit. 2009, 42, 2961–2978. [Google Scholar] [CrossRef]
- Kligler, N.; Katz, S.; Tal, A. Document enhancement using visibility detection. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Salt Lake City, UT, USA, 18–22 June 2018; pp. 2374–2382. [Google Scholar]
- Feng, S.; Chen, C.P. Fuzzy broad learning system: A novel neuro-fuzzy model for regression and classification. IEEE Trans. Cybern. 2020, 50, 414–424. [Google Scholar] [CrossRef]
- Alotaibi, F.; Abdullah, M.T.; Abdullah, R.B.H.; Rahmat, R.W.B.O.K.; Hashem, I.A.T.; Sangaiah, A.K. Optical character recognition for quranic image similarity matching. IEEE Access 2017, 6, 554–562. [Google Scholar] [CrossRef]
- Bako, S.; Darabi, S.; Shechtman, E.; Wang, J.; Sen, P. Removing shadows from images of documents. In Proceedings of the IEEE Conference on Asian Conference on Computer Vision, Taipei, Taiwan, 20–24 November 2016; pp. 173–183. [Google Scholar]
- Chen, X.; Lin, L.; Gao, Y. Parallel nonparametric binarization for degraded document images. Neurocomputing 2016, 189, 43–52. [Google Scholar] [CrossRef]
- Feng, S. A novel variational model for noise robust document image binarization. Neurocomputing 2019, 325, 288–302. [Google Scholar] [CrossRef]
- Michalak, H.; Okarma, K. Fast Binarization of Unevenly Illuminated Document Images Based on Background Estimation for Optical Character Recognition Purposes. J. Univers. Comput. Sci. 2019, 25, 627–646. [Google Scholar]
- Xu, L.; Wang, Y.; Li, X.; Pan, M. Recognition of Handwritten Chinese Characters Based on Concept Learning. IEEE Access 2019, 7, 102039–102053. [Google Scholar] [CrossRef]
- Ma, L.; Long, C.; Duan, L.; Zhang, X.; Zhao, Q. Segmentation and Recognition for Historical Tibetan Document Images. IEEE Access 2020, 8, 52641–52651. [Google Scholar] [CrossRef]
- Bradley, D.; Roth, G. Adaptive thresholding using the integral image. J. Graph. Tools 2007, 12, 13–21. [Google Scholar] [CrossRef]
- Shah, V.; Gandhi, V. An iterative approach for shadow removal in document images. In Proceedings of the IEEE Conference on International Acoustics, Speech and Signal Processing, Calgary, AB, Canada, 15–20 April 2018; pp. 1892–1896. [Google Scholar]
- Howe, N. Document binarization with automatic parameter tuning. Int. J. Doc. Anal. Recognit. 2013, 16, 247–258. [Google Scholar] [CrossRef] [Green Version]
- Su, B.; Lu, S.; Tan, C. Robust document image binarization technique for degraded document images. IEEE Trans. Image Process. 2012, 22, 1408–1417. [Google Scholar]
- Jung, S.; Hasan, M.A.; Kim, C. Water-Filling: An Efficient Algorithm for Digitized Document Shadow Removal. In Proceedings of the IEEE Conference on Asian Conference on Computer Vision, Perth, Australia, 2–6 December 2018; pp. 398–414. [Google Scholar]
- Zhang, J.; Cao, Y.; Fang, S.; Kang, Y.; Wen, C. Fast haze removal for nighttime image using maximum reflectance prior. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Honolulu, HI, USA, 22–25 July 2017; pp. 7418–7426. [Google Scholar]
- Zhang, J.; Cao, Y.; Wang, Y.; Wen, C.; Chen, C.W. Fully point-wise convolutional neural network for modeling statistical regularities in natural images. In Proceedings of the ACM International Conference on Multimedia, Seoul, Korea, 22–26 October 2018; pp. 984–992. [Google Scholar]
- Barron, J.; Tsai, T.Y. Fast fourier color constancy. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Honolulu, HI, USA, 22–25 July 2017; pp. 886–894. [Google Scholar]
- Barron, J. Convolutional color constancy. In Proceedings of the IEEE International Conference on Computer Vision, Santiago, Chile, 13–16 December 2015; pp. 379–387. [Google Scholar]
- Nguyen, V.; Yago Vicente, T.F.; Zhao, M.; Hoai, M.; Samaras, D. Shadow detection with conditional generative adversarial networks. In Proceedings of the IEEE International Conference on Computer Vision, Venice, Italy, 22–29 October 2017; pp. 4510–4518. [Google Scholar]
- Wang, J.; Li, X.; Yang, J. Stacked conditional generative adversarial networks for jointly learning shadow detection and shadow removal. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Salt Lake City, UT, USA, 18–22 June 2018; pp. 1788–1797. [Google Scholar]
- Maltezos, E.; Doulamis, A.; Ioannidis, C. Improving the visualisation of 3D textured models via shadow detection and removal. In Proceedings of the IEEE 9th International Conference on Virtual Worlds and Games for Serious Applications (VS-Games), Athens, Greece, 6–8 September 2017; pp. 161–164. [Google Scholar]
- Chai, D.; Newsam, S.; Zhang, H.K.; Qiu, Y.; Huang, J. Cloud and cloud shadow detection in Landsat imagery based on deep convolutional neural networks. Remote Sens. Environ. 2019, 225, 307–316. [Google Scholar] [CrossRef]
- Oliveira, D.M.; Lins, R.D.; Silva, G.F. Shading removal of illustrated documents. In Proceedings of the International Conference on Image Analysis and Recognition, Aveiro, Portugal, 26–28 June 2013; pp. 308–317. [Google Scholar]
- Zhang, L.; Yip, A.; Tan, C.L. Removing shading distortions in camera-based document images using inpainting and surface fitting with radial basis functions. In Proceedings of the International Conference on Document Analysis and Recognition, Curitiba, Brazil, 23–26 September 2007; pp. 984–988. [Google Scholar]
- Xu, Y.; Wen, J.; Fei, L.; Zhang, Z. Review of video and image defogging algorithms and related studies on image restoration and enhancement. IEEE Access 2015, 4, 165–188. [Google Scholar] [CrossRef]
- Xie, Z.; Huang, Y.; Jin, L.; Liu, Y.; Zhu, Y.; Gao, L. Weakly supervised precise segmentation for historical document images. Neurocomputing 2019, 350, 271–281. [Google Scholar] [CrossRef]
- Wang, J.; Chuang, Y. Shadow Removal of Text Document Images By Estimating Local and global Background Colors. In Proceedings of the International Conference on Acoustics, Speech and Signal Processing, Barcelona, Spain, 4–8 May 2020; pp. 1534–1538. [Google Scholar]
- Cun, X.; Pun, C.M.; Shi, C. Towards Ghost-free Shadow Removal via Dual Hierarchical Aggregation Network and Shadow Matting GAN. In Proceedings of the AAAI Conference on Artificial Intelligence, New York, NY, USA, 7–12 February 2020. [Google Scholar]
- Alnefaie, A.; Gupta, D.; Bhuyan, M.; Razzak, I.; Gupta, P.; Prasad, M. End-to-End Analysis for Text Detection and Recognition in Natural Scene Images. In Proceedings of the International Joint Conference on Neural Networks, Glasgow, UK, 19–24 July 2020. [Google Scholar]
- Wang, B.; Chen, C.L. Moving cast shadows segmentation using illumination invariant feature. IEEE Trans. Multimed. 2019, 22, 2221–2233. [Google Scholar] [CrossRef]
- Vincent, L.; Soille, P. Watersheds in digital spaces: An efficient algorithm based on immersion simulations. IEEE Trans. Pattern Anal. Mach. Intell. 1991, 6, 583–589. [Google Scholar] [CrossRef] [Green Version]
- Roerdink, J.B.; Meijster, A. Watershed transform: Definitions, algorithms and parallelization strategies. Fundam. Inform. 2000, 41, 187–228. [Google Scholar] [CrossRef] [Green Version]
- Land, E.; McCannJ, J. Lightness and retinex theory. Josa 1971, 61, 1–11. [Google Scholar] [CrossRef]
- Gong, H.; Cosker, D. Interactive Shadow Removal and Ground Truth for Variable Scene Categories. In Proceedings of the British Machine Vision Conference, Nottingham, UK, 1–5 September 2014; pp. 1–11. [Google Scholar]
- Wang, Z.; Bovik, A.; Sheikh, H.; Simoncelli, E. Image quality assessment: From error visibility to structural similarity. IEEE Trans. Image Process. 2004, 13, 600–612. [Google Scholar] [CrossRef] [Green Version]
Evaluation Metric | MSE | Error Ratio | SSIM |
---|---|---|---|
Kligler et al. [11] | 2062.2 | 2.9489 | 0.802 |
Jung et al. [24] | 9167.0 | 6.2104 | 0.683 |
Ours | 105.8 | 0.6385 | 0.927 |
Evaluation Metric | MSE | Error Ratio | SSIM |
---|---|---|---|
Kligler et al. [11] | 517.6 | 0.5641 | 0.878 |
Jung et al. [24] | 1287.3 | 0.8980 | 0.861 |
Ours | 158.2 | 0.3059 | 0.885 |
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2020 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).
Share and Cite
Wang, B.; Chen, C.L.P. Local Water-Filling Algorithm for Shadow Detection and Removal of Document Images. Sensors 2020, 20, 6929. https://doi.org/10.3390/s20236929
Wang B, Chen CLP. Local Water-Filling Algorithm for Shadow Detection and Removal of Document Images. Sensors. 2020; 20(23):6929. https://doi.org/10.3390/s20236929
Chicago/Turabian StyleWang, Bingshu, and C. L. Philip Chen. 2020. "Local Water-Filling Algorithm for Shadow Detection and Removal of Document Images" Sensors 20, no. 23: 6929. https://doi.org/10.3390/s20236929