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:
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:
Also feel free to adjust the barcode location parameters from the main tab, as it also can make a difference:
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:

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:
