hello all , I am an iOS developer. I use NSData *imageData = UIImagePNGRepresentation(editedImage); CIImage *ciImage = [CIImage imageWithData:imageData]; CIDetector *detector = [CIDetector detectorOfType:CIDetectorTypeQRCode context:nil options:@{CIDetectorAccuracy: CIDetectorAccuracyHigh}]; NSArray *feature = [detector featuresInImage:ciImage]; if (feature.count > 0) { CIQRCodeFeature *featureObject = [feature firstObject]; NSString *content = featureObject.messageString; ...... ......
} else { [self showAlertView]; }
it works well on most of QRCode. However, such as pic like this
it can not find right qrcode in the pic. the NSArray feature is nil so I wonder why this happen this pic can be recognized in app like WeChat.Did I use the api not properly?