Open poholo opened 7 years ago
DetectOneViewController 类中
` UIImage *image = [UIImage imageNamed:@"IMG_1159.JPG"];
self.detectImage.image = image;
MGImageData *imageData = [[MGImageData alloc] initWithImage:image];
[self.markManager beginDetectionFrame];
CFTimeInterval start = CACurrentMediaTime();
NSArray *faceArray = [self.markManager detectWithImageData:imageData];
CFTimeInterval end = CACurrentMediaTime();
`
` NSString filePath = [[NSBundle mainBundle] pathForResource:@"psb" ofType:@"JPG"]; UIImage tmImage = [[UIImage alloc] initWithContentsOfFile:filePath]; NSData *tmImageData = UIImagePNGRepresentation(tmImage);
UIImage *image=[UIImage imageWithData:tmImageData];
self.detectImage.image = image;
`
手动自己转一下,取巧的方法
是因为图片编码格式原因吗 ?