Real-time content-aware image resizing

  • Hua HuangEmail author
  • TianNan Fu
  • Paul L. Rosin
  • Chun Qi


Content-aware image resizing is a kind of new and effective approach for image resizing, which preserves image content well and does not cause obvious distortion when changing the aspect ratio of images. Recently, a seam based approach for content-aware image resizing was proposed by Avidan and Shamir. Their results are impressive, but because the method uses dynamic programming many times, it is slow. In this paper, we present a more efficient algorithm for seam based content-aware image resizing, which searches seams through establishing the matching relation between adjacent rows or columns. We give a linear algorithm to find the optimal matches within a weighted bipartite graph composed of the pixels in adjacent rows or columns. Therefore, our method is fast (e.g. our method needs only about 100 ms to reduce a 768 × 1024 image’s width to 1/3 while Avidan and Shamir’s method needs 12 s). This supports immediate image resizing whereas Avidan and Shamir’s method requires a more costly pre-processing step to enable subsequent real-time processing. A fast method such as the one proposed will be also needed for future real-time video resizing applications.


content aware image resizing video resizing real time matching 


  1. 1.
    Itti L, Koch C, Niebur E. A model of saliency-based visual attention for rapid scene analysis. IEEE Trans Patt Anal Mach Intell, 1998, 20(11): 1254–1259CrossRefGoogle Scholar
  2. 2.
    Sue B, Ling H, Bederson B, et al. Automatic thumbnail cropping and its effectiveness. In: Proceedings of User Interface Software and Technology, 2003. 95–104Google Scholar
  3. 3.
    Chen L, Xie X, Fan X, et al. A visual attention model for adapting images on small displays. Multimedia Syst, 2003, 9(4): 353–364CrossRefGoogle Scholar
  4. 4.
    Ciocca G, Cusano C, Gasparini F, et al. Self-adaptive image cropping for small displays. IEEE Trans Consumer Electr, 2007, 53(4): 1622–1627CrossRefGoogle Scholar
  5. 5.
    Santella A, Agrawala M, DeCarlo D, et al. Gaze-based interaction for semi-automatic photo cropping. In: Proceedings of Human Factors in Computing Systems, 2006. 771–780Google Scholar
  6. 6.
    Liu F, Gleicher M. Automatic image retargeting with fisheyeview warping. In: Proceedings of User Interface Software and Technology, 2005. 153–162Google Scholar
  7. 7.
    Setlur V, Lechner T, Nienhaus M, et al. Retargeting images and video for preserving information saliency. IEEE Comput Graph Appl, 2007, 27(5): 80–88CrossRefGoogle Scholar
  8. 8.
    Avidan S, Shamir A. Seam carving for content-aware image resizing, ACM Trans Graph (SIGGRAPH), 2007, 26(3): 10–18CrossRefGoogle Scholar
  9. 9.
    Kuhn H. The Hungarian method for the assignment problem. Naval Research Logist Quarterly, 1955, 2: 83–97CrossRefMathSciNetGoogle Scholar
  10. 10.
    Rubinstein M, Shamir A, Avidan S. Improved seam carving for video retargeting. ACM Trans Graph (SIGGRAPH), 2008, 27(3): 1–9CrossRefGoogle Scholar
  11. 11.
    Zhang Y F, Hu S M, Martin R R. Shrinkability maps for content-aware video resizing. Comput Graph Forum, 2008, 27(7): 1797–1804CrossRefGoogle Scholar

Copyright information

© Science in China Press and Springer-Verlag GmbH 2009

Authors and Affiliations

  • Hua Huang
    • 1
    Email author
  • TianNan Fu
    • 1
  • Paul L. Rosin
    • 2
  • Chun Qi
    • 1
  1. 1.School of Electronics and Information EngineeringXi’an Jiaotong UniversityXi’anChina
  2. 2.School of Computer ScienceCardiff UniversityCardiffUK

Personalised recommendations