1

我刚刚开始研究 CIDetector 以检测图像中的人脸,但我想知道是否有人幸运地确定了检测器在检测到人脸时的置信度。

我知道我们基本上可以通过选择不同的检测器精度来设置检测器阈值,但是有没有办法判断检测到的特征超过了要求的精度多少?

CIContext *context = [CIContext contextWithOptions:nil];
NSDictionary *opts = @{ CIDetectorAccuracy : CIDetectorAccuracyHigh };
CIDetector *detector = [CIDetector detectorOfType:CIDetectorTypeFace
                                      context:context
                                      options:opts]; 

本质上,如果我的图像中有两张脸 - 假设使用该CIDirectorAccuracyHigh选项检测到两张脸,我如何确定哪一张更有可能是一张脸?

谢谢

穆斯塔法

4

1 回答 1

0

根据 CoreImage 中的文档,CIFeatures 的 NSArray 中较低的索引更可能是一张脸

/** Returns an array of CIFeature instances in the given image.
 The array is sorted by confidence, highest confidence first. */
- (NSArray *)featuresInImage:(CIImage *)image __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0);
于 2015-11-24T00:51:36.073 回答