2017-05-31 38 views
2

我使用Google Mobile Vision GMV的Barcode API掃描AAMVA驅動程序許可證類型。GMV無法檢測到AAMVA驅動程序許可證

- (void)viewDidLoad { 
    [super viewDidLoad]; 

    NSDictionary *options = @{ 
    GMVDetectorBarcodeFormats : @(GMVDetectorBarcodeFormatQRCode | GMVDetectorBarcodeFormatPDF417) 
    }; 

    // Initialize a barcode detector. 
    self.barcodeDetector = [GMVDetector detectorOfType:GMVDetectorTypeBarcode options:options]; 
} 

該應用程序現在檢測到PDF417類型,但沒有驅動程序許可證。

我失蹤了什麼?

+3

甚至還提供看不懂這可能在Android樣品被讀取駕駛執照的示例代碼。 – ibnetariq

+0

我在選項中添加了GMVDetectorBarcodeValueFormatDriversLicense。但仍然無法正常工作 –

回答

2

該問題似乎是由捕獲會話預設引起的。 我發現在谷歌手機Vision的GitHub的問題的解決:

- (void)viewDidLoad { 
    [super viewDidLoad]; 

    // Set up default camera settings. 
    self.session = [[AVCaptureSession alloc] init]; 
    self.session.sessionPreset = AVCaptureSessionPresetHigh; 

https://github.com/googlesamples/ios-vision/issues/6