Unable to Detect Certain Barcodes in Vision Builder AI

Updated Sep 7, 2022

Reported In

Software

  • Vision Builder for Automated Inspection
  • Vision Assistant
  • Vision Development Module

Issue Details

I am running an inspection in Vision Builder AI in which I need to scan a 1D barcode of a specific standard. I use the Read 1D Barcode step to be able to read the barcode from the image, however when running the inspection, I am not able to detect it. My inspection looks like the following: 

Note: The barcode standard used in the example is EAN-13.
image.png


How can I solve the issue and make the barcode detectable?
 

Solution

There are several ways to optimize the inspection in order to get a barcode detected. Consider doing the following:
 

1.Apply filters to the image.

A barcode may not be detected when the image is not clear enough for the algorithm to detect the edges. Thus it is recommended to do some preprocessing steps such as adjusting the brightness of the image. The image below is more likely to be detected due to clearer edges:

image.png
 

2. Change the parameters of the step.


Another reason of failing the detection is incorrect parameters given to the function. Make sure the Auto Setup checkbox is unchecked, and correct barcode type is indicated:
 
image.png


Also feel free to adjust the barcode location parameters from the main tab, as it also can make a difference:
 
image.png


 

3. Check whether the barcode is valid.


It is also worth checking if the barcode actually meets the standards of the format. Best way to check this is to refer to google images and compare some key element of the barcodes, such as the starting and ending lines which should be identical for any barcode of a given format. For example, the barcode mentioned in the below image is missing one final vertical line when compared to the given EAN-13 standard. See the comparison: 

image.png

In this scenario, a final vertical line needs to be added to the barcode (Using any photoshop tool or adding an overlay) to make it detectable for the VBAI algorithm. See the result below:


image.png
                              
 

 

Additional Information

All the discussed steps can be applied in Vision Assistant inspections as well.