Skip to main content

Removing Shadows from Images of Documents

  • Conference paper
  • First Online:
Computer Vision – ACCV 2016 (ACCV 2016)

Part of the book series: Lecture Notes in Computer Science ((LNIP,volume 10113))

Included in the following conference series:

Abstract

In this work, we automatically detect and remove distracting shadows from photographs of documents and other text-based items. Documents typically have a constant colored background; based on this observation, we propose a technique to estimate background and text color in local image blocks. We match these local background color estimates to a global reference to generate a shadow map. Correcting the image with this shadow map produces the final unshadowed output. We demonstrate that our algorithm is robust and produces high-quality results, qualitatively and quantitatively, in both controlled and real-world settings containing large regions of significant shadow.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    We exclude Acrobat “Enhance” from the table as it requires manual interaction for each image.

  2. 2.

    The DIBCO 2013 dataset provides ground truth images to evaluate the performance of binarization algorithms. Furthermore, almost all of the images in this dataset are already shadow-free, so we report PSNR on just a single example containing shadow.

References

  1. Guo, R., Dai, Q., Hoiem, D.: Paired regions for shadow detection and removal. IEEE Trans. Pattern Anal. Mach. Intell. 35, 2956–2967 (2013)

    Article  Google Scholar 

  2. Gong, H., Cosker, D.: Interactive shadow removal and ground truth for variable scene categories. In: Proceedings of the British Machine Vision Conference. BMVA Press (2014)

    Google Scholar 

  3. Gryka, M., Terry, M., Brostow, G.J.: Learning to remove soft shadows. ACM Trans. Graph. 34(5), 153:1–153:15 (2015)

    Article  Google Scholar 

  4. Zhao, Q., Tan, P., Dai, Q., Shen, L., Wu, E., Lin, S.: A closed-form solution to retinex with non-local texture constraints. PAMI 34(7), 1437–1444 (2012)

    Article  Google Scholar 

  5. Yang, Q., Tan, K.H., Ahuja, N.: Shadow removal using bilateral filtering. IEEE Trans. Image Process. 21, 4361–4368 (2012)

    Article  MathSciNet  Google Scholar 

  6. Bell, S., Bala, K., Snavely, N.: Intrinsic images in the wild. ACM Trans. Graph. (SIGGRAPH) 33(4), 159:1–159:12 (2014)

    Article  Google Scholar 

  7. Barron, J.T., Malik, J.: Shape, illumination, and reflectance from shading. TPAMI 37(8), 1670–1687 (2015)

    Article  Google Scholar 

  8. Zhou, T., Krahenbuhl, P., Efros, A.A.: Learning data-driven reflectance priors for intrinsic image decomposition, pp. 3469–3477 (2015)

    Google Scholar 

  9. Sunkavalli, K., Matusik, W., Pfister, H., Rusinkiewicz, S.: Factored time-lapse video. ACM Trans. Graph. 26 (2007). Proceedings of the SIGGRAPH

    Google Scholar 

  10. Abrams, A., Hawley, C., Pless, R.: Heiometric stereo: shape from sun position. In: European Conference on Computer Vision (ECCV) (2012)

    Google Scholar 

  11. Brown, M.S., Tsoi, Y.C.: Geometric and shading correction for images of printed materials using boundary. Trans. Img. Proc. 15, 1544–1554 (2006)

    Article  Google Scholar 

  12. Zhang, L., Yip, A.M., Tan, C.L.: Removing shading distortions in camera-based document images using inpainting and surface fitting with radial basis functions. In: 9th International Conference on Document Analysis and Recognition, ICDAR 2007, 23–26 September, Curitiba, Paraná, Brazil, pp. 984–988 (2007)

    Google Scholar 

  13. Oliveira, D.M., Lins, R.D., França Pereira e Silva, G.: Shading removal of illustrated documents. In: Kamel, M., Campilho, A. (eds.) ICIAR 2013. LNCS, vol. 7950, pp. 308–317. Springer, Heidelberg (2013). doi:10.1007/978-3-642-39094-4_35

    Chapter  Google Scholar 

  14. Acrobat, A.: Enhance document photos captured using a mobile camera (2016). https://helpx.adobe.com/acrobat/using/enhance-camera-images.html

  15. Otsu, N.: A threshold selection method from gray-level histograms. Automatica 11, 23–27 (1975)

    Google Scholar 

  16. Pal, N.R., Pal, S.K.: A review on image segmentation techniques. Patt. Recogn. 26, 1277–1294 (1993)

    Article  Google Scholar 

  17. Sauvola, J., Pietikäinen, M.: Adaptive document image binarization. Patt. Recogn. 33, 225–236 (2000)

    Article  Google Scholar 

  18. Pilu, M., Pollard, S.: A light-weight text image processing method for handheld embedded cameras (2002)

    Google Scholar 

  19. Shi, Z., Govindaraju, V.: Historical document image enhancement using background light intensity normalization. In: 2004 Proceedings of the 17th International Conference on Pattern Recognition, ICPR 2004, vol. 1, pp. 473–476. IEEE (2004)

    Google Scholar 

  20. Gatos, B., Pratikakis, I., Perantonis, S.J.: Adaptive degraded document image binarization. Patt. Recogn. 39, 317–327 (2006)

    Article  MATH  Google Scholar 

  21. Wagdy, M., Faye, I., Rohaya, D.: Fast and efficient document image clean up and binarization based on retinex theory. In: 2013 IEEE 9th International Colloquium on Signal Processing and its Applications (CSPA), pp. 58–62. IEEE (2013)

    Google Scholar 

  22. Su, B., Lu, S., Tan, C.L.: Robust document image binarization technique for degraded document images. IEEE Trans. Image Process. 22, 1408–1417 (2013)

    Article  MathSciNet  Google Scholar 

  23. Pratikakis, I., Gatos, B., Ntirogiannis, K.: ICDAR 2013 document image binarization contest (DIBCO 2013). In: 2013 12th International Conference on Document Analysis and Recognition (ICDAR), pp. 1471–1476. IEEE (2013)

    Google Scholar 

