JP2007219779A - Two-dimensional code generation system and two-dimensional code generation program - Google Patents

Two-dimensional code generation system and two-dimensional code generation program Download PDF

Info

Publication number
JP2007219779A
JP2007219779A JP2006038823A JP2006038823A JP2007219779A JP 2007219779 A JP2007219779 A JP 2007219779A JP 2006038823 A JP2006038823 A JP 2006038823A JP 2006038823 A JP2006038823 A JP 2006038823A JP 2007219779 A JP2007219779 A JP 2007219779A
Authority
JP
Japan
Prior art keywords
dimensional code
drawing data
code
codes
dimensional
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2006038823A
Other languages
Japanese (ja)
Other versions
JP4978879B2 (en
Inventor
Shinichi Yada
伸一 矢田
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.)
Fujifilm Business Innovation Corp
Original Assignee
Fuji Xerox 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 Fuji Xerox Co Ltd filed Critical Fuji Xerox Co Ltd
Priority to JP2006038823A priority Critical patent/JP4978879B2/en
Publication of JP2007219779A publication Critical patent/JP2007219779A/en
Application granted granted Critical
Publication of JP4978879B2 publication Critical patent/JP4978879B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To rearrange a two-dimensional code such that the two-dimensional code is easily detected, to generate drawing data, and to transfer them to a printer. <P>SOLUTION: This two-dimensional code generation system has: an acquisition means 1 acquiring the drawing data of the two-dimensional code when transferring a file attached with the two-dimensional code to the printer; a two-dimensional code decoding means 2 decoding the two-dimensional code on the basis of the drawing data acquired by the acquisition means; a two-dimensional code generation means 3 generating a new two-dimensional code from information obtained by decoding the two-dimensional code by the two-dimensional code decoding means 2 according to resolution of the printer; and a drawing data generation means 4 replacing the drawing data with the drawing data of the new two-dimensional code generated by the two-dimensional code generation means 3. <P>COPYRIGHT: (C)2007,JPO&INPIT

Description

本発明は、二次元コードの生成に関する発明であり、特に、二次元コードを再生成して印刷装置へデータ転送する二次元コード生成システムおよび二次元コード生成プログラムに関する。   The present invention relates to generation of a two-dimensional code, and particularly relates to a two-dimensional code generation system and a two-dimensional code generation program for regenerating a two-dimensional code and transferring data to a printing apparatus.

近年、バーコードは広く世の中で活用されている。その中でも表現できる情報量の多さから二次元コードの利用が広まっている(特許文献1、2参照)。例えば、紙の書類の記載内容を二次元コードに変換し、その紙文書の余白に二次元コードを追加しておくことで、その紙文書をスキャンしたときに、そのバーコードを認識して復号すれば、OCRなどを用いることなく、その文書の記載内容を電子データとして取得することが可能である。   In recent years, barcodes have been widely used in the world. Among them, the use of two-dimensional codes is widespread due to the large amount of information that can be expressed (see Patent Documents 1 and 2). For example, by converting the description of a paper document into a two-dimensional code and adding the two-dimensional code to the margin of the paper document, when the paper document is scanned, the barcode is recognized and decoded. Then, it is possible to acquire the description content of the document as electronic data without using OCR or the like.

ここで、二次元コードは、一次元コード(バーコード)よりも表現できる情報量が大きいが、それでもその情報量には限界がある。大量の情報量をバーコードで表現する場合には、その情報を複数のバーコードに分割して表現するやり方がある(JIS-X-0510、p22、5.3.2.7、連結モードを参照。)。   Here, the two-dimensional code has a larger amount of information that can be expressed than the one-dimensional code (barcode), but the amount of information is still limited. When a large amount of information is represented by barcodes, there is a way to divide the information into multiple barcodes (see JIS-X-0510, p22, 5.3.2.7, concatenation mode).

(QR複数生成して1ページに配置される)
以下、二次元コードの代表例であるQRコードを例にして発明を説明する。すなわち、QRコードの連結モードでは複数のQRコードが生成されるが、この時同じ型番のQRコードが複数生成される。この時、同じ型番のQRコードであるから、同じサイズのQRコードで生成するのが普通である。
(Generate multiple QRs and place them on one page)
Hereinafter, the invention will be described by taking a QR code as a representative example of a two-dimensional code as an example. That is, in the QR code connection mode, a plurality of QR codes are generated, and at this time, a plurality of QR codes having the same model number are generated. At this time, since the QR code has the same model number, it is usually generated with the same size QR code.

また、連結モードである複数のQRコードを復号する場合には、これら複数のQRコードを全て読み込む必要があるので、複数のQRコードを1枚の紙に配置して出力する。   In addition, when decoding a plurality of QR codes in the connection mode, since it is necessary to read all the plurality of QR codes, the plurality of QR codes are arranged and output on one sheet of paper.

(PCで作ったQR生成出力)
これらのQRコードを生成する環境は基幹ホストからの帳票出力などで用いられることもあるが、最近はPC上で手軽にQRコード生成が行われることが多い。PC上のアプリでQRコードを生成し、文書作成ソフトで作成した電子文書のページの上に配置して(貼り付けて)プリントすることで、手軽にQRコード付きの文書を作成することが出来る。
(QR generation output made on PC)
These QR code generation environments may be used for outputting forms from the core host, but recently, QR codes are often generated easily on a PC. A QR code can be easily created by generating QR code with an application on a PC and placing (pasting) it on the page of an electronic document created by the document creation software. .

(QR複数検出する手順)
そして、この複数のQRコードが配置された紙をスキャンして、各々のQRコードを認識して復号し、そして連結して結果を返す。
(Procedure for detecting multiple QRs)
Then, the paper on which the plurality of QR codes are arranged is scanned, each QR code is recognized and decoded, and connected to return the result.

以下、複数のQRコードを検出し復号する際の処理について述べる。QRコードには3個の位置要素パターンがある。画像中からQRコードを検出するには、まず画像全体をスキャンして位置要素パターンを検出し、その位置要素パターンの中心座標を全て算出する(JIS-X-0510、p65〜p66を参照。)。例えばQRコードが一つであれば、位置要素パターンの中心座標は3個、QRコードが4個あれば、位置要素パターンの中心座標は3×4=12個算出される。   Hereinafter, a process when detecting and decoding a plurality of QR codes will be described. There are three position element patterns in the QR code. To detect a QR code from an image, first, the entire image is scanned to detect a position element pattern, and all center coordinates of the position element pattern are calculated (see JIS-X-0510, p65 to p66). . For example, if there is one QR code, the center coordinates of the position element pattern are calculated as three, and if there are four QR codes, the center coordinates of the position element pattern are calculated as 3 × 4 = 12.

この位置要素パターンは図14のように、左上に位置検出パターン#0、右上に位置検出パターン#1、左下に位置検出パターン#2が配置される。そして、これらの位置要素パターン#0、#1、#2の中心を頂点とする直角二等辺三角形を構成し、二次元コードの上下位置および回転を検出する。   As shown in FIG. 14, the position element pattern includes a position detection pattern # 0 in the upper left, a position detection pattern # 1 in the upper right, and a position detection pattern # 2 in the lower left. Then, a right-angled isosceles triangle having the centers of these position element patterns # 0, # 1, and # 2 as vertices is formed, and the vertical position and rotation of the two-dimensional code are detected.

特開平6−12515号公報JP-A-6-12515 特許第2938338号明細書Japanese Patent No. 2938338

(不要な直角二等辺三角形)
しかしながら、複数のQRコードが存在する場合、QRコードを検出する条件として位置検出パターンから直角二等辺三角形を検出すると、不要な位置に直角二等辺三角形が見つかってしまう(図15参照)。つまり、誤認識される直角二等辺三角形が出てきてしまう。
(Unnecessary right isosceles triangle)
However, when a plurality of QR codes exist, if a right isosceles triangle is detected from the position detection pattern as a condition for detecting the QR code, a right isosceles triangle is found at an unnecessary position (see FIG. 15). That is, a right isosceles triangle that is misrecognized appears.

