JP2016024776A - Two-dimensional code image generation method and two-dimensional code image - Google Patents

Two-dimensional code image generation method and two-dimensional code image Download PDF

Info

Publication number
JP2016024776A
JP2016024776A JP2014151048A JP2014151048A JP2016024776A JP 2016024776 A JP2016024776 A JP 2016024776A JP 2014151048 A JP2014151048 A JP 2014151048A JP 2014151048 A JP2014151048 A JP 2014151048A JP 2016024776 A JP2016024776 A JP 2016024776A
Authority
JP
Japan
Prior art keywords
luminance value
dimensional code
image
point
area
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.)
Pending
Application number
JP2014151048A
Other languages
Japanese (ja)
Inventor
崇行 中田
Takayuki Nakada
崇行 中田
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.)
Toyama Prefecture
Original Assignee
Toyama Prefecture
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 Toyama Prefecture filed Critical Toyama Prefecture
Priority to JP2014151048A priority Critical patent/JP2016024776A/en
Publication of JP2016024776A publication Critical patent/JP2016024776A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To provide a two-dimensional code image generation method and a two-dimensional code image allowing two-dimensional code data to be buried in a normal design image without the feeling of discomfort.SOLUTION: Each black-and-white module 11 forming a QR code (registered trademark) 10 is reduced, a margin area 16 in which reduction modules 15 are not displayed is formed around each reduction module 15, and the QR code 10 is formed by the reduction modules 15. Superimposed normal images are defined as an aggregate of fine point areas 18, a white or black fixed luminance value is given for each point area 18 of the images, error diffusion processing is performed for each point area 18, and the fixed luminance value of the point area 18 is determined. The normal image formed by the aggregate of the point areas 18 set to the fixed luminance value is superimposed on the margin area 16 of a display area by the reduction modules 15. In an arrangement position of the reduction modules 15, the fixed luminance value of the point areas 18 at the position is defined as a fixed luminance value of the reduction modules 15, and a difference in the luminance value with the normal image at the position is error-diffusion processed and is defined as a fixed luminance value of the surrounding point areas 18.SELECTED DRAWING: Figure 2

Description

この発明は、種々の目視により認識可能な画像中に、2次元コードを埋め込んだ画像を形成して表示する2次元コード画像生成方法と2次元コード画像に関する。   The present invention relates to a two-dimensional code image generation method and a two-dimensional code image for forming and displaying an image in which a two-dimensional code is embedded in various visually recognizable images.

近年、QRコード(登録商標、JIS X 0510、以下、単にQRコードと称す。)等の2次元コードが種々の広告媒体の外観上に表示されている。このQRコードは、暗モジュールと明モジュールである黒と白の等しい大きさの正方形の連続が所定の箇所に表示され、表示された2次元コードは、視覚的にはランダムな明暗として見えるものである。そのため、QRコードの一部もしくは全部を、特定のロゴや文字列、図形、絵画等となるようなパターンと合成して表示しようとしても、そのままではできないものであった。   In recent years, two-dimensional codes such as QR codes (registered trademark, JIS X 0510, hereinafter simply referred to as QR codes) have been displayed on the appearance of various advertising media. In this QR code, a series of squares of the same size of black and white, which are a dark module and a light module, are displayed at predetermined positions, and the displayed two-dimensional code is visually visible as random light and dark. is there. Therefore, even if a part or all of the QR code is combined with a pattern such as a specific logo, character string, figure, or picture, it cannot be displayed as it is.

そこで、特許文献1に開示されているように、QRコードの埋め草ビットのパターンを利用して、2次元コードの一部もしくは全部を、白黒のドットではなく、特定のロゴや文字列のパターンとして形成することが提案されている。このQRコードのパターンは、情報ビットを除いた埋め草ビットの範囲を多く設定するようにして、2次元コードを構成しているもので、符号化する情報に情報ビットの終端情報を付加して、冗長な情報ビットを付加しているものである。   Therefore, as disclosed in Patent Document 1, by using the padding bit pattern of the QR code, a part or all of the two-dimensional code is not a monochrome dot but a specific logo or character string pattern. It has been proposed to form as This QR code pattern forms a two-dimensional code by setting a large range of padding bits excluding information bits, and adds end information of information bits to information to be encoded. , Redundant information bits are added.

さらに、特許文献2,3に開示されているように、2次元コードに外観上認識可能な画像を埋め込んだQRコードを生成する方法も提案されている。この2次元コード生成方法では、2次元コードから読み取られるべき原データと、原データのデータ量に応じた2次元コードの不使用データ領域を特定し、不使用データ領域に対応する2値化デザインデータを、2次元コードのフォーマット情報に基づいて逆変換したビットコードに変換して、そのビットコードと原データのビットコードとを、2次元コードのフォーマット情報に基づいて変換して2次元コードを生成するものである。この2次元コード生成方法によれば、2次元コードを生成するためのデータには、原データの情報が含まれ、2次元コードにデザインパターンを表示しつつ、原データを2次元コードの読取装置に読み取らせることができる。   Furthermore, as disclosed in Patent Documents 2 and 3, a method of generating a QR code in which an image that can be visually recognized is embedded in a two-dimensional code has also been proposed. In this two-dimensional code generation method, the original data to be read from the two-dimensional code and the unused data area of the two-dimensional code corresponding to the data amount of the original data are specified, and the binarized design corresponding to the unused data area The data is converted into a bit code obtained by inverse conversion based on the format information of the two-dimensional code, the bit code and the bit code of the original data are converted based on the format information of the two-dimensional code, and the two-dimensional code is converted. Is to be generated. According to this two-dimensional code generation method, data for generating a two-dimensional code includes information on the original data, and the original data is displayed on the two-dimensional code while displaying the design pattern on the two-dimensional code. Can be read.

その他、特許文献4,5に開示されているように、視認可能な所定の画像の中に、付加情報としてのデータを目視不可能な状態で埋め込んで、埋め込み画像情報を生成する画像処理方法もあった。この画像処理方法では、埋め込まれる付加情報を、誤差拡散法等を用いて処理し、付加情報の存在を目視ではわからないようにしているものである。   In addition, as disclosed in Patent Documents 4 and 5, there is also an image processing method for generating embedded image information by embedding data as additional information in a visually invisible predetermined state in an invisible state. there were. In this image processing method, the additional information to be embedded is processed using an error diffusion method or the like so that the presence of the additional information is not visually recognized.

その他、非特許文献1に開示されているように、QRコードのモジュール縮小し、QRコードに重ね合わせたい通常の画像の2値化したデザイン画像を、誤差拡散法を用いて重畳する方法も、本願発明者により提案している。この非特許文献1では、縮小したモジュールを具体的にどのように考慮して誤差拡散を行うのかについては、示していなかった。   In addition, as disclosed in Non-Patent Document 1, a method of superimposing a binarized design image of a normal image desired to be superimposed on a QR code by using an error diffusion method as a QR code module is reduced. It has been proposed by the present inventor. This non-patent document 1 does not show how error diffusion is performed in consideration of the reduced module.

特開2009−163720号公報JP 2009-163720 A 特許第3953501号公報Japanese Patent No. 3953501 特許第3957735号公報Japanese Patent No. 3957735 特開平11−168616号公報Japanese Patent Laid-Open No. 11-168616 特開2007−124502号公報JP 2007-124502 A

2013年 電子情報通信学会総合大会 情報・システム講演論文集2 P170 誤差拡散画像の重畳による外観改善QRコードの作成2013 IEICE General Conference Information and Systems Proceedings 2 P170 Creation of QR code to improve appearance by superimposing error diffusion images

しかしながら、上記特許文献1に開示された2次元コード生成方法は、QRコードの埋め草ビットを利用して任意のドットパターンのイラストを表示したもので、2次元コードのビットパターン部分と、イラストの画像部分とが分離して併記されたものである。従って、QRコードの外観が、ビットパターン以外のデザインとして認識可能となったものではなく、2次元コードの領域及びイラスト画像の領域の双方が各々狭いもので、情報量が少なく表示画像としても体裁がよくないものである。   However, the two-dimensional code generation method disclosed in Patent Document 1 displays an illustration of an arbitrary dot pattern using the padding bits of the QR code, and the bit pattern portion of the two-dimensional code and the illustration The image part is separated and written together. Therefore, the appearance of the QR code is not recognizable as a design other than the bit pattern, and both the area of the two-dimensional code and the area of the illustration image are narrow, and the amount of information is small, so that it can be displayed as a display image. Is not good.