Download references

Acknowledgement

This work was supported in part by NSF awards IIS-1321168 and RI-1619376 and by a gift from Adobe. We thank Daniel Oliveira for providing code to run comparisons. The images in Figs. 3, 5 and 6 were used through the Creative Commons 2.0 License without modification. The title and photographers from Flickr (unless otherwise noted) in order of appearance are: Open Textbook Summit 2014 by BCcampus_News, Army in the Shadows, Army in the Light by Cuzco84, That Please by Kimli, Medieval text in the Christ Church Archive by -JvL-, Untitled by Jacek.NL, Cartmel Priory by Rosscophoto, Transfer Damaged Textbook by Enokson, Untitled by Colin Manuel, find by PHIL, Declaration of Independence photo by taliesin at Morguefile.com (Morguefile License), and Momofuku - Menu w/ Shadow puppets by Lawrence. Please see supplementary materials for links to the images and license.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Steve Bako .

Editor information

Editors and Affiliations

1 Electronic supplementary material

Below is the link to the electronic supplementary material.

Supplementary material 1 (pdf 10315 KB)

Rights and permissions

Reprints and permissions

Copyright information

© 2017 Springer International Publishing AG

About this paper

Cite this paper

Bako, S., Darabi, S., Shechtman, E., Wang, J., Sunkavalli, K., Sen, P. (2017). Removing Shadows from Images of Documents. In: Lai, SH., Lepetit, V., Nishino, K., Sato, Y. (eds) Computer Vision – ACCV 2016. ACCV 2016. Lecture Notes in Computer Science(), vol 10113. Springer, Cham. https://doi.org/10.1007/978-3-319-54187-7_12

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-54187-7_12

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-54186-0

  • Online ISBN: 978-3-319-54187-7

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics