JP2006330930A - Method and device for preparing and reading color code - Google Patents

Method and device for preparing and reading color code Download PDF

Info

Publication number
JP2006330930A
JP2006330930A JP2005151277A JP2005151277A JP2006330930A JP 2006330930 A JP2006330930 A JP 2006330930A JP 2005151277 A JP2005151277 A JP 2005151277A JP 2005151277 A JP2005151277 A JP 2005151277A JP 2006330930 A JP2006330930 A JP 2006330930A
Authority
JP
Japan
Prior art keywords
code
color
color code
inversion
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
JP2005151277A
Other languages
Japanese (ja)
Inventor
Hiroshi Kimura
広志 木村
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co Ltd
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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP2005151277A priority Critical patent/JP2006330930A/en
Publication of JP2006330930A publication Critical patent/JP2006330930A/en
Withdrawn legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide a device for preparing a color code with high reading precision. <P>SOLUTION: This color code reading device is provided with a mapping part 12 for assigning inputted code data to each of cells as the configuring units of a color code, a bit inversion pattern storing part 14 for storing a bit inversion pattern for defining the inversion or non-inversion of each data, an inversion processing part 13 for converting the code data assigned to the cells based on the bit inversion pattern and a color code preparing part 15 for displaying each cell in a color corresponding to the converted code data of the cell. It is possible to convert the color of each cell of the color code based on the bit inversion pattern, and to solve the deviation of the color in the color code. Thus, it is possible to increase reading precision in the case of reading. <P>COPYRIGHT: (C)2007,JPO&INPIT

Description

本発明は、カラーコードを作成する方法、及び、それを読み取る方法と、それらの方法を実施する装置に関し、特に、読取り精度の向上を図るものである。   The present invention relates to a method for creating a color code, a method for reading the color code, and an apparatus for performing the method, and particularly aims to improve reading accuracy.

近年、二次元コードの読み取りが可能なカメラ付き携帯電話が普及してきている。しかし、現在普及している二次元コードは、情報が白と黒の二値で表現されるため、二次元コードに埋め込むことが可能な情報量は限られてくる。   In recent years, mobile phones with cameras that can read a two-dimensional code have become widespread. However, in the currently popular two-dimensional code, information is expressed by binary values of white and black, so that the amount of information that can be embedded in the two-dimensional code is limited.

この情報量は、下記特許文献1に記載されているように、カラーバーコードを用いて増やすことができる。例えば、白色の紙に印刷するバーコードを、シアン、マゼンダ、イエロー、及び、それらの合成色である赤、緑、青、黒から選んだ色で記録することにより、情報密度を高めることができる。   This amount of information can be increased using a color barcode as described in Patent Document 1 below. For example, information density can be increased by recording barcodes printed on white paper with colors selected from cyan, magenta, yellow, and their combined colors red, green, blue, and black. .

このカラーバーコードを読取るときは、その反射光から赤色、緑色、青色波長の各信号をそれぞれ検出し、赤色、緑色、青色の各データ判定閾値と比較して、赤、緑、青の各成分の有無を判定し、色の識別が行われる。   When reading this color barcode, the red, green, and blue wavelength signals are detected from the reflected light, and compared with the red, green, and blue data determination thresholds, the red, green, and blue components. The presence or absence of color is determined, and the color is identified.

カラーバーコードでは、色の読取り精度が非常に重要となってくる。しかし、一般的に、カメラで撮影された画像データは、周囲の明るさなどの撮影環境によって大きく変動してしまい、正確な色を読取ることが難しい。   For color barcodes, color reading accuracy is very important. However, in general, image data captured by a camera varies greatly depending on a shooting environment such as ambient brightness, and it is difficult to read an accurate color.

下記特許文献2には、カラーバーコードの読み取り精度を向上させるため、印字するカラーバーコードの先頭にRGB補正用の赤いバー、緑のバー及び青のバーを印字する方法が提案されている。この方法では、カラーバーコードを読取る際に、この3本のバーをカメラで撮影して、R成分、G成分及びB成分の各データ判定閾値を最適化する。
特開平8−96097号公報 特開2004−199203号公報
Patent Document 2 below proposes a method of printing a red bar for RGB correction, a green bar, and a blue bar at the head of a color barcode to be printed in order to improve the reading accuracy of the color barcode. In this method, when the color barcode is read, the three bars are photographed by the camera, and the data determination threshold values of the R component, the G component, and the B component are optimized.
JP-A-8-96097 JP 2004-199203 A

しかし、前記特許文献2のようにRGB補正をしたとしても、周囲の環境、明るさ、カメラ性能等により、読取り精度の低い色は依然として存在する。特に、そのような読取り精度の低い色がカラーコードに偏って多く存在したり、そのような色がカラーコード中に多数隣接していたりする場合は、カラーコードの読取り精度の劣化を招くこととなる。   However, even if RGB correction is performed as in Patent Document 2, there are still colors with low reading accuracy due to the surrounding environment, brightness, camera performance, and the like. In particular, when there are many such colors with low reading accuracy biased to the color code, or when many such colors are adjacent to the color code, the reading accuracy of the color code is degraded. Become.

本発明は、こうした事情を考慮して創案したものであり、読取り精度が高いカラーコードを作成する方法、及び、それを読み取る方法を提供し、また、それらの方法を実施する装置を提供することを目的としている。   The present invention was devised in view of these circumstances, and provides a method for creating a color code with high reading accuracy, a method for reading the color code, and an apparatus for performing those methods. It is an object.

本発明のカラーコード作成方法は、カラーコードの構成単位であるセルの各々にコードデータを割り当てるマッピングステップと、前記セルに割り当てたコードデータを、各データの反転または非反転を定義したビット反転パターンに基づいて変換する変換ステップと、前記セルの各々を、当該セルの変換後のコードデータに対応する色で表示するカラー化ステップとを有している。   The color code creation method of the present invention includes a mapping step for assigning code data to each cell which is a constituent unit of a color code, and a bit inversion pattern in which the code data assigned to the cell is defined as inversion or non-inversion of each data. And a colorizing step for displaying each of the cells in a color corresponding to the converted code data of the cell.

そのため、カラーコードの各セルの色を、ビット反転パターンに基づいて変換し、カラーコードにおける色の偏りを解消することができる。   Therefore, the color of each cell of the color code can be converted based on the bit inversion pattern to eliminate the color deviation in the color code.

また、本発明のカラーコード作成方法では、前記マッピングステップにおいて、ビット反転パターンの種類を表示する識別用セル以外のセルにコードデータを割り当て、前記変換ステップにおいて、識別用セルに、変換に用いたビット反転パターンの識別コードを設定する。   In the color code creating method of the present invention, in the mapping step, code data is assigned to cells other than the identification cell for displaying the type of bit inversion pattern, and in the conversion step, the identification cell is used for conversion. Set identification code of bit inversion pattern.

そのため、カラーコードを読取るときは、識別用セルに設定された識別コードから、カラーコード作成時に使用されたビット反転パターンを知ることができる。   Therefore, when reading the color code, the bit inversion pattern used at the time of creating the color code can be known from the identification code set in the identification cell.

また、本発明のカラーコード作成方法では、前記変換ステップにおいて、セルに割り当てたコードデータを複数のビット反転パターンに基づいて複数通りに変換し、前記カラー化ステップを経て複数のカラーコードを作成する。   In the color code creation method of the present invention, in the conversion step, the code data assigned to the cell is converted in a plurality of ways based on a plurality of bit inversion patterns, and a plurality of color codes are created through the colorization step. .

そのため、カラーコード読取り時には、複数のカラーコードの内から、読取り機器の性能や読取り時の状況に応じて、最適な色の配置のカラーコードを選択して読取ることができる。   Therefore, when reading a color code, it is possible to select and read a color code having an optimal color arrangement from a plurality of color codes according to the performance of the reading device and the situation at the time of reading.

また、本発明のカラーコード作成方法では、前記マッピングステップにおいて、同一の前記セルに、カラーコードによって表現する文字の文字コードに対応した前記コードデータから選定したビットを割り当て、前記文字コードに対応した前記コードデータの各ビットが複数のセルに分散するように設定する。   In the color code creation method of the present invention, in the mapping step, bits selected from the code data corresponding to the character code of the character represented by the color code are allocated to the same cell, and the character code is supported. Each bit of the code data is set to be distributed in a plurality of cells.

こうすることで、セル内の多数のビットに誤りが生じる“バースト誤り”が発生した場合でも、1つの文字コードに関係する誤りが減少し、誤り訂正符号による訂正が可能になる。   By doing so, even when a “burst error” occurs in which an error occurs in a large number of bits in a cell, errors related to one character code are reduced, and correction using an error correction code becomes possible.

また、本発明のカラーコード作成方法では、前記マッピングステップにおいて、同一の前記セルに、カラーコードによって表現する文字の文字コードに対応した前記コードデータの総てのビットを割り当てるように設定することもできる。この場合、前記マッピングステップの前に前記コードデータのビットインターリーブを行う。   In the color code creating method of the present invention, in the mapping step, all the bits of the code data corresponding to the character code of the character expressed by the color code may be assigned to the same cell. it can. In this case, bit interleaving of the code data is performed before the mapping step.

こうすることで、 “バースト誤り”に対処することができる。   In this way, “burst errors” can be dealt with.

また、本発明のカラーコード読取り方法は、カラーコードから、カラーコードの構成単位であるセルの各々に割り当てられたコードデータを読み込むステップと、セルに割り当てられたコードデータをカラーコード作成時に使用された、各データの反転または非反転を定義したビット反転パターンに基づいて変換する変換ステップと、変換されたコードデータからカラーコードで表された情報を復元するコード解析ステップとを有している。   Further, the color code reading method of the present invention is a step of reading code data assigned to each of the cells that are the constituent units of the color code from the color code, and the code data assigned to the cell is used when creating the color code. In addition, a conversion step for converting based on a bit inversion pattern defining inversion or non-inversion of each data, and a code analysis step for restoring information represented by a color code from the converted code data are provided.

そのため、色の偏りが無いカラーコードからデータを正確に読取ることができる。   Therefore, data can be accurately read from a color code with no color deviation.

また、本発明のカラーコード作成装置は、入力されたコードデータを、カラーコードの構成単位であるセルの各々に割り当てるマッピング部と、各データの反転または非反転を定義したビット反転パターンを保持するビット反転パターン保持部と、前記セルに割り当てた前記コードデータを前記ビット反転パターンに基づいて変換する反転処理部と、前記セルの各々を、当該セルの変換後のコードデータに対応する色で表示するカラーコード作成部とを備える。   In addition, the color code generating apparatus of the present invention holds a mapping unit that assigns input code data to each cell that is a unit of color code, and a bit inversion pattern that defines inversion or non-inversion of each data. A bit inversion pattern holding unit, an inversion processing unit for converting the code data assigned to the cell based on the bit inversion pattern, and each of the cells is displayed in a color corresponding to the code data after conversion of the cell A color code creating unit.

この装置では、カラーコード化する情報の如何に拘わらず、色の偏りが無いカラーコードを作成することができる。   With this apparatus, it is possible to create a color code with no color deviation regardless of the information to be color coded.

また、本発明のカラーコード読取り装置は、カラーコードから、カラーコードの構成単位であるセルの各々に割り当てられたコードデータを読み込むコードデータ読み込み部と、 各データの反転または非反転を定義したビット反転パターンを保持するビット反転パターン保持部と、前記セルに割り当てられたコードデータをカラーコード作成時に使用された前記ビット反転パターンに基づいて変換する反転処理部と、変換されたコードデータからカラーコードで表された情報を復元するコード解析部とを備える。   Further, the color code reading device of the present invention includes a code data reading unit that reads code data assigned to each cell constituting the color code from the color code, and a bit that defines inversion or non-inversion of each data. A bit inversion pattern holding unit for holding an inversion pattern, an inversion processing unit for converting code data assigned to the cell based on the bit inversion pattern used when creating the color code, and a color code from the converted code data And a code analysis unit that restores the information represented by.

