iOS用のGoogleMobileVisionを使用しているときに問題が発生しました。 UIImagePickerControllerでGoogle Mobile Vision for iOSのソースイメージサイズにはどのような制限がありますか?
この
UIImagePickerController* picker = [[UIImagePickerController alloc]init];
picker.delegate = self;
picker.sourceType = UIImagePickerControllerSourceTypeCamera;
picker.cameraDevice = UIImagePickerControllerCameraDeviceFront;
[self presentViewController:picker animated:YES completion:^
{
self.faceImageView.layer.sublayers = nil; // drawing and re-drawing some lines...
}];
と検出器のように設定します。
[super viewDidLoad];
NSDictionary* options = @{
GMVDetectorFaceLandmarkType : @(GMVDetectorFaceLandmarkAll),
GMVDetectorFaceClassificationType : @(GMVDetectorFaceClassificationAll),
GMVDetectorFaceTrackingEnabled : @(NO),
//GMVDetectorFaceMode : @(GMVDetectorFaceAccurateMode) // Accurate mode detects face, but with wrong orientation; Fast mode can't detect faces!
};
self.faceDetector = [GMVDetector detectorOfType:GMVDetectorTypeFace options:options];
しかし、使用している場合:picker.allowsEditing = YES;
すべてが完璧に動作します!
質問:画像サイズに理由はありますか? picker.allowsEditing
XCodeのvのデフォルト値のサイズiPhone 6S上の750x750と1932x2576のpicker.allowsEditing = YES;
リターンイメージ。8.1 iPhone 6SのiOS 10.1.1 GoogleMobileVisionのV 1.0.4
これについて何かお知りになりましたか? –
小さいサイズの食べてみましたが、それでもうまくいきませんでしたので、確かにサイズに関するものではありません。 –