さらに、上記特許文献2,3に開示された2次元コード生成方法も、2次元コードの不使用データ領域を利用し、その不使用データ領域に通常のデザイン画像を重ね合わせたもので、2次元コードの表示がそのデザイン画像中にそのまま存在するものである。従って、2次元コード中にそのデザイン画像を目視で認識することができるが、全体として、2次元コード表示領域の画像が不自然なものとなってしまい、2次元コード中にデザイン画像を表示する効果が薄れてしまうものであった。   Furthermore, the two-dimensional code generation method disclosed in Patent Documents 2 and 3 also uses a non-use data area of a two-dimensional code and superimposes a normal design image on the non-use data area. The code display is directly present in the design image. Accordingly, the design image can be visually recognized in the two-dimensional code, but the image in the two-dimensional code display area becomes unnatural as a whole, and the design image is displayed in the two-dimensional code. The effect diminished.

また、特許文献4,5に開示された画像処理方法の場合、コード情報等の付加情報がデザイン画像中に認識不能に重畳されているものであるが、付加情報を取り出すには、その画像処理専用の復号化手段を用いないと認識できないものである。しかも、画像情報の中に付加情報が存在することが目視では分からないので、その画像に付加情報があることを知る人しか利用できないものであり、QRコードのように積極的に情報を読み取ってもらうことを目的とした広告画像等には利用できないものである。   In addition, in the case of the image processing methods disclosed in Patent Documents 4 and 5, additional information such as code information is superimposed in an unrecognizable manner in the design image. It cannot be recognized without using a dedicated decoding means. Moreover, since it cannot be visually confirmed that the additional information is present in the image information, it can be used only by a person who knows that the additional information is present in the image, and the information is actively read like a QR code. It cannot be used for advertisement images intended to be received.

この発明は、上記背景技術に鑑みて成されたものであり、通常のデザイン画像中に2次元コードデータを違和感なく目視可能に重畳することができる2次元コード画像生成方法と2次元コード画像を提供することを目的とする。   The present invention has been made in view of the above-described background art, and includes a two-dimensional code image generation method and a two-dimensional code image capable of superimposing two-dimensional code data on a normal design image so as to be visually observable. The purpose is to provide.

この発明は、白黒の2値で表示される2次元コードの画像中に任意のデザインで目視可能な画像である通常画像を重畳する2次元コード画像生成方法において、前記2次元コードを構成する白黒の各モジュールを縮小して縮小モジュールとし、前記縮小モジュールにより前記2次元コードを形成し、個々の前記縮小モジュールの周囲に前記縮小モジュールが表示されない余白領域を形成し、前記通常画像を、所定の輝度の微小な点領域の集合体としてとらえ、前記2次元コードの表示領域の前記点領域毎に、少なくとも白又は黒の固定輝度値を与えて、前記通常画像を重畳した前記2次元コードの表示領域の画像を形成し、その際に、前記点領域毎に誤差拡散処理を施して、前記点領域の前記固定輝度値を決定するものであって、前記縮小モジュールによる前記2次元コードの表示領域の前記余白領域には、前記固定輝度値に設定された前記点領域の集合体からなる前記通常画像を重ね合わせるとともに、前記2次元コードの表示領域の前記縮小モジュールの配置位置では、その位置での前記点領域の前記固定輝度値の設定に際して、前記縮小モジュールの輝度値を前記通常画像の輝度値に関わらずその点領域の前記固定輝度値と決定し、決定した前記固定輝度値とその位置での誤差拡散された輝度値との差分を次の誤差として周囲の前記点領域に拡散させる前記誤差拡散処理を施して、その点領域の前記固定輝度値を決定し、前記通常画像に前記2次元コードの画像を重畳した2次元コード画像を形成する2次元コード画像生成方法である。   The present invention provides a two-dimensional code image generation method for superimposing a normal image, which is an image that can be viewed with an arbitrary design, into a two-dimensional code image displayed in black and white, and the black and white constituting the two-dimensional code. Each module is reduced to a reduction module, the two-dimensional code is formed by the reduction module, a blank area where the reduction module is not displayed is formed around each of the reduction modules, and the normal image is defined as a predetermined module. Display of the two-dimensional code on which the normal image is superimposed by giving a fixed luminance value of at least white or black for each point area of the display area of the two-dimensional code, as a collection of point areas with minute brightness An image of a region is formed, and at that time, an error diffusion process is performed for each point region to determine the fixed luminance value of the point region, and the reduction mode In the margin area of the display area of the two-dimensional code by the rule, the normal image composed of the set of the point areas set to the fixed luminance value is overlaid, and the reduction of the display area of the two-dimensional code is performed. At the module arrangement position, when setting the fixed luminance value of the point area at that position, the luminance value of the reduction module is determined as the fixed luminance value of the point area regardless of the luminance value of the normal image, The difference between the determined fixed luminance value and the error-diffused luminance value at that position is diffused to the surrounding point region as the next error, and the fixed luminance value of the point region is A two-dimensional code image generation method for determining and forming a two-dimensional code image in which the image of the two-dimensional code is superimposed on the normal image.

前記点領域と前記縮小モジュールの大きさの差は、互いに20%以内に形成するものである。特に、前記点領域と前記縮小モジュールの大きさは等しいものであることが好ましい。   The difference in size between the point area and the reduction module is formed within 20% of each other. In particular, the size of the point area and the size of the reduction module is preferably the same.

さらに、前記誤差拡散処理は、前記点領域により白黒2値とその中間の灰色の固定輝度値の点を形成して、前記通常画像に前記2次元コードを重畳するものでも良い。   Further, the error diffusion process may be such that a point having a black and white binary value and a gray fixed luminance value in between is formed by the point area, and the two-dimensional code is superimposed on the normal image.

前記2次元コードはQRコードであり、前記縮小モジュールは、縮小する前の前記モジュールの20%以下で5%以上の面積比に設定するものである。   The two-dimensional code is a QR code, and the reduction module is set to an area ratio of 20% or less of the module before reduction and 5% or more.

またこの発明は、白黒の2値で表示される2次元コードの中に通常のデザイン画像である通常画像を重畳した2次元コード画像であって、前記2次元コードを構成する白黒の各モジュールを縮小して縮小モジュールとし前記縮小モジュールにより前記2次元コードを形成し、個々の前記縮小モジュールの周囲に前記縮小モジュールが表示されない余白領域を形成し、前記通常画像を、所定の輝度の微小な点領域の集合体としてとらえて、前記2次元コードの表示領域の前記点領域毎に、少なくとも白又は黒の固定輝度値を与えて、前記通常画像を重畳した前記2次元コードの表示領域の画像を形成し、前記点領域毎に誤差拡散処理を施して、前記点領域の前記固定輝度値を決定し、前記縮小モジュールによる前記2次元コードの表示領域の前記余白領域には、前記固定輝度値に設定された前記点領域の集合体からなる前記通常画像を重ね合わせるとともに、前記2次元コードの表示領域の前記縮小モジュールの配置位置では、その位置での前記点領域の前記固定輝度値の設定に際して、前記縮小モジュールの輝度値を前記通常画像の輝度値に関わらずその点領域の前記固定輝度値と決定し、決定した前記固定輝度値とその位置での誤差拡散された輝度値との差分を次の誤差として周囲の前記点領域に拡散させる前記誤差拡散処理を施しその点領域の前記固定輝度値を決定して、前記通常画像に前記2次元コードの画像を重畳して成る2次元コード画像である。   The present invention also provides a two-dimensional code image in which a normal image, which is a normal design image, is superimposed on a two-dimensional code displayed in black and white binary, and each black and white module constituting the two-dimensional code is provided. The two-dimensional code is formed by the reduction module by reducing the reduced module, a blank area where the reduced module is not displayed is formed around each of the reduced modules, and the normal image is changed to a minute dot with a predetermined luminance. An image of the display region of the two-dimensional code on which the normal image is superimposed by giving a fixed luminance value of at least white or black for each point region of the display region of the two-dimensional code, as a collection of regions. Forming a fixed luminance value for each of the point regions, determining the fixed luminance value of the point region, and displaying the two-dimensional code display region by the reduction module. In the margin area, the normal image composed of the collection of the point areas set to the fixed luminance value is overlaid, and the arrangement position of the reduction module in the display area of the two-dimensional code is the position at the position. When setting the fixed luminance value of the point area, the luminance value of the reduction module is determined as the fixed luminance value of the point area regardless of the luminance value of the normal image, and the determined fixed luminance value and the position at the position are determined. The error diffusion process for diffusing the difference from the error-diffused luminance value as the next error to the surrounding point area is performed, the fixed luminance value of the point area is determined, and the two-dimensional code of the normal image is determined. It is a two-dimensional code image formed by superimposing images.