この装置では、色の偏りが無いカラーコードを選択して読み出したコードデータから、カラーコードで表された元のデータを復元することができる。   In this apparatus, the original data represented by the color code can be restored from the code data read out by selecting a color code having no color deviation.

本発明は、カラーコードの読取り精度の向上を可能にする。また、冗長度の少ない誤り訂正符号化でカラーコードを作成することができるため、カラーコードへ埋め込む実際のデータ量を増加させることが可能となる。   The present invention makes it possible to improve the reading accuracy of a color code. In addition, since a color code can be created by error correction coding with little redundancy, the actual amount of data embedded in the color code can be increased.

ここでは、説明を簡単にするため、図1のR10のような4×4の二次元コードをカラー化したものについて説明する。各セルの座標は、図1のZ10のように定義する。   Here, in order to simplify the description, a colorized 4 × 4 two-dimensional code such as R10 in FIG. 1 will be described. The coordinates of each cell are defined as Z10 in FIG.

まず、このカラーコードにおいては、図2のように文字列、画像データなどの2進データをセルごとに割り当てる。ここでは、“http”と言う文字列を8ビットのASCIIコードで “01101000 01110100 01110100 01110000”と表し、このビット列を一つのセルに3ビットずつ割り当てた(マッピングをした)例を示している。すなわち、マッピングにおいて、同一のセルに、カラーコードによって表現する文字の文字コードに対応したコードデータから選定したビットを割り当てる。この結果、文字コードに対応したコードデータの各ビットが複数のセルに分散する。この例では、“h”を構成するビット“01101000”が、3つのセルに分散されている。   First, in this color code, binary data such as a character string and image data is assigned to each cell as shown in FIG. In this example, the character string “http” is represented as “01101000 01110100 01110100 01110000” by an 8-bit ASCII code, and this bit string is assigned to one cell by 3 bits (mapped). That is, in mapping, a bit selected from code data corresponding to a character code of a character expressed by a color code is assigned to the same cell. As a result, each bit of code data corresponding to the character code is distributed to a plurality of cells. In this example, the bits “01101000” constituting “h” are distributed in three cells.

カラーコードでは、各セルの色が、そのセルに割り当てられた3ビットに対応する色で表示される。例えば、3ビットと色との対応関係を規定するカラーコード変換表が図3のように定義されている場合は、セル(1,2)はシアン(C)、セル(1,3)は緑、セル(1,4)は黒、セル(2,1)は白、・・・で表示される。   In the color code, the color of each cell is displayed in a color corresponding to 3 bits assigned to the cell. For example, when a color code conversion table that defines the correspondence between 3 bits and colors is defined as shown in FIG. 3, cell (1,2) is cyan (C) and cell (1,3) is green The cell (1, 4) is displayed in black, the cell (2, 1) is displayed in white,.

本願発明のカラーコード作成方法では、このカラーコードの各セルにマッピングしたビットを、予め設定された反転パターンに従って変換し、各セルの色を変換後の3ビットに対応する色に設定する。また、カラーコードの読取り方法では、識別した各セルの色に対応するビットを求めた後、それを前記反転パターンに基づいて変換することにより、各セルに始めに割り当てられた3ビットを復元する。   In the color code creating method of the present invention, the bit mapped to each cell of the color code is converted in accordance with a preset inversion pattern, and the color of each cell is set to a color corresponding to the converted 3 bits. In the color code reading method, the bit corresponding to the color of each identified cell is obtained and then converted based on the inversion pattern to restore the 3 bits initially assigned to each cell. .

図4は、本発明の実施形態におけるカラーコード作成装置10の構成を示すブロック図である。   FIG. 4 is a block diagram showing a configuration of the color code creating apparatus 10 according to the embodiment of the present invention.

この装置10は、データ入力部11と、データを各セルにマッピングするマッピング部12と、反転パターン保持部14と、マッピングされたデータの反転処理を行う反転処理部13と、カラーコード変換表保持部16と、カラーコードを作成するカラーコード作成部15とを備えている。   The apparatus 10 includes a data input unit 11, a mapping unit 12 that maps data to each cell, an inversion pattern holding unit 14, an inversion processing unit 13 that performs inversion processing of the mapped data, and a color code conversion table holding A unit 16 and a color code creating unit 15 for creating a color code are provided.

データ入力部11には、カラーコードで表示すべきデータが入力し、データ入力部11は、そのデータのビット列をマッピング部12に出力する。マッピング部12は、このデータをカラーコードの各セルにマッピングする。図5のC20には、マッピング部12がマッピングした各セルのビットを示している。なお、座標(1,1)のセルは、反転パターン識別用セルとして使用するため、ここにはマッピングを行わない。   Data to be displayed with a color code is input to the data input unit 11, and the data input unit 11 outputs a bit string of the data to the mapping unit 12. The mapping unit 12 maps this data to each cell of the color code. C20 in FIG. 5 shows bits of each cell mapped by the mapping unit 12. Note that the cell at the coordinates (1, 1) is used as an inversion pattern identification cell, so no mapping is performed here.

反転パターン保持部14には、図6に示す反転パターンA(P01)、反転パターンB(P10)及び反転パターンC(P11)が保持されている。   The inversion pattern holding unit 14 holds the inversion pattern A (P01), the inversion pattern B (P10), and the inversion pattern C (P11) shown in FIG.