この際、不要な直角二等辺三角形が見つかったとしても、全体の三角形の組み合わせから、不要な三角形を排除することは可能である。例えば、不要な三角形を含む全体構成では、余る点が存在してしまうということを利用すれば、排除は可能である。ただし、この処理では最適な組み合わせになるまで、演算を延々と繰り返すことになる。その結果、演算量が増えてしまうため、処理速度が遅くなる。   At this time, even if an unnecessary right isosceles triangle is found, it is possible to exclude the unnecessary triangle from the whole triangle combination. For example, in the overall configuration including unnecessary triangles, it is possible to eliminate it by utilizing the fact that there are excess points. However, in this process, the calculation is repeated endlessly until the optimum combination is obtained. As a result, the amount of calculation increases, and the processing speed becomes slow.

また、不要な直角二等辺三角形をQRコードであると判定してしまうので、QRコードの誤認識が発生してしまうという問題も生じる。   In addition, since an unnecessary right isosceles triangle is determined to be a QR code, there is a problem that erroneous recognition of the QR code occurs.

さらに、パーソナルコンピュータ上で作成した電子文書にQRコードを貼り付けて紙に印刷する際、パーソナルコンピュータ上で貼り付けられたQRコードが微細で正しく紙上に再現されないことがある。この場合、この紙をスキャンしてもQRコードは正常に復号されない。   Furthermore, when a QR code is pasted on an electronic document created on a personal computer and printed on paper, the QR code pasted on the personal computer may be fine and not accurately reproduced on paper. In this case, the QR code is not normally decoded even if this paper is scanned.

また、パーソナルコンピュータ上の電子文書にQRコードを貼り付ける際、電子文書の体裁を整えるために、QRコード画像を拡大あるいは縮小して貼り付けることがある。QRコード画像は白黒2値の高いコントラストが必要であるが、QRコード画像が拡大あるいは縮小される影響でコントラストが落ちたり、白黒2値の画像が拡大縮小の画像エッジ補完処理でぼやけてしまうことがある。この場合、この状態で紙に印刷して、その紙をスキャンしてもQRコードが正常に復号されないという問題が生じる。   In addition, when a QR code is pasted on an electronic document on a personal computer, the QR code image may be pasted in an enlarged or reduced manner in order to improve the appearance of the electronic document. A QR code image needs high black and white binary contrast, but the contrast is lowered due to the enlargement or reduction of the QR code image, and the black and white binary image is blurred by enlargement / reduction image edge interpolation processing. There is. In this case, there is a problem that the QR code is not normally decoded even if the paper is printed in this state and the paper is scanned.

本発明はこのような課題を解決するために成されたものである。すなわち、本発明は、二次元コードが付されたファイルを印刷装置へ転送するにあたり、二次元コードの描画データを取得する取得手段と、取得手段によって取得した描画データに基づき二次元コードの復号を行う復号手段と、復号手段によって復号して得た情報から印刷装置の解像度に応じて新たな二次元コードを生成する二次元コード生成手段と、前記描画データを二次元コード生成手段によって生成した新たな二次元コードの描画データと置き換える描画データ生成手段とを備える二次元コード生成システムである。   The present invention has been made to solve such problems. That is, according to the present invention, when transferring a file with a two-dimensional code to a printing apparatus, an acquisition unit that acquires drawing data of the two-dimensional code, and a decoding of the two-dimensional code based on the drawing data acquired by the acquisition unit. A decoding unit for performing, a two-dimensional code generating unit for generating a new two-dimensional code according to the resolution of the printing apparatus from information obtained by decoding by the decoding unit, and a new one for generating the drawing data by the two-dimensional code generating unit This is a two-dimensional code generation system comprising drawing data generation means for replacing the drawing data of a two-dimensional code.

このような本発明では、二次元コードが付されたファイルを印刷装置へ転送する際、二次元コードの描画データから復号を行い、印刷装置の解像度に応じて新たな二次元コードを生成し、元の描画データの二次元コード該当部分を新たな二次元コードの描画データと置き換えることから、印刷装置の解像度に合わせて二次元コードを検出しやすい形態で再生成できることになる。   In the present invention, when transferring a file with a two-dimensional code to a printing apparatus, decoding from the drawing data of the two-dimensional code, generating a new two-dimensional code according to the resolution of the printing apparatus, Since the portion corresponding to the two-dimensional code of the original drawing data is replaced with the drawing data of the new two-dimensional code, the two-dimensional code can be regenerated in a form that is easy to detect according to the resolution of the printing apparatus.

また、本発明は、複数の二次元コードが付されたファイルを印刷装置へ転送するにあたり、複数の二次元コードの描画データを取得する取得手段と、取得手段によって取得した複数の二次元コードの描画データについて複数の二次元コードを区分けする新たな描画データを生成する描画データ生成手段と、描画データ生成手段によって生成した新たな描画データを前記印刷装置へ転送する転送手段とを備える二次元コード生成システム。   Further, the present invention provides an acquisition unit that acquires drawing data of a plurality of two-dimensional codes and a plurality of two-dimensional codes acquired by the acquisition unit when transferring a file with a plurality of two-dimensional codes to the printing apparatus. A two-dimensional code comprising drawing data generation means for generating new drawing data for dividing a plurality of two-dimensional codes for drawing data, and transfer means for transferring the new drawing data generated by the drawing data generation means to the printing apparatus Generation system.

このような本発明では、複数の二次元コードが付されたファイルを印刷装置へ転送する際、複数の二次元コードについての区分けを明確にできる形態で二次元コードを再生成するため、印刷装置で印刷した媒体に複数の二次元コードが付されている場合でもこれらを的確に区別して検出できるようになる。   In the present invention, when transferring a file with a plurality of two-dimensional codes to a printing apparatus, the two-dimensional code is regenerated in a form that can clearly distinguish the plurality of two-dimensional codes. Even when a plurality of two-dimensional codes are attached to the medium printed in (1), these can be accurately distinguished and detected.

また、上記二次元コード生成方法をプログラム処理で実現することによって、二次元コードを印刷装置へ転送する機能を備えたプログラム(例えば、プリンタドライバ)や各種電子機器(プリンタコントローラ)へ適用できるようになる。ここで、二次元コードとしては、QRコード、PDF417、マキシコード(Maxi Code)、データマトリクス(Data Matrix)、といったものが挙げられ、二次元コードの特性(例えば、QRコードでは最小画素単位であるモジュールサイズ)に応じたノイズ除去を行うことによって、二次元コードの描画内容に影響が出ないようなノイズ除去を実現できる。   In addition, by realizing the above two-dimensional code generation method by program processing, it can be applied to a program (for example, a printer driver) having various functions for transferring a two-dimensional code to a printing apparatus and various electronic devices (printer controllers). Become. Here, examples of the two-dimensional code include QR code, PDF417, maxi code (Maxi Code), and data matrix (Data Matrix), and characteristics of the two-dimensional code (for example, the QR code is a minimum pixel unit). By performing noise removal according to the module size), it is possible to realize noise removal that does not affect the drawing contents of the two-dimensional code.

したがって、本発明によれば、二次元コードの検出処理時間を短縮化することができるとともに、二次元コードの検出精度を向上させることが可能となる。   Therefore, according to the present invention, it is possible to shorten the detection processing time of the two-dimensional code and improve the detection accuracy of the two-dimensional code.

以下、本発明の実施の形態を図に基づき説明する。なお、本実施形態では二次元コードとしてQRコードを例に説明を行う。図1は、本実施形態に係る二次元コード生成システムの構成を説明するブロック図である。すなわち、この二次元コード生成システムは、プリンタドライバやプリンタコントローラによって実現されるもので、取得手段1、二次元コード復号手段2、二次元コード生成手段3、描画データ生成手段4、転送手段5を備えている。   Hereinafter, embodiments of the present invention will be described with reference to the drawings. In the present embodiment, a QR code is taken as an example of a two-dimensional code. FIG. 1 is a block diagram illustrating a configuration of a two-dimensional code generation system according to the present embodiment. That is, the two-dimensional code generation system is realized by a printer driver or a printer controller. The acquisition unit 1, the two-dimensional code decoding unit 2, the two-dimensional code generation unit 3, the drawing data generation unit 4, and the transfer unit 5 are provided. I have.

