Reader with optical character recognition

An imaging-based bar code reader that includes an imaging and decoding system. Focusing optics and a sensor array define a field of view. A data processor has a memory for storing a pattern definition of previously imaged OCR characters and comparing a format of said previously stored characters to a present image to determine a character content of the present image.

FIELD OF THE INVENTION

The present invention relates to an imaging-based bar code reader and, more particularly, to a bar code reader that facilitates capturing images.

BACKGROUND OF THE INVENTION

Various electro-optical systems have been developed for reading optical indicia, such as bar codes. A bar code is a coded pattern of graphical indicia comprised of a series of bars and spaces having differing light reflecting characteristics. The pattern of the bars and spaces encode information. In certain bar codes, there is a single row of bars and spaces, typically of varying widths. Such bar codes are referred to as one dimensional (1D) bar codes. Other bar codes include multiple rows of bars and spaces, each row typically having the same width. Such bar codes are referred to as two dimensional (2D) bar codes.

Imaging systems include charge coupled device (CCD) arrays, complementary metal oxide semiconductor (CMOS) arrays, or other imaging pixel arrays having a plurality of photosensitive elements or pixels. An illumination system comprising light emitting diodes (LEDs) or other light source directs illumination toward a target object, e.g., a target bar code. Light reflected from the target bar code is focused through a lens of the imaging system onto the pixel array. Thus, an image of a field of view of the focusing lens is focused on the pixel array. Periodically, the pixels of the array are sequentially read out generating an analog signal representative of a captured image frame. The analog signal is amplified by a gain factor and the amplified analog signal is digitized by an analog-to-digital converter. Decoding circuitry of the imaging system processes the digitized signals and decodes the imaged bar code.

Efficient decoding of text has been more difficult than decoding of bar code symbols. Unlike flatbed scanners, which usually have perfect focus, perfect illumination, hand held bar code scanners are prone to blurry images, distortion, uneven illumination etc. at least compared to the images from a stationary flatbed scanner. Current existing methods of formatting text involves either scanning a representing barcode for each character, or providing a regular expression of the format of the characters to be read by the bar code reader. The first method is error prone and the second requires a well trained user to provide an appropriate regular expression as a template.

OCR A, OCR B and MICR are standardized, monospaced fonts designed for “Optical Character Recognition” on electronic devices. OCR A was developed to meet the standards set by the American National Standards Institute in 1966 for the processing of documents by banks, credit card companies and similar businesses. This font was intended to be “read” by scanning devices, and not necessarily by humans.

OCR B was designed in 1968 to meet the standards of the European Computer Manufacturer's Association. It was intended for use on products that were to be scanned by electronic devices as well as read by humans. OCR B was made a world standard in 1973, and is more legible to human eyes than most other OCR fonts.

MICR is a character recognition technology adopted mainly by the banking industry to facilitate the processing of cheques. The major MICR fonts used around the world are E-13B and CMC-7. Almost all US and UK cheques now include MICR characters at the bottom of the paper in the E-13B font. Some countries, including France, use the CMC-7 font developed by Bull. Other fonts have been developed and are known in the optical character recognition art.

SUMMARY OF THE INVENTION

An imaging-based bar code reader that includes an imaging and decoding system. The system automates the generation of a pattern of the format of an optical character recognition string whose content is unknown and is to be read by the hand held scanner. One advantage to such a system is to decrease errors and to promote efficiency. An exemplary method does not require user training and is quite user friendly during operation.

The exemplary system automates the generation of a pattern of the format to be read by scanning one or more test or template samples of the same format that will be encountered in reading unknown strings. The template is easy to read so that once the string is decoded, the format of the decoded data is recorded in the memory of the system to allow strings of the same format to be correctly read.

These and other objects, advantages, and features of the exemplary embodiment of the invention are described in detail in conjunction with the accompanying drawings.

DETAILED DESCRIPTION

An imaging-based scanner that is capable of reading bar codes is shown schematically at10in the Figures. The scanner10is capable of imaging and decoding bar codes, such as a 2D bar code shown at14inFIG. 3. Additionally, the reader10is also capable of capturing images such as an image or a document12inFIG. 3that contains signatures, graphics or the like. The bar code reader10includes a housing11supporting an imaging system20and a decoding system40(FIG. 3). The housing11supports a transparent window17through which reflected illumination from the target bar code14is received by the imaging system20.

