iOS Face Detection Issue

前端 未结 4 1155
囚心锁ツ
囚心锁ツ 2021-02-08 10:43

I am trying to use CoreImage\'s face detection in iOS 5 but it is not detecting anything. I am trying to detect faces in an image that was just captured by the camera using thi

4条回答
  •  我在风中等你
    2021-02-08 11:07

    None of the answers above worked for me (ios 8.4) ipad mini & ipad air 2

    I had the same observation as robwormald. Face detection worked when iPad was rotated, so I rotated the ciImage :)

    let ciImage = CIImage(CVPixelBuffer: pixelBuffer, options: attachments)
    let angle = CGFloat(-M_PI/2)
    let rotatedImage = ciImage.imageByApplyingTransform(CGAffineTransformMakeRotation(angle))
    

提交回复
热议问题