取得手段1は、アプリケーションソフトウェアによって作成されたファイルから二次元コードの描画データを取得する処理を行う。また、二次元コード復号手段2は、取得手段1によって取得した描画データに基づき二次元コードの復号を行う。二次元コード生成手段3は、復号して得た情報から印刷装置の解像度に応じた新たな二次元コードを生成する処理を行う。描画データ生成手段4は、元の描画データの二次元コード該当部分を二次元コード生成手段3によって生成した新たな二次元コードの描画データと置き換える処理や、取得手段1によって複数の二次元コードの描画データを取得した場合、複数の二次元コードを区分けする新たな描画データを生成する処理を行う。転送手段5は、描画データ生成手段4によって生成した新たな描画データを印刷装置へ転送する処理を行う。   The acquisition unit 1 performs processing for acquiring drawing data of a two-dimensional code from a file created by application software. The two-dimensional code decoding unit 2 decodes the two-dimensional code based on the drawing data acquired by the acquisition unit 1. The two-dimensional code generation means 3 performs a process of generating a new two-dimensional code corresponding to the resolution of the printing apparatus from the information obtained by decoding. The drawing data generation unit 4 replaces the corresponding portion of the original drawing data with the new two-dimensional code generated by the two-dimensional code generation unit 3, and the acquisition unit 1 generates a plurality of two-dimensional codes. When drawing data is acquired, a process for generating new drawing data for dividing a plurality of two-dimensional codes is performed. The transfer unit 5 performs a process of transferring new drawing data generated by the drawing data generation unit 4 to the printing apparatus.

次に、上記二次元コード生成システムによる処理を実施形態として具体的に説明する。   Next, the process by the two-dimensional code generation system will be specifically described as an embodiment.

図2は、第1実施形態を説明するフローチャートである。第1実施形態では、二次元コードが付されたファイルを印刷装置へ転送するにあたり、プリンタ解像度に合わせてQRコードを作り直して(再生成)、検出しやすいようにする点に特徴がある。   FIG. 2 is a flowchart illustrating the first embodiment. The first embodiment is characterized in that when a file with a two-dimensional code is transferred to a printing apparatus, a QR code is recreated (regenerated) according to the printer resolution so that it can be easily detected.

先ず、パーソナルコンピュータ等で実行されるアプリケーションソフトウェアから描画データを取得し(ステップS11)、描画データをプリンタの解像度に合わせてラスタライズする(ステップS12)。次に、ラスター画像に対してQRコードの復号処理を施す(ステップS13)。   First, drawing data is acquired from application software executed on a personal computer or the like (step S11), and the drawing data is rasterized in accordance with the resolution of the printer (step S12). Next, a QR code decoding process is performed on the raster image (step S13).

次いで、復号結果とプリンタの解像度とを考慮して、QRコードを再度エンコードし(ステップS14)、元のラスター画像の二次元コード該当部分を新たに生成されたQRコードの画像と置き換える(ステップS15)。そして、この新たなQRコードが付されたラスター画像をプリンタに転送し、印刷指示を与える(ステップS16)。   Next, in consideration of the decoding result and the resolution of the printer, the QR code is encoded again (step S14), and the corresponding portion of the two-dimensional code of the original raster image is replaced with a newly generated QR code image (step S15). ). Then, the raster image with the new QR code is transferred to the printer, and a print instruction is given (step S16).

上記各ステップによる処理はプリンタドライバで実行されるが、プリンタ内部のプリンタコントローラで実行してもよい。図3は、プリンタコントローラでの処理を説明するフローチャートである。   The processing in each of the above steps is executed by the printer driver, but may be executed by a printer controller inside the printer. FIG. 3 is a flowchart for explaining processing in the printer controller.

先ず、クライアントであるパーソナルコンピュータからページ記述言語データを取得し(ステップS21)、ページ記述言語データのラスタライズを行う(ステップS22)。次に、ラスター画像に対してQRコードの復号処理を施す(ステップS23)。   First, page description language data is acquired from a personal computer as a client (step S21), and the page description language data is rasterized (step S22). Next, a QR code decoding process is performed on the raster image (step S23).

次いで、復号結果とプリンタの解像度などプリンタ特性に合わせてQRコードを再度エンコードし(ステップS24)、元のラスター画像の二次元コード該当部分を新たに生成されたQRコードの画像と置き換える(ステップS25)。そして、この新たなQRコードが付されたラスター画像によって印刷出力を行う(ステップS26)。   Next, the QR code is encoded again in accordance with the decoding result and the printer characteristics such as the printer resolution (step S24), and the two-dimensional code corresponding part of the original raster image is replaced with the newly generated QR code image (step S25). ). Then, print output is performed using the raster image to which the new QR code is attached (step S26).

ここで、具体的なQRコードの再生成としては、プリンタの解像度が低いほど元のQRコードのモジュールサイズ(構成単位)を大きくしたり、プリンタの解像度が低いほど元の二次元コードのサイズを大きくすることが考えられる。プリンタの解像度が低いと小さなモジュールサイズでは再現性が悪化するため、大きなモジュールサイズにしたり、二次元コード自体の面積を大きくすることで、解像度の低いプリンタで印刷出力したQRコードであっても十分検出できるようになる。   Here, as a specific QR code regeneration, the lower the printer resolution, the larger the original QR code module size (configuration unit), or the lower the printer resolution, the larger the original two-dimensional code size. It is possible to enlarge it. If the resolution of the printer is low, reproducibility deteriorates with a small module size. Therefore, even if the QR code is printed out with a low resolution printer by using a large module size or increasing the area of the two-dimensional code itself, it is sufficient. Can be detected.

また、元のQRコードを復号し、その復号した情報の量によっては必要以上に小さなモジュールサイズになっている場合もある。このような場合には復号した情報の量に応じて必要十分なモジュールサイズに変更して新たなQRコードを生成すれば、解像度の低いプリンタで印刷出力したQRコードであっても十分検出可能となる。   Also, the original QR code is decoded, and the module size may be smaller than necessary depending on the amount of the decoded information. In such a case, if a new QR code is generated by changing to a necessary and sufficient module size according to the amount of decoded information, even a QR code printed out by a low resolution printer can be detected sufficiently. Become.

次に、第2実施形態について説明する。第2実施形態では、複数のQRコードを配置する際に、QRコード間に境界線を追加して検出しやすいように再配置する点に特徴がある。図4は、複数のQRコードの間に境界線を入れる例を説明する模式図である。すなわち、図4(a)に示すように、元原稿として例えば2つのQRコードが配置されている場合、これらQRコードの描画データを取得し、この描画データにおける2つのQRコードの間に境界線を追加して新たな描画データを生成する。図4(b)は2つのQRコードの間に黒色の境界線が追加された例を示している。   Next, a second embodiment will be described. The second embodiment is characterized in that when a plurality of QR codes are arranged, a boundary line is added between the QR codes and rearranged so as to be easily detected. FIG. 4 is a schematic diagram illustrating an example in which a boundary line is inserted between a plurality of QR codes. That is, as shown in FIG. 4A, when, for example, two QR codes are arranged as an original document, drawing data of these QR codes is acquired, and a boundary line between the two QR codes in the drawing data is obtained. To generate new drawing data. FIG. 4B shows an example in which a black border is added between two QR codes.

このように、2つのQRコードの間に境界線を追加することで、これが印刷出力された媒体を読み取ってQRコードを復号する際、境界線を検出することで2つのQRコードを確実に区分けして読み取ることが可能となる。なお、図4(b)では黒色の境界線を追加したが、人の目に見えにくくスキャナによる読み取りは可能な色で境界線を構成してもよい。図4(c)に示す例は、黄色の境界線を追加した例である。なお、図4(c)では黄色の境界線を破線で示している。これにより、印刷出力の見た目を損なうことなく、2つのQRコードの確実な区分けを実現できる。   In this way, by adding a boundary line between two QR codes, when the QR code is decoded by reading the printed medium, the two QR codes are reliably separated by detecting the boundary line. Can be read. In FIG. 4B, a black boundary line is added. However, the boundary line may be configured with a color that is difficult to be seen by human eyes and can be read by a scanner. The example shown in FIG. 4C is an example in which a yellow boundary line is added. In addition, in FIG.4 (c), the yellow boundary line is shown with the broken line. As a result, the two QR codes can be reliably divided without deteriorating the appearance of the print output.

