Two-dimensional code reader
First Claim
Patent Images
1. A two-dimensional code reader comprising:
- conversion means for receiving light reflected from two-dimensional code and converting the light into an image signal;
storage means for storing the image signal as an image memory;
code detection means for providing from the image memory a detected two-dimensional code; and
cell binarization means for binarizing values of predetermined pixels for respective cells on the detected two dimensional code, and wherein said cell binarization means comprises;
cell gray level extraction means for finding respective gray levels of the predetermined pixels based on image signals obtained from the predetermined pixels of the cells on the detected two-dimensional code;
local threshold value determination means for finding a local threshold value from the gray levels determined by said cell gray level extraction means; and
cell binary determination means for comparing each of the gray levels found by said cell gray level extraction means with the threshold value found by said local threshold value determination means to find binary data for a corresponding cell.
0 Assignments
0 Petitions
Accused Products
Abstract
A two-dimensional code reader for accurate and fast reading of a two-dimensional code image containing luminance unevenness caused by variations in illumination. To binarize cells, first the gray levels of the pixels at the center points of the cells are extracted, a local threshold value is found only from the extracted gray levels, and the gray levels are compared with the local threshold value, thereby binarizing the cells.
34 Citations
19 Claims
-
1. A two-dimensional code reader comprising:
-
conversion means for receiving light reflected from two-dimensional code and converting the light into an image signal;
storage means for storing the image signal as an image memory;
code detection means for providing from the image memory a detected two-dimensional code; and
cell binarization means for binarizing values of predetermined pixels for respective cells on the detected two dimensional code, and wherein said cell binarization means comprises;
cell gray level extraction means for finding respective gray levels of the predetermined pixels based on image signals obtained from the predetermined pixels of the cells on the detected two-dimensional code;
local threshold value determination means for finding a local threshold value from the gray levels determined by said cell gray level extraction means; and
cell binary determination means for comparing each of the gray levels found by said cell gray level extraction means with the threshold value found by said local threshold value determination means to find binary data for a corresponding cell. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17)
gray level distribution preparation means for preparing a gray level histogram from the gray levels determined by the cell gray level extraction means;
luminance unevenness determination means for determining whether luminance unevenness exists from the histogram prepared by the gray level distribution preparation means;
threshold value determination means for finding threshold values from the histogram if it is determined by said luminance unevenness determination means that luminance unevenness exists; and
cell binary determination means for comparing the gray level found by said cell gray level extraction means with corresponding one of the threshold values found by said threshold value determination means to find binary data of a respective cell.
-
-
3. The two-dimensional code reader as claimed in claim 1 wherein said predetermined pixel is a pixel located at a substantial center of each cell.
-
4. The two-dimensional code reader as claimed in claim 1 wherein said code detection means comprises:
-
edge detection means for scanning the image memory in longitudinal and lateral directions to detect edges of the detected two-dimensional code on the scanning lines;
edge gradient detection means for finding gradients of the edges found by said edge detection means; and
linear line detection means for tracing the edges and finding lines based on the gradients found by said edge gradient detection means.
-
-
5. The two-dimensional code reader as claimed in claim 4 wherein said edge gradient detection means comprises;
-
means for scanning the proximity of a first edge detected on a first scanning line by two, second and third, scanning lines parallel with the first scanning line; and
comparison means for detecting second and third edges of the detected two-dimensional code respectively on the second and third scanning lines scanned by said edge detection means and comparing a gradient of a line connecting the first and second edges with a gradient of a line connecting the first and third edges, and wherein if said comparison means determines that both gradients are substantially the same, said edge gradient determination means detects the edge gradient.
-
-
6. The two-dimensional coda reader as claimed in claim 4 wherein said edge gradient detection means comprises:
-
means for scanning the proximity or a first edge detected on a first scanning line by three or more scanning lines parallel with the first scanning line; and
comparison means for detecting a plurality of edges of the detected two-dimensional code on the three or more scanning lines scanned by said edge detection means and comparing gradients of lines connecting the first edge and the plurality of edges mutually with each other, and wherein if said comparison means determines that variations in the gradients of the lines are a given value or less, said edge gradient determination means detects the edge gradient.
-
-
7. The two-dimensional code reader as claimed in claim 5 wherein said means for scanning the proximity of the first edge scans both sides of the image memory with respect to the first edge.
-
8. The two-dimensional code reader as claimed in claim 4 wherein said linear line detection means traces an edge every predetermined interval, and if the edge cannot be detected once, continues to trace an edge a predetermined number of times every predetermined interval, and if the edge cannot be detected even after the tracing is continued to be executed the predetermined number of times, stops the detection operation.
-
9. The two-dimensional code reader as claimed in claim 1 wherein said code detection means comprises:
-
edge detection means for scanning the image memory in longitudinal and lateral directions and detecting a plurality of edges of the detected two-dimensional code on scanning lines;
means for detecting a first edge point row arranged with a specific positional relationship on a first one of the scanning line from the plurality of edges detected by said edge detection means; and
gradient detection means for detecting edges on another second scanning line, which respectively correspond in type to and are located nearest to the edges of the first edge point row and detecting a gradient of line connecting the corresponding edges between the first and second scanning lines.
-
-
10. The two-dimensional code reader as claimed in claim 9, wherein if variations in the gradients of the lines are a given value or more, detection is again executed.
-
11. The two-dimensional code reader as claimed in claim 1, wherein a scanning line interval between the first and second scanning line when edges are traced is less than a value obtained by adding width of a bar and width of a space together and dividing the result by two.
-
12. The two-dimensional code reader as claimed in claim 9, wherein tracing is continued if a predetermined number of edges making up an edge point row are detected on a single scanning line.
-
13. The two-dimensional code reader as claimed in claim 1, wherein said code detection means comprises:
-
edge detection means for scanning the image memory in longitudinal and lateral directions and detecting a plurality of edges of the detected two-dimensional code on scanning lines;
means for detecting a first edge point row arranged with a specific positional relationship on a single scanning line from the plurality of edges detected by said edge detection means; and
gradient detection means for detecting a second edge point row almost matching the first edge point row detected by said edge point row detection means in the proximity of the first edge point row and detecting a gradient formed by both the edge point rows.
-
-
14. The two-dimensional code reader as claimed in claim 9, wherein edge point rows almost matching the first edge point row are repeatedly detected based on the first edge point row detected by said edge point row detection means in a direction defined by the gradient detected by said gradient detection means, to thereby provide the detected two-dimensional code.
-
15. The two-dimensional code reader as claimed in claim 1 wherein said code detection means moves a scanning line position each time a new image is read.
-
16. The two-dimensional code reader as claimed in claim 6 wherein said means for scanning the proximity of the first edge scans both sides of the image memory with respect to the first edge.
-
17. The two-dimensional code reader as claimed in claim 13, wherein edge point rows almost matching the first edge point row are repeatedly detected based on the first edge point row detected by said edge point row detection means in a direction defined by the gradient detected by said gradient detection means, to thereby provide the detected two-dimensional code.
-
18. A two-dimensional code reader comprising:
-
conversion means for receiving light reflected from two-dimensional code and converting the light into an image signal;
storage means for storing the image signal as an image memory;
code detection means for providing from the image memory a detected two-dimensional code; and
cell binarization means for binarizing values of predetermined pixels for respective cells on the detected two-dimensional code, and wherein said cell binarization means comprises;
cell gray level extraction means for finding respective gray levels of the predetermined pixels based on image signals obtained from the predetermined pixels of the cells on the detected two-dimensional code;
local threshold value determination means for finding a local threshold value from the gray levels determined by said cell gray level extraction means; and
cell binary determination means for comparing each of the gray levels found by said cell gray level extraction means with the threshold value found by said local threshold value determination means to find binary data for a corresponding cell, and wherein said local threshold value determination means defines a plurality of small areas and determines the local threshold value based on the gray levels of the predetermined pixels of the cells located within each of the small areas.
-
-
19. A two-dimensional code reader comprising:
-
conversion means for receiving light reflected from two-dimensional code and converting the light into an image signal;
storage means for storing the image signal as an image memory;
code detection means for providing from the image memory a detected two-dimensional code; and
cell binarization means for binarizing values of predetermined pixels for respective cells on the detected two dimensional code, and wherein said cell binarization means comprises;
cell gray level extraction means for finding respective gray levels of the predetermined pixels based on image signals obtained from the predetermined pixels of the cells on the detected two-dimensional code;
local threshold value determination means for finding a local threshold value from the gray levels determined by said cell gray level extraction means; and
cell binary determination means for comparing each of the gray levels found by said cell gray level extraction means with the threshold value found by said local threshold value determination means to find binary data representing only the corresponding cell.
-
Specification