JP5145833B2 - Two-dimensional code reading device, two-dimensional code reading method, two-dimensional code reading program, and recording medium - Google Patents

Two-dimensional code reading device, two-dimensional code reading method, two-dimensional code reading program, and recording medium Download PDF

Info

Publication number
JP5145833B2
JP5145833B2 JP2007236688A JP2007236688A JP5145833B2 JP 5145833 B2 JP5145833 B2 JP 5145833B2 JP 2007236688 A JP2007236688 A JP 2007236688A JP 2007236688 A JP2007236688 A JP 2007236688A JP 5145833 B2 JP5145833 B2 JP 5145833B2
Authority
JP
Japan
Prior art keywords
pattern
dimensional code
black
condition
white
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.)
Expired - Fee Related
Application number
JP2007236688A
Other languages
Japanese (ja)
Other versions
JP2009070061A (en
Inventor
禎郎 高橋
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.)
Ricoh Co Ltd
Original Assignee
Ricoh 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 Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP2007236688A priority Critical patent/JP5145833B2/en
Publication of JP2009070061A publication Critical patent/JP2009070061A/en
Application granted granted Critical
Publication of JP5145833B2 publication Critical patent/JP5145833B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、2次元コード読み取り装置、2次元コード読み取り方法、2次元コード読み取りプログラム及び記録媒体に関し、特に多値で入力した画像を二値化してデコードする際、デコード失敗した場合にコード内の白黒画素の割合に応じて二値化パラメータを変更して再度適正な画像の二値化した上でデコードを行う2次元コード読み取り装置、2次元コード読み取り方法、2次元コード読み取りプログラム及び記録媒体に関する。   The present invention relates to a two-dimensional code reading device, a two-dimensional code reading method, a two-dimensional code reading program, and a recording medium. In particular, when a multi-valued input image is binarized and decoded, The present invention relates to a two-dimensional code reading apparatus, a two-dimensional code reading method, a two-dimensional code reading program, and a recording medium that perform decoding after changing binarization parameters according to the ratio of monochrome pixels and binarizing an appropriate image again .

従来、スキャナ入力された二値画像に対し、デコードを実行する文書処理システム、文書処理方法、文書処理プログラムが提案されている(例えば特許文献1参照)。スキャナで入力された印刷文書はスキャナが有する単一二値化閾値で二値化する機能を利用して画像を二値化し、取得した二値画像に対してデコード処理を一回のみ行っている。   Conventionally, a document processing system, a document processing method, and a document processing program for decoding a binary image input by a scanner have been proposed (see, for example, Patent Document 1). The printed document input by the scanner is binarized using the binary binarization function of the scanner, and the obtained binary image is decoded only once. .

また、二値化に関連する技術として、画像二値化装置、画像撮像装置等が提案されている(例えば特許文献2参照)。文字背景の色や輝度に応じて二値化の閾値を局所的に変更して文書の二値化を適正に行うものであり、これにより光源などの入力条件が一定のスキャナだけでなく様々な光源下で一定しない撮影環境の中でデジタルカメラを用いて文書撮影を行ってもその上の文字やバーコード、2次元コードを正しく二値化できる。   Further, as a technique related to binarization, an image binarization apparatus, an image imaging apparatus, and the like have been proposed (see, for example, Patent Document 2). The binarization threshold value is locally changed according to the color and brightness of the character background to properly binarize the document. This allows various input conditions such as a light source as well as various scanners. Even if a document is photographed using a digital camera in a non-constant photographing environment under a light source, characters, barcodes, and two-dimensional codes on the document can be correctly binarized.

以上のような技術を用いればデジタルカメラで撮影した画像を二値化し、2次元コードのデコードを行うことが容易になる。
特開2005−122682号公報 特開2001−008032号公報
By using the technique as described above, it becomes easy to binarize an image captured by a digital camera and decode a two-dimensional code.
JP 2005-122682 A JP 2001-008032 A

しかしながら、上記のような技術には、以下の問題点がある。紙文書に2次元コードを印刷するためには2次元コードをラベルプリンタなどのバーコード専用プリンタで印刷するのではなく、電子写真プリンタ、インクジェットプリンタなどの汎用のプリンタを用いて印刷することが通常になる。電子写真プリンタはカーボンブラックを用いたトナーを利用して文書の文字を美しく印刷することに開発が注がれてきた。その結果、文字のかすれなどを嫌うがために細線を太めに印字するなどの工夫を行ってきた。そのため2次元コード、バーコードを印刷すると黒の部分が拡張されてしまう欠点がある。   However, the above techniques have the following problems. In order to print a two-dimensional code on a paper document, the two-dimensional code is usually printed by using a general-purpose printer such as an electrophotographic printer or an inkjet printer, instead of printing by a bar code printer such as a label printer. become. Development of electrophotographic printers has been focused on beautifully printing document text using toner using carbon black. As a result, in order to dislike the fading of characters, etc., we have devised measures such as printing thin lines thickly. For this reason, there is a disadvantage that the black portion is expanded when a two-dimensional code or barcode is printed.

また、インクジェットプリンタにおいては、インクの着弾場所が狙ったところに行かずにインクが白黒境界付近で飛散したり、紙に浸透してインクがにじんだり、あるいは顔料インク、染料インク等の濃度の違うインクが使われたり、印刷モードにも高画質モードやドラフトモードでは使用インク量が異なってモード間でかなりの印字濃度の差があったりする。すなわち、2次元コードやバーコードを同じ紙ではあっても異なる印刷条件で印刷し、同じ条件で画像入力し、同じパラメータで画像二値化を行っても出力される二値画像は黒が拡張されて黒潰れしているもの、コードの黒の部分に白画素が混じったり、黒領域の面積が少なくなっていたりする。そのため、2次元コードやバーコードのデコードを行っても正しくデコードできるとは限らない。   In addition, in an ink jet printer, the ink does not go to the target location and the ink scatters near the black-and-white boundary, or the ink penetrates into the paper and the ink spreads, or the concentration of pigment ink, dye ink, etc. differs. Ink is used, and in the high-quality mode and draft mode, the amount of ink used is different and there is a considerable difference in print density between modes. In other words, even if the two-dimensional code or bar code is printed on the same paper under different printing conditions, the image is input under the same conditions, and the binary image that is output even if the image binarization is performed with the same parameters is expanded in black As a result, white pixels are mixed in the black portion of the code, or the area of the black region is reduced. For this reason, even when a two-dimensional code or barcode is decoded, it cannot always be correctly decoded.

本発明はこのような状況に鑑みてなされたものであり、2次元コードのデコード失敗の場合に黒画素と白画素の比率を算出し、それを基に二値化パラメータを調整し、再度画像二値化を行って適切にデコードできる二値画像を生成し、デコード処理を実行することを目的とする。   The present invention has been made in view of such a situation. In the case of decoding failure of a two-dimensional code, the ratio of black pixels to white pixels is calculated, and binarization parameters are adjusted based on the ratio, and the image is again displayed. An object of the present invention is to generate a binary image that can be appropriately decoded by performing binarization, and to execute a decoding process.

上記目的を達成するために、本発明は、第1の態様として、
複数の白および黒の四角形のセルの一部を固有パターンとして有する2次元コードの領域を含む多値画像を、次式
Cb=x/16
ただし、Cb:乗算係数
x:整数、1≦x≦15
に基づいて二値化して、二値画像を出力する画像二値化手段と、
前記二値画像から前記2次元コードの領域を検出する2次元コード検出手段と、
前記2次元コード領域から固有パターンを検出する固有パターン検出手段と、
記2次元コードをデコードするデコード手段と、を有し、
前記固有パターン検出手段は、前記固有パターンを構成する黒若しくは白のパターンのうち、一方のパターンを構成するセルが、予め定めたパターンを構成するセルと全て一致していることを条件とする第1の条件と、他方のパターンの一致度が予め定めた一致度を満たすことを条件とする第2の条件と、を判定する判定手段を備え、
前記二値化手段は、
黒のパターンの一致度が前記第1の条件を満たし、白パターンの一致度が前記第2の条件を満たさない場合は、白パターンの一致度が前記第2の条件を満たすよう前記多値画像を再度二値化し、また、
白のパターンの一致度が前記第1の条件を満たし、黒パターンの一致度が前記第2の条件を満たさない場合は、黒パターンの一致度が前記第2の条件を満たすよう前記多値画像を再度二値化し、
記再度二値化した二値画像から前記固有パターンを検出し、前記デコード手段で前記2次元コードをデコードすることを特徴とする2次元コード読み取り装置を提供する
In order to achieve the above object, the present invention provides a first aspect as follows:
The multi-valued image including the region of the two-dimensional code having a portion of the cell Le plurality of white and black squares as a unique pattern, the following equation
Cb = x / 16
Where Cb: multiplication factor
x: integer, 1 ≦ x ≦ 15
An image binarization means binarizes and outputs the binary image based on,
Two-dimensional code detection means for detecting a region of the two-dimensional code from the binary image;
A unique pattern detecting means for detecting a unique pattern from the region of the two-dimensional code;
A decoding means for decoding the pre-SL 2-dimensional code, a,
The unique pattern detection means, among the unique pattern of black or white constituting the pattern, the cells constituting one pattern, with the proviso that match all the cells constituting the predetermined pattern Determining means for determining a condition of 1 and a second condition on the condition that a matching degree of the other pattern satisfies a predetermined matching degree;
The binarization means includes
Meet black pattern matching score of the first condition, if the match degree of the white pattern does not satisfy the second condition, the degree of matching of the white pattern to the second condition is satisfied Re-binarize multi-valued image,
Coincidence of the white pattern satisfies the first condition, when the degree of matching of the black pattern does not satisfy the second condition, the degree of matching of the black pattern to the second condition is satisfied Binarize the multi-valued image again,
It detects the leading SL again binarizing the binary image or al the unique pattern, to provide a two-dimensional code reading apparatus characterized by decoding the two-dimensional code in the decoding means.

