Abstract. 2. SmartCamBCR: A Low Cost Barcode Reader. 1. Introduction

Similar documents
Blur Estimation for Barcode Recognition in Out-of-Focus Images

License Plate Localisation based on Morphological Operations

MAV-ID card processing using camera images

Detection of License Plates of Vehicles

Fast Directional Median Filtering for Real Time Restoration of Degraded 1D Barcode from Webcam Images

Implementation of Barcode Localization Technique using Morphological Operations

VEHICLE LICENSE PLATE DETECTION ALGORITHM BASED ON STATISTICAL CHARACTERISTICS IN HSI COLOR MODEL

An Effective Method for Removing Scratches and Restoring Low -Quality QR Code Images

An Electronic Eye to Improve Efficiency of Cut Tile Measuring Function

Combined Approach for Face Detection, Eye Region Detection and Eye State Analysis- Extended Paper

An Efficient Method for Vehicle License Plate Detection in Complex Scenes

A software video stabilization system for automotive oriented applications

中国科技论文在线. An Efficient Method of License Plate Location in Natural-scene Image. Haiqi Huang 1, Ming Gu 2,Hongyang Chao 2

Image Processing Based Vehicle Detection And Tracking System

An Evaluation of Automatic License Plate Recognition Vikas Kotagyale, Prof.S.D.Joshi

Method for Real Time Text Extraction of Digital Manga Comic

An Adaptive Kernel-Growing Median Filter for High Noise Images. Jacob Laurel. Birmingham, AL, USA. Birmingham, AL, USA

Automatics Vehicle License Plate Recognition using MATLAB

Keyword: Morphological operation, template matching, license plate localization, character recognition.

Malaysian Car Number Plate Detection System Based on Template Matching and Colour Information

Automatic Licenses Plate Recognition System

Study of 3D Barcode with Steganography for Data Hiding

ISSN No: International Journal & Magazine of Engineering, Technology, Management and Research

Camera Based EAN-13 Barcode Verification with Hough Transform and Sub-Pixel Edge Detection

BARCODE DETECTION WITH MORPHOLOGICAL OPERATIONS AND CLUSTERING

UM-Based Image Enhancement in Low-Light Situations

Deep Green. System for real-time tracking and playing the board game Reversi. Final Project Submitted by: Nadav Erell

Fast identification of individuals based on iris characteristics for biometric systems

Abstract. Most OCR systems decompose the process into several stages:

Reading Barcodes from Digital Imagery

Tan-Hsu Tan Dept. of Electrical Engineering National Taipei University of Technology Taipei, Taiwan (ROC)

FPGA based Real-time Automatic Number Plate Recognition System for Modern License Plates in Sri Lanka

Multi-Resolution Estimation of Optical Flow on Vehicle Tracking under Unpredictable Environments

Live Hand Gesture Recognition using an Android Device

Automated License Plate Recognition for Toll Booth Application

Label and Barcode Detection in Wide Angle Image

Available online at ScienceDirect. Ehsan Golkar*, Anton Satria Prabuwono

Testing, Tuning, and Applications of Fast Physics-based Fog Removal

The Classification of Gun s Type Using Image Recognition Theory

Implementation of License Plate Recognition System in ARM Cortex A8 Board

An Improved Bernsen Algorithm Approaches For License Plate Recognition

Control a 2-Axis Servomechanism by Gesture Recognition using a Generic WebCam

IMAGE TYPE WATER METER CHARACTER RECOGNITION BASED ON EMBEDDED DSP

Number Plate Recognition Using Segmentation

Experiments with An Improved Iris Segmentation Algorithm

A Novel Morphological Method for Detection and Recognition of Vehicle License Plates

INDIAN VEHICLE LICENSE PLATE EXTRACTION AND SEGMENTATION

Chapter 6. [6]Preprocessing

AN EXPANDED-HAAR WAVELET TRANSFORM AND MORPHOLOGICAL DEAL BASED APPROACH FOR VEHICLE LICENSE PLATE LOCALIZATION IN INDIAN CONDITIONS

MATHEMATICAL MORPHOLOGY AN APPROACH TO IMAGE PROCESSING AND ANALYSIS