反転処理部13は、マッピング部12がマッピングした各セルのビットを、反転パターンA(P01)、反転パターンB(P10)及び反転パターンC(P11)の各々を使用して3通りに変換する。この変換処理は、マッピング部12でマッピングされたセルのビットが0の場合は、反転パターンの同じ位置におけるビットが0であれば0に、1であれば1に変換し、マッピング部12でマッピングされたビットが1の場合は、反転パターンの同じ位置のビットが0であれば1に、1であれば0に変換する。即ち、マッピング部12でマッピングされたビットと反転パターンの同位置のビットとの排他的論理和を算出することになる。   The inversion processing unit 13 converts the bits of each cell mapped by the mapping unit 12 into three types using each of the inversion pattern A (P01), the inversion pattern B (P10), and the inversion pattern C (P11). In this conversion process, when the bit of the cell mapped by the mapping unit 12 is 0, the bit is converted to 0 if the bit at the same position in the inversion pattern is 0, and to 1 if the bit is 1, and the mapping unit 12 performs mapping. When the bit is 1, it is converted to 1 if the bit at the same position in the inversion pattern is 0, and converted to 0 if it is 1. That is, the exclusive OR of the bit mapped by the mapping unit 12 and the bit at the same position of the inversion pattern is calculated.

図5には、マッピング部12でマッピングされたC20に対して、反転処理がされない場合(反転なし)をC00に示し、図6の反転パターンA(P01)を用いて反転したときの各セルのビットをC01に示し、図6の反転パターンB(P10)を用いて反転したときの各セルのビットをC10に示し、また、図6の反転パターンC(P11)を用いて反転したときの各セルのビットをC11に示している。   FIG. 5 shows a case where no inversion process is performed on C20 mapped by the mapping unit 12 (no inversion) in C00, and each cell when inverted using the inversion pattern A (P01) of FIG. The bit is indicated by C01, the bit of each cell when inverted using the inverted pattern B (P10) of FIG. 6 is indicated by C10, and each bit when inverted using the inverted pattern C (P11) of FIG. The bit of the cell is shown at C11.

このとき、反転なしの場合は、C20の座標(1,1)のセルに“反転なし”を表す“000”を埋め込む。また、反転パターンAを用いる場合は、C20の座標(1,1)のセルに“反転パターンA”を表す“001”を埋め込んだ後、反転パターンAを用いて反転処理を行う。同様に、反転パターンBを用いる場合は、C20の座標(1,1)のセルに“反転パターンB”を表す“010”を埋め込んだ後、反転パターンBを用いて反転処理を行い、反転パターンCを用いる場合は、C20の座標(1,1)のセルに“反転パターンC”を表す“011”を埋め込んだ後、反転パターンCを用いて反転処理を行う。   At this time, when there is no inversion, “000” representing “no inversion” is embedded in the cell of the coordinates (1, 1) of C20. Further, when the reverse pattern A is used, “001” representing the “reverse pattern A” is embedded in the cell of the coordinates (1, 1) of C20, and then the reverse process is performed using the reverse pattern A. Similarly, when using the inversion pattern B, after embedding “010” representing the “inversion pattern B” in the cell of the coordinates (1, 1) of C20, the inversion process is performed using the inversion pattern B, and the inversion pattern B When C is used, “011” representing “inverted pattern C” is embedded in a cell at coordinates (1, 1) of C20, and then inversion processing is performed using the inverted pattern C.

例えば、反転パターンAを用いる場合、座標(1,1)のセルに関しては、反転パターンAの値が“000”であるので、どのビットも反転せずに“001”となる。また、座標(1,2)のセルに関しては、反転パターンAの値が“100”であるので、C20の“111”の3ビット目だけを反転させて“011”となる。座標(2,1)のセルに関しては、反転パターンAの値が“001”であるので、C20の“111”の1ビット目だけを反転させて“110”となる。   For example, when the inversion pattern A is used, the value of the inversion pattern A is “000” for the cell at the coordinates (1, 1), so that no bits are inverted and “001”. For the cell at coordinates (1, 2), since the value of the inversion pattern A is “100”, only the third bit of “111” of C20 is inverted to become “011”. For the cell at coordinates (2, 1), since the value of the inversion pattern A is “001”, only the first bit of “111” of C20 is inverted to become “110”.

カラーコード作成部15は、反転処理部13がマッピングしたC00、C01、C10及びC11の各セルのビットに対応する色をカラーコード変換表16から求め、カラーコードを作成する。図7には、図3のカラーコード変換表に基づいて各セルの色を設定したカラーコードC00、C01、C10及びC11を、C20と共に示している。   The color code creation unit 15 obtains a color corresponding to the bit of each cell of C00, C01, C10, and C11 mapped by the inversion processing unit 13 from the color code conversion table 16, and creates a color code. FIG. 7 shows color codes C00, C01, C10, and C11 in which the color of each cell is set based on the color code conversion table of FIG. 3 together with C20.

ここで注目すべきは、C20のカラーコードの場合、色のバランスや配置を考慮せずに作成しているため、特定の色に偏ったカラーコードとなっているが、反転処理が行われたC01、C10、C11では、セルの色が適度に変化し、特定の色への偏りが見られない点である。そのため、反転処理したカラーコードを読取ることにより、読み取り精度の向上を図ることができる。   It should be noted here that in the case of the color code of C20, since it is created without considering the color balance and arrangement, the color code is biased to a specific color, but inversion processing was performed. In C01, C10, and C11, the color of a cell changes moderately, and the bias | inclination to a specific color is not seen. Therefore, reading accuracy can be improved by reading the color code that has been subjected to inversion processing.

図8は、本発明の実施形態におけるカラーコード読取り装置20の構成を示すブロック図である。   FIG. 8 is a block diagram showing the configuration of the color code reader 20 in the embodiment of the present invention.

この装置20は、カラーコード変換表保持部26と、カラーコードで表されたコードデータを読取るコードデータ読取部21と、反転パターン保持部24と、使用された反転パターンを識別する反転パターン識別部22と、読取られたコードデータの反転処理を行う反転処理部23と、コード解析部25とを備えている。これらの構成は、カメラ付き携帯電話等にカラーコード読取機能を持たせるために、付加されている。   The apparatus 20 includes a color code conversion table holding unit 26, a code data reading unit 21 that reads code data represented by a color code, an inversion pattern holding unit 24, and an inversion pattern identification unit that identifies a used inversion pattern. 22, an inversion processing unit 23 that performs inversion processing of the read code data, and a code analysis unit 25. These configurations are added to provide a camera-equipped mobile phone or the like with a color code reading function.

