1

In my app i'm using ZBarReader, and i can able to detect the QRCode and BarCode using the code

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];

But it detects the code only when i make my camera much closer to the barcode, it's not detecting when i keep my camera little far from barcode Is there any property to scan the code very Quickly even when i have camera far from barcode..

Harish
  • 2,496
  • 4
  • 24
  • 48

1 Answers1

1

Basically Zbar reader depends on the camera resolution of the device but still try using

reader.readerView.session.sessionPreset = AVCaptureSessionPreset1280x720; 

adjust AVCaptureSessionPreset1280x720 .May this helps.

spider1983
  • 1,098
  • 1
  • 7
  • 14
  • it says use of undeclared identifier AVCaptureSessionPreset1280x720. – Harish Dec 28 '12 at 06:50
  • add the AVFoundation.framework in your project and include it in your class. – spider1983 Dec 28 '12 at 06:52
  • this works without the error you might be missing something else. – spider1983 Dec 28 '12 at 06:55
  • i told you in the beginning only that the Zbar reader majorly depends on the resolution of the camera of device you are using ... ipad has 1 MegaPixel or 2 MegaPixel camera which is low ... if you will try same with an iPhone this will work just fine. – spider1983 Dec 28 '12 at 07:14