この発明の2次元コード画像生成方法と2次元コード画像によれば、人が目視で認識可能な2次元コードを施した画像に、人が視認可能な通常のデザイン画像を重畳して、違和感のないデザイン画像である通常画像の表示を可能にするとともに、その画像内に設けられた2次元コードを確実且つ容易に読み取り装置により読み取り復号することが可能なものである。これにより、2次元コードが施された領域を通常のデザイン画像に近い外観状態で利用することが可能となり、2次元コード画像の利用範囲を広げることができ、2次元コードの利用者も、良好な視覚情報と正確なコード情報を得ることができる。   According to the two-dimensional code image generation method and the two-dimensional code image of the present invention, a normal design image that can be visually recognized by a person is superimposed on an image that has been subjected to a two-dimensional code that can be visually recognized by a person. It is possible to display a normal image that is not a design image, and to reliably and easily read and decode a two-dimensional code provided in the image by a reading device. As a result, it is possible to use the area to which the two-dimensional code has been applied in an appearance state close to that of a normal design image, so that the range of use of the two-dimensional code image can be expanded, and the user of the two-dimensional code is also good. Visual information and accurate code information can be obtained.

本発明の2次元コード画像生成方法の一実施形態に使用される2次元コードであるQRコードを説明する図である。It is a figure explaining the QR code which is a two-dimensional code used for one Embodiment of the two-dimensional code image generation method of this invention. この実施形態の縮小モジュールによる2次元コードを示す図である。It is a figure which shows the two-dimensional code by the reduction module of this embodiment. この実施形態の2次元コード画像生成方法に用いる誤差拡散処理を説明する模式図である。It is a schematic diagram explaining the error diffusion process used for the two-dimensional code image generation method of this embodiment. この実施形態の2次元コード画像生成方法に用いる誤差拡散処理の具体例を1次元で説明する模式図である。It is a schematic diagram explaining in one dimension a specific example of error diffusion processing used in the two-dimensional code image generation method of this embodiment. この実施形態の2次元コード画像生成方法に用いる誤差拡散処理において、縮小モジュールを加えて誤差拡散処理する具体例を1次元で説明する模式図である。It is a schematic diagram explaining in one dimension a specific example of performing error diffusion processing by adding a reduction module in the error diffusion processing used in the two-dimensional code image generation method of this embodiment. この実施形態の2次元コード画像生成方法に用いる誤差拡散処理の他の例において、周囲に拡散する輝度の割合を示す説明図である。It is explanatory drawing which shows the ratio of the brightness | luminance diffused in the periphery in the other example of the error diffusion process used for the two-dimensional code image generation method of this embodiment. この実施形態の2次元コード画像生成方法に用いる誤差拡散処理の他の例を説明する模式図である。It is a schematic diagram explaining the other example of the error diffusion process used for the two-dimensional code image generation method of this embodiment. この実施形態の2次元コード画像生成方法に用いる誤差拡散処理の他の例を説明する模式図である。It is a schematic diagram explaining the other example of the error diffusion process used for the two-dimensional code image generation method of this embodiment. この実施形態の2次元コード画像生成方法により形成した2次元コード画像の例(a),(b)を示す図である。It is a figure which shows the example (a), (b) of the two-dimensional code image formed with the two-dimensional code image generation method of this embodiment. この実施形態の2次元コード画像生成方法によりQRコードに重畳するデザイン画像(a)と、フロイト・スタインバーグ法により誤差拡散したデザイン画像(b)を示す図である。It is a figure which shows the design image (a) superimposed on QR Code by the two-dimensional code image generation method of this embodiment, and the design image (b) which carried out error diffusion by the Freud Steinberg method. この実施形態の2次元コード画像生成方法に用いる誤差拡散処理のさらに他の例を説明する模式図である。It is a schematic diagram explaining the further another example of the error diffusion process used for the two-dimensional code image generation method of this embodiment. この発明の2次元コード画像生成方法によるQRコードの縮小モジュールの各実施例(a),(b),(c),(d)を示す図である。It is a figure which shows each Example (a), (b), (c), (d) of the reduction module of QR Code by the two-dimensional code image generation method of this invention. この発明の2次元コード画像生成方法による実施例において、縮小モジュールのQRコードと誤差拡散画像の重畳結果の2次元コード画像の例(a),(b),(c),(d),(e),(f)を示す図である。In the embodiment of the two-dimensional code image generation method of the present invention, examples (a), (b), (c), (d), (d) of two-dimensional code images resulting from the superposition of the QR code of the reduction module and the error diffusion image It is a figure which shows e) and (f). この発明の2次元コード画像生成方法の4値誤差拡散QRコード画像の例を示す図である。It is a figure which shows the example of the quaternary error diffusion QR code image of the two-dimensional code image generation method of this invention.

以下、この発明の2次元コード画像生成方法の一実施形態について、図面に基づいて説明する。この実施形態の画像処理方法は、2次元コードとしてQRコードを用いるものである。ここで、QRコードについて簡単に説明する。図1に示すように、QRコード10は、白黒二値の小さな正方形の集合で描かれ、各々の小さな正方形をモジュールと称し、基本的に白黒のいずれかで描画される。図1に示すQRコード10のモジュール11は、機能パターン領域12と符号化領域14と呼ばれる二種類の領域に分類される。   Hereinafter, an embodiment of a two-dimensional code image generation method of the present invention will be described with reference to the drawings. The image processing method of this embodiment uses a QR code as a two-dimensional code. Here, the QR code will be briefly described. As shown in FIG. 1, the QR code 10 is drawn as a set of small black and white binary squares, each small square is called a module, and is basically drawn in either black and white. The module 11 of the QR code 10 shown in FIG. 1 is classified into two types of areas called a function pattern area 12 and an encoding area 14.

機能パターン領域12は、QRコード10の座標を設定するもので、カメラ等の読み取り装置により読み取られた画像の座標を修正して、認識したQRコード10の座標から、符号化領域14内のモジュール11の位置を修正し、符号を認識することにより、符号化領域14内のコード情報を復号可能する。   The function pattern area 12 sets the coordinates of the QR code 10, modifies the coordinates of the image read by a reading device such as a camera, and the modules in the coding area 14 from the recognized coordinates of the QR code 10. The code information in the coding area 14 can be decoded by correcting the position of 11 and recognizing the code.

符号化領域14は、QRコード10に記録される情報及び復号に用いる情報などが、白黒2値の画像により構成された2進数による符号化が行われて記録された領域であり、符号化領域14内の各モジュール11の輝度の相違を認識することで、記録された情報の復号が可能になる。QRコード10においては、モジュール11による情報が2進数で表現され、2進数の1を黒モジュール11a、0を白モジュール11bで表現している。さらに、符号化領域14は、データコード、誤り訂正コード、形式情報、型番情報の四種の領域に分類される。データコードには、QRコード10に記録される情報、情報の形式を表す文字モード、及び文字数などが記録されるもので、記録形式は規格により決められており、その詳細は省略する。   The encoding area 14 is an area in which information recorded in the QR code 10, information used for decoding, and the like are recorded after being encoded by binary numbers composed of black and white binary images. By recognizing the difference in brightness between the modules 11 within 14, the recorded information can be decoded. In the QR code 10, information by the module 11 is represented by a binary number, and the binary number 1 is represented by a black module 11a and 0 is represented by a white module 11b. Further, the encoding area 14 is classified into four types of areas of data code, error correction code, format information, and model number information. The data code records information recorded in the QR code 10, a character mode indicating the information format, the number of characters, and the like. The recording format is determined by the standard, and details thereof are omitted.

また、QRコード10の読み取り及び復号についても、所定の規格に基づいた処理により読みとり及び復号が行われるものであり、ここでは説明を省略する。   Also, reading and decoding of the QR code 10 are performed by processing based on a predetermined standard, and description thereof is omitted here.

次に、この発明の実施形態の2次元コード画像生成方法において、通常画像であるデザイン画像へのQRコード10の埋め込みについて説明する。まず、この実施形態の画像処理では、通常画像である任意のデザイン画像に埋め込むQRコード10のモジュール11を、図2に示すように、一定の割合で縮小して、デザイン画像にQRコード10を重畳するものである。この縮小モジュール15は、図2に示すように、例えば元の白又は黒の各モジュール11の1辺の長さを1/3〜1/5、各モジュール11の面積比にして約11%〜4%に縮小したものである。元の各モジュール11を、白又は黒の縮小モジュール15とすることにより、空いたスペースを自由に使用可能な余白領域16とする。   Next, in the two-dimensional code image generation method according to the embodiment of the present invention, the embedding of the QR code 10 into a design image that is a normal image will be described. First, in the image processing of this embodiment, the QR code 10 module 11 to be embedded in an arbitrary design image, which is a normal image, is reduced at a certain rate as shown in FIG. Superimpose. As shown in FIG. 2, the reduction module 15 has a length of one side of the original white or black module 11 of 1/3 to 1/5 and an area ratio of each module 11 of about 11% to about 11%. Reduced to 4%. By making each original module 11 a white or black reduction module 15, an empty space is made a blank area 16 that can be used freely.

QRコード10に重畳する通常画像は、白黒に二値化して重畳する。このとき、重畳された通常画像であるデザイン画像の外観を改善し、人が目視した際の違和感を最小限にするために、誤差拡散法を利用して元のデザイン画像の階調に近い外観状態の画像になるよう、画像処理を施す。   The normal image to be superimposed on the QR code 10 is binarized into black and white and superimposed. At this time, in order to improve the appearance of the design image that is the superimposed normal image and minimize the sense of incongruity when viewed by humans, the appearance close to the gradation of the original design image using the error diffusion method Image processing is performed so as to obtain a state image.

誤差拡散法による画像処理の一例について、以下に説明する。誤差拡散法は、白黒の2値化された画像の目視による見え方をより元の画像に近い見え方で表すために、画像を細かい点の集まりとして表現し、基の画像の色の濃い部分は黒点を密集させ、色の薄い部分は黒点の密度を下げることにより階調を表現するとともに、以下の処理を施して画像を表現したものである。ここで用いる誤差拡散法による最小単位の細かい点の一つ一つは、表示する画像を形成する点であり、この発明では点領域18と称する。この点領域18は、画像を形成する最小単位の1ピクセルと等しいか所定の複数のピクセルにより構成される。1ピクセルを1つの点領域18とすることにより、処理工数は増えるが、最もきめの細かい処理を施すことができる。   An example of image processing by the error diffusion method will be described below. The error diffusion method expresses an image as a collection of fine points in order to represent the visual appearance of a black and white binarized image closer to the original image, and the dark portion of the original image Represents dense gradation of black spots and expresses gradation by reducing the density of black spots in light-colored parts, and expresses an image by performing the following processing. Each of the fine points of the smallest unit by the error diffusion method used here is a point for forming an image to be displayed, and is referred to as a point region 18 in the present invention. The dot area 18 is composed of a plurality of pixels equal to or equal to one pixel as a minimum unit for forming an image. By setting one pixel to one point region 18, the number of processing steps increases, but the finest processing can be performed.

誤差拡散法の概念は、例えば図3(a)に示すような4×4ピクセルの領域に図3(b)に示すような2×2ピクセルの黒モジュール11aを描く場合、その黒モジュール11aの周囲にその輝度値の一部を、図3(c)に示すように周囲に拡散するものである。即ち、誤差拡散方法は、この例の4×4ピクセル全体では平均輝度が変わらないように輝度値を拡散させて、画像の輝度を調節する画像処理方法である。このように輝度の差を拡散することにより、全体として肉眼で見た場合の画像の印象が、図3(a)の画像と図3(d)に示す画像とで、平均輝度が等しいので、大きな違和感のないものにすることができる。   The concept of the error diffusion method is that, for example, when a 2 × 2 pixel black module 11a as shown in FIG. 3B is drawn in a 4 × 4 pixel region as shown in FIG. A part of the brightness value is diffused around as shown in FIG. In other words, the error diffusion method is an image processing method that adjusts the luminance of an image by diffusing the luminance value so that the average luminance does not change in the entire 4 × 4 pixels in this example. By diffusing the difference in brightness in this way, the average brightness is the same between the image shown in FIG. 3A and the image shown in FIG. It can be made without a great sense of incongruity.

次に、白黒の点領域18の輝度値を決定する誤差拡散法の具体的な処理方法について、図4に基づいて、一次元の場合を例に説明する。ここでの処理は、表示する画像の点領域18を256階調の輝度値で表した場合について、点領域18の輝度値を白又は黒に決定した際の差分を、隣接する点領域18に持ち越す処理を施すものである。具体的には、輝度値の閾値を128として、輝度値0の黒又は輝度値255の白に決定した最初の点領域18から、その差分を隣接する点領域18に持ち越す。隣の点領域18では、持ち越した値と元の輝度値の合計である累積値が、閾値である輝度値128以上ならば白すなわち輝度値255の固定輝度値とし、累積した輝度値が閾値128未満ならば黒、すなわち輝度値0の固定輝度値にする。このように、順次隣接する点領域18に累積値を持ち越して、その点領域18の輝度値を、白(輝度値255)又は黒(輝度値0)の固定輝度値に設定する。   Next, a specific processing method of the error diffusion method for determining the luminance value of the black and white dot region 18 will be described based on FIG. 4 by taking a one-dimensional case as an example. In this processing, when the point area 18 of the image to be displayed is represented by a luminance value of 256 gradations, the difference when the luminance value of the point area 18 is determined to be white or black is set to the adjacent point area 18. It carries out the carry-over process. Specifically, the threshold value of the luminance value is set to 128, and the difference is carried over to the adjacent point region 18 from the first point region 18 determined as black having a luminance value of 0 or white having a luminance value of 255. In the adjacent point region 18, if the accumulated value that is the sum of the carry-over value and the original luminance value is equal to or greater than the threshold luminance value 128, the fixed luminance value is white, that is, the luminance value 255, and the accumulated luminance value is the threshold value 128. If the value is less than black, the fixed luminance value is black, that is, the luminance value is zero. As described above, the accumulated value is sequentially carried over to the adjacent point regions 18 and the luminance value of the point region 18 is set to a fixed luminance value of white (luminance value 255) or black (luminance value 0).

まず、元の画像の輝度値が、各点領域毎18に図4(a)に示す数値であったとする。この各点領域18の画像を白黒で表示すため、この誤差拡散法では、図4(1)に示すように、左端の点領域18の輝度値65が閾値128未満なので、その点領域18の輝度値を0の固定輝度値とし、元の輝度値65を隣の点領域18に持ち越す。隣の点領域18では、元画像の輝度値70に、持ち越された輝度値を加算して135となる。そして、図4(2)に示すように、隣の点領域18の輝度値は閾値128以上となるので、その点領域の輝度値を255の固定輝度値とし、元の輝度値との差−120をさらに隣の点領域18に持ち越す。次の点領域18の元の輝度値は136であるので、持ち越した輝度値−120を加算すると、その点領域18は輝度値16となる。この輝度値16は閾値128未満なので、図4(3)に示すように、輝度値を固定輝度値の0として、差分の輝度値16をさらに隣に持ち越す。輝度値16が持ち越された点領域18の輝度値は、元の輝度値140に持ち越した輝度値16が加算されて、その点領域18は、輝度値156となる。その結果、この点領域18の輝度値は255の固定輝度値となり、差分の輝度値−99を隣に繰り越す。この処理を繰り返して、図4(4)に示すように、繰り越された点領域18の元の輝度値との差が−9になり、この点領域18の固定輝度値は0となる。さらに同様に誤差拡散により輝度値を隣の点領域18に繰り越し、図4(4)に示す固定輝度値の画像が形成される。このようにして、誤差拡散法による画像処理により、元の通常画像を、点領域18毎に輝度値が0又は255の固定輝度値、即ち黒又は白の点領域18の集合による画像に置き換える。   First, it is assumed that the luminance value of the original image is the numerical value shown in FIG. In order to display the image of each point area 18 in black and white, in this error diffusion method, the luminance value 65 of the left end point area 18 is less than the threshold value 128 as shown in FIG. The luminance value is set to a fixed luminance value of 0, and the original luminance value 65 is carried over to the adjacent point area 18. In the adjacent point region 18, the luminance value carried over is added to the luminance value 70 of the original image to be 135. Then, as shown in FIG. 4 (2), since the luminance value of the adjacent point region 18 is equal to or greater than the threshold value 128, the luminance value of the point region is set to a fixed luminance value of 255, and the difference from the original luminance value − 120 is further carried over to the adjacent point area 18. Since the original luminance value of the next point area 18 is 136, when the carried luminance value −120 is added, the point area 18 becomes the luminance value 16. Since this luminance value 16 is less than the threshold value 128, as shown in FIG. 4 (3), the luminance value is set to 0 as the fixed luminance value, and the difference luminance value 16 is carried over to the next side. The luminance value of the point area 18 where the luminance value 16 is carried over is added to the original luminance value 140, and the point area 18 becomes a luminance value 156. As a result, the luminance value of the dot region 18 becomes a fixed luminance value of 255, and the difference luminance value −99 is carried forward. By repeating this process, as shown in FIG. 4D, the difference from the original luminance value of the carried-over point area 18 becomes −9, and the fixed luminance value of this point area 18 becomes zero. Similarly, the luminance value is carried over to the adjacent point area 18 by error diffusion, and an image having a fixed luminance value shown in FIG. 4 (4) is formed. In this manner, the original normal image is replaced with a fixed luminance value having a luminance value of 0 or 255 for each point region 18, that is, an image based on a set of black or white point regions 18 by image processing using the error diffusion method.