上記目的を達成するために、本発明は、第2の態様として、
複数の白および黒の四角形のセルの一部を固有パターンとして有する2次元コードの領域を含む多値画像を、次式
Cb=x/16
ただし、Cb:乗算係数
x:整数、1≦x≦15
に基づいて二値化して、二値画像を出力する画像二値化ステップと、
前記二値画像から前記2次元コードの領域を検出する2次元コード検出ステップと、
前記2次元コードの領域から固有パターンを検出する固有パターン検出ステップと、
前記2次元コードをデコードするデコードステップと、を有し、
前記固有パターン検出ステップは、前記固有パターンを構成する黒若しくは白のパターンのうち、一方のパターンを構成するセルが、予め定めたパターンを構成するセルと全て一致していることを条件とする第1の条件と、他方のパターンの一致度が予め定めた一致度を満たすことを条件とする第2の条件と、を判定する判定ステップを備え、
前記二値化ステップは、
黒のパターンの一致度が前記第1の条件を満たし、白のパターンの一致度が前記第2の条件を満たさない場合は、白のパターンの一致度が前記第2の条件を満たすように前記多値画像を再度二値化し、また、
白のパターンの一致度が前記第1の条件を満たし、黒のパターンの一致度が前記第2の条件を満たさない場合は、黒のパターンの一致度が前記第2の条件を満たすように前記多値画像を再度二値化し、
前記再度二値化した二値画像から前記固有パターンを検出し、前記デコードステップで前記2次元コードをデコードすることを特徴とする2次元コード読み取り方法を提供する
In order to achieve the above object, the present invention provides a second aspect,
A multi-valued image including a two-dimensional code region having a part of a plurality of white and black rectangular cells as a unique pattern is expressed by the following formula:
Cb = x / 16
Where Cb: multiplication factor
x: integer, 1 ≦ x ≦ 15
An image binarization step for binarizing based on the output and outputting a binary image;
A two-dimensional code detection step of detecting a region of the two-dimensional code from the binary image;
A unique pattern detecting step for detecting a unique pattern from the region of the two-dimensional code;
And a decoding step for decoding the two-dimensional code,
The unique pattern detecting step is performed on the condition that, of the black or white patterns constituting the unique pattern, the cells constituting one pattern coincide with all the cells constituting the predetermined pattern. A determination step of determining a condition of 1 and a second condition on the condition that a matching degree of the other pattern satisfies a predetermined matching degree;
The binarization step includes
When the matching degree of the black pattern satisfies the first condition and the matching degree of the white pattern does not satisfy the second condition, the matching degree of the white pattern satisfies the second condition. Re-binarize multi-valued image,
When the matching degree of the white pattern satisfies the first condition and the matching degree of the black pattern does not satisfy the second condition, the matching degree of the black pattern satisfies the second condition. Binarize the multi-valued image again,
A two-dimensional code reading method is provided, wherein the unique pattern is detected from the binarized binary image again, and the two-dimensional code is decoded in the decoding step .

上記目的を達成するために、本発明は、第3の態様として、上記第2の態様における2次元コード読み取り方法をコンピュータに実行させることを特徴とする2次元コード読み取りプログラムを提供する
また、第4の態様として、上記第3の態様におけるプログラムを記録したことを特徴とするコンピュータ読み取り可能な記録媒体を提供する。
In order to achieve the above object, the present invention provides, as a third aspect, a two-dimensional code reading program characterized by causing a computer to execute the two-dimensional code reading method according to the second aspect .
As a fourth aspect, there is provided a computer-readable recording medium in which the program according to the third aspect is recorded.

本発明によれば、2次元コードのデコード失敗の場合に黒画素と白画素の比率を算出し、それを基に二値化パラメータを調整し、再度画像二値化を行って適切にデコードできる二値画像を生成し、デコード処理を実行することが出来る。   According to the present invention, when the decoding of the two-dimensional code fails, the ratio of the black pixel and the white pixel is calculated, the binarization parameter is adjusted based on the ratio, and the image binarization is performed again, so that it can be decoded appropriately. A binary image can be generated and a decoding process can be executed.

以下に、本発明の実施形態について図面を用いて詳細に説明する。なお、以下に述べる実施形態は、本発明の好適な実施形態であるから、技術的に好ましい種々の限定が付されているが、本発明の範囲は、以下の説明において特に本発明を限定する旨の記載がない限り、これらの態様に限られるものではない。   Embodiments of the present invention will be described below in detail with reference to the drawings. The embodiments described below are preferred embodiments of the present invention, and thus various technically preferable limitations are given. However, the scope of the present invention is particularly limited in the following description. As long as there is no description of the effect, it is not restricted to these aspects.

まず、本実施形態で用いる「2次元コード」について以下説明する。この2次元コードの基本は矩形であるが、斜め前方からのカメラを用いた読み取りにも高い読み取り性能を維持するため、そのような場合には2次元コードを台形に変形させる(後述する座標変換)ことも可能である。   First, the “two-dimensional code” used in the present embodiment will be described below. The basic of this two-dimensional code is a rectangle, but in order to maintain high reading performance even when reading using a camera from diagonally forward, in such a case, the two-dimensional code is transformed into a trapezoid (coordinate conversion described later). It is also possible.

[2次元コードの外観]
2次元コードの原型となる矩形コードを図1に示す。斜め方向からの読み取りによるコード画像劣化を防ぐために、コードの高さを低く抑えコードのセル配置数を12x7の横長とする。セルとは、白黒の矩形の最小単位で、一つのセルが1ビットを表す。白が0、黒が1に対応する。この12x7セルにデータ7バイト(56ビット)、誤り訂正データ2バイト(16ビット)、コードの識別パターン12ビットを埋め込む。そして12x7のセルを取り囲むようにセルと同じ大きさの黒枠で囲む。
[Appearance of 2D code]
A rectangular code as a prototype of the two-dimensional code is shown in FIG. In order to prevent deterioration of the code image due to reading from an oblique direction, the code height is kept low and the number of code cell arrangements is set to 12 × 7 horizontally long. A cell is the smallest unit of a black and white rectangle, and one cell represents one bit. White corresponds to 0 and black corresponds to 1. In this 12 × 7 cell, 7 bytes (56 bits) of data, 2 bytes (16 bits) of error correction data, and 12 bits of code identification pattern are embedded. A 12 × 7 cell is surrounded by a black frame having the same size as the cell.

このコードに座標変換を行って台形変形させると図2のようになる。このコードを斜めからカメラで読み取ると図1に示したコード画像に近いほぼ長方形のコード画像を得ることができる。   If this code is transformed into a trapezoid by performing coordinate transformation, it becomes as shown in FIG. When this code is read with a camera obliquely, a substantially rectangular code image close to the code image shown in FIG. 1 can be obtained.

[クワイエットゾーン]
クワイエットゾーンは2次元コードの黒枠を囲む外接矩形の外側に設けられる余白領域であり、確実に読み取るために必要な領域である。クワイエットゾーンは最大セル長以上でかつ1mm以上であることが望ましい。
[Quiet Zone]
The quiet zone is a blank area provided outside the circumscribed rectangle surrounding the black frame of the two-dimensional code, and is an area necessary for reliable reading. It is desirable that the quiet zone is not less than the maximum cell length and not less than 1 mm.

[コード識別パターン]
コードの識別パターン(「固有パターン」とも称す)はセル配列の最上行に配置された12個のセルの並びで判定する。セルの並びは左から「白白黒黒白白黒黒白白黒黒」であり、印刷品質や読み取り品質が低くてもコードであることを判定できるように白と黒が二つずつ並んだパターンを採用している(図3、図4参照)。
[Code identification pattern]
The code identification pattern (also referred to as “unique pattern”) is determined by the arrangement of 12 cells arranged in the uppermost row of the cell array. The cells are arranged from left to right, “white black-and-white black white black-and-white black-white black-and-white”. Adopting a pattern of two white and black lines so that the code can be determined even if the print quality and reading quality are low. (See FIGS. 3 and 4).

[コードの大きさ]
コードの大きさはセルの大きさを決定することで決まる。一般的な応用におけるクワイエットゾーンを含めないコードの最小の大きさは、コードを読み取る解像度を300dpiとし、読み取った画像において各セル一辺が4画素を含むとして、上底下底ともに5mm、高さは3mmとなる。
[Cord size]
The code size is determined by determining the cell size. In a general application, the minimum size of a code that does not include a quiet zone is that the resolution for reading the code is 300 dpi, and each read cell contains 4 pixels on each side. It becomes.

