JP2014085777A - Two-dimensional code, method of generating two-dimensional code, and method of reading two-dimensional code - Google Patents
Two-dimensional code, method of generating two-dimensional code, and method of reading two-dimensional code Download PDFInfo
- Publication number
- JP2014085777A JP2014085777A JP2012233406A JP2012233406A JP2014085777A JP 2014085777 A JP2014085777 A JP 2014085777A JP 2012233406 A JP2012233406 A JP 2012233406A JP 2012233406 A JP2012233406 A JP 2012233406A JP 2014085777 A JP2014085777 A JP 2014085777A
- Authority
- JP
- Japan
- Prior art keywords
- cell
- color
- dimensional code
- extended
- level data
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Abstract
Description
本発明は、限られた者のみ読取可能な秘匿情報を含む二次元コードに関する。 The present invention relates to a two-dimensional code including confidential information that can be read only by a limited number of persons.
一般的な二次元コードは規格が統一されており、携帯電話等でデータを読み取って、誰でも記録された内容を知り得るように構成されている。一方で、特別な権限を有する者のみが読める秘匿情報を含む二次元コードも提案されている(例えば、特許文献1)。特許文献1に記載の二次元コードは、公開情報を符号化したデータコードを配置し、データコードの終端を示す終端パターンを配置した後の残余領域に、秘匿情報を符号化したデータコードを配置することにより、通常の二次元コードリーダーでは秘匿情報を読み取れないようにしている。
A standard two-dimensional code is standardized, and anyone can read the data with a mobile phone or the like to know the recorded contents. On the other hand, a two-dimensional code including confidential information that can be read only by a person having special authority has also been proposed (for example, Patent Document 1). The two-dimensional code described in
ところで、上記特許文献1に記載の二次元コードでは、通常、公開情報を符号化したデータコードを配置する領域に、秘匿情報のデータコードも配置することとなるため、公開情報のデータ量を制限しなければならず、また、秘匿情報に関しても記録可能なデータ量が少ないという問題がある。
By the way, in the two-dimensional code described in
本発明はかかる現状に鑑みて為されたものであり、公開情報のデータ量を制限せずに、比較的多くの秘匿情報を記憶可能な二次元コードの提供を目的とする。 The present invention has been made in view of the present situation, and an object of the present invention is to provide a two-dimensional code capable of storing a relatively large amount of confidential information without limiting the amount of public information.
本発明は、明色と識別されるセルと暗色と識別されるセルとをマトリクス状に配置してなる二次元コードであって、少なくとも一部のセルが、該セルより微細なサブセルによってマトリクス状に細分された拡張セルであり、該拡張セルは、少なくとも所定割合のサブセルが、明色と暗色から選ばれるセル色で配色されることにより、セル単位で色を識別した時に、拡張セルの色が前記セル色であると識別され得るよう構成されており、また、前記セル色に配色されるサブセルが前記所定割合を下回らない範囲内で、サブセルが明色と暗色のいずれかに選択的に配色されており、セル単位の配色パターンによって記録されるセルレベルデータと、サブセル単位の配色パターンによって記録されるサブセルレベルデータの少なくとも二種類の情報を含むことを特徴とする二次元コードである。 The present invention provides a two-dimensional code in which cells identified as light colors and cells identified as dark colors are arranged in a matrix, and at least some of the cells are arranged in a matrix by subcells finer than the cells. The expanded cells are subdivided into cell colors, and at least a predetermined percentage of the subcells are arranged in a cell color selected from light and dark colors, so that the color of the expanded cell is identified. Can be identified as the cell color, and the subcell is selectively selected from the light color and the dark color within a range in which the subcells arranged in the cell color do not fall below the predetermined ratio. At least two types of information: cell level data that is color-coded and recorded by a cell-based color pattern, and sub-cell level data that is recorded by a sub-cell color pattern A two-dimensional code, which comprises.
かかる構成にあっては、拡張セルは、サブセルの所定割合以上がセル色で配色されているため、既存の二次元コードリーダーで拡張セル単位の色を測定した時に、当該拡張セルがセル色であると識別される。すなわち、既存の二次元コードリーダーに対しては、拡張セルは、セル単位の明暗によって1ビットのデータを表す通常のセルと同様に機能する。このように、本発明の二次元コードでは、通常のセルと拡張セルのセル単位の明暗は、既存の二次元コードリーダーで識別可能であるため、セル単位の配色パターンによって記録されるセルレベルデータは、既存の二次元コードリーダーで読取可能な公開情報にすることができる。 In such a configuration, the extended cells are arranged in the cell color at a predetermined ratio or more of the subcells. Therefore, when the color of the extended cell unit is measured with an existing two-dimensional code reader, the extended cell is displayed in the cell color. Is identified. In other words, for an existing two-dimensional code reader, an extended cell functions in the same manner as a normal cell that represents 1-bit data by contrast in cell units. As described above, in the two-dimensional code of the present invention, since the brightness of the cell unit of the normal cell and the extended cell can be identified by the existing two-dimensional code reader, the cell level data recorded by the color arrangement pattern of the cell unit. Can be made public information that can be read by an existing two-dimensional code reader.
一方、拡張セルは、セル単位の色で1ビットのデータを表すだけでなく、サブセル単位の配色パターンによって、セル単位の色とは異なるデータを表すことができる。既存の二次元コードリーダーはセルのサイズでしか明暗を識別しないため、このサブセル単位の配色パターンは、既存の二次元コードリーダーでは識別不能である。このため、本発明にあっては、サブセル単位の配色パターンによって記録されるサブセルレベルデータは、既存の二次元コードリーダーでは読取不能な秘匿情報にすることができる。このように、本発明の二次元コードは、公開情報をセル単位の配色パターンによって記録し、秘匿情報をサブセル単位の配色パターンによって記録することができるから、公開情報の情報量を制限することなく、多量の秘匿情報を記録できるという利点がある。 On the other hand, an extended cell can represent not only 1-bit data in a cell unit color but also data different from a cell unit color by a sub-cell unit color arrangement pattern. Since the existing two-dimensional code reader identifies light and dark only by the cell size, this sub-cell unit color arrangement pattern cannot be identified by the existing two-dimensional code reader. For this reason, in the present invention, the subcell level data recorded by the color arrangement pattern in units of subcells can be confidential information that cannot be read by an existing two-dimensional code reader. As described above, the two-dimensional code of the present invention can record public information with a color scheme in units of cells and record secret information with a color scheme in units of subcells, so that the amount of information of public information is not limited. There is an advantage that a large amount of secret information can be recorded.
発明者の研究によれば、拡張セルを構成するサブセルは、少なくとも半数を超えるサブセルをセル色とする必要があり、好ましくは75%以上が望ましい。75%以上のサブセルがセル色であれば、残りの25%未満のサブセル全てがセル色の反対色で配色されている場合でも、二次元コードリーダーで拡張セルの色をセル単位で識別した時に、当該拡張セルがセル色であると確実に識別できる。 According to the inventor's research, it is necessary that at least half of the subcells constituting the extended cell have the cell color, and preferably 75% or more. If 75% or more of the sub-cells are cell colors, even if all of the remaining sub-cells of less than 25% are colored with the opposite color of the cell color, when the color of the extended cell is identified on a cell basis by the two-dimensional code reader , The extended cell can be reliably identified as the cell color.
本発明にあって、各拡張セルは、サブセルが前記セル色で統一して配色される固定部と、サブセルの配色パターンによってサブセルレベルデータを記録する可変部とを備える構成が提案される。 In the present invention, a configuration is proposed in which each extended cell includes a fixed unit in which sub-cells are uniformly arranged in the cell color, and a variable unit that records sub-cell level data according to the sub-cell color arrangement pattern.
かかる構成によれば、拡張セルのセル単位の色を確実に識別可能としつつ、サブセル単位の配色パターンによってデータを適切に記録可能となる。 According to such a configuration, it is possible to appropriately record data by using a color arrangement pattern in units of subcells while reliably identifying the color in units of cells of the extended cells.
また、本発明にあって、前記固定部は、拡張セルの少なくとも中央部に設けられることが提案される。 Moreover, in this invention, it is proposed that the said fixing | fixed part is provided in the at least center part of an expansion cell.
多くの二次元コードリーダーでは、撮像した二次元コードの画像からセルの領域を切り出した後に、セルの中央部付近の色を重視して当該セルが明色と暗色のいずれであるかを識別するため、かかる構成のように、拡張セルの中央部を固定部とし、拡張セルの中央部が常にセル色となるようにすれば、既存の二次元コードリーダーで拡張セルの色をより確実に識別可能となる。 In many two-dimensional code readers, after extracting a cell area from a captured two-dimensional code image, the color near the center of the cell is emphasized to identify whether the cell is light or dark Therefore, if the central part of the extended cell is a fixed part and the central part of the extended cell always has the cell color as in this configuration, the color of the extended cell can be more reliably identified with the existing two-dimensional code reader. It becomes possible.
また、本発明にあって、各拡張セルの可変部の配色パターンが、誤り検出訂正符号のデータ部及び訂正符号部の1又は0に対応していることが提案される。 Further, in the present invention, it is proposed that the color arrangement pattern of the variable part of each extended cell corresponds to 1 or 0 of the data part and the correction code part of the error detection and correction code.
すなわち、かかる構成にあっては、色の読み取りエラーを拡張セル単位で検出・訂正することが可能であるため、セルレベルデータ及びサブセルレベルデータを一層確実に読み取ることが可能となる。 That is, in such a configuration, it is possible to detect and correct a color reading error in units of extended cells, so that it is possible to more reliably read cell level data and subcell level data.
また、本発明にあって、拡張セルの可変部は8個のサブセルによって構成されており、当該8個のサブセルは、8ビット長の拡張ハミング符号の符号配列の中で、全て0となる符号配列と全て1となる符号配列とを除く14通りの符号配列のいずれかに相当する配色パターンを示すことが提案される。 In the present invention, the variable part of the extended cell is composed of eight subcells, and the eight subcells are codes that are all 0 in the code array of the extended Hamming code having an 8-bit length. It is proposed to show a color arrangement pattern corresponding to any of the 14 code arrangements excluding the arrangement and the code arrangement of all ones.
かかる構成にあっては、拡張セルのサブセルに記録されるデータは、1ビット誤り訂正と2ビット誤り検出の能力を有することとなる。ここで、8ビット長の拡張ハミング符号は、4ビットのデータビットと、3ビットの訂正ビットと、1ビットのパリティビットで構成され、16通りの配列を備えるが、全て0及び全て1となる符号配列を除くと、残る14通りの配列は、8ビット中の4ビットが「1」で、残りの4ビットが「0」となる配置である。一般的なデータ通信とは異なり、サブセルの色を読み誤る場合は、汚れ等でセルを構成するサブセルが全て暗色(又は明色)と識別される場合など、サブセルの明暗の比率が変化する場合が殆どである。このため、かかる構成では、3個以上のサブセルで読取りエラーが生じた場合でも、殆ど全ての読取りエラーを検出できる。 In such a configuration, the data recorded in the subcell of the extended cell has the ability of 1-bit error correction and 2-bit error detection. Here, the 8-bit extended Hamming code is composed of 4 data bits, 3 correction bits, and 1 parity bit, and has 16 arrays, all 0 and all 1. Excluding the code array, the remaining 14 arrays are arranged such that 4 of the 8 bits are “1” and the remaining 4 bits are “0”. Unlike general data communication, when the sub-cell color is misread, the sub-cell light / dark ratio changes, such as when all the sub-cells constituting the cell are identified as dark (or light) due to dirt, etc. Is most. For this reason, in such a configuration, even when a read error occurs in three or more subcells, almost all read errors can be detected.
また、本発明にあって、拡張セルは、サブセルによって縦横4列又は縦横5列のマトリクス状に分割されていることが提案される。 Further, in the present invention, it is proposed that the expansion cells are divided into sub-cells in a matrix of 4 columns in the vertical direction and 5 columns in the vertical and horizontal directions.
発明者の研究によれば、拡張セルを縦横2列や縦横3列のサブセルに分割した場合は、セル単位の色の識別が比較的困難となり、また、小さな二次元コードの場合には、拡張セルの一辺を6個以上のサブセルに分割すると、カメラ解像度の低い二次元コードリーダーでは読取困難となり、また、解像度の低いプリンタで印刷困難となる。このため、かかる構成とすれば、セル単位の配色パターンと、サブセル単位の配色パターンとを適切に読み取り得る二次元コードを実現できる。 According to the inventor's research, when the extended cell is divided into sub-cells of vertical and horizontal columns or vertical and horizontal columns, it is relatively difficult to identify the color of the cell unit. If one side of a cell is divided into six or more subcells, it will be difficult to read with a two-dimensional code reader with low camera resolution, and it will be difficult to print with a printer with low resolution. For this reason, with this configuration, it is possible to realize a two-dimensional code that can appropriately read the color arrangement pattern in units of cells and the color arrangement pattern in units of subcells.
また、本発明にあって、セルレベルデータを記録する符号化領域と、光学的読取りを補助するパターンを構成する固定領域とを備えるものであり、拡張セルは、固定領域に設けられず、符号化領域に設けられていることが提案される。 Further, in the present invention, it is provided with a coding area for recording cell level data and a fixed area constituting a pattern for assisting optical reading, and the expansion cell is not provided in the fixed area. It is proposed that it is provided in the conversion area.
かかる構成にあっては、固定領域については、セルの色を識別容易な通常のセルによって構成されるから、二次元コードを読み取る際に、画像の中の二次元コードを速やかに識別し、符号化領域に記録されるデータを読み取ることが可能となる。 In such a configuration, the fixed region is configured by a normal cell in which the cell color can be easily identified. Therefore, when the two-dimensional code is read, the two-dimensional code in the image is quickly identified, It becomes possible to read the data recorded in the conversion area.
また、本発明にあって、符号化領域にあって、セルレベルデータを記録しない残余領域に、拡張セルを含むことを示す識別コードがセル単位の配色パターンによって記録されていることが提案される。 Further, in the present invention, it is proposed that an identification code indicating that an extended cell is included is recorded in a color arrangement pattern in units of cells in a remaining area where no cell level data is recorded in the encoding area. .
かかる構成にあっては、通常のセルのみからなる二次元コードであるのか、拡張セルを含む二次元コードであるのかを、サブセルの存在を光学的に識別することなく、セル単位の配色パターンにより判別可能となる。このため、かかる構成によれば、二次元コードの読取時に、拡張セルを含む二次元コードであるか否かを容易に判別可能となる。 In such a configuration, whether it is a two-dimensional code consisting only of normal cells or a two-dimensional code including an extended cell is determined by a cell-based color arrangement pattern without optically identifying the presence of subcells. Discrimination becomes possible. For this reason, according to this configuration, it is possible to easily determine whether or not the two-dimensional code includes an extended cell when reading the two-dimensional code.
また、上記二次元コードの生成方法として、セルレベルデータを符号化する第一の符号化ステップと、サブセルレベルデータを符号化する第二の符号化ステップと、符号化したサブセルレベルデータを、拡張セルごとに記録する記録単位に分割し、該記録単位のサブセルレベルデータの内容と、拡張セルの可変部の配色パターンとを対応付けした符号化テーブルに基づいて、記録単位のサブセルレベルデータを可変部の配色パターンに変換する第三の符号化ステップとを実行することが提案される。 In addition, as the two-dimensional code generation method, a first encoding step for encoding cell level data, a second encoding step for encoding subcell level data, and the encoded subcell level data are expanded. The subcell level data of the recording unit is variable based on the encoding table in which the contents of the subcell level data of the recording unit is associated with the color scheme of the variable part of the extended cell. It is proposed to perform a third encoding step that converts to a partial color scheme.
かかる方法にあっては、二次元コードの色をサブセル単位で識別可能な装置を用いたとしても、符号化テーブルの内容を知らなければ、可変部の配色パターンをサブセルレベルデータに復号することができないため、二次元コードに記録するサブセルレベルデータの秘匿性を高めることができる。 In such a method, even if a device that can identify the color of the two-dimensional code in units of subcells is used, if the contents of the encoding table are not known, the color arrangement pattern of the variable part can be decoded into subcell level data. Therefore, the confidentiality of the subcell level data recorded in the two-dimensional code can be improved.
また、上記二次元コードの生成方法にあって、符号化テーブルは、該記録単位のサブセルレベルデータの内容と、拡張セルの可変部の配色パターンとを一対多に対応付けしたものであり、第三の符号化ステップでは、符号化テーブルに基づいて、記録単位のサブセルレベルデータの内容に対応する、可変部の配色パターンを変換候補として複数抽出し、複数の変換候補のいずれかの配色パターンに変換することが提案される。 In the two-dimensional code generation method, the encoding table is a one-to-many correspondence between the contents of the sub-cell level data of the recording unit and the color arrangement pattern of the variable part of the extended cell. In the encoding step, based on the encoding table, a plurality of variable portion color patterns corresponding to the contents of the sub-cell level data of the recording unit are extracted as conversion candidates and converted to any one of the plurality of conversion candidates. Proposed to do.
かかる構成にあっては、サブセルの配色パターンから符号化テーブルの内容を推測し難くなるため、サブセルレベルデータの秘匿性をさらに向上させることができる。 In such a configuration, it is difficult to guess the content of the coding table from the sub-cell color arrangement pattern, so that the confidentiality of the sub-cell level data can be further improved.
また、上記生成方法にあって、第三の符号化ステップでは、変換候補として抽出した複数の可変部の配色パターンから、変換する配色パターンを決定する際に、乱数を用いて、各変換候補の選択確率が略等しくなるようにすることが提案される。 Further, in the above generation method, in the third encoding step, when determining a color arrangement pattern to be converted from the color arrangement patterns of a plurality of variable parts extracted as conversion candidates, random numbers are used to determine the conversion candidate. It is proposed that the selection probabilities be approximately equal.
かかる構成にあっては、可変部の配色パターンが変換候補の中から不規則に選択されることとなるから、符号化テーブルの内容が一層推測され難くなって、セルレベルデータの解読可能性を低減させることができる。 In such a configuration, the color scheme pattern of the variable part is irregularly selected from the conversion candidates, so that the contents of the encoding table are more difficult to guess, and the cell level data can be decoded. Can be reduced.
また、上記生成方法にあって、第一の符号化ステップと第二の符号化ステップでは、セルレベルデータとサブセルレベルデータを同じ方式で符号化することが提案される。 In the above generation method, in the first encoding step and the second encoding step, it is proposed that the cell level data and the sub cell level data are encoded by the same method.
かかる構成にあっては、第一の符号化ステップと第二の符号化ステップで、共通するアルゴリズムを用いてデータを符号化できるから、二次元コードの生成プログラムを単純化できるという利点がある。また、セルレベルデータとサブセルレベルデータを復号する時も、共通のアルゴリズムを使用できるから、二次元コードの読取プログラムも単純化できるという利点がある。 In such a configuration, since data can be encoded using a common algorithm in the first encoding step and the second encoding step, there is an advantage that a two-dimensional code generation program can be simplified. In addition, since a common algorithm can be used when decoding cell level data and subcell level data, there is an advantage that a two-dimensional code reading program can be simplified.
また、拡張セル単位で誤り検出可能な二次元コードの読取方法としては、二次元コードを撮像する撮像ステップと、撮像した二次元コードから各拡張セルのセル単位の配色パターン及びサブセル単位の配色パターンを識別する色識別ステップと、各拡張セルのサブセル単位の配色パターンから、当該配色パターンによって記録されたサブセルレベルデータを復号するとともに、読取りエラーを検出した拡張セルを記憶するサブセル復号ステップと、セル単位の配色パターンから、該配色パターンによって記録されたセルレベルデータを復号するセル復号ステップとを備え、セル復号ステップでは、サブセル復号ステップで読み取りエラーが検出された拡張セルについては、当該拡張セルの色を明色又は暗色と推定するセル色推定処理を行い、該セル色推定処理で推定した色を用いてセルレベルデータの復号を行う方法が提案される。 In addition, as a reading method of a two-dimensional code capable of detecting an error in an extended cell unit, an imaging step for imaging a two-dimensional code, a cell unit color scheme pattern and a sub cell unit color scheme pattern from each captured two-dimensional code A sub-cell decoding step for decoding the sub-cell level data recorded by the color arrangement pattern from the color arrangement pattern in units of sub-cells of each extended cell and storing the extended cell in which the read error is detected; A cell decoding step for decoding the cell level data recorded by the color arrangement pattern from the unit color arrangement pattern, and in the cell decoding step, for an extended cell in which a reading error is detected in the subcell decoding step, Perform a cell color estimation process to estimate the color as light or dark, Method for performing decoding of the cell-level data by using the color estimated by the cell color estimating process is proposed.
一般的に、二次元コードに記録されるデータコード列は誤り訂正コードを含み、所定割合までであれば、セルの色を読み誤ってもデータコード列の情報を読み取ることができるが、従来の二次元コードでは、どのセルの色を読み誤ったかまでは判別不能であるため、セルの色の読み誤りが所定割合を超えると、情報を読み取ることができない。これに対して、本発明の二次元コードにあって、拡張セル単位でサブセルに誤り検出訂正符号を記録したものであれば、どの拡張セルで誤りが発生したかを判別できるため、読取りエラーが所定範囲を超えた場合でも、読み取り可能となる場合がある。 In general, a data code string recorded in a two-dimensional code includes an error correction code, and if it is up to a predetermined ratio, data code string information can be read even if a cell color is read incorrectly. In the two-dimensional code, it is impossible to determine which cell color has been read incorrectly, so information cannot be read if the cell color reading error exceeds a predetermined ratio. On the other hand, in the two-dimensional code of the present invention, if an error detection and correction code is recorded in a subcell in units of extended cells, it is possible to determine in which extended cell an error has occurred, so that a read error is generated. Even if it exceeds the predetermined range, it may be readable.
セル色推定処理では、サブセル復号ステップで読み取りエラーが検出された拡張セルについて、当該拡張セルの色が明色と暗色のいずれであるかを、乱数を用いて推定し、セル復号ステップでは、セルレベルデータの復号に成功するか、又は所定の上限回数に達するまでセル色推定処理を繰り返すことが提案される。 In the cell color estimation process, for the extended cell in which a reading error is detected in the subcell decoding step, the color of the extended cell is estimated using a random number. In the cell decoding step, the cell is estimated. It is proposed to repeat the cell color estimation process until the level data is successfully decoded or a predetermined upper limit is reached.
かかる方法によれば、セル色推定処理を繰り返すことによって、読取りエラーが検出された拡張セルの色をより高確率で正答可能となるから、セルレベルデータの誤り訂正機能を向上させることができる。例えば、二次元コードのセルの色は、明色と暗色が概ね半数ずつ分布しているため、乱数に基づいて白色か黒色かを1回推定するだけでは、読取りエラーが検出された拡張セルの約50%の色しか正答することができないが、セル色仮決定処理を100回を上限として繰り返せば、読取りエラーが検出された拡張セルの約56%の色を正答可能となる。 According to such a method, by repeating the cell color estimation process, it is possible to correctly answer the color of the extended cell in which the reading error is detected with higher probability, so that the cell level data error correction function can be improved. For example, since the colors of the cells of the two-dimensional code are approximately half each of light and dark colors, it is only necessary to estimate once whether white or black based on a random number. Only about 50% of the colors can be correctly answered. However, if the cell color provisional decision process is repeated up to 100 times, it is possible to correctly answer about 56% of the extended cells in which a reading error has been detected.
また、本発明の二次元コードの読取方法としては、二次元コードを第一の投光手段で照らして撮像する第一撮像ステップと、該第一撮像ステップで撮像された二次元コードの画像を解析し、二次元コードに拡張セルが存在するか否かを判定する拡張セル判別ステップとを実行し、さらに、拡張セル判別ステップで二次元コードに拡張セルが存在しないと判定した場合は、第一撮像ステップで撮像した二次元コードの画像に基づいて、二次元コードを復号する第一復号ステップを実行し、拡張セル判別ステップで二次元コードに拡張セルが存在すると判定した場合は、第一の投光手段よりも強い光を放つ第二の投光手段で照らし、第一撮像ステップよりも短い露光時間で二次元コードを撮像する第二撮像ステップと、第二撮像ステップで撮像された二次元コードの画像に基づいて、二次元コードを復号する第二復号ステップとを実行することを特徴とする二次元コードの読取方法も提案される。 The two-dimensional code reading method of the present invention includes a first imaging step of capturing an image by illuminating the two-dimensional code with a first light projecting means, and an image of the two-dimensional code captured in the first imaging step. Analyzing and executing an extended cell determination step for determining whether or not there is an extended cell in the two-dimensional code, and if it is determined in the extended cell determination step that there is no extended cell in the two-dimensional code, If the first decoding step of decoding the two-dimensional code is executed based on the image of the two-dimensional code imaged in one imaging step, and the extended cell determination step determines that an extended cell exists in the two-dimensional code, Illuminated by the second light projecting means that emits light stronger than the first light projecting means, and imaged in the second image capturing step, the second image capturing step capturing an image of the two-dimensional code with an exposure time shorter than the first image capturing step. Based on the image of the two-dimensional code, also the second decoding step and reading method of the two-dimensional code and executes a to decode the two-dimensional code is proposed.
かかる方法にあって、第二撮像ステップでは、明るい条件で露光時間を短くすることにより手振れ等の影響を軽減でき、第一撮像ステップより鮮明な画像を得ることができる。一方で、第二撮像ステップは、二次元コードを明るく照らす分だけ消費電力が大きくなる。そして、かかる方法では、まず、第一撮像ステップを行い、より鮮明な画像が必要な、拡張セルを含む二次元コードであるか否かを判定し、拡張セルを含む二次元コードである場合のみ、第二の撮像ステップを行うため、不必要な二次元コードに対して第二撮像ステップを行うのを防止し、消費電力を低減できるという利点がある。 In such a method, in the second imaging step, the influence of camera shake or the like can be reduced by shortening the exposure time under bright conditions, and a clearer image can be obtained than in the first imaging step. On the other hand, in the second imaging step, the power consumption increases as much as the two-dimensional code is brightly illuminated. In such a method, first, the first imaging step is performed, and it is determined whether or not the two-dimensional code including the extended cell, which requires a clearer image. Only when the two-dimensional code includes the extended cell. Since the second imaging step is performed, there is an advantage that it is possible to prevent the second imaging step from being performed on an unnecessary two-dimensional code and to reduce power consumption.
以上に述べたように、本発明の二次元コードによれば、公開情報のデータ量を制限せずに、多くの秘匿情報を記録可能となる。 As described above, according to the two-dimensional code of the present invention, it is possible to record a large amount of secret information without limiting the data amount of public information.
本発明の実施形態を、以下の実施例に従って説明する。 Embodiments of the present invention are described according to the following examples.
本実施例の二次元コード1は、QRコード(登録商標)に本発明を適用したものである。具体的には、図1(a)に示すように、本実施例の二次元コード1は、QRコードリーダーによって明色又は暗色と識別されるセル2a,2bをマトリクス状に配置してなるものである。この二次元コード1にあって、セル単位の配色パターンによって形成される構成は、QRコードと略共通している。すなわち、図1(b)に示すように、二次元コード1は、QRコードと同様に、機能パターン(固定領域)3と符号化領域4とによって構成される。機能パターン3は、二次元コード1の光学的読取りを補助する、配色パターンが予め定められた領域であり、位置検出パターン5、分離パターン6、タイミングパターン7などによって構成される。また、符号化領域4は、セルの配色パターンによってデータを記録する領域であり、データコード及び誤り訂正コードが配置されるデータコード領域8と、形式情報を示すコードが配置される形式情報コード領域9とによって構成される。こうした構成は、基本的にJIS規格(JIS X 0510:2004)に準拠しているため詳細な説明は省略する。
The two-
本実施例にあって、二次元コード1を構成するセル2a,2bは、通常セル2aと拡張セル2bの二種類からなる。通常セル2aは、機能パターン3に配設され、通常のQRコードのセルと同じように、全域が白色(明色)又は黒色(暗色)で配色される。一方、拡張セル2bは、符号化領域4に配設され、図2に示すように、拡張セル2bよりも小さいサブセル10に細分されて、サブセル単位で白色又は黒色に配色される。
In this embodiment, the
拡張セル2bは、図3(a)に示すように、縦4列、横4列の計16個のサブセル10に、マトリックス状に分割される。各拡張セル2bは、12個(75%)のサブセル10が、白色と黒色から選ばれるセル色で配色されており、これにより、QRコードリーダーによってセル単位で拡張セル2bの色を識別した時に、当該セル色が拡張セルの色として識別しされるよう構成されている。具体的には、拡張セル2bは、図3(a)に示すように、固定部11と可変部12とからなる。固定部11は、拡張セル2bを構成する16個のサブセル10のうち、中央部と四隅の8個のサブセル10によって構成される。この固定部11を構成するサブセル10は、セル色で統一して配色される。すなわち、明色と識別されるべき拡張セル2bでは、固定部11の8個のサブセル10は白色で統一され、暗色と識別されるべき拡張セル2bでは固定部11のサブセル10は黒色で統一される。一方、可変部12は、固定部11に含まれない外周部の8個のサブセル10によって構成される。可変部12のサブセル10は、8個のうち4個がセル色で選択的に配色され、残り4個がセル色の反対色で配色されるよう構成される。
As shown in FIG. 3A, the
図3(b)は、二次元コード1に含まれる拡張セル2bを例示したものであり、図中上半分の6個はセル色が白色の拡張セル2bであり、図中下半分の6個はセル色が黒色の拡張セル2bである。このように、拡張セル2bの可変部12は、8個のサブセル10のどれが白色で、どれが黒色となるかによって、70通りの配色パターンが存在しており、かかる拡張セル2bでは、可変部12におけるサブセル単位の配色パターンによってデータを記録可能となっている。また、拡張セル2bでは、可変部12の配色パターンに関わらず、固定部11と可変部12の12個(75%)のサブセル10がセル色で配色されることによって、QRコードリーダーで拡張セル2bの色をセル単位で識別した時に、拡張セル2bが当該セル色であると識別されるよう構成される。なお、QRコードリーダーの多くは、セル2a,2bの中央部の色を重視して当該セルが明色であるか暗色であるかを識別するため、本実施例では、拡張セル2bの中央部を固定部11とすることにより、QRコードリーダーで拡張セルの色を確実に識別し得るようにしている。
FIG. 3B illustrates an
このように、拡張セル2bは、セル単位の色(セル色)が白色(明色)と黒色(暗色)のいずれであるかによって1ビットの情報を記録でき、さらに、可変部12の配色パターンによって1ビット以上の情報を記録できる。ここで、既存のQRコードリーダーは、セル単位の色(セル色)は識別できるものの、サブセル単位で配色パターンを解析するプログラムがないため、可変部12の配色パターンによって記録される情報は読取不能である。この特徴を利用して、本実施例の二次元コード1では、セル単位の配色パターンによって独立したセルレベルデータが記録されるとともに、拡張セル2bの可変部12の配色パターンによってセルレベルデータとは異なるサブセルレベルデータが記録される。
Thus, the
具体的には、セルレベルデータは、QRコードの規格にしたがって、二次元コード1の符号化領域4に、拡張セル2bのセル単位の配色パターンとして記録される。そして、サブセルレベルデータは、同じ符号化領域4にあって、拡張セル2bの可変部12の配色パターンとして記録される。かかる二次元コード1を既存のQRコードリーダーに読み取らせた場合、符号化領域4では、拡張セル2b単位の配色パターンのみが識別されて、通常のQRコード同様にセルレベルデータが読み取られることとなる。なお、既存のQRコードリーダーは、サブセル単位の配色パターンを解析しないため、サブセル10の存在は無視される。このように、本実施例の二次元コード1は、既存のQRコードリーダーによって、セルレベルデータを読み取ることができるものであり、通常のQRコードと互換性を有している。一方で、二次元コード1に記録されるサブセルレベルデータは、既存のQRコードリーダーで読取不能であり、サブセルレベルデータに関しては一定の秘匿性を有している。このため、本実施例の二次元コード1では、公開情報をセルレベルデータとして記録し、秘匿情報をサブセルレベルデータとして記録することで、公開情報と秘匿情報を適切に記録できる。特に、本実施例では、秘匿情報(サブセルレベルデータ)は、セル単位の配色パターンとは独立した、サブセル単位の配色パターンとして記録されるため、秘匿情報の情報量によって、公開情報の情報量が制限されることがない。また、サブセル単位の配色パターンによれば、セル単位の配色パターンよりも多量の情報を記録できるから、本実施例の二次元コード1には、多量の秘匿情報を記録できるという利点がある。
Specifically, the cell level data is recorded in the
また、本実施例では、符号化領域4に拡張セル2bを配設し、二次元コード1の光学的読取りを補助する機能パターン(固定領域)3については、セル単位の色を識別容易な通常セル2aで構成しているため、二次元コード1を読み取る際に、撮像した画像の中から二次元コード1を速やかに識別して抽出できるという利点がある。
In this embodiment, the
また、本実施例では、図1に示すように、拡張セル2bを含む二次元コード1であることを示す識別コード8aが、セル単位の配色パターンによって記録される。具体的には、識別コード8aは、データコード領域8の中の埋草領域の所定箇所に設けられる。埋草領域は、データコード領域8にセルレベルデータを記録した後の残余領域であり、通常のQRコードでは、有効なデータが記録されない領域である。かかる識別コード8aによれば、セル単位の配色パターンを識別するだけで、拡張セル2bの有無を判別できるから、微細なサブセル10の有無を光学的に確認することなく、通常のQRコードであるのか、拡張セル2bを含む二次元コードであるのかを容易に判別可能となる。
In the present embodiment, as shown in FIG. 1, an
なお、本実施例の二次元コード1には、可変部12の配色パターンによって3セットのサブセルレベルデータを記録し得るよう構成されている。3セットのサブセルレベルデータは、符号化領域4の異なる領域に記録されるのではなく、符号化領域4の拡張セル2bに重複するように記録される。具体的には、符号化領域4を構成する各拡張セル2bは、各サブセルレベルデータを1ビットずつ記録し得るよう構成される。すなわち、二次元コード1にサブセルレベルデータを1セット記録する場合は、符号化されたサブセルレベルデータが各拡張セル2bに1ビット単位で記録される。また、3セットのサブセルレベルデータを二次元コード1に記録する場合は、各拡張セル2bに、1ビットのサブセルレベルデータが3セット(3ビット)記録されることとなる。かかるサブセルレベルデータの記録態様の詳細は、二次元コード1の生成方法によって説明する。
The two-
以下に、上記二次元コード1の生成方法について説明する。
図4は、上記二次元コード1を生成するフローチャートである。まず、ステップS100では、二次元コード1に記録すべきデータセットの準備を行う。データセットとは、セル(拡張セル)単位の配色パターンによって記録する1セットのセルレベルデータDS0と、サブセル単位の配色パターンによって記録される1〜3セットのサブセルレベルデータDS1、DS2,DS3である。
A method for generating the two-
FIG. 4 is a flowchart for generating the two-
次のステップS110では、セルレベルデータDS0について、通常のQRコードの生成手続きに則って二次元コード化し、QRコードの配色パターンに相当するコードA0を生成する。すなわち、このコードA0は、セルレベルデータDS0を記録するQRコードのデータそのものであり、このコードA0には、機能パターン3及び符号化領域4を構成するセル2a,2bの配色パターンが含まれる。この手続きは、規格化されたQRコードの手続きであるので、詳細な説明は省略する。
In the next step S110, the cell level data DS0 is two-dimensionally encoded in accordance with a normal QR code generation procedure, and a code A0 corresponding to a QR code color pattern is generated. That is, the code A0 is the QR code data itself for recording the cell level data DS0. The code A0 includes the
次のステップS120,S130では、サブセルレベルデータDS1,DS2,DS3について、通常のQRコードの生成手続きに則って二次元コード化し、QRの配色パターンに相当するコードA1,A2,A3を夫々生成する。すなわち、このコードA1,A2,A3は、サブセルレベルデータDS1,DS2,DS3を記録するQRコードのデータそのものである。なお、ここで生成するコードA1,A2,A3は、上記コードA0と合成し得るように、コードA0と同じ型式のQRコードとなるようにする。サブセルレベルデータDS1,DS2,DS3のコード化は、規格化されたQRコードの手続きと同じであるので、詳細な説明は省く。 In the next steps S120 and S130, the sub-cell level data DS1, DS2, and DS3 are two-dimensionally encoded in accordance with a normal QR code generation procedure, and codes A1, A2, and A3 corresponding to the QR color arrangement pattern are generated, respectively. . That is, the codes A1, A2, and A3 are QR code data that records the subcell level data DS1, DS2, and DS3. The codes A1, A2 and A3 generated here are QR codes of the same type as the code A0 so that they can be combined with the code A0. The encoding of the subcell level data DS1, DS2, DS3 is the same as the standardized QR code procedure, and thus detailed description is omitted.
ステップS130までの手続きによって、1セットのセルレベルデータDS0と、1〜3セットのサブセルレベルデータDS1,DS2,DS3を夫々記録するデータ上のQRコードA0,A1,A2,A3が得られる。上述のように、これらのQRコードA0〜A3は、夫々の機能パターンと符号化領域が重なり合うように同一型式で生成される。これらのQRコードA0〜A3を重なり合うセルごとに分割し、重なり合うセルごとにQRコードA0〜A3の色を合成し、上記二次元コード1のセル2a,2bの配色パターンに変換するのがステップS200の符号化処理である。なお、図4のフローチャートに示す二次元コードの生成方法にあって、本発明に係る第一の符号化ステップは、ステップS110によって主に実現される。また、本発明に係る第二の符号化ステップは、ステップS120によって主に実現される。また、本発明に係る第三の符号化ステップは、ステップS200によって主に実現される。
Through the procedure up to step S130, QR codes A0, A1, A2, A3 on data for recording one set of cell level data DS0 and one to three sets of sub cell level data DS1, DS2, DS3 are obtained. As described above, these QR codes A0 to A3 are generated in the same type so that the respective function patterns overlap with the encoding regions. The QR code A0 to A3 is divided for each overlapping cell, the colors of the QR codes A0 to A3 are synthesized for each overlapping cell, and converted into the color arrangement pattern of the
符号化処理S200では、QRコードA0,A1,A2,A3を合成することにより、二次元コード1の各セル2a,2bの配色パターンをサブセル単位まで決定する。具体的には、生成する二次元コード1の一辺のセル数をNとすると、二次元コード1全体では、N2個のセル2a,2bが存在し、QRコードA0,A1,A2,A3にも、N2個のセルの配色パターンが存在する。このN2個のセル全てについて、サブセル単位まで配色を決定する。より具体的には、QRコードの、縦のセルのインデックスをI,横のセルのインデックスをJとすると、I=1からN、J=1からNまでの組合せで全てのセルを表現できる。I,Jで示されるセルの色をC(I,J)で表現する。また、コードをA0,A1,A2,A3をKで示すとすると、C(I,J,K)で示すことが可能となる。ここで、Kは0から3である。
In the encoding process S200, by combining the QR codes A0, A1, A2, and A3, the color arrangement pattern of each
図5は、符号化処理の処理内容を示したフローチャートである。ステップS210では、IとJで指定されるセル2a,2bについて、それが機能パターン3を構成する通常セル2aであるか否かを判定する。そして、機能パターン3を構成する通常セル2aであると判定した場合はサブセル単位の配色パターンを決定する処理はスキップする。一方、符号化領域4を構成する拡張セル2bであると判定した場合は、次のステップS220でQRコードA0〜A3の配色パターンを読み込む。具体的には、C(I,J,K)(Kは0から3)の配色データを読み込み、各セルが0か1(白か黒)かを識別する。次に、ステップS230では、QRコードA1,A2,A3の当該セルの配色パターンを結合する。具体的には、3セットのQRコードA1,A2,A3の場合は、例えば白黒白(010)のように、三つの色の組合せを作る。この三つの色の組合せが、拡張セル2bごとに、可変部12の配色パターンとして記録するサブセルレベルデータの記録単位となる。
FIG. 5 is a flowchart showing the contents of the encoding process. In step S210, it is determined whether or not the
次に、ステップS240では、拡張セル2bごとの記録単位となる色の組合せから、可変部12の配色パターンの変換候補を抽出する。具体的には、図6に示すように、記録単位となるセルの色の組合せ(復号データ)と、可変部12の配色パターン(符号化データ)とを対応付けした符号化テーブルを予め用意しておき、当該符号化テーブルに基づいて、可変部12の配色パターンの候補を抽出する。例えば、拡張セル2bに記録するサブセルレベルデータが3セット(3ビット符号化)で、復号データが「白黒白」の場合は、「白黒白」の復号データに対応する符号化データが符号化テーブルから変換候補として抽出される。ここで、上述のように、可変部12は、8個のサブセルのいずれか4個が白色で、残り4個が黒色となるものであり、8C4すなわち70通りの配色パターン(符号化データ)が存在する。これに対して、可変部12の配色パターンによって記録する、セルの色の組合せ(復号データ)は最大8種類であるので、セルの色の一つの組合せ(復号データ)に対して、変換候補として抽出される可変部12の配色パターンは複数種類存在する。このため、続くステップS250、260では可変部12の配色パターンの変換候補が二つ以上ある場合は、乱数を発生させて、夫々の変換候補を選択する確率が略等しくなるようにして、可変部12の配色パターンを決定する。また、変換候補が一つしか割り当てられていない場合には、乱数を発生させることなく、それ変換候補を選択する。次に、ステップS270では、拡張セル2bのセル単位の色(セル色)、具体的にはC(I,J,0)が白色であるか否かを判定する。セル色が白色の場合には、決定した可変部12の配色パターンをそのまま埋め込む。一方、セル色が黒色の場合は、ステップS280で、可変部12の配色パターンを逆転させる。ステップS290では、すべてのセル2a,2bについて、上記の処理が完了したかを判定し、すべてのセル2a,2bの処理が完了した場合は符号化処理を終了する。
Next, in step S240, a color arrangement pattern conversion candidate of the
このように、本実施例の二次元コード1の生成方法では、セルレベルデータDS0及びサブセルレベルデータDS1,DS2,DS3を夫々QRコード化し、データ上のQRコードA0,A1,A2,A3を合成することによって、二次元コード1の配色をサブセル単位まで決定する。このように、かかる生成方法では、セルレベルデータとサブセルレベルデータの双方を、QRコードの符号化方式に則って符号化するため、セルレベルデータとサブセルレベルデータの符号化に共通のアルゴリズムを用いることにより、二次元コード1の生成プログラムを簡素化できるという利点がある。また、かかる生成方法によって生成された二次元コード1は、セルレベルデータとサブセルレベルデータの復号時にも共通のアルゴリズムを用いることができるから、二次元コード1の読取プログラムも簡素化できる。
As described above, in the method of generating the two-
また、かかる生成方法では、符号化テーブルを用いてサブセルレベルデータを可変部12の配色パターンに変換して記録している。符号化テーブルの内容は予め任意に定められるものであり、適用するシステム毎に内容が異なるため、この符号化テーブルを秘匿することにより、サブセルレベルデータを第三者から保護することができる。特に、上記符号化テーブルでは、一の復号データ(セルの色の組合せ)に対して、複数の符号化データ(可変部12の配色パターン)を対応させているから、二次元コード1から符号化テーブルの内容を推測され難いという利点がある。さらには、可変部12の配色パターンを複数の変換候補から決定する際に、乱数によって、各変換候補の選択確率が略等しくなるようにして、変換候補選択時の規則性を排しているため、符号化テーブルの推測が一層困難となっている。
In this generation method, the sub cell level data is converted into the color arrangement pattern of the
次に、上記実施例1の二次元コード1を、サブセルレベルデータDS1,DS2,DS3まで読み取り得る読取方法について説明する。
本実施例の読取方法は、二次元コード1を撮像する撮像ステップと、撮像した二次元コードから各拡張セル2bのセル単位の配色パターン及びサブセル単位の配色パターンを識別する色識別ステップと、各拡張セル2bのサブセル単位の配色パターンから、当該配色パターンによって記録されたサブセルレベルデータDS1,DS2,DS3を復号するサブセル復号ステップと、セル単位の配色パターンから、該配色パターンによって記録されたセルレベルデータを復号するセル復号ステップとを備えてなる。
Next, a reading method capable of reading the two-
The reading method of the present embodiment includes an imaging step for imaging the two-
また、本実施例の読取方法は、通常のQRコードと実施例1の二次元コード1の双方のデータを読取り可能なものであり、撮像ステップで撮像した二次元コードの画像を解析し、拡張セル2bを含む二次元コードであるか否かを判定する拡張セル判別ステップを実行する。ここで、実施例1の二次元コード1に記録された秘匿情報を読み取るためには、セルより微細なサブセル単位で配色パターンを識別する必要があり、通常のQRコードよりも精細な撮像が要求される。このため、本実施例の読取方法では、二段階の撮像ステップを実行する。すなわち、第一の撮像ステップでは、通常のQRコードを撮像する条件、すなわち、セル単位の明暗を識別し得る程度の条件で撮像を行う。そして、第一の撮像ステップで撮像した画像を解析して、撮像対象の二次元コードが、通常のQRコードか、拡張セルを含む二次元コードであるかを判別する。実施例1の二次元コード1には、拡張セル2bを含むことを示す識別コード8aがセル単位の配色パターンで記録されているため(図1(a)参照)、かかるステップでは、サブセル10の有無を光学的に確認することなく、拡張セル2bの有無を判別できる。そして、拡張セル2bを含まない通常のQRコードであると判定した場合は、第一の撮像ステップで撮像した画像を用いて二次元コード(QRコード)の解読を行う。一方、拡張セル2bを含む二次元コードであると判定した場合は、サブセル単位の配色パターンまで識別し得るような条件で第二の撮像ステップを実行する。具体的には、二次元コードリーダーに、光量の異なる二種類の投光装置(投光手段)を配設して、第一の撮像ステップでは、比較的暗めの投光装置を用いて撮像し、第二の撮像ステップでは、比較的明るめの投光装置を用いて、第一の撮像ステップより短い露出時間で撮像し、手ブレの影響を軽減することが挙げられる。なお、二種類の投光装置(投光手段)は、光量を複数段階に調節可能な投光装置によって構成することも可能である。
Further, the reading method of the present embodiment is capable of reading both the normal QR code and the two-
第二の撮像ステップで撮像した二次元コード1の画像は、セル単位で明色又は暗色のいずれであるか識別し、また、サブセル単位でも明色と暗色のいずれであるか識別する。そして、セル単位及びサブセル単位の配色パターンを全て識別したら、セルレベルデータDS0及びサブセルレベルデータDS1、DS2,DS3を復号する。セルレベルデータDS0は、セル単位で識別した配色パターンを、通常のQRコードと同様の手順で復号することによって得ることができる。サブセルレベルデータDS1、DS2,DS3については、可変部12の配色パターンによって記録されたサブセルレベルデータを、拡張セル2bごとに復号する。図7(a)は、可変部12の配色パターンの復号に用いられる復号テーブルである。この復号テーブルは、符号化データ(可変部12の配色パターン)と、復号データ(サブセルレベルデータ)とを対応付けたものであり、二次元コード1の生成時に使用する符号化テーブル(図6参照)と略同じ内容である。例えば、可変部12の配色パターンが「白白白白黒黒黒黒」である場合には、「黒白黒」の復号データに変換される。この復号データは、各サブセルレベルデータDS1、DS2,DS3を二次元コード化したQRコードA1,A2,A3のセルの色の組合せを表すものであり、これらを結合することによって、サブセルレベルデータDS1、DS2,DS3を夫々記録したQRコードA1,A2,A3が得られる。そして、これらのQRコードA1,A2,A3を、通常のQRコードと同様の手順で復号すれば、サブセルレベルデータDS1,DS2,DS3を得ることができる。
The image of the two-
なお、図7(a)の復号テーブルは、符号化テーブル(図6参照)と略同内容であり、かかる復号テーブルを二次元コードリーダーに記憶しておけば、二次元コード1に記録される全てのセットのサブセルレベルデータA1,A2,A3を復号できる。一方で、本実施例にあっては、二次元コードリーダーに記憶する復号テーブルの内容を制限することによって、読取り可能なサブセルレベルデータを制限することができる。例えば、図7(b)に示す復号テーブルでは、符号化データ(可変部12の配色パターン)に対して、2セット目のサブセルレベルデータについての復号データしか対応付けされていない。このため、かかる復号テーブルを記憶した二次元コードリーダーでは、2セット目のサブセルレベルデータしか復号することができなくなる。このように、本実施例の二次元コード1では、二次元コードリーダーに記憶させる復号テーブルを選別することによって、読取可能なサブレベルデータを制限し、秘匿情報のアクセスレベルを設定することが可能となる。
Note that the decoding table in FIG. 7A has substantially the same contents as the encoding table (see FIG. 6), and is recorded in the two-
以上の二次元コード1の生成方法及び読取り方法からわかるように、本実施例の二次元コード1は、1個の拡張セル2bに、1セットのセルレベルデータ1ビットと3セットのサブセルレベルデータを1ビットずつ記録する。セルレベルデータは、QRコードの規格に準じて二次元コード化されて、拡張セル単位の色によって記録されているため、既存のQRコードリーダーで読取ることができるが、サブセルレベルデータは、サブセル単位の配色パターンを識別でき、なおかつ、符号化テーブルに対応する復号テーブルを記憶した専用の読取装置でなければ読み取ることができない。
As can be seen from the above two-
本実施例は、上記実施例1からデータの符号化方法を変更し、可変部12の配色パターンが、誤り検出訂正符号のデータ部及び訂正符号部の1又は0に対応するようにしたものである。なお、データの符号化方法以外の構成は、上記実施例1と同じであるため、共通する構成については、共通符号を用いて詳細な説明を省略する。
In this embodiment, the data encoding method is changed from that of the first embodiment, and the color arrangement pattern of the
具体的には、本実施例では、誤り検出訂正符号として、8ビット長の拡張ハミング符号を採用する。図8に示すように、拡張ハミング符号は4ビット長のデータ部(データビット)と、4ビット長の訂正符号部(訂正ビット及びパリティビット)の8ビットで構成され、1ビットの誤り訂正能力を有し、2ビットの誤り検出能力を有している。本実施例では、上記実施例1の符号化テーブル(図6参照)を、図9に示す符号化テーブルに変更することで、可変部12の8個のサブセル10の配色を、この8ビット長の拡張ハミング符号の0と1とに対応させる。このように、本実施例では、可変部12の配色パターンを誤り検出訂正符号に対応させることにより、サブセル10の色の識別を誤った時に、拡張セル単位での誤り訂正や誤り検出を可能とし、拡張セル2bのセル単位の配色やサブセル単位の配色をより確実に識別し得るようになっている。
Specifically, in this embodiment, an 8-bit extended Hamming code is employed as the error detection and correction code. As shown in FIG. 8, the extended Hamming code is composed of 8 bits of a 4-bit length data portion (data bits) and a 4-bit length correction code portion (correction bits and parity bits), and a 1-bit error correction capability. And has a 2-bit error detection capability. In the present embodiment, the color scheme of the eight
ここで、8ビット長の拡張ハミング符号は、図8に示すように16通りの配列が存在するが、本実施例では、この中で、全てが0、または全てが1となる配列を使用せず、14通りの配列を使用するようにしている。この14通りの配列は、図8に示すように、8ビット中の4ビットが「1」で、残りの4ビットが「0」となる配列であるから、この14通りの配列に対応した可変部12の配色パターンでは、常に白色のサブセルが4個、黒色のサブセルが4個となる。このため、かかる構成にあっては、3個以上のサブセル10で色の読取りエラーが発生した場合でも、白色と黒色のサブセル10が4個ずつにならない限りは、拡張セル単位で読取りエラーを検出できるという利点がある。色の読取りエラーは、汚れ等によって黒色又は白色の数が増える方向に生じるため、本構成によれば、殆ど全ての読取りエラーを検出可能となる。また、本実施例では、可変部12を構成するサブセル10が全て白色、又は全て黒色となるとなる配列を除くことで、実施例1の拡張セル2bと同様に、拡張セル2bを構成するサブセル10の75%(12個)が常にセル色となるよう構成している。
Here, there are 16 types of 8-bit extended Hamming codes as shown in FIG. 8, but in this embodiment, all 0s or all 1s are used. Instead, 14 different arrays are used. As shown in FIG. 8, these 14 patterns are arrays in which 4 of the 8 bits are “1” and the remaining 4 bits are “0”, so that the variable corresponding to the 14 patterns is variable. In the color arrangement pattern of the
ここで、実施例2の二次元コードのように、可変部12の配色パターンが拡張セル2b単位で誤り訂正検出符号に対応する場合は、読み取りエラーが検出された拡張セル2bについて、乱数に基づいてセル単位の色(セル色)を推定し、セルレベルデータの読取りを行う。通常のQRコードにも、汚れがあっても読み取れるようにするために、データに誤り検出訂正機能が付加されている。しかしながら、かかる誤り検出訂正機能は、データセット単位で読み取りエラーを検出・訂正するものであるため、どのセルで読取りエラーが生じたのかは、二次元コードを復号する段階では判別できない。これに対して、本実施例の二次元コードでは、どの拡張セル2bで読取りエラーが発生したかを判別できる。このため、本実施例では、読み取りエラーが検出された拡張セル2bについては、確度に基づいて乱数により推測したセル色を埋めてやることにより、誤り訂正レベルを向上できるという利点がある。具体的には、QRコードは、白と黒のセル数が略等しくなるように調整されているから、ある拡張セル2bで読取りエラーが検出された場合は、当該拡張セル2bのセル色を、乱数によって50%の確率で白色又は黒色と推定する。このようにすれば、例えば、拡張セルの60%で読取りエラーが検出された場合でも、エラーが検出された拡張セルの半分を白色、残り半分を黒色と推測してセル色として埋めてやれば、エラーが検出された拡張セル2bが全体の60%でも、その半分の30%の拡張セル2bでは正しいセル色が推定され、エラーが検出されなかった40%の拡張セル2bと合わせて70%の拡張セル2bで正しいセル色となる。このため、実施例2の二次元コードにあっては、データの誤り検出訂正機能の誤り訂正率が30%の仕様であれば、拡張セル2bの60%で読取りエラーが生じても、セルレベルデータを正しく読み取ることができる。
Here, as in the two-dimensional code of the second embodiment, when the color arrangement pattern of the
また、上記のように、読取りエラーの生じた拡張セル2bについてセル色を推定する場合は、誤り訂正率を高めるため、乱数によるセル色の推定を所定回数を上限として繰り返す。上述のように、一回の試行だと、エラーが検出された拡張セル2bのうち、正しいセル色を推定できる割合(正答率)の期待値は50%程度であるが、この正答率は確率分布に従うため、試行を繰り返すと正答率の高いものを得ることができる。図10は、誤り検出した拡張セルの数を400個、各拡張セル2bについてセル色を正しく推定できる確率が50%の場合に、セル色を正しく推定できるセルの割合(正答率)と、1回の試行でその正答率が得られる確率と、その正答率が得られる試行回数期待値を示したものである。図10に示されるように、かかる場合であれば、1回の試行で56%以上の正当率が得られる確率は1%未満であるが、約100回程度の試行を繰り返せば、100%に近い確率で56%以上の正当率を得ることができる。
Further, as described above, when the cell color is estimated for the
次に、実施例2の二次元コードを読み取る際の読取方法を、図11を用いて説明する。
まず、最初のステップS300では、二次元コードを照らす第一の投光装置を点灯する。第一の投光装置は通常のQRコードの読取時に用いられる程度の照度である。次に、ステップS310では、第一の投光装置による照明下で、撮像装置によって二次元コードを撮像する。次に、ステップS320では、撮像した画像データを解析して、拡張セル2bが存在するか否かを判定する。この判定では、セルの色が一様であるか否かによって拡張セル2bの存在を判定してもよいが、実施例2の二次元コードでは、前記識別コード8aの有無によって拡張セル2bの存在を容易に判定できる。そして、判定の結果、拡張セル2bが存在しない二次元コード、すなわち通常のQRコードであると判断した時には、ステップS330に進み、通常のQRコードの読取処理を行い、QRコードに記録されたデータの読み取って二次元コードの読取りを終了する。このQRコードの読取処理は公知であるため、詳細な説明は省略する。一方、ステップS320において、拡張セル2bが存在すると判断した場合には、ステップS340に進み、第二の投光装置を点灯する。第二の投光装置は第一の投光装置より大きな照度を実現する。そして、ステップS350において、第二の投光装置の照明下で二次元コードを再度撮像する。このとき、ステップS310に比べて、照度を大きくした分だけ露光時間を短縮して撮像時の手振れの影響を低減させる。次に、ステップS360では、撮像した画像から通常の画像識別方法によって二次元コードを識別し、セルの切り出しを行う。具体的には、符号化領域4の各セル2a,2bについて、画像から該当するピクセルデータを抽出する。
Next, a reading method when reading the two-dimensional code of Example 2 will be described with reference to FIG.
First, in the first step S300, the first light projecting device that illuminates the two-dimensional code is turned on. The first light projecting device has an illuminance that is used when reading a normal QR code. Next, in step S310, a two-dimensional code is imaged by the imaging device under illumination by the first light projecting device. Next, in step S320, the captured image data is analyzed to determine whether or not the
次に、ステップS500では、抽出したセル2a,2bごとのピクセルデータを解析するセル復号処理を行う。図12は、セル復号処理の詳細な手順を示すフローチャートである。セル復号処理では、まず、ステップS510で、抽出したセル2a,2bの画像データからサブセル10を切り出す。具体的には、セル2a,2bの画像を縦横4列のマトリクス状に分割し、それぞれのサブセル10の配色を識別する。この場合、サブセル10の境界線を引いて上記分割を補正してもよい。次に、ステップS520では、可変部12に相当する部分のサブセル10を切り出す。次に、ステップS530では、セル2a,2bのセル色が明色と暗色のいずれであるかを識別する。この時、セル色を正しく識別し得るように、セル2a,2bの中央部の色を重視する。次のステップS540では、ステップS530で判定したセル色が白色(明色)か黒色(暗色)かを判定し、黒色の場合にはステップS550に進み、ステップS520で切り出した可変部12のサブセル10の配色を反転させる。次にステップS560では、セル2a,2bが機能パターンを構成する通常セル2aであるか否かを判定し、機能パターン3を構成するセル2aであると判定した場合は、当該セル2aは、サブセル10を含まない通常セルであるため、そのままセル復号処理を終了する。ステップS560で機能パターン3を構成するセル2aでないと判定した場合は、ステップS570で、可変部12の配色パターンについて、誤り検出訂正処理を行う。この処理は、可変部12を構成するサブセル10の白色と黒色を0と1に読み替え、拡張ハミング符号による誤りの検出と訂正を行う。かかる処理では、1ビットの誤りの場合には正しい配色パターンに訂正する。また、2ビットの誤りの場合には誤りが存在することを検出し、識別する。また、可変部12が、白色のサブセルが4個、黒色のサブセルが4個の配色パターンであるので、3ビット以上の誤りが発生した場合でも、0と1が各4ビットずつの符号にならない場合も、誤りとして検出する。次に、ステップS580では、S570で誤りを検出したか否かを判別する。ここで、1ビット誤りであって誤り訂正がなされた場合には、誤りを検出していないと判断する。ここで、誤りを検出したと判断した場合には、ステップS595に進み、当該セル(I,J)について、誤りが発生している旨のフラッグを立てて、配色推定値を設定して、セル復号処理を終了する。ここで、配色推定値は、確実な判定ができないが、識別したサブセルの色の状況から、セル色が白色または黒色の可能性が高いと判断できる場合に設定する。例えば、セルの色が全く推定できない場合は、例えば0.5とし、白の可能性が高い場合は0.3、黒の可能性が高い場合には0.8など、状況に応じた推定値を設定する。一方、ステップS580において、誤り検出せずと判断した場合には、ステップS590に進み、予め記憶された復号テーブルに基づいて、可変部12に記録された3ビットのデータを復号する。具体的には、符号化テーブル(図9参照)と略同じ内容の復号テーブルを参照して、例えば黒白黒などの復号データを得る。つまり、C(I,J,K)(Kは1,2,3)を得る。これによって、着目するセルについて復号が終了したので、当該セルについての復号処理を終了する。
Next, in step S500, cell decoding processing for analyzing pixel data for each of the extracted
図11に示すように、セル復号処理(S500)が終わると、ステップS370に進み、すべてのセル2a,2bについて、復号処理が終了したか否かを判別し、終了していない場合には、ステップS360に戻り、残りのセル2a,2bの切り出しと復号を行う。一方、ステップS370で、全てのセル2a,2bについてセル復号処理が終了したと判定した場合は、ステップS380に進み、各拡張セル2bについて、可変部12の配色パターンを復号したデータをつなぎあわせて、サブセルデータDS1,DS2,DS3を記録するQRコードA1,A2,A3のデータを得る。そして、ステップS390では、これらのQRコードA1,A2,A3を、通常のQRコードの復号手順にしたがって、サブセルレベルデータDS1、DS2,DS3に復号する。なお、QRコードA1,A2,A3には、誤り検出訂正機能が含まれているため、セル復号処理でエラーが検出されたセルの数が許容範囲であれば、かかるステップS390において誤り訂正を行うことができる。そして、次のステップS400では、各セル2a,2bについて、セル単位で識別した配色パターンを繋ぎ合わせて、セルレベルデータDS0を記録するQRコードA0のデータを得る。そして、次のステップS600では、かかるQRコードA0を復号してセルレベルデータDS0を得るセルレベルデータ復号処理を行い、二次元コードの読取りを終了する。
As shown in FIG. 11, when the cell decoding process (S500) is completed, the process proceeds to step S370, where it is determined whether or not the decoding process has been completed for all the
図13は、セルレベルデータ復号処理の詳細な手順を示すフローチャートである。セルレベルデータ復号処理では、まず、ステップS610で、復号の試行回数を初期値に設定する。ステップS620では、乱数を発生させる。ここで、乱数は例えば、0から1までの値を発生させる。ステップS630では、セル復号処理(図11、S500)で誤りが検出された拡張セル2bについて、配色推定値と乱数値とを比較してセル色を確率的に推定する。すなわち、配色推定値より乱数値が小さければ白色、大きければ黒色と推定し、推定した色をセル色として設定する。例えば、配色推定値が0.3の時に、乱数値が0.6であれば黒色と設定し、乱数値が0.2であれば白色と設定する。これにより、当該セルのセル色は配色推定値に比例した出現確率で設定される。次に、ステップS640では、全ての誤り検出セルについてセル色を設定したか否かを判定し、配色未設定の誤り検出セルがあると判定した場合は、ステップS620,S630を繰り返す。一方、全ての誤り検出セルについてセル色設定済みと判定した場合は、ここまでの処理で、セル色を誤りなく識別できた拡張セル2bと誤りを検出したセル2bの双方について配色を設定したので、ステップS650で、これらの配色から得られたコードA0の復号を行い、セルレベルデータDS0を得る。ステップS650での復号は通常のQRコードの復号処理と同じであり、QRコードA0の誤り検出訂正機能に基づいてデータ単位での誤り訂正と誤り検出が行われ、セルレベルデータDS0を正常に復号できたか否かが判定される。そして、ステップS660では、QRコードA0を誤り検出なく、又は、誤りを訂正して、セルレベルデータDS0の復号に成功したか否かを判定する。そして、セルレベルデータDS0の復号に成功したと判定した場合は、セルレベルデータ復号処理を終了する。一方、セルレベルデータDS0の復号に失敗したと判定した場合は、ステップS610で設定した試行回数に達したか否かを判定し、設定試行回数に達したと判定した場合は、復号不可能であるとして、セルレベルデータ復号処理を終了する。一方、設定試行回数に達していないと判定した場合は、ステップS620に移行して、セルレベルデータDS0の復号に成功するか、設定試行回数に達するまでステップS620〜650の処理を繰り返す。
FIG. 13 is a flowchart showing a detailed procedure of the cell level data decoding process. In the cell level data decoding process, first, in step S610, the number of decoding attempts is set to an initial value. In step S620, a random number is generated. Here, the random number generates a value from 0 to 1, for example. In step S630, for the
なお、図11〜13のフローチャートに示す二次元コードの生成方法にあって、
本発明に係る撮像ステップは、ステップS300,310,340,350によって主に実現される。特に、第一の撮像ステップは、ステップS300,310によって主に実現され、第二の撮像ステップは、ステップS340,350によって主に実現される。また、本発明に係る拡張セル判別ステップは、ステップS320によって主に実現される。また、本発明に係る第一復号ステップは、ステップS330によって主に実現される。また、本発明に係る第二復号ステップは、ステップS360〜400,500,600によって主に実現される。特に、本発明に係る色識別ステップは、ステップS360〜370によって主に実現される。また、本発明に係るサブセル復号ステップは、ステップS500,380,390によって主に実現される。また、本発明に係るセル復号ステップは、ステップS400,600によって主に実現される。また、本発明に係る読取りエラー記録処理は、ステップS570,580,595によって主に実現される。また、本発明に係るセル色推定処理は、ステップS620,630によって主に実現される。
In the two-dimensional code generation method shown in the flowcharts of FIGS.
The imaging step according to the present invention is mainly realized by steps S300, 310, 340, and 350. In particular, the first imaging step is mainly realized by steps S300 and 310, and the second imaging step is mainly realized by steps S340 and 350. Further, the extended cell determination step according to the present invention is mainly realized by step S320. Further, the first decoding step according to the present invention is mainly realized by step S330. The second decoding step according to the present invention is mainly realized by steps S360 to 400,500,600. In particular, the color identification step according to the present invention is realized mainly by steps S360 to 370. The subcell decoding step according to the present invention is mainly realized by steps S500, 380, and 390. The cell decoding step according to the present invention is mainly realized by steps S400 and S600. The read error recording process according to the present invention is mainly realized by steps S570, 580, and 595. In addition, the cell color estimation process according to the present invention is mainly realized by steps S620 and S630.
以上のように、本発明の実施形態を実施例によって説明したが、本発明は、上記実施例の形態に限らず本発明の要旨を逸脱しない範囲内において種々変更を加えることができる。 As mentioned above, although embodiment of this invention was described by the Example, this invention is not restricted to the form of the said Example, A various change can be added in the range which does not deviate from the summary of this invention.
例えば、図14は、拡張セルの変形例を示したものである。図14(a)の拡張セル2cでは、可変部12aのサブセル10が、隣接するサブセル同士で4対のペアを形成し、一対のサブセル10を一単位として白色又は黒色に配色される。そして、可変部12aは、隣接する拡張セル2cの可変部12aとペアを形成し、二つの可変部12aの8対(16個)のサブセル10の配色パターンによって、1ビットのサブセルレベルデータを記録するよう構成される。また、図14(b)の拡張セル2dは、図14(a)の拡張セル2cをさらに変更したものである。具体的には、本変形例の拡張セル2dでは、可変部12bのサブセル10が、隣接するサブセル同士で2対のペアを形成し、一対のサブセル10を一単位として白色又は黒色に配色される。そして、可変部12bは、連続する4個の拡張セル2cの可変部12bとグループを形成し、4つ可変部12aの8対(16個)のサブセル10の配色パターンによって、1ビットのサブセルレベルデータを記録するよう構成される。このように、本発明の二次元コードは、拡張セル一個単位でなく、複数の拡張セル単位で、1ビットのサブセルレベルデータを記録することもできる。また、本発明に係るサブセルレベルデータは、サブセル一個単位の配色パターンに限らず、サブセル複数個単位の配色パターンで記録することもできる。
For example, FIG. 14 shows a modification of the extended cell. In the
また、図14(c)の拡張セル2eは、8個のサブセル10によって構成される第一可変部12cと、4個のサブセル10によって構成される第二可変部12dとを備えている。第一可変部12cは、上記実施例の可変部12に相当するものであり、8個のサブセル10の配色パターンによって、サブセルレベルデータを1ビット単位で記録する。一方、第二可変部12dは、隣接する拡張セル2eの第二可変部12dとペアを形成し、二つの可変部12dの計8個のサブセル10の配色パターンによって、1ビットのサブセルレベルデータを記録するよう構成される。このため、かかる変形例では、上記実施例に比べて、1.5倍のサブセルレベルデータを拡張セルに記録することができる。このように、本発明に係る拡張セルには、サブセルレベルデータを複数ビット記録することもできる。
14C includes a first
また、上記実施例の二次元コードは、1〜3セットのサブセルレベルデータを記録可能なものであるが、本発明の二次元コードに記録可能なサブセルレベルデータは、1セットだけであってもよいし、4セット以上であってもよい。また、上記実施例は、QRコードと互換性を有するものであるが、本発明は、QRコード以外の規格の二次元コードと互換性を持たせることも可能である。また、上記実施例では、拡張セル2bが縦横4列のサブセル10で構成されていたが、本発明に係る拡張セルは、拡張セルを分割するマトリクスのサイズは、5×5、6×6など適宜変更可能である。また、拡張セル2bの固定部11と可変部12の位置も上記実施例から適宜変更可能である。また、上記実施例では、可変部12を構成する8個のサブセル10のうち4個のサブセル10を拡張セル単位の色(セル色)と反対色に配色しているが、反対色にするサブセル10の割合は、セル単位やサブセル単位の色の識別に支障がでない範囲内で適宜変更できる。また、本発明の二次元コードを生成方法では、適宜マスク処理を行うことができる。
The two-dimensional code of the above embodiment can record 1 to 3 sets of sub-cell level data, but the sub-cell level data that can be recorded in the two-dimensional code of the present invention can be only one set. It may be 4 sets or more. Moreover, although the said Example has compatibility with QR Code, this invention can also be made compatible with the two-dimensional code of standards other than QR Code. In the above-described embodiment, the
1 二次元コード
2a 通常セル(セル)
2b,2c,2d,2e 拡張セル(セル)
3 機能パターン(固定領域)
4 符号化領域
5 位置検出パターン
6 分離パターン
7 タイミングパターン
8 データコード領域
8a 識別コード
9 形式情報コード領域
10 サブセル
11 固定部
12,12a,12b,12c,12d 可変部
1 Two-
2b, 2c, 2d, 2e Extended cell (cell)
3 Function pattern (fixed area)
4
Claims (15)
少なくとも一部のセルが、該セルより微細なサブセルによってマトリクス状に細分された拡張セルであり、
該拡張セルは、少なくとも所定割合のサブセルが、明色と暗色から選ばれるセル色で配色されることにより、セル単位で色を識別した時に、拡張セルの色が前記セル色であると識別され得るよう構成されており、また、前記セル色に配色されるサブセルが前記所定割合を下回らない範囲内で、サブセルが明色と暗色のいずれかに選択的に配色されており、
セル単位の配色パターンによって記録されるセルレベルデータと、サブセル単位の配色パターンによって記録されるサブセルレベルデータの少なくとも二種類の情報を含むことを特徴とする二次元コード。 A two-dimensional code in which cells identified as light colors and cells identified as dark colors are arranged in a matrix,
At least some of the cells are extended cells subdivided in a matrix by subcells smaller than the cells,
The extended cell is identified as the cell color when the color is identified on a cell basis by arranging at least a predetermined proportion of subcells in a cell color selected from light and dark colors. The subcells are selectively arranged in either light or dark color within a range where the subcells arranged in the cell color do not fall below the predetermined ratio,
A two-dimensional code comprising at least two types of information: cell level data recorded by a cell unit color arrangement pattern and sub cell level data recorded by a sub cell unit color arrangement pattern.
拡張セルは、固定領域に設けられず、符号化領域に設けられていることを特徴とする請求項1乃至請求項6のいずれか1項に記載の二次元コード。 An encoding area for recording cell-level data, and a fixed area constituting a pattern for assisting optical reading;
The two-dimensional code according to any one of claims 1 to 6, wherein the extended cell is not provided in the fixed area but is provided in the encoding area.
セルレベルデータを符号化する第一の符号化ステップと、
サブセルレベルデータを符号化する第二の符号化ステップと、
符号化したサブセルレベルデータを、拡張セルごとに記録する記録単位に分割し、該記録単位のサブセルレベルデータの内容と、拡張セルの可変部の配色パターンとを対応付けした符号化テーブルに基づいて、記録単位のサブセルレベルデータを可変部の配色パターンに変換する第三の符号化ステップと
を実行することを特徴とする二次元コードの生成方法。 A method for generating a two-dimensional code according to any one of claims 2 to 5,
A first encoding step for encoding cell level data;
A second encoding step for encoding subcell level data;
The encoded subcell level data is divided into recording units to be recorded for each extended cell, and based on an encoding table in which the contents of the subcell level data of the recording unit are associated with the color arrangement pattern of the variable part of the extended cell. And a third encoding step of converting the sub-cell level data of the recording unit into a color arrangement pattern of the variable part.
第三の符号化ステップでは、符号化テーブルに基づいて、記録単位のサブセルレベルデータの内容に対応する可変部の配色パターンを変換候補として複数抽出し、抽出した複数の変換候補の中から可変部の配色パターンを決定することを特徴とする請求項9に記載の二次元コードの生成方法。 The encoding table is a one-to-many correspondence between the contents of the sub-cell level data of the recording unit and the color scheme of the variable part of the extended cell,
In the third encoding step, based on the encoding table, a plurality of variable portion color schemes corresponding to the contents of the sub-cell level data of the recording unit are extracted as conversion candidates, and the variable portion is selected from the extracted conversion candidates. The method of generating a two-dimensional code according to claim 9, wherein a color arrangement pattern is determined.
二次元コードを撮像する撮像ステップと、
撮像した二次元コードから各拡張セルのセル単位の配色パターン及びサブセル単位の配色パターンを識別する色識別ステップと、
各拡張セルのサブセル単位の配色パターンから、当該配色パターンによって記録されたサブセルレベルデータを復号するサブセル復号ステップと、
セル単位の配色パターンから、該配色パターンによって記録されたセルレベルデータを復号するセル復号ステップとを備え、
サブセル復号ステップでは、読取りエラーを検出した拡張セルを記憶する読取りエラー記録処理を行い、
セル復号ステップでは、サブセル復号ステップで読み取りエラーが検出された拡張セルについては、当該拡張セルの色を明色又は暗色と推定するセル色推定処理を行い、該セル色推定処理で推定した色を用いてセルレベルデータの復号を行うことを特徴とする二次元コードの読取方法。 A method for reading a two-dimensional code according to claim 4 or claim 5,
An imaging step of imaging a two-dimensional code;
A color identifying step for identifying a cell unit color scheme and a sub cell unit color scheme of each extended cell from the captured two-dimensional code;
A sub-cell decoding step for decoding sub-cell level data recorded by the color scheme from the sub-cell unit color scheme of each extended cell;
A cell decoding step of decoding cell level data recorded by the color arrangement pattern from the cell-unit color arrangement pattern,
In the subcell decoding step, a read error recording process for storing the extended cell in which the read error is detected is performed.
In the cell decoding step, for the extended cell in which the reading error is detected in the sub cell decoding step, a cell color estimation process for estimating the color of the extended cell as a light color or a dark color is performed, and the color estimated in the cell color estimation process is calculated. A method for reading a two-dimensional code, characterized in that cell level data is decoded.
セル復号ステップでは、セルレベルデータの復号に成功するか、又は所定の上限回数に達するまでセル色推定処理を繰り返すことを特徴とする請求項13に記載の二次元コードの読取方法。 In the cell color estimation process, for the extended cell in which a reading error is detected in the sub-cell decoding step, it is estimated using a random number whether the color of the extended cell is light or dark,
14. The two-dimensional code reading method according to claim 13, wherein in the cell decoding step, the cell color estimation process is repeated until the cell level data is successfully decoded or a predetermined upper limit number is reached.
二次元コードを第一の投光手段で照らして撮像する第一撮像ステップと、
該第一撮像ステップで撮像された二次元コードの画像を解析し、二次元コードに拡張セルが存在するか否かを判定する拡張セル判別ステップとを実行し、
さらに、拡張セル判別ステップで二次元コードに拡張セルが存在しないと判定した場合は、第一撮像ステップで撮像した二次元コードの画像に基づいて、二次元コードを復号する第一復号ステップを実行し、
拡張セル判別ステップで二次元コードに拡張セルが存在すると判定した場合は、第一の投光手段よりも強い光を放つ第二の投光手段で照らし、第一撮像ステップよりも短い露光時間で二次元コードを撮像する第二撮像ステップと、
第二撮像ステップで撮像された二次元コードの画像に基づいて、二次元コードを復号する第二復号ステップと
を実行することを特徴とする二次元コードの読取方法。 A method for reading a two-dimensional code according to any one of claims 1 to 8,
A first imaging step of imaging the two-dimensional code by illuminating with the first light projecting means;
Analyzing the image of the two-dimensional code imaged in the first imaging step, and executing an extended cell determination step of determining whether or not an extended cell exists in the two-dimensional code;
Furthermore, when it is determined in the extended cell determination step that no extended cell exists in the two-dimensional code, a first decoding step is performed to decode the two-dimensional code based on the image of the two-dimensional code captured in the first imaging step. And
When it is determined in the extended cell determination step that an extended cell exists in the two-dimensional code, the second light projecting means that emits light stronger than the first light projecting means is illuminated, and the exposure time is shorter than the first imaging step. A second imaging step of imaging a two-dimensional code;
A two-dimensional code reading method, comprising: executing a second decoding step of decoding a two-dimensional code based on an image of the two-dimensional code imaged in the second imaging step.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2012233406A JP6061075B2 (en) | 2012-10-23 | 2012-10-23 | Two-dimensional code, two-dimensional code generation method, and two-dimensional code reading method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2012233406A JP6061075B2 (en) | 2012-10-23 | 2012-10-23 | Two-dimensional code, two-dimensional code generation method, and two-dimensional code reading method |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2014085777A true JP2014085777A (en) | 2014-05-12 |
JP6061075B2 JP6061075B2 (en) | 2017-01-18 |
Family
ID=50788796
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2012233406A Active JP6061075B2 (en) | 2012-10-23 | 2012-10-23 | Two-dimensional code, two-dimensional code generation method, and two-dimensional code reading method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6061075B2 (en) |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20160066507A (en) * | 2014-12-02 | 2016-06-10 | 도요타지도샤가부시키가이샤 | Marker generation apparatus, marker recognition apparatus, marker generation method, marker recognition method, and program |
JP2016201061A (en) * | 2015-04-14 | 2016-12-01 | 株式会社テララコード研究所 | Two-dimensional code, and reading method for two-dimensional code |
CN110097159A (en) * | 2019-04-29 | 2019-08-06 | 绍兴聚量数据技术有限公司 | A kind of QR code safety certifying method and system based on Hamming code |
CN110378454A (en) * | 2018-04-13 | 2019-10-25 | 乌镇中品安(桐乡)科技有限公司 | Expansible two dimensional code and its recognition methods |
CN111191759A (en) * | 2019-08-26 | 2020-05-22 | 上海懒书智能科技有限公司 | Two-dimensional code generation method and positioning and decoding method based on GPU |
CN112733567A (en) * | 2021-01-15 | 2021-04-30 | 深圳市豪恩汽车电子装备股份有限公司 | Motor vehicle two-dimension code identification method and device and computer readable storage medium |
CN114239782A (en) * | 2021-12-21 | 2022-03-25 | 三维码(厦门)网络科技有限公司 | Capacity-expansion two-dimensional code and three-dimensional code generation method and equipment |
US11941481B2 (en) | 2019-10-11 | 2024-03-26 | Terrara Code Research Institute Inc. | Two-dimensional symbol and method for reading two-dimensional symbol |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP6473899B1 (en) * | 2017-12-29 | 2019-02-27 | 株式会社I・Pソリューションズ | Composite code pattern, generating device, reading device, method and program |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2000123132A (en) * | 1998-10-20 | 2000-04-28 | Fuerumo:Kk | Color two-dimensional data code, reader and preparing device |
JP2003323585A (en) * | 2002-04-30 | 2003-11-14 | Toppan Forms Co Ltd | Two-dimensional code reading method, two-dimensional code reading system and article attached with two- dimensional code used in method and system |
JP2005222157A (en) * | 2004-02-03 | 2005-08-18 | Gijutsu Transfer Service:Kk | Two-dimensional code, device and method for generating two-dimensional code, and device and method for reading two-dimensional code |
JP2009009547A (en) * | 2007-05-29 | 2009-01-15 | Denso Wave Inc | Method of creating two-dimensional code and its reader |
JP2011028414A (en) * | 2009-07-23 | 2011-02-10 | Denso Wave Inc | Optical information reading device |
JP2012503264A (en) * | 2008-09-23 | 2012-02-02 | アドバンスト・トラック・アンド・トレース | Geometric code authentication method and apparatus |
-
2012
- 2012-10-23 JP JP2012233406A patent/JP6061075B2/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2000123132A (en) * | 1998-10-20 | 2000-04-28 | Fuerumo:Kk | Color two-dimensional data code, reader and preparing device |
JP2003323585A (en) * | 2002-04-30 | 2003-11-14 | Toppan Forms Co Ltd | Two-dimensional code reading method, two-dimensional code reading system and article attached with two- dimensional code used in method and system |
JP2005222157A (en) * | 2004-02-03 | 2005-08-18 | Gijutsu Transfer Service:Kk | Two-dimensional code, device and method for generating two-dimensional code, and device and method for reading two-dimensional code |
JP2009009547A (en) * | 2007-05-29 | 2009-01-15 | Denso Wave Inc | Method of creating two-dimensional code and its reader |
JP2012503264A (en) * | 2008-09-23 | 2012-02-02 | アドバンスト・トラック・アンド・トレース | Geometric code authentication method and apparatus |
JP2011028414A (en) * | 2009-07-23 | 2011-02-10 | Denso Wave Inc | Optical information reading device |
Cited By (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR101709414B1 (en) | 2014-12-02 | 2017-02-22 | 도요타지도샤가부시키가이샤 | Marker generation apparatus, marker recognition apparatus, marker generation method, marker recognition method, and program |
KR20160066507A (en) * | 2014-12-02 | 2016-06-10 | 도요타지도샤가부시키가이샤 | Marker generation apparatus, marker recognition apparatus, marker generation method, marker recognition method, and program |
JP2016201061A (en) * | 2015-04-14 | 2016-12-01 | 株式会社テララコード研究所 | Two-dimensional code, and reading method for two-dimensional code |
CN110378454A (en) * | 2018-04-13 | 2019-10-25 | 乌镇中品安(桐乡)科技有限公司 | Expansible two dimensional code and its recognition methods |
CN110097159A (en) * | 2019-04-29 | 2019-08-06 | 绍兴聚量数据技术有限公司 | A kind of QR code safety certifying method and system based on Hamming code |
CN110097159B (en) * | 2019-04-29 | 2022-09-23 | 绍兴聚量数据技术有限公司 | QR code security authentication method and system based on Hamming code |
CN111191759B (en) * | 2019-08-26 | 2023-06-16 | 上海懒书智能科技有限公司 | Two-dimensional code generation method, positioning and decoding method based on GPU |
CN111191759A (en) * | 2019-08-26 | 2020-05-22 | 上海懒书智能科技有限公司 | Two-dimensional code generation method and positioning and decoding method based on GPU |
US11941481B2 (en) | 2019-10-11 | 2024-03-26 | Terrara Code Research Institute Inc. | Two-dimensional symbol and method for reading two-dimensional symbol |
CN112733567A (en) * | 2021-01-15 | 2021-04-30 | 深圳市豪恩汽车电子装备股份有限公司 | Motor vehicle two-dimension code identification method and device and computer readable storage medium |
CN112733567B (en) * | 2021-01-15 | 2023-12-12 | 深圳市豪恩汽车电子装备股份有限公司 | Method and device for identifying two-dimension code of motor vehicle and computer readable storage medium |
CN114239782B (en) * | 2021-12-21 | 2023-04-14 | 三维码(厦门)网络科技有限公司 | Capacity-expansion two-dimensional code and three-dimensional code generation method and equipment |
CN114239782A (en) * | 2021-12-21 | 2022-03-25 | 三维码(厦门)网络科技有限公司 | Capacity-expansion two-dimensional code and three-dimensional code generation method and equipment |
Also Published As
Publication number | Publication date |
---|---|
JP6061075B2 (en) | 2017-01-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6061075B2 (en) | Two-dimensional code, two-dimensional code generation method, and two-dimensional code reading method | |
US10679175B2 (en) | Two-dimensional code, system for creation of two-dimensional code, and analysis program | |
KR101801217B1 (en) | Two-dimensional code | |
TWI693551B (en) | Two-dimensional code generation method, decoding method and device | |
JP6590335B2 (en) | Two-dimensional code and method for reading the two-dimensional code | |
JP2004234318A (en) | Two-dimension information code, and display method, generation method and reading method thereof | |
JP5791826B2 (en) | 2D code | |
JP6600905B2 (en) | Two-dimensional code, multi-valued two-dimensional code, and two-dimensional code generation method | |
JP6045752B2 (en) | Two-dimensional code, two-dimensional code analysis system, and two-dimensional code creation system | |
JP3957734B1 (en) | Program, information storage medium, 2D code generation system, 2D code | |
JP2013080448A (en) | Computer for outputting two-dimensional code and program to be executed by the same | |
WO2016114294A1 (en) | Information code reading system and information code reading device | |
JP6099258B2 (en) | Optical code and method for generating the optical code | |
JP2020160961A (en) | Two-dimensional code reading device, computer program, and two-dimensional code | |
JP2005208843A (en) | Information encoding/decoding method, device and code indicator | |
JP3957735B1 (en) | Program, information storage medium, 2D code generation system, 2D code | |
JP2006330930A (en) | Method and device for preparing and reading color code | |
JP2015232873A (en) | Two-dimensional code, analysis system of two-dimensional code, and production system of two-dimensional code | |
JP2009175986A (en) | Image processor and program | |
JP2006195961A (en) | Information code reader and luminance signal generation method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20151016 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20160822 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20160906 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20161025 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20161115 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20161129 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 6061075 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |