Method and apparatus for recognizing code
First Claim
1. A two-dimensional code recognition method of recognizing a two-dimensional code that is obtained by generating cells from data and is arranged in two dimensions, comprising:
- a coordinate detection step of detecting the coordinate of a target cell;
a gradation value detection step of obtaining a gradation value of the detected coordinate; and
a cell value determination step of determining a value of the target cell from the detected gradation value.
1 Assignment
0 Petitions
Accused Products
Abstract
When it is determined whether the color of each cell of an image is black or white from the gradation value of each cell, the determination is made by comparison of the gradation level of the cell with a threshold if the gradation level is sufficiently close to that of black or white. In contrast, if the gradation value of the cell is within a gray zone, the color of the cell is determined from the colors of the cells adjacent to the cell of interest. That is, if the gradation value of the cell is gray and the colors of the adjacent cells are all black, the color of the cell is determined to be white; and conversely if the colors of all the adjacent cells are white, the color of the cell is determined to be black.
-
Citations
16 Claims
-
1. A two-dimensional code recognition method of recognizing a two-dimensional code that is obtained by generating cells from data and is arranged in two dimensions, comprising:
-
a coordinate detection step of detecting the coordinate of a target cell;
a gradation value detection step of obtaining a gradation value of the detected coordinate; and
a cell value determination step of determining a value of the target cell from the detected gradation value.
-
-
2. A two-dimensional code recognition method of recognizing a two-dimensional code that is obtained by generating cells from data and is arranged in two dimensions, comprising:
-
a gradation value detection step of obtaining a gradation value of a target cell;
a histogram preparation step of preparing a histogram by obtaining a frequency of a gradation value of an image;
a first gradation value detection step of obtaining a gradation value that is equal to or greater than a predetermined value and is present on the light side of a histogram;
a second gradation detection step of obtaining a gradation value that is equal to or greater than a predetermined value and is present on a dark side of a histogram;
a threshold detection step of setting the intermediate value of the obtained gradation values by the first and second gradation detection steps as a threshold; and
comparing the gradation value of the target cell with the threshold and determining a type of the target cell. - View Dependent Claims (8)
-
-
3. A two-dimensional code recognition method, comprising:
-
a gradation value comparison step of comparing a gradation value of a target cell with that of an adjacent cell; and
a cell value determination step of determining a value of the target cell based on the gradation value comparison results of adjacent cells. - View Dependent Claims (5, 6, 7, 9)
-
-
4. A two-dimensional code recognition method, comprising:
-
a gradation value comparison step of comparing the gradation value of a target cell and that of an adjacent cell;
an adjacent cell and threshold comparison step of comparing the gradation value of an adjacent cell with a threshold;
an adjacent cell determination step of determining the type of an adjacent cell by performing the gradation value comparison step and/or the adjacent cell and threshold comparison step; and
determining the type of the target cell that is different from that of the adjacent cell in a case where adjacent cells are all of a same type or a predetermined number of adjacent cells are of a same type.
-
-
10. A two-dimensional code recognition method of recognizing a two-dimensional code that is obtained by generating cells from data and is arranged in two dimensions, comprising:
-
a coordinate value detection step of detecting a coordinate value of a target cell;
a gradation value detection step of obtaining a gradation value of the detected coordinate;
a histogram preparation step of obtaining frequencies of gradation values of an image and preparing a histogram;
a threshold detection step of obtaining a threshold from the histogram;
a region range determination step of obtaining a predetermined distance from the threshold and setting the predetermined distance from the threshold as a designated region;
an in-region cell selection step of selecting a cell a gradation value of which is within the region range;
an out-region cell selection step of selecting a cell a gradation value of which is outside of the region range;
a cell value determination step of determining the type of the cell selected in the out-region range cell selection step based on the comparison results of the gradation value and the threshold;
an adjacent cell gradation value detection step of detecting a gradation value of a cell adjacent to a target cell among cells selected in the in-region cell selection step;
a first cell value determination step of determining a type of the target cell that is different from that of the adjacent cell in a case where all adjacent cells are of a same type; and
a second cell value determination step of determining the type of the target cell in comparison with the threshold in a case where all adjacent cells are not of the same type.
-
-
11. A code recognition apparatus for inputting an image from a camera and recognizing a code, comprising
a plurality of pre-processing units for determining whether a code is included or not, wherein an image is immediately updated in a case where the determination result of the pre-processing units is negative.
-
12. The code recognition apparatus, wherein the pre-processing unit determines the characteristics of images of a one-dimensional code region or a two-dimensional code region and performs recognition processing of a one-dimensional code or a two dimensional code based on the determination results.
-
13. The two-dimensional code recognition apparatus wherein,
the pre-processing unit determines whether or not a small region of the image is a two-dimensional code based on one or more values of pixel gradation dispersion, ratio of black pixels to pixels and the number of black and white edges.
-
14. The code recognition apparatus wherein,
the pre-processing unit determines whether or not a small region of the image is a one-dimensional code based on one or more values of pixel gradation dispersion, the ratio of black pixels to pixels, the number of black and white edges and line correlation.
-
15. A code recognition apparatus for inputting an image from a camera and recognizing a code, wherein
exposure time of the camera does not exceed the period of one frame of the camera.
-
16. A two-dimensional code recognition apparatus comprising:
-
a histogram preparation step of obtaining a frequency of a gradation values of an image and preparing a histogram; and
a black cell determination step of determining a level range region on the dark side using the results of the histogram preparation step, wherein a code boundary is detected using a continuous length of a black cell and a non-black cell that are obtained in the black cell determination step.
-
Specification