さらにこの発明では、誤差拡散法により画像を形成する際に、元の通常画像であるデザイン画像に、縮小モジュール11aにより形成したQRコードの画像の輝度値を考慮して誤差拡散処理を行う。この処理では、元のデザイン画像の輝度値と縮小モジュール15で形成したQRコードの各点領域の輝度値を考慮し、QRコードの縮小モジュール11aが位置する点領域18では、縮小モジュール11aの固定輝度値をその点領域18の固定輝度値とし、その位置での誤差拡散された輝度値との差を隣接する点領域の誤差として、周囲に拡散する処理を行う。このようにして、各々の点領域18の輝度値について、誤差拡散処理を繰り越し、順次白又は黒の固定輝度値に各点領域18を設定して行く。この実施形態での誤差拡散法について、以下に、図5の具体例を基に説明する。   Furthermore, according to the present invention, when an image is formed by the error diffusion method, an error diffusion process is performed on the design image, which is the original normal image, in consideration of the brightness value of the QR code image formed by the reduction module 11a. In this process, the brightness value of the original design image and the brightness value of each point area of the QR code formed by the reduction module 15 are taken into consideration, and the reduction module 11a is fixed in the point area 18 where the QR code reduction module 11a is located. The brightness value is set as the fixed brightness value of the point area 18, and the difference from the error-diffused brightness value at that position is diffused around as the error of the adjacent point area. In this way, the error diffusion process is carried forward for the luminance values of the respective point regions 18, and the respective point regions 18 are sequentially set to fixed white or black luminance values. The error diffusion method in this embodiment will be described below based on the specific example of FIG.

ここで、元の通常画像の輝度値が、各点領域18毎に図5(a)に示す数値であり、QRコード10の縮小モジュール15による画像の輝度値が図5(b)に示す数値であったとする。各縮小モジュール15間は、余白領域16である。   Here, the luminance value of the original normal image is the numerical value shown in FIG. 5A for each point area 18, and the luminance value of the image by the reduction module 15 of the QR code 10 is the numerical value shown in FIG. 5B. Suppose that A space area 16 is provided between the reduction modules 15.

まず、通常画像とQRコード10の重畳画像を、白又は黒の固定輝度値の各点領域18で表示すにあたり、この誤差拡散法では、図5(1)に示すように、左端の点領域18の輝度値65が閾値128未満であるが、この点領域18に重畳されるQRコード10の対応する位置の縮小モジュール15の輝度値が255の固定輝度値であるので、この点領域18を図5(a)に示す輝度値に関わらず、固定輝度値255の白とする。そして、元の輝度値65との差分である−190の輝度値を隣の点領域18に持ち越す。   First, when the superimposed image of the normal image and the QR code 10 is displayed in each point area 18 having a fixed luminance value of white or black, in this error diffusion method, as shown in FIG. Although the luminance value 65 of 18 is less than the threshold value 128, the luminance value of the reduction module 15 at the corresponding position of the QR code 10 superimposed on this point region 18 is a fixed luminance value of 255. Regardless of the luminance value shown in FIG. 5A, the fixed luminance value 255 is white. Then, a luminance value of −190, which is a difference from the original luminance value 65, is carried over to the adjacent point area 18.

隣の点領域18では、通常画像である元画像の輝度値70に、持ち越された輝度値−190を加算して輝度値−120となる。これにより、図5(2)に示すように、隣の点領域18の輝度値は閾値128未満となるので、その点領域18の輝度値を固定輝度値0とし、元の輝度値との差−120をさらに隣の点領域18に持ち越す。次の点領域18の元の輝度値は136なので、持ち越した輝度値−120を加算すると、その点領域18は輝度値16となる。この輝度値16は閾値128未満なので、図5(3)に示すように、その点領域18の輝度値を固定輝度値0として、差分の輝度値16をさらに隣に持ち越す。隣の点領域18では、元の輝度値140に持ち越された輝度値16を加算して、その点領域18は輝度値156となる。   In the adjacent point region 18, the luminance value −190 carried over is added to the luminance value 70 of the original image which is a normal image, and becomes a luminance value −120. As a result, as shown in FIG. 5 (2), the luminance value of the adjacent point region 18 is less than the threshold value 128, so that the luminance value of the point region 18 is set to a fixed luminance value 0, and the difference from the original luminance value. Carry -120 further to the adjacent point area 18. Since the original luminance value of the next point area 18 is 136, when the carried luminance value −120 is added, the point area 18 becomes the luminance value 16. Since this luminance value 16 is less than the threshold value 128, as shown in FIG. 5 (3), the luminance value of the point area 18 is set to a fixed luminance value 0, and the difference luminance value 16 is carried over to the next. In the adjacent point area 18, the luminance value 16 carried over is added to the original luminance value 140, and the point area 18 becomes a luminance value 156.

輝度値156となる点領域18では、重畳されるQRコード10の対応する位置には、図5(b)に示すように、縮小モジュール15の輝度値0が固定輝度値として存在するので、この点領域18の輝度値は、元の画像の輝度値及び持ち越された輝度値に関わらず、図5(4)に示すように、その点領域18に対応したQRコード10の固定輝度値0とする。そして、決定した固定輝度値0と、本来の輝度値156との差分を隣の点領域18に持ち越して誤差拡散させる。   In the point area 18 where the luminance value 156 is obtained, the luminance value 0 of the reduction module 15 exists as a fixed luminance value at the corresponding position of the superimposed QR code 10, as shown in FIG. 5B. As shown in FIG. 5 (4), the luminance value of the point area 18 is equal to the fixed luminance value 0 of the QR code 10 corresponding to the point area 18, regardless of the luminance value of the original image and the luminance value carried over. To do. Then, the difference between the determined fixed luminance value 0 and the original luminance value 156 is carried over to the adjacent point area 18 and error diffusion is performed.

さらに、隣の点領域18では、持ち越した輝度値156が加算されて、輝度値246となり、図5(5)に示すように、この点領域18は固定輝度値255の白になり、差分の輝度値−9を隣に持ち越す。同様に、輝度値−9が持ち越された点領域18は、元の輝度値234から輝度値225となり、閾値128以上なので、図5(6)に示すように、輝度値255の固定輝度値で白となり、差分の輝度値−30をさらに隣の点領域18に持ち越す。   Further, in the adjacent point region 18, the carry-over luminance value 156 is added to become a luminance value 246, and as shown in FIG. 5 (5), this point region 18 becomes white with a fixed luminance value 255, and the difference Bring luminance value -9 to the next. Similarly, the point area 18 in which the luminance value −9 is carried over changes from the original luminance value 234 to the luminance value 225 and is equal to or greater than the threshold value 128. Therefore, as shown in FIG. It becomes white, and the difference luminance value −30 is further carried over to the adjacent point region 18.