When enabled, the imaging system20captures an image frame42of a field of view FV of the imaging system. If imaging a target bar code14, the imaging process captures an image14′ of the target bar code. The decoding system40analyzes a captured image frame42and attempts to decode decodable portions of the imaged bar code14′. The decoded portions14a′ of the imaged bar code14′ are stored in a buffer memory44a. Alternately, a series of image frames43are captured and using a sequence stitching method. A decoded portion14a′ is stored in the buffer memory44aand the decoding system40attempts to combine or stitch the decoded portions14a′ stored in buffer memory to achieve a full decode of the target bar code14.

The imaging system20includes an imaging camera22(FIG. 2) and associated imaging circuitry24. The imaging camera22includes a housing supporting focusing optics including a focusing lens26and a 2D photosensor or pixel array28. The imaging camera22is enabled during an imaging session to capture a sequence of images of the field of view FV of the focusing lens26.

In one mode of operation, the bar code reader10is a hands-free reader including a generally upright housing11having a flat base portion that can be placed on a counter or tabletop. The scanner10ofFIG. 1is supported by a support stand100. When so mounted, the exposure operation mode of the camera can be altered as described more completely below to enhance the image quality of the resulting image produced by the scanner10.

As is best seen inFIG. 2, the housing11defines the interior area11a. Disposed within the interior area11acircuitry13including the imaging and decoding systems20,40and an illumination assembly60which, when enabled, directs illumination through the transparent window17and onto a target. The bar code reader circuitry13is electrically coupled to a power supply16, which may be in the form of an on-board battery or a connected off-board power supply. If powered by an on-board battery, the reader10may be a stand-alone, portable unit. If powered by an off-board power supply, the reader10may have some or all of the reader's functionality provided by a connected host device.

Circuitry associated with the imaging and decoding systems20,40, including the imaging circuitry24, may be embodied in hardware, software, electrical circuitry or any combination thereof and may be disposed within, partially within, or external to the camera assembly housing25. In the illustrated embodiment, the functions of the reader are controlled and co-ordinated by a microprocessor controller101. The controller101also manages outputs from the decoding system40such as an output56to a display58and communications output port57and visual and audible signals from an LED59band speaker59a. The imaging camera housing25is supported with an upper or scanning head portion11cof the housing and receives reflected illumination from the target bar code14through the transparent window17supported by the scanning head11c. The focusing lens26is supported by a lens holder26a. The camera housing25defines a front opening25athat supports and seals against the lens holder26aso that the only illumination incident upon the sensor array28is illumination passing through the focusing lens26.

Depending on the specifics of the camera assembly22, the lens holder26amay slide in and out within the camera housing front opening25ato allow dual focusing under the control of the imaging circuitry24or the lens holder26amay be fixed with respect to the camera housing25in a fixed focus camera assembly. The lens holder26ais typically made of metal. A back end of the housing25may be comprised of a printed circuit board24b, which forms part of the imaging circuitry24and may extend beyond the housing25to support the illumination system60.

The imaging system20includes the sensor array28which may comprise a charged coupled device (CCD), a complementary metal oxide semiconductor (CMOS), or other imaging pixel array, operating under the control of the imaging circuitry24. In one exemplary embodiment, the pixel array28comprises a two dimensional (2D) mega pixel array with a typical size of the pixel array being on the order of 1280×1024 pixels. The pixel array28is secured to the printed circuit board24b, in parallel direction for stability.

As is best seen inFIG. 2, the focusing lens26focuses light reflected from the target bar code14through an aperture26bonto the pixel/photosensor array28. Thus, the focusing lens26focuses an image of the target bar code14(assuming it is within the field of view FV) onto the array of pixels comprising the pixel array28. The focusing lens26field of view FV includes both a horizontal and a vertical field of view, the vertical field of view being shown schematically as FV inFIG. 1.

During an imaging session, one or more images in the field of view FV of the reader10may be obtained by the imaging system20. An imaging session may be instituted by an operator, for example, pressing a trigger to institute an imaging session. Alternately, the imaging system20may institute an imaging session when a lower or bottom edge of the item15moves through an upper portion of the field of view FV. Yet another alternative is to have the imaging system30always operational such that image after image is captured and analyzed for the presence of data within an imaged target. In any event, the process of capturing an image42of the field of view FV during an imaging session is known in the scanner art. Electrical signals are generated by reading out of some or all of the pixels of the pixel array28after an exposure period. After the exposure time has elapsed, some or all of the pixels of pixel array28are successively read out, thereby generating an analog signal46. In some sensors, particularly CMOS sensors, all pixels of the pixel array28are not exposed at the same time, thus, reading out of some pixels may coincide in time with an exposure period for some other pixels.

