I recently worked on a barcode detection project. At first, I assumed that a simple machine learning algorithm combined with a texture-based descriptor could enable barcode detection. However, I had several problems, because in the case of my application, I do not know if there is a barcode or not, its size, its type (UPC-A, EAN ...), its orientation ... which suggests trying a lot of combinations in order to localize the barcode.
I also did not order or did not manage to create a training dataset corresponding to the type of images that I have, so I did not continue this decision. Then I read some articles. Many specialized barcode detection methods begin with the assumption that there is a barcode in the image, and so they try to find it. Moreover, some of the algorithms suggest that the barcode is horizontal, and use this hypothesis as a priori information.
The best solution I have found is BLaDE ( http://www.ski.org/Rehab/Coughlan_lab/BLaDE/BLaDE_TechReport.pdf ). The code is also available on the Internet, so you can easily test it. The only problem is that it was designed for UPC-A barcodes only.
To resume work, the best solution for you depends on several aspects:
barcode type
you know exactly what the barcode is
its orientation: any / given angle
application / real-time device to run it
you have chosen a training set
Good luck
source share