CIDetector and UIImagePickerController

前端 未结 4 1195
借酒劲吻你
借酒劲吻你 2020-12-16 06:15

I\'m trying to implement the built-in iOS 5 face detection API. I\'m using an instance of UIImagePickerController to allow the user to take a photo and then I\'

4条回答
  •  感动是毒
    2020-12-16 06:56

    I had a similar problem - the face detector was working in orientations that didn't match the image orientation property. iOS face detector orientation and setting of CIImage orientation

    a quick work around that I found to help with that is to disregard the image orientation all together and "flatten" the image (so that there is no image orientation data)

    I used this code:

    http://blog.logichigh.com/2008/06/05/uiimage-fix/

    and sure enough looks like it is working much better for front camera pics. I haven't tried enough on landscape to tell if it has helped there but looks promising

提交回复
热议问题