コードデータ読取部21は、ユーザが選択したカラーコードの各セルの色を識別し、その色を、カラーコード変換表に基づいて、コードデータに変換する。例えば、図7のC01のカラーコードが選択された場合、図3のカラーコード変換表を用いて、図5のC01のビットデータを生成する。   The code data reading unit 21 identifies the color of each cell of the color code selected by the user, and converts the color into code data based on the color code conversion table. For example, when the color code C01 in FIG. 7 is selected, the bit data C01 in FIG. 5 is generated using the color code conversion table in FIG.

反転パターン識別部22は、その(1,1)のセルのコードデータから、カラーコードの作成側がカラーコードの反転に用いた反転パターンを識別する。例えば、(1,1)のセルのコードデータが“001”であれば、図6の反転パターンA(P01)が使用されたものと識別する。   The reversal pattern identification unit 22 identifies the reversal pattern used by the color code creation side for reversing the color code from the code data of the (1, 1) cell. For example, if the code data of the (1, 1) cell is “001”, it is identified that the inversion pattern A (P01) in FIG. 6 is used.

反転処理部23は、反転パターン識別部22が識別した反転パターンを用いて、コードデータの反転処理を行う。この反転処理は、カラーコード作成装置10の反転処理部13における処理と同じであり、コードデータのビットが0の場合は、反転パターンの同位置におけるビットが0であれば0に、1であれば1に変換し、コードデータのビットが1の場合は、反転パターンの同位置のビットが0であれば1に、1であれば0に変換する。   The inversion processing unit 23 performs inversion processing of the code data using the inversion pattern identified by the inversion pattern identification unit 22. This inversion processing is the same as the processing in the inversion processing unit 13 of the color code creating apparatus 10. When the bit of the code data is 0, if the bit at the same position of the inversion pattern is 0, it is 0 or 1. If the bit of the code data is 1, it is converted to 1 if the bit at the same position of the inversion pattern is 0, and converted to 0 if it is 1.

そのため、座標(1,2)のセルの“011”は、反転パターンAの“100”によって“111”に変換され、座標(1,3)のセルの“111”は、反転パターンAの“000”によって“111”に変換され、座標(1,4)のセルの“010”は、反転パターンAの“100”によって “110”に変換され、こうして元のC20のコードデータが復元される。   Therefore, “011” of the cell at coordinates (1, 2) is converted to “111” by “100” of the inverted pattern A, and “111” of the cell at coordinates (1, 3) is converted to “ 000 ”is converted to“ 111 ”, and“ 010 ”of the cell at the coordinates (1, 4) is converted to“ 110 ”by“ 100 ”of the inversion pattern A, thus restoring the original C20 code data. .

コード解析部25は、このビット列のデータを元の文字列データや画像データ等に変換する。   The code analysis unit 25 converts the bit string data into original character string data, image data, or the like.

このように、このカラーコード読取り装置は、色の偏りがないカラーコードから、高い読取り精度でデータを読取ることができる。   As described above, this color code reader can read data with high reading accuracy from a color code having no color deviation.

図9のフロー図は、カラーコード作成装置の処理手順を示している。
カラーコードで表示すべきビット列のデータを入力し(F11 )、このデータをカラーコードの反転パターン識別用セル以外の各セルにマッピングする(F12 )。
The flowchart of FIG. 9 shows the processing procedure of the color code creation device.
Data of a bit string to be displayed with a color code is input (F11), and this data is mapped to each cell other than the color code inversion pattern identifying cell (F12).

次に、この反転パターン識別用セルに“反転なし”を示すコードを埋め込み、“反転なし”のカラーコードを作成する(F20 )。また、この反転パターン識別用セルに“反転パターンA”を示すコードを埋め込み(F21 )、反転パターンAによる反転処理を行ってカラーコードを作成する(F31 )。また、この反転パターン識別用セルに“反転パターンB”を示すコードを埋め込み(F22 )、反転パターンBによる反転処理を行ってカラーコードを作成する(F32 )。また、この反転パターン識別用セルに“反転パターンC”を示すコードを埋め込み(F23 )、反転パターンCによる反転処理を行ってカラーコードを作成する(F33 )。   Next, a code indicating “no inversion” is embedded in the inversion pattern identification cell to create a color code of “no inversion” (F20). Further, a code indicating “inverted pattern A” is embedded in the inversion pattern identification cell (F21), and an inversion process using the inversion pattern A is performed to create a color code (F31). Further, a code indicating “inverted pattern B” is embedded in the inverted pattern identification cell (F22), and an inversion process using the inverted pattern B is performed to create a color code (F32). Further, a code indicating “inverted pattern C” is embedded in the inversion pattern identification cell (F23), and an inversion process using the inverted pattern C is performed to create a color code (F33).

また、図10のフロー図は、カラーコード読取り装置の処理手順を示している。   Further, the flowchart of FIG. 10 shows a processing procedure of the color code reader.