図5は、境界線を有する複数のQRコードの検出処理を説明するフローチャートである。この検出処理は、QRコードの画像を読み取ってその画像から復号を行う電子機器で実行される。   FIG. 5 is a flowchart illustrating a process for detecting a plurality of QR codes having boundary lines. This detection process is executed by an electronic device that reads an image of a QR code and decodes the image.

先ず、境界線の条件(例えば、色や最小長)を指定し(ステップS301)、読み取った画像から境界線の抽出を行う(ステップS302)。この境界線の抽出は、一般的な画像処理の線分抽出技術を用いる。   First, boundary line conditions (for example, color and minimum length) are specified (step S301), and boundary lines are extracted from the read image (step S302). This boundary line extraction uses a general line segment extraction technique of image processing.

次に、読み取った画像からQRコードの位置検出パターンの中心座標を検出する(ステップS303)。この検出方法は、QRコードの隅部に配置された位置検出パターンの中心座標の検出方法を示すJIS-X-0510、p65-p66に記載の手法を用いる。   Next, the center coordinates of the QR code position detection pattern are detected from the read image (step S303). This detection method uses the method described in JIS-X-0510, p65-p66, which shows the detection method of the center coordinates of the position detection pattern arranged at the corner of the QR code.

続いて、位置検出パターンの座標リストを作成し(ステップS304)、位置検出パターンのリストから3個を選択する(ステップS305)。そして、この選択した3個の位置検出パターンの間に境界線があるか否かを判断し(ステップS306)、ある場合には同じQRパターン内の位置検出パターンではないとしてステップS305へ戻り、別の3個を選択する。   Subsequently, a coordinate list of position detection patterns is created (step S304), and three are selected from the list of position detection patterns (step S305). Then, it is determined whether or not there is a boundary line between the three selected position detection patterns (step S306). If there is a boundary line, the process returns to step S305 because it is not a position detection pattern within the same QR pattern. Select 3 of these.

一方、選択した3個の位置検出パターンの間に境界線がない場合には同じQRコード内の位置検出パターンであることになるため、その3個の位置検出パターンの位置関係が直角二等辺三角形であるか否を判断し(ステップS307)、直角二等辺三角形でない場合には別の3個を選択する(ステップS305)。また、直角二等辺三角形である場合にはこの3個の位置検出パターンがQRコードを構成するため(ステップS308)、3個の位置検出パターンの座標を保持し、リストから削除する(ステップS309)。   On the other hand, if there is no boundary line between the three selected position detection patterns, the position detection pattern is within the same QR code, and therefore the positional relationship between the three position detection patterns is a right isosceles triangle. (Step S307), and if it is not a right isosceles triangle, another three are selected (step S305). In the case of a right isosceles triangle, these three position detection patterns constitute a QR code (step S308), and the coordinates of the three position detection patterns are held and deleted from the list (step S309). .

次に、リストに位置検出パターンの座標が3個以上残っているか否かを判断し(ステップS310)、残っている場合にはステップS305へ戻る。また、残っていない場合にはQRコードを構成する3個の位置検出パターンに基づいてQRコードを検出し(ステップS311)、検出したQRコードの復号を実行する(ステップS312)。ここで、3個の位置検出パターンからQRコードを検出するには、JIS-X-0510、p65-p66に記載の手法を用い、QRコードの復号には、JIS-X-0510に記載の手法を用いる。   Next, it is determined whether or not three or more coordinates of the position detection pattern remain in the list (step S310). If they remain, the process returns to step S305. If not, the QR code is detected based on the three position detection patterns constituting the QR code (step S311), and the detected QR code is decoded (step S312). Here, the method described in JIS-X-0510 and p65-p66 is used to detect the QR code from the three position detection patterns, and the method described in JIS-X-0510 is used to decode the QR code. Is used.

このように、2つのQRコードの間に境界線があることで、同じQRコードを構成する3個の位置検出パターンを確実かつ短時間で見つけることができ、正確にQRコードを検出して復号を行うことが可能となる。   As described above, since there is a boundary line between two QR codes, the three position detection patterns constituting the same QR code can be reliably and quickly found, and the QR code is accurately detected and decoded. Can be performed.

次に、第3実施形態について説明する。第3実施形態では、複数のQRコードを配置する際に、モジュールサイズを変更して検出しやすいように再配置する点に特徴がある。図6は、複数のQRコードについてモジュールサイズに差を設ける例を説明する模式図である。すなわち、図6(a)に示すように、元原稿として例えば2つのQRコードが配置されている場合、これらQRコードの描画データを取得し、この描画データにおける2つのQRコードについてモジュールサイズを変更し、新たな描画データを生成する。図6(b)は左側のQRコードのモジュールサイズを目視では判別しにくい程度に小さくし、右側のQRコードのモジュールサイズを目視では判別しにくい程度に大きくした例を示している。   Next, a third embodiment will be described. The third embodiment is characterized in that when a plurality of QR codes are arranged, the module size is changed and rearranged so as to be easily detected. FIG. 6 is a schematic diagram illustrating an example in which a difference in module size is provided for a plurality of QR codes. That is, as shown in FIG. 6A, for example, when two QR codes are arranged as an original document, drawing data of these QR codes is acquired, and the module size is changed for the two QR codes in the drawing data. Then, new drawing data is generated. FIG. 6B shows an example in which the module size of the left QR code is reduced to a level that is difficult to visually discern, and the module size of the right QR code is increased to a level that is difficult to visually discriminate.

このように、2つのQRコードのモジュールサイズに差を設けることで、これが印刷出力された媒体を読み取ってQRコードを復号する際、モジュールサイズの相違によって2つのQRコードを確実に区分けして読み取ることが可能となる。なお、モジュールサイズの変更では、図6(c)に示すように、QRコードの占める面積は同じでも異なる型番のQRコードに変更するようにしてもよい。この場合であっても内部の情報は同じとなっている。これにより、印刷出力の見た目を損なうことなく、2つのQRコードの確実な区分けを実現できる。   Thus, by providing a difference between the module sizes of the two QR codes, when the QR code is decoded by reading the printed medium, the two QR codes are surely divided and read according to the difference in the module size. It becomes possible. In changing the module size, as shown in FIG. 6C, the area occupied by the QR code may be the same or may be changed to a different QR code. Even in this case, the internal information is the same. As a result, the two QR codes can be reliably divided without deteriorating the appearance of the print output.

図7は、モジュールサイズが異なる複数のQRコードの検出処理を説明するフローチャートである。この検出処理は、QRコードの画像を読み取ってその画像から復号を行う電子機器で実行される。   FIG. 7 is a flowchart illustrating a process for detecting a plurality of QR codes having different module sizes. This detection process is executed by an electronic device that reads an image of a QR code and decodes the image.

先ず、QRコードの位置検出パターンの中心座標を検出する(ステップS401)。この検出方法は、QRコードの隅部に配置された位置検出パターンの中心座標の検出方法を示すJIS-X-0510、p65-p66に記載の手法を用いる。   First, the center coordinates of the QR code position detection pattern are detected (step S401). This detection method uses the method described in JIS-X-0510, p65-p66, which shows the detection method of the center coordinates of the position detection pattern arranged at the corner of the QR code.

続いて、位置検出パターンの幅と高さの画素数を取得し(ステップS402)、(幅+高さ)÷(7×2)で位置検出パターンのモジュールサイズを求める(ステップS403)。その後、位置検出パターンの中心座標とそのモジュールサイズとを組でリスト化する(ステップS404)。   Subsequently, the number of pixels of the width and height of the position detection pattern is acquired (step S402), and the module size of the position detection pattern is obtained by (width + height) / (7 × 2) (step S403). Thereafter, the center coordinates of the position detection pattern and the module size thereof are listed as a set (step S404).

次いで、位置検出パターンのリストから3個を選択する(ステップS405)。そして、この選択した3個の位置検出パターンのモジュールサイズが等しい(ほぼ等しいを含む)か否かを判断し(ステップS406)、等しくない場合には同じQRパターン内の位置検出パターンではないとしてステップS405へ戻り、別の3個を選択する。   Next, three are selected from the list of position detection patterns (step S405). Then, it is determined whether or not the module sizes of the three selected position detection patterns are equal (including substantially equal) (step S406). If they are not equal, it is determined that they are not position detection patterns within the same QR pattern. Returning to S405, another three are selected.

