Search code examples
imageimage-processingbarcodezbar-sdk

Tilted image - Not detected


I am using zbar to scan barcodes from images. Zbar is unable to detect barcodes in images where barcode is tilted or is in slant position. It is detecting images which are either vertical or horizontal but the ones tilted.

How to go about it. Should I manually turn the image by 15 degree and try it in a loop. Or is there better way to deal with such an issue.


Solution

  • The library is almost certainly scanning horizontally for a barcode. This works as long as the tilt is not so great that a horizontal line can no longer cut across the entire barcode. This is probably about 20 degrees; you can measure it more precisely.

    I imagine it will actually be faster to simply scan after rotating by some increment as you say than trying to find the exact rotation.