Advantages and Limitations of the Implemented Approach
From SoftwarePractice.org
Advantages
Use of Numerical Outputs
UPC-A barcodes predominantly focuses upon a combination of 10 numeric outputs rather than alphanumeric code, which results in a wide range of combinations. Needing to decipher on 10 numbers was viewed upon as simpler as those standards which not only employed numbers, but also the letters of the alphabet and symbols.
Application Within Point of Sale Systems
UPC-A barcodes are also widely found within the retail environment. The widespread use makes it simpler to find examples within the real world of various types of UPC-A barcodes.
The Checksum
The inclusion of a checksum digit at the end of the barcode is also beneficial as it allows a manual method to determine if the barcode is correct. The MATLAB code will include the checking of this checksum to ensure that the barcode has been correctly read. This reduces any outlets for error during the barcode recognition process.
Start & Stop Bits
The start and stop bits are identical, thats is a sequence of bar-space-bar. This allows the any UPC-A decoding program to locate the barcode from the surrounding space. It also allows calibration of the unit widths of each bar and space, ensuring that the differing widths associated with the digit bit pattern can be determined.
Middle Guard
The middle guard of space-bar-space-bar-space allows the reader to separate the left hand digits from the right hand digits. This is important as it allows the barcode to have the property of being able to be read upside-down.
Left Hand Digits vs. Right Hand Digits
The property that the left hand digit bit patterns and the right hand digit bit pattern are ones complement of each other is important to the deciphering of the barcode. The fact that the left hand bit patterns have an odd parity and start with a 0; and the right hand patterns have an even parity, and start with a 1, allows the reader to distinguish if the barcode is being read from left-to-right, or right-to-left. In other words, the orientation of the barcode can be determined.
Limitations
Unit Widths
One limitation to our design is the that unit widths of the spaces and bars of the barcode must be equivalent. We have found that the unit widths differ. This could be a direct result from the process of scanning the barcode image into the computer, . This makes it more difficult to determine the total bit width of the barcode, which in turn, affects the deciphering of the respective output. We have found numerous barcode images where this is the case, and unfortunately, cannot possibly allow space for deciphering all instances of deviations from a perfect image.
Since one property of a UPC-A barcode is that the unit widths of the bars and spaces are the same, this problem of differing widths also indicate it is not a properly designed UPC-A barcode. One such instance is as shown below. In this image, the unit width of the bar (as seen in the first bar to the left) is thicker than the space next to it. According to properties of UPC-barcodes, these first two lines are a part of the start bit of 1-0-1 or bar-space-bar. Essentially, each width of the starting sequence line should be equivalent and hence, allow calibration of the widths of the rest of the bars and spaces and deciphering of the numerical sequence.
Positioning of Barcode Lines
Within our program, it needs to be ensured that the barcode image, that is, the cropped barcode image contains barcode lines in the centre. In numerous UPC-A barcodes, there are numerals at the very bottom of the barcode, surrounded by the start and stop bits, and sometimes the middle guard. Since our algorithm determines the edges of the barcode image from the surrounding area, these numerals (or the space after they have been removed b y the deblurring and denoise process) may be integrated within the final image. Therefore, it is integral to ensure that this space does not venture into the centre of the cropped image.
.jpg files
Another limitation with our program is that we can only successfully use .jpg files. We have found that using any other image format files will result in the program returning numerous errors. This is purely due to the properties of other file formats, which do not allow us to alter or utilise the images within numerous functions. It was found that once these other file formats were passed through our functions, they were subsequently altered.
Based on preliminary research we have found that in fact our code should be able to handle the image formats:
- .bmp
- .hdf
- .jpeg
- .pcx
- .tiff
- .xwb
A significant note is that this program is unable to handle .gif images. However, since we did not get the opportunity to further investigate the extents to what the program can and cannot handle we have limited the image files to .jpeg only.
Image Rotation
Realistically, we cannot ensure that all images can be converted. This is due to the unpredictable nature of images available within the real world. It was also found that when we created rotated images, and they are then run through our program again to be straightened up, that the pixels do not align back to its original positions. Since our program and generally, image processing, rely heavily upon analysing image pixel positions, this can cause problems. It resulted predominantly through no fault of our recognition and deciphering program, but rather the intrinsic nature of processing images.
Also, images which have strong lines which are not parallel to the barcode lines will affect the barcode. If these lines are not successfully filtered out during the denoise and deblur component, then the rotation of the barcodes will depend on this line. Since this line is of a different orientation, the resultant barcode image will not be straight. This subsequently means that barcode extraction and deciphering will fail and result in an error.
Read Tolerance
Due to the way that the program reads the barcode there is an almost zero-tolerance to pixel displacement. For example, the below image is deemed to contain too much pixel distortion to be able to be read correctly and therefore exhibits a read error despite going through the denoising and deblurring processes.
Back to Team F's Main Page Team F: Barcode Reading from Image