[誤り訂正]
2次元コードに使用する誤り訂正方式はリードソロモン方式である。データ7バイトに対して、2バイトの誤り訂正用データを付加する。誤り訂正できるバイト数は1である。
[Error correction]
The error correction method used for the two-dimensional code is the Reed-Solomon method. 2-byte error correction data is added to 7 bytes of data. The number of bytes that can be error-corrected is one.

[データ配置]
上記のようにデータを7バイト、誤り訂正用データを2バイトとして、計9バイトのデータに加え、12ビットのコード識別パターンをコードに配置する。斜め前方からコードを読む構成となっているため、コードの高さを低く抑えてコードのセル配置数を12x7の横長とする。各セルへのデータの配置位置を図3に示す。図3は各セルへのデータのバイト単位の配置を示している。データの各バイトを(s1〜s7)、誤り訂正符号の各バイトを(r1〜r2)とする。また、最上行の白2セル、黒2セルの並びはコードを識別するための識別パターン(固有パターンとも称す)である。図4は各データのビット単位での配置を示す。数字の0がMSB、7がLSBを表す。
[Data arrangement]
As described above, data is 7 bytes, error correction data is 2 bytes, and in addition to a total of 9 bytes of data, a 12-bit code identification pattern is arranged in the code. Since the code is read obliquely from the front, the height of the code is kept low, and the number of code cell arrangements is set to 12 × 7 horizontally long. The arrangement position of data in each cell is shown in FIG. FIG. 3 shows the arrangement of data in bytes in each cell. Each byte of data is (s 1 to s 7 ), and each byte of the error correction code is (r 1 to r 2 ). The arrangement of white 2 cells and black 2 cells in the top row is an identification pattern (also referred to as a unique pattern) for identifying a code. FIG. 4 shows the arrangement of each data in bit units. The number 0 represents MSB and 7 represents LSB.

次に、台形を作成するためのエンコード(Encode:符号化)手順について説明する。
[エンコード手順の概要]
入力データを2次元コードに変換する際に要求される手順の概要は以下の通りである。
手順1・・・入力データのマスキング
入力データを7バイトのバイナリ形式に変換し、各バイトと0x96(16進表記)とで排他的OR演算を行う。
手順2・・・誤り訂正符号の生成
マスキングを行ったデータに誤り訂正符号を付加する。
手順3・・・矩形コードの生成
誤り訂正符号が付加された入力データを矩形コードに配置する。
手順4・・・矩形コードの台形化
矩形コードを台形に変形させる。
Next, an encoding (Encode) procedure for creating a trapezoid will be described.
[Outline of encoding procedure]
An outline of procedures required when converting input data into a two-dimensional code is as follows.
Procedure 1: Input data masking Input data is converted into a 7-byte binary format, and an exclusive OR operation is performed on each byte and 0x96 (hexadecimal notation).
Procedure 2 ... Generation of error correction code An error correction code is added to the masked data.
Step 3 ... Generation of rectangular code Input data to which an error correction code is added is arranged in the rectangular code.
Step 4 ... Converting the rectangular code to a trapezoid Transform the rectangular code into a trapezoid.

[入力データのマスキング](図5 ステップS1)
データ形式が整数値文字列の場合は7バイトの整数型データに変換する。データ形式が文字やバイナリの場合はそのまま使用する。データ形式の変換後、エンコードすべきデータの各バイトに対して0x96(16進表記)の値で排他的OR演算を行う。
[Masking of input data] (step S1 in FIG. 5)
When the data format is an integer value character string, it is converted to 7-byte integer type data. If the data format is character or binary, use it as is. After the data format conversion, an exclusive OR operation is performed on each byte of the data to be encoded with a value of 0x96 (hexadecimal notation).

[誤り訂正符号の生成](ステップS2、S3)
次にリードソロモン符号を使用して誤り訂正符号の生成を行う。排他的OR演算を行った7バイトデータ(s1〜s7)の各バイト値を係数とした多項式S(x) = s18+ s27 + s36 + s45 + s54 + s63 + s72を生成し、生成多項式G(x) = (x−α)(x−α2)で除算する。実際に使用する生成多項式はG(x) = x2 + 6x + 8である。除算して得られた剰余多項式R(x) = r1x + r2の係数(r1、 r2)が誤り訂正符号となる。ここで、αはGF(28)上の原始要素2の根であり、演算はすべてGF(28)上で行われる。誤り訂正能力は1バイトである。
[Generation of Error Correcting Code] (Steps S2 and S3)
Next, an error correction code is generated using a Reed-Solomon code. Polynomial S (x) = s 1 x 8 + s 2 x 7 + s 3 x 6 + s 4 x 5 with each byte value of 7-byte data (s 1 to s 7 ) subjected to exclusive OR operation as a coefficient + S 5 x 4 + s 6 x 3 + s 7 x 2 is generated and divided by a generator polynomial G (x) = (x−α) (x−α 2 ). The generator polynomial actually used is G (x) = x 2 + 6x +8. The coefficients (r 1 , r 2 ) of the remainder polynomial R (x) = r 1 x + r 2 obtained by the division are error correction codes. Here, α is the root of the primitive element 2 on GF (2 8 ), and all operations are performed on GF (2 8 ). The error correction capability is 1 byte.

[矩形コードの生成](ステップS4)
図3に示したとおり、s1〜s7、r1、r2の各ビットをコードにマッピングする。図4は各データのビット単位での配置を示し、数字の0がMSB、7がLSBを表す。各データのビット1を黒セルに、ビット0を白セルに割り当てる。
[Generation of Rectangle Code] (Step S4)
As shown in FIG. 3, each bit of s1 to s7, r1, and r2 is mapped to a code. FIG. 4 shows the arrangement of each data in bit units, where the number 0 represents the MSB and 7 represents the LSB. Bit 1 of each data is assigned to a black cell and bit 0 is assigned to a white cell.

[矩形コードの台形化](ステップS5)
矩形コードの台形化の計算に必要な光学系パラメータを図6及び図7に示す。図示する符号の意は以下の通りである。
O:空間座標原点、S:撮像素子の結像中心、SC:光学中心、CO:紙面(z=0)、A:撮像される画端、B:コードの下端、C:撮像される中心、L:撮像される画端(直線)、T:z=0上の台形コード、R:台形コードTのもとになるz=0上での矩形コード、SO:撮像素子と紙面との距離、∠CSO:撮像時のあおり角度
[Rectangle Code Trapezoidalization] (Step S5)
The optical system parameters necessary for calculating the trapezoid of the rectangular code are shown in FIGS. The meanings of the symbols shown are as follows.
O: spatial coordinate origin, S: imaging center of imaging element, SC: optical center, CO: paper surface (z = 0), A: image end to be imaged, B: lower end of code, C: center to be imaged, L: edge of image to be captured (straight line), T: trapezoidal code on z = 0, R: rectangular code on z = 0 that is the basis of trapezoidal code T, SO: distance between imaging element and paper surface, ∠CSO: tilt angle when shooting

台形化を行うための座標変換(2座標変換)について説明する。図8は、2次元コードの座標変換の動作処理を示すフローチャートである。まず、2次元コードのもとになる矩形コードRを平面z=0上に作成する(図9参照)。次に、直線Lを軸として矩形コードR内の点Pを∠CSOだけ回転させる。この点をPrとする(ステップS6)。次に、撮像素子の結像面の中心SとPrを結ぶ直線と平面z=0との交点Ptを求める(ステップS7)。このようにして矩形コードRは台形コードTに変換される。コード内の点を全て処理すると(ステップS8/Yes)座標変換処理は終了する。   Coordinate transformation (two coordinate transformation) for trapezoidalization will be described. FIG. 8 is a flowchart showing an operation process for coordinate conversion of a two-dimensional code. First, the rectangular code R that is the basis of the two-dimensional code is created on the plane z = 0 (see FIG. 9). Next, the point P in the rectangular code R is rotated by ∠CSO about the straight line L as an axis. This point is set as Pr (step S6). Next, an intersection point Pt between the straight line connecting the centers S and Pr of the imaging surface of the image sensor and the plane z = 0 is obtained (step S7). In this way, the rectangular code R is converted into a trapezoid code T. When all the points in the code have been processed (step S8 / Yes), the coordinate conversion process ends.

上記のように作成した2次元コードをプリンタで紙に印刷する。   The two-dimensional code created as described above is printed on paper with a printer.

次に、本実施形態の2次元コード読み取り装置について説明する。図10は本実施形態に係る2次元コード読み取り装置のブロック構成図である。2次元コード読み取り装置は、デジタルカメラやスキャナなどの画像入力手段から多値(グレースケール。カラーの場合は輝度信号を抽出する)画像として入力され、一旦メモリ1に保存される。メモリ1に保存されたあと、あらかじめ二値化パラメータ設定部4により設定された二値化パラメータを用いて二値化される(図10 二値化部2)。二値化された画像を用いてデコード部3は二値化された画像に存在する2次元コードをデコードする。   Next, the two-dimensional code reading device of this embodiment will be described. FIG. 10 is a block diagram of the two-dimensional code reading apparatus according to this embodiment. The two-dimensional code reader is input as a multi-valued image (gray scale, which extracts a luminance signal in the case of color) from image input means such as a digital camera or a scanner, and is temporarily stored in the memory 1. After being stored in the memory 1, binarization is performed using the binarization parameter set in advance by the binarization parameter setting unit 4 (binarization unit 2 in FIG. 10). Using the binarized image, the decoding unit 3 decodes a two-dimensional code existing in the binarized image.

2次元コードのデコードに失敗した場合、二値化パラメータ設定部4へ、失敗した旨の情報を出力する。二値化パラメータ設定部4は入力されたデコード失敗の情報を元に二値化パラメータの修正を行う。デコード失敗の情報とは、例えば二値化された画像に黒画素が多すぎる、あるいは白画素が多すぎる等の情報である。そして修正された二値化パラメータを使用して再度画像二値化を行い、その二値画像のデコードを行う。   When the decoding of the two-dimensional code fails, information indicating the failure is output to the binarization parameter setting unit 4. The binarization parameter setting unit 4 corrects the binarization parameter based on the input information of the decoding failure. Decoding failure information is, for example, information indicating that the binarized image has too many black pixels or too many white pixels. Then, image binarization is performed again using the corrected binarization parameter, and the binary image is decoded.

二値化部2の構成は、特開2001−008032を利用することも考え得る。この場合、二値化パラメータ設定部4で設定される二値化パラメータは、特開2001−008032の二値化閾値設定回路で用いられる乗算係数Cbに相当する(多値画像の二値化に使用する二値化閾値THを設定する際に、平均輝度値aveに係数Cbを乗ずる)。Cbが大きくなると二値化画像において黒画素が増大し、Cbが小さくなると二値化画像において白画素が増大する。   The configuration of the binarization unit 2 can be considered to use Japanese Patent Laid-Open No. 2001-008032. In this case, the binarization parameter set by the binarization parameter setting unit 4 corresponds to the multiplication coefficient Cb used in the binarization threshold setting circuit disclosed in Japanese Patent Laid-Open No. 2001-008032 (for binarization of multi-valued images). (When the binarization threshold TH to be used is set, the average luminance value ave is multiplied by a coefficient Cb). When Cb increases, black pixels increase in the binarized image, and when Cb decreases, white pixels increase in the binarized image.

このとき、Cb=x/16 (1<=x<=15;xは整数)と設定すると、二値化パラメータ設定部4はxの値を1〜15の範囲で変更することになる。この場合、通常はx=8の設定にしておく。デコード部3から黒画素が多すぎるという情報が入力された場合、(x+1)/2を新しくxに設定する。デコード部3から白画素が多すぎるという情報が入力された場合、(x+15)/2を新しくxに設定する。これにより一回目のデコードが失敗した場合でも、二回目のデコードを実行する際、2次元コードをデコードするためにより適した二値化画像を得ることができる。   At this time, if Cb = x / 16 (1 <= x <= 15; x is an integer), the binarization parameter setting unit 4 changes the value of x in the range of 1-15. In this case, normally, x = 8 is set. When information indicating that there are too many black pixels is input from the decoding unit 3, (x + 1) / 2 is newly set to x. When information indicating that there are too many white pixels is input from the decoding unit 3, (x + 15) / 2 is newly set to x. Thereby, even when the first decoding fails, a binarized image more suitable for decoding the two-dimensional code can be obtained when the second decoding is executed.

次にデコード部3について詳述する。図11は、デコード部3のブロック構成図である。図11の点線で囲った部分がデコード部3である。   Next, the decoding unit 3 will be described in detail. FIG. 11 is a block diagram of the decoding unit 3. A portion surrounded by a dotted line in FIG.

デコード部3は、頂点候補検出部5、黒枠判定部6、射影変換係数算出部7、セル位置取得部8、コード判定部9、ビット列取得部10、誤り訂正部11、データ復元部12、黒の拡張率算出部13から構成される。以下各構成について詳述する。   The decoding unit 3 includes a vertex candidate detection unit 5, a black frame determination unit 6, a projective transformation coefficient calculation unit 7, a cell position acquisition unit 8, a code determination unit 9, a bit string acquisition unit 10, an error correction unit 11, a data restoration unit 12, a black The expansion rate calculation unit 13 is configured. Each configuration will be described in detail below.

[頂点候補検出部5]
頂点候補検出部5は、2次元コードの各頂点候補を検出する。次の黒枠判定部6で黒枠(=コード枠)として認識されて始めて頂点候補が2次元コードの頂点であると判定されるため、頂点「候補」と称す。
[Vertex candidate detection unit 5]
The vertex candidate detection unit 5 detects each vertex candidate of the two-dimensional code. Since the vertex candidate is determined to be a vertex of the two-dimensional code only after it is recognized as a black frame (= code frame) by the next black frame determination unit 6, it is referred to as a vertex “candidate”.

頂点候補検出の動作処理について述べる。まず、図12に示すように画像の四隅から斜め走査を行い、黒画素を検出する。それをA、B、C、Dとする。さらに図13では、A、B、C、Dから矢印の方向、例えばAなら右下45度、Bなら左下45度というように、最低3画素以上の画素数だけ画素を追跡してそれらがすべて黒画素かどうかを判定する。それらがすべて黒画素であればA、B、C、Dを頂点候補として検出し、黒枠判定部6に処理を移す。   An operation process for detecting a vertex candidate will be described. First, as shown in FIG. 12, diagonal scanning is performed from the four corners of the image to detect black pixels. Let them be A, B, C, D. Further, in FIG. 13, the pixels are tracked by a minimum of three or more pixels such as A, B, C, and D in the direction of the arrow, for example, 45 degrees on the lower right for A and 45 degrees on the lower left for B. Determine if it is a black pixel. If they are all black pixels, A, B, C, and D are detected as vertex candidates, and the process proceeds to the black frame determination unit 6.

[黒枠判定部6]
黒枠判定部6は、検出した頂点候補同士を結ぶ2次元コードの黒枠が存在するか否かを判定する。隣接した2頂点を結ぶ直線の外側にほとんど白画素の領域、内側にほとんど黒画素の領域が存在するときに、黒枠であると判定する。黒枠検出では、図14のように、頂点候補A、B、C、Dから頂点候補検出部5において追跡した終端画素どうしを結ぶ4直線(黒枠判定ライン)を通過する画素のうち黒画素の割合が全ての直線において直線毎に9割以上存在すればそれを仮の黒枠であると判定する。
[Black frame determination unit 6]
The black frame determination unit 6 determines whether there is a black frame of a two-dimensional code that connects the detected vertex candidates. When there is almost a white pixel area outside the straight line connecting the two adjacent vertices and almost black pixel area inside, it is determined that the frame is a black frame. In the black frame detection, as shown in FIG. 14, the ratio of black pixels among pixels passing through four straight lines (black frame determination lines) connecting the end pixels tracked by the vertex candidate detection unit 5 from the vertex candidates A, B, C, and D. Is 90% or more for every straight line, it is determined that it is a temporary black frame.

次に、頂点候補A、B、C、Dからそれぞれ外側へ0.5mmあるいは5画素程度の長さに位置する画素をクワイエットゾーン判定画素として、隣接するクワイエットゾーン判定画素を結ぶ直線上の画素が、直線毎に8割以上白画素であるならばそれをクワイエットゾーンとして判定し、先に判定した仮の黒枠とあわせて真の黒枠であると判定する。   Next, pixels on the straight line connecting adjacent quiet zone determination pixels are defined as pixels having a length of about 0.5 mm or about 5 pixels outward from the vertex candidates A, B, C, and D, respectively. If it is 80% or more of white pixels for each straight line, it is determined as a quiet zone, and is determined to be a true black frame together with the previously determined temporary black frame.

このようにして頂点候補A、B、C、Dを2次元コードの頂点A、B、C、Dとして確定する。このとき、同時に頂点A、B、C、Dの座標も検出される。ここで、コードの黒枠が検出できなければ読み取りは終了する。黒枠が検出されれば、射影変換係数算出処理に進む。   In this way, the vertex candidates A, B, C, and D are determined as the vertices A, B, C, and D of the two-dimensional code. At this time, the coordinates of the vertices A, B, C, and D are also detected. Here, if the black frame of the code cannot be detected, reading ends. If a black frame is detected, the process proceeds to projective transformation coefficient calculation processing.

[射影変換係数算出部7]
射影変換係数算出部7は、射影変換係数算出部7では、黒枠検出で検出されたコード枠の各頂点の座標と、コードが矩形であるとしたときのコード枠の各頂点の仮想的な規定座標とから、各セルの規定中心座標と読み取った2次元コード画像の各セルの中心座標とをマッピングする係数(射影変換係数)を求める。規定座標とは、各セルが1の長さを持つ正方形として2次元コードが作成され、結果的にコードは長方形の形になるときの座標のことをいう。規定中心座標とは、前記のような規定座標系で、各セルの中心座標のことをいう。射影変換の詳細は後述する。
[Projection conversion coefficient calculation unit 7]
The projection conversion coefficient calculation unit 7, in the projection conversion coefficient calculation unit 7, virtually defines the coordinates of each vertex of the code frame detected by the black frame detection and each vertex of the code frame when the code is rectangular. From the coordinates, a coefficient (projective transformation coefficient) for mapping the specified center coordinates of each cell and the center coordinates of each cell of the read two-dimensional code image is obtained. The prescribed coordinates are coordinates when a two-dimensional code is created as a square having a length of 1 for each cell, and the code becomes a rectangular shape as a result. The specified center coordinates are the center coordinates of each cell in the specified coordinate system as described above. Details of the projective transformation will be described later.

[セル位置取得部8]
セル位置取得部8は、求めた射影変換係数を用いて、各セルの規定中心座標から読み取った2次元コードの各セルの座標を演算し、読み取るべきセルの位置を取得する。
[Cell position acquisition unit 8]
The cell position acquisition unit 8 calculates the coordinates of each cell of the two-dimensional code read from the specified center coordinates of each cell using the obtained projective transformation coefficient, and acquires the position of the cell to be read.

[コード判定部9]
コード判定部9は、固有パターン検出手段としての機能を有する。コード判定部9は、取得したセル位置より2次元コード固有のパターン(コードの識別パターン)を検出し、目的の2次元コードであるか否かを判定するとともに2次元コード固有パターンの検出結果が所定の条件を満たす場合にその結果を二値化パラメータ設定部4に出力する。
[Code determination unit 9]
The code determination unit 9 has a function as a unique pattern detection unit. The code determination unit 9 detects a pattern specific to the two-dimensional code (code identification pattern) from the acquired cell position, determines whether the target two-dimensional code is the target, and the detection result of the two-dimensional code specific pattern is When a predetermined condition is satisfied, the result is output to the binarization parameter setting unit 4.

コード判定には、二値画像、識別パターンのセル位置が必要となる。識別パターンのセル位置を画像データのサンプリング中心座標とし、その座標を中心とする3x3画素の黒画素数が白画素数を上回れば‘1’、そうでなければ‘0’としてデータを読み出す。読み出したデータと識別パターンの真のデータを比較し、誤りが2つ以下であれば、現在扱っている図形が2次元コードであると判定する。   For code determination, the binary image and the cell position of the identification pattern are required. The cell position of the identification pattern is set as the sampling center coordinate of the image data, and the data is read as ‘1’ if the number of black pixels of 3 × 3 pixels centering on the coordinate exceeds the number of white pixels, and ‘0’ otherwise. The read data is compared with the true data of the identification pattern. If there are two or less errors, it is determined that the currently handled graphic is a two-dimensional code.

コード判定が成功した場合は次のビット列取得部10の処理へ進む。   If the code determination is successful, the process proceeds to the next bit string acquisition unit 10.

コード判定が失敗した場合は、真のパターンデータと読み出したデータとが一致した黒パターンの数と白パターンの数を比較し、黒パターンが全て一致し(全て一致していること:第1の条件)、白パターンの一致した数が所定の一致度(所定の一致度を満たしていること:第2の条件)、例えば白セル4個を満たしておらず、4個以下の場合、画像二値化後の画像内の白画素を増大させるための信号を二値化パラメータ設定部4に出力する。一方、白パターンが全て一致し黒パターンの一致した数が4個以下の場合(白パターンは第1条件を満たし、黒パターンが第2条件を満たさない場合)、画像二値化後の画像内の黒画素を増大させるための信号を二値化パラメータ設定部4に出力する。この信号を受信した二値化パラメータ設定部4は既述したように二値化パラメータを設定しなおし、画像二値化からデコード処理をやり直す。   If the code determination fails, the number of black patterns in which the true pattern data matches the read data is compared with the number of white patterns, and the black patterns all match (all match: first match Condition), the number of matched white patterns has a predetermined degree of coincidence (satisfies a predetermined degree of coincidence: second condition). A signal for increasing white pixels in the image after binarization is output to the binarization parameter setting unit 4. On the other hand, when all white patterns match and the number of matching black patterns is 4 or less (when the white pattern satisfies the first condition and the black pattern does not satisfy the second condition), the image in the image after binarization A signal for increasing the number of black pixels is output to the binarization parameter setting unit 4. Receiving this signal, the binarization parameter setting unit 4 resets the binarization parameters as described above, and redoes the decoding process from the image binarization.

[ビット列取得部10]
ビット列取得部10は、目的の2次元コードと判定された2次元コードの各セルの白黒情報を読み取りビット列を取得する。従ってビット列取得には、2次元コード画像、読み取った2次元コード画像のセル位置が必要である。読み取った2次元コード画像の各セルの位置を画像データのサンプリング中心座標とし、その座標を中心とする3x3画素の黒画素数が白画素数を上回れば(黒画素が多い)‘1’、そうでなければ(白画素が多い)‘0’としてデータを読み出し、データを配列する。
[Bit string acquisition unit 10]
The bit string acquisition unit 10 reads the black and white information of each cell of the two-dimensional code determined as the target two-dimensional code and acquires a bit string. Therefore, to acquire a bit string, a two-dimensional code image and a cell position of the read two-dimensional code image are necessary. If the position of each cell of the read two-dimensional code image is the sampling center coordinate of the image data and the number of black pixels of 3 × 3 pixels centering on that coordinate exceeds the number of white pixels (there are many black pixels), “1”, so Otherwise, the data is read as “0” (there are many white pixels) and the data is arranged.

[誤り訂正部11]
誤り訂正部11は、ビット列から誤り訂正を行い、誤り訂正が出来なかった場合に所定の演算を行ってその結果を二値化パラメータ設定部4に出力する。読み出された72ビットのデータは誤り訂正部11に入力され、リードソロモン方式の誤り訂正の判定が行われる。誤りがないか、あるいは誤り訂正が可能ならば、56ビット(7バイト)のデータをデータ復元部12へ出力する。誤り訂正が不可能であった場合、白黒の画素数比および72ビットのデータとから黒の拡張率を算出する。黒の拡張率が1より大きい場合、画像二値化後の画像内の白画素を増大させるための信号を二値化パラメータ設定部4に出力する。黒の拡張率が1より小さい場合は、画像二値化後の画像内の黒画素を増大させるための信号を二値化パラメータ設定部4に出力する。黒の拡張率の詳細については後述する。
[Error correction unit 11]
The error correction unit 11 performs error correction from the bit string, performs a predetermined operation when error correction cannot be performed, and outputs the result to the binarization parameter setting unit 4. The read 72-bit data is input to the error correction unit 11 and judgment of Reed-Solomon error correction is performed. If there is no error or error correction is possible, data of 56 bits (7 bytes) is output to the data restoration unit 12. If error correction is impossible, the black expansion rate is calculated from the ratio of the number of black and white pixels and the 72-bit data. When the black expansion rate is greater than 1, a signal for increasing white pixels in the image after binarization is output to the binarization parameter setting unit 4. When the black expansion rate is smaller than 1, a signal for increasing black pixels in the image after binarization is output to the binarization parameter setting unit 4. Details of the black expansion rate will be described later.

[データ復元部12]
データ復元部12は、誤り訂正をした後で元のデータを復元する。具体的には、誤り訂正部11で得られた7バイトのデータの各バイトに0x96(16進表記)で排他的論理和を演算して元のデータを復元する。
[Data restoration unit 12]
The data restoration unit 12 restores the original data after error correction. Specifically, the original data is restored by calculating an exclusive OR with 0x96 (hexadecimal notation) for each byte of the 7-byte data obtained by the error correction unit 11.

[黒の拡張率部13]
黒の拡張率は、デコードする2次元コードの黒領域がどれだけ拡張されているかを示す尺度である。入力画像がグレースケール画像であるため、二値化処理を実行し、画像を二値化する。2次元コード領域においてコードを各セルが正方形になるように矩形に変換したとき、理想の白黒比の状態から白黒の割合がどれだけ変化しているかを規定する。
[Black expansion rate part 13]
The black expansion rate is a measure indicating how much the black area of the two-dimensional code to be decoded is expanded. Since the input image is a grayscale image, binarization processing is executed to binarize the image. When the code is converted into a rectangle such that each cell is square in the two-dimensional code area, it defines how much the ratio of black and white changes from the ideal black and white ratio state.

まずコードの識別パターン「白白黒黒白白黒黒白白黒黒」の「白白黒黒白白」の1ライン分の画素数を数えて、白画素数をw、黒画素数をbとする。白黒隣接部分の平均拡張画素数expは次式のようになる。
exp=(b/2 − w/4)/2 = (2b − w)/8
First, the number of pixels of one line of “white monochrome black white white” of the code identification pattern “white monochrome black white monochrome black white monochrome black” is counted, and the number of white pixels is set to w and the number of black pixels is set to b. The average expansion pixel number exp in the black and white adjacent portion is expressed by the following equation.
exp = (b / 2−w / 4) / 2 = (2b−w) / 8

よって黒の拡張率Bexpは、次式のようになる。
Bexp = exp/(2b+w)*8 + 1 = 4b/(2b+w)
これは理想のセル長を基準として白に隣接した黒のセルのはみ出し割合を示したものである。黒の拡張がなければBexpの値は1となる。
Therefore, the black expansion rate Bexp is as follows.
Bexp = exp / (2b + w) * 8 + 1 = 4b / (2b + w)
This shows the protrusion ratio of black cells adjacent to white on the basis of the ideal cell length. If there is no black expansion, the value of Bexp is 1.