カラーコードからコードデータを読み込み(S11)、使用された反転パターンを識別する(S12)。反転が行われていない場合は(S21でNo)、S11で取得したコードデータを解析して元のデータを得る(S31)。反転が行われている場合は(S21でYes)、“反転パターンA”が使用されているか否かを識別し(S22)、Yesのときは、反転パターンAによる反転処理を行って元のコードデータを復元し(S25)、そのコードデータを解析して元のデータを得る(S31)。S22がNoのときは、“反転パターンB”が使用されているか否かを識別し(S23)、Yesのときは、反転パターンBによる反転処理を行って元のコードデータを復元し(S26)、そのコードデータを解析して元のデータを得る(S31)。S23がNoのときは、“反転パターンC”が使用されているか否かを識別し(S24)、Yesのときは、反転パターンCによる反転処理を行って元のコードデータを復元し(S27)、そのコードデータを解析して元のデータを得る(S31)。   Code data is read from the color code (S11), and the inverted pattern used is identified (S12). When the inversion is not performed (No in S21), the code data acquired in S11 is analyzed to obtain the original data (S31). When the inversion is performed (Yes in S21), it is identified whether or not the “inversion pattern A” is used (S22). When the result is Yes, the inversion process by the inversion pattern A is performed to perform the original code. The data is restored (S25), and the code data is analyzed to obtain the original data (S31). When S22 is No, it is identified whether or not the “inverted pattern B” is used (S23). When Yes, the inversion process using the inverted pattern B is performed to restore the original code data (S26). The code data is analyzed to obtain the original data (S31). When S23 is No, it is identified whether or not the “inverted pattern C” is used (S24). When Yes, the inversion process using the inverted pattern C is performed to restore the original code data (S27). The code data is analyzed to obtain the original data (S31).

なお、ここでは、カラーコードの作成側が、複数通りの反転処理したカラーコードを作成し、カラーコード読取り側が、その中から選択した1つのカラーコードを読取る場合について説明したが、カラーコード作成側が、最適と思える1つの反転処理したカラーコードを作成し、カラーコード読取り側が、それを読取るようにしても良い。   Here, the case where the color code creation side creates a plurality of color codes that have been subjected to inversion processing, and the color code reading side reads one color code selected from them, but the color code creation side One reversal color code that seems to be optimal may be created, and the color code reader may read it.

また、ここでは、座標(1,1)のセルをパターン識別用セルとしているが、パターン識別用セルは、座標(1,1)以外のセルであっても良い。ただし、パターン識別用セルがどこであるかをカラーコードの読取り側は知っている必要があり、また、そのパターン識別用セルのビット反転パターンは、ビットを反転させないものか、カラーコードの読取り側で既知である必要がある。   Here, the cell at the coordinates (1, 1) is the pattern identification cell, but the pattern identification cell may be a cell other than the coordinates (1, 1). However, the color code reader needs to know where the pattern identification cell is located, and the bit inversion pattern of the pattern identification cell does not invert the bit. Must be known.

また、ここでは、4×4のセルから成るカラーコードについて説明したが、セル数が増えても同様に処理することができる。また、n×1のセルから成るカラーバーコードも同様に処理することができる。   Further, here, a color code composed of 4 × 4 cells has been described, but the same processing can be performed even if the number of cells increases. Further, a color barcode composed of n × 1 cells can be processed in the same manner.

また、ここでは、反転パターンがA、B、Cの3パターンの例を示したが、用いる反転パターンの数は、これより多くても少なくても良い。反転パターンを3ビットで識別する場合は、8(2の3乗)通りの反転パターンを使用することができる。   In addition, here, an example in which the inversion patterns are three patterns A, B, and C is shown, but the number of inversion patterns to be used may be more or less. When the inversion pattern is identified by 3 bits, 8 (2 to the 3rd power) inversion patterns can be used.

また、ここでは、カラーコードの1つのセルに3ビットを割り当てたが、その他のビット数を割り当てても良い。図11には、1つのセルに1文字のASCIIコード(8ビット)を割り当てる例を示している。また、途中で誤り訂正符号化が行われることもあるが、その場合でも同様に処理することができる。   Here, 3 bits are assigned to one cell of the color code, but other numbers of bits may be assigned. FIG. 11 shows an example in which one character ASCII code (8 bits) is assigned to one cell. Further, error correction coding may be performed in the middle, but even in that case, the same processing can be performed.

なお、図11のように1セルに1文字を割り当てる場合がある。すなわち、マッピングにおいて、同一のセルに、カラーコードによって表現する文字の文字コードに対応したコードデータの総てのビットが割り当てられる。この場合、1つのセルの多数のビットに誤りが及ぶようなバースト誤りの発生により、文字の復元ができなくなる場合がある。これは、誤り訂正符号では、バースト状の誤りの訂正が困難なためである。こうした事態は、マッピング前にランダムにビットインターリーブを行い、同一セルへの同一文字の割り当てを少なくし、同一セルに異なる文字のコードを分散させることで回避できる。こうすることで、バースト誤りはランダム誤りに変換され、誤り訂正符号による訂正が可能になる。   Note that one character may be assigned to one cell as shown in FIG. That is, in mapping, all bits of code data corresponding to the character code of the character expressed by the color code are assigned to the same cell. In this case, there is a case where the character cannot be restored due to the occurrence of a burst error in which an error reaches a large number of bits of one cell. This is because it is difficult to correct burst errors with an error correction code. Such a situation can be avoided by performing bit interleaving at random before mapping, reducing the allocation of the same character to the same cell, and distributing different character codes in the same cell. By doing so, the burst error is converted into a random error, and correction using an error correction code becomes possible.

以上、本発明の各種実施形態を説明したが、本発明は前記実施形態において示された事項に限定されず、明細書の記載、並びに周知の技術に基づいて、当業者がその変更・応用することも本発明の予定するところであり、保護を求める範囲に含まれる。   Although various embodiments of the present invention have been described above, the present invention is not limited to the matters shown in the above-described embodiments, and those skilled in the art can make modifications and applications based on the description and well-known techniques. This is also the scope of the present invention, and is included in the scope of seeking protection.

本発明は、2次元カラーコードやカラーバーコードなどが使用されている各分野において、それらのカラーコードの読取り精度を高めるために、広く利用することができる。   The present invention can be widely used in each field where a two-dimensional color code, a color barcode, and the like are used in order to improve the reading accuracy of those color codes.

