JP2016201061A - Two-dimensional code, and reading method for two-dimensional code - Google Patents

Two-dimensional code, and reading method for two-dimensional code Download PDF

Info

Publication number
JP2016201061A
JP2016201061A JP2015082416A JP2015082416A JP2016201061A JP 2016201061 A JP2016201061 A JP 2016201061A JP 2015082416 A JP2015082416 A JP 2015082416A JP 2015082416 A JP2015082416 A JP 2015082416A JP 2016201061 A JP2016201061 A JP 2016201061A
Authority
JP
Japan
Prior art keywords
color
cell
dimensional code
reading
peripheral portion
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
Application number
JP2015082416A
Other languages
Japanese (ja)
Other versions
JP6590335B2 (en
Inventor
寺浦 信之
Nobuyuki Teraura
信之 寺浦
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
TERRARA CODE RESEARCH INSTITUTE Inc
TERRARA CODE RES INST Inc
Original Assignee
TERRARA CODE RESEARCH INSTITUTE Inc
TERRARA CODE RES INST Inc
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by TERRARA CODE RESEARCH INSTITUTE Inc, TERRARA CODE RES INST Inc filed Critical TERRARA CODE RESEARCH INSTITUTE Inc
Priority to JP2015082416A priority Critical patent/JP6590335B2/en
Publication of JP2016201061A publication Critical patent/JP2016201061A/en
Application granted granted Critical
Publication of JP6590335B2 publication Critical patent/JP6590335B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

PROBLEM TO BE SOLVED: To provide a two-dimensional code by which a cell-basis lightness/darkness pattern is easily identified and many dedicated data can be recorded with any other color scheme pattern than the cell-basis lightness/darkness pattern.SOLUTION: At least partial cells are formed from extension cells 2a each formed from a central part 20 that is colored in white or black and a peripheral part 21 that is indicated in one or more colors selected from among three or more kinds of reference colors with different RGB values. At least two kinds of information are recorded for compatible data that are recorded with a color scheme pattern in the central part 20 of the extension cell 2a and dedicated data that are recorded with color scheme patterns in the peripheral part 21 of the extension cell 2a. Regarding such an extension cell 2a, when a light color and a dark color are identified for the unit of a cell, the extension cell 2a with the central part 20a colored in white is easily identified as a light color, and the extension cell 2a with the central part 20a colored in black is easily identified as a dark color.SELECTED DRAWING: Figure 2

Description

QRコード(登録商標)などの一般的な二次元コードは、明色又は暗色のセルをマトリクス状に配置してなるものであり、セルの明暗パターンによってデータを記録している。こうした二次元コードは規格化されており、読取用プログラムをインストールしたスマートフォンなどを読取装置として用いれば、二次元コードに記録されたデータを復号できる。   A general two-dimensional code such as a QR code (registered trademark) is formed by arranging bright or dark cells in a matrix, and data is recorded by a light / dark pattern of the cells. Such a two-dimensional code is standardized, and data recorded in the two-dimensional code can be decoded by using a smartphone or the like in which a reading program is installed as a reading device.

発明者は、一般的な二次元コードの記憶容量を拡大するために、二次元コードのセルを更に微細なサブセルに分割するとともに、各サブセルを、反射率又は輝度が所定の明色閾値以上である複数の明色基準色と、反射率又は輝度が所定の暗色閾値以下である複数の暗色基準色の中から選択した色で配色することにより、セル単位の明暗パターンにより互換データを記録しつつ、サブセル単位の基準色の配色パターンによって付加的な専用データを記憶可能な二次元コードを提案している(特許文献1参照)。   In order to expand the storage capacity of a general two-dimensional code, the inventor divides a two-dimensional code cell into finer subcells, and each subcell has a reflectance or luminance equal to or higher than a predetermined light color threshold. By arranging a plurality of light color reference colors and a color selected from a plurality of dark color reference colors whose reflectance or luminance is equal to or less than a predetermined dark color threshold, compatible data is recorded in a light / dark pattern in units of cells. A two-dimensional code capable of storing additional dedicated data according to a color arrangement pattern of a reference color in units of subcells has been proposed (see Patent Document 1).

特許文献1の二次元コードの互換データは、一般的な二次元コードと同様に、セル単位の明暗パターンによって記録されるため、一般的な二次元コードの読取装置を用いてかかる二次元コードを読み取れば、互換データを復号できる。一方、専用データは、セル単位の明暗パターンには記録されないため、一般的な二次元コードの読取装置では復号できないが、専用の読取装置を用いることで復号できる。   Since the compatible data of the two-dimensional code of Patent Document 1 is recorded by a light / dark pattern in units of cells in the same manner as a general two-dimensional code, the two-dimensional code is read using a general two-dimensional code reader. If read, compatible data can be decoded. On the other hand, since the dedicated data is not recorded in the light / dark pattern in units of cells, it cannot be decoded by a general two-dimensional code reader, but can be decoded by using a dedicated reader.

特開2014−154118号公報JP, 2014-154118, A

ところで、上記特許文献1に記載の二次元コードは、多量の専用データを記録できるという利点があるが、四種類以上の基準色を用いるため、セル単位の明暗パターンの識別率が高くないという問題がある。二次元コードは一般的に誤り訂正機能を備えているため、誤り訂正が可能な範囲内であれば、セルの明暗パターンの識別を誤っても互換データを読み取り可能である。しかしながら、読取装置の明色と暗色の識別精度が低い場合や、印刷の経時変化によりセルの色が変動した場合、二次元コードを読み取る際の照明にムラがある場合などは、明暗パターンの識別誤りが多くなって、互換データの読み取りに失敗するおそれがある。   Incidentally, the two-dimensional code described in Patent Document 1 has an advantage that a large amount of dedicated data can be recorded. However, since four or more kinds of reference colors are used, the identification rate of the light / dark pattern in units of cells is not high. There is. Since the two-dimensional code generally has an error correction function, compatible data can be read even if the identification of the light / dark pattern of the cell is wrong as long as error correction is possible. However, if the reading device has low light and dark color identification accuracy, if the cell color changes due to changes over time of printing, or if illumination is uneven when reading a two-dimensional code, the light / dark pattern is identified. There may be many errors and reading of compatible data may fail.

本発明は係る現状に鑑みてなされたものであり、セル単位の明暗パターンの識別が容易であり、なおかつ、セル単位の明暗パターン以外の配色パターンによって、多くの専用データを記録可能な二次元コードの提供を目的とする。   The present invention has been made in view of the present situation, and it is easy to identify cell-by-cell light / dark patterns, and a two-dimensional code capable of recording a large amount of dedicated data by using a color arrangement pattern other than the light / dark pattern in cell units. The purpose is to provide.

本発明は、明色と識別されるセルと暗色と識別されるセルとをマトリクス状に配置してなる二次元コードであって、少なくとも一部のセルが、白色又は黒色で配色された中央部と、RGB値の異なる3種類以上の基準色から選ばれた、1又は複数の色で配色された周辺部とからなる拡張セルであり、拡張セルの中央部の配色パターンによって記録される互換データと、拡張セルの周辺部の配色パターンによって記録される専用データの少なくとも二種類の情報を含むことを特徴とする二次元コードである。   The present invention is 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 white or black. Compatible data recorded by a color arrangement pattern in the center of the extended cell, and an extended cell composed of one or more peripheral colors selected from three or more reference colors having different RGB values And a two-dimensional code characterized in that it includes at least two types of information of dedicated data recorded by a color arrangement pattern in the peripheral part of the extended cell.

一般的な二次元コードの読取装置は、撮像した二次元コードの画像からセルの領域を切り出した後に、セルの中心付近の色を重視して当該セルが明色と暗色のいずれであるかを識別する。これに対して、本発明に係る拡張セルは、その中央部が、反射率や輝度が最も高い高い白色と、最も低い黒色とで配色されるため、一般的な二次元コードの読取装置で、セル単位で明色と暗色の識別をした時に、中央部が白色の拡張セルは明色と、中央部が黒色の拡張セルは暗色と容易に識別できる。したがって、本発明の二次元コードは、明色と暗色の識別精度が低い読取装置を用いた場合や、印刷の経時変化によりセルの色が変動した場合、二次元コードを照らす照明にムラがある場合などであっても、明暗パターンの識別誤りがそれほど多くならず、互換データを確実に読み取ることができるという利点がある。   A general two-dimensional code reader extracts a cell area from a captured two-dimensional code image and then focuses on the color near the center of the cell to determine whether the cell is light or dark. Identify. On the other hand, the extended cell according to the present invention has a central portion that is colored with the highest white color with the highest reflectance and brightness, and the lowest black color, so in a general two-dimensional code reader, When light and dark colors are identified on a cell-by-cell basis, an extended cell whose center is white can be easily identified as a light color and an extended cell whose center is black can be easily identified as a dark color. Therefore, the two-dimensional code of the present invention has uneven illumination for illuminating the two-dimensional code when a reading device with low light color and dark color identification accuracy is used, or when the color of the cell fluctuates due to changes in printing over time. Even in such a case, there is an advantage that the identification error of the light / dark pattern does not increase so much and the compatible data can be read reliably.

一方、本発明では、拡張セルの周辺部の配色パターンによって専用データが記録される。ここで、上述のように、拡張セルのセル単位の明暗パターンの識別精度は、拡張セルの中央部の配色パターンによって確保されるため、周辺部を多くの基準色で配色した場合でも、また、周辺部を多くのサブセルに分割した場合でも、互換データの読取精度は損なわれない。したがって、本発明によれば、互換データの読取精度を損なうことなく、拡張セルに多量の専用データを記録可能となる。   On the other hand, in the present invention, dedicated data is recorded by the color arrangement pattern in the peripheral part of the extended cell. Here, as described above, the identification accuracy of the light-dark pattern in the cell unit of the extended cell is ensured by the color arrangement pattern of the central portion of the extended cell, so even when the peripheral portion is colored with many reference colors, Even when the peripheral portion is divided into many subcells, the reading accuracy of compatible data is not impaired. Therefore, according to the present invention, a large amount of dedicated data can be recorded in the expansion cell without impairing the reading accuracy of the compatible data.

本発明にあって、セルは正方形状をなしており、拡張セルは、当該拡張セルを縦横に3分割して得られる9つの正方形のうち、中央の正方形部分を中央部とし、残り8つの正方形部分を周辺部としている構成が提案される。一般的に、拡張セルにおける中央部の面積比率を高くするほど、周辺部の色の識別精度が低くなり、中央部の面積比率を低くするほど、中央部の色の識別精度が低くなるが、発明者の研究によれば、かかる構成とした場合に、中央部の明暗パターンの識別精度と、周辺部の基準色の識別精度の双方を最もバランスよく確保可能となる。   In the present invention, the cell has a square shape, and the expanded cell has a central square portion among the nine squares obtained by dividing the expanded cell into three vertically and horizontally, and the remaining eight squares. A configuration in which the part is a peripheral part is proposed. Generally, the higher the area ratio of the central part in the expansion cell, the lower the color identification accuracy of the peripheral part, and the lower the area ratio of the central part, the lower the color identification accuracy of the central part. According to the inventor's research, in the case of such a configuration, it is possible to secure both the identification accuracy of the light / dark pattern in the central portion and the identification accuracy of the reference color in the peripheral portion with the best balance.

また、本発明にあって、前記基準色は、反射率又は輝度が所定の明色閾値以上である複数の明色基準色と、反射率又は輝度が所定の暗色閾値以下である複数の暗色基準色とからなり、中央部が白色で配色された拡張セルは、前記複数の明色基準色から選ばれた、1又は複数の色で配色されており、中央部が黒色で配色された拡張セルは、前記複数の暗色基準色から選ばれた、1又は複数の色で配色されている構成が提案される。   In the present invention, the reference color includes a plurality of bright color reference colors whose reflectance or luminance is equal to or higher than a predetermined light color threshold value, and a plurality of dark color standards whose reflectance or luminance is equal to or lower than a predetermined dark color threshold value. The extended cell, which is composed of colors and is colored in white in the center, is arranged in one or more colors selected from the plurality of light color reference colors, and is extended in black in the center Is proposed that is arranged in one or more colors selected from the plurality of dark reference colors.

かかる構成にあっては、手ぶれやピントボケ、また撮像プログラムの平均化フィルタなどの影響によって、撮像した二次元コードの画像データにおいて、中央部の色に周辺部の色が影響を与えたとしても、中央部が白色の拡張セルは、反射率や輝度が高い明色基準色で周辺部が配色されるため確実に明色と識別され、中央部が黒色の拡張セルは、反射率や輝度が低い暗色基準色で周辺部が配色されるため確実に暗色と識別される。したがって、かかる構成によれば、拡張セルのセル単位の明暗パターンの識別精度を一層向上させることができる。また、周辺部の色情報を取得する際に、隣接する中央部の色の影響を受けて色情報が変化することがあるが、かかる構成では、周辺部と中央部の色が、反射率や輝度の点で近似しているため、周辺部から取得する色情報が、中央部の色による影響を受けにくくなり、周辺部の配色パターンをより高い精度で識別可能となる。   In such a configuration, even if the color of the peripheral part affects the color of the central part in the image data of the captured two-dimensional code due to the influence of camera shake, out-of-focus, or the averaging filter of the imaging program, The extension cell with white center is surely identified as bright because the periphery is colored with a bright reference color with high reflectivity and brightness, and the extension cell with black center has low reflectivity and brightness. Since the peripheral portion is colored with the dark reference color, it is reliably identified as a dark color. Therefore, according to such a configuration, it is possible to further improve the identification accuracy of the light-dark pattern in the cell unit of the extended cell. In addition, when acquiring color information of the peripheral part, the color information may change due to the influence of the color of the adjacent central part. Since the luminance is approximated, the color information acquired from the peripheral portion is not easily influenced by the color of the central portion, and the color arrangement pattern of the peripheral portion can be identified with higher accuracy.

また、本発明にあって、各セルが明色と暗色のいずれで識別されるかが予め決定されて、光学的読取りを補助するパターンを構成する固定領域を備えるものであり、該固定領域は、所定部位をいずれか一色の基準色で配色してなるサンプルセルを、基準色ごとに備え、各基準色についてのサンプルセルは、固定領域の所定位置に設けられており、明色基準色についてのサンプルセルは、固定領域の、明色と識別されるセルであり、暗色基準色についてのサンプルセルは、固定領域の、暗色と識別されるセルである構成が提案される。   Further, in the present invention, it is determined in advance whether each cell is identified as a light color or a dark color, and includes a fixed area that constitutes a pattern that assists optical reading. A sample cell in which a predetermined part is arranged with any one of the reference colors is provided for each reference color, and the sample cell for each reference color is provided at a predetermined position in the fixed area, and the light color reference color The sample cell is a cell that is identified as a light color in the fixed region, and the sample cell for the dark color reference color is a cell that is identified as a dark color in the fixed region.

かかる構成では、各基準色のサンプルセルの色情報を、拡張セルの周辺部の色情報と比較することで、各拡張セルの周辺部の配色パターンを正確に識別できるという利点がある。すなわち、拡張セルの周辺部から読み取る色情報は、印刷の経時変化や、プリンタや表示装置、周囲の照明等の影響によって変化するため、拡張セルから取得した色情報のみに基づいて基準色を識別すると、基準色の識別誤りが増大し、専用データの読取りに支障が生じるおそれがある。これに対して、かかる構成では、サンプルセルの基準色は、印刷の経時変化や、プリンタや表示装置、周囲の照明等の影響を受けて、拡張セルの基準色と同様に変化するから、拡張セルの周辺部から取得した色情報を、サンプルセルから取得した基準色の色情報と比較することで、印刷の経時変化やその他の影響を排除して、各拡張セルの当該部分がどの基準色で配色されているかを正確に識別できるのである。なお、かかる構成では、明色基準色についてのサンプルセルは、固定領域の明色と識別されるセルに配設され、暗色基準色についてのサンプルセルは、固定領域の暗色と識別されるセルに配設されるため、サンプルセルの基準色が、固定領域のセルの明暗パターンの識別を阻害することはない。   Such a configuration has an advantage that the color arrangement pattern of the peripheral portion of each extended cell can be accurately identified by comparing the color information of the sample cell of each reference color with the color information of the peripheral portion of the extended cell. In other words, the color information read from the periphery of the extended cell changes due to changes in printing over time, the effects of printers, display devices, ambient lighting, etc., so the reference color is identified based only on the color information acquired from the extended cell. Then, the reference color identification errors increase, and there is a possibility that the reading of the dedicated data may be hindered. On the other hand, in such a configuration, the reference color of the sample cell changes in the same way as the reference color of the expansion cell due to the influence of the change with time of printing, the printer, the display device, the ambient lighting, etc. By comparing the color information acquired from the periphery of the cell with the color information of the reference color acquired from the sample cell, it is possible to eliminate the time-dependent change of printing and other influences, and to determine which reference color the corresponding part of each expansion cell has. It is possible to accurately identify whether or not the color is arranged. In this configuration, the sample cell for the light reference color is arranged in the cell identified as the light color in the fixed region, and the sample cell for the dark color reference color is the cell identified as the dark color in the fixed region. Therefore, the reference color of the sample cell does not hinder the discrimination of the light / dark pattern of the cell in the fixed region.

また、上記構成では、前記固定領域は、サンプルセルを基準色毎に複数セット備えることが提案される。かかる構成にあっては、各基準色について、複数のサンプルセルが設けられるため、一部のサンプルセルが汚損した場合でも、拡張セルの配色パターンの識別に支障が生じない。   In the above configuration, it is proposed that the fixed region includes a plurality of sets of sample cells for each reference color. In such a configuration, since a plurality of sample cells are provided for each reference color, there is no problem in identifying the color arrangement pattern of the extended cells even when some sample cells are contaminated.

また、上記構成では、サンプルセルは、拡張セルと同様に中央部と周辺部によって構成されており、サンプルセルの前記所定部位は、サンプルセルの周辺部であり、周辺部が明色基準色で配色されたサンプルセルは、中央部が白色で配色され、周辺部が暗色基準色で配色されたサンプルセルは、中央部が黒色で配色されている構成が提案される。   Further, in the above configuration, the sample cell is composed of a central portion and a peripheral portion, like the expansion cell, and the predetermined portion of the sample cell is the peripheral portion of the sample cell, and the peripheral portion is a light color reference color. A configuration is proposed in which the sample cells that have been colored are arranged in white at the center, and the sample cells that are arranged in the dark reference color at the periphery are arranged in black at the center.

上述のように、本発明にあっては、拡張セルの周辺部から取得した色情報は、中央部の色情報の影響を受ける場合があるため、かかる構成のように、サンプルセルについても、拡張セルと同様に中央部と周辺部で構成し、かつ、拡張セルと同様に、周辺部の基準色に応じた色で中央部を配色すれば、サンプルセルの周辺部から取得する色情報を、拡張セルの周辺部から取得する色情報と同様に補正することができ、サンプルセルと拡張セルから取得する色情報をより適正に比較することが可能となる。発明者の研究によれば、かかる構成を採用した場合は、サンプルセル全体を一つの基準色で配色した場合よりも、各拡張セルにおいて基準色の識別を誤る頻度を低減することが可能であった。   As described above, in the present invention, since the color information acquired from the peripheral portion of the extended cell may be affected by the color information in the central portion, the sample cell is also extended with this configuration. Like the cell, it consists of the central part and the peripheral part, and like the expansion cell, if the central part is colored with a color according to the reference color of the peripheral part, the color information acquired from the peripheral part of the sample cell is Correction can be performed in the same manner as the color information acquired from the peripheral portion of the extended cell, and the color information acquired from the sample cell and the extended cell can be compared more appropriately. According to the inventor's research, when such a configuration is adopted, it is possible to reduce the frequency of erroneous identification of the reference color in each extended cell, compared to the case where the entire sample cell is arranged with one reference color. It was.

また、本発明にあって、拡張セルの周辺部は、前記3種類以上の基準色から選ばれた、一つの色で配色されている構成が提案される。かかる構成にあっては、周辺部が単一色で配色されるため、周辺部の配色パターンの識別精度を高めることが可能となる。   In the present invention, a configuration is proposed in which the peripheral portion of the extended cell is arranged in one color selected from the three or more reference colors. In such a configuration, since the peripheral portion is colored in a single color, it is possible to improve the identification accuracy of the color arrangement pattern in the peripheral portion.

また、本発明にあって、拡張セルの周辺部は、複数個のサブセルに細分されて、個々のサブセルが、前記3種類以上の基準色から選ばれた一つの色で配色されている構成が提案される。かかる構成にあっては、周辺部が複数種類の基準色で配色されるため、専用データの記憶容量を高めることが可能となる。   In the present invention, the peripheral portion of the extended cell is subdivided into a plurality of subcells, and each subcell is arranged in one color selected from the three or more reference colors. Proposed. In such a configuration, since the peripheral portion is colored with a plurality of types of reference colors, the storage capacity of dedicated data can be increased.

また、本発明にあって、光学的読取りを補助するパターンを構成するセルからなる固定領域と、データを記録するセルからなる符号化領域とを備えるものであり、符号化領域の、互換データを記録しないセルからなる残余領域に、拡張セルの記録形式を示す識別コードが、セル単位の明暗パターンによって記録されている構成が提案される。   The present invention further comprises a fixed area comprising cells constituting a pattern for assisting optical reading and an encoding area comprising cells for recording data. A configuration is proposed in which an identification code indicating the recording format of the extended cell is recorded in a remaining area consisting of cells not to be recorded by a light / dark pattern in units of cells.

本発明に係る拡張セルは、使用する基準色の種類や数、周辺部の分割・非分割、暗号化方式、誤り訂正方式など、複数の記録形式が用いられることが想定される。このため、かかる構成のように、拡張セルの記録形式を、セル単位の配色パターンによって記録すれば、拡張セルの周辺部の配色パターンを識別する前に、拡張セルのデータ記録形式を取得でき、拡張セルの周辺部の配色パターンの識別を容易に行うことが可能となる。なお、一般の二次元コードの読取装置は、残余領域の配色パターンに関わらず、残余領域にはデータが記録されていないとみなすため、一般の二次元コードの読取装置で二次元コードの互換データを読み取る際に、残余領域の識別コードが互換データの読み取りを阻害することはない。   The extended cell according to the present invention is assumed to use a plurality of recording formats such as the type and number of reference colors to be used, division / non-division of the peripheral portion, encryption method, error correction method, and the like. For this reason, if the recording format of the extended cell is recorded by the cell-based color scheme as in this configuration, the data recording format of the extended cell can be acquired before identifying the color scheme of the peripheral portion of the extended cell, It is possible to easily identify the color arrangement pattern in the peripheral portion of the extended cell. It should be noted that a general two-dimensional code reader assumes that no data is recorded in the remaining area regardless of the color pattern of the remaining area. When reading the data, the identification code of the remaining area does not hinder reading of the compatible data.

本発明の二次元コードの読取方法において、周辺部が単一の基準色で配色されている拡張セルの基準色を識別する場合は、拡張セルの周辺部の複数箇所から色情報を取得し、取得した色情報の平均値に基づいて、当該拡張セルの周辺部の基準色を識別することが提案される。かかる読取方法では、複数箇所から取得した色情報を平均化することで、汚れや照明などによる変動を平準化し、周辺部の基準色をより正確に識別可能となる。   In the two-dimensional code reading method of the present invention, when identifying the reference color of the extended cell in which the peripheral portion is arranged with a single reference color, the color information is obtained from a plurality of locations in the peripheral portion of the extended cell, Based on the average value of the acquired color information, it is proposed to identify the reference color of the peripheral part of the extended cell. In such a reading method, by averaging the color information acquired from a plurality of locations, fluctuations due to dirt, illumination, and the like are leveled, and the reference color in the peripheral portion can be identified more accurately.

また、サンプルセルが基準色毎に複数セット備えられている場合は、本発明の二次元コードの読取方法において、前記複数セットのサンプルセルから、前記所定部位の色情報を個別に取得するサンプル色取得処理と、拡張セルの周辺部の特定部位から取得した色情報を、前記サンプル色取得処理で取得した色情報と個別に比較して、最も近似する色情報を取得したサンプルセルの前記所定部位の基準色が、前記特定部位の基準色であると判定する基準色識別処理とを含むようにすることが提案される。   Further, when a plurality of sample cells are provided for each reference color, in the two-dimensional code reading method of the present invention, the sample color for individually obtaining the color information of the predetermined portion from the plurality of sets of sample cells The predetermined part of the sample cell from which the color information acquired from the specific part of the peripheral part of the expansion process and the expansion cell is individually compared with the color information acquired in the sample color acquisition process, and the closest approximate color information is acquired. It is proposed that the reference color includes a reference color identification process for determining that the reference color is the reference color of the specific part.

二次元コードが均一に照らされていない場合は、同じ基準色の部位から色情報を取得して比較しても、夫々の照度の違いによって色情報に大きな差が生じる場合があるが、かかる方法では、各拡張セルの色情報を、複数セットのサンプルセルと比較するため、拡張セルを、比較的照度差の少ないサンプルセルと比較することで、基準色の識別間違いを低減できる。   If the two-dimensional code is not illuminated uniformly, even if the color information is obtained from the same reference color part and compared, there may be a large difference in the color information due to the difference in illuminance. Then, since the color information of each extension cell is compared with a plurality of sets of sample cells, it is possible to reduce the identification error of the reference color by comparing the extension cell with a sample cell having a relatively small illuminance difference.

また、サンプルセルの周辺部がいずれか一色の基準色で配色され、かつ、サンプルセルの中央部が白色又は黒色で配色された二次元コードを読み取る場合には、本発明の二次元コードの読取方法において、拡張セルの周辺部の特定部位から取得した色情報を、サンプルセルの周辺部の、前記特定部位に対応する部位から取得した色情報と比較して、最も近似する色情報を取得したサンプルセルの周辺部の基準色が、前記特定部位の基準色であると識別することが提案される。   Further, when reading a two-dimensional code in which the peripheral part of the sample cell is colored with any one of the reference colors and the central part of the sample cell is colored in white or black, the reading of the two-dimensional code of the present invention is performed. In the method, the color information acquired from the specific part in the peripheral part of the expansion cell is compared with the color information acquired from the part corresponding to the specific part in the peripheral part of the sample cell, and the closest color information is acquired. It is proposed that the reference color of the periphery of the sample cell is identified as the reference color of the specific part.

かかる読取方法では、例えば、拡張セルの周辺部の右下部の基準色を決定する場合であれば、当該右下部から取得した色情報を、各サンプルセルの周辺部の右下部から取得した色情報と比較して、色情報の最も近似するサンプルセルの周辺部と同じ基準色であると判定する。かかる読取方法では、かかる方法によれば、比較対象とする各サンプルセルの周辺部の色情報は、拡張セルの周辺部から取得する色情報と同じように、中央部の色の影響を受けたものとなるため、拡張セルとサンプルセルの周辺部の色情報を比較する際に、中央部の色の影響に左右されることなく、基準色を正確に決定することができる。   In such a reading method, for example, when determining the reference color of the lower right portion of the peripheral portion of the extended cell, the color information acquired from the lower right portion of the color cell is acquired from the lower right portion of the peripheral portion of each sample cell. It is determined that the reference color is the same as that of the peripheral portion of the sample cell with the closest color information. In such a reading method, according to such a method, the color information of the peripheral portion of each sample cell to be compared is affected by the color of the central portion, as is the color information acquired from the peripheral portion of the extended cell. Therefore, when comparing the color information of the peripheral part of the extension cell and the sample cell, the reference color can be accurately determined without being influenced by the influence of the color of the central part.

また、中央部が白色の拡張セルでは周辺部が明色基準色で配色され、中央部が黒色の拡張セルでは周辺部が暗色基準色で配色された二次元コードを読み取る場合には、本発明の二次元コードの読取方法において、各拡張セルのセル単位の明暗パターンを識別して、前記互換データを復号する互換データ復号処理と、該互換データ復号処理の後に、各拡張セルの周辺部から取得した色情報に基づいて当該周辺部の配色パターンを識別し、前記専用データを復号する専用データ復号処理とを含み、該専用データ復号処理では、互換データ復号処理で識別した拡張セルのセル単位の明暗パターンに基づいて、周辺部の基準色を、明色基準色と暗色基準色のいずれかに絞り込むようにすることが提案される。   In addition, when reading a two-dimensional code in which an extension cell having a white central portion is colored with a bright reference color and an extension cell having a black central portion is colored with a dark reference color, the present invention is used. In the two-dimensional code reading method, a compatible data decoding process for identifying a cell-by-cell brightness pattern of each extended cell and decoding the compatible data, and after the compatible data decoding process, from the peripheral part of each extended cell A dedicated data decoding process for identifying the color arrangement pattern of the peripheral part based on the acquired color information and decoding the dedicated data, and in the dedicated data decoding process, the cell unit of the extended cell identified by the compatible data decoding process Based on the light / dark pattern, it is proposed that the reference color in the peripheral portion is narrowed down to either the light color reference color or the dark color reference color.

かかる構成にあっては、拡張セルの中央部の配色パターンを識別した後で、周辺部の配色パターンを識別するため、周辺部の色を、予め明色基準色と暗色基準色の一方に絞り込むことができ、これにより、周辺部の配色パターンを識別する処理を簡易化できる。また、中央部の配色パターンは、二次元コードに標準装備される誤り訂正機能を用いて訂正可能であるため、拡張セルの周辺部の配色パターンの識別を誤る確率も低減できる。   In such a configuration, after identifying the color arrangement pattern in the center of the extended cell, in order to identify the color arrangement pattern in the peripheral portion, the color in the peripheral portion is previously narrowed down to one of the light color reference color and the dark color reference color. As a result, the process of identifying the color arrangement pattern in the peripheral portion can be simplified. Further, since the color arrangement pattern at the center can be corrected by using the error correction function provided as standard in the two-dimensional code, the probability of erroneous identification of the color arrangement pattern at the periphery of the extended cell can be reduced.

また、本発明の二次元コードの読取方法として、二次元コードを撮像する撮像処理を複数回実行するとともに、該撮像処理で得られた二次元コードの画像データに基づいて、各拡張セルの周辺部の配色パターンを識別する周辺部識別処理を撮像処理毎に実行し、その後、個々の拡張セルについて実行した複数回の周辺部識別処理の識別結果を多数決して、個々の拡張セルの周辺部の配色パターンを特定する多数決処理と、該多数決処理で特定した拡張セルの配色パターンに基づいて専用データを復号する多数決復号処理とを実行することが提案される。   In addition, as a two-dimensional code reading method of the present invention, an imaging process for imaging a two-dimensional code is executed a plurality of times, and based on the image data of the two-dimensional code obtained by the imaging process, the periphery of each expansion cell Peripheral part identification process for identifying the color scheme of each part is performed for each imaging process, and then many identification results of multiple peripheral part identification processes performed for each extended cell are never performed in the peripheral part of each extended cell. It is proposed to execute a majority process for specifying a color scheme and a majority decoding process for decoding dedicated data based on the extended cell color pattern specified in the majority process.

発明者の研究によれば、拡張セルの周辺部の配色パターンの識別間違いは、同じ拡張セルで繰り返し発生する頻度が少ないため、かかる読取方法のように、拡張セルの周辺部の配色パターンの識別を繰り返し、複数回の識別結果を多数決して、各拡張セルの周辺部の配色パターンを特定するようにすれば、二次元データに記録された専用データをより確実に復号可能となる。   According to the inventor's research, the identification error of the color arrangement pattern in the peripheral part of the extended cell is less likely to occur repeatedly in the same extended cell. Therefore, as in this reading method, the color pattern in the peripheral part of the extended cell is identified. By repeating the above and identifying the color arrangement pattern in the peripheral portion of each extended cell without a large number of multiple identification results, the dedicated data recorded in the two-dimensional data can be more reliably decoded.

なお、上記読取方法は、撮像処理を複数回実行し、個々の拡張セルについて撮像処理を行った回数だけ周辺部識別処理を繰り返す必要があり、比較的多くの処理が必要となる。このため、二次元コードを撮像して得られた一枚の画像データに基づいて、拡張セルの周辺部の配色パターンを識別し、識別した拡張セルの周辺部の配色パターンに基づいて専用データを復号する初回復号処理を実行し、該初回復号処理で、専用データを復号できなかった場合に、上記二次元コードの読取方法を実行することが提案される。かかる読取方法とすれば、本発明に係る二次元コードの読取りに要する処理を低減できる。   Note that the above-described reading method needs to perform imaging processing a plurality of times and repeat the peripheral part identification processing as many times as the number of imaging processing performed for each extended cell, which requires a relatively large amount of processing. For this reason, based on a piece of image data obtained by imaging the two-dimensional code, the color arrangement pattern of the peripheral portion of the extended cell is identified, and the dedicated data is obtained based on the color arrangement pattern of the peripheral portion of the identified extended cell. It is proposed to execute an initial decoding process for decoding, and to execute the above two-dimensional code reading method when the dedicated data cannot be decoded in the initial decoding process. With such a reading method, processing required for reading the two-dimensional code according to the present invention can be reduced.

また、本発明の二次元コードの読取方法として、赤色光の照明下で二次元コードを撮像し、得られた二次元コードの画像データから、拡張セルの周辺部の赤色成分の色情報を取得する赤色識別処理と、緑色光の照明下で二次元コードを撮像し、得られた二次元コードの画像データから、拡張セルの周辺部の緑色成分の色情報を取得する緑色識別処理と、青色光の照明下で二次元コードを撮像し、得られた二次元コードの画像データから、拡張セルの周辺部の青色成分の色情報を取得する青色識別処理との3つの処理のうち、少なくとも2つの処理を実行し、赤色識別処理、緑色識別処理、及び青色識別処理のうち、少なくとも2つの処理で取得した色情報を組み合わせて、拡張セルの周辺部の基準色を識別することが提案される。   In addition, as a two-dimensional code reading method according to the present invention, a two-dimensional code is imaged under illumination of red light, and color information of the red component in the peripheral portion of the expansion cell is obtained from the obtained two-dimensional code image data. Red identification processing, imaging a two-dimensional code under the illumination of green light, and obtaining green component color information in the periphery of the expansion cell from the obtained two-dimensional code image data, and blue At least two of the three processes including the blue identification process for capturing the two-dimensional code under light illumination and obtaining the color information of the blue component in the peripheral portion of the extended cell from the obtained two-dimensional code image data It is proposed that the reference color of the peripheral portion of the extended cell is identified by combining the color information acquired in at least two of the red identification process, the green identification process, and the blue identification process. .

赤色光の照明下で撮像して得られる二次元コードの画像データは、青色光や緑色光によるノイズがないため、かかる画像データから、拡張セルの周辺部の色情報を取得すれば、周辺部の色の赤成分について、より正確な色情報を得ることができる。同様に、青色光や緑色光の照明下で撮像して得られる二次元コードの画像データからは、周辺部の青色成分と緑色成分について、より正確な色情報を得ることができる。したがって、かかる方法のように、赤色光、緑色光、青色光の照明下で撮像した画像データから、拡張セルの周辺部の色情報を成分ごとに取得して組み合わせれば、白色光の照明下で撮像した二次元コードの画像を用いる場合よりも、拡張セルの周辺部の基準色を正確に識別できる。   Since the image data of the two-dimensional code obtained by imaging under the illumination of red light is free from noise due to blue light or green light, if the color information of the peripheral part of the expansion cell is obtained from such image data, the peripheral part More accurate color information can be obtained for the red component of the color. Similarly, more accurate color information can be obtained for the blue and green components in the periphery from two-dimensional code image data obtained by imaging under blue or green light illumination. Therefore, if the color information of the peripheral part of the expansion cell is acquired for each component from the image data captured under the illumination of red light, green light, and blue light as in this method, and combined, Compared to the case of using the image of the two-dimensional code imaged in step 1, the reference color in the peripheral portion of the expansion cell can be identified more accurately.

なお、かかる読取方法は、二次元コードの撮像を複数回実行する必要があり、比較的多くの処理が必要となる。このため、白色光の照明下で二次元コードを撮像し、得られた二次元コードの画像データから、拡張セルの周辺部の配色パターンを識別し、識別した拡張セルの周辺部の配色パターンに基づいて専用データを復号する白色光復号処理を実行し、該白色復号処理で、専用データを復号できなかった場合に、上記読取方法を実行するようにすることが提案される。かかる読取方法とすれば、本発明に係る二次元コードの読取りに要する処理を低減できる。   Such a reading method needs to execute imaging of a two-dimensional code a plurality of times, and requires a relatively large amount of processing. For this reason, a two-dimensional code is imaged under illumination of white light, and the color pattern of the peripheral part of the extended cell is identified from the obtained two-dimensional code image data, and the color pattern of the peripheral part of the identified extended cell is identified. Based on this, it is proposed to execute a white light decoding process for decoding dedicated data, and to execute the reading method when the dedicated data cannot be decoded by the white decoding process. With such a reading method, processing required for reading the two-dimensional code according to the present invention can be reduced.

また、上述の二次元コードの読取方法のように、互換データ復号処理で識別した拡張セルのセル単位の明暗パターンに基づいて、周辺部の基準色を、明色基準色と暗色基準色のいずれかに絞り込める場合は、本発明の二次元コードの読取方法において、読取対象の二次元コードの拡張セルの周辺部に用いられる全ての明色基準値でRGB値の緑色成分が共通しており、かつ、全ての暗色基準値でRGB値の緑色成分が共通している場合には、専用データ復号処理において、赤色光の照明下で二次元コードを撮像し、得られた二次元コードの画像データから、拡張セルの周辺部の赤色成分の色情報を取得する赤色識別処理と、青色光の照明下で二次元コードを撮像し、得られた二次元コードの画像データから、拡張セルの周辺部の青色成分の色情報を取得する青色識別処理とを実行し、赤色識別処理及び青色識別処理で取得した色情報を組み合わせて、拡張セルの周辺部の配色パターンを識別することが提案される。   Further, as in the above-described two-dimensional code reading method, the reference color of the peripheral portion is selected from either the bright color reference color or the dark color reference color based on the cell-by-cell light / dark pattern of the extended cell identified by the compatible data decoding process. In the two-dimensional code reading method of the present invention, the green component of the RGB value is common to all the bright color reference values used in the peripheral part of the extension cell of the two-dimensional code to be read. In addition, when the green color component of the RGB value is common to all the dark color reference values, in the dedicated data decoding process, the two-dimensional code is imaged under illumination of red light, and the obtained two-dimensional code image From the data, red identification processing that acquires the color information of the red component around the expansion cell, and imaging the two-dimensional code under the illumination of blue light, and from the obtained two-dimensional code image data, the periphery of the expansion cell Part blue component color Run the blue identification process of acquiring the broadcast, by combining the color information acquired by the red identification process and the blue identification process, it is proposed to identify the color scheme of the peripheral portion of the auxiliary cell.

かかる読取方法とすれば、緑色光の照明下での二次元コードの撮像を省略して、二次元コードの読取りに要する処理が増大するのを抑えつつ、拡張セルの周辺部の配色パターンを正確に識別可能となる。   With such a reading method, it is possible to omit the imaging of the two-dimensional code under the illumination of green light, and to suppress the increase in the processing required for reading the two-dimensional code, while accurately adjusting the color arrangement pattern in the peripheral portion of the expansion cell. Can be identified.

以上に述べたように、本発明の二次元コードは、セル単位の明暗パターンの明暗パターンの識別が容易であり、かつ、セル単位の明暗パターン以外の配色パターンによって、多くの専用データを記憶できる。   As described above, the two-dimensional code of the present invention can easily identify the light / dark pattern of the light / dark pattern in the cell unit, and can store a large amount of dedicated data by the color arrangement pattern other than the light / dark pattern in the cell unit. .

(a)は実施例1の二次元コード1の概略図であり、(b)は実施例1の二次元コード1の各領域を機能別に模様分けして示す説明図である。(A) is the schematic of the two-dimensional code 1 of Example 1, (b) is explanatory drawing which shows each area | region of the two-dimensional code 1 of Example 1 according to the function according to the pattern. 符号化領域4の拡大図である。It is an enlarged view of the encoding area | region 4. FIG. (a)は、拡張セル2a及びサンプルセル2bの構造を示す説明図であり、(b)は、拡張セル2a及びサンプルセル2bの配色パターンを示す説明図である。(A) is explanatory drawing which shows the structure of the extended cell 2a and the sample cell 2b, (b) is explanatory drawing which shows the color scheme of the extended cell 2a and the sample cell 2b. 基準色を示す図表である。It is a chart which shows a reference color. 拡張セル2aの配色パターンに対応する符号化データを示す図表である。It is a chart which shows the coding data corresponding to the color scheme of the expansion cell 2a. 実施例1の二次元コード1のデータ構造を示す概念図である。3 is a conceptual diagram illustrating a data structure of a two-dimensional code 1 according to Embodiment 1. FIG. サンプル領域5aの拡大図である。It is an enlarged view of the sample area | region 5a. (a)は実施例1の二次元コード1の概略図であり、(b)は、実施例1の二次元コード1と互換性を有するQRコード1aである。(A) is the schematic of the two-dimensional code 1 of Example 1, (b) is the QR code 1a compatible with the two-dimensional code 1 of Example 1. FIG. 実施例1の二次元コード1の生成方法を示すフローチャートである。3 is a flowchart illustrating a method for generating the two-dimensional code 1 according to the first embodiment. 符号化処理の処理内容を示すフローチャートである。It is a flowchart which shows the processing content of an encoding process. 実施例1の二次元コード1の読取処理を示すフローチャートである。3 is a flowchart illustrating a reading process of the two-dimensional code 1 according to the first embodiment. 専用データ復号処理の処理内容を示すフローチャートである。It is a flowchart which shows the processing content of an exclusive data decoding process. 色情報取得部位30を示す説明図である。It is explanatory drawing which shows the color information acquisition site | part 30. FIG. 多数決読取処理の処理内容を示すフローチャートである。It is a flowchart which shows the processing content of majority reading processing. 複数照明読取処理の処理内容を示すフローチャートである。It is a flowchart which shows the processing content of a multiple illumination reading process. (a)は、実施例2の拡張セル2cの構造を示す説明図であり、(b)、(c)は、拡張セル2cの配色パターンの例を示す説明図である。(A) is explanatory drawing which shows the structure of the extended cell 2c of Example 2, (b), (c) is explanatory drawing which shows the example of the color scheme of the extended cell 2c. 拡張セル2cの配色パターンに対応する符号化データを示す図表である。It is a graph which shows the coding data corresponding to the color scheme of the expansion cell 2c. 実施例2の二次元コード10のデータ構造を示す概念図である。FIG. 6 is a conceptual diagram illustrating a data structure of a two-dimensional code 10 according to the second embodiment. (a)は、拡張セル2cの色情報取得部位30a〜30hを示す説明図であり、(b)は、サンプルセル2bの色情報取得部位31a〜31hを示す説明図である。(A) is explanatory drawing which shows the color information acquisition site | part 30a-30h of the expansion cell 2c, (b) is explanatory drawing which shows the color information acquisition site | part 31a-31h of the sample cell 2b.

本発明の実施形態を、以下の実施例に従って説明する。   Embodiments of the present invention are described according to the following examples.

本実施例の二次元コード1は、二次元コードの中で最も普及しているQRコード(登録商標)と互換性を有するものである。具体的には、図1(a)に示すように、本実施例の二次元コード1は、正方形のセル2を、縦横に21個ずつマトリクス状に配置してなるものである。この二次元コード1の各セル2は、白色と黒色のみで配色されるものだけではないが、セル単位で明色又は暗色と識別可能であり、二次元コード1の基本構造は、QRコードの規格に準拠している。すなわち、図1(b)に示すように、二次元コード1は、QRコードと同様に、機能パターン(固定領域)3と符号化領域4とによって構成される。機能パターン3は、各セル2が明色と暗色のいずれで識別されるかが予め決定されている領域であり、二次元コード1の光学的読取りを補助する位置検出パターン5、分離パターン6、タイミングパターン7などによって構成される。また、符号化領域4は、セル単位の明暗パターンによってデータを記録する領域であり、データコード語及び誤り訂正コード語が記録されるデータコード領域8と、形式情報を示すコードが配置される形式情報コード領域9とによって構成される。こうした構成は、基本的に、QRコードのJIS規格(JIS X 0510:2004)に準拠したものであるため詳細な説明は省略する。   The two-dimensional code 1 of this embodiment is compatible with the most popular QR code (registered trademark) among the two-dimensional codes. Specifically, as shown in FIG. 1A, the two-dimensional code 1 of the present embodiment is formed by arranging 21 square cells 2 vertically and horizontally in a matrix. Each cell 2 of the two-dimensional code 1 is not limited to only white and black, but can be distinguished from light or dark color in cell units. The basic structure of the two-dimensional code 1 is that of the QR code. Complies with the standard. That is, as shown in FIG. 1B, the two-dimensional code 1 is composed of a functional pattern (fixed area) 3 and an encoding area 4 in the same manner as the QR code. The functional pattern 3 is an area in which whether each cell 2 is identified by light color or dark color is determined in advance, and a position detection pattern 5 that assists optical reading of the two-dimensional code 1, a separation pattern 6, It consists of a timing pattern 7 and the like. The encoding area 4 is an area in which data is recorded by a light / dark pattern in units of cells. A data code area 8 in which data code words and error correction code words are recorded, and a format in which codes indicating format information are arranged. And an information code area 9. Since such a configuration basically conforms to the JIS standard (JIS X 0510: 2004) of the QR code, detailed description thereof is omitted.

図2に示すように、二次元コード1の符号化領域4のセル2は、中央部20と周辺部21とからなる拡張セル2aで構成される。詳述すると、図3(a)に示すように、各拡張セル2aは、縦横に3分割して得られる9つの正方形のうち、中央の正方形部分を中央部20とし、周囲の残り8つの正方形部分を周辺部21としている。モノクロ画像であるため図2などでは十分に示されていないが、各拡張セル2aの中央部20は、白色と黒色のいずれか一色で配色される。また、各拡張セル2aの周辺部21は、8種類の基準色から選ばれたいずれか一つの色で配色される。   As shown in FIG. 2, the cell 2 in the coding area 4 of the two-dimensional code 1 is composed of an extended cell 2 a composed of a central portion 20 and a peripheral portion 21. More specifically, as shown in FIG. 3A, each extended cell 2a has nine squares obtained by dividing the cell vertically and horizontally into a central square portion 20 and the remaining eight squares around it. The portion is a peripheral portion 21. Although it is a monochrome image, it is not sufficiently shown in FIG. 2 or the like, but the central portion 20 of each expansion cell 2a is colored with one of white and black. Further, the peripheral portion 21 of each expansion cell 2a is arranged in any one color selected from eight types of reference colors.

図4に示すように、本実施例では、RGB値の相違する白色、黄色、シアン、緑色、マゼンタ、赤色、青色、黒色の8種類の色が基準色として用いられる。これらの基準色は、色の相互識別が容易となるように、RGB空間の立方体の端部にある色を採用したものである。ここで、8種類の基準色のうち、輝度が0.7以上の白色、黄色、シアン、緑色の4種類は明色基準色に分類される。一方、輝度が0.3以下のマゼンタ、赤色、青色、黒色の4種類は暗色基準色に分類される。すなわち、輝度0.7が、本発明に係る明色閾値に相当し、輝度0.3が本発明に係る暗色閾値に相当するものである。なお、RGB値と輝度(Y)の変換式は、BTA S−001Bによって規定された下記の式を用いている。
Y=(0.2126×R + 0.7152×G + 0.0722×B)/255
As shown in FIG. 4, in this embodiment, eight colors of white, yellow, cyan, green, magenta, red, blue, and black having different RGB values are used as reference colors. These reference colors employ colors at the end of a cube in the RGB space so that the colors can be easily identified with each other. Here, among the eight kinds of reference colors, four kinds of white, yellow, cyan, and green having a luminance of 0.7 or more are classified as light reference colors. On the other hand, four types of magenta, red, blue, and black whose luminance is 0.3 or less are classified as dark reference colors. That is, a luminance of 0.7 corresponds to the light color threshold according to the present invention, and a luminance of 0.3 corresponds to the dark color threshold according to the present invention. In addition, the following formula prescribed | regulated by BTA S-001B is used for the conversion formula of RGB value and a brightness | luminance (Y).
Y = (0.2126 × R + 0.7152 × G + 0.0722 × B) / 255

ここで、拡張セル2aは、図3(b)に示す8通りの配色パターンのいずれかで配色される。これらの配色パターンでは、中央部20が白色の拡張セル2aは、周辺部21が4つの明色基準色のいずれか一色で配色され、中央部20が黒色の拡張セル2aは、周辺部21が4つの暗色基準色のいずれか一色で配色される。   Here, the extended cell 2a is arranged in any one of the eight color arrangement patterns shown in FIG. In these color arrangement patterns, the extension cell 2a whose white at the central portion 20 is arranged in any one of four bright reference colors in the peripheral portion 21, and the expansion cell 2a whose black at the central portion 20 is arranged at the peripheral portion 21. One of the four dark color reference colors is used.

本実施例の二次元コード1の拡張セル2aを、QRコードの読取装置によってセル単位の明暗パターンを識別した場合、中央部20が白色の拡張セル2aは明色と識別され、中央部20が黒色の拡張セル2aは暗色と識別される。QRコードの読取装置は、各セルの中心付近の色情報を重視して、当該セルが明色と暗色のいずれであるかを識別するためである。特に、拡張セル2aの中央部20は、反射率や輝度が、最も高い色(白色)と最も低い色(黒色)のいずれかで配色されるため、QRコードの読取装置で、セル単位で明色と暗色の識別をした時に、中央部が白色の拡張セルは明色と、中央部が黒色の拡張セルは暗色と容易に識別できる。すなわち、本実施例では、拡張セル2aの中央部20の白色と黒色の配色パターンが、拡張セル2aのセル単位の明暗パターンとして識別される。このため、本実施例では、中央部20の配色パターンによって、QRコードの読取装置が読取可能な互換データを記録する。なお、QRコードの読取装置とは、QRコードを読み取るための専用装置に限らず、QRコード読取用プログラムをインストールしたスマートフォン等も含む。   When the light and dark pattern of the cell unit is identified by the QR code reader of the extended cell 2a of the two-dimensional code 1 of the present embodiment, the white extended cell 2a is identified as a bright color, and the central portion 20 is The black extended cell 2a is identified as a dark color. The QR code reader attaches importance to color information in the vicinity of the center of each cell, and identifies whether the cell is light or dark. In particular, since the central portion 20 of the extended cell 2a is colored in either the highest color (white) or the lowest color (black), the reflectance and brightness are QR code readers, which are bright in cell units. When the color and the dark color are identified, the extended cell whose center is white can be easily identified as a light color, and the extended cell whose center is black can be easily identified as a dark color. That is, in the present embodiment, the white and black color arrangement pattern of the central portion 20 of the extended cell 2a is identified as a light / dark pattern in cell units of the extended cell 2a. For this reason, in this embodiment, compatible data that can be read by the QR code reader is recorded according to the color arrangement pattern of the central portion 20. The QR code reader is not limited to a dedicated device for reading a QR code, but also includes a smartphone installed with a QR code reading program.

一方、本実施例では、拡張セル2aの周辺部21の基準色の配色パターンによって、専用データを記録する。QRコードの読取装置は、周辺部21の基準色を識別できないため、専用データを読み取るためには、周辺部21の基準色を識別可能な専用の読取装置(以下、専用読取装置という。)が必要である。なお、専用読取装置は、拡張セル2aの周辺部21の基準色の識別機能等を有するプログラムをインストールしたスマートフォン等も含む。   On the other hand, in this embodiment, the dedicated data is recorded by the color arrangement pattern of the reference color of the peripheral portion 21 of the expansion cell 2a. Since the QR code reader cannot identify the reference color of the peripheral portion 21, a dedicated reader capable of identifying the reference color of the peripheral portion 21 (hereinafter referred to as a dedicated reader) is required to read the dedicated data. is necessary. The dedicated reading device also includes a smartphone or the like in which a program having a reference color identification function or the like of the peripheral portion 21 of the extended cell 2a is installed.

なお、本実施例では、拡張セル2aを縦横に3分割して得られる9つの正方形のうち、中央の正方形部分を中央部20とし、周囲の残り8つの正方形部分を周辺部21としているが、発明者の研究によれば、中央部20と周辺部21の面積比率をかかる比率(1:8)とした場合に、中央部20の明暗パターンの識別精度と、周辺部21の基準色の識別精度の双方を最もバランスよく確保できる。   In the present embodiment, among the nine squares obtained by dividing the expansion cell 2a vertically and horizontally, the central square portion is the central portion 20 and the remaining eight square portions are the peripheral portion 21. According to the inventor's research, when the area ratio between the central portion 20 and the peripheral portion 21 is set to such a ratio (1: 8), the light and dark pattern identification accuracy of the central portion 20 and the reference color of the peripheral portion 21 are identified. Both of the accuracy can be secured in the most balanced manner.

また、本実施例では、中央部20が白色の拡張セル2aは、周辺部21が高輝度(0.7以上)の基準色で配色され、また、中央部20が黒色の拡張セル2aは、周辺部21が低輝度(0.3以下)の基準色で配色されており、周辺部21は、中央部20の色と反射率や輝度が近似する基準色で配色されている。このため、本実施例では、二次元コード1を読み取る際に、手ぶれやピントボケ、また撮像プログラムの平均化フィルタなどの影響によって、中央部20と周辺部21の境界が曖昧となり、中央部20から取得した色情報に、周辺部21の色が影響した場合でも、中央部20から取得した色情報に基づいて、拡張セル単位の明暗パターンを正確に識別できる。また、周辺部21から取得した色情報に、中央部20の色が影響した場合でも、周辺部21から取得した色情報に基づいて、周辺部21の配色パターンを高い精度で識別できる。   Further, in the present embodiment, the expansion cell 2a whose center portion 20 is white is arranged with a reference color having a peripheral portion 21 of high luminance (0.7 or more), and the expansion cell 2a whose center portion 20 is black is The peripheral portion 21 is colored with a reference color of low luminance (0.3 or less), and the peripheral portion 21 is colored with a reference color that approximates the color of the central portion 20 with reflectance and luminance. For this reason, in this embodiment, when the two-dimensional code 1 is read, the boundary between the central portion 20 and the peripheral portion 21 becomes ambiguous due to camera shake, out-of-focus blur, an averaging filter of the imaging program, and the like. Even when the color of the peripheral portion 21 affects the acquired color information, the light / dark pattern in units of extended cells can be accurately identified based on the color information acquired from the central portion 20. Further, even when the color information acquired from the peripheral portion 21 affects the color information acquired from the peripheral portion 21, the color arrangement pattern of the peripheral portion 21 can be identified with high accuracy based on the color information acquired from the peripheral portion 21.

本実施例では、図5に示すように、拡張セル2aの8通りの配色パターンによって、1つの拡張セル2aに「000」から「111」の3ビットの符号化データを記録する。この符号化データの最上位のビット(第1ビット)は、中央部20の配色パターンに対応するデータであり、QRコードの読取装置によって読み取ることのできる互換データである。一方、第2ビット、第3ビットは、周辺部21の配色パターンに対応するデータであり、専用読取装置でしか読み取ることのできない専用データである。本実施例では、拡張セル2aの符号化データを、同じ位置のビット毎の集合とすることで、3層のデータ領域を形成している。具体的には、符号化データの最上位のビット(第1ビット)の集合によって第一層のデータ領域を形成し、かかるデータ領域に互換データを記録する。そして、第2ビット、第3ビットの集合によって第二層と第三層のデータ領域を夫々形成し、かかるデータ領域に専用データを記録する。   In the present embodiment, as shown in FIG. 5, 3-bit encoded data from “000” to “111” is recorded in one extended cell 2a by eight color patterns of the extended cell 2a. The most significant bit (first bit) of the encoded data is data corresponding to the color arrangement pattern of the central portion 20, and is compatible data that can be read by a QR code reader. On the other hand, the second bit and the third bit are data corresponding to the color arrangement pattern of the peripheral portion 21 and are dedicated data that can be read only by a dedicated reader. In this embodiment, the encoded data of the extension cell 2a is set as a set for each bit at the same position, thereby forming a three-layer data area. Specifically, a first-layer data area is formed by a set of the most significant bits (first bits) of the encoded data, and compatible data is recorded in the data area. Then, a data area of the second layer and the third layer is formed by a set of the second bit and the third bit, respectively, and dedicated data is recorded in the data area.

本実施例では、上記三層のデータ領域は、QRコードの符号化領域と同じデータ形式となっており、図6に示すように、本実施例の二次元コード1は、QRコード1a,1b,1cのデータ構造を3つ積層したデータ構造をなしている。かかるQRコード1a〜1cは、二次元コード1と同じセル数であり、各QRコード1a〜1cのセルの色は、当該セルと同じ位置にある二次元コード1の拡張セル2aの配色パターンに対応したものとなっている。例えば、m行n列のセルの色が、第一層のQRコード1aで「1」(黒)、第二層のQRコード1bで「0」(白)、第三層のQRコード1cで「0」(白)である場合は、二次元コード1のm行n列の拡張セル2aの色がマゼンタ(符号化データが「100」)となる(図5参照)。   In the present embodiment, the three-layer data area has the same data format as that of the QR code encoding area. As shown in FIG. 6, the two-dimensional code 1 of the present embodiment includes QR codes 1a and 1b. , 1c, a data structure in which three data structures are stacked. The QR codes 1a to 1c have the same number of cells as the two-dimensional code 1, and the color of each QR code 1a to 1c is the color arrangement pattern of the extended cell 2a of the two-dimensional code 1 at the same position as the cell. It has become compatible. For example, the cell color of m rows and n columns is “1” (black) for the QR code 1a of the first layer, “0” (white) for the QR code 1b of the second layer, and QR code 1c of the third layer. When it is “0” (white), the color of the extended cell 2a of m rows and n columns of the two-dimensional code 1 is magenta (the encoded data is “100”) (see FIG. 5).

また、図1,7に示すように、二次元コード1は、拡張セル2aの周辺部21の基準色を、正確に識別可能とするために、位置検出パターン5の左側にサンプル領域5aを備えている。サンプル領域5aは、8個のサンプルセル2bによって構成される。サンプルセル2bは、拡張セル2aと同様に、白色と黒色のいずれか一色で配色される中央部20と、上記8種類の基準色のいずれか一色で配色される周辺部21とからなるセル2である。サンプル領域5aを構成する8個のサンプルセル2bは、拡張セル2aの8通りの配色パターン(図3(b))で配色されており、8個のサンプルセル2bの周辺部21は、別々の基準色によって配色される。ここで、サンプル領域5aでは、どのサンプルセル2bの周辺部21が、どの基準色で配色されるかが予め決定されている。このため、本実施例では、拡張セル2aの周辺部21から光学的に取得した色情報(RGB値)を、各サンプルセル2bの周辺部21から取得した色情報と比較することで、拡張セル2aの周辺部21の基準色を識別できる。拡張セル2aの周辺部21から光学的に取得したRGB値の絶対値に基づいて、当該周辺部21の基準色を識別する場合には、印刷の経時変化や、プリンタや表示装置、周囲の照明等による色情報の変動によって、基準色の識別を誤る可能性があるが、このように、サンプルセル2bの基準色を比較対象として基準色を識別すれば、印刷の経時変化や、プリンタや表示装置、周囲の照明等の影響を排除できるため、基準色の識別誤りを低減できる。   As shown in FIGS. 1 and 7, the two-dimensional code 1 includes a sample region 5a on the left side of the position detection pattern 5 so that the reference color of the peripheral portion 21 of the extended cell 2a can be accurately identified. ing. The sample region 5a is composed of eight sample cells 2b. Similar to the expansion cell 2a, the sample cell 2b is a cell 2 including a central portion 20 that is colored in one of white and black and a peripheral portion 21 that is colored in any one of the eight kinds of reference colors. It is. The eight sample cells 2b constituting the sample region 5a are arranged in eight color schemes (FIG. 3B) of the expansion cell 2a, and the peripheral portions 21 of the eight sample cells 2b are separated from each other. Colored according to the reference color. Here, in the sample region 5a, it is determined in advance which reference color is used for the peripheral portion 21 of which sample cell 2b. For this reason, in this embodiment, the color information (RGB values) optically acquired from the peripheral portion 21 of the extended cell 2a is compared with the color information acquired from the peripheral portion 21 of each sample cell 2b. The reference color of the peripheral portion 21 of 2a can be identified. When the reference color of the peripheral portion 21 is identified based on the absolute value of the RGB value optically acquired from the peripheral portion 21 of the expansion cell 2a, the change with time of printing, the printer, the display device, and the ambient illumination However, if the reference color is identified with the reference color of the sample cell 2b as a comparison target, the change with time in printing, the printer, and the display Since it is possible to eliminate the influence of the apparatus, ambient lighting, etc., it is possible to reduce identification errors of the reference color.

なお、サンプル領域5aでは、位置検出パターン5で明色と識別される部分に、中央部20が白色で、周辺部21が明色基準色となるサンプルセル2bを配置し、位置検出パターン5で暗色と識別される部分に、中央部20が黒色で、周辺部21が暗色基準色となるサンプルセル2bを配置しているため、サンプル領域5aが位置検出パターン5の機能を阻害することはない。   In the sample region 5 a, sample cells 2 b in which the central portion 20 is white and the peripheral portion 21 is a bright reference color are arranged in a portion identified by the position detection pattern 5 as a bright color. Since the sample cell 2b in which the central portion 20 is black and the peripheral portion 21 is the dark reference color is arranged in the portion identified as the dark color, the sample region 5a does not hinder the function of the position detection pattern 5. .

また、本実施例では、図1,7に示すように、左上、左下、右上の位置検出パターン5にサンプル領域5aが1セットずつ配設されており、周辺部21が8種類の基準色で配色されたサンプルセル2bが3セット設けられている。このため、かかる構成にあっては、一部のサンプル領域5aが汚損した場合でも、拡張セル2aの配色パターンの識別に支障が生じることはない。   In this embodiment, as shown in FIGS. 1 and 7, one set of sample areas 5a is arranged in the upper left, lower left, and upper right position detection patterns 5, and the peripheral portion 21 has eight reference colors. Three sets of colored sample cells 2b are provided. For this reason, in such a configuration, even when a part of the sample region 5a is soiled, there is no problem in identifying the color arrangement pattern of the extended cell 2a.

また、サンプルセル2bは、拡張セル2aと同様に、周辺部21が明色基準色で配色されたものが、中央部20が白色で配色され、周辺部21が暗色基準色で配色されたものが、中央部20が黒色で配色されるため、拡張セル2aとサンプルセル2bの周辺部21から取得する色情報は、中央部20の色の影響を同じように受けることとなる。したがって、かかる構成によれば、拡張セル2aとサンプルセル2bの周辺部21から取得した色情報を、中央部20の色の影響を考慮することなく比較できるという利点がある。   Similarly to the extended cell 2a, the sample cell 2b is obtained by arranging the peripheral portion 21 with a light reference color, the central portion 20 with a white color, and the peripheral portion 21 with a dark reference color. However, since the central portion 20 is colored in black, the color information acquired from the peripheral portion 21 of the expansion cell 2a and the sample cell 2b is similarly affected by the color of the central portion 20. Therefore, according to such a configuration, there is an advantage that the color information acquired from the peripheral portion 21 of the extended cell 2a and the sample cell 2b can be compared without considering the influence of the color of the central portion 20.

また、本実施例では、データコード領域8の拡張セル2aに、拡張セル2aのデータ記録形式を示す識別コード8aが記録される。拡張セル2aの記録形式とは、周辺部21に用いられている基準色の種類や数、周辺部21の分割数、暗号化方式、誤り訂正方式などである。この識別コード8aは、中央部20の配色パターン、すなわち拡張セル2aのセル単位の明暗パターンによって記録される。かかる識別コード8aによれば、専用読取装置は、拡張セル2aのセル単位の明暗パターンを識別するだけで、拡張セル2aの記録形式を判別できるから、拡張セル2aの周辺部21の配色パターンを容易に識別可能となる。なお、かかる識別コード8aは、データコード領域8の中の埋め草領域に設けられる。埋め草領域は、データコード領域8に互換データを記録した後の残余領域であり、通常のQRコードでは、有効なデータが記録されない領域である。かかる埋め草領域の配色パターンは、QRコードの読取装置では無視されるため、識別コード8aは、QRコードの読取装置による互換データの読取りを阻害しない。   In this embodiment, an identification code 8a indicating the data recording format of the extended cell 2a is recorded in the extended cell 2a of the data code area 8. The recording format of the extended cell 2a includes the type and number of reference colors used in the peripheral portion 21, the number of divisions of the peripheral portion 21, an encryption method, an error correction method, and the like. The identification code 8a is recorded by the color arrangement pattern of the central portion 20, that is, the light / dark pattern of the extended cell 2a. According to the identification code 8a, the dedicated reader can determine the recording format of the extended cell 2a only by identifying the light / dark pattern of the extended cell 2a in units of cells, so the color arrangement pattern of the peripheral portion 21 of the extended cell 2a can be determined. It can be easily identified. The identification code 8 a is provided in the padding area in the data code area 8. The padding area is a remaining area after the compatible data is recorded in the data code area 8, and in the normal QR code, the valid data is not recorded. Since the color arrangement pattern of the padding area is ignored by the QR code reader, the identification code 8a does not hinder the reading of compatible data by the QR code reader.

以上のように、本実施例の二次元コード1を、QRコードの読取装置に読み取らせた場合、当該読取装置は、拡張セル2aの配色パターンを詳細に識別することなく、中央部20の配色パターンに基づいて、各拡張セル2aを明色又は暗色と識別する。そして、当該読取装置が、かかる明暗パターンに基づいてQRコードの復号処理を実行すれば、二次元コード1に記録された互換データが復号される。図8(a)は、本実施例の二次元コード1であり、図8(b)は、図8(a)の二次元コード1にあって、中央部20が白色の拡張セル2a及びサンプルセル2bを全て白塗りとし、中央部20が黒色の拡張セル2a及びサンプルセル2bを全て黒塗りとして得られたQRコード1aである。このQRコード1aは、セルの明暗二値パターンによって二次元コード1と同じ互換データを記録したものであるから、QRコードの読取装置で図8の二次元コード1とQRコード1aを読み取った場合は、いずれも同じ互換データが読み取られることとなる。すなわち、本実施例の二次元コード1は、QRコードの読取装置に対しては、QRコードの同等品として機能し得るものであり、QRコードと互換性を有するものとなっている。   As described above, when the QR code reader reads the two-dimensional code 1 of the present embodiment, the reader does not identify the color arrangement pattern of the extended cell 2a in detail, and the color arrangement of the central portion 20 Based on the pattern, each extended cell 2a is identified as light or dark. Then, when the reading device executes a QR code decoding process based on the light / dark pattern, the compatible data recorded in the two-dimensional code 1 is decoded. FIG. 8A shows the two-dimensional code 1 of the present embodiment, and FIG. 8B shows the two-dimensional code 1 of FIG. This is the QR code 1a obtained by making the cells 2b all white and the center portion 20 black and all the sample cells 2b black. This QR code 1a is obtained by recording the same compatible data as the two-dimensional code 1 according to the light / dark binary pattern of the cell. Therefore, when the two-dimensional code 1 and the QR code 1a of FIG. In both cases, the same compatible data is read. That is, the two-dimensional code 1 of the present embodiment can function as an equivalent of the QR code to the QR code reader, and is compatible with the QR code.

一方、本実施例の二次元コード1は、専用読取装置を用いれば、各拡張セル2aの周辺部21の配色パターンを識別して、二次元コード1に記録された互換データと専用データの両方を復号できる。   On the other hand, the two-dimensional code 1 of the present embodiment identifies both the compatible data and the dedicated data recorded in the two-dimensional code 1 by identifying the color arrangement pattern of the peripheral portion 21 of each expansion cell 2a if a dedicated reader is used. Can be decrypted.

図9は、上記二次元コード1を生成するフローチャートである。まず、ステップS100では、二次元コード1に記録すべき3セットのデータを取り込む。3セットのデータは、1セットの互換データDS0と、2セットの専用データDS1、DS2である。   FIG. 9 is a flowchart for generating the two-dimensional code 1. First, in step S100, three sets of data to be recorded in the two-dimensional code 1 are captured. The three sets of data are one set of compatible data DS0 and two sets of dedicated data DS1 and DS2.

次のステップS110では、互換データDS0について、通常のQRコードの生成手続に則って二次元コード化し、互換データDS0を記録するデータ上のQRコード1a(図6参照)を生成する。ここで、互換データを記録するQRコード1aの明暗パターンは、二次元コード1のセル単位の明暗パターンに対応するものである。かかるステップS110では、QRコード1aの生成時に、QRコード1aの埋め草領域のセルに、識別コード8aの配色パターンを埋め込む処理を行う。   In the next step S110, the compatible data DS0 is two-dimensionally encoded in accordance with a normal QR code generation procedure, and the QR code 1a (see FIG. 6) on the data recording the compatible data DS0 is generated. Here, the light / dark pattern of the QR code 1a for recording the compatible data corresponds to the light / dark pattern of the cell unit of the two-dimensional code 1. In step S110, when the QR code 1a is generated, a process for embedding the color arrangement pattern of the identification code 8a in a cell in the padding area of the QR code 1a is performed.

次のステップS120では、専用データDS1,DS2の夫々について、通常のQRコードの生成手続に則って二次元コード化し、夫々のデータDS1,DS2を記録するデータ上のQRコード1b,1c(図6参照)を2つ生成する。なお、前述のステップS110と、かかるステップ120で生成する3つのQRコード1a〜1cは、相互に合成し得るように、生成する二次元コード1と同じ形式(バージョン)で生成される。夫々のデータDS0,DS1,DS2の二次元コード化は、規格化されたQRコードの生成手順と同様に実行可能できるため、詳細な説明は省略する。   In the next step S120, each of the dedicated data DS1, DS2 is two-dimensionally encoded in accordance with a normal QR code generation procedure, and the QR codes 1b, 1c on the data for recording the respective data DS1, DS2 (FIG. 6). 2) are generated. The above-described step S110 and the three QR codes 1a to 1c generated in step 120 are generated in the same format (version) as the generated two-dimensional code 1 so that they can be combined with each other. Since the two-dimensional encoding of the respective data DS0, DS1, DS2 can be performed in the same manner as the standardized QR code generation procedure, detailed description thereof is omitted.

