Browse Prior Art Database

Using Multiple Thresholding Method to Read Barcodes

IP.com Disclosure Number: IPCOM000105190D
Original Publication Date: 1993-Jun-01
Included in the Prior Art Database: 2005-Mar-19
Document File: 2 page(s) / 91K

Publishing Venue

IBM

Related People

Kishi, G: AUTHOR

Abstract

A fast and robust method for thresholding barcodes in a digitized camera image is described. Multiple independent methods are used, if necessary, to determine the size of the individual black and white bars. The initial method used is the least computation intensive and provides fast analysis if the image is clean.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 52% of the total text.

Using Multiple Thresholding Method to Read Barcodes

      A fast and robust method for thresholding barcodes in a
digitized camera image is described.  Multiple independent methods
are used, if necessary, to determine the size of the individual black
and white bars.  The initial method used is the least computation
intensive and provides fast analysis if the image is clean.

      It is assumed that the barcodes are read by a vision system
attached to a camera.  The camera image of the barcode is digitized
and analyzed by a vision system.  The vision system must determine
the widths of the white and black bars in the image in order to
determine the characters in the barcode.

      Several different techniques to determine the bar widths are
used in sequence to determine the bar widths.  If any of the
techniques leads to a successful reading of the barcode, the process
is complete, and further techniques are not used.

      The first technique used is a fixed threshold.  The middle 50
percent of the pixels along the length of the barcode are scanned and
the minimum and maximum greyscale values are computed.  The average
of the maximum and the minimum is used as the threshold.  Pixels
brighter than or equal to the threshold are considered to be part of
white bars while those darker than the threshold are considered to be
part of black bars.

      This technique only uses the middle 50 percent of the barcode
for the following reasons.  First, only half of the pixels in the
barcode are scanned.  Second, any end effects caused by pixels off
either end of the label are not included in the analysis.

      Although this method is fast, it only works if the lighting on
the image is uniform along the barcode.  Sometimes the lighting is
non-uniform and a gradual shift in intensity occurs along the length
of the barcode.  If this shift is of too great a magnitude, the white
and black bar widths determined by the fixed threshold method will
not be successfully deciphered.

      If this occurs, an adaptive threshold is used.  The adaptive
threshold is calculated as follows:

o   For each pixel in the first third of the barcode, the maximum and
    minimum greyscale value for the next 20 percent (inclusive -
    percentage is approximate) of the barcode pixels is determined.
    The threshold for each pixel is the average of the calculated
    minimum and maximum.
o   For each pixel in the last third of the barcode, the maximum and
    minimum greyscale value for the preceding 20 percent (inclusive -
    percentage is approximate) of the barcode pixels is determined.
    The threshold for each...