Image Orientation Estimation with Convolutional Networks

  • Philipp Fischer
  • Alexey Dosovitskiy
  • Thomas Brox
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 9358)


Rectifying the orientation of scanned documents has been an important problem that was solved long ago. In this paper, we focus on the harder case of estimating and correcting the exact orientation of general images, for instance, of holiday snapshots. Especially when the horizon or other horizontal and vertical lines in the image are missing, it is hard to find features that yield the canonical orientation of the image. We demonstrate that a convolutional network can learn subtle features to predict the canonical orientation of images. In contrast to prior works that just distinguish between portrait and landscape orientation, the network regresses the exact orientation angle. The approach runs in real-time and, thus, can be applied also to live video streams.


  1. 1.
    Microsoft COCO dataset.
  2. 2.
    Ávila, B.T., Lins, R.D.: A fast orientation and skew detection algorithm for monochromatic document images. In: Proceedings of the 2005 ACM Symposium on Document Engineering, pp. 118–126 (2005)Google Scholar
  3. 3.
    Chen, S.S., Haralick, R.M.: An automatic algorithm for text skew estimation in document images using recursive morphological transforms. In: ICIP, pp. 139–143 (1994)Google Scholar
  4. 4.
    Eigen, D., Puhrsch, C., Fergus, R.: Depth map prediction from a single image using a multi-scale deep network. In: NIPS (2014)Google Scholar
  5. 5.
    Fefilatyev, S., Smarodzinava, V., Hall, L.O., Goldgof, D.B.: Horizon detection using machine learning techniques. In: ICMLA, pp. 17–21 (2006)Google Scholar
  6. 6.
    Jia, Y., Shelhamer, E., Donahue, J., Karayev, S., Long, J., Girshick, R., Guadarrama, S., Darrell, T.: Caffe: Convolutional architecture for fast feature embedding. arXiv preprint (2014). arXiv:1408.5093
  7. 7.
    Kingma, D.P., Ba, J.: Adam: A method for stochastic optimization. In: ICLR (2015).
  8. 8.
    Krizhevsky, A., Sutskever, I., Hinton, G.E.: Imagenet classification with deep convolutional neural networks. In: NIPS, pp. 1106–1114 (2012)Google Scholar
  9. 9.
    Kwag, H.K., Kim, S.H., Jeong, S.H., Lee, G.S.: Efficient skew estimation and correction algorithm for document images. Image Vis. Comput. 20(1), 25–35 (2002)CrossRefGoogle Scholar
  10. 10.
    Lipschutz, I., Gershikov, E., Milgrom, B.: New methods for horizon line detection in infrared and visible sea images. Int. J. Comput. Eng. Res. 3(3) (2013).
  11. 11.
    Motl, J.: Straighten image function in Matlab Central.
  12. 12.
    Osadchy, M., LeCun, Y., Miller, M.L.: Synergistic face detection and pose estimation with energy-based models. J. Mach. Learn. Res. 8, 1197–1215 (2007)Google Scholar
  13. 13.
    Peake, G.S., Tan, T.N.: A general algorithm for document skew angle estimation. In: ICIP, vol. 2, pp. 230–233 (1997)Google Scholar
  14. 14.
    Pingali, G.S., Zhao, L., Carlbom, I.: Real-time head orientation estimation using neural networks. In: ICIP, pp. 297–300 (2002)Google Scholar
  15. 15.
    Solanki, K., Madhow, U., Manjunath, B.S., Chandrasekaran, S.: Estimating and undoing rotation for print-scan resilient data hiding. In: ICIP, pp. 39–42 (2004)Google Scholar
  16. 16.
    Sun, C., Si, D.: Skew and slant correction for document images using gradient direction. In: 4th International Conference Document Analysis and Recognition (ICDAR 1997), pp. 142–146 (1997)Google Scholar
  17. 17.
    Vailaya, A., Zhang, H., Member, S., Yang, C., Liu, F.I., Jain, A.K.: Automatic image orientation detection. IEEE Trans. Image Process. 11(7), 600–604 (2002)CrossRefGoogle Scholar
  18. 18.
    Voit, M., Nickel, K., Stiefelhagen, R.: Neural network-based head pose estimation and multi-view fusion. In: Stiefelhagen, R., Garofolo, J.S. (eds.) CLEAR 2006. LNCS, vol. 4122, pp. 291–298. Springer, Heidelberg (2007) CrossRefGoogle Scholar
  19. 19.
    Wang, Y.M., Zhang, H.: Detecting image orientation based on low-level visual content. Comput. Vis. Image Underst. 93(3), 328–346 (2004)CrossRefGoogle Scholar
  20. 20.
    Wei, W., Wang, S., Zhang, X., Tang, Z.: Estimation of image rotation angle using interpolation-related spectral signatures with application to blind detection of image forgery. Trans. Info. For. Sec. 5(3), 507–517 (2010)CrossRefGoogle Scholar
  21. 21.
    Yan, H.: Skew correction of document images using interline cross-correlation. CVGIP: Graph. Model Image Process. 55(6), 538–543 (1993)Google Scholar

Copyright information

© Springer International Publishing Switzerland 2015

Open Access This chapter is licensed under the terms of the Creative Commons Attribution-NonCommercial 2.5 International License (, which permits any noncommercial use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made.

The images or other third party material in this chapter are included in the chapter's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.

Authors and Affiliations

  • Philipp Fischer
    • 1
  • Alexey Dosovitskiy
    • 1
  • Thomas Brox
    • 1
  1. 1.Department of Computer ScienceUniversity of FreiburgFreiburg im BreisgauGermany

Personalised recommendations