ステップS130の符号化処理では、QRコード1a〜1cについて、同じ位置のセルごとに夫々の色を合成し、上記二次元コード1のセル2の配色パターンに変換する。具体的には、生成する二次元コード1の一辺のセル数をNとすると、二次元コード1全体では、N個のセル2が存在し、QRコード1a〜1cにも、N個のセルの配色パターンが存在する。符号化処理では、このN個のセル2の配色を1つずつ決定する。より具体的には、QRコードの、縦のセルのインデックスをI,横のセルのインデックスをJとすると、I=1からN、J=1からNまでの組合せで全てのセルを表現できる。I,Jで示されるセルの色をC(I,J)で表現する。また、各QRコード1a,1b,1cをKで示すとすると、C(I,J,K)で示すことが可能となる。ここで、Kは1から3である。そして、かかる符号化処理を全てのセルについて実行すると、二次元コード1の生成が終了する。 In the encoding process of step S130, the QR codes 1a to 1c are combined with each color for each cell at the same position, and converted into the color arrangement pattern of the cell 2 of the two-dimensional code 1. Specifically, when the number of cells one side of the resulting two-dimensional code 1 is N, the entire two-dimensional code 1, N 2 pieces of cell 2 is present, even the QR code 1 a to 1 c, N 2 pieces of There is a cell color scheme. In the encoding process, the color scheme of the N 2 cells 2 is determined one by one. More specifically, when the vertical cell index of the QR code is I and the horizontal cell index is J, all cells can be expressed by combinations of I = 1 to N and J = 1 to N. The color of the cell indicated by I and J is expressed by C (I, J). If each QR code 1a, 1b, 1c is represented by K, it can be represented by C (I, J, K). Here, K is 1 to 3. When the encoding process is executed for all cells, the generation of the two-dimensional code 1 is completed.

