IP Library Granted Patent US 8,608,073
Granted Patent B2
US 8,608,073 · App. 13/359,489 · Granted Dec 17, 2013

System and method for robust real-time 1D barcode detection

Inventors: Farhan Baqai (Fremont, CA); Vivek Athalye (Berkeley, CA); Neda Nategh (Atherton, CA); Todd Sachs (Palo Alto, CA)
Assignee: Apple Inc.
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 8,608,073
App. No.
13/359,489
Granted
Dec 17, 2013
Kind
B2
Abstract

A fast image-based barcode detection and recognition technique allows a user of a device to analyze an image containing a barcode, locating the barcode containing region of the image automatically, without requiring a user to frame and align the image. In one embodiment, the technique may locate multiple omni-directional barcode regions simultaneously.

Claims (79)

1. A method of detecting a barcode in an image, comprising:

partitioning an image captured by an image capture device into a plurality of subimages;

determining the plurality of subimages that contain at least a portion of the barcode, comprising:

filtering the plurality of subimages using a parallel line filter, comprising:

quantizing edge pixels contained in a subimage into one of a predetermined number of bins corresponding to an angular direction of an edge pixel gradient; and

selecting a region of the image containing the barcode, comprising the plurality of subimages that contain at least a portion of the barcode.

2. The method of claim 1 , further comprising:

preprocessing the image prior to partitioning the image, comprising:

converting the image from a color image to a grayscale image;

subsampling the image to a predetermined number of pixels; and

converting the image into an edge-detected image.

3. The method of claim 1 , further comprising:

providing the selected region of the image to a barcode decoder.

4. The method of claim 1 , wherein determining the plurality of subimages that contain at least a portion of the barcode further comprises:

filtering the plurality of subimages using a density filter; and

filtering the plurality of subimages according to a number of edge pixel lines in a subimage.

5. The method of claim 4 , wherein filtering the plurality of subimages using a density filter comprises:

comparing a number of edge pixels contained in a subimage to a predetermined threshold value.

6. The method of claim 1 , wherein quantizing edge pixels is performed on all pixels of the subimage.

7. The method of claim 4 , wherein filtering the plurality of subimages according to a number of edge pixel lines in a subimage comprises:

filtering the plurality of subimages with a Hough line filter.

8. The method of claim 7 , wherein filtering the plurality of subimages according to a number of edge pixel lines in a subimage comprises:

calculating a singular value decomposition of a subimage;

calculating an orientation of the barcode in the subimage from the singular value decomposition of the subimage; and

filter the plurality of subimages according to a number of edge pixel lines in the subimage having the calculated orientation of the barcode.

9. The method of claim 8 , wherein filtering the plurality of subimages according to a number of edge pixel lines in a subimage further comprises:

calculating a significance of the orientation; and

filtering out subimages wherein the significance of the orientation is less than a predetermined threshold value.

10. An apparatus, comprising:

an image sensor;

a programmable control device;

a memory coupled to the programmable control device, wherein instructions are stored in the memory, the instructions causing the programmable control device to:

partition an image captured by the image sensor into a plurality of subimages;

select a plurality of barcode subimages from the plurality of subimages, according to a predetermined density threshold, a predetermined parallel line threshold, and a predetermined line count threshold, comprising instructions to cause the programmable control device to:

filter the plurality of images using a parallel line filter, comprising instructions that cause the programmable device to:

quantize edge pixels into one of a predetermined number of bins corresponding to an angular direction of an edge pixel gradient; and

select an oriented region of the image containing the barcode, comprising the plurality of barcode subimages.

11. The apparatus of claim 10 , wherein the instructions further cause the programmable control device to:

preprocess the image before the image is partitioned into subimages, comprising causing the programmable control device to:

subsample the image to a predetermined number of pixels.

12. The apparatus of claim 10 , wherein the instructions further cause the programmable control device to:

preprocess the image before the image is partitioned into subimages, comprising causing the programmable control device to:

convert the image into a grayscale image.

