How to directly rotate CVImageBuffer image in IOS 4 without converting to UIImage?

后端 未结 4 1115
闹比i
闹比i 2020-12-02 15:59

I am using OpenCV 2.2 on the iPhone to detect faces. I\'m using the IOS 4\'s AVCaptureSession to get access to the camera stream, as seen in the code that follows.

4条回答
  •  [愿得一人]
    2020-12-02 16:43

    Maybe easier to just set the video orientation the way you want:

    connection.videoOrientation = AVCaptureVideoOrientationPortrait
    

    This way you don't need to do that rotation gimmick at all

提交回复
热议问题