図10は、符号化処理(図9:S130)の処理内容を示したフローチャートである。 符号化処理では、まず、ステップS210で、IとJで指定されるセルについて、それが機能パターン3を構成するセル2であるか否かを判定する。そして、機能パターン3を構成するセルであると判定した場合は、ステップS220で、当該セルの位置に基づいて配色を決定する。一方、符号化領域4を構成するセル2であると判定した場合は、次のステップS230で各QRコード1a〜1cの特定位置のセルの配色パターンを読み込む。具体的には、C(I,J,K)(Kは1から3)の配色データを読み込み、各セルが0か1(明色か暗色)かを識別する。次に、ステップS240では、QRコード1a〜1cの当該セルの配色パターンを結合して、拡張セル2aに記録する3ビットの符号化データを生成する。このとき、互換データに係るQRコード1aの配色データは、符号化データの第1ビットに結合され、専用データに係るQRコード1b,1cの配色データは、符号化データの第2ビットと第3ビットに夫々結合される。そして、ステップS250では、得られた符号化データから拡張セル2aの配色を決定する。例えば、図5に示すように、符号化データが「010」の場合は、中央部20が白色、周辺部21がシアンの配色に決定される。また、符号化データが「111」の場合は、中央部20及び周辺部21が黒色の配色に決定される。ステップS260では、すべてのセル2について、上記の処理が完了したかを判定し、すべてのセル2の処理が完了した場合は符号化処理を終了する。   FIG. 10 is a flowchart showing the contents of the encoding process (FIG. 9: S130). In the encoding process, first, in step S210, it is determined whether or not the cell specified by I and J is the cell 2 constituting the function pattern 3. If it is determined that the cell constitutes the functional pattern 3, the color arrangement is determined based on the position of the cell in step S220. On the other hand, if it is determined that the cell 2 is included in the coding area 4, the color arrangement pattern of the cell at the specific position of each QR code 1a to 1c is read in the next step S230. Specifically, the color arrangement data of C (I, J, K) (K is 1 to 3) is read to identify whether each cell is 0 or 1 (light color or dark color). Next, in step S240, 3 bits of encoded data to be recorded in the extended cell 2a are generated by combining the cell color patterns of the QR codes 1a to 1c. At this time, the color arrangement data of the QR code 1a related to the compatible data is combined with the first bit of the encoded data, and the color arrangement data of the QR codes 1b and 1c related to the dedicated data is the second bit and the third bit of the encoded data. Each is associated with a bit. In step S250, the color arrangement of the extended cell 2a is determined from the obtained encoded data. For example, as shown in FIG. 5, when the encoded data is “010”, the central portion 20 is determined to be white and the peripheral portion 21 is determined to be cyan. When the encoded data is “111”, the central portion 20 and the peripheral portion 21 are determined to have a black color scheme. In step S260, it is determined whether or not the above process is completed for all the cells 2. If the processes for all the cells 2 are completed, the encoding process is terminated.

