The present invention relates generally to bar code technology. More particularly, the present invention relates to the reading and analyzing of bar codes using digital camera technology.
Bar code technology is used throughout the world for identifying virtually any type of product, component or service. Bar code reading is typically used to obtain an index entry for further database retrieval applications. Bar codes are used in almost every type of industry and have become ubiquitous in people's daily lives.
Traditionally, bar codes have been read using laser-based systems, where a laser beam is used to scan the bar code before a computer associates the scanned code with a particular object. The resolution of signals captured in laser-based scanners is high, with each module, the basic unit of the bar code, having tens of pixels. Traditional methods for barcode reading use a process that determines the edge location of each module, and then the feature is matched with standard code samples. Whenever using second derivative, peak location, selective sampling, or Expectation Maximization (EM) algorithm methods, the principle purpose of the system is to recover the barcode from the input signal. This requires that the resolution be high enough that one module must contain at least tens of pixels.
In recent years, cameras have been incorporated into products such as mobile telephones. As digital camera technology has advanced, it has become desirable to read individual bar codes using digital cameras. For example, an individual browsing items in a store may want to capture the bar code of a product on his or her phone so that he or she can remember the identity of the product for later investigation or purchase. Alternatively, individual businesses may want to use digital cameras for bar code scanning in addition to or instead of laser-based scanners. With different types of digital cameras becoming more popular, it is becoming more natural and feasible to perform bar code decoding through the use of a camera.
Unfortunately, however, the quality of cameras in mobile phones is currently limited, and the quality is often too low to take clear and sharp pictures of bar codes. This can lead to misread bar codes, where an incorrect item is identified, or not-read codes, where the code is not registered at all.
Compared to traditional laser scanners, the images of bar codes taken by a digital camera, such as a phone camera, have relatively low resolution and include a great deal of noise. Additionally, the size of the images is often limited and the quality of the images is poor due to the bar code in the images being blurred and deformed. These problems are often caused by too short of a distance for photo-capture and perspective. However, the bar code of interest is often high density in nature, with a requirement for identifying fine detail. Because of these issues, conventional algorithms used for bar code decoding have very poor performance in camera phone application environments.
It would therefore be desirable to have a system and method where the algorithms to be applied are compatible to the computation power and memory of a mobile phone.
The present invention, instead of attempting to recover the features of input signals for a bar code, which may be almost impossible in some extreme cases, uses a statistical model to train the code patterns and classify the input waveforms. A list of algorithms are used for this process and can be tailored for camera phone bar code reading applications. The algorithms are not specifically designed for a single bar code standard, meaning that the scheme is capable of being extended to cover most one-dimensional bar code entities.
The present invention provides a number of significant advantages over conventional systems. In particular, the present invention provides cameras with an improved ability to recognize and analyze bar code signals, enabling cameras to be used to capture bar code signals instead of laser-based systems as necessary. The bar code reading system of the present invention can also be adaptive to most popular bar code standards. In particular, the bar code reading system of the present invention can be adaptive to variant length, code set, density, etc.
These and other objects, advantages and features of the invention, together with the organization and manner of operation thereof, will become apparent from the following detailed description when taken in conjunction with the accompanying drawings, wherein like elements have like numerals throughout the several drawings described below.
A generic digital camera constructed according to the principles of the present invention is shown at 10 in
When a digital picture of a bar code 28 is taken, the at least one lens 12 focuses the image onto the at least one image sensor 18 which records light electronically. The camera processor 16 then breaks this electronic information down into digital data which can be stored on the primary memory unit 14 and/or the secondary memory unit 20. The digital camera 10 also includes a data communication port 22 to enable the transmission of digital images from the digital camera 10 to a remote terminal such as a personal computer 24. The data communication can be in either wired or wireless form and can be configured for USB, Bluetooth, infrared or other connections. The digital camera 10 also includes one or more input buttons 26 for entering information and/or taking a picture, although input buttons 26 could also be remote from the digital camera 10.
According to the principles of the present invention, a statistical approach is used to correctly identify and recognize particular bar codes that are read by the digital camera 10. Conventional systems traditionally have relied upon the recovery of the features of input signals, which can be extraordinarily difficult in some extreme cases. The present invention, on the other hand, involves the use of a statistical model in order to train the code patterns and classify the input waveforms.
The present invention uses a set of algorithms, such as wavelet-based barcode location algorithms, knowledge-based character segmentation algorithms, and training methods for deformable patterns, as well as classification systems, to decode bar codes from low-quality images. The particular algorithms to be used can be tailored for camera phone bar code reading applications or other device-specific camera applications. The algorithms used, in one embodiment of the present invention, are not designed specifically for a single, specific bar code standard. In this embodiment, the present invention is capable of being used to cover most one-dimensional bar code entities.
The present invention can be incorporated into a computer software product that is stored in the primary memory unit 14 or other memory system of the electronic device at issue. An implementation of the present invention is shown generally in
At step 200, a bar code image is input as a result of a digital photograph being taken. At step 210, the bar code area is located by the system. At this step, the actual bar code is taken away from the background of the captured image. Character segmentation occurs at step 220. Character segmentation involves the dividing of the bar code into a set of characters. The segmentation is processed based upon definitions within the code standards and is referred to as “knowledge-based segmentation.” At this segmentation step, the two-dimensional bar code is converted into a one-dimensional wave form, wherein a point in the waveform corresponds to a vertical line in the original bar code. The value for the point can be considered as the sum of the brightness of all of the points on the straight line. In other words, if a point in the waveform corresponds to at least a portion of a bar, its value is low. If the point corresponds to a space between bars, its value is high.
At step 230, the wave form is converted into a feature vector for recognition. This step is referred to as “feature extraction.” To accomplish this task, a feature extraction matrix 250 is used to multiply the one-dimensional waveform and then obtain the final feature vector. The final feature vector is used for statistical recognition at step 240, which achieves the final decoding result at step 270. At this step, a class of reference vectors 260 are compared to the input vector for similarities. The most similar of the class of reference vectors 260 is used to achieve the decoding result. This method is also referred to as the “nearest neighborhood classifier.”
The off-line training portion 300 involves the steps of collecting a plurality of sample bar codes at step 280 and, at step 290, using “statistical training” in order to obtain the best possible feature extraction matrix 250 and class of reference vectors 260 for the on-line recognition process.
A wide variety of statistical methods can be used for successfully analyzing a bar code image that is captured by a digital camera 10. For example, a linear discriminant analysis (LDA), is a method of finding a linear combination of variables, and is useful in discriminating cases in two or more predefined groups. Cases are attributed to the group for which the classification function provides the highest value, or to the group whose centroid is the nearest. Similarly, generalized learning vector quantization (GLVQ) is method of finding a set of optimized reference vectors to represent these groups. Other recognition systems can also be used.
The present invention can be used for a variety of purposes. For example, the present invention can be used to accurately scan the bar code of a product by a camera phone and decode the bar code as an index. This information can be used by a user to later retrieve information about the product. For example, a user could scan the bar code of a product in a department store, and then use a public or private product database to later obtain information about the same product, including pricing information, product specifications, and other information.
The invention is described in the general context of method steps, which may be implemented in one embodiment by a program product including computer-executable instructions, such as program code, executed by computers in networked environments. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. Computer-executable instructions, associated data structures, and program modules represent examples of program code for executing steps of the methods disclosed herein. The particular sequence of such executable instructions or associated data structures represents examples of corresponding acts for implementing the functions described in such steps.
Software and web implementations of the present invention could be accomplished with standard programming techniques with rule based logic and other logic to accomplish the various database searching steps, correlation steps, comparison steps and decision steps. It should also be noted that the words “component” and “module” as used herein and in the claims is intended to encompass implementations using one or more lines of software code, and/or hardware implementations, and/or equipment for receiving manual inputs.
The foregoing description of embodiments of the present invention have been presented for purposes of illustration and description. It is not intended to be exhaustive or to limit the present invention to the precise form disclosed, and modifications and variations are possible in light of the above teachings or may be acquired from practice of the present invention. The embodiments were chosen and described in order to explain the principles of the present invention and its practical application to enable one skilled in the art to utilize the present invention in various embodiments and with various modifications as are suited to the particular use contemplated.