一方、選択した3個の位置検出パターンのモジュールサイズが等しい場合には同じQRコード内の位置検出パターンであることになるため、その3個の位置検出パターンの位置関係が直角二等辺三角形であるか否を判断し(ステップS407)、直角二等辺三角形でない場合には別の3個を選択する(ステップS405)。また、直角二等辺三角形である場合にはこの3個の位置検出パターンがQRコードを構成するため(ステップS408)、3個の位置検出パターンの座標を保持し、リストから削除する(ステップS409)。   On the other hand, if the module sizes of the three selected position detection patterns are equal, they are position detection patterns within the same QR code, and therefore the positional relationship between the three position detection patterns is a right-angled isosceles triangle. (Step S407), and if it is not a right isosceles triangle, another three are selected (step S405). In the case of a right isosceles triangle, these three position detection patterns form a QR code (step S408), and the coordinates of the three position detection patterns are held and deleted from the list (step S409). .

次に、リストに位置検出パターンの座標が3個以上残っているか否かを判断し(ステップS410)、残っている場合にはステップS405へ戻る。また、残っていない場合にはQRコードを構成する3個の位置検出パターンに基づいてQRコードを検出し(ステップS411)、検出したQRコードの復号を実行する(ステップS412)。ここで、3個の位置検出パターンからQRコードを検出するには、JIS-X-0510、p65-p66に記載の手法を用い、QRコードの復号には、JIS-X-0510に記載の手法を用いる。   Next, it is determined whether or not three or more coordinates of the position detection pattern remain in the list (step S410), and if left, the process returns to step S405. If not, the QR code is detected based on the three position detection patterns constituting the QR code (step S411), and the detected QR code is decoded (step S412). Here, the method described in JIS-X-0510 and p65-p66 is used to detect the QR code from the three position detection patterns, and the method described in JIS-X-0510 is used to decode the QR code. Is used.

このように、2つのQRコードのモジュールサイズに差があることで、同じQRコードを構成する3個の位置検出パターンを確実かつ短時間で見つけることができ、正確にQRコードを検出して復号を行うことが可能となる。   In this way, the difference in the module sizes of the two QR codes enables the three position detection patterns constituting the same QR code to be found reliably and in a short time, and the QR code is accurately detected and decoded. Can be performed.

次に、第4実施形態について説明する。第4実施形態では、複数のQRコードを配置する際に、その位置をずらして再配置する点に特徴がある。図8は、複数のQRコードについて垂直方向に位置をずらす例を説明する模式図である。すなわち、図8(a)に示すように、元原稿として例えば2つのQRコードが配置されている場合、これらQRコードの描画データを取得し、この描画データにおける2つのQRコードについて少なくとも一方の配置位置をずらして新たな描画データを生成する。図8(b)は左側のQRコードに対して右側のQRコードを垂直方向にずらして再配置した例を示している。   Next, a fourth embodiment will be described. The fourth embodiment is characterized in that when a plurality of QR codes are arranged, the positions are shifted and rearranged. FIG. 8 is a schematic diagram illustrating an example in which the positions of a plurality of QR codes are shifted in the vertical direction. That is, as shown in FIG. 8A, when, for example, two QR codes are arranged as the original document, drawing data of these QR codes is acquired, and at least one arrangement of the two QR codes in the drawing data is obtained. New drawing data is generated by shifting the position. FIG. 8B shows an example in which the right QR code is shifted in the vertical direction and rearranged with respect to the left QR code.

このように、2つのQRコードの位置をずらすことで、これが印刷出力された媒体を読み取ってQRコードを復号する際、位置の相違によって2つのQRコードを確実に区分けして読み取ることが可能となる。なお、位置をずらす方向は垂直方向以外に水平方向であったり、回転角度(微小角度)を付けるようにしたり、90度単位に角度を付けるよう再配置してもよい。   In this way, by shifting the positions of the two QR codes, when the QR code is decoded by reading the printed medium, the two QR codes can be reliably divided and read according to the difference in position. Become. Note that the direction of shifting the position may be a horizontal direction other than the vertical direction, a rotation angle (minute angle), or an angle in units of 90 degrees.

図9は、位置をずらして配置した複数のQRコードの検出処理を説明するフローチャートである。この検出処理は、QRコードの画像を読み取ってその画像から復号を行う電子機器で実行される。   FIG. 9 is a flowchart for explaining a process for detecting a plurality of QR codes arranged at different positions. This detection process is executed by an electronic device that reads an image of a QR code and decodes the image.

先ず、QRコードの位置検出パターンの中心座標を検出する(ステップS501)。この検出方法は、QRコードの隅部に配置された位置検出パターンの中心座標の検出方法を示すJIS-X-0510、p65-p66に記載の手法を用いる。   First, the center coordinates of the QR code position detection pattern are detected (step S501). This detection method uses the method described in JIS-X-0510, p65-p66, which shows the detection method of the center coordinates of the position detection pattern arranged at the corner of the QR code.

続いて、位置検出パターンの中心座標のリストを作成し(ステップS502)、位置検出パターンのリストから3個を選択する(ステップS503)。そして、この選択した3個の位置検出パターンの位置関係が水平か垂直になるかを判断し(ステップS504)、ならない場合には同じQRパターン内の位置検出パターンではないとしてステップS503へ戻り、別の3個を選択する。   Subsequently, a list of center coordinates of the position detection pattern is created (step S502), and three are selected from the list of position detection patterns (step S503). Then, it is determined whether or not the positional relationship of the three selected position detection patterns is horizontal or vertical (step S504). If not, the process returns to step S503 as not being the position detection pattern in the same QR pattern, and another Select 3 of these.

一方、選択した3個の位置検出パターンの位置関係が水平か垂直になる場合には同じQRコード内の位置検出パターンであることになるため、その3個の位置検出パターンの位置関係が直角二等辺三角形であるか否を判断し(ステップS505)、直角二等辺三角形でない場合には別の3個を選択する(ステップS503)。また、直角二等辺三角形である場合にはこの3個の位置検出パターンがQRコードを構成するため(ステップS506)、3個の位置検出パターンの座標を保持し、リストから削除する(ステップS507)。   On the other hand, when the positional relationship between the three selected position detection patterns is horizontal or vertical, the position detection pattern is within the same QR code, so the positional relationship between the three position detection patterns is two-dimensional. It is determined whether or not it is an equilateral triangle (step S505). If it is not a right isosceles triangle, another three are selected (step S503). In the case of a right isosceles triangle, these three position detection patterns form a QR code (step S506), and the coordinates of the three position detection patterns are held and deleted from the list (step S507). .

次に、リストに位置検出パターンの座標が3個以上残っているか否かを判断し(ステップS508)、残っている場合にはステップS503へ戻る。また、残っていない場合にはQRコードを構成する3個の位置検出パターンに基づいてQRコードを検出し(ステップS509)、検出したQRコードの復号を実行する(ステップS510)。ここで、3個の位置検出パターンからQRコードを検出するには、JIS-X-0510、p65-p66に記載の手法を用い、QRコードの復号には、JIS-X-0510に記載の手法を用いる。   Next, it is determined whether or not three or more coordinates of the position detection pattern remain in the list (step S508), and if left, the process returns to step S503. If not, the QR code is detected based on the three position detection patterns constituting the QR code (step S509), and the detected QR code is decoded (step S510). Here, the method described in JIS-X-0510 and p65-p66 is used to detect the QR code from the three position detection patterns, and the method described in JIS-X-0510 is used to decode the QR code. Is used.

このように、2つのQRコードの位置にずれがあることで、同じQRコードを構成する3個の位置検出パターンを確実かつ短時間で見つけることができ、正確にQRコードを検出して復号を行うことが可能となる。   As described above, since the positions of the two QR codes are shifted, the three position detection patterns constituting the same QR code can be found reliably and in a short time, and the QR code is accurately detected and decoded. Can be done.