このように、本実施例の二次元コード1の生成方法では、互換データDS0及び専用データDS1,DS2を夫々QRコード化し、データ上のQRコード1a〜1cを合成することによって、二次元コード1の配色を決定する。かかる生成方法では、互換データと専用データの双方を、QRコードの符号化方式に則って符号化するため、互換データと専用データの符号化に共通のアルゴリズムを用いることにより、二次元コード1の生成プログラムを簡素化できるという利点がある。また、かかる生成方法によって生成された二次元コード1は、互換データと専用データの復号時にも共通のアルゴリズムを用いることができるから、二次元コード1の読取プログラムも簡素化できる。   As described above, in the method of generating the two-dimensional code 1 according to the present embodiment, the compatible data DS0 and the dedicated data DS1 and DS2 are respectively QR-coded, and the QR codes 1a to 1c on the data are synthesized, whereby the two-dimensional code 1 Determine the color scheme. In such a generation method, both the compatible data and the dedicated data are encoded in accordance with the encoding method of the QR code. Therefore, by using a common algorithm for encoding the compatible data and the dedicated data, the two-dimensional code 1 There is an advantage that the generation program can be simplified. Further, since the two-dimensional code 1 generated by such a generation method can use a common algorithm when decoding compatible data and dedicated data, the reading program of the two-dimensional code 1 can be simplified.

