Barcodes MMS and the Internets Cheapest Prices Greg
Barcodes, MMS, and the Internet’s Cheapest Prices Greg Mc. Grath & Greg Maier Advisors: Professor Cotter, Professor Rudko ECE-499 March 01, 2008
Afraid of Getting Screwed? http: //www. sgilpin. com/screwed. jpg
Project Goals Create a cell phone based system to compare prices by doing the following: • Receive image from email • Locate automatically the barcode in image • Decode the barcode • Find best price online • Respond to user with product information
Barcode Standards • 30 Black Bars • 29 White Space • Each digit has unique 7 -bit binary code • Guard bars http: //en. wikipedia. org/wiki/Universal_Product_Code
Barcode Location Algorithm • Divide image into 8 x 8 blocks • Take DCT of those blocks • Compare each DCT block to average DCT block • Find regions with a high sum, which implies a higher probability that the barcode is in that 8 x 8 region
Barcode Location Algorithm Cont. • Threshold the image to remove low-value areas • Convert remaining pixels to black and white • Perform morphological operators to smooth barcode region
Barcode Location Algorithm Cont. • Crop image to most relevant area • Locate middle “guard bar” lines of barcode • Find left and right edges of barcode
Decode and Read Barcode • Find thickness of each black bar and white space in terms of pixels • Repeat a number of times to minimize error • Find mean each row scan • Read left “guard bar” to indicate thickness of “one binary digit” • Divide by pixel width by “one binary digit” to convert to binary form • Convert from binary to UPC using standard table Digit Pattern 0 1110010 5 1001110 1 1100110 6 1010000 2 1101100 7 1000100 3 1000010 8 1001000 4 1011100 9 1110100
Automate price comparison • The UPC number is passed from MATLAB to Python • Python opens http: //www. google. com/products? q=PRODUCT&btn. G=Search+Products&show=dd&scoring=p • “Reads” HTML file to find price tags • Saves lowest price (first item in list)
Connect with the consumer MMS email
Results and Performance • 85% success rate • Common source of error: 7 -digit binary representation for each digit is slightly off
Problems • Cell Phone Camera − Lack of user-determined focus • Blurring • Distortion
Cell Phone Camera
Digital Camera
Future Work • Be able to send system the UPC directly • Improve algorithm to work in more situations • Allow the user to access more data about the product • • Average of the lowest five prices Name of the product Consumer Reports Recalls • Improve error detection • UPC Recognition • Utilize error checking bit more effectively
Questions
- Slides: 16