Ios 以图像为源文件的AVfoundation人脸识别

Ios 以图像为源文件的AVfoundation人脸识别,ios,avfoundation,face-recognition,avcapturedevice,Ios,Avfoundation,Face Recognition,Avcapturedevice,我想使用AVFoundation对从摄像机拍摄的图像执行人脸识别。 首先,这可能吗 我已经找到了很多关于如何使用实时摄影机流作为输入的教程。我研究了它们,发现没有办法将AVCaptureInputDevice绑定到图像 附言。 我不想使用CoreImage。实际上我想放弃CoreImage,使用AVFoundation人脸识别 非常感谢。CoreImage有什么问题?它使用相同的检测器: NSURL *url = [NSURL URLWithString:@"..."]; CIImage *im

我想使用AVFoundation对从摄像机拍摄的图像执行人脸识别。 首先,这可能吗

我已经找到了很多关于如何使用实时摄影机流作为输入的教程。我研究了它们,发现没有办法将AVCaptureInputDevice绑定到图像

附言。 我不想使用CoreImage。实际上我想放弃CoreImage,使用AVFoundation人脸识别


非常感谢。

CoreImage有什么问题?它使用相同的检测器:

NSURL *url = [NSURL URLWithString:@"..."];
CIImage *img = [CIImage imageWithContentsOfURL:url]; // uiImageObj.CIImage
CIContext *context = [CIContext contextWithOptions:nil];
NSDictionary *detectorOptions = [[NSDictionary alloc] initWithObjectsAndKeys:CIDetectorAccuracyLow, CIDetectorAccuracy, nil];
CIDetector *detector = [CIDetector detectorOfType:CIDetectorTypeFace context:context options:detectorOptions];
NSArray *features = [detector featuresInImage:img];

嗨@peter,谢谢你的回答,但正如我在问题中指出的,我已经知道如何使用CoreImage人脸检测。我注意到CI无法识别旋转45度或以上(例如倒置)的面,而is似乎可以识别AVFoundation。所以我不确定它是完全相同的探测器。。。