次に、実施例1の二次元コード1を専用読取装置で読み取る際の読取方法を説明する。
図11は、専用読取装置による二次元コード1の読取処理を示すフローチャートである。
最初のステップS300では、読取装置に設けられた撮像装置によって、白色光の照明下で二次元コード1を撮像し、二次元コード1のカラーの画像データを得る。次に、ステップS301では、撮像した画像からQRコードの画像識別手順にしたがって二次元コード1を識別し、セル2の切り出しを行う。具体的には、各セル2について、画像から該当するピクセルデータを抽出する。次に、ステップS302では、通常のQRコードの読取処理を行い、二次元コード1の第一層のデータ領域に記録されたデータ(互換データ)を読み取る。すなわち、かかるステップS302は、本発明に係る互換データ復号処理に相当するものである。なお、この時点では、専用読取装置は、二次元コード1をQRコードと区別せずに処理を行う。通常のQRコードの読取処理は周知であるため、詳細な説明は省略する。
Next, a reading method when reading the two-dimensional code 1 of the first embodiment with a dedicated reading device will be described.
FIG. 11 is a flowchart showing the reading process of the two-dimensional code 1 by the dedicated reading device.
In the first step S300, the two-dimensional code 1 is imaged under white light illumination by an imaging device provided in the reading device, and color image data of the two-dimensional code 1 is obtained. Next, in step S301, the two-dimensional code 1 is identified from the captured image according to the QR code image identification procedure, and the cell 2 is cut out. Specifically, for each cell 2, the corresponding pixel data is extracted from the image. Next, in step S302, a normal QR code reading process is performed, and data (compatible data) recorded in the data area of the first layer of the two-dimensional code 1 is read. That is, step S302 corresponds to the compatible data decoding process according to the present invention. At this point, the dedicated reader performs processing without distinguishing the two-dimensional code 1 from the QR code. Since a normal QR code reading process is well known, detailed description thereof is omitted.

続くステップS303では、第一層に記録されたデータの復号に成功したか否かを判定し、復号に失敗した場合には、ステップS304で、読取りエラーを示す表示をディスプレイに表示して、読取処理を終了する。一方、ステップS303で、復号に成功したと判定した場合は、ステップS305で、埋め草領域の識別コード8aの読取りを行い、ステップS306で、識別コード8aの読取りに成功したか否かを判定する。ここで、識別コード8aの読取りに失敗した場合は、識別コード8aのない通常のQRコードであると判断し、読取処理を終了する。このように、識別コード8aの読取りに成功するか否か、すなわち、有効な識別コード8aが記録されているか否かによって、拡張セル2aを有する二次元コード1と、通常のQRコードとを識別すれば、セル単位の明暗パターンを識別するだけで、両者を容易に識別できる。一方、ステップS306で、識別コード8aの読取りに成功した場合は、専用データが記録された二次元コード1であると判断し、ステップS307の専用データ復号処理で、識別コード8aの情報に基づいて専用データを復号し、読取処理を終了する。すなわち、かかるステップS307が、本発明に係る専用データ復号処理に相当するものである。   In subsequent step S303, it is determined whether or not the data recorded in the first layer has been successfully decoded. If the decoding has failed, in step S304, a display indicating a reading error is displayed on the display, and the reading is performed. The process ends. On the other hand, if it is determined in step S303 that the decoding is successful, the identification code 8a of the padding area is read in step S305, and it is determined whether or not the identification code 8a is successfully read in step S306. . Here, when reading of the identification code 8a fails, it is determined that the code is a normal QR code without the identification code 8a, and the reading process is terminated. Thus, the two-dimensional code 1 having the extended cell 2a and the normal QR code are identified depending on whether or not the identification code 8a is successfully read, that is, whether or not a valid identification code 8a is recorded. If this is the case, it is possible to easily identify both by simply identifying the light / dark pattern in cell units. On the other hand, if the identification code 8a is successfully read in step S306, it is determined that the data is the two-dimensional code 1 in which the dedicated data is recorded, and the dedicated data decoding process in step S307 is based on the information of the identification code 8a. Dedicated data is decoded and the reading process is terminated. That is, step S307 corresponds to the dedicated data decoding process according to the present invention.

図12は、専用データ復号処理(図11:S307)の処理内容を示したフローチャートである。
専用データ復号処理では、まず、ステップS401で、サンプル領域5aの各サンプルセル2bの周辺部21の色情報を取得する。具体的には、図13に示すように、各サンプルセル2bの周辺部21の8箇所を色情報取得部位30として、当該8箇所から取得した色情報(RGB値)の平均値を、当該サンプルセル2bの周辺部の色情報とする。このように、複数箇所の色情報を平均化したものを周辺部21の色情報とすれば、汚れや照明などによる色情報の変動を平準化して、周辺部21の色情報をより適切に取得可能となる。なお、かかる処理では、3セットのサンプル領域5aの計24個のサンプルセル2bについて、周辺部21の色情報をサンプルセル2b毎に取得する。すなわち、かかるステップS401の処理により、本発明に係るサンプル色取得処理が実現される。
FIG. 12 is a flowchart showing the processing content of the dedicated data decoding process (FIG. 11: S307).
In the dedicated data decoding process, first, in step S401, the color information of the peripheral portion 21 of each sample cell 2b in the sample area 5a is acquired. Specifically, as shown in FIG. 13, the eight values of the peripheral portion 21 of each sample cell 2b are used as the color information acquisition region 30, and the average value of the color information (RGB values) acquired from the eight locations is calculated as the sample. The color information of the peripheral portion of the cell 2b is used. Thus, if the color information of the peripheral portion 21 is obtained by averaging the color information of a plurality of places, the variation in the color information due to dirt or lighting is leveled, and the color information of the peripheral portion 21 is acquired more appropriately. It becomes possible. In this process, the color information of the peripheral portion 21 is acquired for each sample cell 2b for a total of 24 sample cells 2b in the three sets of sample regions 5a. That is, the sample color acquisition process according to the present invention is realized by the process of step S401.

次に、ステップS402で、一つの拡張セル2aの周辺部21の色情報を取得する。具体的には、サンプルセル2bと同様に、拡張セル2aの周辺部21の8箇所を色情報取得部位30として(図13参照)、当該8箇所から取得した色情報(RGB値)の平均値を、当該拡張セル2aの周辺部21の色情報とする。このように、複数箇所から取得した色情報の平均値を周辺部21の色情報とすれば、汚れや照明などによる色情報の変動を平準化して、周辺部21の色情報を適切に取得することができ、これにより、周辺部21の基準色をより正確に識別可能となる。   Next, in step S402, the color information of the peripheral portion 21 of one extended cell 2a is acquired. Specifically, the average value of the color information (RGB values) acquired from the eight locations in the peripheral portion 21 of the extended cell 2a as the color information acquisition portion 30 (see FIG. 13) as in the sample cell 2b. Is the color information of the peripheral portion 21 of the extended cell 2a. As described above, if the average value of the color information acquired from a plurality of locations is used as the color information of the peripheral portion 21, the color information variation due to dirt, illumination, etc. is leveled, and the color information of the peripheral portion 21 is appropriately acquired. Accordingly, the reference color of the peripheral portion 21 can be more accurately identified.

続いて、ステップS403では、ステップS402で取得した拡張セル2aの周辺部21の色情報を、各サンプルセル2bの周辺部21から取得した色情報と個別に比較して、色情報が最も近似するサンプルセル2bを決定する。そして、決定したサンプルセル2bの周辺部21の基準色が、当該拡張セル2aの周辺部21の基準色であると判定する。すなわち、かかるステップS403の処理により、本発明に係る基準色識別処理及び周辺部識別処理が実現される。ここで、色情報の比較は、拡張セル2aと各サンプルセル2bの色情報について、RGB値のユークリッド距離を算出することによって比較する。そして、拡張セル2aの色情報とのユークリッド距離が最も小さかったサンプルセル2bが、拡張セル2aの色と最も近似であると判定する。   Subsequently, in step S403, the color information of the peripheral portion 21 of the extended cell 2a acquired in step S402 is individually compared with the color information acquired from the peripheral portion 21 of each sample cell 2b, and the color information is most approximated. The sample cell 2b is determined. Then, it is determined that the determined reference color of the peripheral portion 21 of the sample cell 2b is the reference color of the peripheral portion 21 of the extended cell 2a. That is, the reference color identification process and the peripheral part identification process according to the present invention are realized by the process of step S403. Here, the color information is compared by calculating the Euclidean distance of the RGB values for the color information of the extended cell 2a and each sample cell 2b. Then, it is determined that the sample cell 2b having the shortest Euclidean distance from the color information of the extended cell 2a is closest to the color of the extended cell 2a.

なお、拡張セル2aの中央部20の配色パターン(セル単位の明暗パターン)は、QRコードの読取処理(図11:S302)の段階で識別済みであるため、かかるステップS403では、識別済みの中央部20の色に基づいて、拡張セル2aの周辺部21の基準色の候補を、明色基準色と暗色基準色の一方に予め絞り込み、これにより、サンプルセル2bの色情報との比較処理を簡易化する。具体的には、中央部20が白色の拡張セル2aは周辺部21が明色基準色であるから、周辺部21が暗色基準色で配色されたサンプルセル2bとの色情報の比較を省略する。同様に、中央部20が黒色の拡張セル2aは周辺部21が暗色基準色であるから、周辺部21が明色基準色で配色されたサンプルセル2bとの色情報の比較を省略する。なお、中央部20の配色パターン(セル単位の明暗パターン)は、識別を誤っても、QRコードの読取処理(図11:S302)の段階で、QRコードの誤り訂正機能によって識別結果が訂正される。このため、中央部20の配色パターンについては、正確な情報を得ることができる。したがって、このように、中央部20の配色パターンに基づいて周辺部21の基準色の候補を絞り込めば、周辺部21の色情報のみから、周辺部21の配色パターンを識別する場合に比べて、識別率の向上が可能となる。   The color arrangement pattern (bright / dark pattern in cell units) of the central portion 20 of the extended cell 2a has already been identified at the stage of the QR code reading process (FIG. 11: S302). Based on the color of the unit 20, the reference color candidates of the peripheral part 21 of the expansion cell 2a are narrowed down in advance to one of the light color reference color and the dark color reference color, thereby performing comparison processing with the color information of the sample cell 2b. Simplify. Specifically, since the extension cell 2a whose white at the center portion 20 is the peripheral color of the peripheral portion 21 is a light color reference color, the comparison of the color information with the sample cell 2b whose peripheral portion 21 is colored with the dark color reference color is omitted. . Similarly, since the peripheral cell 21 of the extended cell 2a whose central portion 20 is black is a dark reference color, comparison of color information with the sample cell 2b in which the peripheral portion 21 is colored with a light color reference color is omitted. Note that the color pattern (bright / dark pattern in units of cells) in the central portion 20 is corrected by the QR code error correction function at the stage of the QR code reading process (FIG. 11: S302) even if the identification is wrong. The For this reason, accurate information can be obtained for the color arrangement pattern of the central portion 20. Therefore, if the reference color candidates of the peripheral portion 21 are narrowed down based on the color arrangement pattern of the central portion 20 as described above, the color arrangement pattern of the peripheral portion 21 is identified only from the color information of the peripheral portion 21. The identification rate can be improved.

また、かかるステップS403では、拡張セル2aの周辺部21の色情報を、3セットのサンプルセル2bの周辺部21の色情報と個別に比較する。例えば、中央部20が白色の拡張セル2aであれば、周辺部21が明色基準色で配色された12個(4色×3セット)のサンプルセル2bと色情報を個別に比較する。拡張セル2aとサンプルセル2bが均一に照らされていない場合は、同じ基準色で配色された部位から取得した色情報でも、照度の違いによって大きな差が生じる場合があるが、かかる方法によれば、各拡張セル2aの色情報を、基準色毎に複数セットのサンプルセル2bと個別に比較して、拡張セル2aを、比較的照度差の少ないサンプルセル2bと比較することで、基準色の識別間違いを低減できる。   In step S403, the color information of the peripheral portion 21 of the extended cell 2a is individually compared with the color information of the peripheral portion 21 of the three sets of sample cells 2b. For example, if the central portion 20 is a white extended cell 2a, the color information is individually compared with 12 (4 colors × 3 sets) sample cells 2b in which the peripheral portion 21 is colored with a bright reference color. When the extended cell 2a and the sample cell 2b are not illuminated uniformly, even in color information acquired from a portion arranged with the same reference color, a large difference may occur due to a difference in illuminance. The color information of each extended cell 2a is individually compared with a plurality of sets of sample cells 2b for each reference color, and the extended cell 2a is compared with the sample cell 2b having a relatively small difference in illuminance. Misidentification can be reduced.

上記ステップS402,S403は、符号化領域4の全てのセル(拡張セル)2aについて実行されて、全ての拡張セル2aの配色が判別される。そして、ステップS404で、全ての拡張セル2aの配色を判別し終えたと判定した場合は、ステップS405で、決定した配色に基づいて、各拡張セル2aに記録された符号化データを復号する。例えば、中央部20が黒色で、周辺部21が赤色であると判定した拡張セル2aは、「101」の符号化データに復号される(図5参照)。ステップS406では、拡張セル2aごとに復号した3ビットの符号化データを、第1ビット、第2ビット、第3ビットごとに結合して、互換データDS0を記録したデータ上のQRコード1aと、専用データDS1,DS2を記録したQRコード1b,1cを得る。そして、ステップS407では、専用データを記録するQRコード1b,1cを、通常のQRコードの復号手順にしたがって、専用データDS1、DS2に復号する。なお、互換データDS0は、QRコードの読取処理(図11:S302)の段階で復号済みであるため、互換データDS0を記録するQRコード1aは復号しない。   The above steps S402 and S403 are executed for all the cells (extended cells) 2a in the coding area 4 to determine the color scheme of all the extended cells 2a. If it is determined in step S404 that the color arrangement of all the extended cells 2a has been determined, the encoded data recorded in each extended cell 2a is decoded based on the determined color arrangement in step S405. For example, the extended cell 2a determined that the central portion 20 is black and the peripheral portion 21 is red is decoded into encoded data “101” (see FIG. 5). In step S406, the QR code 1a on the data in which the compatible data DS0 is recorded by combining the encoded data of 3 bits decoded for each extended cell 2a for each of the first bit, the second bit, and the third bit; QR codes 1b and 1c in which dedicated data DS1 and DS2 are recorded are obtained. In step S407, the QR codes 1b and 1c for recording the dedicated data are decoded into the dedicated data DS1 and DS2 in accordance with a normal QR code decoding procedure. Since the compatible data DS0 has been decoded at the stage of the QR code reading process (FIG. 11: S302), the QR code 1a for recording the compatible data DS0 is not decoded.

