Question:
How can I read ITF billet barcode (size 44) encoded in Interleaved 2 of 5 pattern. Using some library like zxing, zbar, etc.?
I've already used the zxing and zbar libraries, but it doesn't recognize the barcode of the ticket.
I've already tried the examples:
https://github.com/TheLevelUp/ZXingObjC http://zbar.sourceforge.net/iphone/sdkdoc/tutorial.html
From all the examples I can find I can read all types of barcodes (QR Code, Code 39, 93, 128, ITF, etc) all the way up to small size ITF. Minus the bank slip.
Does anyone have an idea what I can do?
Answer:
It is possible to read barcode of Brazilian bank slips with the ZBar library. What you have to do is set the video quality to high. Following is the ZBarReaderViewController configuration code snippet.
// ADD: present a barcode reader that scans from the camera feed
ZBarReaderViewController *reader = [[ZBarReaderViewController alloc] init];
reader.readerDelegate = self;
reader.supportedOrientationsMask = ZBarOrientationMaskAll;
reader.videoQuality = UIImagePickerControllerQualityTypeHigh;
ZBarImageScanner *scanner = reader.scanner;
// TODO: (optional) additional reader configuration here
[scanner setSymbology: 0
config: ZBAR_CFG_ENABLE
to: 0];
[scanner setSymbology: ZBAR_I25
config: ZBAR_CFG_ENABLE
to: 1];
Since iOS version 7 the AVFoundation framework offers a native method for barcode reading. However, support for the 2 of 5 interleaved pattern ( AVMetadataObjectTypeInterleaved2of5Code
) was recently introduced in iOS 8 .
I modified the example provided in this tutorial and it really works well to read the barcodes of both the title and the agreement.