Two-dimensional code detection system and two-dimensional code detection program

Information

  • Patent Application
  • 20070187512
  • Publication Number
    20070187512
  • Date Filed
    September 20, 2006
    18 years ago
  • Date Published
    August 16, 2007
    17 years ago
Abstract
A two-dimensional-code detection system includes a reading unit, a recognizing unit, a calculating unit and a position specifying unit. The reading unit reads an image including plural two-dimensional codes. The recognizing unit recognizes position detection patterns of the respective two-dimensional codes from the read image, which includes the plural two-dimensional codes. The calculating unit that selects at least two of the position detection patterns of the two-dimensional codes. The calculating unit calculates a minimum unit forming each of the selected position detection patterns. The position specifying unit judges whether or not the minimum units forming the selected at least two position detection patterns are substantially equal to each other. When judging that the minimum units forming the selected at least two position detection patterns are substantially equal to each other, the position specifying unit specifies a position of a two-dimensional code using the selected at least two position detection patterns.
Description

BRIEF DESCRIPTION OF THE DRAWINGS

Exemplary embodiment s of invention will be described in detail based on the following figures, wherein:



FIG. 1 is a diagram showing a configuration of a system that executes a two-dimensional code detection method according to an exemplary embodiment;



FIG. 2 is a flowchart explaining a process procedure of the entire system according to the exemplary embodiment;



FIG. 3 is a flowchart for detecting a combination of position detection patterns, according to a first exemplary embodiment;



FIG. 4 is a schematic diagram explaining a method for calculating a module size from center coordinates of the position detection pattern;



FIG. 5 is a schematic diagram explaining distance values dxi and dyi;



FIG. 6 is a flowchart (part 1) for judging whether or not three points form an isosceles right triangle;



FIG. 7 is a flowchart (part 2) for judging whether or not the three points form the isosceles right triangle;



FIG. 8 is a schematic diagram showing an inclined position detection pattern;



FIG. 9 is a schematic drawings (part 1) explaining calculation of the inclination;



FIG. 10 is a schematic drawings (part 1) explaining the calculation of the inclination;



FIG. 11 is a flowchart explaining a third exemplary embodiment;



FIG. 12 is a schematic diagram showing an example of a QR code having model number 40; and



FIG. 13 is a schematic diagram explaining to judge based on distances, whether or not there is possibility that position detection patterns constitute the same QR code.


Claims
  • 1. A two-dimensional-code detection system comprising: a reading unit that reads an image including plural two-dimensional codes;a recognizing unit that recognizes position detection patterns of the respective two-dimensional codes from the image, which includes the plural two-dimensional codes and is read by the reading unit;a calculating unit that selects at least two of the position detection patterns of the plural two-dimensional codes read by the reading unit, the calculating unit that calculates a minimum unit forming each of the selected position detection patterns; anda position specifying unit that judges whether or not the minimum units forming the selected at least two position detection patterns are substantially equal to each other, wherein:when judging that the minimum units forming the selected at least two position detection patterns are substantially equal to each other, the position specifying unit specifies a region of a two-dimensional code using the selected at least two position detection patterns.
  • 2. The system according to claim 1, wherein the two-dimensional codes are QR codes.
  • 3. The system according to claim 1, wherein: the calculating unit scans each of the selected position detection patterns in at least one direction to detect number of continuous ON pixels and number of continuous OFF pixels, andthe calculating unit calculates the minimum unit forming each of the selected position detection patterns based on the detected number of the continuous ON pixels and the detected number of the continuous OFF pixels.
  • 4. The system according to claim 1, wherein: the calculating unit scans each of the selected position detection patterns along a virtual straight line passing through a center of the selected position detection patterns to obtain pixel-change positions at which pixel values change between ON and OFF,the calculating unit calculates distances between respective adjacent pixel-change positions, andthe calculating unit calculates the minimum unit forming each of the selected position detection patterns based on the detected number based on the calculated distances.
  • 5. The system according to claim 1, wherein: the calculating unit scans the image including the two-dimensional codes, in one direction plural times to calculate a rotational shift of the two-dimensional codes based on arrangement of at least one of ON pixels and OFF pixels, which are detected in each scanning, andthe calculating unit corrects the rotational shift of the two-dimensional codes and then, calculates the minimum unit forming each of the selected position detection patterns.
  • 6. The system according to claim 1, wherein: the calculating unit calculates an inclination angle of at least one of the selected position detection patterns with respect to a horizontal direction of the read image, andthe calculating unit corrects a rotational shift of the selected position detection patterns based on the calculated inclination angle.
  • 7. The system according to claim 6, wherein: the calculating unit calculates an angle between one of outermost contour lines of the at least one of the selected position detection patterns and a first virtual line, which is perpendicular to a second virtual line passing through a center of the at least one of the selected position detection patterns, as the inclination angle.
  • 8. The system according to claim 7, wherein: the calculating unit scans the at least one of the selected position detection patterns in one direction with a window having a size of plural pixels to detect the one of the outermost contour lines.
  • 9. The system according to claim 1, wherein: the calculating unit calculates a distance between the selected position detection patterns,the position specifying unit judges whether or not the calculated distance exceeds a predetermined value, andwhen judging that the calculated distance does not exceed the predetermined value, the position specifying unit specifies the position of the two-dimensional code using the selected at least two position detection patterns.
  • 10. The system according to claim 1, wherein: the calculating unit calculates a distance between the selected position detection patterns,the position specifying unit judges whether or not the calculated distance exceed a maximum value that a two-dimensional code can take as a distance between position detection patterns, andwhen judging that the calculated distance does not exceed the maximum value, the position specifying unit specifies the position of the two-dimensional code using the selected at least two position detection patterns
  • 11. A computer readable medium storing a program causing a computer to execute a process for detecting a two-dimensional code, the process comprising: reading an image including plural two-dimensional codes;recognizing position detection patterns of the respective two-dimensional codes from the read image, which includes the plural two-dimensional codes;selecting at least two of the position detection patterns of the plural two-dimensional codes;calculating a minimum unit forming each of the selected position detection patterns;judging whether or not the minimum units forming the selected at least two position detection patterns are substantially equal to each other, andwhen it is judged that the minimum units forming the selected at least two position detection patterns are substantially equal to each other, specifying a position of a two-dimensional code using the selected at least two position detection patterns.
  • 12. The computer readable medium according to claim 11, further comprising: calculating a distance between the selected position detection patterns; andjudging whether or not the calculated distance exceeds a predetermined value, wherein:when it is judged that the calculated distance does not exceed the predetermined value, the specifying specifies the position of the two-dimensional code using the selected at least two position detection patterns.
  • 13. The computer readable medium according to claim 11, further comprising: calculating a distance between the selected position detection patterns; andjudging whether or not the calculated distance exceed a maximum value that a two-dimensional code can take as a distance between position detection patterns, wherein:when it is judged that the calculated distance does not exceed the maximum value, the specifying specifies the position of the two-dimensional code using the selected at least two position detection patterns.
  • 14. A computer data signal embodied in a carrier wave for enabling a computer to perform a process for detecting a two-dimensional code, the process comprising: reading an image including plural two-dimensional codes;recognizing position detection patterns of the respective two-dimensional codes from the read image, which includes the plural two-dimensional codes;selecting at least two of the position detection patterns of the plural two-dimensional codes;calculating a minimum unit forming each of the selected position detection patterns;judging whether or not the minimum units forming the selected at least two position detection patterns are substantially equal to each other, andwhen it is judged that the minimum units forming the selected at least two position detection patterns are substantially equal to each other, specifying a position of a two-dimensional code using the selected at least two position detection patterns.
Priority Claims (1)
Number Date Country Kind
P2006-033216 Feb 2006 JP national