I'm working on adding new barcode scanning functionality to my application. Decided to use AVFoundation
for that purposes. Implemented everything as in many examples on the Internet.
In metadataObjectTypes
indicated only one AVMetadataObjectTypeCode128Code
type that I needed.
Everything looks good and I can even scan barcodes if they have a solid background, for example, if you take and print a label with a Code-128 barcode and put it on a white sheet of paper. But if you put a printed label with a Code-128 barcode on a table with a wood-like color (I am attaching a photo), then it becomes much more difficult for the scanner to read the barcode, you have to zoom in and focus the scanner, and it takes a long time to recognize the barcode.
It is noteworthy that if I also specify AVMetadataObjectTypeInterleaved2of5Code
type of barcodes, then their scanner scans much faster under the same conditions with the background.
Perhaps someone faced a similar problem? Maybe I'm missing some additional settings for AVCaptureMetadataOutput
or something else?
I would be grateful for any information and help in solving this problem.