本発明の実施形態におけるカラーコード座標割り当て例Example of color code coordinate assignment in the embodiment of the present invention 本発明の実施形態における文字列のマッピング例(3bit/セル)Example of character string mapping in the embodiment of the present invention (3 bits / cell) 本発明の実施形態におけるカラーコード変換表Color code conversion table according to an embodiment of the present invention 本発明の実施形態におけるカラーコード作成装置の構成を示すブロック図The block diagram which shows the structure of the color code production apparatus in embodiment of this invention. 本発明の実施形態におけるランダマイズ化の例Example of randomization in the embodiment of the present invention 本発明の実施形態における反転パターンを示す図The figure which shows the inversion pattern in embodiment of this invention 本発明の実施形態におけるランダマイズ化したカラーコードを示す図The figure which shows the color code randomized in embodiment of this invention 本発明の実施形態におけるカラーコード読取り装置の構成を示すブロック図The block diagram which shows the structure of the color code reader in embodiment of this invention 本発明の実施形態におけるカラーコード化の処理手順を示すフロー図The flowchart which shows the color coding processing procedure in the embodiment of the present invention 本発明の実施形態における読み出し時の処理手順を示すフロー図The flowchart which shows the process sequence at the time of reading in embodiment of this invention 本発明の実施形態における文字列のマッピング例(8bit/セル)Example of character string mapping in an embodiment of the present invention (8 bits / cell)

符号の説明Explanation of symbols

C00 反転なしの4×4カラーコード
C01 反転パターンAを用いた4×4カラーコード
C10 反転パターンBを用いた4×4カラーコード
C11 反転パターンCを用いた4×4カラーコード
C20 変換前の4×4カラーコード
10 カラーコード作成装置
11 データ入力部
12 マッピング部
13 反転処理部
14 反転パターン保持部
15 カラーコード作成部
16 カラーコード変換表保持部
20 カラーコード読取り装置
21 コードデータ読取部
22 反転パターン識別部
23 反転処理部
24 反転パターン保持部
25 コード解析部
26 カラーコード変換表保持部
C00 4 × 4 color code C01 without inversion 4 × 4 color code C10 with inversion pattern A 4 × 4 color code C11 with inversion pattern B 4 × 4 color code C20 with inversion pattern C 4 before conversion × 4 color code 10 color code creation device 11 data input unit 12 mapping unit 13 inversion processing unit 14 inversion pattern holding unit 15 color code creation unit 16 color code conversion table holding unit 20 color code reading device 21 code data reading unit 22 inversion pattern Identification unit 23 Inversion processing unit 24 Inversion pattern holding unit 25 Code analysis unit 26 Color code conversion table holding unit

Claims (10)

カラーコードの構成単位であるセルの各々にコードデータを割り当てるマッピングステップと、
前記セルに割り当てたコードデータを、各データの反転または非反転を定義したビット反転パターンに基づいて変換する変換ステップと、
前記セルの各々を、当該セルの変換後のコードデータに対応する色で表示するカラー化ステップと、
を有するカラーコード作成方法。
A mapping step for assigning code data to each of the cells that are the constituent units of the color code;
A conversion step of converting the code data assigned to the cell based on a bit inversion pattern defining inversion or non-inversion of each data;
A colorizing step of displaying each of the cells in a color corresponding to the code data after conversion of the cell;
A method for creating a color code.
請求項1に記載のカラーコード作成方法であって、
前記マッピングステップにおいて、前記ビット反転パターンの種類を表示する識別用セル以外の前記セルに前記コードデータを割り当て、
前記変換ステップにおいて、前記識別用セルに、変換に用いた前記ビット反転パターンの識別コードを設定するカラーコード作成方法。
The color code creating method according to claim 1,
In the mapping step, the code data is assigned to the cells other than the identification cell that displays the type of the bit inversion pattern,
A color code generation method in which, in the conversion step, an identification code of the bit inversion pattern used for conversion is set in the identification cell.
請求項1または2に記載のカラーコード作成方法であって、
前記変換ステップにおいて、前記セルに割り当てた前記コードデータを複数の前記ビット反転パターンに基づいて複数通りに変換し、前記カラー化ステップを経て複数のカラーコードを作成するカラーコード作成方法。
The color code creating method according to claim 1 or 2,
In the conversion step, the code data assigned to the cell is converted in a plurality of ways based on the plurality of bit inversion patterns, and a plurality of color codes are generated through the colorization step.
請求項1ないし3のいずれか1項に記載のカラーコード作成方法であって、
前記マッピングステップにおいて、同一の前記セルに、カラーコードによって表現する文字の文字コードに対応した前記コードデータから選定したビットを割り当て、前記文字コードに対応した前記コードデータの各ビットが複数のセルに分散するように設定するカラーコード作成方法。
The color code creating method according to any one of claims 1 to 3,
In the mapping step, a bit selected from the code data corresponding to a character code of a character represented by a color code is assigned to the same cell, and each bit of the code data corresponding to the character code is assigned to a plurality of cells. Color code creation method set to be distributed.
請求項1ないし3のいずれか1項に記載のカラーコード作成方法であって、
前記マッピングステップにおいて、同一の前記セルに、カラーコードによって表現する文字の文字コードに対応した前記コードデータの総てのビットを割り当てるカラーコード作成方法。
The color code creating method according to any one of claims 1 to 3,
In the mapping step, a color code creation method in which all bits of the code data corresponding to a character code of a character expressed by a color code are assigned to the same cell.
請求項5に記載のカラーコード作成方法であって、
前記マッピングステップの前に前記コードデータのビットインターリーブを行うカラーコード作成方法。
The color code creating method according to claim 5,
A color code generation method for performing bit interleaving of the code data before the mapping step.
請求項1ないし6のいずれか1項に記載のカラーコード作成方法であって、
前記変換ステップにおいて、前記コードデータのビットと前記ビット反転パターンのビットの排他的論理和を算出するカラーコード作成方法。
The color code creation method according to any one of claims 1 to 6,
A color code generation method for calculating an exclusive OR of a bit of the code data and a bit of the bit inversion pattern in the conversion step.
カラーコードから、カラーコードの構成単位であるセルの各々に割り当てられたコードデータを読み込むステップと、
前記セルに割り当てられたコードデータをカラーコード作成時に使用された、各データの反転または非反転を定義したビット反転パターンに基づいて変換する変換ステップと、
変換されたコードデータからカラーコードで表された情報を復元するコード解析ステップと、
を有するカラーコード読取り方法。
Reading from the color code code data assigned to each of the cells that are the constituent units of the color code;
A conversion step for converting the code data assigned to the cell based on a bit inversion pattern that defines the inversion or non-inversion of each data used when creating the color code;
A code analysis step for restoring information represented by a color code from the converted code data;
A color code reading method comprising:
入力されたコードデータを、カラーコードの構成単位であるセルの各々に割り当てるマッピング部と、
各データの反転または非反転を定義したビット反転パターンを保持するビット反転パターン保持部と、
前記セルに割り当てた前記コードデータを前記ビット反転パターンに基づいて変換する反転処理部と、
前記セルの各々を、当該セルの変換後のコードデータに対応する色で表示するカラーコード作成部と、
を備えるカラーコード作成装置。
A mapping unit that assigns the input code data to each of the cells that are the constituent units of the color code;
A bit inversion pattern holding unit for holding a bit inversion pattern defining inversion or non-inversion of each data;
An inversion processing unit for converting the code data assigned to the cell based on the bit inversion pattern;
A color code creating unit for displaying each of the cells in a color corresponding to the code data after the conversion of the cell;
A color code creation device comprising:
カラーコードから、カラーコードの構成単位であるセルの各々に割り当てられたコードデータを読み込むコードデータ読み込み部と、
各データの反転または非反転を定義したビット反転パターンを保持するビット反転パターン保持部と、
前記セルに割り当てられたコードデータをカラーコード作成時に使用された前記ビット反転パターンに基づいて変換する反転処理部と、
変換されたコードデータからカラーコードで表された情報を復元するコード解析部と、
を備えるカラーコード読取り装置。
A code data reading unit that reads code data assigned to each cell that is a unit of color code from a color code;
A bit inversion pattern holding unit for holding a bit inversion pattern defining inversion or non-inversion of each data;
An inversion processing unit that converts code data assigned to the cell based on the bit inversion pattern used when creating a color code;
A code analysis unit that restores the information represented by the color code from the converted code data;
A color code reader comprising:
JP2005151277A 2005-05-24 2005-05-24 Method and device for preparing and reading color code Withdrawn JP2006330930A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005151277A JP2006330930A (en) 2005-05-24 2005-05-24 Method and device for preparing and reading color code

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005151277A JP2006330930A (en) 2005-05-24 2005-05-24 Method and device for preparing and reading color code

