在我的应用中,我正在使用ZBarReader
,我可以使用代码检测QRCode
和BarCode
ZBarReaderViewController *reader = [ZBarReaderViewController new];
reader.readerDelegate = self;
reader.supportedOrientationsMask = ZBarOrientationMaskAll;
ZBarImageScanner *scanner = reader.scanner;
// TODO: (optional) additional reader configuration here
// EXAMPLE: disable rarely used I2/5 to improve performance
[scanner setSymbology:0 config:ZBAR_CFG_ENABLE to:0];
[scanner setSymbology: ZBAR_QRCODE
config: ZBAR_CFG_ENABLE
to: 1];
reader.tracksSymbols=YES;
reader.readerView.zoom=1.0;
// present and release the controller
[self presentModalViewController: reader
animated: YES];
[reader release];
但它仅检测代码当我使相机更接近条形码时,它没有检测到我将相机保持在远离条形码的位置是否有任何属性可以快速扫描代码当我的相机远离条形码时..
答案 0 :(得分:1)
基本上Zbar阅读器取决于设备的相机分辨率,但仍尝试使用
reader.readerView.session.sessionPreset = AVCaptureSessionPreset1280x720;
调整AVCaptureSessionPreset1280x720
。可能会有所帮助。