そして、図5(6)に示すように、輝度値−30が持ち越された点領域18では輝度値98から輝度値68となる。しかし、この点領域18に重畳されるQRコード10の対応する位置には、図5(b)に示すように、縮小モジュール15の輝度値255が固定輝度値として存在するので、この点領域18の輝度値は、元の画像の輝度値及び持ち越された輝度値に関わらず、図5(7)に示すように、その点領域18に対応したQRコード10の縮小モジュール15の固定輝度値255の白とする。この点領域18を輝度値255としたことにより、元の輝度値68との差分の輝度値−187を隣の点領域18に繰り越し、繰り越された位置の点領域18でも同様の処理を行い、固定輝度値を決定する。   Then, as shown in FIG. 5 (6), the luminance value 98 changes to the luminance value 68 in the point area 18 where the luminance value −30 is carried over. However, as shown in FIG. 5B, the luminance value 255 of the reduction module 15 exists as a fixed luminance value at the corresponding position of the QR code 10 superimposed on the point region 18, and therefore the point region 18 As shown in FIG. 5 (7), the luminance value of the QR code 10 corresponding to the point area 18 is fixed as the fixed luminance value 255 regardless of the luminance value of the original image and the luminance value carried over. White. By setting the point area 18 to the luminance value 255, the luminance value -187 of the difference from the original luminance value 68 is carried over to the adjacent point area 18, and the same processing is performed in the point area 18 at the carried over position. Determine a fixed luminance value.

この処理を点領域18の輝度値について順次行い、図5(7)に示す点領域18の画像を形成し、元の通常画像とQRコード10の縮小モジュール15を重畳した画像を、輝度値が0又は255の固定輝度値、即ち黒又は白の点領域18の集合による画像に置き換える。   This process is sequentially performed for the luminance value of the point area 18 to form an image of the point area 18 shown in FIG. 5 (7), and an image obtained by superimposing the original normal image and the reduction module 15 of the QR code 10 has a luminance value. The image is replaced with an image having a fixed luminance value of 0 or 255, that is, a set of black or white dot regions 18.

このように、重畳する通常画像であるデザイン画像の輝度値と縮小モジュール15によるQRコード10の白黒の輝度値の画像を基に、誤差拡散法を適用して2次元コード画像を形成することにより、QRコード10を重畳しても、より元のデザイン画像に近い画像を形成することができる。   In this way, by forming the two-dimensional code image by applying the error diffusion method based on the luminance value of the design image that is the normal image to be superimposed and the black and white luminance value image of the QR code 10 by the reduction module 15. Even if the QR code 10 is superimposed, an image closer to the original design image can be formed.

このとき、一つの縮小モジュール15の大きさと、表示又は印刷されるデザイン画像の一つの点領域18の大きさの差を20%以内とすることが好ましく、より好ましくは等しくすることにより、滑らかで違和感のない画像を形成することができる。   At this time, it is preferable that the difference between the size of one reduction module 15 and the size of one dot region 18 of a design image to be displayed or printed is within 20%, and more preferably by making the difference smooth. An image without a sense of incongruity can be formed.

この発明の2次元コード画像生成方法の誤差拡散方法のより具体的な例として、例えば図6〜図8に示す、フロイト・スタインバーグ法によるものがある。この誤差拡散法は、基の画像の輝度値に対して、処理する点領域18の輝度値について、前記と同様に輝度値が128以上か未満かで、輝度値を0又は255に決定し、その差分を図6に示す割合で、その点領域18の右下4箇所に隣接する各点領域18に分配して累積させるものである。   As a more specific example of the error diffusion method of the two-dimensional code image generation method of the present invention, there is one based on the Freud Steinberg method shown in FIGS. In this error diffusion method, with respect to the luminance value of the base image, the luminance value of the point area 18 to be processed is determined to be 0 or 255 depending on whether the luminance value is 128 or more as described above, The difference is distributed and accumulated in the point areas 18 adjacent to the four lower right positions of the point area 18 in the ratio shown in FIG.

例えば、図7(a)に示すように、示す中央の点領域18の輝度値を白又は黒にしてその差分を拡散させる場合、中央の点領域18は輝度値159であるので、その点領域18は、輝度値255とし、その差分−96を、図7(b)に示すように、隣接する4箇所の点領域に分配する。分配は、図6に示す割合で行うもので、差分の値(−96)を16で除した値に、図6で示す分子の数を乗じてその隣接するピクセルの輝度値に加算する。すると、図7(b)に示すような輝度値になる。   For example, as shown in FIG. 7A, when the luminance value of the central point region 18 shown in FIG. 7 is set to white or black and the difference is diffused, the central point region 18 has the luminance value 159. Reference numeral 18 denotes a luminance value 255, and the difference −96 is distributed to four adjacent dot regions as shown in FIG. 7B. The distribution is performed at the ratio shown in FIG. 6, and the value obtained by dividing the difference value (−96) by 16 is multiplied by the number of numerators shown in FIG. 6 and added to the luminance value of the adjacent pixel. Then, the luminance value as shown in FIG.

同様に、例えば図8(a)に示すように、処理する点領域18の輝度値が80の場合、その点領域18は輝度値0の黒となり、差分の輝度値80を隣接する4箇所の点領域18に、上記のように分配する。これにより、図8(b)に示すような輝度値になる。この分配と累積を順次各点領域18で行い、各点領域18の輝度値、即ち白又は黒かを決定し、必要な画像領域を、白又は黒の点領域18の集合体で構成し画像を形成する。   Similarly, for example, as shown in FIG. 8A, when the luminance value of the point region 18 to be processed is 80, the point region 18 is black with a luminance value of 0, and the difference luminance value 80 is set to four adjacent luminance values. Distribute to the point area 18 as described above. As a result, the luminance value as shown in FIG. This distribution and accumulation is sequentially performed in each point area 18 to determine the luminance value of each point area 18, that is, whether it is white or black, and a necessary image area is configured by an aggregate of white or black point areas 18. Form.

この実施形態の2次元コード画像生成方法により形成した2次元コード画像の例を図9(a)(b)に示す。図10(a)はQRコード10に重畳する通常画像であるデザイン画像を示し、このデザイン画像を2値化して、フロイト・スタインバーグ法により誤差拡散した画像を図10(b)に示す。   An example of a two-dimensional code image formed by the two-dimensional code image generation method of this embodiment is shown in FIGS. FIG. 10A shows a design image which is a normal image superimposed on the QR code 10, and FIG. 10B shows an image obtained by binarizing the design image and error-diffusing by the Freud Steinberg method.

この結果、図9(a)に示すように、誤差拡散したデザイン画像にQRコードを単純に重ね合わせた2次元コード画像と比較して、図9(b)に示す画像のように、誤差拡散に際して、その位置での点領域18の輝度値に縮小モジュール15の輝度値を考慮し、縮小モジュール15の輝度値との差分を含めてその点領域18の輝度値を誤差拡散処理して二値化することにより、より違和感のない2次元コード画像を形成することができる。   As a result, as shown in FIG. 9A, compared with a two-dimensional code image obtained by simply superimposing a QR code on an error-diffused design image, an error diffusion as shown in FIG. At this time, the luminance value of the reduction area 15 is taken into consideration for the luminance value of the point area 18 at the position, and the luminance value of the point area 18 including the difference from the luminance value of the reduction module 15 is subjected to error diffusion processing to obtain a binary value. As a result, it is possible to form a two-dimensional code image that is more comfortable.

この実施形態の2次元コード画像生成方法によれば、人が目視で認識可能な2次元コードを表示した画像に、人が視認可能な通常のデザイン画像を重畳して、違和感のないデザイン画像である通常画像の形成を可能にする。これにより、2次元コードが施された領域を通常のデザイン画像として利用することが可能となり、2次元コード画像の利用範囲を広げることができ、2次元コードの利用者も、良好な視覚情報と正確なコード情報を得ることができる。   According to the two-dimensional code image generation method of this embodiment, a normal design image that can be visually recognized by a person is superimposed on an image that displays a two-dimensional code that can be visually recognized by a human. It enables the formation of some normal images. As a result, it is possible to use the area to which the two-dimensional code has been applied as a normal design image, and the range of use of the two-dimensional code image can be widened. Accurate code information can be obtained.

なお、この発明の誤差拡散法は上記実施形態に限定されるものではなく、白黒の2値の点領域で誤差拡散画像を形成する他、図11に模式的に示すように、黒から白までの輝度を4段階に分けて誤差拡散するものでもよい。この場合、例えば図11(a)に示すように、境界の閾値の輝度値を63,128,192とする。なお、図11(a)では、便宜上段階的に黒から白に輝度が変化して表示している。そして、図11(b)に示すように、輝度値63以下を固定輝度値0の黒とし、輝度値64〜127を固定輝度値128とし濃い灰色の点領域とし、輝度値128〜191を固定輝度値192として薄い灰色の点領域で表す。さらに、輝度値が192以上を、固定輝度値255として白の点領域とする。その他の処理は、上述の処理と同様である。   Note that the error diffusion method of the present invention is not limited to the above-described embodiment. In addition to forming an error diffusion image in a black and white binary point area, as schematically shown in FIG. May be divided into four stages for error diffusion. In this case, for example, as shown in FIG. 11A, the luminance values of the threshold values of the boundaries are 63, 128, and 192. In FIG. 11 (a), the luminance is changed from black to white step by step for convenience. Then, as shown in FIG. 11B, a luminance value of 63 or less is set to black with a fixed luminance value of 0, a luminance value of 64 to 127 is set to a fixed luminance value of 128, a dark gray dot region, and a luminance value of 128 to 191 is fixed. The brightness value 192 is represented by a light gray dot region. Further, a luminance value of 192 or more is set as a white dot region as a fixed luminance value 255. Other processes are the same as those described above.