Publications (1)

Publication Number Publication Date
JP2006330930A true JP2006330930A (en) 2006-12-07

Family

ID=37552578

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005151277A Withdrawn JP2006330930A (en) 2005-05-24 2005-05-24 Method and device for preparing and reading color code

Country Status (1)

Country Link
JP (1) JP2006330930A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009200953A (en) * 2008-02-22 2009-09-03 Ricoh Co Ltd Image forming apparatus, image reader, image forming method, image reading method, image forming program, and image reading program
JP2011076587A (en) * 2010-04-14 2011-04-14 Hiroyuki Endo Two-dimensional code, two-dimensional code reader, and program
US8714456B2 (en) 2009-09-30 2014-05-06 Shift Co. Ltd. Two-dimensional code, two-dimensional code reader, and program

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009200953A (en) * 2008-02-22 2009-09-03 Ricoh Co Ltd Image forming apparatus, image reader, image forming method, image reading method, image forming program, and image reading program
US8714456B2 (en) 2009-09-30 2014-05-06 Shift Co. Ltd. Two-dimensional code, two-dimensional code reader, and program
JP2011076587A (en) * 2010-04-14 2011-04-14 Hiroyuki Endo Two-dimensional code, two-dimensional code reader, and program

Similar Documents

Publication Publication Date Title
US6786412B2 (en) Two-dimensional code reading method, two-dimensional code reading program, recording medium with two-dimensional code reading program, two-dimensional code reading device, digital camera and portable terminal with digital camera
JP5321352B2 (en) Two-dimensional code generation apparatus, image forming system, two-dimensional code reading apparatus, computer program, and medium
JP4755415B2 (en) Color two-dimensional code
EP2948900B1 (en) Modifying data-bearing images
JPWO2007010650A1 (en) Hierarchical two-dimensional code, method for producing the same, and method for reading the same
JP2007317184A (en) Two-dimensional bar code, and encoding and decoding method thereof
US20130215473A1 (en) System and method for creating machine-readable codes in combination with other images such as logos
JP6600905B2 (en) Two-dimensional code, multi-valued two-dimensional code, and two-dimensional code generation method
JP2010103681A (en) Image processing device and method
JP6061075B2 (en) Two-dimensional code, two-dimensional code generation method, and two-dimensional code reading method
JPWO2009144794A1 (en) Information code
JP2016201061A (en) Two-dimensional code, and reading method for two-dimensional code
JP5288691B2 (en) Two-dimensional code reading program
JP2003178277A (en) Two-dimensional code, two-dimensional code making method, two-dimensional code decoding method, device for executing these methods, program for executing these methods by computer and computer readable recording medium for recording its program
JP2015154363A (en) Image processing device, image processing method and image formation device
Melgar et al. A high density colored 2D-barcode: CQR Code-9
JP2006330930A (en) Method and device for preparing and reading color code
JP2008052587A (en) Program, information storage medium, two-dimensional code generation system and two-dimensional code
JP2008011202A (en) Film grain processing circuit
JP2003091697A (en) Two-dimensional code system and method for the same
JP6099258B2 (en) Optical code and method for generating the optical code
JP2007306513A (en) Method and device for image data compression
JP2005208843A (en) Information encoding/decoding method, device and code indicator
JP2006100977A (en) Printing system and printer
CN114021595A (en) Two-dimensional code identification method and device

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20080805