HEURISTICS FOR LICENSE PLATE DETECTION AND EXTRACTION

ADVANCED DIGITAL IMAGE PROCESSING THE ABSOLUTE GUIDE FOR BEGINNERS USING MATLAB SIMULINK

A Solution for Identification of Bird s Nests on Transmission Lines with UAV Patrol. Qinghua Wang

SURVEILLANCE SYSTEMS WITH AUTOMATIC RESTORATION OF LINEAR MOTION AND OUT-OF-FOCUS BLURRED IMAGES. Received August 2008; accepted October 2008

A Chinese License Plate Recognition System

Traffic Sign Recognition Senior Project Final Report

Real-Time License Plate Localisation on FPGA

Research Proposal: Autonomous Mobile Robot Platform for Indoor Applications :xwgn zrvd ziad mipt ineyiil zinepehe`e zciip ziheaex dnxethlt

Smart License Plate Recognition Using Optical Character Recognition Based on the Multicopter

Content Based Image Retrieval Using Color Histogram

Face Detection System on Ada boost Algorithm Using Haar Classifiers

An Automatic System for Detecting the Vehicle Registration Plate from Video in Foggy and Rainy Environments using Restoration Technique

An Efficient Noise Removing Technique Using Mdbut Filter in Images

IMAGE PROCESSING TECHNIQUES FOR CROWD DENSITY ESTIMATION USING A REFERENCE IMAGE

A Method of Multi-License Plate Location in Road Bayonet Image

Improvement of Accuracy in Remote Gaze Detection for User Wearing Eyeglasses Using Relative Position Between Centers of Pupil and Corneal Sphere

OPEN CV BASED AUTONOMOUS RC-CAR

2D Barcode Localization and Motion Deblurring Using a Flutter Shutter Camera

Estimation of Folding Operations Using Silhouette Model

Automatic License Plate Recognition System using Histogram Graph Algorithm

ROBOT VISION. Dr.M.Madhavi, MED, MVSREC

Real Time ALPR for Vehicle Identification Using Neural Network

Machine Vision for the Life Sciences

Matlab Based Vehicle Number Plate Recognition

Bar Code Labels. Introduction

GESTURE RECOGNITION SOLUTION FOR PRESENTATION CONTROL

Implementing RoshamboGame System with Adaptive Skin Color Model

A SURVEY ON HAND GESTURE RECOGNITION

AUTOMATIC IRAQI CARS NUMBER PLATES EXTRACTION

Changjiang Yang. Computer Vision, Pattern Recognition, Machine Learning, Robotics, and Scientific Computing.

A machine vision system for scanner-based laser welding of polymers

A new seal verification for Chinese color seal

NON UNIFORM BACKGROUND REMOVAL FOR PARTICLE ANALYSIS BASED ON MORPHOLOGICAL STRUCTURING ELEMENT:

IJRASET 2015: All Rights are Reserved

Automatic Car License Plate Detection System for Odd and Even Series

Efficient Construction of SIFT Multi-Scale Image Pyramids for Embedded Robot Vision

Integrated Digital System for Yarn Surface Quality Evaluation using Computer Vision and Artificial Intelligence

Vehicle Number Plate Recognition with Bilinear Interpolation and Plotting Horizontal and Vertical Edge Processing Histogram with Sound Signals

AUTONOMOUS NAVIGATION SYSTEM BASED ON GPS

Extraction and Recognition of Text From Digital English Comic Image Using Median Filter

A Novel Multi-diagonal Matrix Filter for Binary Image Denoising

THERMAL DETECTION OF WATER SATURATION SPOTS FOR LANDSLIDE PREDICTION

Number Plate recognition System

Evolutionary Image Enhancement for Impulsive Noise Reduction

Improved SIFT Matching for Image Pairs with a Scale Difference

The Hand Gesture Recognition System Using Depth Camera

Image Recognition for PCB Soldering Platform Controlled by Embedded Microchip Based on Hopfield Neural Network

Wheeler-Classified Vehicle Detection System using CCTV Cameras

AUTOMATIC NUMBER PLATE DETECTION USING IMAGE PROCESSING AND PAYMENT AT TOLL PLAZA

Scrabble Board Automatic Detector for Third Party Applications

Transcription:

An Intelligent Algorithm for Utilizing a Low Cost Camera as an Inexpensive Barcode Reader Ruwan Janapriya, Lasantha Kularatne, Kosala Pannipitiya, Anuruddha Gamakumara, Chathura de Silva and Nalin Wickramarachchi. Department of Computer Science and Engineering, University of Moratuwa, Sri Lanka. {janapegr, kulakgli, pannpakg, gamagkma, crdsilva,}@cse.mrt.ac.lk & wick@elect.mrt.ac.lk Abstract We have developed a low cost, low resolution camera based al barcode reader, which can extract and decode the barcode sequence on a cluttered background. It is composed of three functions: barcode localization from the raw image, transformation of the localized barcode and decoding the sequence with an intelligent algorithm. The localization method is based on detecting the areas with the maximum density difference in two normal directions. The transformation method, capable of identifying any orientation, is based on the Hough line detection method. The decoding method is based on the peak/valley detection method of the barcode waveform and a consistency checking method. The consistency checking method, a constraint network, employs an artificial intelligence searching method. Keywords: Barcode Localization, Barcode Recognition, Barcode Decoding, Hough Transformation, Peak Detection 1. Introduction Barcodes are a class of the simplest printed patterns that can be reliably recognized by a computer. These codes consist of sequence of parallel, light and dark stripes printed on papers. Information is encoded in the width of the stripes; sequences of a fixed number of stripes encode a character. The sequence that defines the character is unique for the barcode type. Each barcode is started with start bars and ended with stop bars. In some barcode types a checksum digit is included in order to validate the reading. Barcodes are used in wide variety of areas such as for industrial identification, for publications, for pharmaceutical products and for postal codes. There are several types of barcodes. The most commonly used types are EAN 13, UPC, ITF, Codebar, Code 128, ISBN, Pharma (pharmaceutical) and FIM (postal). Since 1952, various kinds of scanners were developed to read barcodes. Most of these barcode readers use a laser beam to scan the barcode and give the resulting value. There are some disadvantages in these kinds of barcode readers. These disadvantages includes that the barcode has to be manually oriented towards the laser beam to get the barcode value, high cost and the harmfulness for the user from the exposure to the laser beam. In the recent past several techniques and algorithms have been proposed for vision-based barcode reading. These Include two-step paradigm of image feature extraction method(1), Hough Transformation(2), Neural Networks Method(3)(4), Texture Analysis(5) and Mathematical Morphology(6) for barcode localization within the image and Selective Sampling method(7), EM Algorithm(8)(9) and Statistical Pattern Recognition (10) for decoding the sequence. 2. SmartCamBCR: A Low Cost Barcode Reader Due to the problems associated with the currently available barcode readers, the need for a sophisticated barcode reader is evident. This led to the development of SmartCamBCR, the first barcode reader to use a web cam (a small camera used for sending images over the Internet) as the capturing device and to use image processing and artificial intelligence techniques to obtain the barcode value. Since a web cam is a relatively inexpensive device, and most of the business applications already use computers, the cost of this barcode reader would be very much less than that of available barcode readers. The proposed barcode reader is capable of identifying any barcode irrespective of its orientation and background, making it an entirely autonomous system. Being able to decode damaged or deformed barcodes, the reader is more useful for most of the real-time applications. Compared with other readers, with our reader we have obtained a comparatively high rate of successful readings with the barcodes damaged from scratches, stains and fading. The intelligent decoding technique has proven its robustness in situations where the presence of limited resolution depth 1

(320 240) of the WebCam and the heavy blurring of the captured images when the WebCam is not focused. The peak detection method is far more superior to edge detection methods as it has a higher degree of immunity to noise. Furthermore, the peak detection method is not affected by the ink spread problem, which can be ensued in barcode printing process. Despite the high performance of the peak detection method, the images can be contaminated with noises considerably. The consistency checking with the constraint network rectifies the effect of the noise by checking the relationships of the widths of the nearby bars and taking into consideration of the decoding rules of EAN13. We are proposing a real-time and autonomous system for the practical use. In this case, the system performance is inevitably influencing its success. Taking into consideration of the fact that image processing methods are consuming a large amount of processing time, we propose a method of controlling the real-time performance effectively. The system utilizes the full processing power only when necessary, gathering the knowledge of the barcode s details and behavior. After gathering of the knowledge, the system can use the gathered knowledge to predict the barcode s details and behavior in the future for a short period. This will reduce processor utilization. This method showed an improvement of over a factor of three, of the frame rate. Even though the SmartCamBCR cannot read deformed barcodes, it could read partially damaged barcodes with high robustness. This is achieved by scanning through multiple lines of the barcode image. The illumination problem could be overcome by properly illuminating (controlling of the light level) the barcode image. 3.1 Barcode Localization Original Image Edge Image Dilation 0 o 45 o 90 o 135 o Absolute Difference Higher Response Dilation and Erosion Select contour 3. THE PROPOSED METHODOLOGY We propose a three-stage process, which effectively decodes the barcode contained in a given image as shown in the figure. First the barcode region is localized from a cluttered background, using a combination of gradient and morphological operators. Next the region of interest (ROI) is extracted after applying necessary transformation using Hough line detection(2) method. Finally the generated barcode waveforms are decoded by recognizing peak locations. Localization process is based on mathematical morphology. The two fundamental operators of mathematical morphology are erosion and dilation. Dilation, in general, causes objects to dilate or grow in size; while erosion causes objects to shrink. The amount and the way that they grow or shrink depend upon the choice of the structuring element. Also this process uses Canny edge detection mechanism to get the edge image from the given original image. In Canny method it uses a filter which is narrow as possible to provide suppression of high frequency noise and to provide good localization of the edges. In our approach, as indicated in the figure, first original image is converted to edge image. Dilation is applied to that edge image taking structuring element as the line in four different angles, 0o, 45o, 90o & 135o. Considering 2

difference of two dilate images having structuring element s angular difference of 90, two images can be taken in the next step. From those two images one can be selected, which has higher response. Then further dilation and erosion applied to that selected image using the respective structuring elements. From that image, the blob which corresponds to barcode area is selected using following formula [1]. Finally the barcode can be localized as shown in the figure 2. Figure 2: Barcode Localization 3.2 Barcode Transformation Edge Image other, this method can be used to find the angle of the bars Blob Contour Area of the barcode. > 0.65 Area of the Minimum Area Rectangle Surrounded the Contour. First barcode region given by the localizer is transformed into Hough plane. Now all possible candidates for lines in barcode region are converted to points having corresponding theta and a rho. These points are extracted by thresholding the transformed image taking a suitable threshold. From extracted points, an angle is selected which has the maximum span. After detecting the orientation, the whole image is rotated in reverse direction by the angle determined above. If necessary, other transformations such as scaling are applied to the image. Considering the minimum area of the contour (this contour is given by the localization phase) as the region of the barcode, the final image is generated by cropping the original image into the bounding rectangle of the minimum area rectangle. [1] Hough Transformation Detect Parallel Lines Identify Transformation Figure 4: Barcode Transformation 3.3 Barcode Decoding Transformation Transformed Image Transformation process is based on Hough line detection method. In this method, the original image plane is transformed into the Hough plane. In the Hough plane, each point in the original plane is represented by a line. Since a barcode is a set of bars or lines parallel to each The decoding method mainly consist of two parts; generation of the barcode waveform from the sequence and deciphering the barcode value from the waveform. For the first part, waveform generation, we have adopted the peak detection method [3] to recognize the barcode. 3.3.1 Waveform Generation The zero crossings of the equation [2] give the peaks and valleys of the function g(x). In equation [2], f(x) is the intensity function of the barcode waveform and σ is the standard deviation of the Point Spread Function. [2] 3

The generated waveform of the function g(x) is illustrated in the figure 5. The steep peaks and valleys are corresponding to the white bars and black bars of the barcode respectively. Due to the presence of the noise, there are some infrequent narrow peaks and valleys appeared in the waveform. To eliminate the zero-crossings due to the noise, a window has been selected from both sides of the zero axes as shown in figure 5. The sophisticated algorithm (10), employed for detecting the zero crossings will effectively eliminate the noise. The introduction of the smoothing effect initially is for further narrowing of the noise. Normalized Distance Stripe to Stripe Combinations 1.0 1-1 1.5 1-2, 2-1 2.0 1-3, 2-2, 3-1 2.5 1-4, 2-3, 3-2, 4-1 3.0 2-4, 3-3, 4-4 3.5 3-4, 4-3 4.0 4-4 Due to the noise, the calculated normalized distances are shifted from their original values. Considering the shift of the normalized distances due to the noise, a predefined probability can be assigned to the stripe-to-stripe combination. Table 2 shows a part of the probabilities with the different normalized distances ranges. Table 2. The Probabilities of Stripe-to-Stripe Combinations. Figure 5. Barcode Waveform with the Zero-Crossing Window For the implementation, we suggest representing the waveform with splines. It should be noted that there is an inherent problem with splines when representing straight lines. For the straight lines, the spline tends to introduce a ripple effect at the corners. The effect of the ripples was insignificant in our implementation. N ormalized Probabilities of Stripe-to-Stripe Distance Combinatio ns Range 1-1 1-2 1-3 1-4 2-1 0.000 0.625 0 0 0 0 0 0.625 0.750 2 0 0 0 0 0.750 0.875 3 0 0 0 0 0.875 1.000 5 0 0 0 0 1.000 1.125 5 0 0 0 0 1.125 1.250 3 2 0 0 2 1.250 1.375 2 3 0 0 3 1.375 1.500 0 5 0 0 5 1.500 1.625 0 5 0 0 5 1.625 1. 750 0 3 2 0 3 3.3.2 Waveform Decoding We introduce a novel method for waveform decoding in this section, considering the EAN13 barcode type as the sample barcode type. After locating the peaks and valleys, the minimum bar width can be determined (10) from the distances between consecutive peaks and valleys. The normalized distances can be calculated by dividing the distances between consecutive peaks and valleys by the minimum bar width. Table 1 shows the possible stripe to stripe combinations with the normalized distances. 1-1 1-2 1-3 2-1 1-2 3-1 1-2 1-3 2-2 Table 1. Possible Stripe to Stripe Combinations with the Normalized Distances Figure 6. The Constraint Network 4

The constraint network can be generated with normalized distances and the probabilities shown in Table 2. Figure 6 illustrates the structure of the constraint network. The domains of the constraint network contain the stripe-tostripe combinations. The matching of the stripe-to-stripe combinations in the consecutive domains and the value of the probability can be considered as the rules for checking the consistency. Evaluating the constraint network until it yields a unique solution will give the most probable stripe-to-stripe combination sequence. If there are many solutions, then the rule; keeping the combinations with highest probabilities and discarding the other, can be applied. The result of the constraint network can be easily translated to the barcode value with the lookup table. 3.4 Real-time Implementation To use the computational power efficiently the algorithm is slightly modified to fit in to a multi- state model. The model consists of 3 states namely; Full Search, Partial Search and Light Search. Full search state uses the maximum computational power. The implementation is done in such a way that most of the time it will operate on light search and partial search respectively. Initially the system operates on light search state, searching for a barcode. If present it will move on to the full search and try to decode it. As soon as it completes its reading it will move on to the light search mode, though the barcode is still in the scene. System reacts for the barcode if only it is removed from the scene and introduced again. When the system operates on full search it will gather some knowledge about the scene; lighting condition and orientation of the current barcode. This knowledge will be used in the partial search state where some steps in the algorithm could be eliminated since the system knows about the scene enhancing the real-time functionality of the system, improving the frame rate. Figure 7 illustrates the states of the real-time implementation. Partial Search According to the Knowledge Full Search Figure 7: Multi-State Approach of the Real-Time System 4. Results and Discussions Our real-time implementation of SmartCamBCR was tested on a personal computer having Intel Celeron 1.7 GHz processor and 256MB RAM. Test data set was consisted of 45 different barcodes. 4.1 Performance Results Elapsed time for decoding Barcode is Read or barcode is not in the view Light Search New Barcode is present in the view Testing was carried out 100 times, in different backgrounds as well as different barcode orientations. Here the parameter combined probability is set to 0.68. (s) Figure 19: Frequency Vs Elapsed Time to Read a Barcode. Testing gave the results of, µ = 0.245 seconds σ = 0.0434 seconds At the peak level it consumes a mean time of 0.245 seconds to decode a barcode. As mentioned in the realtime implementation, this does NOT suggest that the 5

frame rate is constant at 4 fps. System reaches the frame rate of 4 fps only at the peak level, but will be staying in the range 15 to 30 fps most of the time. Results proves that only 2 were read erronously among 250 instances providing 99.2% accuracy. Decoding takes in to account the probablity of the result to be accurate. Setting an appropriate threshold value for the combined probability a balance between accuracy and decoding time is obtained. The adapted combined probability parameter is 0.68 and resulted mean time is 0.245 seconds to decode a barcode with 100% accuracy. 4.2 Processor Utilization Processor Utilization is monitored on the same platform having Windows XP operating system. Figure 20: Processor Utilization for the Implementation. Real-Time Each peak in the CPU Usage History corresponds to a reading of a barcode. A higher peak corresponds to Full Search and a lower peak corresponds to Partial Search states. 5. Conclusion In this paper, we have discussed about a novel approach for barcode localization and barcode recognition. For barcode localization we have used a simple mathematical morphological operation method. For barcode recognition we have used a peak/valley detection method together with a consistency checking method. Eventually, the test results proved that our algorithm is robust and reliable. Also the realtime algorithm proved it s viabillity in commericial applications. The algorithm uses an autonomous localization technique making the product more effective in autonomous systems. For an example in a product line, the barcodes on moving objects can be localized an recognized without human intervension. We are currently investigating the use of our algorithm integrated in a hardware based platform to achieve higher performance. References: 1 ANDO, S.; HONTANI, H. Automatic visual searching and reading of barcodes in 3-D scene Vehicle Electronics Conference, 2001. IVEC 2001. Proceedings of the IEEE International, 2001 P. 49. 2 MUNIZ, R.; JUNCO, L.; OTERO, A. A robust software barcode reader using the Hough transform Information Intelligence and Systems, 1999. Proceedings. 1999 International Conference on, 1999 P. 313. 3 SHU-JEN LIU; HONG-YUAN LIAO; LIANG-HUA CHEN; HSIAO-RONG TYAN; JUN-WEI HSIEH Camerabased Bar Code Recognition System Using Neural Net Neural Networks. IJCNN '93-Nagoya. Proceedings of 1993 International Joint Conference on 1993: 2 P. 1301. 4 HOWLETT, R.J.; BERTHIER, S.; AWCOCK, G.J. Determining the location of industrial bar-codes using neural networks Image Processing and Its Applications, Sixth International Conference 1997 : 2 P. 511. 5 JAIN, A.K.; CHEN, Y. Bar code localization using texture analysis Document Analysis and Recognition, Proceedings of the Second International Conference 1993 P. 41. 6 ARNOULD, S.; AWCOCK, G.J.; THOMAS, R. Remote bar-code localization using mathematical morphology Image Processing and Its Applications. Seventh International Conference 1999 : 2 P. 642. 7 SHELLHAMMER, S.J.; GOREN, D.P.; PAVLIDIS, T. Novel signal-processing techniques in barcode scanning IEEE Robotics & Automation Magazine 1999 : 6 P. 57. 8 TURIN, W.; BOIE, R.A. Bar code recovery via the EM algorithm Signal Processing, IEEE Transactions 1998 : 46 P. 354. 9 BOIE, R.A.; TURIN, W. Noise-limited reading of bar codes Industrial Electronics, IEEE Transactions 1997 : 44 P. 816. 10 JOSEPH, E.; PAVLIDIS, T. Bar code waveform recognition using peak locations Pattern Analysis and Machine Intelligence, IEEE Transactions, 1994 : 16 P. 630. 11 PARMER, N. Drowsy Driver Detection System Machine Vision System Design Project Report, 2002. 6