誤り訂正部11で誤り訂正が失敗したときに黒の拡張率が1より大きい場合、画像二値化後の画像内の白画素を増大させるための信号を二値化パラメータ設定部4に出力する。黒の拡張率が1より小さい場合は、画像二値化後の画像内の黒画素を増大させるための信号を二値化パラメータ設定部4に出力する。   When error correction fails in the error correction unit 11 and the black expansion rate is greater than 1, a signal for increasing white pixels in the image after binarization is output to the binarization parameter setting unit 4 . When the black expansion rate is smaller than 1, a signal for increasing black pixels in the image after binarization is output to the binarization parameter setting unit 4.

上記二次元バーコード読み取り装置の動作処理を、図15のフローチャートに示す。画像入力(グレースケールの画像を入力)し(ステップS10)、二値化パラメータの設定を行う(ステップS11)。二値化パラメータ設定のステップで設定される二値化パラメータは、上述したように、特開2001−008032の二値化閾値設定回路で用いられる乗算係数Cbに相当する。Cbが大きくなると二値化画像において黒画素が増大し、Cbが小さくなると二値化画像において白画素が増大する。このとき、Cb=x/16 (1<=x<=15;xは整数)と設定すると、二値化パラメータ設定ステップはxの値を1〜15の範囲で変更することになる。通常はx=8の設定にしておく。デコードステップから黒画素が多すぎるという情報が入力された場合、(x+1)/2を新しくxに設定する。デコードステップから白画素が多すぎるという情報が入力された場合、(x+15)/2を新しくxに設定する。これにより一回目のデコードが失敗した場合でも、その状況により二値化パラメータ設定ステップで二値化パラメータを設定しなおし、それを用いて2次元コードのデコードにより適した二値画像を得ることができ、2次元コードのデコードをやり直すことができる。   The operation process of the two-dimensional barcode reader is shown in the flowchart of FIG. An image is input (a grayscale image is input) (step S10), and binarization parameters are set (step S11). As described above, the binarization parameter set in the binarization parameter setting step corresponds to the multiplication coefficient Cb used in the binarization threshold setting circuit disclosed in Japanese Patent Laid-Open No. 2001-008032. When Cb increases, black pixels increase in the binarized image, and when Cb decreases, white pixels increase in the binarized image. At this time, if Cb = x / 16 (1 <= x <= 15; x is an integer), the binarization parameter setting step changes the value of x in the range of 1-15. Normally, x = 8 is set. When information indicating that there are too many black pixels is input from the decoding step, (x + 1) / 2 is newly set to x. When information indicating that there are too many white pixels is input from the decoding step, (x + 15) / 2 is newly set to x. As a result, even if the first decoding fails, the binarization parameter is reset in the binarization parameter setting step depending on the situation, and a binary image suitable for decoding the two-dimensional code can be obtained using the parameter. It is possible to redo the decoding of the two-dimensional code.

次に、画像二値化を行う(ステップS12)。画像二値化は、二値化パラメータを用いて画像を二値化する。その後、二値化された画像内の2次元コードの各頂点候補を検出し(ステップS13)、検出した頂点候補を用いて2次元コードの黒枠を判定する(ステップS14)。黒枠と判定された領域の各頂点の座標を基に2次元コードの歪みを補正するための射影変換係数を算出する(ステップS15)。射影変換により2次元コード内の各セル位置を取得する(ステップS16)。   Next, image binarization is performed (step S12). Image binarization binarizes an image using binarization parameters. Thereafter, each vertex candidate of the two-dimensional code in the binarized image is detected (step S13), and the black frame of the two-dimensional code is determined using the detected vertex candidate (step S14). A projective transformation coefficient for correcting the distortion of the two-dimensional code is calculated based on the coordinates of each vertex of the area determined to be a black frame (step S15). Each cell position in the two-dimensional code is acquired by projective transformation (step S16).

次に、コード判定の処理を行う(ステップS17)。取得したセル位置より2次元コード固有のパターンを検出して目的の2次元コードであるか否かを判定するとともに(ステップS18)、2次元コード固有パターンの検出結果が所定の条件を満たす場合にその結果を二値化パラメータ設定部4に出力する。   Next, code determination processing is performed (step S17). A pattern specific to the two-dimensional code is detected from the acquired cell position to determine whether or not the target two-dimensional code is the target (step S18). When the detection result of the two-dimensional code specific pattern satisfies a predetermined condition The result is output to the binarization parameter setting unit 4.

目的の2次元コードと判定されなかった場合は(ステップS18/No)、黒のパターンが全一致か否か:第1条件(ステップS19)、白のパターンが全一致か否か:第2条件(ステップS26)について判定し、その結果を二値化パラメータ設定ステップ(ステップS11)に出力する。   When the target two-dimensional code is not determined (step S18 / No), whether the black pattern is completely matched: first condition (step S19), whether the white pattern is completely matched: second condition (Step S26) is determined, and the result is output to the binarization parameter setting step (Step S11).

目的の2次元コードと判定された場合は(ステップS18/Yes)、目的の2次元コードと判定された2次元コードの各セルの白黒情報について読み取りビット列を取得する(ステップS20)。   If it is determined that the target two-dimensional code is determined (step S18 / Yes), a read bit string is acquired for the black and white information of each cell of the two-dimensional code determined to be the target two-dimensional code (step S20).

ビット列から誤り訂正を行い(ステップS21)、誤り訂正が出来なかった場合には(ステップS22/No)、黒の拡張率を算出する(ステップS24)。黒の拡張率が1.0を越えるか否かについて判断し(ステップS25)、その結果を二値化パラメータ設定ステップ(ステップS11)に出力する。   Error correction is performed from the bit string (step S21). If error correction cannot be performed (step S22 / No), the black expansion rate is calculated (step S24). It is determined whether or not the black expansion rate exceeds 1.0 (step S25), and the result is output to the binarization parameter setting step (step S11).

誤り訂正が成功した場合は(ステップS23)、元のデータを復元する(ステップS23)。   If the error correction is successful (step S23), the original data is restored (step S23).

なお、図15に示す動作処理は、コンピュータなどにおいてソフトウェアで2次元コードのデコードを行うための手順に相当し、本発明の範囲となる。   Note that the operation processing shown in FIG. 15 corresponds to a procedure for decoding a two-dimensional code by software in a computer or the like, and falls within the scope of the present invention.

次に、射影変換の詳細について説明する。射影変換とは3次元空間内の図形・物体を2次元平面・スクリーンへと表示したときの変換である。3次元空間内の物体の座標を2次元平面上の座標へと変換するものである。   Next, details of the projective transformation will be described. Projective transformation is transformation when a figure / object in a three-dimensional space is displayed on a two-dimensional plane / screen. The coordinates of an object in a three-dimensional space are converted into coordinates on a two-dimensional plane.

厳密な射影変換を図16を用いて説明する。図16は、読み取られたコード画像を模式的に示した図(左)と、電子的に生成されたコードを含む画像を模式的に示した図(右)である。コードの各頂点をAs〜Ds、Ar〜Drとする。それぞれの関係は、下記二つの式で結ばれている。   Exact projective transformation will be described with reference to FIG. FIG. 16 is a diagram schematically showing a read code image (left), and a diagram schematically showing an image including an electronically generated code (right). Let each vertex of the code be As to Ds and Ar to Dr. Each relationship is connected by the following two formulas.

Figure 0005145833
Figure 0005145833

Figure 0005145833
Figure 0005145833

上記式1及び式2は、コードシンボル座標から画像座標への変換式を表し、Ar〜DrからAs〜Dsへの座標変換を規定する。この式でb1〜b8は変換パラメータで、これは未知数であるためAr〜Dr、As〜Dsの各座標値を式に代入して八元一次連立方程式を生成し、算出する。算出されたb1〜b8を用いて、電子的に生成されたコードの各セルの中心座標Prk(k=0〜83)を変換してコード画像のサンプリング中心座標Psk(k=0〜83)を求める。   The above formulas 1 and 2 represent conversion formulas from code symbol coordinates to image coordinates, and define the coordinate conversion from Ar to Dr to As to Ds. In this equation, b1 to b8 are conversion parameters, and since these are unknown numbers, the coordinate values of Ar to Dr and As to Ds are substituted into the equation to generate and calculate an eight-way linear simultaneous equation. Using the calculated b1 to b8, the center coordinate Prk (k = 0 to 83) of each cell of the electronically generated code is converted to obtain the sampling center coordinate Psk (k = 0 to 83) of the code image. Ask.

As〜Ds:頂点候補検出により算出される。
Psk:上記式により算出される。
Ar〜Dr:コードの生成時に記憶される。
Prk:コード生成時に記憶される。
As to Ds: calculated by detecting vertex candidates.
Psk: calculated by the above formula.
Ar to Dr: stored at the time of code generation.
Prk: Stored at the time of code generation.

本願の発明により、様々な濃度のインクで印刷された2次元コード、あるいは様々な機種のプリンタで印刷された2次元コードのデコードをたとえ失敗したとしてもその失敗の原因を画像二値化にフィードバックすることでデコードにより適切な二値画像が得られ、2次元コードのデコードを確実に行うことができるようになる。   According to the invention of the present application, even if the decoding of a two-dimensional code printed with inks of various concentrations or a two-dimensional code printed with various types of printers fails, the cause of the failure is fed back to image binarization. By doing so, an appropriate binary image can be obtained by decoding, and the two-dimensional code can be reliably decoded.