これにより、より滑らかな階調表現が可能となり、より違和感のないQRコード重畳画像を形成することができる。   As a result, smoother gradation expression can be achieved, and a QR code superimposed image with a more uncomfortable feeling can be formed.

次に、この発明の2次元コード画像生成方法により作成した2次元コード画像の実施例について以下に説明する。この実施例では、QRコードの誤り訂正レベルH型(約30%)、大きさ6(cm)、静止画解像度2560×2048(pixel)、動画解像度1920×1080(pixel)、読み込みソフトQRdeCODEを用いた。   Next, an example of a two-dimensional code image created by the two-dimensional code image generation method of the present invention will be described below. In this embodiment, QR code error correction level H type (about 30%), size 6 (cm), still image resolution 2560 × 2048 (pixel), moving image resolution 1920 × 1080 (pixel), and reading software QRdeCODE are used. It was.

先ず、QRコードのモジュールを縮小して行き、どの大きさまで読み取り可能か検証を行った。縮めていない元のモジュールの面積を100%としたとき、縮小モジュールの大きさの比率を、モジュールの縮小率として表1に示す。さらに、この実験で作成した、縮小モジュールのQRコードを図12(a),(b),(c),(d)に示す。   First, the QR code module was scaled down to verify how large it can be read. When the area of the original module that has not been reduced is 100%, the ratio of the size of the reduced module is shown in Table 1 as the module reduction rate. Furthermore, the QR code of the reduction module created in this experiment is shown in FIGS. 12 (a), (b), (c), and (d).

この実施例による縮小モジュールのQRコードの読み取り結果を、表1の判定に示す。判定結果の○は5秒以内に読み取り、△は10秒以内に読み取り、×は10秒以上かかるまたは読めないことを表す。これにより、縮小率が4%の場合、読み取り性能が劣り、縮小率が2%の場合読み取りに問題があることが分かった。よって、縮小率は、少なくとも4%以上、好ましくは5%以上、より好ましくは6%以上であると良いことが確かめられた。
The result of reading the QR code of the reduction module according to this embodiment is shown in the determination of Table 1. The determination result ○ indicates that reading is performed within 5 seconds, Δ indicates reading within 10 seconds, and × indicates that it takes 10 seconds or longer or cannot be read. Accordingly, it was found that when the reduction ratio is 4%, the reading performance is inferior, and when the reduction ratio is 2%, there is a problem in reading. Therefore, it was confirmed that the reduction ratio was at least 4% or more, preferably 5% or more, more preferably 6% or more.

次に、縮小モジュールのQRコードと誤差拡散画像による画像の重畳結果を検証した。実験では、モジュールを加えて誤差拡散したものと単純に重畳したものについて、QRコードのモジュールを縮小して行き、一つの縮小モジュールと一単位の点領域の大きさを等しくして、どの大きさまで読み取り可能か検証を行った。これによる2次元コード画像を図13に示す。   Next, the result of image superimposition using the QR code of the reduction module and the error diffusion image was verified. In the experiment, the QR code module is reduced with respect to the one that is simply overlapped with the error diffused by adding the module, and the size of one reduced module and one unit point area are made equal to what size It was verified whether it was readable. FIG. 13 shows a two-dimensional code image based on this.

その結果、得られた2次元コード画像は、図13に示すように、モジュールの縮小率11.11%の場合、誤差拡散したデザイン画像にQRコードを単純重畳したもの(図13(a))と比較して、誤差拡散においてモジュールを加えて誤差拡散したもの(図13(b))は、目視により顔全体がはっきりと認識することができる。同様に、縮小率6.25%の場合も、誤差拡散したデザイン画像にQRコードを単純重畳したもの(図13(c))と比較して、誤差拡散において縮小モジュールを加えて誤差拡散したもの(図13(d))は、顔全体がよりはっきりと認識することができる。さらに、縮小率4.00%の場合も、誤差拡散において縮小モジュールを加えて誤差拡散したもの(図13(f))の方がそうでないもの(図13(e))と比較して、より顔の画像が綺麗であるが、縮小モジュールのQRコードの読み取り結果が良くないものであった。これらの2次元コード画像であるQRコードの読み取り結果を表2に示す。よって、縮小率は、少なくとも6%以上、好ましくは6%以上であると良く、点領域の大きさも縮小モジュールと同様に小さい方がよりきれいな合成画像を得ることができると言える。
As a result, the obtained two-dimensional code image is obtained by simply superimposing the QR code on the error-diffused design image when the module reduction ratio is 11.11% as shown in FIG. 13 (FIG. 13A). Compared with, in the error diffusion, the module with the addition of the error diffusion (FIG. 13B) can clearly recognize the entire face visually. Similarly, when the reduction ratio is 6.25%, the error diffusion is performed by adding the reduction module in the error diffusion as compared with the case where the QR code is simply superimposed on the error diffusion design image (FIG. 13C). In FIG. 13D, the entire face can be recognized more clearly. Further, in the case of a reduction rate of 4.00%, the error diffusion with the addition of the reduction module (FIG. 13 (f)) is more error-differing than that (FIG. 13 (e)). The face image is beautiful, but the QR code reading result of the reduction module is not good. Table 2 shows the results of reading these QR codes, which are two-dimensional code images. Therefore, it can be said that the reduction ratio is at least 6% or more, preferably 6% or more, and the smaller the dot area size is, the smaller the size of the dot module, the clearer the synthesized image can be obtained.

次に、上記実施形態の図11を基に説明した、4値誤差拡散QRコードの実施例について説明する。この4値誤差拡散法により、通常画像である図10(a)に示す画像とQRコードを重畳したところ、図14に示すように、より滑らかな階調表現が成された2次元コード画像を形成することができた。したがって、4値誤差拡散法は、このような2次元コードと通常画像との重畳に有効であることが確認された。   Next, an example of the quaternary error diffusion QR code described based on FIG. 11 of the above embodiment will be described. When the QR code is superimposed on the normal image shown in FIG. 10A by this quaternary error diffusion method, as shown in FIG. 14, a two-dimensional code image with a smoother gradation expression is obtained. Could be formed. Therefore, it was confirmed that the quaternary error diffusion method is effective for superimposing such a two-dimensional code and a normal image.

10 QRコード
11 モジュール
11a 黒モジュール
11b 白モジュール
12 機能パターン領域
14 符号化領域
15 縮小モジュール
16 余白領域
18 点領域
10 QR code 11 Module 11a Black module 11b White module 12 Function pattern area 14 Encoding area 15 Reduction module 16 Margin area 18 Point area

Claims (6)