次に、第5実施形態について説明する。第5実施形態では、複数のQRコードを配置する際に、各々異なる色にして再配置する点に特徴がある。図10は、複数のQRコードについて色が異なるよう再配置する例を説明する模式図である。すなわち、図10(a)に示すように、元原稿として例えば同じ色の2つのQRコードが配置されている場合、これらQRコードの描画データを取得し、この描画データにおける2つのQRコードについて一方の色が他方の色と異なるよう新たな描画データを生成する。図10(b)は左側のQRコードが黒色であるのに対し、右側のQRコードが黒以外の色になっている例を示している。   Next, a fifth embodiment will be described. The fifth embodiment is characterized in that when a plurality of QR codes are arranged, they are rearranged in different colors. FIG. 10 is a schematic diagram illustrating an example in which a plurality of QR codes are rearranged so that colors are different. That is, as shown in FIG. 10A, when two QR codes of the same color, for example, are arranged as the original document, drawing data of these QR codes is acquired, and one of the two QR codes in the drawing data is obtained. New drawing data is generated so that one color is different from the other color. FIG. 10B shows an example in which the left QR code is black while the right QR code is a color other than black.

このように、2つのQRコードの色を変えることで、これが印刷出力された媒体を読み取ってQRコードを復号する際、色の相違によって2つのQRコードを確実に区分けして読み取ることが可能となる。   In this way, by changing the colors of the two QR codes, when the QR code is decoded by reading the printed medium, the two QR codes can be reliably divided and read by the difference in color. Become.

図11は、色が異なる複数のQRコードの検出処理を説明するフローチャートである。この検出処理は、QRコードの画像を読み取ってその画像から復号を行う電子機器で実行される。   FIG. 11 is a flowchart illustrating a process for detecting a plurality of QR codes having different colors. This detection process is executed by an electronic device that reads an image of a QR code and decodes the image.

先ず、検出するQRコードの色を指定し(ステップS601)、読み取った画像からQRコードの位置検出パターンの中心座標を検出する(ステップS602)。この検出方法は、QRコードの隅部に配置された位置検出パターンの中心座標の検出方法を示すJIS-X-0510、p65-p66に記載の手法を用いる。   First, the color of the QR code to be detected is designated (step S601), and the center coordinates of the QR code position detection pattern are detected from the read image (step S602). This detection method uses the method described in JIS-X-0510, p65-p66, which shows the detection method of the center coordinates of the position detection pattern arranged at the corner of the QR code.

続いて、位置検出パターンの座標リストを作成し(ステップS603)、ステップS601で指定した色以外の位置検出パターンをリストから削除する(ステップS604)。   Subsequently, a coordinate list of position detection patterns is created (step S603), and position detection patterns other than the color designated in step S601 are deleted from the list (step S604).

次いで、位置検出パターンのリストから3個を選択する(ステップS605)。そして、この選択した3個の位置検出パターンの位置関係が直角二等辺三角形であるか否を判断し(ステップS606)、直角二等辺三角形でない場合には別の3個を選択する(ステップS605)。また、直角二等辺三角形である場合にはこの3個の位置検出パターンがQRコードを構成するため(ステップS607)、3個の位置検出パターンの座標を保持し、リストから削除する(ステップS608)。   Next, three are selected from the list of position detection patterns (step S605). Then, it is determined whether or not the positional relationship of the selected three position detection patterns is a right isosceles triangle (step S606). If it is not a right isosceles triangle, another three is selected (step S605). . In the case of a right isosceles triangle, these three position detection patterns constitute a QR code (step S607), and the coordinates of the three position detection patterns are held and deleted from the list (step S608). .

次に、リストに位置検出パターンの座標が3個以上残っているか否かを判断し(ステップS609)、残っている場合にはステップS605へ戻る。また、残っていない場合にはQRコードを構成する3個の位置検出パターンに基づいてQRコードを検出し(ステップS610)、検出したQRコードの復号を実行する(ステップS611)。ここで、3個の位置検出パターンからQRコードを検出するには、JIS-X-0510、p65-p66に記載の手法を用い、QRコードの復号には、JIS-X-0510に記載の手法を用いる。   Next, it is determined whether or not three or more coordinates of the position detection pattern remain in the list (step S609). If left, the process returns to step S605. If not, the QR code is detected based on the three position detection patterns constituting the QR code (step S610), and the detected QR code is decoded (step S611). Here, the method described in JIS-X-0510 and p65-p66 is used to detect the QR code from the three position detection patterns, and the method described in JIS-X-0510 is used to decode the QR code. Is used.

このように、2つのQRコードの色が相違することで、同じQRコードを構成する3個の位置検出パターンを確実かつ短時間で見つけることができ、正確にQRコードを検出して復号を行うことが可能となる。   As described above, since the colors of the two QR codes are different, the three position detection patterns constituting the same QR code can be found reliably and in a short time, and the QR code is accurately detected and decoded. It becomes possible.

次に、第6実施形態について説明する。第6実施形態では、複数のQRコードを配置する際に、各QRコードの近くに目立たない色でマーカを付けて再配置する点に特徴がある。図12は、複数のQRコードの各々についてマーカを付けて再配置する例を説明する模式図である。すなわち、図12(a)に示すように、元原稿として例えば2つのQRコードが配置されている場合、これらQRコードの描画データを取得し、この描画データにおける2つのQRコードの近傍に黄色等の人の目に付きにくい色のマーカを付加した新たな描画データを生成する。図12(b)は各QRコードの左上近傍に十字のマーカMを付した例を示している。   Next, a sixth embodiment will be described. The sixth embodiment is characterized in that, when a plurality of QR codes are arranged, markers are rearranged with inconspicuous colors near each QR code. FIG. 12 is a schematic diagram for explaining an example of rearranging each of a plurality of QR codes with a marker. That is, as shown in FIG. 12A, for example, when two QR codes are arranged as an original document, drawing data of these QR codes is acquired, and yellow or the like is adjacent to the two QR codes in the drawing data. New drawing data to which a marker of a color that is difficult to be seen by a person is added. FIG. 12B shows an example in which a cross marker M is added near the upper left of each QR code.

このように、各QRコードの近傍にマーカMを設けることで、これが印刷出力された媒体を読み取ってQRコードを復号する際、マーカMの検出によって2つのQRコードを確実に区分けして読み取ることが可能となる。   As described above, by providing the marker M in the vicinity of each QR code, when the QR code is decoded by reading the printed medium, the two QR codes are reliably divided and read by detecting the marker M. Is possible.

図13は、マーカが付された複数のQRコードの検出処理を説明するフローチャートである。この検出処理は、QRコードの画像を読み取ってその画像から復号を行う電子機器で実行される。   FIG. 13 is a flowchart illustrating a process for detecting a plurality of QR codes with markers. This detection process is executed by an electronic device that reads an image of a QR code and decodes the image.

先ず、QRコードの位置検出パターンの中心座標を検出する(ステップS701)。この検出方法は、QRコードの隅部に配置された位置検出パターンの中心座標の検出方法を示すJIS-X-0510、p65-p66に記載の手法を用いる。   First, the center coordinates of the QR code position detection pattern are detected (step S701). This detection method uses the method described in JIS-X-0510, p65-p66, which shows the detection method of the center coordinates of the position detection pattern arranged at the corner of the QR code.

続いて、位置検出パターンの中心座標のリストを作成した後(ステップS702)、読み取った画像からマーカを検出してマーカの基準座標を検出する(ステップS703)。このマーカの検出手法としては、一般的なパターンマッチング法を用いればよい。マーカを検出した後は、マーカの座標のリストを作成しておく(ステップS704)。   Subsequently, after creating a list of center coordinates of the position detection pattern (step S702), the marker is detected from the read image to detect the reference coordinates of the marker (step S703). As a marker detection method, a general pattern matching method may be used. After detecting the marker, a list of marker coordinates is created (step S704).

