Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7445665
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T11:59:03+00:00 2026-05-29T11:59:03+00:00

I am trying to use CoreImage’s face detection in iOS 5 but it is

  • 0

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 this code:

- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info {
    UIImage *image = [info objectForKey:@"UIImagePickerControllerOriginalImage"];
    NSDictionary *detectorOptions = [[NSDictionary alloc] initWithObjectsAndKeys:CIDetectorAccuracyHigh, CIDetectorAccuracy, nil];     
    CIDetector *faceDetector = [CIDetector detectorOfType:CIDetectorTypeFace context:nil options:detectorOptions];
    NSArray *features = [faceDetector featuresInImage:image.CIImage];
    NSLog(@"Features = %@", features);
    [self dismissModalViewControllerAnimated:YES];
}

This compiles and runs fine but it the features array is always empty regardless of what’s in the image… Any ideas?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T11:59:17+00:00Added an answer on May 29, 2026 at 11:59 am

    I can’t reply to your @14:52 comment directly Vic320, but I’ve been playing with the front camera for face detection – I went round and round in circles since I couldn’t get the front camera to pick up my face at all…

    Turns out it’s very sensitive to rotation – I noticed that when holding my iPad2 in portrait (as you’d expect while using the front camera) I was getting less than 10% recognition accuracy. On a whim, turned it sideways and was getting 100% recognition with the front camera.

    Simple fix for this if you’re using the front camera always in portrait is to add this little snippet:

    NSDictionary* imageOptions = [NSDictionary dictionaryWithObject:[NSNumber numberWithInt:6] forKey:CIDetectorImageOrientation];
    NSArray* features = [detector featuresInImage:image options:imageOptions];
    

    That 6 in there forces the detector to operate in portrait mode. Apple’s SquareCam Sample has a whole bunch of utility methods to figure out what orientation you’re in if you need it to dynamically figure out your orientation.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Thanks for reading. I'm trying to use CoreImage in iOS 5 to alter the
Trying to use Java's regexp I want to match /app, /app/.* , but not
I'm trying to use the Accelerate framework on iOS to bypass the fact that
I am need paint my image. I'm trying use JQuery in here this link:
I have been trying use the edit_post_link() function to contain an image. All of
I want to use NSAttributedString in my project, but when I'm trying to set
Trying to use Net::SFTP, version 2.05 (appears to be the latest). But it fails
I am trying use std::copy to copy from two different iterator. But during course
I'm trying use the Sum method in a lambda expression for a comparison, but
I'm trying use eco for client-side templating. I have multiple .eco templates that I'd

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.