Algorithm to detect photo orientation

后端 未结 3 1036
独厮守ぢ
独厮守ぢ 2020-12-23 14:34

I would like to rotate photos automatically, even when EXIF metadata about the image orientation is not available.

Are there any good algorithms for detecting the or

相关标签:
3条回答
  • 2020-12-23 14:46

    I could only find http://sourceforge.net/projects/rotator/.

    I used a test set of holiday photos comprising 70 pictures with about 18 requiring rotation.

    After processing with the default settings, there were 20 that were either rotated or not rotated in error.

    Not so great a result.

    0 讨论(0)
  • 2020-12-23 14:59

    Many photographs from consumer digital cameras are of people, which could be used for orientation. Face detection is a well-studied research area. Basic face detection would give you a rectangle whose longer side should be the vertical dimension. Further, if you can detect the eyes/mouth, you should be able to pick the correct orientation of the rectangle.

    Many other photographs are tourist snaps, where the sky is up and blue, and the ground is down and green.

    0 讨论(0)
  • 2020-12-23 15:05

    If the images are not square, you may be able to make the assumption that the default images are wider than they are tall. If that's the case determaning whether you need to rotate is just a matter of comparing the aspect ratio and rotating to reorient to default. Though you may end up with upside down images.

    0 讨论(0)
提交回复
热议问题