ステップS408では、専用データDS1,DS2の復号に成功したか否かを判定し、成功したと判定した場合は、専用データ復号処理を終了する。一方、専用データの復号に失敗したと判定した場合は、ステップS409で、多数決読取処理を実行して、専用データ復号処理を終了する。多数決読取処理は、二次元コード1を3回撮像して、撮像した画像データ毎に拡張セル2aの周辺部21の配色を判別する処理を実行して、最終的に、判別結果を多数決することによって、各拡張セル2aの最終的な配色を決定する処理である。発明者の研究によれば、拡張セル2aの周辺部の配色パターンの識別間違いは、同じ拡張セルで繰返し発生する頻度が少ないため、かかる多数決読取処理のように、二次元コード1を3回撮像して、画像ごとの基準色の識別結果を多数決して拡張セル2aの周辺部21の基準色を特定するようにすれば、二次元コード1の専用データの読取成功率を格段に高めることが可能となる。なお、多数決読取処理は、専用データの読取成功率は高いが、比較的多くの処理が必要であり、常時実行すると時間がかかるため、かかる読取方法のように、ステップS401〜S407の処理で専用データの復号に失敗した場合に実行することが望ましい。すなわち、本発明に係る初回復号処理は、ステップS401〜S407によって実現される。   In step S408, it is determined whether or not the dedicated data DS1 and DS2 have been successfully decrypted. If it is determined that the data has been successfully decrypted, the dedicated data decrypting process is terminated. On the other hand, if it is determined that the decoding of the dedicated data has failed, the majority reading process is executed in step S409, and the dedicated data decoding process is terminated. In the majority reading process, the two-dimensional code 1 is imaged three times, a process for determining the color arrangement of the peripheral portion 21 of the extended cell 2a is performed for each imaged image data, and finally the determination result is determined as a majority. Thus, the final color scheme of each expansion cell 2a is determined. According to the inventor's research, the identification error of the color arrangement pattern in the peripheral portion of the extended cell 2a occurs less frequently in the same extended cell, so that the two-dimensional code 1 is imaged three times as in the majority reading process. Thus, if the reference color of the peripheral portion 21 of the extended cell 2a is never specified for many reference color identification results for each image, the success rate of reading the dedicated data of the two-dimensional code 1 can be remarkably increased. It becomes. The majority reading process has a high reading success rate for dedicated data, but requires a relatively large number of processes and takes a long time to be executed constantly. Therefore, like the reading method, dedicated processing is performed in steps S401 to S407. It is desirable to execute when data decryption fails. That is, the initial decoding process according to the present invention is realized by steps S401 to S407.

図14は、多数決読取処理(図12:S409)の処理内容を示したフローチャートである。
多数決読取処理では、まず、ステップS500で、二次元コード1の2回目の撮像を実行する。そして、ステップS501〜S506において、得られた2枚目の画像データに基づいて、各拡張セル2aの周辺部21の基準色を識別する。ステップS500〜S506の個々の処理は、上述したステップS300,S301,S305,S401〜S404の処理と同じであるため、詳細な説明は省略する。そして、ステップS507では、ステップS500〜S506を規定回数(ここでは2回)に達するまで繰り返す。これにより、二次元コード1の撮像と、拡張セル2aの周辺部21の基準色の識別が計3回繰り返されることとなる。なお、二次元コード1の1回目の撮像はステップS300で実行され、拡張セル2aの周辺部21の基準色を識別する1回目の処理は、ステップS401〜S404で実行される。
FIG. 14 is a flowchart showing the content of the majority reading process (FIG. 12: S409).
In the majority reading process, first, the second imaging of the two-dimensional code 1 is executed in step S500. In steps S501 to S506, the reference color of the peripheral portion 21 of each expansion cell 2a is identified based on the obtained second image data. Since the individual processes of steps S500 to S506 are the same as the processes of steps S300, S301, S305, and S401 to S404 described above, detailed description thereof is omitted. In step S507, steps S500 to S506 are repeated until the specified number of times (here, twice) is reached. As a result, the imaging of the two-dimensional code 1 and the identification of the reference color of the peripheral portion 21 of the expansion cell 2a are repeated a total of three times. Note that the first imaging of the two-dimensional code 1 is executed in step S300, and the first processing for identifying the reference color of the peripheral portion 21 of the extended cell 2a is executed in steps S401 to S404.

そして、ステップS508では、個々の拡張セル2aについて3回繰り返された基準色の識別結果を多数決して、最多の識別結果を、当該拡張セル2aの基準色として最終的に特定する。すなわち、かかるステップS508によって、本発明に係る多数決処理が実現される。なお、多数決の結果、最多の識別結果が2以上存在した場合は、抽選によりいずれか1つの識別結果を、当該拡張セル2aの基準色とする。   In step S508, the identification result of the reference color that has been repeated three times for each extended cell 2a is never many, and the largest number of identification results are finally specified as the reference color of the extended cell 2a. That is, the majority process according to the present invention is realized by such step S508. If there are two or more identification results as a result of majority decision, one of the identification results is set as the reference color of the extended cell 2a by lottery.

そして、ステップS509〜S511では、ステップS405〜S407と同様にして、各拡張セル2aの周辺部21について特定した基準色に基づいて専用データDS1,DS2を復号する。すなわち、かかるステップS509〜S511によって、本発明に係る多数決復号処理が実現される。そして、ステップS512で、専用データDS1,DS2の復号に成功したと判定した場合は、そのまま多数決読取処理を終了し、復号に失敗したと判定した場合は、ステップS513で、読取りエラーを示す表示をディスプレイに表示して、多数決読取処理を終了する。   In steps S509 to S511, the dedicated data DS1 and DS2 are decoded based on the reference color specified for the peripheral portion 21 of each extended cell 2a, as in steps S405 to S407. That is, the majority decoding process according to the present invention is realized by steps S509 to S511. If it is determined in step S512 that the decoding of the dedicated data DS1 and DS2 has been successful, the majority reading process is terminated as it is. If it is determined that the decoding has failed, a display indicating a reading error is displayed in step S513. The majority reading process is completed on the display.

以上の二次元コード1の読取方法からもわかるように、本実施例の二次元コード1では、互換データがQRコードの規格に準じて二次元コード化され、各セル2が明色と暗色のいずれであるかの情報によって記録されているため、QRコード用の読取装置で互換データを読み取ることができる。一方、拡張セル2aの色情報を判別でき、かつ、当該色情報を復号可能な専用読取装置を用いれば、拡張セル2aの周辺部21に記録された専用データを読み取ることができる。   As can be seen from the above two-dimensional code 1 reading method, in the two-dimensional code 1 of this embodiment, the compatible data is two-dimensionally encoded in accordance with the QR code standard, and each cell 2 is light and dark. Since it is recorded according to the information on which one is compatible, the compatible data can be read by the QR code reader. On the other hand, if a dedicated reader capable of determining the color information of the extended cell 2a and decoding the color information is used, the dedicated data recorded in the peripheral portion 21 of the extended cell 2a can be read.

次に、上記二次元コード1の読取方法の変形例について説明する。
変形例の読取方法は、上述の多数決読取処理(図12:S409)に替えて、図15に示す複数照明読取処理を実行する。複数照明読取処理は、色の異なる複数種類の照明下で撮像した画像データに基づいて拡張セル2aの周辺部21の基準色を識別する処理である。
Next, a modification of the method for reading the two-dimensional code 1 will be described.
The reading method according to the modified example executes the multiple illumination reading process shown in FIG. 15 instead of the above-described majority reading process (FIG. 12: S409). The multiple illumination reading process is a process of identifying the reference color of the peripheral portion 21 of the extended cell 2a based on image data captured under multiple types of illuminations having different colors.

複数照明読取処理では、まず、ステップS600で、赤色光の照明下で二次元コード1を撮像する。そして、ステップS601〜S603において、撮像した画像データに基づいて、各拡張セル2aの周辺部21の色情報(RGB値)を取得する。次に、ステップS604で、青色光の照明下で二次元コード1を撮像する。そして、ステップS605〜S607において、撮像した画像データに基づいて、各拡張セル2aの周辺部21の色情報(RGB値)を取得する。すなわち、本発明に係る赤色識別処理は、ステップS600〜S603によって実現され、青色識別処理は、ステップS604〜S607によって実現される。   In the multiple illumination reading process, first, in step S600, the two-dimensional code 1 is imaged under red light illumination. In steps S601 to S603, the color information (RGB values) of the peripheral portion 21 of each expansion cell 2a is acquired based on the captured image data. Next, in step S604, the two-dimensional code 1 is imaged under blue light illumination. In steps S605 to S607, color information (RGB values) of the peripheral portion 21 of each expansion cell 2a is acquired based on the captured image data. That is, the red identification process according to the present invention is realized by steps S600 to S603, and the blue identification process is realized by steps S604 to S607.