白黒の2値で表示される2次元コードの画像中に任意のデザインで目視可能な画像である通常画像を重畳する2次元コード画像生成方法において、
前記2次元コードを構成する白黒の各モジュールを縮小して縮小モジュールとし前記縮小モジュールにより前記2次元コードを形成し、
個々の前記縮小モジュールの周囲に前記縮小モジュールが表示されない余白領域を形成し、
前記通常画像を、所定の輝度の微小な点領域の集合体としてとらえ、前記2次元コードの表示領域の前記点領域毎に、少なくとも白又は黒の固定輝度値を与えて、前記通常画像を重畳した前記2次元コードの表示領域の画像を形成し、その際に、前記点領域毎に誤差拡散処理を施して、前記点領域の前記固定輝度値を決定するものであって、
前記縮小モジュールによる前記2次元コードの表示領域の前記余白領域には、前記固定輝度値に設定された前記点領域の集合体からなる前記通常画像を重ね合わせるとともに、
前記2次元コードの表示領域の前記縮小モジュールの配置位置では、その位置での前記点領域の前記固定輝度値の設定に際して、前記縮小モジュールの輝度値を前記通常画像の輝度値に関わらずその点領域の前記固定輝度値と決定し、決定した前記固定輝度値とその位置での誤差拡散された輝度値との差分を次の誤差として周囲の前記点領域に拡散させる前記誤差拡散処理を施して、その点領域の前記固定輝度値を決定し、前記通常画像に前記2次元コードの画像を重畳した2次元コード画像を形成することを特徴とする2次元コード画像生成方法。
In a two-dimensional code image generation method for superimposing a normal image, which is an image that can be viewed with an arbitrary design, in an image of a two-dimensional code displayed in black and white,
The black and white modules constituting the two-dimensional code are reduced to form a reduction module, and the two-dimensional code is formed by the reduction module,
Forming a margin area around the individual reduced modules where the reduced modules are not displayed;
The normal image is regarded as a collection of minute point areas having a predetermined luminance, and at least a fixed luminance value of white or black is given to each point area of the display area of the two-dimensional code, and the normal image is superimposed. Forming an image of the display area of the two-dimensional code, and performing error diffusion processing for each point area to determine the fixed luminance value of the point area,
In the margin area of the display area of the two-dimensional code by the reduction module, the normal image composed of a collection of the point areas set to the fixed luminance value is overlaid,
In the arrangement position of the reduction module in the display area of the two-dimensional code, when setting the fixed luminance value of the point area at that position, the luminance value of the reduction module is set to that point regardless of the luminance value of the normal image. The error diffusion process is performed to determine the fixed luminance value of the region and diffuse the difference between the determined fixed luminance value and the error-diffused luminance value at the position to the surrounding point region as the next error. A method of generating a two-dimensional code image, wherein the fixed luminance value of the point area is determined, and a two-dimensional code image is formed by superimposing the two-dimensional code image on the normal image.
前記点領域と前記縮小モジュールの大きさの差は、互いに20%以内に形成する請求項1記載の2次元コード画像生成方法。   The two-dimensional code image generation method according to claim 1, wherein a difference in size between the point area and the reduction module is formed within 20% of each other. 前記点領域と前記縮小モジュールの大きさは等しいものである請求項2記載の2次元コード画像生成方法。   3. The two-dimensional code image generation method according to claim 2, wherein the size of the point area and the reduction module are equal. 前記誤差拡散処理は、前記点領域により白黒2値とその中間の灰色の固定輝度値の点を形成して、前記通常画像に前記2次元コードを重畳するものである請求項1記載の2次元コード画像生成方法。   2. The two-dimensional image according to claim 1, wherein the error diffusion process forms a black and white binary point and an intermediate gray fixed luminance value point by the point area and superimposes the two-dimensional code on the normal image. Code image generation method. 前記2次元コードはQRコードであり、前記縮小モジュールは、縮小する前の前記モジュールの20%以下で5%以上の面積比に設定する請求項1乃至4のいずれか記載の2次元コード画像生成方法。   5. The two-dimensional code image generation according to claim 1, wherein the two-dimensional code is a QR code, and the reduction module sets an area ratio of 20% or less of the module before reduction and 5% or more. Method. 白黒の2値で表示される2次元コードの中に通常のデザイン画像である通常画像を重畳した2次元コード画像であって、
前記2次元コードを構成する白黒の各モジュールを縮小して縮小モジュールとし前記縮小モジュールにより前記2次元コードを形成し、
個々の前記縮小モジュールの周囲に前記縮小モジュールが表示されない余白領域を形成し、
前記通常画像を、所定の輝度の微小な点領域の集合体としてとらえて、前記2次元コードの表示領域の前記点領域毎に、少なくとも白又は黒の固定輝度値を与えて、前記通常画像を重畳した前記2次元コードの表示領域の画像を形成し、前記点領域毎に誤差拡散処理を施して、前記点領域の前記固定輝度値を決定し、
前記縮小モジュールによる前記2次元コードの表示領域の前記余白領域には、前記固定輝度値に設定された前記点領域の集合体からなる前記通常画像を重ね合わせるとともに、
前記2次元コードの表示領域の前記縮小モジュールの配置位置では、その位置での前記点領域の前記固定輝度値の設定に際して、前記縮小モジュールの輝度値を前記通常画像の輝度値に関わらずその点領域の前記固定輝度値と決定し、決定した前記固定輝度値とその位置での誤差拡散された輝度値との差分を次の誤差として周囲の前記点領域に拡散させる前記誤差拡散処理を施しその点領域の前記固定輝度値を決定して、前記通常画像に前記2次元コードの画像を重畳して成ることを特徴とする2次元コード画像。
A two-dimensional code image in which a normal image, which is a normal design image, is superimposed on a two-dimensional code displayed in black and white binary;
The black and white modules constituting the two-dimensional code are reduced to form a reduction module, and the two-dimensional code is formed by the reduction module,
Forming a margin area around the individual reduced modules where the reduced modules are not displayed;
The normal image is regarded as a collection of minute point regions having a predetermined luminance, and at least a fixed luminance value of white or black is given to each point region of the display region of the two-dimensional code, and the normal image is obtained. Forming an image of the superimposed display area of the two-dimensional code, performing error diffusion processing for each point area, determining the fixed luminance value of the point area;
In the margin area of the display area of the two-dimensional code by the reduction module, the normal image composed of a collection of the point areas set to the fixed luminance value is overlaid,
In the arrangement position of the reduction module in the display area of the two-dimensional code, when setting the fixed luminance value of the point area at that position, the luminance value of the reduction module is set to that point regardless of the luminance value of the normal image. The error diffusion process is performed to determine the fixed luminance value of the region and diffuse the difference between the determined fixed luminance value and the error-diffused luminance value at the position as a next error to the surrounding point region. A two-dimensional code image obtained by determining the fixed luminance value of a point area and superimposing the image of the two-dimensional code on the normal image.
JP2014151048A 2014-07-24 2014-07-24 Two-dimensional code image generation method and two-dimensional code image Pending JP2016024776A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014151048A JP2016024776A (en) 2014-07-24 2014-07-24 Two-dimensional code image generation method and two-dimensional code image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014151048A JP2016024776A (en) 2014-07-24 2014-07-24 Two-dimensional code image generation method and two-dimensional code image

Publications (1)

Publication Number Publication Date
JP2016024776A true JP2016024776A (en) 2016-02-08

Family

ID=55271444

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014151048A Pending JP2016024776A (en) 2014-07-24 2014-07-24 Two-dimensional code image generation method and two-dimensional code image

Country Status (1)

Country Link
JP (1) JP2016024776A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108174217A (en) * 2017-12-06 2018-06-15 广州索答信息科技有限公司 A kind of generation of image code and analytic method, electronic equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108174217A (en) * 2017-12-06 2018-06-15 广州索答信息科技有限公司 A kind of generation of image code and analytic method, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
TWI571803B (en) Generation? method? of? color? qr? code
Li et al. An aesthetic QR code solution based on error correction mechanism
JP4867874B2 (en) Image processing program, image processing apparatus, and image processing method
US20150339838A1 (en) Image mask providing a machine-readable data matrix code
US8270037B2 (en) Digital watermark embedding apparatus and digital watermark detecting apparatus
JP2007013516A (en) Image processor, image processing method, image processing program and machine-readable recording medium with its program recorded
CN107247984B (en) Coding method of visual two-dimensional code
EP2731057A1 (en) Image with visible information coded therein
JP2016024776A (en) Two-dimensional code image generation method and two-dimensional code image
JP4469301B2 (en) Information embedding device, printing medium, and information reading device
JP4510743B2 (en) Tally image generating method and apparatus, tally image generating program, and secret image decoding method
CN106682717B (en) Method and system for generating halftone two-dimensional code
US20080273799A1 (en) Information processing apparatus, information processing method, program, and program storage medium
CN114549270A (en) Anti-shooting monitoring video watermarking method combining depth robust watermarking and template synchronization
JP5011583B2 (en) Image processing method and apparatus
JP2007067865A (en) Image processor, image processing method, and image processing program
CN107038734A (en) A kind of method of imaging importing text for Windows systems
JP2006033755A (en) Image processing apparatus
JP2010009133A (en) Two-dimensional code, method for creating same, and computer program
JP4446797B2 (en) Document restoration apparatus, document restoration method, document restoration program, and recording medium
CN112055868B (en) Watermarking of hidden data
JP2005269551A (en) Watermark information embedding apparatus, watermark information detecting apparatus, watermark information embedding method, watermark information detection method. and printed matter
KR101864454B1 (en) Apparatus and method for composing images in an image processing device
JP2008083180A (en) Image display system, and image display method, and program
JP6296319B1 (en) Information processing apparatus, display method, reading method, and computer-readable non-transitory storage medium