iOS 臉部識別:CLFaceDetectionImagePicker

CLFaceDetectionImagePicker 是臉部識別 ImagePicker,支持 iPad,iOS 7/8,非常容易使用和自定義,完全使用 Objective-C 編寫,沒有 OPENCV。

 iOS 臉部識別:CLFaceDetectionImagePicker

Demo Usage

Please download all of the files in the repo and run it directly to have a look.

Use CLFaceDetectionImagePicker wisely! Lights in front of the camera will affect the accuracy of face detection.

Initialize

Using CLFaceDetectionImagePicker in your app will usually look as simple as this :

_imagePickerViewController = [CLFaceDetectionImagePickerViewController new];
_imagePickerViewController.delegate = self; //Show the ImagePicker [self presentViewController:self.imagePickerViewController animated:YES completion:nil];

Delegate

After the imagePicker take photo or dismiss without detecting any face, it will fire CLFaceDetectionImagePickerDidDismiss delegate function as below which you need to apply

//After getting data callback -(void)CLFaceDetectionImagePickerDidDismiss:(NSData *)data blnSuccess:(BOOL)blnSuccess
{
    self.statusInfo.text = (blnSuccess)?@"Success":@"Failed"; if(data){
        self.imageView.image = [UIImage imageWithData:data];
        self.imageView.hidden = NO;
    }else{
        self.imageView.hidden = YES;
    }
}

項目主頁:http://www.baiduhome.net/lib/view/home/1421130132828

 本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
 轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
 本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!