ステップS608では、赤色光と青色光の照明下で夫々撮像した2枚の画像から取得した色情報を組み合わせて、各拡張セル2aの周辺部21の色情報(RGB値)を決定する。ここで、RGB値のうち、赤色成分(R)に関しては、赤色光の照明下で撮像した画像から取得した色情報が、ノイズの少ない正確な値と考えられるため、RGB値のうち、赤色成分(R)については、赤色光の照明下で撮像した画像から取得した色情報を採用する。同様に、RGB値のうち、青色成分(B)に関しては、青色光の照明下で撮像した画像から取得した色情報が、ノイズの少ない正確な値と考えられるため、RGB値のうち、青色成分(B)については、青色光の照明下で撮像した画像から取得した色情報を採用する。なお、かかる複数照明読取処理では、RGB値のうち、緑色成分(G)に関しては、色情報を特定しない。図4に示すように、4種の明色基準色はRGB値の緑成分が共通し(G=255)、4種の暗色基準色も、RGB値の緑成分が共通しているため(G=0)、RGB値の緑成分(G)は、基準色の識別にほとんど寄与しないためである。   In step S608, the color information (RGB value) of the peripheral portion 21 of each expansion cell 2a is determined by combining the color information acquired from the two images captured under the illumination of red light and blue light. Here, among the RGB values, regarding the red component (R), the color information acquired from the image captured under the illumination of red light is considered to be an accurate value with less noise. For (R), color information acquired from an image taken under illumination of red light is employed. Similarly, regarding the blue component (B) of the RGB values, the color information acquired from the image captured under the illumination of the blue light is considered to be an accurate value with less noise. For (B), color information acquired from an image captured under blue light illumination is employed. In the multiple illumination reading process, color information is not specified for the green component (G) among the RGB values. As shown in FIG. 4, the four light color reference colors share the green component of the RGB value (G = 255), and the four dark color reference colors also share the green component of the RGB value (G This is because the green component (G) of the RGB value hardly contributes to the identification of the reference color.

ステップS609では、ステップS608で決定した周辺部21の色情報(赤色成分と青色成分)に基づいて、当該周辺部21の基準色を識別する。なお、ステップS609では、サンプルセル2bと色情報を比較せず、周辺部21の色情報の絶対値のみに基づいて基準色を識別する。具体的には、色情報の赤色成分(R)や青色成分(B)の数値が128以上である場合は、当該値が255であると判定し、色情報の赤色成分(R)や青色成分(B)の数値が127以下である場合は、当該値が0であると判定し、基準値のRGB値と比較する。例えば、中央部20が白色の拡張セル2a(G=255)について、色情報の赤色成分が200(R=150)で、青色成分が50(B=50)であった場合は、当該周辺部21の基準色は、黄色(RGB値=255:255:0)であると識別する(図4参照)。そして、かかるステップS608,S609を全ての拡張セル2aについて繰り返して(S610)、全ての拡張セル2aの周辺部21の基準色を識別する。なお、ステップS609では、周辺部21の基準色のRGB値を判定するのに、0〜255の中間値(128)を閾値として用いているが、かかる閾値は、実際に周辺部21から取得した色情報の分布に基づいて決定してもよい。   In step S609, the reference color of the peripheral portion 21 is identified based on the color information (red component and blue component) of the peripheral portion 21 determined in step S608. In step S609, the color information is not compared with the sample cell 2b, and the reference color is identified based only on the absolute value of the color information of the peripheral portion 21. Specifically, when the numerical value of the red component (R) or the blue component (B) of the color information is 128 or more, it is determined that the value is 255, and the red component (R) or the blue component of the color information is determined. When the numerical value of (B) is 127 or less, it is determined that the value is 0 and compared with the RGB value of the reference value. For example, when the central portion 20 is a white extended cell 2a (G = 255), if the red component of the color information is 200 (R = 150) and the blue component is 50 (B = 50), the peripheral portion The reference color 21 is identified as yellow (RGB value = 255: 255: 0) (see FIG. 4). Then, steps S608 and S609 are repeated for all the extended cells 2a (S610), and the reference color of the peripheral portion 21 of all the extended cells 2a is identified. In step S609, an intermediate value (128) of 0 to 255 is used as a threshold value to determine the RGB value of the reference color of the peripheral part 21, but the threshold value is actually acquired from the peripheral part 21. You may determine based on distribution of color information.

そして、ステップS611〜S613では、ステップS405〜S407と同様にして、各拡張セル2aの周辺部21の基準色の識別結果に基づいて専用データDS1,DS2を復号する。そして、ステップS614で、専用データDS1,DS2の復号に成功したと判定した場合は、そのまま複数照明読取処理を終了し、復号に失敗したと判定した場合は、ステップS615で、読取りエラーを示す表示をディスプレイに表示して、複数照明読取処理を終了する。   In steps S611 to S613, the dedicated data DS1 and DS2 are decoded based on the identification result of the reference color of the peripheral portion 21 of each extended cell 2a, as in steps S405 to S407. If it is determined in step S614 that decoding of the dedicated data DS1 and DS2 has succeeded, the multiple illumination reading process is terminated, and if it is determined that decoding has failed, a display indicating a reading error is displayed in step S615. Is displayed on the display, and the multiple illumination reading process is terminated.

このように、かかる複数照明読取処理では、赤色光の照明下で撮像した画像データから取得した色情報の赤色成分と、青色光の照明下で撮像した画像データから取得した色情報の青色成分とを組み合わせて、拡張セル2aの周辺部21の色情報を特定するため、白色光の照明下で撮像した画像のみから拡張セル2aの周辺部21の色情報を決定する場合に比べて、二次元コード1の専用データの読取成功率を格段に高めることが可能となる。なお、複数照明読取処理は、専用データの読取成功率は高いが、比較的多くの処理が必要であり、常時実行すると時間がかかるため、本変形例の読取方法のように、まず、白色光の照明下で撮像した画像データに基づく専用データの読取りに失敗した場合に実行することが望ましい。すなわち、本発明に係る白色光復号処理は、ステップS401〜S407によって実現される。   As described above, in the multiple illumination reading process, the red component of the color information acquired from the image data captured under the illumination of red light, and the blue component of the color information acquired from the image data captured under the illumination of blue light, In order to identify the color information of the peripheral portion 21 of the extended cell 2a in combination with the two-dimensional as compared with the case where the color information of the peripheral portion 21 of the extended cell 2a is determined only from an image captured under white light illumination. The success rate of reading the dedicated data of code 1 can be significantly increased. Note that the multiple-illumination reading process has a high reading success rate for dedicated data, but requires a relatively large number of processes and takes a long time to be executed at all times. It is desirable to execute this when the reading of the dedicated data based on the image data captured under the illumination is failed. That is, the white light decoding process according to the present invention is realized by steps S401 to S407.

本実施例は、実施例1から拡張セルの構成を変更したものである。
なお、拡張セルの構成以外は、実施例1と同じであるため、共通する構成については、本文及び図面で共通の符号を付して、詳細な説明を省略する。
In the present embodiment, the configuration of the extended cell is changed from the first embodiment.
In addition, since it is the same as that of Example 1 except the structure of an extended cell, about the common structure, the same code | symbol is attached | subjected in the text and drawing, and detailed description is abbreviate | omitted.

図16(a)に示すように、本実施例の拡張セル2cは、周辺部21が、8個のサブセル21a〜21hに細分されており、サブセル21a〜21h毎に、8種類の基準色のいずれか一色で選択的に配色される。具体的には、サブセル21a〜21hは、拡張セル2cを縦横に3分割して得られる9つの正方形のうち、中央部20の正方形を除く、8つの正方形によって構成される。図16(b)に示すように、中央部20が白色の拡張セル2cでは、各サブセル21a〜21hは、4種類の明色基準色(図4参照)のいずれかで配色される。一方、図16(c)に示すように、中央部20が黒色の拡張セル2cでは、各サブセル21a〜21hは、4種類の暗色基準色(図4参照)のいずれかで配色される。   As shown in FIG. 16A, the extended cell 2c of this embodiment has a peripheral portion 21 subdivided into eight subcells 21a to 21h, and eight types of reference colors are provided for each of the subcells 21a to 21h. Any one color is selectively arranged. Specifically, the subcells 21a to 21h are configured by eight squares excluding the square of the central portion 20 among the nine squares obtained by dividing the extended cell 2c into three vertically and horizontally. As shown in FIG. 16B, in the extended cell 2c in which the central portion 20 is white, each of the subcells 21a to 21h is arranged in one of four types of bright color reference colors (see FIG. 4). On the other hand, as shown in FIG. 16C, in the extended cell 2c whose central portion 20 is black, each of the subcells 21a to 21h is arranged in any one of four types of dark color reference colors (see FIG. 4).

本実施例の拡張セル2cは、中央部20の2通りの配色パターンと、周辺部21の8個のサブセル21a〜21hと4通りの配色パターンによって、217通りの配色パターンで配色される。このため、本実施例では、図17に示すように、1つ拡張セル2cに、17ビットの符号化データを記録する。符号化データは、実施例1と同様に、同じ位置のビット毎の集合とすることで17層のデータ領域を形成しており、各層のデータは、QRコードと同じデータ形式で、各拡張セル2cに1ビットずつ記録される。すなわち、本実施例の二次元コード10は、図18に示すように、データ上のQRコード10a〜10hを17セット積層したデータ構造をなしている。なお、符号化データの最上位のビット(第1ビット)は、中央部20の配色パターンに対応するデータであり、QRコードの読取装置によって読み取ることのできる互換データである。このように、本実施例の二次元コード10は、周辺部21を8つのサブセル21a〜21hに分割して、サブセル21a〜21h毎に基準色で配色するため、実施例1の二次元コード1に比べて、より多くの専用データを記憶できる。 Auxiliary cell 2c of this embodiment, the two types of color schemes of the central portion 20, the eight sub-cells 21a~21h and color scheme of four kinds of peripheral portion 21, are color by color scheme are two 17. For this reason, in this embodiment, as shown in FIG. 17, 17-bit encoded data is recorded in one extended cell 2c. As in the first embodiment, the encoded data is a set of bits at the same position to form a 17-layer data area, and the data in each layer has the same data format as the QR code, and each extended cell. One bit is recorded in 2c. That is, the two-dimensional code 10 of this embodiment has a data structure in which 17 sets of QR codes 10a to 10h on data are stacked as shown in FIG. The most significant bit (first bit) of the encoded data is data corresponding to the color arrangement pattern of the central portion 20 and is compatible data that can be read by a QR code reader. As described above, the two-dimensional code 10 of the present embodiment divides the peripheral portion 21 into eight subcells 21a to 21h, and colors the reference colors for each of the subcells 21a to 21h. More dedicated data can be stored compared to.

本実施例の二次元コード10は、実施例1の二次元コード1と同様の方法で生成可能である。すなわち、本実施例の二次元コード10の生成方法では、二次元コード10に記録する17セットのデータDS0〜DS16を個別に記録するQRコード10a〜10hを生成して、17セットのQRコードについて、同じ位置のセルの色を合成することにより、二次元コード10の各セル2の配色パターンを決定する。   The two-dimensional code 10 of this embodiment can be generated by the same method as the two-dimensional code 1 of the first embodiment. That is, in the method for generating the two-dimensional code 10 according to the present embodiment, the QR codes 10a to 10h for individually recording the 17 sets of data DS0 to DS16 recorded in the two-dimensional code 10 are generated, and the 17 sets of QR codes are generated. The color arrangement pattern of each cell 2 of the two-dimensional code 10 is determined by synthesizing the colors of the cells at the same position.

このように、本実施例の拡張セル2cは、中央部20が白色と黒色のいずれか一色で配色され、また、中央部20が白色の拡張セル2cは周辺部21が明色基準色で、中央部20が黒色の拡張セル2cは周辺部21が暗色基準色で配色されるから、実施例1に係る拡張セル2aと同様に、QRコードの読取装置で明暗パターンを識別した場合、中央部20が白色の拡張セル2aは明色と識別され、中央部20が黒色の拡張セル2aは暗色と識別される。このため、本実施例の二次元コード10を、QRコードの読取装置に読み取らせた場合、当該読取装置は、各拡張セル2cの基準色を詳細に識別することなく、中央部20の配色パターンに基づいて、各拡張セル2cを明色又は暗色と識別し、QRコードの復号処理にしたがって互換データを復号する。   As described above, the extension cell 2c of the present embodiment is arranged in one color of white or black at the central portion 20, and the extension cell 2c in which the central portion 20 is white is the light reference color at the peripheral portion 21. Since the peripheral portion 21 is colored with a dark reference color in the extended cell 2c whose central portion 20 is black, when the light and dark pattern is identified by the QR code reader, as in the extended cell 2a according to the first embodiment, the central portion The expansion cell 2a having a white 20 is identified as a light color, and the expansion cell 2a having a black central portion 20 is identified as a dark color. For this reason, when the QR code reader reads the two-dimensional code 10 of this embodiment, the reader does not identify the reference color of each expansion cell 2c in detail, and the color arrangement pattern of the central portion 20 Based on the above, each extended cell 2c is identified as a light color or a dark color, and the compatible data is decoded according to the QR code decoding process.

一方、本実施例の二次元コード10は、専用読取装置を用いて、各拡張セル2aの周辺部21の配色パターンをサブセル単位で識別すれば、二次元コード1に記録された17層のデータ領域に記録された互換データDS0と専用データDS1〜DS16を全て復号できる。二次元コード10の読取方法は、実施例1の二次元コード1の読取方法に準じて読取可能であるため詳細な説明は省略する。なお、本実施例の二次元コード10の読取方法では、図19(a)に示すように、拡張セル2cの8個のサブセル21a〜21hの中心を、サブセル21a〜21hについての色情報取得部位30a〜30hとして設定し、また、図19(b)に示すように、各サンプルセル2bの、サブセル21a〜21hの各色情報取得部位30a〜30hに対応する部位を、サンプルセル2bの色情報取得部位31a〜31hとして設定する。なお、サンプルセル2bは、実施例1の二次元コード1と同構成である。そして、サブセル21a〜21hの基準色を識別するに際しては、サブセル21a〜21hの色情報取得部位30a〜30hから取得した色情報を、各サンプルセル2bの対応する部位の色情報取得部位31a〜31hから取得した色情報と比較して、当該サブセル21a〜21hの基準色を、色情報が最も近似するサンプルセル2bの周辺部21と同じ基準色であると判定する。例えば、左上のサブセル21aの基準色を識別するに際しては、左上のサブセル21aの色情報取得部位30aから取得した色情報を、各サンプルセル2bの左上部の色情報取得部位31aから取得した色情報と比較する。このように、サブセル21a〜21hから取得した色情報を、サンプルセル2bの周辺部21の、対応する部位31a〜31hから取得した色情報と比較すれば、比較対象のサンプルセル2bの色情報は、サブセル21a〜21hから取得した色情報と同様に、中央部20の色の影響を受けたものとなるため、拡張セル2cのサブセル21a〜21hの基準色を決定する際に、中央部20の色の影響に左右されることなく、基準色を正確に決定することができる。   On the other hand, the two-dimensional code 10 of the present embodiment is a 17-layer data recorded in the two-dimensional code 1 if the color arrangement pattern of the peripheral portion 21 of each extended cell 2a is identified in units of subcells using a dedicated reader. All the compatible data DS0 and the dedicated data DS1 to DS16 recorded in the area can be decoded. Since the reading method of the two-dimensional code 10 can be read according to the reading method of the two-dimensional code 1 of the first embodiment, detailed description thereof is omitted. In the reading method of the two-dimensional code 10 according to the present embodiment, as shown in FIG. 19A, the center of the eight subcells 21a to 21h of the expansion cell 2c is used as the color information acquisition part for the subcells 21a to 21h. Further, as shown in FIG. 19 (b), the parts corresponding to the color information acquisition parts 30a to 30h of the subcells 21a to 21h of the sample cell 2b are obtained as the color information of the sample cell 2b. It sets as part 31a-31h. The sample cell 2b has the same configuration as the two-dimensional code 1 of the first embodiment. When identifying the reference colors of the subcells 21a to 21h, the color information acquired from the color information acquisition portions 30a to 30h of the subcells 21a to 21h is used as the color information acquisition portions 31a to 31h of the corresponding portions of the sample cells 2b. Compared with the color information acquired from the above, the reference colors of the subcells 21a to 21h are determined to be the same reference color as that of the peripheral portion 21 of the sample cell 2b with the closest color information. For example, when identifying the reference color of the upper left subcell 21a, the color information acquired from the color information acquisition portion 30a of the upper left subcell 21a is obtained from the color information acquisition portion 31a of the upper left portion of each sample cell 2b. Compare with Thus, if the color information acquired from the subcells 21a to 21h is compared with the color information acquired from the corresponding portions 31a to 31h of the peripheral portion 21 of the sample cell 2b, the color information of the sample cell 2b to be compared is Since the color information acquired from the subcells 21a to 21h is influenced by the color of the central portion 20, when the reference colors of the subcells 21a to 21h of the expansion cell 2c are determined, The reference color can be accurately determined without being influenced by the influence of the color.

以上に、本発明の実施形態を実施例によって説明したが、本発明は、上記実施例の形態に限らず本発明の要旨を逸脱しない範囲内において種々変更を加えることができる。   As mentioned above, although embodiment of this invention was described by the Example, this invention can add a various change in the range which is not restricted to the form of the said Example and does not deviate from the summary of this invention.

例えば、上記実施例は、QRコードの規格に本発明を適用した二次元コードを例示したが、本発明は、QRコード以外の二次元コードの規格にも適用可能である。また、上記実施例では、セルの周辺部を8種類の基準色で配色しているが、本発明に係る基準色の数は適宜変更可能である。また、基準色は、色彩を有するものに限らず、複数階調の灰色を採用することできる。また、本発明にあって、基準色の配色は、基準色のインキのベタ塗りによって表されたものに限らず、微細な網点の合成等によって表されたものであってもかまわない。また、本発明の二次元コードは、印刷物に印刷されたものに限らず、表示画面に表示されたものも含む。   For example, although the above embodiment exemplifies a two-dimensional code in which the present invention is applied to the QR code standard, the present invention is also applicable to a two-dimensional code standard other than the QR code. Moreover, in the said Example, although the peripheral part of a cell is colored with 8 types of reference colors, the number of the reference colors which concern on this invention can be changed suitably. In addition, the reference color is not limited to one having a color, and gray of a plurality of gradations can be adopted. In the present invention, the color arrangement of the reference color is not limited to that represented by solid coating of the ink of the reference color, and may be represented by synthesis of fine halftone dots. Further, the two-dimensional code of the present invention is not limited to the one printed on the printed material, but includes one displayed on the display screen.

1,10 二次元コード
1a,1b,1c,10a〜10h QRコード
2 セル
2a,2c 拡張セル
2b サンプルセル
3 機能パターン
4 符号化領域
5 位置検出パターン
5a サンプル領域
6 分離パターン
7 タイミングパターン
8 データコード領域
8a 識別コード
9 形式情報コード領域
20 中央部
21 周辺部
21a〜21h サブセル
30,30a〜30h,31a〜31h 色情報取得部位
1, 10 Two-dimensional code 1a, 1b, 1c, 10a to 10h QR code 2 cell 2a, 2c extended cell 2b sample cell 3 function pattern 4 coding area 5 position detection pattern 5a sample area 6 separation pattern 7 timing pattern 8 data code Area 8a Identification code 9 Format information code area 20 Central part 21 Peripheral part 21a-21h Subcell 30, 30a-30h, 31a-31h Color information acquisition part

Claims (18)

明色と識別されるセルと暗色と識別されるセルとをマトリクス状に配置してなる二次元コードであって、
少なくとも一部のセルが、白色又は黒色で配色された中央部と、RGB値の異なる3種類以上の基準色から選ばれた、1又は複数の色で配色された周辺部とからなる拡張セルであり、
拡張セルの中央部の配色パターンによって記録される互換データと、拡張セルの周辺部の配色パターンによって記録される専用データの少なくとも二種類の情報を含むことを特徴とする二次元コード。
A two-dimensional code in which cells identified as light colors and cells identified as dark colors are arranged in a matrix,
At least a part of the cells is an extended cell composed of a central portion arranged in white or black and a peripheral portion arranged in one or more colors selected from three or more reference colors having different RGB values. Yes,
A two-dimensional code comprising at least two types of information: compatible data recorded by a color arrangement pattern at the center of an extended cell and dedicated data recorded by a color arrangement pattern at the periphery of the extended cell.
セルは正方形状をなしており、
拡張セルは、当該拡張セルを縦横に3分割して得られる9つの正方形のうち、中央の正方形部分を中央部とし、残り8つの正方形部分を周辺部としていることを特徴とする請求項1に記載の二次元コード。
The cell has a square shape,
The extended cell has nine squares obtained by dividing the extended cell vertically and horizontally into a central square portion and a remaining eight square portions as peripheral portions. The described two-dimensional code.
前記基準色は、反射率又は輝度が所定の明色閾値以上である複数の明色基準色と、反射率又は輝度が所定の暗色閾値以下である複数の暗色基準色とからなり、
中央部が白色で配色された拡張セルは、前記複数の明色基準色から選ばれた、1又は複数の色で配色されており、
中央部が黒色で配色された拡張セルは、前記複数の暗色基準色から選ばれた、1又は複数の色で配色されていることを特徴とする請求項1又は請求項2に記載の二次元コード。
The reference color is composed of a plurality of light color reference colors whose reflectance or luminance is equal to or higher than a predetermined light color threshold value, and a plurality of dark color reference colors whose reflectance or luminance is equal to or lower than a predetermined dark color threshold value.
The expansion cell in which the central portion is colored in white is colored in one or a plurality of colors selected from the plurality of bright color reference colors,
3. The two-dimensional image according to claim 1, wherein the extended cells arranged in black at the center are arranged in one or a plurality of colors selected from the plurality of dark reference colors. code.
各セルが明色と暗色のいずれで識別されるかが予め決定されて、光学的読取りを補助するパターンを構成する固定領域を備えるものであり、
該固定領域は、所定部位をいずれか一色の基準色で配色してなるサンプルセルを、基準色ごとに備え、
各基準色についてのサンプルセルは、固定領域の所定位置に設けられており、
明色基準色についてのサンプルセルは、固定領域の、明色と識別されるセルであり、
暗色基準色についてのサンプルセルは、固定領域の、暗色と識別されるセルであることを特徴とする請求項3に記載の二次元コード。
It is determined in advance whether each cell is identified as light or dark, and comprises a fixed area that forms a pattern that assists in optical reading;
The fixed region includes a sample cell in which a predetermined portion is colored with any one of the reference colors, for each reference color,
Sample cells for each reference color are provided at predetermined positions in the fixed area,
The sample cell for the light reference color is a cell in the fixed area that is identified as light,
The two-dimensional code according to claim 3, wherein the sample cell for the dark reference color is a cell of a fixed region that is identified as a dark color.
前記固定領域は、サンプルセルを基準色毎に複数セット備えることを特徴とする請求項4に記載の二次元コード。   The two-dimensional code according to claim 4, wherein the fixed region includes a plurality of sets of sample cells for each reference color. サンプルセルは、拡張セルと同様に中央部と周辺部によって構成されており、
サンプルセルの前記所定部位は、サンプルセルの周辺部であり、
周辺部が明色基準色で配色されたサンプルセルは、中央部が白色で配色され、周辺部が暗色基準色で配色されたサンプルセルは、中央部が黒色で配色されていることを特徴とする請求項4又は請求項5に記載の二次元コード。
Like the expansion cell, the sample cell is composed of a central part and a peripheral part.
The predetermined portion of the sample cell is a peripheral portion of the sample cell;
Sample cells with the lighter reference color at the periphery are colored white at the center, and sample cells with the dark reference color at the periphery are colored black at the center. The two-dimensional code according to claim 4 or 5.
拡張セルの周辺部は、前記3種類以上の基準色から選ばれた、一つの色で配色されていることを特徴とする請求項1乃至請求項6のいずれか1項に記載の二次元コード。   The two-dimensional code according to any one of claims 1 to 6, wherein a peripheral portion of the extended cell is arranged in one color selected from the three or more types of reference colors. . 拡張セルの周辺部は、複数個のサブセルに細分されて、個々のサブセルが、前記3種類以上の基準色から選ばれた一つの色で配色されていることを特徴とする請求項1乃至請求項6のいずれか1項に記載の二次元コード。   The peripheral portion of the extended cell is subdivided into a plurality of subcells, and each subcell is arranged in one color selected from the three or more reference colors. Item 7. The two-dimensional code according to any one of items 6. 光学的読取りを補助するパターンを構成するセルからなる固定領域と、データを記録するセルからなる符号化領域とを備えるものであり、
符号化領域の、互換データを記録しないセルからなる残余領域に、拡張セルの記録形式を示す識別コードが、セル単位の明暗パターンによって記録されていることを特徴とする請求項1乃至請求項8のいずれか1項に記載の二次元コード。
A fixed area consisting of cells constituting a pattern for assisting optical reading, and an encoding area consisting of cells for recording data;
9. An identification code indicating a recording format of an extended cell is recorded in a light / dark pattern in units of cells in a remaining area consisting of cells in which compatible data is not recorded in an encoding area. The two-dimensional code according to any one of the above.
請求項7に記載の二次元コードの読取方法であって、
拡張セルの周辺部の複数箇所から色情報を取得し、取得した色情報の平均値に基づいて、当該拡張セルの周辺部の基準色を識別することを特徴とする二次元コードの読取方法。
A method for reading a two-dimensional code according to claim 7,
A method for reading a two-dimensional code, comprising: obtaining color information from a plurality of locations in a peripheral portion of an extended cell; and identifying a reference color in the peripheral portion of the extended cell based on an average value of the acquired color information.
請求項5に記載の二次元コードの読取方法であって、
前記複数セットのサンプルセルから、前記所定部位の色情報を個別に取得するサンプル色取得処理と、
拡張セルの周辺部の特定部位から取得した色情報を、前記サンプル色取得処理で取得した色情報と個別に比較して、最も近似する色情報を取得したサンプルセルの前記所定部位の基準色が、前記特定部位の基準色であると判定する基準色識別処理とを含むことを特徴とする二次元コードの読取方法。
A method for reading a two-dimensional code according to claim 5,
Sample color acquisition processing for individually acquiring the color information of the predetermined part from the plurality of sets of sample cells;
The color information acquired from the specific part of the peripheral part of the expansion cell is individually compared with the color information acquired in the sample color acquisition process, and the reference color of the predetermined part of the sample cell from which the closest color information is acquired is And a reference color identification process for determining a reference color of the specific part.
請求項6に記載の二次元コードの読取方法であって、
拡張セルの周辺部の特定部位から取得した色情報を、サンプルセルの周辺部の、前記特定部位に対応する部位から取得した色情報と比較して、最も近似する色情報を取得したサンプルセルの周辺部の基準色が、前記特定部位の基準色であると識別することを特徴とする二次元コードの読取方法。
The two-dimensional code reading method according to claim 6,
Compare the color information acquired from the specific part of the peripheral part of the expansion cell with the color information acquired from the part corresponding to the specific part of the peripheral part of the sample cell, and A method for reading a two-dimensional code, characterized in that a reference color of a peripheral part is identified as a reference color of the specific part.
請求項3に記載の二次元コードの読取方法であって、
各拡張セルのセル単位の明暗パターンを識別して、前記互換データを復号する互換データ復号処理と、
該互換データ復号処理の後に、各拡張セルの周辺部から取得した色情報に基づいて当該周辺部の配色パターンを識別し、前記専用データを復号する専用データ復号処理とを含み、
該専用データ復号処理では、互換データ復号処理で識別した拡張セルのセル単位の明暗パターンに基づいて、周辺部の基準色を、明色基準色と暗色基準色のいずれかに絞り込むことを特徴とする二次元コードの読取方法。
A method for reading a two-dimensional code according to claim 3,
A compatible data decoding process for identifying the cell-by-cell brightness pattern of each extended cell and decoding the compatible data;
A dedicated data decoding process for identifying the color arrangement pattern of the peripheral part based on the color information acquired from the peripheral part of each extended cell and decoding the dedicated data after the compatible data decoding process;
The dedicated data decoding process is characterized in that the reference color of the peripheral portion is narrowed down to either a bright color reference color or a dark color reference color based on the light / dark pattern of the extended cell identified by the compatible data decoding process. To read a two-dimensional code.
請求項1乃至請求項9のいずれか1項に記載の二次元コードの読取方法であって、
二次元コードを撮像する撮像処理を複数回実行するとともに、
該撮像処理で得られた二次元コードの画像データに基づいて、各拡張セルの周辺部の配色パターンを識別する周辺部識別処理を撮像処理毎に実行し、
その後、個々の拡張セルについて実行した複数回の周辺部識別処理の識別結果を多数決して、個々の拡張セルの周辺部の配色パターンを特定する多数決処理と、
該多数決処理で特定した拡張セルの配色パターンに基づいて専用データを復号する多数決復号処理とを実行することを特徴とする二次元コードの読取方法。
A method for reading a two-dimensional code according to any one of claims 1 to 9,
While performing the imaging process of imaging the two-dimensional code multiple times,
Based on the image data of the two-dimensional code obtained by the imaging process, a peripheral part identifying process for identifying a color arrangement pattern of the peripheral part of each expansion cell is performed for each imaging process,
After that, the majority process that identifies the color arrangement pattern of the peripheral part of each extended cell, never the many identification results of the multiple peripheral part identification process performed for each extended cell,
A two-dimensional code reading method, comprising: executing a majority decision decoding process for decoding dedicated data based on a color arrangement pattern of an extended cell specified by the majority decision process.
請求項1乃至請求項9のいずれか1項に記載の二次元コードの読取方法であって、
二次元コードを撮像して得られた一枚の画像データに基づいて、拡張セルの周辺部の配色パターンを識別し、識別した拡張セルの周辺部の配色パターンに基づいて専用データを復号する初回復号処理を実行し、
該初回復号処理で、専用データを復号できなかった場合に、請求項14に記載の二次元コードの読取方法を実行することを特徴とする二次元コードの読取方法。
A method for reading a two-dimensional code according to any one of claims 1 to 9,
First time to identify the color scheme of the peripheral part of the extended cell based on one piece of image data obtained by imaging the two-dimensional code, and to decode the dedicated data based on the color scheme of the peripheral part of the identified extended cell Execute the decryption process,
15. The two-dimensional code reading method according to claim 14, wherein the two-dimensional code reading method according to claim 14 is executed when the dedicated data cannot be decoded in the initial decoding process.
請求項1乃至請求項9のいずれか1項に記載の二次元コードの読取方法であって、
赤色光の照明下で二次元コードを撮像し、得られた二次元コードの画像データから、拡張セルの周辺部の赤色成分の色情報を取得する赤色識別処理と、
緑色光の照明下で二次元コードを撮像し、得られた二次元コードの画像データから、拡張セルの周辺部の緑色成分の色情報を取得する緑色識別処理と、
青色光の照明下で二次元コードを撮像し、得られた二次元コードの画像データから、拡張セルの周辺部の青色成分の色情報を取得する青色識別処理と
の3つの処理のうち、少なくとも2つの処理を実行し、
赤色識別処理、緑色識別処理、及び青色識別処理のうち、少なくとも2つの処理で取得した色情報を組み合わせて、拡張セルの周辺部の基準色を識別することを特徴とする二次元コードの読取方法。
A method for reading a two-dimensional code according to any one of claims 1 to 9,
A red identification process for capturing a two-dimensional code under illumination of red light, and obtaining color information of a red component in the peripheral portion of the expansion cell from the obtained two-dimensional code image data;
A green identification process that captures a two-dimensional code under illumination of green light and acquires color information of a green component in the periphery of the expansion cell from the obtained two-dimensional code image data;
At least of three processes including a blue identification process of capturing a two-dimensional code under illumination of blue light and obtaining color information of a blue component in the peripheral part of the extended cell from the obtained two-dimensional code image data Perform two processes,
A method for reading a two-dimensional code, characterized in that the reference color of the peripheral portion of the extended cell is identified by combining the color information acquired in at least two of the red identification process, the green identification process, and the blue identification process .
請求項1乃至請求項9のいずれか1項に記載の二次元コードの読取方法であって、
白色光の照明下で撮像した二次元コードの画像データに基づいて、拡張セルの周辺部の配色パターンを識別し、識別した拡張セルの周辺部の配色パターンに基づいて専用データを復号する白色光復号処理を実行し、
該白色復号処理で、専用データを復号できなかった場合に、請求項16に記載の二次元コードの読取方法を実行することを特徴とする二次元コードの読取方法。
A method for reading a two-dimensional code according to any one of claims 1 to 9,
Based on the image data of the two-dimensional code captured under the illumination of white light, the color arrangement pattern of the peripheral part of the extended cell is identified, and the dedicated data is decoded based on the color arrangement pattern of the peripheral part of the identified extended cell. Process
The two-dimensional code reading method according to claim 16, wherein the two-dimensional code reading method according to claim 16 is executed when the dedicated data cannot be decoded by the white decoding process.
請求項13に記載の二次元コードの読取方法であって、
読取対象の二次元コードの拡張セルの周辺部に用いられる全ての明色基準値でRGB値の緑色成分が共通しており、かつ、全ての暗色基準値でRGB値の緑色成分が共通している場合には、
専用データ復号処理において、
赤色光の照明下で二次元コードを撮像し、得られた二次元コードの画像データから、拡張セルの周辺部の赤色成分の色情報を取得する赤色識別処理と、
青色光の照明下で二次元コードを撮像し、得られた二次元コードの画像データから、拡張セルの周辺部の青色成分の色情報を取得する青色識別処理とを実行し、
赤色識別処理及び青色識別処理で取得した色情報を組み合わせて、拡張セルの周辺部の配色パターンを識別することを特徴とする二次元コードの読取方法。
A method for reading a two-dimensional code according to claim 13,
The green component of the RGB value is common to all the light color reference values used in the peripheral part of the extension cell of the two-dimensional code to be read, and the green component of the RGB value is common to all the dark color reference values. If you have
In the dedicated data decryption process,
A red identification process for capturing a two-dimensional code under illumination of red light, and obtaining color information of a red component in the peripheral portion of the expansion cell from the obtained two-dimensional code image data;
A blue identification process is performed in which a two-dimensional code is imaged under illumination of blue light, and color information of a blue component in the peripheral portion of the expansion cell is obtained from the obtained two-dimensional code image data,
A method for reading a two-dimensional code, comprising: combining color information acquired in a red identification process and a blue identification process to identify a color arrangement pattern in a peripheral portion of an extended cell.
JP2015082416A 2015-04-14 2015-04-14 Two-dimensional code and method for reading the two-dimensional code Active JP6590335B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2015082416A JP6590335B2 (en) 2015-04-14 2015-04-14 Two-dimensional code and method for reading the two-dimensional code

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2015082416A JP6590335B2 (en) 2015-04-14 2015-04-14 Two-dimensional code and method for reading the two-dimensional code

Publications (2)

Publication Number Publication Date
JP2016201061A true JP2016201061A (en) 2016-12-01
JP6590335B2 JP6590335B2 (en) 2019-10-16

Family

ID=57424408

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2015082416A Active JP6590335B2 (en) 2015-04-14 2015-04-14 Two-dimensional code and method for reading the two-dimensional code

Country Status (1)

Country Link
JP (1) JP6590335B2 (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108416246A (en) * 2018-03-23 2018-08-17 西安艾润物联网技术服务有限责任公司 Quick Response Code barcode scanning method, apparatus and computer readable storage medium
JP2018169670A (en) * 2017-03-29 2018-11-01 京セラドキュメントソリューションズ株式会社 Color code, color code reading apparatus, color code reading system and image formation apparatus
JP2018198941A (en) * 2009-06-17 2018-12-20 ダブリュ.エル.ゴア アンド アソシエイツ,インコーポレイティドW.L. Gore & Associates, Incorporated Medical device fixation anchor having improved compaction and delivery
CN109657513A (en) * 2017-10-06 2019-04-19 电装波动株式会社 Two dimensional code
WO2020175571A1 (en) * 2019-02-28 2020-09-03 株式会社テララコード研究所 Optical code creation program, optical code readout authentication program, optical code authentication system, payment system, printed article production method, and optical code authentication method
CN114185463A (en) * 2021-11-17 2022-03-15 北京字跳网络技术有限公司 Form processing method and device, electronic equipment and storage medium
CN114266266A (en) * 2021-11-12 2022-04-01 上海宾通智能科技有限公司 Simple and quick composite two-dimensional code identification system
WO2023228654A1 (en) * 2022-05-23 2023-11-30 株式会社デンソー Information code, code generation method, and code reading method
CN117560402A (en) * 2024-01-12 2024-02-13 凌锐蓝信科技(北京)有限公司 SD-WAN-based system and method for industrial security isolation and data exchange
CN117560402B (en) * 2024-01-12 2024-04-19 凌锐蓝信科技(北京)有限公司 SD-WAN-based system and method for industrial security isolation and data exchange

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000293647A (en) * 1999-04-01 2000-10-20 Omron Corp Pattern code, printer and reader
JP2004246927A (en) * 2004-05-21 2004-09-02 Sharp Corp Digital information recording method
JP2004259302A (en) * 2004-05-21 2004-09-16 Sharp Corp Digital information recording method
JP2010271812A (en) * 2009-05-20 2010-12-02 Denso Wave Inc Two-dimensional code reading apparatus
JP2013093061A (en) * 2006-05-31 2013-05-16 Konica Minolta Laboratory Usa Inc Two-dimensional color barcode, generation method of two-dimensional color barcode and program
JP2014085777A (en) * 2012-10-23 2014-05-12 Terrara Code Research Institute Inc Two-dimensional code, method of generating two-dimensional code, and method of reading two-dimensional code
JP2014154118A (en) * 2013-02-14 2014-08-25 Terrara Code Research Institute Inc Optical code and generation method for the optical code

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000293647A (en) * 1999-04-01 2000-10-20 Omron Corp Pattern code, printer and reader
JP2004246927A (en) * 2004-05-21 2004-09-02 Sharp Corp Digital information recording method
JP2004259302A (en) * 2004-05-21 2004-09-16 Sharp Corp Digital information recording method
JP2013093061A (en) * 2006-05-31 2013-05-16 Konica Minolta Laboratory Usa Inc Two-dimensional color barcode, generation method of two-dimensional color barcode and program
JP2010271812A (en) * 2009-05-20 2010-12-02 Denso Wave Inc Two-dimensional code reading apparatus
JP2014085777A (en) * 2012-10-23 2014-05-12 Terrara Code Research Institute Inc Two-dimensional code, method of generating two-dimensional code, and method of reading two-dimensional code
JP2014154118A (en) * 2013-02-14 2014-08-25 Terrara Code Research Institute Inc Optical code and generation method for the optical code

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
寺浦信之(他1名): "互換領域を有する多色多領域方式の高密度二次元コード", 第12回情報科学技術フォーラム講演論文集, vol. 第3分冊, JPN6019007882, 20 August 2013 (2013-08-20), JP, pages 589 - 596, ISSN: 0003992085 *

Cited By (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018198941A (en) * 2009-06-17 2018-12-20 ダブリュ.エル.ゴア アンド アソシエイツ,インコーポレイティドW.L. Gore & Associates, Incorporated Medical device fixation anchor having improved compaction and delivery
US11202717B2 (en) 2009-06-17 2021-12-21 W. L. Gore & Associates, Inc. Medical device fixation anchor having improved compaction and delivery
JP2018169670A (en) * 2017-03-29 2018-11-01 京セラドキュメントソリューションズ株式会社 Color code, color code reading apparatus, color code reading system and image formation apparatus
CN109657513A (en) * 2017-10-06 2019-04-19 电装波动株式会社 Two dimensional code
CN109657513B (en) * 2017-10-06 2022-09-30 电装波动株式会社 Two-dimensional code
CN108416246B (en) * 2018-03-23 2021-11-09 西安艾润物联网技术服务有限责任公司 Two-dimensional code scanning method and device and computer readable storage medium
CN108416246A (en) * 2018-03-23 2018-08-17 西安艾润物联网技术服务有限责任公司 Quick Response Code barcode scanning method, apparatus and computer readable storage medium
WO2020175571A1 (en) * 2019-02-28 2020-09-03 株式会社テララコード研究所 Optical code creation program, optical code readout authentication program, optical code authentication system, payment system, printed article production method, and optical code authentication method
JP2020141260A (en) * 2019-02-28 2020-09-03 株式会社テララコード研究所 Optical code creation program, optical code reading authentication program, optical code authentication system, payment system, printed matter manufacturing method, and optical code authentication method
JP7274202B2 (en) 2019-02-28 2023-05-16 株式会社テララコード研究所 Optical code creation program, optical code reading authentication program, optical code authentication system, payment system, printed matter manufacturing method, and optical code authentication method
CN114266266B (en) * 2021-11-12 2023-10-20 上海宾通智能科技有限公司 Composite two-dimensional code recognition system
CN114266266A (en) * 2021-11-12 2022-04-01 上海宾通智能科技有限公司 Simple and quick composite two-dimensional code identification system
CN114185463A (en) * 2021-11-17 2022-03-15 北京字跳网络技术有限公司 Form processing method and device, electronic equipment and storage medium
CN114185463B (en) * 2021-11-17 2023-10-13 北京字跳网络技术有限公司 Form processing method, form processing device, electronic equipment and storage medium
WO2023228654A1 (en) * 2022-05-23 2023-11-30 株式会社デンソー Information code, code generation method, and code reading method
CN117560402A (en) * 2024-01-12 2024-02-13 凌锐蓝信科技(北京)有限公司 SD-WAN-based system and method for industrial security isolation and data exchange
CN117560402B (en) * 2024-01-12 2024-04-19 凌锐蓝信科技(北京)有限公司 SD-WAN-based system and method for industrial security isolation and data exchange

Also Published As

Publication number Publication date
JP6590335B2 (en) 2019-10-16

Similar Documents

Publication Publication Date Title
JP6590335B2 (en) Two-dimensional code and method for reading the two-dimensional code
TWI528293B (en) QR code
TWI501159B (en) QR code
TW201432576A (en) Two-dimensional code, system for creation of two-dimensional code, and analysis program
JP6061075B2 (en) Two-dimensional code, two-dimensional code generation method, and two-dimensional code reading method
KR101461233B1 (en) Image processing device, image processing method and recording medium
CA2586274A1 (en) Mixed code, and method and apparatus for generating the same, and method and apparatus for decoding the same
JP2007079781A (en) Two-dimensional code division display method, two-dimensional code reading method and two-dimensional code reader
MX2012010260A (en) Method for creating and method for decoding two-dimensional colour code.
JP2013030184A (en) Two-dimensional code, two-dimensional code generating method, computer readable program for displaying two-dimensional code, authentication method using two-dimensional code, and information providing method using two-dimensional code
US10956799B2 (en) Method for detecting and recognizing long-range high-density visual markers
JP5115404B2 (en) 2D code
US7840027B2 (en) Data embedding apparatus and printed material
JP2005208843A (en) Information encoding/decoding method, device and code indicator
JP6099258B2 (en) Optical code and method for generating the optical code
JP2008052587A (en) Program, information storage medium, two-dimensional code generation system and two-dimensional code
US10142643B2 (en) Marker generating method, marker decoding method, and marker reading device
US20200412907A1 (en) Encoding Dot Patterns Into Printed Images Based on Source Pixel Color
US20080198172A1 (en) Color information encoding in monochrome printing
JP2019008564A (en) Multiplexed code, multiplexed code reader, multiplexed code reading method, and program
JP4892729B2 (en) Information embedding method and information reading method in texture image, information embedding device and information reading device in texture image
RU2449364C2 (en) Optical symbol, article to which optical symbol is attached, method for attaching optical symbol to article, optical symbol decoding method, related device and related program
JP2006330930A (en) Method and device for preparing and reading color code
JP2007257360A (en) Two-dimensional code, two-dimensional code reader and two-dimensional code-reading program
JP6409623B2 (en) Information code generation method, information code, information code reading system, and information code reading apparatus

Legal Events

Date Code Title Description
A80 Written request to apply exceptions to lack of novelty of invention

Free format text: JAPANESE INTERMEDIATE CODE: A80

Effective date: 20150420

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20180316

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20190227

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20190312

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20190423

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20190625

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20190723

A911 Transfer to examiner for re-examination before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A911

Effective date: 20190730

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: 20190820

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20190910

R150 Certificate of patent or registration of utility model

Ref document number: 6590335

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150