次のコードを使用して、IOS 5 の顔を検出しました。
CIImage *cIImage = [CIImage imageWithCGImage:image.CGImage];
CIDetector* detector = [CIDetector detectorOfType:CIDetectorTypeFace context:nil options:[NSDictionary dictionaryWithObject:CIDetectorAccuracyHigh forKey:CIDetectorAccuracy]];
NSArray *features = nil;
features = [detector featuresInImage:cIImage];
if ([features count] == 0)
{
NSDictionary* imageOptions = [NSDictionary dictionaryWithObject:[NSNumber numberWithInt:6] forKey:CIDetectorImageOrientation];
features = [detector featuresInImage:cIImage options:imageOptions];
}
このコードを使用すると、IOS 5 で顔を検出できますが、最近、システムを Xcode 4.4 と IOS 6 にアップグレードしました。現在、顔検出が正しく機能していません。
IOS 6 で顔を検出するために必要な変更。
どんな種類のヘルプも大歓迎です