Automatic Upright Adjustment of Photographs

Hyunjoon Lee1 Eli Shechtman2 Jue Wang2 Seungyong Lee1
1POSTECH                2Adobe

In Proc. Computer Vision and Pattern Recognition (CVPR) 2012

Upright adjustment results. Note that both original and results are cropped to have the same size.


Man-made structures often appear to be distorted in photos captured by casual photographers, as the scene layout often conflicts with how it is expected by human perception. In this paper we propose an automatic approach for straightening up slanted man-made structures in an input image to improve its perceptual quality. We call this type of correction upright adjustment. We propose a set of criteria for upright adjustment based on human perception studies, and develop an optimization framework which yields an optimal homography for adjustment. We also develop a new optimization-based camera calibration method that performs favorably to previous methods and allows the proposed system to work reliably for a wide variety of images. The effectiveness of our system is demonstrated by both quantitative comparisons and qualitative user studies.

PDF, 6.08MB
Supp. Material
ZIP, 19.9MB
Code (calibration only)
ZIP, 18.1MB


  author = {Hyunjoon Lee and Eli Shechtman and Jue Wang and Seungyong Lee},
  title = {Automatic Upright Adjustment of Photographs},
  booktitle = {Proc.\ CVPR 2012},
  year = {2012},
  pages = {877--884}


Matlab source code for single image camera calibration is available.