Click here to Skip to main content
15,888,461 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
C#
I am using "Native IOS API" and was able to detect the face feature of the user from "Front Angle" but will like to get detect user face features from "Side Angle". I am using "CIDETECTOR" at my end. I am using "CIDECTORTYPEFACE" at my end. Side angle for the image Please refer to the added image and will like to get the following detected at my end.
If the same can be achieved by "OpenCv" in "iOS", Please provide any links or set of code through which this can be achieved. Any help will be appreciated.



What I have tried:

I have used CIDETECTOR Native API

F#
if let inputImage = UIImage(named: "taylor-swift") {
    let ciImage = CIImage(cgImage: inputImage.cgImage!)

    let options = [CIDetectorAccuracy: CIDetectorAccuracyHigh]
    let faceDetector = CIDetector(ofType: CIDetectorTypeFace, context: nil, options: options)!

    let faces = faceDetector.features(in: ciImage)

    if let face = faces.first as? CIFaceFeature {
        print("Found face at \(face.bounds)")

        if face.hasLeftEyePosition {
            print("Found left eye at \(face.leftEyePosition)")
        }

        if face.hasRightEyePosition {
            print("Found right eye at \(face.rightEyePosition)")
        }

        if face.hasMouthPosition {
            print("Found mouth at \(face.mouthPosition)")
        }
    }
}
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900