Is Android's CameraInfo.orientation correctly documented? Incorrectly implemented?

后端 未结 3 2045
清酒与你
清酒与你 2020-12-13 02:48

In Android you can get a description of the properties of a Camera by retrieving a CameraInfo. I\'m interested in orientation, as described at http

3条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-13 03:42

    I believe I've answered my own question here after some more thinking.

    The example is correct. And, the text is correct actually. In the given example, if the preview data is displayed on the screen, it will appear rotated 90 degrees counter-clockwise, since "up" in the data is at the display's right hand, and it is shown on the display, whose "up" is at the data's left hand so to speak. So, it would be necessary to compensate by rotating the image data 90 degrees clockwise before displaying.

    I think it's more natural to understand this figure as the rotation at which the camera is mounted relative to the natural orientation.

    For this reasons and others I've concluded that the device that shows a changing value for orientation is simply buggy. At the least, when it reports 0, its data is acting like "90" is the right value.

提交回复
热议问题