なお、上述した2次元コード読み取り装置の動作処理(図15のフローチャートに示す処理)を、CPUが実行するためのプログラムは本発明によるプログラムを構成する。このプログラムを記録する記録媒体としては、半導体記憶部や光学的及び/又は磁気的な記憶部等を用いることができる。このようなプログラム及び記録媒体を、前述した各実施形態とは異なる構成のシステム等で用い、そこのCPUで上記プログラムを実行させることにより、本発明と実質的に同じ効果を得ることができる。   Note that the program for the CPU to execute the above-described operation processing of the two-dimensional code reader (the processing shown in the flowchart of FIG. 15) constitutes a program according to the present invention. As a recording medium for recording the program, a semiconductor storage unit, an optical and / or magnetic storage unit, or the like can be used. By using such a program and a recording medium in a system having a configuration different from that of each of the above-described embodiments and causing the CPU to execute the program, substantially the same effect as the present invention can be obtained.

以上、本発明を好適な実施の形態に基づき具体的に説明したが、本発明は上記のものに限定されるものではなく、その要旨を逸脱しない範囲で種々変更可能であることは言うまでもない。   Although the present invention has been specifically described above based on the preferred embodiments, it is needless to say that the present invention is not limited to the above-described ones and can be variously modified without departing from the gist thereof.

本発明の実施形態に係る座標変換前の2次元コードを示す図である。It is a figure which shows the two-dimensional code before the coordinate transformation which concerns on embodiment of this invention. 本発明の実施形態に係る座標変換後の台形2次元コードを示す図である。It is a figure which shows the trapezoid two-dimensional code after the coordinate transformation which concerns on embodiment of this invention. 本発明の実施形態に係る2次元コードにおけるバイト単位の配置を示す図である。It is a figure which shows arrangement | positioning of the byte unit in the two-dimensional code which concerns on embodiment of this invention. 本発明の実施形態に係る2次元コードにおけるビット単位の配置を示す図である。It is a figure which shows arrangement | positioning of the bit unit in the two-dimensional code which concerns on embodiment of this invention. 本発明の実施形態に係るエンコードの動作処理を示すフローチャートである。It is a flowchart which shows the operation | movement process of the encoding which concerns on embodiment of this invention. 本発明の実施形態に係る矩形コードの台形化の計算に必要な光学系パラメータを示す図である。It is a figure which shows the optical system parameter required for calculation of the trapezoidization of the rectangular code based on embodiment of this invention. 本発明の実施形態に係る矩形コードの台形化の計算に必要な光学系パラメータを示す図である。It is a figure which shows the optical system parameter required for calculation of the trapezoidization of the rectangular code based on embodiment of this invention. 本発明の実施形態に係る座標変換の動作処理を示すフローチャートである。It is a flowchart which shows the operation | movement process of the coordinate transformation which concerns on embodiment of this invention. 本発明の実施形態に係る座標変換の計算に必要な光学系パラメータを示す図である。It is a figure which shows the optical system parameter required for calculation of the coordinate transformation which concerns on embodiment of this invention. 本発明の実施形態に係る2次元コード読み取り装置のブロック構成図である。It is a block block diagram of the two-dimensional code reader which concerns on embodiment of this invention. 本発明の実施形態に係るデコード部3のブロック構成図である。It is a block block diagram of the decoding part 3 which concerns on embodiment of this invention. 本発明の実施形態に係る頂点候補画素検出を説明するための図である。It is a figure for demonstrating the vertex candidate pixel detection which concerns on embodiment of this invention. 本発明の実施形態に係る頂点候補検出を説明するための図である。It is a figure for demonstrating the vertex candidate detection which concerns on embodiment of this invention. 本発明の実施形態に係る黒枠判定を説明するための図である。It is a figure for demonstrating the black frame determination which concerns on embodiment of this invention. 本発明の実施形態に係る二次元バーコード読み取り装置の動作処理を示すフローチャートである。It is a flowchart which shows the operation | movement process of the two-dimensional barcode reader which concerns on embodiment of this invention. 本発明の実施形態に係る射影変換の説明をするための図である。It is a figure for demonstrating the projective transformation which concerns on embodiment of this invention.

符号の説明Explanation of symbols

1 メモリ
2 二値化部
3 デコード部
4 二値化パラメータ設定部
5 頂点候補検出部
6 黒枠判定部
7 射影変換係数算出部
8 セル位置取得部
9 コード判定部
10 ビット列取得部
11 誤り訂正部
12 データ復元部
13 黒の拡張率算出部
DESCRIPTION OF SYMBOLS 1 Memory 2 Binarization part 3 Decoding part 4 Binarization parameter setting part 5 Vertex candidate detection part 6 Black frame determination part 7 Projection transformation coefficient calculation part 8 Cell position acquisition part 9 Code determination part 10 Bit sequence acquisition part 11 Error correction part 12 Data restoration unit 13 Black expansion rate calculation unit

Claims (8)