The analog image signal46from the pixel array represents a sequence of photosensor voltage values, the magnitude of each value representing an intensity of the reflected light received by a photosensor/pixel during an exposure period. The analog signal46is amplified by a gain factor, generating an amplified analog signal48. The imaging circuitry24further includes an analog-to-digital (A/D) converter50. The amplified analog signal48is digitized by the A/D converter50generating a digitized signal52. The digitized signal52comprises a sequence of digital gray scale values53typically ranging from 0-255 (for an eight bit processor, i.e., 28=256), where a 0 gray scale value would represent an absence of any reflected light received by a pixel (characterized as low pixel brightness) and a 255 gray scale value would represent a very intense level of reflected light received by a pixel during an integration period (characterized as high pixel brightness).

Imaging and Decoding Process

The exemplary image based scanner10has a character recognition capability. If, as depicted inFIG. 3the image captured by the scanner includes characters, the scanner has the ability to interpret, store and transmit the data embodied by those characters using the exemplary process.

In order to more effectively capture character data, the exemplary system reads the data from easy to read sample or template targets and generates a format for the easy to read data so that unknown data can then be accurately read without resort to user input.

Consider the drivers license identified with reference character15inFIG. 3. The imaging system10captures an image of the entire front or face of the license. In set up mode, easy to read character data such as the city, state and zip data is gathered by reading out the pixel array28after an exposure time to generate the analog signal46and the analog signal is digitized and digital gray scale values53are generated and stored in memory44. This process may be repeated multiple times during a setup up imaging session by storing a sequence of captured images in the memory44. Easily recognized characters may be obtained in a reliable non error prone manner. This may be due to use of a particular font (OCR A or OCR B) on this data, or it may be due to a reliable image capture process such as assuring that the reader is mounted to its stand100. An additional safeguard for reliability can be use of only easy to recognize characters within a character set. O's can be confused with zeros and Z's can be confused with the letter two, but the letters C, P, E, etc. are fairly unique and are not likely to be misinterpreted by the decoding circuity. Stated another way, only characters that are known in advance and that are not easily confused with other characters within a character set are used for setting up the character format.

The decoding system40then interprets the data to simplify or automate the generation of the pattern of the format of an OCR string to be read. To accomplish this task, scan several OCR strings that are printed very well and can be read easily. These OCR strings should be able to represent a string/strings to be read. Once these several strings are decoded correctly, the system will analyze the common attributes of their format to generate and store the format for reading other new strings with the same format.

For example, the format of a city address could have different length for city names, 2 alphabetic characters for state abbreviation, 5 digits or 9 digits for zip code. After scanning several representatives and interpreting from the system, a format for a regular expression (FIG. 4) could be generated as the format of OCR strings that are going to be read. Certain targets can have multiple strings per target and for those known targets multiple regular expressions are created so that in matching an unknown string the controller would try to match the regular expressions and if a match is found the string is saved. If no match is found, then the controller will reject the string and issue an audible or visible warning from the speaker or Led output.

This is illustrated byFIG. 4. In that figure, the symbology designates what is acceptable for certain locations within a character string. Beginning at the head or beginning of the string the first symbol is identified as the designator[A-Za-z ]<Any>. This indicates that the first part of the string can be any number of characters, both upper or lower case that can be separated by any number of spaces. One appropriate character string would be ‘Atown’. This string has one capital letter followed by four lower case letters and no spaces. A similar acceptable string would be ‘New York’ which has two upper case letters with six lower case letters and one space. Note, appropriate symbology is available for alphanumerics, that is numbers or letters as well as specific symbols such as hyphens, commas etc.

For the decoding circuitry to recognize this example, more than one example would be used in the setup process since the use of spaces might not occur in a single example and accordingly would not be taken into account in the shorthand notation for the possible matching string.

Use of regular expressions is well documented in the literature as is filtering of string inputs to derive a regular expression that describes all examples in the input test string are known in the art. Examples of treatment of character strings and generation of regular expressions representing those strings are found in an article entitled “How to Use Regular Expression in Microsoft Visual Basic 6.0)” (http://support microsoft.com/kb/818802) and “How to use regular expression in PHPH” (http://www.ibm.com/developerworks/edu/os-dw-os-phpexpr-i.html). These articles are incorporated herein by reference.

While the present invention has been described with a degree of particularity, it is the intent that the invention includes all modifications and alterations from the disclosed design falling within the spirit or scope of the appended claims.