Skip to main content

Removing Shadows from Images of Documents

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

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.

Keywords

  • Document Image
  • Background Color
  • Shadow Region
  • Binarization Method
  • Ground Truth Image

These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

This is a preview of subscription content, access via your institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • DOI: 10.1007/978-3-319-54187-7_12
  • Chapter length: 11 pages
  • Instant PDF download
  • Readable on all devices
  • Own it forever
  • Exclusive offer for individuals only
  • Tax calculation will be finalised during checkout
eBook
USD   64.99
Price excludes VAT (USA)
  • ISBN: 978-3-319-54187-7
  • Instant PDF download
  • Readable on all devices
  • Own it forever
  • Exclusive offer for individuals only
  • Tax calculation will be finalised during checkout
Softcover Book
USD   84.99
Price excludes VAT (USA)
Fig. 1.
Fig. 2.
Fig. 3.
Fig. 4.
Fig. 5.
Fig. 6.

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)

    CrossRef  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)

    CrossRef  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)

    CrossRef  Google Scholar 

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

    MathSciNet  CrossRef  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)

    CrossRef  Google Scholar 

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

    CrossRef  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)

    CrossRef  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

    CrossRef  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)

    CrossRef  Google Scholar 

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

    CrossRef  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)

    CrossRef  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)

    MathSciNet  CrossRef  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)