13. The apparatus of claim 10 , wherein the image sensor produces a grayscale image.

14. The apparatus of claim 10 , wherein the instructions that cause the programmable control device to select a plurality of barcode subimages from the plurality of subimages, according to a predetermined density threshold, a predetermined parallel line threshold, and a predetermined line count threshold comprise instructions to cause the programmable control device to:

filter the plurality of images using a density filter, the density filter comparing a number of edge pixels contained in a subimage to a predetermined threshold value.

15. The apparatus of claim 10 , wherein the instructions that cause the programmable control device to select a plurality of barcode subimages from the plurality of subimages, according to a predetermined density threshold, a predetermined parallel line threshold, and a predetermined line count threshold comprise instructions to cause the programmable control device to:

filter the plurality of subimages using a line count filter.

16. The apparatus of claim 15 , wherein the line count filter is a Hough line filter.

17. The apparatus of claim 15 , wherein the instructions that cause the programmable control device to select a plurality of barcode subimages from the plurality of subimages, according to a predetermined density threshold, a predetermined parallel line threshold, and a predetermined line count threshold comprise instructions to cause the programmable control device to:

determine an orientation of lines in the subimage; and

filter the plurality of subimages using a line count filter, counting only lines having the determined orientation.

18. The apparatus of claim 15 , wherein the instructions to cause the programmable control device to determine an orientation of lines in the subimage comprises instructions to cause the programmable control device to:

calculate a singular value decomposition of the subimage; and

determine an orientation of lines from a singular value of the singular value decomposition of the subimage.

19. The apparatus of claim 18 , wherein the instructions to cause the programmable control device to determine an orientation of lines in the subimage further comprises instructions to cause the programmable control device to:

determine a significance of the orientation.

20. A non-transitory program storage device, readable by a programmable control device, comprising instructions stored thereon for causing the programmable control device to:

subsample an image containing a barcode captured by an image sensor to a predetermined number of pixels;

convert the subsampled image into a grayscale image,

partition grayscale image into a plurality of subimages;

determine the plurality of subimages that contain at least a portion of the barcode, comprising instructions to cause the programmable control device to:

filter the plurality of images using a parallel line filter, comprising instructions that cause the programmable device to:

quantize edge pixels into one a predetermined number of bins corresponding to an angular direction of an edge pixel gradient; and

select a region of the image containing the barcode, comprising the plurality of subimages that contain at least a portion of the barcode.

21. The non-transitory program storage device of claim 20 , wherein the instructions stored thereon to cause the programmable control device to determine the plurality of subimages that contain at least a portion of the barcode comprise instructions to cause the programmable control device to:

select subimages of the plurality of subimages that contain at least a predetermined number of parallel lines.

22. The non-transitory program storage device of claim 21 , wherein the instructions stored thereon to cause the programmable control device to select subimages of the plurality of subimages that contain at least a predetermined number of parallel lines comprise instructions for causing the programmable control device to:

filter the plurality of subimages with a density filter; and

determine an orientation of lines in a subimage; and

select a subimage of the plurality of subimages with the predetermined number of parallel lines in the determined orientation.

23. The non-transitory program storage device of claim 20 , wherein the instructions stored thereon to cause the programmable control device to select a region of the image containing the barcode, comprising the plurality of subimages that contain at least a portion of the barcode, comprises instructions to cause the programmable control device to:

create a bounding box surrounding a region of the image comprising the plurality of subimages that contain at least a portion of the barcode;

crop and rotate the bounding box to produce a vertical barcode;

generate a contrast map of the region surrounded by the bounding box;

block smooth the contrast map;

create a colormap of the contrast map;

create a binarized contrast map from the colormap; and

morphologically close the binarize contrast map.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jan 27, 2012
From: BAQAI, FARHAN; ATHALYE, VIVEK; NATEGH, NEDA; SACHS, TODD
To: APPLE INC.
Reel/Frame 027605/0087 →
Continuity (1)
Related Publication 20130193211A1 · Aug 1, 2013