複数の白および黒の四角形のセルの一部を固有パターンとして有する2次元コードの領域を含む多値画像を、次式
Cb=x/16
ただし、Cb:乗算係数
x:整数、1≦x≦15
に基づいて二値化して、二値画像を出力する画像二値化手段と、
前記二値画像から前記2次元コードの領域を検出する2次元コード検出手段と、
前記2次元コード領域から固有パターンを検出する固有パターン検出手段と、
記2次元コードをデコードするデコード手段と、を有し、
前記固有パターン検出手段は、前記固有パターンを構成する黒若しくは白のパターンのうち、一方のパターンを構成するセルが、予め定めたパターンを構成するセルと全て一致していることを条件とする第1の条件と、他方のパターンの一致度が予め定めた一致度を満たすことを条件とする第2の条件と、を判定する判定手段を備え、
前記二値化手段は、
黒のパターンの一致度が前記第1の条件を満たし、白パターンの一致度が前記第2の条件を満たさない場合は、白パターンの一致度が前記第2の条件を満たすよう前記多値画像を再度二値化し、また、
白のパターンの一致度が前記第1の条件を満たし、黒パターンの一致度が前記第2の条件を満たさない場合は、黒パターンの一致度が前記第2の条件を満たすよう前記多値画像を再度二値化し、
記再度二値化した二値画像から前記固有パターンを検出し、前記デコード手段で前記2次元コードをデコードすることを特徴とする2次元コード読み取り装置。
The multi-valued image including the region of the two-dimensional code having a portion of the cell Le plurality of white and black squares as a unique pattern, the following equation
Cb = x / 16
Where Cb: multiplication factor
x: integer, 1 ≦ x ≦ 15
An image binarization means binarizes and outputs the binary image based on,
Two-dimensional code detection means for detecting a region of the two-dimensional code from the binary image;
A unique pattern detecting means for detecting a unique pattern from the region of the two-dimensional code;
A decoding means for decoding the pre-SL 2-dimensional code, a,
The unique pattern detection means, among the unique pattern of black or white constituting the pattern, the cells constituting one pattern, with the proviso that match all the cells constituting the predetermined pattern Determining means for determining a condition of 1 and a second condition on the condition that a matching degree of the other pattern satisfies a predetermined matching degree;
The binarization means includes
Meet black pattern matching score of the first condition, if the match degree of the white pattern does not satisfy the second condition, the degree of matching of the white pattern to the second condition is satisfied Re-binarize multi-valued image,
Coincidence of the white pattern satisfies the first condition, when the degree of matching of the black pattern does not satisfy the second condition, the degree of matching of the black pattern to the second condition is satisfied Binarize the multi-valued image again,
Before SL again binarizing detects a binary image or al the unique pattern, the two-dimensional code reading apparatus characterized by decoding the two-dimensional code in the decoding means.
前記二値化手段が前記多値画像を再度二値化するときには、前記式のxの値を、  When the binarization means binarizes the multi-valued image again, the value of x in the equation is
黒のパターンの一致度が前記第1の条件を満たし、白のパターンの一致度が前記第2の条件を満たさない場合は、増やし、  If the black pattern coincidence satisfies the first condition and the white pattern coincidence does not satisfy the second condition, increase
白のパターンの一致度が前記第1の条件を満たし、黒のパターンの一致度が前記第2の条件を満たさない場合は、減らす  Decrease if the degree of coincidence of the white pattern satisfies the first condition and the degree of coincidence of the black pattern does not satisfy the second condition
処理を行うことを特徴とする、請求項1記載の2次元コード読み取り装置。  The two-dimensional code reading device according to claim 1, wherein processing is performed.
前記多値画像は、データ情報と誤り訂正情報とを有し、  The multi-value image has data information and error correction information,
前記デコード手段は、前記誤り訂正情報を利用した誤り訂正に失敗した場合に、  When the decoding means fails in error correction using the error correction information,
理想の白黒比の状態から二値化を試みた画像の白黒比への変化率を計算し、  Calculate the rate of change from the ideal black-and-white ratio to the black-and-white ratio of the image that was binarized,
前記二値化手段が前記多値画像を再度二値化するときには、前記式のxの値を、  When the binarization means binarizes the multi-valued image again, the value of x in the equation is
前記変化率が黒の割合が多くなっていることを示す場合は、減らし、  If the rate of change indicates that the percentage of black is increasing, reduce it,
前記変化率が白の割合が多くなっていることを示す場合は、増やす  Increase if the rate of change indicates that the percentage of white is high
処理を行うことを特徴とする、請求項1又は2記載の2次元コード読み取り装置。  The two-dimensional code reading device according to claim 1 or 2, wherein processing is performed.
複数の白および黒の四角形のセルの一部を固有パターンとして有する2次元コードの領域を含む多値画像を、次式
Cb=x/16
ただし、Cb:乗算係数
x:整数、1≦x≦15
に基づいて二値化して、二値画像を出力する画像二値化ステップと、
前記二値画像から前記2次元コードの領域を検出する2次元コード検出ステップと、
前記2次元コード領域から固有パターンを検出する固有パターン検出ステップと、
記2次元コードをデコードするデコードステップと、を有し、
前記固有パターン検出ステップは、前記固有パターンを構成する黒若しくは白のパターンのうち、一方のパターンを構成するセルが、予め定めたパターンを構成するセルと全て一致していることを条件とする第1の条件と、他方のパターンの一致度が予め定めた一致度を満たすことを条件とする第2の条件と、を判定する判定ステップを備え、
前記二値化ステップは、
黒のパターンの一致度が前記第1の条件を満たし、白パターンの一致度が前記第2の条件を満たさない場合は、白パターンの一致度が前記第2の条件を満たすよう前記多値画像を再度二値化し、また、
白のパターンの一致度が前記第1の条件を満たし、黒パターンの一致度が前記第2の条件を満たさない場合は、黒パターンの一致度が前記第2の条件を満たすよう前記多値画像を再度二値化し、
記再度二値化した二値画像から前記固有パターンを検出し、前記デコードステップで前記2次元コードをデコードすることを特徴とする2次元コード読み取り方法。
The multi-valued image including the region of the two-dimensional code having a portion of the cell Le plurality of white and black squares as a unique pattern, the following equation
Cb = x / 16
Where Cb: multiplication factor
x: integer, 1 ≦ x ≦ 15
By binarizing based on an image binarization step of outputting the binary image,
A two-dimensional code detection step of detecting a region of the two-dimensional code from the binary image;
A unique pattern detecting step for detecting a unique pattern from the region of the two-dimensional code;
It includes a decoding step for decoding the pre-SL 2-dimensional code, a,
The unique pattern detection step, one of the unique pattern of black or white constituting the pattern, the cells constituting one pattern, with the proviso that match all the cells constituting the predetermined pattern A determination step of determining a condition of 1 and a second condition on the condition that a matching degree of the other pattern satisfies a predetermined matching degree;
The binarization step includes
Meet black pattern matching score of the first condition, if the match degree of the white pattern does not satisfy the second condition, the degree of matching of the white pattern to the second condition is satisfied Re-binarize multi-valued image,
Coincidence of the white pattern satisfies the first condition, when the degree of matching of the black pattern does not satisfy the second condition, the degree of matching of the black pattern to the second condition is satisfied Binarize the multi-valued image again,
It detects the leading SL again binarizing the binary image or al the unique pattern, two-dimensional code reading method characterized by decoding the two-dimensional code in the decoding step.
前記二値化ステップが前記多値画像を再度二値化するときには、前記式のxの値を、  When the binarization step binarizes the multi-value image again, the value of x in the equation is
黒のパターンの一致度が前記第1の条件を満たし、白のパターンの一致度が前記第2の条件を満たさない場合は、増やし、  If the black pattern coincidence satisfies the first condition and the white pattern coincidence does not satisfy the second condition, increase
白のパターンの一致度が前記第1の条件を満たし、黒のパターンの一致度が前記第2の条件を満たさない場合は、減らす  Decrease if the degree of coincidence of the white pattern satisfies the first condition and the degree of coincidence of the black pattern does not satisfy the second condition
処理を行うことを特徴とする、請求項4記載の2次元コード読み取り方法。  5. The two-dimensional code reading method according to claim 4, wherein processing is performed.
前記多値画像は、データ情報と誤り訂正情報とを有し、  The multi-value image has data information and error correction information,
前記デコードステップは、前記誤り訂正情報を利用した誤り訂正に失敗した場合に、  The decoding step, when error correction using the error correction information fails,
理想の白黒比の状態から二値化を試みた画像の白黒比への変化率を計算し、  Calculate the rate of change from the ideal black-and-white ratio to the black-and-white ratio of the image that was binarized,
前記二値化ステップが前記多値画像を再度二値化するときには、前記式のxの値を、  When the binarization step binarizes the multi-value image again, the value of x in the equation is
前記変化率が黒の割合が多くなっていることを示す場合は、減らし、  If the rate of change indicates that the percentage of black is increasing, reduce it,
前記変化率が白の割合が多くなっていることを示す場合は、増やす  Increase if the rate of change indicates that the percentage of white is high
処理を行うことを特徴とする、請求項4又は5記載の2次元コード読み取り方法。  6. The two-dimensional code reading method according to claim 4, wherein processing is performed.
請求項4から6のいずれか1項に記載の2次元コード読み取り方法をコンピュータに実行させることを特徴とする2次元コード読み取りプログラム。 A two-dimensional code reading program for causing a computer to execute the two-dimensional code reading method according to any one of claims 4 to 6 . 請求項7記載のプログラムを記録したことを特徴とするコンピュータ読み取り可能な記録媒体。 A computer-readable recording medium having recorded thereon the program according to claim 7.
JP2007236688A 2007-09-12 2007-09-12 Two-dimensional code reading device, two-dimensional code reading method, two-dimensional code reading program, and recording medium Expired - Fee Related JP5145833B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007236688A JP5145833B2 (en) 2007-09-12 2007-09-12 Two-dimensional code reading device, two-dimensional code reading method, two-dimensional code reading program, and recording medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007236688A JP5145833B2 (en) 2007-09-12 2007-09-12 Two-dimensional code reading device, two-dimensional code reading method, two-dimensional code reading program, and recording medium

Publications (2)

Publication Number Publication Date
JP2009070061A JP2009070061A (en) 2009-04-02
JP5145833B2 true JP5145833B2 (en) 2013-02-20

Family

ID=40606258

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007236688A Expired - Fee Related JP5145833B2 (en) 2007-09-12 2007-09-12 Two-dimensional code reading device, two-dimensional code reading method, two-dimensional code reading program, and recording medium

Country Status (1)

Country Link
JP (1) JP5145833B2 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5623223B2 (en) * 2010-09-29 2014-11-12 トッパン・フォームズ株式会社 Barcode display label
JP6188052B2 (en) * 2013-02-26 2017-08-30 Kddi株式会社 Information system and server
WO2016002510A1 (en) * 2014-07-01 2016-01-07 ソニー株式会社 Image processing device and method
JP7057433B6 (en) 2018-10-01 2022-05-16 株式会社日立産機システム Print inspection device
CN110969612B (en) * 2019-12-04 2023-03-21 常州大学 Two-dimensional code printing defect detection method

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2576370B2 (en) * 1993-07-07 1997-01-29 日本電気株式会社 ID mark reading device
JP3803411B2 (en) * 1995-12-25 2006-08-02 オリンパス株式会社 Information reproducing system and information recording medium
JP2004102348A (en) * 2002-09-04 2004-04-02 Showa Information Systems Co Ltd Recognition method of two-dimensional code

Also Published As

Publication number Publication date
JP2009070061A (en) 2009-04-02

Similar Documents

Publication Publication Date Title
US7751585B2 (en) System and method for encoding high density geometric symbol set
US7478746B2 (en) Two-dimensional color barcode and method of generating and decoding the same
US8459565B2 (en) Two-dimensional code generating apparatus, image forming system, two-dimensional code reading apparatus, and computer readable medium
US8594453B2 (en) Method of robust alignment and payload recovery for data-bearing images
JP4000316B2 (en) Generation of figure codes by halftoning using embedded figure coding
WO2018095149A1 (en) Method and system for generating two-dimensional code having embedded visual image, and reading system
US8186594B2 (en) Image processing method and apparatus thereof
US20110052094A1 (en) Skew Correction for Scanned Japanese/English Document Images
JP2004530227A (en) Reference mark pattern of graphical barcode
JP2004140764A (en) Image processing device and method therefor
JP2005218084A (en) 3d dot code for paper storage
JP5145833B2 (en) Two-dimensional code reading device, two-dimensional code reading method, two-dimensional code reading program, and recording medium
US20080316538A1 (en) Device using low visibility encoded image to manage copy history
JP4140519B2 (en) Image processing apparatus, program, and recording medium
JP4192909B2 (en) Tamper detection device, tamper detection method
US10027843B2 (en) Embedding data in halftone images
JP4874706B2 (en) QR code reader
WO2011093870A1 (en) Parallel test payload
JP5056063B2 (en) Image processing apparatus and image processing program
JP4397866B2 (en) Two-dimensional pattern reading device, two-dimensional pattern reading method
JP4179177B2 (en) Image processing apparatus and image processing method
JP5434273B2 (en) Image processing apparatus and image processing program
JP2007213358A (en) Two-dimensional code detection system and two-dimensional code detection program
JP2005196659A (en) Program, recording medium and apparatus for processing image
JP2010049587A (en) Apparatus and program for extracting difference

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20100414

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20120514

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20120529

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120723

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20121112

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20151207

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees