title: iOS, face detection, detecting a location away from the face
body: <p>I am trying to add face detection to my app, and the code I added gives me back a CGRect that has nothing to do with the face. </p>
  
  <p>Here's the code </p>
  
  <pre><code>CIImage  *cIImage = [CIImage imageWithCGImage:self.imageView.image.CGImage];
  CIDetector* faceDetector = [CIDetector detectorOfType:CIDetectorTypeFace
                                            context:nil options:[NSDictionary  
         dictionaryWithObject:CIDetectorAccuracyHigh forKey:CIDetectorAccuracy]];
  NSArray *features = [faceDetector featuresInImage:cIImage];
  for(CIFaceFeature* faceObject in features)
  {
      FaceLocation.x = faceObject.bounds.origin.x;
      FaceLocation.y = faceObject.bounds.origin.y;
  }// Here face location is far off away form the actual face
  </code></pre>
  
  <p>But this code gives me a location far away from the actual face, what am I doing wrong here?</p>