次いで、マーカのリストからマーカの座標を一つ選択し(ステップS705)、そのマーカ座標に近い位置検出パターンを位置検出パターンのリストから3個を検出する(ステップS706)。そして、この検出した3個の位置検出パターンの位置関係が直角二等辺三角形であるか否を判断し(ステップS707)、直角二等辺三角形でない場合には別の3個を検出する(ステップS706)。また、直角二等辺三角形である場合にはこの3個の位置検出パターンがQRコードを構成するため(ステップS708)、3個の位置検出パターンの座標を保持し、リストから削除する(ステップS709)。また、選択したマーカの座標をリストから削除する(ステップS710)。   Next, one marker coordinate is selected from the marker list (step S705), and three position detection patterns close to the marker coordinate are detected from the position detection pattern list (step S706). Then, it is determined whether or not the positional relationship of the detected three position detection patterns is a right isosceles triangle (step S707). If it is not a right isosceles triangle, another three are detected (step S706). . In the case of a right isosceles triangle, these three position detection patterns constitute a QR code (step S708), and the coordinates of the three position detection patterns are held and deleted from the list (step S709). . Further, the coordinates of the selected marker are deleted from the list (step S710).

次に、リストに位置検出パターンの座標が3個以上残っているか否かを判断し(ステップS711)、残っている場合にはステップS705へ戻る。また、残っていない場合にはQRコードを構成する3個の位置検出パターンに基づいてQRコードを検出し(ステップS712)、検出したQRコードの復号を実行する(ステップS713)。ここで、3個の位置検出パターンからQRコードを検出するには、JIS-X-0510、p65-p66に記載の手法を用い、QRコードの復号には、JIS-X-0510に記載の手法を用いる。   Next, it is determined whether or not three or more coordinates of the position detection pattern remain in the list (step S711), and if left, the process returns to step S705. If not, the QR code is detected based on the three position detection patterns constituting the QR code (step S712), and the detected QR code is decoded (step S713). Here, the method described in JIS-X-0510 and p65-p66 is used to detect the QR code from the three position detection patterns, and the method described in JIS-X-0510 is used to decode the QR code. Is used.

このように、各QRコードの近傍にマーカが付されていることで、同じQRコードを構成する3個の位置検出パターンを確実かつ短時間で見つけることができ、正確にQRコードを検出して復号を行うことが可能となる。   In this way, since the markers are attached in the vicinity of each QR code, the three position detection patterns constituting the same QR code can be found reliably and in a short time, and the QR code can be detected accurately. Decoding can be performed.

上記説明した実施形態では、二次元コードとしてQRコードを例としたが、本発明はこれに限定されず、各種の二次元コード(例えば、PDF417、マキシコード(Maxi Code)、データマトリクス(Data Matrix))に適用可能である。また、本発明の二次元コード生成プログラムは所定の記憶媒体に格納して配布したり、ネットワークを介して配信したりすることも可能である。   In the embodiment described above, the QR code is taken as an example of the two-dimensional code. However, the present invention is not limited to this, and various two-dimensional codes (for example, PDF417, Maxi Code, Data Matrix) Applicable to)). Further, the two-dimensional code generation program of the present invention can be stored and distributed in a predetermined storage medium, or distributed via a network.

本実施形態に係る二次元コード生成システムの構成を説明するブロック図である。It is a block diagram explaining the structure of the two-dimensional code generation system which concerns on this embodiment. 第1実施形態を説明するフローチャートである。It is a flowchart explaining 1st Embodiment. プリンタコントローラでの処理を説明するフローチャートである。4 is a flowchart illustrating processing in a printer controller. 複数のQRコードの間に境界線を入れる例を説明する模式図である。It is a schematic diagram explaining the example which puts a boundary line between several QR codes. 境界線を有する複数のQRコードの検出処理を説明するフローチャートである。It is a flowchart explaining the detection process of several QR code which has a boundary line. 複数のQRコードについてモジュールサイズに差を設ける例を説明する模式図である。It is a schematic diagram explaining the example which provides a difference in module size about several QR code. モジュールサイズが異なる複数のQRコードの検出処理を説明するフローチャートである。It is a flowchart explaining the detection process of several QR code from which module sizes differ. 複数のQRコードについて垂直方向に位置をずらす例を説明する模式図である。It is a mimetic diagram explaining an example which shifts a position in the perpendicular direction about a plurality of QR codes. 位置をずらして配置した複数のQRコードの検出処理を説明するフローチャートである。It is a flowchart explaining the detection process of several QR code arrange | positioned by shifting a position. 複数のQRコードについて色が異なるよう再配置する例を説明する模式図である。It is a schematic diagram explaining the example rearranged so that a color may differ about a some QR code. 色が異なる複数のQRコードの検出処理を説明するフローチャートである。It is a flowchart explaining the detection process of several QR code from which a color differs. 複数のQRコードの各々についてマーカを付けて再配置する例を説明する模式図である。It is a schematic diagram explaining the example which attaches a marker about each of several QR code, and rearranges. マーカが付された複数のQRコードの検出処理を説明するフローチャートである。It is a flowchart explaining the detection process of the some QR code with which the marker was attached | subjected. 位置検出パターンを説明する模式図である。It is a schematic diagram explaining a position detection pattern. 位置検出パターンによる直角二等辺三角形の構成例を示す模式図である。It is a schematic diagram which shows the structural example of the right isosceles triangle by a position detection pattern.

符号の説明Explanation of symbols

1…取得手段、2…二次元コード復号手段、3…二次元コード生成手段、4…描画データ生成手段、5…転送手段   DESCRIPTION OF SYMBOLS 1 ... Acquisition means, 2 ... Two-dimensional code decoding means, 3 ... Two-dimensional code generation means, 4 ... Drawing data generation means, 5 ... Transfer means

Claims (10)

二次元コードが付されたファイルを印刷装置へ転送するにあたり、
前記二次元コードの描画データを取得する取得手段と、
前記取得手段によって取得した前記描画データに基づき前記二次元コードの復号を行う復号手段と、
前記復号手段によって復号して得た情報から前記印刷装置の解像度に応じて新たな二次元コードを生成する二次元コード生成手段と、
前記描画データを前記二次元コード生成手段によって生成した新たな二次元コードの描画データと置き換える描画データ生成手段と
を備えることを特徴とする二次元コード生成システム。
When transferring a file with a two-dimensional code to a printer,
Obtaining means for obtaining drawing data of the two-dimensional code;
Decoding means for decoding the two-dimensional code based on the drawing data acquired by the acquisition means;
Two-dimensional code generation means for generating a new two-dimensional code according to the resolution of the printing apparatus from the information obtained by decoding by the decoding means;
A two-dimensional code generation system comprising: drawing data generation means for replacing the drawing data with drawing data of a new two-dimensional code generated by the two-dimensional code generation means.
前記二次元コード生成手段では、前記印刷装置の解像度が低いほど元の二次元コードの構成単位を大きくして前記新たな二次元コードにする
ことを特徴とする請求項1記載の二次元コード生成システム。
2. The two-dimensional code generation unit according to claim 1, wherein the two-dimensional code generation unit enlarges the constituent unit of the original two-dimensional code as the resolution of the printing apparatus is lower to make the new two-dimensional code. system.
前記二次元コード生成手段では、前記印刷装置の解像度が低いほど元の二次元コードのサイズを大きくして前記新たな二次元コードにする
ことを特徴とする請求項1記載の二次元コード生成システム。
2. The two-dimensional code generation system according to claim 1, wherein the two-dimensional code generation unit enlarges the size of the original two-dimensional code as the resolution of the printing apparatus is lower to obtain the new two-dimensional code. .
複数の二次元コードが付されたファイルを印刷装置へ転送するにあたり、
前記複数の二次元コードの描画データを取得する取得手段と、
前記取得手段によって取得した複数の二次元コードの描画データについて前記複数の二次元コードを区分けする新たな描画データを生成する描画データ生成手段と、
前記描画データ生成手段によって生成した新たな描画データを前記印刷装置へ転送する転送手段と
を備えることを特徴とする二次元コード生成システム。
When transferring files with multiple 2D codes to the printer,
Obtaining means for obtaining drawing data of the plurality of two-dimensional codes;
Drawing data generating means for generating new drawing data for dividing the plurality of two-dimensional codes with respect to drawing data of the plurality of two-dimensional codes acquired by the acquiring means;
A two-dimensional code generation system comprising: transfer means for transferring new drawing data generated by the drawing data generation means to the printing apparatus.
前記描画データ生成手段では、前記複数の二次元コードを区分けするため、前記複数の二次元コードの間に境界線の描画データを追加する
ことを特徴とする請求項4記載の二次元コード生成システム。
5. The two-dimensional code generation system according to claim 4, wherein the drawing data generation means adds boundary line drawing data between the plurality of two-dimensional codes in order to classify the plurality of two-dimensional codes. .
前記描画データ生成手段では、前記複数の二次元コードを区分けするため、前記複数の二次元コードの大きさに差を設けるよう前記新たな描画データを生成する
ことを特徴とする請求項4記載の二次元コード生成システム。
The said drawing data generation means produces | generates the said new drawing data so that a difference may be provided in the magnitude | size of these two-dimensional codes, in order to segment these two-dimensional codes. Two-dimensional code generation system.
前記描画データ生成手段では、前記複数の二次元コードを区分けするため、前記複数の二次元コードの色に差を設けるよう前記新たな描画データを生成する
ことを特徴とする請求項4記載の二次元コード生成システム。
5. The drawing data generation means generates the new drawing data so as to provide a difference in the colors of the plurality of two-dimensional codes in order to classify the plurality of two-dimensional codes. Dimension code generation system.
前記描画データ生成手段では、前記複数の二次元コードを区分けするため、前記複数の二次元コードの配置をずらすよう前記新たな描画データを生成する
ことを特徴とする請求項4記載の二次元コード生成システム。
5. The two-dimensional code according to claim 4, wherein the drawing data generation unit generates the new drawing data so as to shift an arrangement of the plurality of two-dimensional codes in order to sort the plurality of two-dimensional codes. Generation system.
二次元コードが付されたファイルを印刷装置へ転送するにあたり、
前記二次元コードの描画データを取得するステップと、
前記描画データに基づき復号を行うステップと、
前記復号して得た情報から前記印刷装置の解像度に応じて新たな二次元コードを生成するステップと、
前記描画データを前記新たな二次元コードの描画データと置き換えるステップと
をコンピュータによって実行することを特徴とする二次元コード生成プログラム。
When transferring a file with a two-dimensional code to a printer,
Obtaining drawing data of the two-dimensional code;
Decoding based on the drawing data;
Generating a new two-dimensional code according to the resolution of the printing apparatus from the information obtained by the decoding;
A step of replacing the drawing data with the drawing data of the new two-dimensional code is executed by a computer.
複数の二次元コードが付されたファイルを印刷装置へ転送するにあたり、
前記複数の二次元コードの描画データを取得するステップと、
前記複数の二次元コードの描画データについて前記複数の二次元コードを区分けする新たな描画データを生成し、前記印刷装置へ転送するステップと
をコンピュータによって実行することを特徴とする二次元コード生成プログラム。

When transferring files with multiple 2D codes to the printer,
Obtaining drawing data of the plurality of two-dimensional codes;
Generating a new drawing data for dividing the plurality of two-dimensional codes for the drawing data of the plurality of two-dimensional codes, and transferring the drawing data to the printing apparatus by a computer. .

JP2006038823A 2006-02-16 2006-02-16 Two-dimensional code generation system and two-dimensional code generation program Expired - Fee Related JP4978879B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006038823A JP4978879B2 (en) 2006-02-16 2006-02-16 Two-dimensional code generation system and two-dimensional code generation program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006038823A JP4978879B2 (en) 2006-02-16 2006-02-16 Two-dimensional code generation system and two-dimensional code generation program

Publications (2)

Publication Number Publication Date
JP2007219779A true JP2007219779A (en) 2007-08-30
JP4978879B2 JP4978879B2 (en) 2012-07-18

Family

ID=38497024

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006038823A Expired - Fee Related JP4978879B2 (en) 2006-02-16 2006-02-16 Two-dimensional code generation system and two-dimensional code generation program

Country Status (1)

Country Link
JP (1) JP4978879B2 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010039542A (en) * 2008-07-31 2010-02-18 Ricoh Co Ltd Operation information management system
JP2012118743A (en) * 2010-11-30 2012-06-21 Toshiba Corp Ticket medium and ticket medium processing apparatus
JP2013077248A (en) * 2011-09-30 2013-04-25 Toshiba Corp Issuing device, station service device, and station service system
WO2018037666A1 (en) * 2016-08-24 2018-03-01 日本電気株式会社 Information processing device, control method, and program
JP2020182143A (en) * 2019-04-26 2020-11-05 京セラドキュメントソリューションズ株式会社 Image processing apparatus

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10111906A (en) * 1996-10-04 1998-04-28 Tec Corp Information symbol print medium, information symbol printer, and information symbol reader
JP2000203098A (en) * 1999-01-19 2000-07-25 Advanced Peripherals Technologies Inc N-dimensional code printing method
JP2007216484A (en) * 2006-02-15 2007-08-30 Seiko Epson Corp Printer, printing method, program and storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10111906A (en) * 1996-10-04 1998-04-28 Tec Corp Information symbol print medium, information symbol printer, and information symbol reader
JP2000203098A (en) * 1999-01-19 2000-07-25 Advanced Peripherals Technologies Inc N-dimensional code printing method
JP2007216484A (en) * 2006-02-15 2007-08-30 Seiko Epson Corp Printer, printing method, program and storage medium

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010039542A (en) * 2008-07-31 2010-02-18 Ricoh Co Ltd Operation information management system
JP2012118743A (en) * 2010-11-30 2012-06-21 Toshiba Corp Ticket medium and ticket medium processing apparatus
JP2013077248A (en) * 2011-09-30 2013-04-25 Toshiba Corp Issuing device, station service device, and station service system
WO2018037666A1 (en) * 2016-08-24 2018-03-01 日本電気株式会社 Information processing device, control method, and program
JPWO2018037666A1 (en) * 2016-08-24 2018-12-27 日本電気株式会社 Information processing apparatus, control method, and program
US10860826B2 (en) 2016-08-24 2020-12-08 Nec Corporation Information processing apparatus, control method, and program
JP2020182143A (en) * 2019-04-26 2020-11-05 京セラドキュメントソリューションズ株式会社 Image processing apparatus
JP7293846B2 (en) 2019-04-26 2023-06-20 京セラドキュメントソリューションズ株式会社 Image processing device

Also Published As

Publication number Publication date
JP4978879B2 (en) 2012-07-18

Similar Documents

Publication Publication Date Title
US7523864B2 (en) Automatic placement of an object on a page
CA2044463C (en) Binary image processing for decoding self-clocking glyph shape codes
JP4854491B2 (en) Image processing apparatus and control method thereof
JP4557765B2 (en) Image processing apparatus and method
JP4194462B2 (en) Digital watermark embedding method, digital watermark embedding apparatus, program for realizing them, and computer-readable storage medium
JP5028843B2 (en) WRITING INFORMATION PROCESSING DEVICE, WRITING INFORMATION PROCESSING METHOD, AND PROGRAM
JP5834866B2 (en) Image processing apparatus, image generation method, and computer program
JP2008236200A (en) Image processor, image processing method, and program
JP4978879B2 (en) Two-dimensional code generation system and two-dimensional code generation program
CN1926506B (en) On-demand printing method, arrangement and equipment for coding patterns
CN100517385C (en) Image generating apparatus, image processing apparatus and method
JP2013059111A (en) Device, method, system and program of handling code
JP4635945B2 (en) WRITING INFORMATION PROCESSING DEVICE, WRITING INFORMATION PROCESSING METHOD, AND PROGRAM
JP4893643B2 (en) Detection method and detection apparatus
JP5966750B2 (en) Reading apparatus, image processing system, and reading program
US8005256B2 (en) Image generation apparatus and recording medium
JP4872924B2 (en) Image data forming method and image data forming apparatus
JP2008009833A (en) Document management device and program
JP4765894B2 (en) Image generating apparatus, information reading apparatus, and recording medium
JP2008021120A (en) Writing information processing system, writing information processing method, and program
JP2008071247A (en) Print information management and program
JP2009141525A (en) Apparatus and method of processing image
JP2011146852A (en) Control apparatus and control method
JP4821616B2 (en) Information embedding device, embedded information acquisition device
JP4900050B2 (en) Image generating apparatus and recording medium

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20081225

RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7421

Effective date: 20091009

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20110927

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20111102

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20111206

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20111213

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20120117

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120306

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

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20120408

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

Free format text: PAYMENT UNTIL: 20150427

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 4978879

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees