JP6273807B2 - Optical code with image and method for producing the same - Google Patents
Optical code with image and method for producing the same Download PDFInfo
- Publication number
- JP6273807B2 JP6273807B2 JP2013250216A JP2013250216A JP6273807B2 JP 6273807 B2 JP6273807 B2 JP 6273807B2 JP 2013250216 A JP2013250216 A JP 2013250216A JP 2013250216 A JP2013250216 A JP 2013250216A JP 6273807 B2 JP6273807 B2 JP 6273807B2
- Authority
- JP
- Japan
- Prior art keywords
- color
- image
- module
- optical code
- pixels
- 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.)
- Active
Links
- 230000003287 optical effect Effects 0.000 title claims description 211
- 238000004519 manufacturing process Methods 0.000 title 1
- 230000000007 visual effect Effects 0.000 claims description 215
- 238000000034 method Methods 0.000 claims description 122
- 230000008569 process Effects 0.000 claims description 104
- 238000006243 chemical reaction Methods 0.000 claims description 76
- 230000008859 change Effects 0.000 claims description 49
- 238000012545 processing Methods 0.000 claims description 29
- 238000011156 evaluation Methods 0.000 claims description 28
- 230000002093 peripheral effect Effects 0.000 claims description 26
- 238000012937 correction Methods 0.000 claims description 15
- 238000012854 evaluation process Methods 0.000 claims description 10
- 239000011159 matrix material Substances 0.000 claims description 7
- 238000005282 brightening Methods 0.000 claims description 5
- 230000006866 deterioration Effects 0.000 description 8
- 230000008901 benefit Effects 0.000 description 7
- 239000003086 colorant Substances 0.000 description 4
- 238000013461 design Methods 0.000 description 4
- 238000010586 diagram Methods 0.000 description 4
- 230000015556 catabolic process Effects 0.000 description 3
- 238000006731 degradation reaction Methods 0.000 description 3
- 238000001514 detection method Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 238000002360 preparation method Methods 0.000 description 2
- 238000000926 separation method Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000007704 transition Effects 0.000 description 1
- 238000011179 visual inspection Methods 0.000 description 1
Description
本発明は、明色と暗色のモジュールからなる光学コード本体を、目視するための視認画像に重ね合わせてなる画像付き光学コードに関する。 The present invention relates to an optical cord with an image formed by superimposing an optical code body composed of light and dark color modules on a visual image for visual observation.
バーコードや二次元コード等の光学コードであって、現在普及しているものは、基本単位となるモジュールに明色又は暗色を割り当てて情報を記録している。こうした光学コードは規格が統一されており、規格化された光学コードであれば、携帯電話等の読取装置でモジュールの明暗パターンを光学的に識別することで、誰でも記録された内容を知り得るように構成されている。 An optical code such as a bar code or a two-dimensional code, which is currently popular, records information by assigning a light color or a dark color to a module serving as a basic unit. These optical codes are standardized, and if they are standardized optical codes, anyone can know the recorded contents by optically identifying the light / dark pattern of the module with a reader such as a mobile phone. It is configured as follows.
光学コードは、本来、意匠性に欠けるものであるが、特許文献1には、光学コードをロゴマーク等の視認画像と重ね合わせて意匠性を付与した画像付き光学コードが提案されている。かかる画像付き光学コードは、二次元コードとロゴマークを重ね合わせたものであり、モジュール(セル)の中央部を二次元コードの色(明色又は暗色)で着色し、モジュールの周辺部をロゴマークの色とすることで、読取装置で二次元コードの明暗パターンを識別可能としつつ、ロゴマークを目視にて視認可能としたものである。 The optical code is inherently lacking in design, but Patent Document 1 proposes an optical code with an image in which design is imparted by superimposing the optical code on a visual image such as a logo mark. Such an optical code with an image is obtained by superimposing a two-dimensional code and a logo mark. The center of the module (cell) is colored with the color of the two-dimensional code (light or dark), and the periphery of the module is logo. By setting the color of the mark, it is possible to visually recognize the logo mark while making it possible to identify the light / dark pattern of the two-dimensional code by the reading device.
近年、光学コードは商品パッケージや広告等に頻繁に使用されているが、光学コードは目視する対象ではないため、これらに付された光学コードは、パッケージや広告の美観を損なうものとなっている。これに対して、上記特許文献1の画像付き光学コードのように、光学コードをパッケージ画像や広告画像等の視認画像と重ね合わせて目立ちにくくすることが考えられるが、上記特許文献1の画像付き光学コードは、モジュールの中央部を、光学コード(二次元コード)の色で塗りつぶしているため、光学コードを重ねた部分では、視認画像の画質が大きく低下してしまい、視認画像本来の意匠性が損なわれてしまう。 In recent years, optical codes are frequently used in product packages, advertisements, etc., but optical codes are not subject to visual inspection, so the optical codes attached to them impair the aesthetics of packages and advertisements. . On the other hand, like the optical code with an image of Patent Document 1, it is conceivable that the optical code is overlapped with a visual image such as a package image or an advertisement image to make it less noticeable. Since the optical code is painted in the center of the module with the color of the optical code (two-dimensional code), the image quality of the visual image is greatly reduced at the portion where the optical code is overlaid, and the original design of the visual image Will be damaged.
本発明は、かかる現状に鑑みてなされたものであり、光学コードと視認画像を重ね合わせてなる画像付き光学コードにあって、光学コードの読取精度を損なうことなく、光学コードが重なる部分で、視認画像の視認性を向上させることを目的とする。 The present invention has been made in view of the current situation, in the optical code with an image formed by superimposing the optical code and the visual image, the optical code overlaps without impairing the reading accuracy of the optical code, It aims at improving the visibility of a visual recognition image.
本発明は、読取装置によって明色と識別される明色モジュールと暗色と識別される暗色モジュールの二種類のモジュールからなる光学コード本体を、目視するための視認画像に重ね合わせてなる画像付き光学コードであって、視認画像は、明色モジュール及び暗色モジュールよりも小さい画素で構成されており、少なくとも一部の明色モジュールが視認画像と重なる部分では、当該モジュールの少なくとも中央部を含む色変換対象領域で、視認画像の画素のうち、所定の第1の明るさ閾値未満である画素が、第1の明るさ閾値以上となるよう色が変更され、かつ、第1の明るさ閾値以上である画素は色が変更されておらず、少なくとも一部の暗色モジュールが視認画像と重なる部分では、当該モジュールの少なくとも中央部を含む色変換対象領域で、視認画像の画素のうち、第1の明るさ閾値未満に設定された第2の明るさ閾値を上回る画素が、第2の明るさ閾値以下となるよう色が変更され、かつ、第2の明るさ閾値以下である画素は色が変更されていないことを特徴とする画像付き光学コードである。ここで、「第1の明るさ閾値」は、読取装置によって明色と識別され得る明るさであり、「第2の明るさ閾値」は、読取装置によって暗色と識別され得る明るさであることが提案される。「明るさ閾値」は、所定の輝度や明度とすることが挙げられるが、その他の明るさの尺度を用いることもできる。 The present invention relates to an optical with image formed by superimposing an optical code body composed of two types of modules, a light color module identified as a light color and a dark color module identified as a dark color, on a visual image for visual observation. The visual image is composed of pixels smaller than the light color module and the dark color module, and at least a part of the light color module overlaps the visual image, the color conversion including at least the central portion of the module. In the target region, among the pixels of the visual image, the color is changed so that a pixel that is less than the predetermined first brightness threshold is equal to or greater than the first brightness threshold, and is greater than or equal to the first brightness threshold. The color of a certain pixel is not changed, and at least a part of the dark color module overlaps the visual image, the color conversion target includes at least the center of the module. In the area, the color is changed so that the pixels of the visible image that exceed the second brightness threshold set to be less than the first brightness threshold are less than or equal to the second brightness threshold, and the first A pixel having a brightness threshold value of 2 or less is an optical code with an image characterized in that the color is not changed. Here, the “first brightness threshold” is the brightness that can be identified as a bright color by the reading device, and the “second brightness threshold” is the brightness that can be identified as a dark color by the reading device. Is proposed. The “brightness threshold” may be a predetermined brightness or brightness, but other brightness scales may be used.
すなわち、かかる構成にあっては、視認画像と光学コード本体の明色モジュールとが重なる部分では、色変換対象領域の画素が全て第1の明るさ閾値以上に変更されることで、当該モジュールと重なる部分が読取装置によって明色と識別されることとなる。そして、視認画像と光学コード本体の暗色モジュールとが重なる部分では、色変換対象領域の画素が全て第2の明るさ閾値以下に変更されることで、当該モジュールと重なる部分が読取装置によって暗色と識別されることとなる。ここで、本実施例にあっては、色変換対象領域で、視認画像の全ての画素を色変更するのでなく、明色モジュールと重なる部分に関しては、第1の明るさ閾値以上の画素を色変更せずそのままとし、暗色モジュールと重なる部分に関しては、第2の明るさ閾値以下の画素を色変更せずそのままとしているため、従来構成に比べて、視認画像の画質劣化を抑えることができるという利点がある。 That is, in such a configuration, in the portion where the visual image and the light color module of the optical code main body overlap, all the pixels in the color conversion target region are changed to the first brightness threshold or more, and thus the module and The overlapping portion is identified as a bright color by the reading device. Then, in the portion where the visual image and the dark color module of the optical code body overlap, all the pixels in the color conversion target area are changed to the second brightness threshold or less, so that the portion overlapping the module is changed to the dark color by the reading device. Will be identified. Here, in this embodiment, in the color conversion target region, the color of all the pixels of the visual image is not changed, but the pixel equal to or higher than the first brightness threshold is set for the portion overlapping the light color module. As for the portion overlapping with the dark color module without changing it, the pixels below the second brightness threshold value are left without changing the color, so that it is possible to suppress degradation of the image quality of the visible image compared to the conventional configuration. There are advantages.
本発明にあって、視認画像はカラー画像であり、光学コード本体と視認画像が重なる部分では、視認画像の全ての画素の色相が維持されている構成が挙げられる。 In the present invention, the visual image is a color image, and in the portion where the optical code body and the visual image overlap, a configuration in which the hues of all the pixels of the visual image are maintained can be mentioned.
色相の変化は、目視に与える影響は大きいが、読取装置による明暗の識別に与える影響は小さい。このため、かかる構成のように、視認画像がカラー画像である場合は、色変更する画素であっても色相を維持したまま明るさを変更して、画像付き光学コードにおいて、視認画像の全ての画素の色相を維持することで、視認画像の画質劣化をより一層抑えることが可能となる。なお、視認画像の明るさを変更する画素は、変更前後で色相が厳密に一致している必要はなく、目視レベルで同系統の色相と認識される程度に色相が維持されていればよい。 The change in hue has a large effect on visual observation, but has a small effect on light / dark discrimination by the reading device. For this reason, when the visual image is a color image as in such a configuration, the brightness is changed while maintaining the hue even if the pixel is to be changed in color, and the optical code with the image is used for all the visual images. By maintaining the hue of the pixel, it is possible to further suppress the deterioration of the image quality of the visually recognized image. It should be noted that the pixels that change the brightness of the visually recognized image do not need to have the same hue before and after the change, and it is sufficient that the hue is maintained to the extent that it is recognized as the same system hue at the visual level.
また、本発明にあって、視認画像は白色と黒色の画素からなるモノクロ画像であり、明色モジュールが視認画像と重なる部分では、前記色変換対象領域で、視認画像の黒色の画素が、第1の明るさ閾値以上の灰色に変更され、かつ、視認画像の白色の画素は色が変更されず、暗色モジュールが視認画像と重なる部分では、前記色変換対象領域で、視認画像の白色の画素が、第2の明るさ閾値以下の灰色に変更され、かつ、黒色の画素は色が変更されていない構成が提案される。 Further, in the present invention, the visual image is a monochrome image composed of white and black pixels, and in a portion where the light color module overlaps the visual image, the black pixel of the visual image is the first color conversion target region. In a portion where the color of the white pixel of the visual image is not changed and the dark color module overlaps the visual image, the white pixel of the visual image is the color conversion target area. However, a configuration is proposed in which the color is changed to gray below the second brightness threshold and the color of the black pixel is not changed.
かかる構成とすれば、白黒二値の画素からなる視認画像に、光学コード本体を適切に重ねることができる。 With such a configuration, the optical code body can be appropriately superimposed on a visual image made up of black and white binary pixels.
また、本発明にあって、光学コード本体は、モジュールをマトリックス状に配置してなる二次元コードであって、明色モジュールと暗色モジュールのいずれになるかが予め決定され、読取装置による光学的読取りを補助するパターンを構成する固定領域を備えるものであり、該固定領域を構成しないモジュールと視認画像が重なる部分では、前記色変換対象領域は、モジュールの周辺部を含まない構成が提案される。ここで、「モジュールの周辺部」とは、モジュールの外側でなく、モジュールの内部であって、当該モジュールの縁に近接する部分を指す。 Further, in the present invention, the optical code body is a two-dimensional code in which modules are arranged in a matrix, and it is determined in advance whether a light color module or a dark color module is used. A configuration is proposed in which a fixed area constituting a pattern for assisting reading is provided, and in a portion where a module that does not constitute the fixed area and a visual image overlap, the color conversion target area does not include a peripheral portion of the module. . Here, the “peripheral part of the module” refers to a part not inside the module but inside the module and close to the edge of the module.
通常、二次元コードを読み取る場合は、まず、撮像した二次元コードの画像に含まれる固定領域の明暗パターンに基づいてモジュールの切り出しが行われる。そして、切り出した各モジュールについて明色か暗色であるかが識別される。この明色と暗色の識別時には、夫々のモジュール中央部の色情報が重視され、周辺部の色情報は軽視される。これは、周辺部の色情報は、隣接するモジュールの色の影響を受けやすいためである。このように、二次元コードの場合は、モジュールの周辺部が明暗の識別に及ぼす影響は小さいため、モジュール周辺部を色変換対象領域から除外することで、光学コード本体の読取精度を確保しつつ、視認画像の画質を向上させることが可能となる。 Usually, when reading a two-dimensional code, first, a module is cut out based on a light and dark pattern of a fixed area included in an image of the captured two-dimensional code. Then, whether each module cut out is light or dark is identified. At the time of discriminating between the light color and the dark color, the color information at the center of each module is emphasized, and the color information at the periphery is neglected. This is because the color information of the peripheral part is easily influenced by the color of the adjacent module. In this way, in the case of a two-dimensional code, the influence of the peripheral part of the module on the discrimination of light and dark is small, so by removing the peripheral part of the module from the color conversion target area, the reading accuracy of the optical code main body is secured. It becomes possible to improve the image quality of the visually recognized image.
また、上記のように、視認画像が白色と黒色の画素からなるモノクロ画像である場合は、光学コード本体は、モジュールをマトリックス状に配置してなる二次元コードであって、明色モジュールと暗色モジュールのいずれになるかが予め決定され、読取装置による光学的読取りを補助するパターンを構成する固定領域を備えるものであり、該固定領域を構成しない明色モジュールと視認画像が重なる部分では、当該モジュールの色変換対象領域はモジュールの中央部のみであり、当該モジュールの周辺部では、視認画像の黒色画素が、第1の明るさ閾値未満の灰色に変更され、かつ、視認画像の白色の画素は色が変更されておらず、該固定領域を構成しない暗色モジュールと視認画像が重なる部分では、当該モジュールの色変換対象領域はモジュールの中央部のみであり、該モジュールの周辺部では、視認画像の白色画素が、第2の明るさ閾値を上回る灰色に変更され、かつ、視認画像の黒色の画素は色が変更されていない構成が提案される。 Further, as described above, when the visual image is a monochrome image composed of white and black pixels, the optical code body is a two-dimensional code in which modules are arranged in a matrix, and the light color module and dark color Which one of the modules is determined in advance, and includes a fixed region that forms a pattern that assists optical reading by the reading device. In a portion where the light color module that does not configure the fixed region overlaps the visual image, The color conversion target area of the module is only the central part of the module. In the peripheral part of the module, the black pixel of the visual image is changed to gray less than the first brightness threshold, and the white pixel of the visual image In the part where the color is not changed and the dark color module that does not constitute the fixed area overlaps the visible image, the color conversion target area of the module is the module. Only the central part of the module, and in the peripheral part of the module, the white pixels of the visible image are changed to gray exceeding the second brightness threshold, and the color of the black pixels of the visible image is not changed. A configuration is proposed.
視認画像が白黒二値のモノクロ画像の場合、上述のように、モジュールの周辺部を色変換対象領域から除いた時に、色変換対象領域と周辺部のコントラストが高くなるため、読取装置で読み取った時に、色変換対象領域の色情報が周辺部の色の影響を受けて識別誤りが発生する確率が高くなるが、かかる構成のように、色変換対象領域と周辺部のコントラストを低くしておけば、モジュールの明暗を読取装置によって正確に識別可能となる。 When the visual image is a monochrome binary monochrome image, as described above, when the peripheral portion of the module is removed from the color conversion target region, the contrast between the color conversion target region and the peripheral portion becomes high, so that the image is read by the reading device. Occasionally, the color information of the color conversion target area is affected by the color of the peripheral part, and the probability that an identification error will occur increases.However, as in this configuration, the contrast between the color conversion target area and the peripheral part can be kept low. For example, the brightness of the module can be accurately identified by the reader.
また、本発明にあって、光学コード本体は、モジュールをマトリックス状に配置してなる二次元コードであって、明色モジュールと暗色モジュールのいずれになるかが予め決定され、読取装置による光学的読取りを補助するパターンを構成する固定領域を備えるものであり、該固定領域を構成するモジュールと視認画像が重なる部分では、前記色変換対象領域は、モジュール全体である構成が提案される。 Further, in the present invention, the optical code body is a two-dimensional code in which modules are arranged in a matrix, and it is determined in advance whether a light color module or a dark color module is used. A configuration is proposed in which a fixed area constituting a pattern for assisting reading is provided, and the color conversion target area is the entire module in a portion where the module constituting the fixed area and the visible image overlap.
かかる構成にあっては、固定領域を構成する明色モジュールと重なる部分では、視認画像の全ての画素が第1の明るさ閾値以上となり、固定領域を構成する暗色モジュールと重なる部分では、全ての画素が第2の明るさ閾値以下となるため、読取装置によって、固定領域の明暗パターンを確実に識別可能となる。上述のように、固定領域のモジュールの明暗パターンは、その他のモジュールを切り出す位置を決定するのに用いられるものであり、その他のモジュールに比べて、正確に識別する必要性が高いものであるから、本構成のように、固定領域のモジュールの識別性を高くしておけば、光学コード本体の読取精度を高めることが可能となる。 In such a configuration, in the portion overlapping with the light color module constituting the fixed region, all the pixels of the visually recognized image are equal to or higher than the first brightness threshold, and in the portion overlapping with the dark color module constituting the fixed region, Since the pixel is equal to or smaller than the second brightness threshold, the light / dark pattern of the fixed area can be reliably identified by the reading device. As described above, the light / dark pattern of the module in the fixed area is used to determine the position where the other module is cut out, and it is more necessary to accurately identify the module than the other module. If the identification of the module in the fixed area is made high as in this configuration, the reading accuracy of the optical code body can be increased.
また、本発明の別の態様は、読取装置によって明色と識別される明色モジュールと暗色と識別される暗色モジュールの二種類のモジュールからなる光学コード本体を、目視するための視認画像に重ね合わせてなる画像付き光学コードを作成する画像付き光学コードの作成方法であって、少なくとも一部の明色モジュールが視認画像と重なる部分について、当該モジュールの少なくとも中央部を含む色変換対象領域で、視認画像の画素のうち、所定の第1の明るさ閾値未満である画素を、第1の明るさ閾値以上となるよう色を変更し、かつ、第1の明るさ閾値以上である画素は色を変更しない明色化処理を実行し、少なくとも一部の暗色モジュールが視認画像と重なる部分では、当該モジュールの少なくとも中央部を含む色変換対象領域で、視認画像の画素のうち、第1の明るさ閾値未満に設定された第2の明るさ閾値を上回る画素を、第2の明るさ閾値以下となるよう色を変更し、かつ、第2の明るさ閾値以上である画素は色を変更しない暗色化処理を実行することを特徴とする画像付き光学コードの作成方法である。かかる構成によれば、上記画像付き光学コードを容易に作成可能となる。 In another aspect of the present invention, an optical code body composed of two types of modules, a light color module identified as a light color by a reader and a dark color module identified as a dark color, is superimposed on a visual image for visual observation. A method of creating an optical code with an image for creating an optical code with an image, and at least a part of a light color module overlapping a visual image, in a color conversion target region including at least a central portion of the module, Among the pixels of the visual image, the color of a pixel that is less than the predetermined first brightness threshold is changed to be equal to or greater than the first brightness threshold, and the pixel that is equal to or greater than the first brightness threshold is a color In a portion where at least a part of the dark color module is overlapped with the visual image, the light conversion process is performed without changing the color in the color conversion target area including at least the central part of the module Among the pixels of the image, the color of a pixel that exceeds the second brightness threshold set to be less than the first brightness threshold is changed so as to be equal to or less than the second brightness threshold, and the second brightness The method of creating an optical code with an image is characterized in that a darkening process that does not change a color is executed for pixels that are equal to or greater than a threshold value. According to such a configuration, the optical code with an image can be easily created.
また、上記画像付き光学コードの作成方法にあって、光学コード本体は誤り訂正機能を具備するものであって、明色化処理と暗色化処理を実行した部分について、視認画像の画素の色の変更度合いをモジュール単位で示すモジュール単位評価値を算出する色変更評価処理を実行し、モジュール単位評価値が相対的に高いモジュールについて、当該モジュールと視認画像が重なる部分において、明色化処理又は暗色化処理を取り消す色変更取消処理を実行することが提案される。 Further, in the above-described method for creating an optical code with an image, the optical code body has an error correction function, and the color of the pixel of the visual image is determined with respect to a portion where the lightening process and the darkening process are performed. A color change evaluation process for calculating a module unit evaluation value indicating the degree of change in module units is performed, and for a module having a relatively high module unit evaluation value, a lightening process or a dark color is performed in a portion where the module and the visible image overlap. It is proposed to perform a color change cancellation process that cancels the conversion process.
ここで、モジュール単位評価値としては、例えば、当該モジュールと重なる部分で、色が変更された視認画像の画素の総数とすることが挙げられる。また、画素の色がRGB値などの数値で表現される場合は、色変更前後のRGB値の差を当該画素の色変更度合いを示す評価値とし、当該評価値を当該モジュールの全ての画素で合計したものをモジュール単位評価値とすることが挙げられる。 Here, the module unit evaluation value may be, for example, the total number of pixels of the visually recognized image whose color has been changed in a portion overlapping the module. When the color of a pixel is expressed by a numerical value such as an RGB value, the difference between the RGB values before and after the color change is used as an evaluation value indicating the degree of color change of the pixel, and the evaluation value is used for all the pixels of the module. The total is used as the module unit evaluation value.
かかる方法によれば、明色化処理又は暗色化処理を行った部分のうち、視認画像の画素の色の変更度合いが相対的に高かった部分について、明色化処理や暗色化処理が取り消されて、視認画像の画素の色が、画像付き光学コードにそのまま反映されることとなるから、視認画像の画質劣化を抑えることが可能となる。なお、光学コード本体が誤り訂正機能を具備している場合、読取装置は、全てのモジュールの明暗を正確に識別しなくても、光学コード本体に記憶された情報を読み取ることができるから、誤り訂正機能で訂正可能な範囲内であれば、色変更取消処理によって光学コード本体が読取不能となることはない。 According to this method, the lightening process or the darkening process is canceled for a part in which the degree of change in the color of the pixel of the visual image is relatively high among the parts subjected to the lightening process or the darkening process. Thus, since the color of the pixel of the visually recognized image is reflected as it is in the optical code with an image, it is possible to suppress degradation of the image quality of the visually recognized image. If the optical code body has an error correction function, the reader can read the information stored in the optical code body without accurately identifying the brightness of all modules. If it is within the range correctable by the correction function, the color code cancel process does not make the optical code body unreadable.
また、上記画像付き光学コードの作成方法にあって、前記誤り訂正機能は、所定数のモジュールによって構成されるシンボル単位で誤り訂正を行うものであって、色変更取消処理では、モジュール単位評価値が相対的に高いモジュールと、当該モジュールと同じシンボルを構成するモジュールについて、明色化処理又は暗色化処理を取り消すことが提案される。 Further, in the above method for creating an optical code with an image, the error correction function performs error correction in symbol units constituted by a predetermined number of modules. In the color change cancellation processing, the module unit evaluation value It is proposed to cancel the lightening process or the darkening process for a module having a relatively high value and a module constituting the same symbol as the module.
シンボル単位で誤り訂正を行う光学コードでは、基本的に、モジュールの識別誤りが1つでも発生すると、当該モジュールと同一シンボルを構成するモジュール全てで、モジュールの識別誤りが発生したとみなされる。このため、かかる方法のように、色変更取消処理をシンボル単位で実行すれば、誤り訂正が可能な範囲で、視認画像の画質劣化を効率よく抑えることが可能となる。 In an optical code that performs error correction in symbol units, basically, if even one module identification error occurs, it is considered that a module identification error has occurred in all the modules constituting the same symbol as that module. For this reason, if the color change cancellation processing is executed in units of symbols as in this method, it is possible to efficiently suppress deterioration in the image quality of the visually recognized image within a range where error correction is possible.
また、上記画像付き光学コードの作成方法にあって、光学コード本体を視認画像に重ね合わせる位置及び/又は角度の候補を複数決定する重ね合わせ位置候補決定処理と、前記各候補について光学コード本体と視認画像を重ね合わせて、画像付き光学コードの候補となる候補画像データを得る候補画像データ作成処理と、各候補画像データで、光学コード本体と視認画像の重なる部分について、視認画像の画素の色の変更度合いを示す候補画像評価値を算出する候補画像評価処理と、候補画像評価値が最も小さい候補画像データを、画像付き光学コードとして決定する画像付き光学コード決定処理とを備えることが提案される。 Further, in the above method for creating an optical code with an image, a superposition position candidate determination process for determining a plurality of position and / or angle candidates for superimposing an optical code body on a visual image, and an optical code body for each candidate Candidate image data creation processing that obtains candidate image data that is a candidate for an optical code with an image by superimposing the visual images, and the color of the pixel of the visual image for the portion where the optical code body and the visual image overlap in each candidate image data It is proposed to include a candidate image evaluation process for calculating a candidate image evaluation value indicating the degree of change of the image, and an optical code determination process with an image for determining candidate image data with the smallest candidate image evaluation value as an optical code with an image. The
かかる方法によれば、重ね合わせる位置や角度の異なる複数の候補について、光学コード本体と視認画像を実際に重ね合わせて、視認画像の色の変更度合いの少ない位置・角度を選択することで、視認画像の画質劣化をより一層抑えることが可能となる。 According to such a method, for a plurality of candidates with different positions and angles to be overlapped, the optical code body and the visual image are actually overlapped, and a position and an angle with a small degree of change in the color of the visual image are selected. It is possible to further suppress the image quality deterioration of the image.
以上に述べたように、本発明によれば、光学コードの読取精度を損なうことなく、従来構成に比べて、視認画像の視認性の高い画像付き光学コードを実現できる。このため、本発明の画像付き光学コードを用いれば、従来よりも意匠性の高い、光学コード付きのパッケージ画像や広告画像を実現できる。 As described above, according to the present invention, it is possible to realize an optical code with an image that has a higher visibility of a visually recognized image than the conventional configuration without impairing the reading accuracy of the optical code. For this reason, if the optical code with an image of the present invention is used, a package image and an advertisement image with an optical code having higher design than conventional ones can be realized.
本発明の実施形態を、以下の実施例に従って説明する。 Embodiments of the present invention are described according to the following examples.
本実施例の画像付き光学コード1は、図1に示すように、花の写真からなる視認画像2に、二次元コードからなる光学コード本体3を重ね合わせたものである。 As shown in FIG. 1, the optical cord with image 1 of the present embodiment is obtained by superposing an optical code body 3 made of a two-dimensional code on a visual image 2 made of a photograph of a flower.
視認画像2は800×700ピクセルの画素によって構成される画像である。なお、図1では色彩を省略しているが、視認画像2はカラー画像であり、各画素の色はRGB値で規定されている。 The visual image 2 is an image composed of 800 × 700 pixel pixels. Although the colors are omitted in FIG. 1, the visual image 2 is a color image, and the color of each pixel is defined by RGB values.
光学コード本体3は、QRコード(登録商標)からなるものである。具体的には、図2(a)に示すように、光学コード本体3は、正方形のモジュール4を、縦横に21個ずつマトリクス状に配置してなるものであり、その周囲には明色のクワイエットゾーン5を備えている。クワイエットゾーン5は、読取装置が光学コード本体3を検出するために設けられた明色領域であり、モジュール四個分の幅を有している。光学コード本体3のモジュール4は、明色(白色)に配色された明色モジュール4aと、暗色(黒色)に配色された暗色モジュール4bとからなる。図2(b)に示すように、モジュール4が配置される領域は、固定領域(機能パターン)7と可変領域(符号化領域)8とからなる。固定領域7は、モジュール4の配色パターンが予め定められている領域であり、光学コード本体3の光学的読取りを補助する位置検出パターン11、分離パターン12、タイミングパターン13などによって構成される。また、可変領域8は、各モジュール4の配色パターンによってデータを記録する領域であり、データコード語及び誤り訂正コード語が記録されるデータコード領域14と、形式情報を示すコードが配置される形式情報コード領域15とによって構成される。データコード語及び誤り訂正コード語は、8個のモジュール4によって構成されるシンボル単位で情報を記憶するものであり、誤り訂正コード語は、リードソロモン符号によってシンボル単位で誤り訂正を行うよう構成されている。これらの構成は、QRコードのJIS規格(JIS X 0510:2004)に準拠したものであるため詳細な説明は省略する。 The optical code body 3 is made of a QR code (registered trademark). Specifically, as shown in FIG. 2 (a), the optical code body 3 is formed by arranging 21 square modules 4 in a matrix form, vertically and horizontally, and around it is a light color. A quiet zone 5 is provided. The quiet zone 5 is a light color area provided for the reading device to detect the optical code body 3, and has a width corresponding to four modules. The module 4 of the optical code body 3 includes a light color module 4a arranged in a light color (white) and a dark color module 4b arranged in a dark color (black). As shown in FIG. 2B, the area where the module 4 is arranged is composed of a fixed area (functional pattern) 7 and a variable area (encoding area) 8. The fixed area 7 is an area in which the color arrangement pattern of the module 4 is determined in advance, and includes a position detection pattern 11, a separation pattern 12, a timing pattern 13, and the like that assist optical reading of the optical code body 3. The variable area 8 is an area in which data is recorded according to the color arrangement pattern of each module 4, and a data code area 14 in which data code words and error correction code words are recorded, and a format in which codes indicating format information are arranged. And an information code area 15. The data code word and the error correction code word store information in symbol units constituted by eight modules 4, and the error correction code word is configured to perform error correction in symbol units by Reed-Solomon code. ing. Since these configurations conform to the JIS standard for JIS codes (JIS X 0510: 2004), detailed description is omitted.
光学コード本体3のサイズは、クワイエットゾーン5を含めて約3cm四方であり、1モジュールが一辺1mmの正方形で構成される。これに対して、視認画像2のサイズは、横8cm、縦7cmであり、1mm2あたり100ピクセルの画素で構成されている。すなわち、本実施例の画像付き光学コード1では、光学コード本体3の1つのモジュール4に対して、視認画像2の画素100個が重なっている。 The size of the optical cord main body 3 is about 3 cm square including the quiet zone 5, and one module is a square with a side of 1 mm. On the other hand, the size of the visual image 2 is 8 cm wide and 7 cm long, and is composed of 100 pixels per mm 2 . That is, in the optical cord with image 1 of the present embodiment, 100 pixels of the visual image 2 overlap with one module 4 of the optical code body 3.
本実施例の画像付き光学コード1は、光学コード本体3と視認画像2が重なる部分にあって、光学コード本体3の明色部分が読取装置によって明色と識別され、暗色部分が暗色と識別され得るよう視認画像2の画素の色を変更してなるものである。すなわち、本実施例の画像付き光学コード1は、視認画像2と同様に800×700ピクセルの画素によって構成されるカラー画像である。 The optical code 1 with an image of this embodiment is in a portion where the optical code body 3 and the visual image 2 overlap, and the light color portion of the optical code body 3 is identified as a light color by the reading device, and the dark color portion is identified as a dark color. As a result, the color of the pixel of the visual image 2 is changed. That is, the optical code with image 1 of the present embodiment is a color image composed of pixels of 800 × 700 pixels like the visual image 2.
具体的には、画像付き光学コード1では、図3に示すように、視認画像2の画素の色が変更されている。まず、明色のクワイエットゾーン5と重なる部分については、輝度が0.75未満の画素が、画素の色相を維持したまま輝度が0.75に変更されている。なお、輝度が0.75以上の画素は色が変更されず視認画像2の画素がそのまま表れる。このように、視認画像2とクワイエットゾーン5が重なる部分では、視認画像2に含まれる輝度0.75未満の画素を、輝度0.75に変更することにより、当該部分全体が、輝度0.75以上の色となるよう調整される。かかる画素の色変更により、クワイエットゾーン5と重なる部分は、元の画像に比べて視認画像2が明るく視認されることとなるが、当該部分では輝度0.75以上の画素は色がそのまま維持され、また、全ての画素の色相は維持されているため、視認画像2の画質低下を最小限に留めることができる。 Specifically, in the optical cord with image 1, as shown in FIG. 3, the color of the pixel of the visual image 2 is changed. First, in a portion overlapping with the light-colored quiet zone 5, the luminance of the pixel having a luminance of less than 0.75 is changed to 0.75 while maintaining the hue of the pixel. Note that the color of the pixel having the luminance of 0.75 or more is not changed, and the pixel of the visual image 2 appears as it is. In this way, in the portion where the visual image 2 and the quiet zone 5 overlap, the pixel having the luminance less than 0.75 included in the visual image 2 is changed to the luminance 0.75, so that the entire portion has the luminance 0.75. The color is adjusted to be the above. As a result of the color change of the pixels, in the portion overlapping with the quiet zone 5, the visual image 2 is viewed brighter than the original image, but the color of the pixel having a luminance of 0.75 or more is maintained as it is in the portion. In addition, since the hues of all the pixels are maintained, the degradation of the image quality of the visual image 2 can be minimized.
視認画像2とモジュール4が重なる部分については、当該モジュール4の色変換対象領域20a,20bと重なる部分で視認画像2の画素19の色が変更される。具体的には、モジュール4が明色モジュール4aである場合は、図3に示すように、色変換対象領域20a,20bの視認画像2の画素のうち、輝度が0.75未満の画素が、元の画素の色相を維持したまま輝度が0.75となるよう色変更されている。すなわち、本実施例では、輝度0.75が本発明に係る「第1の明るさ閾値」に相当する。また、当該色変換対象領域20a,20bの視認画像2の画素のうち、元の画素の輝度が0.75以上の画素は色変更されず、画像付き光学コード1に当該画素の色がそのまま表れる。一方、モジュール4が暗色モジュール4bである場合は、色変換対象領域20a,20bの視認画像2の画素のうち、輝度が0.25を上回る画素が、元の画素の色相を維持したまま輝度が0.25となるよう色変更されている。すなわち、本実施例では、輝度0.25が本発明に係る「第2の明るさ閾値」に相当する。そして、当該色変換対象領域20a,20bの視認画像2の画素のうち、元の画素の輝度が0.25以下の画素は色変更されず、画像付き光学コード1に当該画素の色がそのまま表れる。 For the portion where the visual image 2 and the module 4 overlap, the color of the pixel 19 of the visual image 2 is changed in the portion overlapping the color conversion target areas 20 a and 20 b of the module 4. Specifically, when the module 4 is the light color module 4a, as shown in FIG. 3, among the pixels of the visual image 2 in the color conversion target areas 20a and 20b, pixels having a luminance of less than 0.75 are The color is changed so that the luminance becomes 0.75 while maintaining the hue of the original pixel. That is, in this embodiment, the luminance 0.75 corresponds to the “first brightness threshold” according to the present invention. In addition, among the pixels of the visual image 2 in the color conversion target areas 20a and 20b, the color of the original pixel whose luminance is 0.75 or more is not changed, and the color of the pixel appears as it is in the optical code with image 1. . On the other hand, when the module 4 is the dark color module 4b, among the pixels of the visual image 2 in the color conversion target areas 20a and 20b, the luminance of the pixel having a luminance of more than 0.25 is maintained while maintaining the hue of the original pixel. The color is changed to be 0.25. That is, in this embodiment, the luminance 0.25 corresponds to the “second brightness threshold” according to the present invention. And among the pixels of the visual image 2 in the color conversion target areas 20a and 20b, the color of the original pixel whose luminance is 0.25 or less is not changed, and the color of the pixel appears in the optical code with image 1 as it is. .
モジュール4の色変換対象領域は、固定領域7と可変領域8のモジュール4で相違する。固定領域7のモジュール4では、図4(a)の網掛け部分、すなわち、モジュール4の全体が色変換対象領域20aとなり、該色変換対象領域20aと重なる視認画像2の100個の画素19が色変更の対象となる。このため、画像付き光学コード1では、固定領域7の明色モジュール4aが重なる部分全体が、輝度0.75以上の画素19で構成されることとなり、固定領域7の暗色モジュール4bが重なる部分全体が、輝度0.25以下の画素19で構成されることとなる。 The color conversion target area of the module 4 is different between the module 4 of the fixed area 7 and the variable area 8. In the module 4 in the fixed area 7, the shaded portion in FIG. 4A, that is, the entire module 4 becomes the color conversion target area 20a, and 100 pixels 19 of the visual image 2 overlapping the color conversion target area 20a are displayed. Subject to color change. Therefore, in the optical code with image 1, the entire portion where the light color module 4 a in the fixed region 7 overlaps is configured by the pixels 19 having a luminance of 0.75 or more, and the entire portion where the dark color module 4 b in the fixed region 7 overlaps. Is composed of the pixels 19 having a luminance of 0.25 or less.
一方、可変領域8のモジュール4では、図4(b)の網掛け部分、すなわち、モジュール4の中央部の正方形部分が色変換対象領域20bとなり、該色変換対象領域20bと重なる視認画像2の36個(6×6画素)の画素19が色変更の対象となっている。このため、本実施例の画像付き光学コード1にあって、可変領域8の明色モジュール4aが重なる部分では、色変換対象領域20bの36個の画素が輝度0.75以上となり、色変換対象領域20bの周辺部21の64個の画素については、視認画像2の画素が色変更されることなく表れている。同様に、可変領域8の暗色モジュール4bが重なる部分では、色変換対象領域20bの36個の全ての画素が輝度0.25以下となり、色変換対象領域20bの周辺部21の64個の画素については、視認画像2の画素が色変更されることなく表れている。 On the other hand, in the module 4 in the variable region 8, the shaded portion in FIG. 4B, that is, the square portion at the center of the module 4 becomes the color conversion target region 20b, and the visible image 2 overlapping the color conversion target region 20b. 36 (6 × 6 pixels) pixels 19 are subject to color change. For this reason, in the optical code with image 1 of the present embodiment, in the portion where the light color module 4a in the variable region 8 overlaps, the 36 pixels in the color conversion target region 20b have a luminance of 0.75 or more, and the color conversion target About 64 pixels of the peripheral part 21 of the area | region 20b, the pixel of the visual recognition image 2 appears without a color change. Similarly, in the portion where the dark color module 4b in the variable area 8 overlaps, all 36 pixels in the color conversion target area 20b have a luminance of 0.25 or less, and the 64 pixels in the peripheral portion 21 of the color conversion target area 20b. Is shown without the color of the pixels of the visual image 2 being changed.
なお、本実施例の画像付き光学コード1にあって、可変領域8の一部シンボルを構成するモジュール4に対応する部分では、視認画像2の画素の色が全く変更されずにそのまま表れる。これは、光学コード本体(QRコード)3が誤り訂正機能を具備しており、可変領域8に含まれる全シンボルのモジュール4が正確に読み取られなくても情報を復号可能であるため、誤り訂正可能な範囲内で、一部シンボルについて視認画像2の画素の色をそのまま表すことにより、視認画像2の画質を高めることを目的としている。なお、後述するように、視認画像2の画素の色をそのまま表すシンボルは、視認画像2の画素の色を変更した場合に、色の変更度合いが大きくなるシンボルを対象としている。 Note that in the optical code with image 1 of the present embodiment, in the portion corresponding to the module 4 constituting a partial symbol of the variable region 8, the color of the pixel of the visual image 2 appears as it is without any change. This is because the optical code body (QR code) 3 has an error correction function, and the information can be decoded even if the modules 4 of all symbols included in the variable area 8 cannot be read accurately. The purpose is to improve the image quality of the visual image 2 by representing the color of the pixel of the visual image 2 as it is for some symbols within a possible range. Note that, as will be described later, the symbol that directly represents the color of the pixel of the visual image 2 is intended for a symbol whose degree of color change increases when the color of the pixel of the visual image 2 is changed.
本実施例の画像付き光学コード1は、汎用の読取装置(QRコードリーダー)によって、光学コード本体3に記憶された情報を読み出すことができる。QRコードリーダーによる読取手順は、周知であるため詳細は省略するが、まず、QRコードリーダーは、視認画像2と光学コード本体3が重なる部分を撮像し、撮像した画像の明暗パターンから、クワイエットゾーン5や固定領域7を検索する。上述のように、画像付き光学コード1は、クワイエットゾーン5に対応する部分が輝度0.75以上の画素で構成され、また、固定領域7に対応する部分は、明色モジュール4aの部分が0.75以上の画素で、暗色モジュール4bの部分が全て0.25以下の画素で構成される。QRコードリーダーは、輝度0.75以上の部分は確実に明色と識別し、輝度0.25以下の部分は確実に暗色と識別するため、QRコードリーダーは、撮像した画像から、クワイエットゾーン5及び固定領域7を確実に検出できる。 The optical code 1 with an image according to the present embodiment can read information stored in the optical code main body 3 by a general-purpose reader (QR code reader). The reading procedure by the QR code reader is well known and will not be described in detail. First, the QR code reader takes an image of a portion where the visual image 2 and the optical code main body 3 overlap each other, and uses a quiet zone from the light and dark pattern of the taken image. 5 and fixed area 7 are searched. As described above, in the optical code with image 1, the portion corresponding to the quiet zone 5 is composed of pixels having a luminance of 0.75 or more, and the portion corresponding to the fixed region 7 is the portion of the light color module 4a being 0. .75 or more pixels, and the dark color module 4b is composed of pixels of 0.25 or less. Since the QR code reader reliably identifies a portion having a luminance of 0.75 or higher as a light color and reliably identifies a portion having a luminance of 0.25 or lower as a dark color, the QR code reader can detect a quiet zone 5 from a captured image. And the fixed area | region 7 can be detected reliably.
QRコードリーダーは、検出したクワイエットゾーン5及び固定領域7のパターンから光学コード本体3の位置を割り出すと、可変領域8のモジュール4の切り出しを行い、各モジュール4について明色か暗色のいずれであるかを識別する。この時、モジュール4の周辺部の画像は隣接するモジュール4の色の影響を受けやすいため、QRコードリーダーは、各モジュール4の中央部の色を重視して色の識別を行う。上述のように、画像付き光学コード1では、可変領域8の明色モジュール4aの中央部(色変換対象領域20b)が輝度0.75以上の画素で構成され、可変領域8の暗色モジュール4bの中央部(色変換対象領域20b)が輝度0.25以下の画素で構成されているため、切り出された可変領域8のモジュール4は、QRコードリーダーによって正確に明色と暗色とに識別される。そして、かかる識別情報に基づいて、QRコードリーダーは、光学コード本体3に記憶された情報を復号することができる。 When the QR code reader determines the position of the optical code main body 3 from the detected pattern of the quiet zone 5 and the fixed area 7, the QR code reader cuts out the module 4 in the variable area 8, and each module 4 is either light or dark. To identify. At this time, since the image of the peripheral part of the module 4 is easily influenced by the color of the adjacent module 4, the QR code reader recognizes the color by focusing on the color of the central part of each module 4. As described above, in the optical code with image 1, the central portion (color conversion target region 20 b) of the light color module 4 a in the variable region 8 is configured with pixels having a luminance of 0.75 or more, and the dark color module 4 b in the variable region 8 Since the central portion (color conversion target region 20b) is composed of pixels with a luminance of 0.25 or less, the module 4 in the cutout variable region 8 is accurately identified as light and dark colors by the QR code reader. . Based on the identification information, the QR code reader can decode the information stored in the optical code body 3.
以上のように、本実施例の画像付き光学コード1は、既存のQRコードリーダーで、光学コード本体3の明暗パターンを識別し、光学コード本体3に記憶された情報を読み取ることができる。一方で、本実施例の画像付き光学コード1は、視認画像2と明色モジュール4aが重なる部分では、視認画像2の画素のうち、輝度0.75未満の画素の色のみを変更することで、当該部分が読取装置によって明色と識別されるよう構成されている。また、視認画像2と暗色モジュール4bが重なる部分では、視認画像2の画素のうち、輝度が0.25を上回る画素の色のみを変更することで、当該部分が読取装置によって暗色と識別されるよう構成されている。このように、本実施例の画像付き光学コード1では、モジュール4の色と合致する所定の輝度以上(または輝度以下)の画素については、視認画像2の画素の色が変更されずにそのまま反映されるため、従来構成に比べて、光学コード本体3と重なる部分において、視認画像2の視認性を向上できるという利点がある。 As described above, the optical code 1 with an image according to the present embodiment can identify the light / dark pattern of the optical code main body 3 and read the information stored in the optical code main body 3 with an existing QR code reader. On the other hand, the optical code with an image 1 of the present embodiment changes only the color of the pixel having a luminance of less than 0.75 among the pixels of the visual image 2 in the portion where the visual image 2 and the light color module 4a overlap. The portion is configured to be identified as a bright color by the reading device. Moreover, in the part where the visual image 2 and the dark color module 4b overlap, by changing only the color of the pixel whose luminance exceeds 0.25 among the pixels of the visual image 2, the relevant part is identified as a dark color by the reading device. It is configured as follows. As described above, in the optical code with image 1 of the present embodiment, the pixel color of the visual image 2 is reflected as it is without changing the pixel color of the visual image 2 that is equal to or higher than the predetermined luminance (or lower luminance) that matches the color of the module 4. Therefore, compared with the conventional configuration, there is an advantage that the visibility of the visual image 2 can be improved in a portion overlapping the optical code main body 3.
特に、本実施例の画像付き光学コード1あっては、光学コード本体3と視認画像2の重なる部分にあって、視認画像2の画素の色が変更される部分でも、元の画素の色相を維持しているため、光学コード本体3との重ね合わせにより、視認画像2の画質が低下するのを抑えることができる。 In particular, in the optical cord with image 1 of the present embodiment, the hue of the original pixel is changed even in the portion where the optical code body 3 and the visual image 2 overlap and the color of the pixel of the visual image 2 is changed. Therefore, it is possible to suppress the deterioration of the image quality of the visually recognized image 2 due to the overlap with the optical code main body 3.
また、本実施例にあっては、可変領域8のモジュール4に対応する部分については、モジュール4の中央部が色変換対象領域20bとなり、該モジュール4の周辺部21では、視認画像2の画素がそのまま反映されているため、かかる点によっても、視認画像2の画質劣化を抑えることができる。 In the present embodiment, for the portion corresponding to the module 4 in the variable region 8, the central portion of the module 4 is the color conversion target region 20 b, and the peripheral portion 21 of the module 4 is the pixel of the visual image 2. Since this is reflected as it is, deterioration of the image quality of the visually recognized image 2 can be suppressed due to this point.
一方で、本実施例にあっては、固定領域7のモジュール4については、モジュール4の全体を色変換対象領域20aとして、該モジュール4と重なる視認画像2の画素全てが基準の輝度以上(または輝度以下)となるよう視認画像2を変更している。このように、本実施例では、光学コード本体3の位置検出に重要な固定領域7において、可変領域8よりも重点的に視認画像2の画素を変更しているため、視認画像2の画質劣化を抑えつつ、光学コード本体3の読取精度を維持できる。 On the other hand, in the present embodiment, for the module 4 in the fixed area 7, the entire module 4 is set as the color conversion target area 20 a, and all the pixels of the visual image 2 overlapping the module 4 are equal to or higher than the reference luminance (or The visual image 2 is changed so that the luminance is equal to or lower than the luminance. As described above, in the present embodiment, the pixels of the visual image 2 are changed more preferentially than the variable region 8 in the fixed region 7 that is important for detecting the position of the optical code body 3, so that the image quality of the visual image 2 is degraded. The reading accuracy of the optical code body 3 can be maintained while suppressing the above.
以下に、上記画像付き光学コード1の作成方法について説明する。
図5は、上記画像付き光学コード1の作成手順をしめすフローチャートである。各ステップの具体的な処理内容は下記の通りである。
S101:視認画像2の画像データをロードし、ステップS102に移行する。視認画像2は、画素の色がRGB値で規定されたラスタデータである。
S102:光学コード本体3のデータをロードし、ステップS103に移行する。光学コード本体3のデータは、光学コード本体3のサイズ情報と、各モジュール4の明暗二値の配色パターンの情報を含むものである。
S103:重ね合わせ位置候補決定処理を実行し、ステップS104に移行する。重ね合わせ位置候補決定処理では、光学コード本体3と視認画像2を重ね合わせる相対位置の候補(重ね合わせ位置候補)を決定する。重ね合わせ位置候補は、光学コード本体3を配置する視認画像2上の位置と、当該位置における光学コード本体3の角度とによって決定される。本実施例では、予め指定された視認画像2の基準位置と、当該基準位置から上下左右に5mmずれた4位置の、計5箇所が位置の候補として選択する。そして、各位置の候補について、光学コード本体3を90°ずつ回転させた4つの角度が、角度の候補として選択される。すなわち、重ね合わせ位置候補決定処理では、5箇所の位置候補と、4種類の角度候補とを組み合わせた、計20種類の重ね合わせ位置候補が決定される。
S104:ステップS103で決定した20種類の重ね合わせ位置候補のうち、光学コード本体3と視認画像2とを重ね合わせた画像データ(候補画像データ)が作成されていないものを選択し、ステップS105に移行する。
S105:ステップS104で選択した重ね合わせ位置候補について候補画像データを作成する候補画像データ作成処理を実行し、ステップS106に移行する。候補画像データ作成処理については後述する。
S106:ステップS105で作成した候補画像データを評価する候補画像評価処理を実行し、ステップS107に移行する。候補画像評価処理では、視認画像2の画素の色が変更された部分について、各画素のRGB値の変更度合いを計算する。例えば、画素のRGB値が(0,0,0)から(255,128,117)に変更された場合、変更前と変更後の各RGB値の差(絶対値)を合算した「500」(255+128+117)が当該画素の色の変更度合いを示す評価値となる。そして、候補画像評価処理では、全ての画素の評価値を合算した数値を、当該候補画像データの評価値(候補画像評価値)として算出する。すなわち、この候補画像評価値が小さいほど、視認画像2の色変更の度合いが少なく、視認画像2の画質劣化が少ない候補画像データということになる。
S107:全ての重ね合わせ位置候補について候補画像データを作成したか否かを判定する。候補画像データを作成していない重ね合わせ位置候補があると判定した場合は、ステップS104に移行し、全ての重ね合わせ位置候補について候補画像データを作成したと判定した場合は、ステップS108に移行する。
S108:作成した全ての候補画像データの候補画像評価値を比較し、最も候補評価値の小さいものを、画像付き光学コード1として決定し、一連の処理を終了する。
Below, the preparation method of the said optical cord 1 with an image is demonstrated.
FIG. 5 is a flowchart showing a procedure for creating the optical code with image 1. The specific processing content of each step is as follows.
S101: The image data of the visual image 2 is loaded, and the process proceeds to step S102. The visual image 2 is raster data in which pixel colors are defined by RGB values.
S102: The data of the optical code body 3 is loaded, and the process proceeds to step S103. The data of the optical code body 3 includes information on the size of the optical code body 3 and information on the light / dark binary color arrangement pattern of each module 4.
S103: An overlay position candidate determination process is executed, and the process proceeds to step S104. In the overlapping position candidate determination process, a relative position candidate (overlapping position candidate) for overlapping the optical code body 3 and the visual image 2 is determined. The overlapping position candidate is determined by the position on the visual image 2 where the optical code body 3 is arranged and the angle of the optical code body 3 at the position. In the present embodiment, a total of five positions are selected as position candidates, that is, a reference position of the visual image 2 designated in advance and four positions shifted by 5 mm vertically and horizontally from the reference position. Then, for each position candidate, four angles obtained by rotating the optical code body 3 by 90 ° are selected as angle candidates. That is, in the overlapping position candidate determination process, a total of 20 types of overlapping position candidates are determined by combining five position candidates and four types of angle candidates.
S104: Of the 20 types of overlapping position candidates determined in step S103, select the one for which image data (candidate image data) in which the optical code body 3 and the visual image 2 are superimposed has not been created, and go to step S105. Transition.
S105: A candidate image data creation process for creating candidate image data for the overlay position candidate selected in step S104 is executed, and the process proceeds to step S106. The candidate image data creation process will be described later.
S106: A candidate image evaluation process for evaluating the candidate image data created in step S105 is executed, and the process proceeds to step S107. In the candidate image evaluation process, the degree of change of the RGB value of each pixel is calculated for the portion of the visual image 2 where the color of the pixel is changed. For example, when the RGB value of the pixel is changed from (0, 0, 0) to (255, 128, 117), the sum of the differences (absolute values) between the RGB values before and after the change is “500” ( 255 + 128 + 117) is an evaluation value indicating the degree of color change of the pixel. In the candidate image evaluation process, a numerical value obtained by adding the evaluation values of all the pixels is calculated as an evaluation value (candidate image evaluation value) of the candidate image data. That is, the smaller the candidate image evaluation value is, the smaller the degree of color change of the visual image 2 is, and the candidate image data is less image quality deterioration of the visual image 2.
S107: It is determined whether candidate image data has been created for all the overlay position candidates. If it is determined that there is an overlay position candidate for which candidate image data has not been created, the process proceeds to step S104. If it is determined that candidate image data has been created for all the overlay position candidates, the process proceeds to step S108. .
S108: Compare the candidate image evaluation values of all the created candidate image data, determine the one with the smallest candidate evaluation value as the optical code with image 1, and end the series of processing.
図6は、上記候補画像データ作成処理(図5:S105)の処理内容を示すフローチャートである。各ステップの具体的な処理内容は下記の通りである。
S201:クワイエットゾーン5と重なる部分の視認画像2の画素データを取得し、ステップS202に移行する。
S202:明色化処理を実行し、ステップS203に移行する。明色化処理では、クワイエットゾーン5と重なる部分が読取装置で明色と識別され得るように視認画像2の画素の色を変更する。明色化処理については後述する。
S203:i行、j列に位置するモジュール4の情報を取得し、ステップS204に移行する。
S204:i行、j列のモジュール4と重なる部分の視認画像2の画素データを取得し、ステップS205に移行する。
S205:i行、j列のモジュール4が明色モジュール4aであるか否かを判定する。明色モジュール4aであると判定した場合はステップS206に移行し、明色モジュール4aでないと判定した場合はステップS207に移行する。
S206:明色化処理を実行し、ステップS208に移行する。明色化処理では、明色モジュール4aと重なる部分が読取装置で明色と識別され得るように視認画像2の画素の色を変更する。明色化処理については後述する。
S207:暗色化処理を実行し、ステップS208に移行する。暗色化処理では、暗色モジュール4bと重なる部分が読取装置で暗色と識別され得るように視認画像2の画素の色を変更する。暗色化処理については後述する。
S208:明色化処理又は暗色化処理の結果を評価する色変更評価処理を実行し、ステップS209に移行する。色変更評価処理では、視認画像2の画素の色が変更された部分について、各画素のRGB値の変更度合いを計算する。例えば、画素のRGB値が(0,0,0)から(255,128,117)に変更された場合、変更前と変更後のRGB値の差(絶対値)を合算した「500」が当該画素の変更度合いを示す評価値となる。そして、色変更評価処理では、全ての画素の評価値を合算した数値が当該モジュール4に対応する部分の評価値(モジュール単位評価値)として算出する。すなわち、モジュール単位評価値が小さいほど、当該モジュール4は、明色化処理又は暗色化処理で視認画像2の色が変更された度合いが少なく、視認画像2の画質劣化が少ないということになる。
S209:全てのモジュール4について、明色化処理又は暗色化処理を終了したか否かを判定する。全てのモジュール4について処理を終了したと判定した場合はステップS210に移行し、未処理のモジュール4が存在すると判定した場合はステップS203に移行して未処理のモジュール4についての処理を実行する。
S210:色変更取消処理を実行し、候補画像データ作成処理を終了する。色変更取消処理では、可変領域8のモジュール4のうち、モジュール単位評価値が相対的に大きいモジュール4を選択する。そして、選択したモジュール4と、当該モジュール4と同一シンボルを構成する7つのモジュール4に関して、先に行われた明色化処理または暗色化処理を取り消して、元の視認画像2の画素の色を反映させる。
FIG. 6 is a flowchart showing the contents of the candidate image data creation process (FIG. 5: S105). The specific processing content of each step is as follows.
S201: Obtain pixel data of the visible image 2 in a portion overlapping the quiet zone 5, and proceed to step S202.
S202: Brightening processing is executed, and the process proceeds to step S203. In the brightening process, the color of the pixel of the visual image 2 is changed so that the portion overlapping the quiet zone 5 can be identified as a bright color by the reading device. The lightening process will be described later.
S203: Information on the module 4 located in the i row and the j column is acquired, and the process proceeds to step S204.
S204: The pixel data of the visible image 2 of the portion overlapping with the module 4 in i row and j column is acquired, and the process proceeds to step S205.
S205: It is determined whether or not the module 4 in the i row and the j column is the light color module 4a. If it is determined that the module is the light color module 4a, the process proceeds to step S206. If it is determined that the module is not the light color module 4a, the process proceeds to step S207.
S206: Brightening processing is executed, and the process proceeds to step S208. In the lightening process, the color of the pixel of the visual image 2 is changed so that a portion overlapping the light color module 4a can be identified as a light color by the reading device. The lightening process will be described later.
S207: Darkening processing is executed, and the process proceeds to step S208. In the darkening process, the color of the pixel of the visual image 2 is changed so that a portion overlapping the dark color module 4b can be identified as a dark color by the reading device. The darkening process will be described later.
S208: A color change evaluation process for evaluating the result of the lightening process or the darkening process is executed, and the process proceeds to step S209. In the color change evaluation process, the degree of change of the RGB value of each pixel is calculated for the portion of the visual image 2 where the color of the pixel is changed. For example, when the RGB value of the pixel is changed from (0, 0, 0) to (255, 128, 117), “500” is obtained by adding the difference (absolute value) between the RGB value before and after the change. This is an evaluation value indicating the degree of pixel change. In the color change evaluation process, a numerical value obtained by adding the evaluation values of all the pixels is calculated as an evaluation value (module unit evaluation value) of a portion corresponding to the module 4. That is, as the module unit evaluation value is smaller, the module 4 has a smaller degree of change in the color of the visual image 2 by the lightening process or the darkening process, and the image quality of the visual image 2 is less deteriorated.
S209: For all the modules 4, it is determined whether the lightening process or the darkening process has been completed. If it is determined that the processing has been completed for all modules 4, the process proceeds to step S210. If it is determined that there is an unprocessed module 4, the process proceeds to step S203, and the process for the unprocessed module 4 is executed.
S210: A color change cancellation process is executed, and the candidate image data creation process ends. In the color change cancellation process, a module 4 having a relatively large module unit evaluation value is selected from the modules 4 in the variable area 8. Then, with respect to the selected module 4 and the seven modules 4 constituting the same symbol as the module 4, the previously performed lightening process or darkening process is canceled, and the pixel color of the original visual image 2 is changed. To reflect.
図7は、上記明色化処理(図6:S206)の処理内容を示すフローチャートである。各ステップの具体的な処理内容は下記の通りである。
S301:視認画像2の処理対象の画素のうち、p行、q列に位置する画素を選択し、ステップS302に移行する。
S302:処理対象がクワイエットゾーン5であるか否かを判定する。クワイエットゾーン5であると判定した場合はステップS305に移行し、クワイエットゾーン5でないと判定した場合はステップS303に移行する。
S303:処理対象が可変領域8のモジュール4であるか否かを判定する。可変領域8であると判定した場合はステップS304に移行し、可変領域8でないと判定した場合はステップS305に移行する。
S304:p行、q列の画素が、色変換対象領域20bである中央部の画素であるか否かを判定し、中央部の画素であると判定した場合はステップS305に移行し、中央部の画素でないと判定した場合は、画素の色を変更しないためステップS307に移行する。
S305:p行、q列の画素が、輝度0.75以上であるか否かを判定し、輝度0.75以上でないと判定した場合はステップS306に移行し、輝度0.75以上と判定した場合は、画素の色を変更しないためステップS307に移行する。
S306:p行、q列の画素のRGB値を、色相を維持したまま輝度が0.75となるよう変換し、ステップS307に移行する。色相を維持したままの輝度の変更は、既知の計算式によって変換できる。また、変換前と変換後のRGB値を対応付けしたテーブルを用いて変換することも可能である。
S307:処理対象の全ての画素について処理を終了したか否かを判定する。全ての画素について処理を終了したと判定した場合は明色化処理を終了し、未処理の画素が存在すると判定した場合はステップS301に移行して、未処理の画素についての処理を実行する。
FIG. 7 is a flowchart showing the processing contents of the bright color processing (FIG. 6: S206). The specific processing content of each step is as follows.
S301: Select pixels located in p rows and q columns from the processing target pixels of the visual image 2, and the process proceeds to step S302.
S302: It is determined whether or not the processing target is the quiet zone 5. If it is determined that the zone is the quiet zone 5, the process proceeds to step S305. If it is determined that the zone is not the quiet zone 5, the process proceeds to step S303.
S303: It is determined whether or not the processing target is the module 4 of the variable area 8. If it is determined that the area is the variable area 8, the process proceeds to step S304. If it is determined that the area is not the variable area 8, the process proceeds to step S305.
S304: It is determined whether or not the pixels in the p row and the q column are pixels in the central portion that is the color conversion target region 20b. If it is determined that the pixels are in the central portion, the process proceeds to step S305. If it is determined that the pixel is not, the process proceeds to step S307 because the color of the pixel is not changed.
S305: It is determined whether or not the pixels in the p row and the q column have a luminance of 0.75 or higher. If it is determined that the luminance is not higher than 0.75, the process proceeds to step S306, and the luminance is determined to be 0.75 or higher. In this case, since the color of the pixel is not changed, the process proceeds to step S307.
S306: The RGB values of the pixels in the p row and the q column are converted so that the luminance becomes 0.75 while maintaining the hue, and the process proceeds to step S307. The change in luminance while maintaining the hue can be converted by a known calculation formula. It is also possible to perform conversion using a table in which RGB values before conversion and after conversion are associated with each other.
S307: It is determined whether or not the processing has been completed for all the pixels to be processed. When it is determined that the processing has been completed for all the pixels, the lightening process is terminated, and when it is determined that there is an unprocessed pixel, the process proceeds to step S301, and the process for the unprocessed pixel is executed.
図8は、上記暗色化処理(図6:S207)の処理内容を示すフローチャートである。各ステップの具体的な処理内容は下記の通りである。
S401:視認画像2の処理対象の画素のうち、p行、q列に位置する画素を選択し、ステップS402に移行する。
S402:処理対象が可変領域8のモジュール4であるか否かを判定し、可変領域8であると判定した場合はステップS403に移行し、可変領域8でないと判定した場合はステップS404に移行する。
S403:p行、q列の画素が、色変換対象領域20である中央部の画素であるか否かを判定し、中央部の画素であると判定した場合はステップS404に移行し、中央部の画素でないと判定した場合は、画素の色を変更しないためステップS406に移行する。
S404:p行、q列の画素が、輝度0.25以下であるか否かを判定し、輝度0.25以下でないと判定した場合はステップS405に移行し、輝度0.25以下であると判定した場合は、画素の色を変更しないためステップS406に移行する。
S405:p行、q列の画素のRGB値を、色相を維持したまま輝度が0.25となるよう変換し、ステップS406に移行する。
S406:処理対象の全ての画素について処理を終了したか否かを判定する。全ての画素について処理を終了したと判定した場合は暗色化処理を終了し、未処理の画素が存在すると判定した場合はステップS401に移行して、未処理の画素についての処理を実行する。
FIG. 8 is a flowchart showing the contents of the darkening process (FIG. 6: S207). The specific processing content of each step is as follows.
S401: Select pixels located in the p-th row and the q-th column from the pixels to be processed of the visual image 2, and the process proceeds to step S402.
S402: It is determined whether or not the processing target is the module 4 of the variable region 8. If it is determined that the processing target is the variable region 8, the process proceeds to step S403. If it is determined that the processing target is not the variable region 8, the process proceeds to step S404. .
S403: It is determined whether or not the pixels in the p row and the q column are the central pixel that is the color conversion target region 20, and if it is determined that the pixel is the central pixel, the process proceeds to step S404. If it is determined that the pixel is not, the process proceeds to step S406 because the color of the pixel is not changed.
S404: It is determined whether or not the pixels in the p row and the q column have a luminance of 0.25 or less. If it is determined that the luminance is not 0.25 or less, the process proceeds to step S405, and the luminance is 0.25 or less. If it is determined, the process proceeds to step S406 because the pixel color is not changed.
S405: The RGB values of the pixels in the p row and the q column are converted so that the luminance becomes 0.25 while maintaining the hue, and the process proceeds to step S406.
S406: It is determined whether the processing has been completed for all the pixels to be processed. When it is determined that the processing has been completed for all the pixels, the darkening process is terminated, and when it is determined that there is an unprocessed pixel, the process proceeds to step S401, and the process for the unprocessed pixel is executed.
以上の作成方法のように、本実施例の画像付き光学コード1は、光学コード本体3を重ね合わせる部分について、明色モジュール4a部分が読取装置によって明色と識別され、暗色モジュール4b部分が読取装置によって暗色と識別され得るよう視認画像2の画素の色を選択的に変更することによって作成することができる。 As described above, in the optical code 1 with an image according to the present embodiment, in the portion where the optical code main body 3 is overlapped, the light color module 4a portion is identified as light color by the reading device, and the dark color module 4b portion is read. It can be created by selectively changing the color of the pixel of the visual image 2 so that it can be identified as a dark color by the device.
また、上記作成方法にあっては、複数の重ね合わせ位置候補について候補画像データ作成処理を実行して、候補画像評価値の最も小さい(視認画像の色の変更度合いの最も低い)候補画像データを画像付き光学コード1として選択するため、視認画像2の視認性に優れた画像付き光学コード1を作成できるという利点がある。 Further, in the above creation method, candidate image data creation processing is executed for a plurality of overlapping position candidates, and candidate image data having the smallest candidate image evaluation value (the lowest degree of change in the color of the visual image) is obtained. Since the optical code 1 with an image is selected, there is an advantage that the optical code 1 with an image excellent in the visibility of the visual image 2 can be created.
また、上記作成方法にあっては、明色化処理及び暗色化処理で視認画像2の画素の変更度合いが比較的高いモジュール4に関しては、明色化処理及び暗色化処理を取り消して、視認画像2の色がそのまま反映されるようにしているため、かかる点においても、視認画像2の画質劣化を抑えて、視認画像2の視認性を向上できるという利点がある。また、上記作成方法では、視認画像2の画素の変更度合いが比較的高かったモジュール4についてのみ、明色化処理及び暗色化処理を取り消すのではなく、当該モジュール4と同じシンボルを構成する7個のモジュール4についても、明色化処理及び暗色化処理を取り消しているため、シンボル単位の誤り率を増大させることなく、視認画像2の画質を高めることができるという利点がある。 In the above creation method, for the module 4 in which the degree of change of the pixels of the visual image 2 is relatively high in the lightening process and the darkening process, the lightening process and the darkening process are canceled and the visual image is displayed. Since the second color is reflected as it is, there is an advantage that the visibility of the visual image 2 can be improved by suppressing deterioration of the image quality of the visual image 2 in this respect. Further, in the above creation method, only the module 4 in which the degree of change of the pixels of the visual image 2 is relatively high is not canceled, but the seven symbols constituting the same symbol as the module 4 are not canceled. The module 4 also has the advantage that the image quality of the visual image 2 can be improved without increasing the error rate in symbol units because the lightening process and the darkening process are canceled.
本実施例の画像付き光学コード1aは、図9に示すように、バーコードからなる光学コード本体3aを視認画像2に重ね合わせてなるものである。なお、視認画像2は、実施例1と同じ花の写真からなるカラー画像である。 As shown in FIG. 9, the optical cord with image 1 a according to the present embodiment is formed by superimposing an optical code body 3 a made of a barcode on the visual image 2. The visual image 2 is a color image made up of the same flower photograph as in the first embodiment.
光学コード本体3aは、図10に示すように、商品バーコードであるEAN/JANコードである。なお、図10では、EAN/JANコードの下部に記される10進数の数字を省略している。具体的には、光学コード本体3aは、読取方向に一列に配列される複数のキャラクタ24と、キャラクタ24の列の中央に配置されるセンターバー25と、キャラクタ24の列の両側に配置されるガードバー26と、ガードバー26のさらに両側に設けられるクワイエットゾーン(マージン)27とを備えている。キャラクタ24、センターバー25,ガードバー26及びクワイエットゾーン27,27は、明色(白色)又は暗色(黒色)に配色された所定幅のモジュール28,28によって構成される。キャラクタ24は、7本のモジュール28を並置して、モジュール28の明暗パターンによって数字を記録するものである。センターバー25及びガードバー26は、読取装置が光学コード本体3aを検出するためのものであり、その配色パターンは予め決定されている。具体的には、センターバー25は明、暗、明、暗、明の順にモジュール28を並置してなる構成であり、ガードバー26は暗色、明色、暗色の順にモジュール28を並置してなる構成となっている。クワイエットゾーン28は読取装置が光学コード本体3aを検出するのに必要な領域であり、明色のモジュール28を9本並置してなる構成となっている。本実施例の光学コード本体3aは、JIS規格(JIS X 0501:1985)に準拠したものであるため詳細な説明は省略する。 As shown in FIG. 10, the optical code body 3a is an EAN / JAN code that is a product barcode. In FIG. 10, decimal numbers written at the bottom of the EAN / JAN code are omitted. Specifically, the optical code body 3a is arranged on both sides of the plurality of characters 24 arranged in a line in the reading direction, a center bar 25 arranged in the center of the character 24 line, and the character 24 line. A guard bar 26 and a quiet zone (margin) 27 provided on both sides of the guard bar 26 are provided. The character 24, the center bar 25, the guard bar 26, and the quiet zones 27 and 27 are configured by modules 28 and 28 having a predetermined width arranged in a light color (white) or a dark color (black). The character 24 records seven numbers by juxtaposing the seven modules 28 in accordance with the light / dark pattern of the modules 28. The center bar 25 and the guard bar 26 are used by the reading device to detect the optical code body 3a, and the color arrangement pattern is determined in advance. Specifically, the center bar 25 has a configuration in which modules 28 are juxtaposed in the order of light, dark, bright, dark, and light, and the guard bar 26 has a configuration in which modules 28 are juxtaposed in the order of dark color, light color, and dark color. It has become. The quiet zone 28 is an area necessary for the reading device to detect the optical code body 3a, and has a configuration in which nine light color modules 28 are juxtaposed. Since the optical cord main body 3a of the present embodiment conforms to the JIS standard (JIS X 0501: 1985), detailed description thereof is omitted.
本実施例では、光学コード本体3aのサイズは、クワイエットゾーン28を含めて幅4cm程度であり、1本のモジュール28の幅寸法が4mmとなっている。このため、本実施例の画像付き光学コード1aでは、図11に示すように、光学コード本体3aの1本のモジュール28の幅方向に、視認画像2の画素19が4個重なっている。 In this embodiment, the size of the optical cord main body 3a is about 4 cm in width including the quiet zone 28, and the width dimension of one module 28 is 4 mm. Therefore, in the optical cord with image 1a of the present embodiment, as shown in FIG. 11, four pixels 19 of the visual image 2 are overlapped in the width direction of one module 28 of the optical cord main body 3a.
本実施例の画像付き光学コード1aは、実施例1と同様に、光学コード本体3aが視認画像2と重なる部分で、光学コード本体3の明色部分が読取装置によって明色と識別され、暗色部分が暗色と識別され得るよう視認画像2の画素の色を変更してなるものである。すなわち、本実施例の画像付き光学コード1aは、視認画像2と同様の800×700ピクセルの画素によって構成されるカラー画像である。また、本実施例では、図11の網掛け部分、すなわち、モジュール28の全体が色変換対象領域20cとなっており、モジュール28と重なる視認画像2の画素全てが色変更の対象となっている。 As in the first embodiment, the optical code 1a with an image of the present embodiment is a portion where the optical code main body 3a overlaps the visual image 2, and the light color portion of the optical code main body 3 is identified as a light color by the reading device. The color of the pixel of the visual image 2 is changed so that the portion can be identified as a dark color. That is, the optical code with image 1a of the present embodiment is a color image composed of pixels of 800 × 700 pixels similar to the visual image 2. Further, in this embodiment, the shaded portion of FIG. 11, that is, the entire module 28 is the color conversion target area 20c, and all the pixels of the visual image 2 overlapping the module 28 are the target of color change. .
具体的には、図12に示すように、明色のモジュール28と重なる部分では、視認画像2の画素のうち、輝度0.75未満の画素が元の画素の色相を維持したまま輝度が0.75となるよう色変更されており、また、元の画素の輝度が0.75以上の画素は色変更されず、画像付き光学コード1に当該画素の色がそのまま表れている。一方、暗色のモジュール28と重なる部分では、視認画像2の画素のうち、輝度0.25を上回る画素が元の画素の色相を維持したまま輝度が0.25となるよう色変更されており、また、元の画素の輝度が0.25以下の画素は色変更されず、画像付き光学コード1に当該画素の色がそのまま表れている。 Specifically, as shown in FIG. 12, in the portion overlapping with the light color module 28, among the pixels of the visual image 2, the luminance of 0 is less than the pixel of luminance 0.75 while maintaining the hue of the original pixel. The color is changed to be .75, and the color of the original pixel whose luminance is 0.75 or higher is not changed, and the color of the pixel appears in the optical code with image 1 as it is. On the other hand, in the portion that overlaps the dark color module 28, the color of the pixels of the visual image 2 has been changed so that the luminance is 0.25 while maintaining the hue of the original pixel while maintaining the hue of the original pixel. Further, the color of the original pixel whose luminance is 0.25 or less is not changed, and the color of the pixel appears in the optical code with image 1 as it is.
本実施例の画像付き光学コード1aでは、光学コード本体3aと視認画像2が重なる部分において視認画像2の画素が上記のように色変更されることで、光学コード本体3の明色部分が全て輝度0.75以上の画素で構成され、光学コード本体3aの暗色部分が全て輝度0.25以下の画素で構成される。汎用の読取装置(バーコードリーダー)は、輝度0.75以上の部分は確実に明色と識別し、輝度0.25以下の部分は確実に暗色と識別するため、バーコードリーダーによって、画像付き光学コード1aの、光学コード本体3aが重なる部分をスキャンすれば、光学コード本体3aに記憶された情報を読み出すことができる。 In the optical cord with image 1a of the present embodiment, the pixels of the visual image 2 are changed in color as described above in the portion where the optical code main body 3a and the visual image 2 overlap, so that all the light color portions of the optical code main body 3 are changed. It is composed of pixels with a luminance of 0.75 or more, and all dark portions of the optical code body 3a are composed of pixels with a luminance of 0.25 or less. A general-purpose reader (barcode reader) reliably identifies a portion with a luminance of 0.75 or higher as a light color, and reliably identifies a portion with a luminance of 0.25 or lower as a dark color. By scanning the portion of the optical code 1a where the optical code body 3a overlaps, the information stored in the optical code body 3a can be read.
また、本実施例にあっても、実施例1と同様に、明色のモジュール28と対応する部分では、視認画像2の輝度0.75以上の画素がそのまま反映され、暗色のモジュール28に対応する部分では、視認画像2の輝度0.25以下の画素がそのまま反映されており、さらに、全ての画素について視認画像2の画素の色相が維持されているため、実施例1と同様に、視認画像2の画質劣化を抑えて、従来構成に比べて、視認性を向上できるという利点がある。 Also in the present embodiment, as in the first embodiment, in the portion corresponding to the light color module 28, the pixel having the luminance 0.75 or more of the visual image 2 is reflected as it is, and corresponds to the dark color module 28. In the portion to be viewed, pixels with a luminance of 0.25 or less of the visual image 2 are reflected as they are, and furthermore, the hue of the pixels of the visual image 2 is maintained for all the pixels. There is an advantage that image quality deterioration of the image 2 can be suppressed and visibility can be improved as compared with the conventional configuration.
本実施例の画像付き光学コード1bは、図13に示すように、白黒二値の視認画像2aに、二次元コードからなる光学コード本体3を重ね合わせてなるものである。なお、光学コード本体3は、実施例1と同じQRコードからなるものである。 As shown in FIG. 13, the optical code with image 1b of the present embodiment is formed by superimposing an optical code body 3 made of a two-dimensional code on a monochrome binary visual image 2a. The optical code body 3 is composed of the same QR code as in the first embodiment.
視認画像2aは、白色の背景に「a」から「n」までの15文字のアルファベットが黒色で表された約4cm四方の画像であり、400ピクセル四方の、白黒二値の画素によって構成されたものである。 The visual image 2a is an image of about 4 cm square in which a 15-character alphabet from “a” to “n” is expressed in black on a white background, and is composed of 400 pixels square and monochrome binary pixels. Is.
本実施例の画像付き光学コード1bでは、実施例1と同様に、光学コード本体3の1つのモジュール4に対して、視認画像2の画素100個が重なっている。そして、本実施例では、実施例1と同様に、光学コード本体3が視認画像2aと重なる部分において、光学コード本体3の明色部分が読取装置によって明色と識別され、暗色部分が暗色と識別され得るよう視認画像2aの画素の色が変更される。本実施例の画像付き光学コード1bは、視認画像2aと同じ400ピクセル四方の画素によって構成されるものであるが、後述するように、光学コード本体3と重なる部分において、視認画像2aの画素の色が濃灰色(輝度0.75)と薄灰色(輝度0.25)とに変更されるため、画像付き光学コード1bは、白色(輝度1)、濃灰色(輝度0.75)、薄灰色(輝度0.25)、黒色(輝度0)の4色の画素によって構成されている。 In the optical cord with image 1b of the present embodiment, 100 pixels of the visual image 2 overlap with one module 4 of the optical cord main body 3 as in the first embodiment. In the present embodiment, as in the first embodiment, in the portion where the optical code body 3 overlaps the visual image 2a, the light color portion of the optical code body 3 is identified as a light color by the reading device, and the dark color portion is a dark color. The color of the pixel of the visual image 2a is changed so that it can be identified. The optical code with image 1b according to the present embodiment is composed of the same 400 pixels and four pixels as the visual image 2a. However, as will be described later, the pixel of the visual image 2a is overlapped with the optical code body 3 as will be described later. Since the color is changed between dark gray (luminance 0.75) and light gray (luminance 0.25), the optical cord with image 1b is white (luminance 1), dark gray (luminance 0.75), and light gray. It is composed of pixels of four colors (luminance 0.25) and black (luminance 0).
具体的には、本実施例の画像付き光学コード1bでは、図14に示すように視認画像2aの画素の色が変更される。まず、明色のクワイエットゾーン5と重なる部分については、黒色の画素が輝度0.75の薄灰色に変更され、白色の画素は色変更されず視認画像2aの画素がそのまま表れる。 Specifically, in the optical cord with image 1b of the present embodiment, the color of the pixel of the visual image 2a is changed as shown in FIG. First, in a portion overlapping with the light quiet zone 5, the black pixel is changed to light gray with a luminance of 0.75, and the white pixel is not changed in color, and the pixel of the visual image 2a appears as it is.
視認画像2aと固定領域7のモジュール4が重なる部分については、実施例1と同様に、図4(a)の網掛け部分、すなわち、当該モジュール4と重なる100個の画素19の全体が色変換対象領域20aとなる。そして、図14に示すように、固定領域7の明色モジュール4aが重なる部分では、クワイエットゾーン5と同様に、黒色の画素が輝度0.75の薄灰色に変更され、白色の画素は色変更されず視認画像2aの画素がそのまま表れている。一方、固定領域7の暗色モジュール4bが重なる部分では、白色の画素が輝度0.25の濃灰色に変更され、黒色の画素は色変更されず視認画像2aの画素がそのまま表れている。 As for the portion where the visual image 2a and the module 4 in the fixed area 7 overlap, as in the first embodiment, the shaded portion in FIG. 4A, that is, the entire 100 pixels 19 overlapping the module 4 is color-converted. This is the target area 20a. Then, as shown in FIG. 14, in the portion where the light color module 4a of the fixed region 7 overlaps, the black pixel is changed to light gray with a luminance of 0.75, and the white pixel is changed in color as in the quiet zone 5. The pixels of the visually recognized image 2a appear as they are. On the other hand, in the portion where the dark color module 4b of the fixed region 7 overlaps, the white pixel is changed to dark gray with a luminance of 0.25, and the black pixel is not changed in color and the pixel of the visual image 2a appears as it is.
一方、視認画像2aと可変領域8のモジュール4が重なる部分については、実施例1と同様に、図4(b)の網掛け部分、すなわち、当該モジュール4の中央部に対応する36個の画素19が色変換対象領域20bとなる。 On the other hand, as for the portion where the visible image 2a and the module 4 in the variable region 8 overlap, as in the first embodiment, 36 pixels corresponding to the shaded portion in FIG. 19 is the color conversion target area 20b.
具体的には、可変領域8の明色モジュール4aと重なる部分では、図14に示すように、色変換対象領域20bで、視認画像2aの黒色の画素が輝度0.75の薄灰色に変更され、白色の画素は色変更されず視認画像2aの画素がそのまま表れる。一方、色変換対象領域20bの周辺部21では、視認画像2aの黒色の画素が輝度0.25の濃灰色に変更され、白色の画素は色変更されず視認画像2aの画素がそのまま表れる。また、可変領域8の暗色モジュール4bと重なる部分では、色変換対象領域20bで、視認画像2aの白色の画素が輝度0.25の濃灰色に変更され、黒色の画素は色変更されず視認画像2aの画素がそのまま表れる。一方、色変換対象領域20bの周辺部21では、視認画像2aの白色の画素が輝度0.75の薄灰色に変更され、黒色の画素は色変更されず視認画像2aの画素がそのまま表れる。 Specifically, in the portion of the variable area 8 that overlaps the light color module 4a, as shown in FIG. 14, in the color conversion target area 20b, the black pixels of the visual image 2a are changed to light gray with a luminance of 0.75. The white pixels are not changed in color, and the pixels of the visual image 2a appear as they are. On the other hand, in the peripheral portion 21 of the color conversion target area 20b, the black pixels of the visual image 2a are changed to dark gray with a luminance of 0.25, and the white pixels are not changed in color, and the pixels of the visual image 2a appear as they are. In the portion of the variable area 8 that overlaps the dark color module 4b, in the color conversion target area 20b, the white pixels of the visual image 2a are changed to dark gray with a luminance of 0.25, and the black pixels are not color-changed and are visible images. The pixel 2a appears as it is. On the other hand, in the peripheral portion 21 of the color conversion target area 20b, the white pixels of the visual image 2a are changed to light gray with a luminance of 0.75, and the black pixels are not changed in color, and the pixels of the visual image 2a appear as they are.
図15は、光学コード本体3と重なる部分における、視認画像2aの画素の色変更の具体例を示したものである。図15(a)は、光学コード本体3のモジュール4と重なる部分の視認画像2aを拡大視したものである。視認画像2aのかかる部分は、略同数の白色の画素19と黒色の画素19で構成される。視認画像2aの当該部分に、固定領域7の明色モジュール4aが重なる場合は、図15(b)に示すように、画像付き光学コード1bの当該部分では、視認画像2aの黒色の画素19が輝度0.75の薄灰色に色変更される。また、視認画像2aの当該部分に、固定領域7の暗色モジュール4bが重なる場合は、図15(c)に示すように、画像付き光学コード1bの当該部分では、視認画像2aの白色の画素が輝度0.25の濃灰色に色変更されることとなる。 FIG. 15 shows a specific example of the color change of the pixel of the visual image 2 a in the portion overlapping the optical code main body 3. FIG. 15A is an enlarged view of the visual image 2a of the portion overlapping the module 4 of the optical code body 3. FIG. Such a portion of the visual image 2 a is composed of approximately the same number of white pixels 19 and black pixels 19. When the light color module 4a of the fixed area 7 overlaps with the portion of the visual image 2a, as shown in FIG. 15B, the black pixel 19 of the visual image 2a is included in the portion of the optical code with image 1b. The color is changed to light gray with a luminance of 0.75. Further, when the dark color module 4b of the fixed region 7 overlaps with the portion of the visual image 2a, as shown in FIG. 15C, the white pixels of the visual image 2a are displayed in the portion of the optical code with image 1b. The color is changed to dark gray with a luminance of 0.25.
一方、視認画像2aの当該部分に、可変領域8の明色モジュール4aが重なる場合は、図15(d)に示すように、画像付き光学コード1bの当該部分では、中央部の色変換対象領域20bで視認画像2aの黒色の画素19が輝度0.75の薄灰色に色変更され、色変換対象領域20bの周辺部21では視認画像2aの黒色の画素19が輝度0.25の濃灰色に変更される。また、視認画像2aの当該部分に、可変領域8の暗色モジュール4bが重なる場合、図15(e)に示すように、画像付き光学コード1bの当該部分では、中央部の色変換対象領域20bで視認画像2aの白色の画素19が輝度0.25の濃灰色に色変更され、色変換対象領域20bの周辺部21では視認画像2aの白色の画素19が輝度0.75の薄灰色に色変更される。 On the other hand, when the light color module 4a of the variable area 8 overlaps with the corresponding part of the visual image 2a, as shown in FIG. 15D, in the corresponding part of the optical code with image 1b, the color conversion target area at the center part. In 20b, the black pixel 19 of the visual image 2a is changed to light gray with a luminance of 0.75, and the black pixel 19 of the visual image 2a is changed to dark gray with a luminance of 0.25 in the peripheral portion 21 of the color conversion target region 20b. Be changed. Further, when the dark color module 4b in the variable area 8 overlaps with the part of the visual image 2a, as shown in FIG. 15E, in the part of the optical code with image 1b, the color conversion target area 20b in the center part. The white pixel 19 of the visual image 2a is changed to a dark gray color with a luminance of 0.25, and the white pixel 19 of the visual image 2a is changed to a light gray color with a luminance of 0.75 in the peripheral portion 21 of the color conversion target area 20b. Is done.
このように、本発明の画像付き光学コードは、白黒二値の画素からなる視認画像2aに対しても適用できる。また、本実施例では、可変領域8の明色モジュール4aが重なる部分にあって、色変換対象領域20bの周辺部21で視認画像2aの黒色画素が濃灰色に変更され、可変領域8の暗色モジュール4bが重なる部分にあって、色変換対象領域20bの周辺部21で視認画像2aの白色画素が薄灰色に変更されているため、色変換対象領域20bと周辺部21のコントラストが低くなって、可変領域8のモジュール4の明暗を読取装置によって正確に識別できるという利点がある。 As described above, the optical code with an image of the present invention can be applied also to the visually recognized image 2a made up of monochrome binary pixels. Further, in this embodiment, the light color module 4a of the variable region 8 is overlapped, and the black pixel of the visual image 2a is changed to dark gray at the peripheral portion 21 of the color conversion target region 20b, and the dark color of the variable region 8 is changed. Since the white pixels of the visual image 2a are changed to light gray in the peripheral portion 21 of the color conversion target region 20b in the portion where the modules 4b overlap, the contrast between the color conversion target region 20b and the peripheral portion 21 is lowered. There is an advantage that the brightness of the module 4 in the variable region 8 can be accurately identified by the reader.
なお、本発明の画像付き光学コードは、上記実施例の形態に限らず本発明の要旨を逸脱しない範囲内において種々変更を加えることができる。 The optical cord with an image of the present invention is not limited to the embodiment described above, and various modifications can be made without departing from the gist of the present invention.
例えば、上記実施例では、本発明に係る「第1の明るさ閾値」を輝度0.75とし、「第2の明るさ閾値」を輝度0.25としているが、本発明に係る「明るさ閾値」の基準は、輝度0.75と0.25に限らず適宜変更可能である。また、本発明に係る「明るさ閾値」は、輝度に限らず、その他の明るさの尺度(明度など)を基準にすることも可能である。 For example, in the above embodiment, the “first brightness threshold” according to the present invention is set to the luminance 0.75, and the “second brightness threshold” is set to the luminance 0.25. The criterion of “threshold value” is not limited to the luminance 0.75 and 0.25, and can be changed as appropriate. In addition, the “brightness threshold” according to the present invention is not limited to luminance, and other brightness scales (such as brightness) can be used as a reference.
また、上記実施例では、視認画像としては写真と文書を例示したが、本発明に係る視認画像は、写真や文書に限らず、イラストや地図など、目視するための様々な画像が含まれる。 In the above embodiment, a photograph and a document are exemplified as the visual image. However, the visual image according to the present invention is not limited to a photo and a document, and includes various images such as an illustration and a map.
上記実施例では、光学コード本体が視認画像より小さく、光学コード本体全体が視認画像に重なるよう構成されていたが、本発明の画像付き光学コードは、光学コード本体が視認画像からはみ出すようなものであってもよいし、視認画像全体が光学コード本体に重なるようなものでもよい。なお、光学コード本体が視認画像からはみ出す場合は、はみ出した部分については、例えば、光学コード本体の色がそのまま表示されるように構成すればよい。 In the above embodiment, the optical code body is smaller than the visual image, and the entire optical code body is configured to overlap the visual image. However, the optical cord with an image of the present invention is such that the optical code body protrudes from the visual image. Alternatively, the entire visual image may overlap the optical code body. When the optical code body protrudes from the visually recognized image, for example, the protruding portion may be configured so that the color of the optical code body is displayed as it is.
1,1a,1b 画像付き光学コード
2,2a 視認画像
3,3a 光学コード本体
4 モジュール
5 クワイエットゾーン
7 固定領域
8 可変領域
11 位置検出パターン
12 分離パターン
13 タイミングパターン
14 データコード領域
15 形式情報コード領域
19 画素
20a,20b,20c 色変換対象領域
21 周辺部
24 モジュール
25 センターバー
26 ガードバー
27 クワイエットゾーン
28 モジュール
1, 1a, 1b Optical code with image 2, 2a Visual image 3, 3a Optical code body 4 Module 5 Quiet zone 7 Fixed area 8 Variable area 11 Position detection pattern 12 Separation pattern 13 Timing pattern 14 Data code area 15 Format information code area 19 pixels 20a, 20b, 20c Color conversion target area 21 Peripheral area 24 Module 25 Center bar 26 Guard bar 27 Quiet zone 28 Module
Claims (8)
視認画像は、明色モジュール及び暗色モジュールよりも小さい画素で構成されており、
少なくとも一部の明色モジュールが視認画像と重なる部分では、当該モジュールの少なくとも中央部を含む色変換対象領域で、視認画像の画素のうち、所定の第1の明るさ閾値未満である画素が、第1の明るさ閾値以上となるよう色が変更され、かつ、第1の明るさ閾値以上である画素は色が変更されておらず、
少なくとも一部の暗色モジュールが視認画像と重なる部分では、当該モジュールの少なくとも中央部を含む色変換対象領域で、視認画像の画素のうち、第1の明るさ閾値未満に設定された第2の明るさ閾値を上回る画素が、第2の明るさ閾値以下となるよう色が変更され、かつ、第2の明るさ閾値以下である画素は色が変更されておらず、
光学コード本体は、モジュールをマトリックス状に配置してなる二次元コードであって、明色モジュールと暗色モジュールのいずれになるかが予め決定され、読取装置による光学的読取りを補助するパターンを構成する固定領域を備えるものであり、
該固定領域を構成しないモジュールと視認画像が重なる部分では、前記色変換対象領域は、モジュールの周辺部を含まないことを特徴とする画像付き光学コード。 An optical code with an image formed by superposing an optical code body composed of two types of modules, a light color module identified as a light color by a reading device and a dark color module identified as a dark color, on a visual image for viewing. ,
The visual image is composed of smaller pixels than the light color module and the dark color module,
In a portion where at least a part of the light color module overlaps with the visual recognition image, pixels that are less than a predetermined first brightness threshold among the pixels of the visual recognition image in the color conversion target region including at least the central portion of the module, The color is changed so that it is equal to or higher than the first brightness threshold, and the color of pixels that are equal to or higher than the first brightness threshold is not changed,
In a portion where at least a part of the dark color module overlaps with the visually recognized image, the second brightness set to be less than the first brightness threshold among the pixels of the visually recognized image in the color conversion target region including at least the central portion of the module. The color is changed so that the pixels that are above the threshold are less than or equal to the second brightness threshold, and the pixels that are less than or equal to the second brightness threshold are not changed in color ,
The optical code body, the module comprising a two-dimensional code formed by arranging in a matrix, become one of the bright module and dark modules are predetermined, the pattern for assisting in optical reading by the reading device Comprising a fixed area to constitute,
The optical code with an image, wherein the color conversion target region does not include a peripheral portion of the module in a portion where the module that does not constitute the fixed region overlaps the visible image.
明色モジュールが視認画像と重なる部分では、前記色変換対象領域で、視認画像の黒色の画素が、第1の明るさ閾値以上の灰色に変更され、かつ、視認画像の白色の画素は色が変更されず、
暗色モジュールが視認画像と重なる部分では、前記色変換対象領域で、視認画像の白色の画素が、第2の明るさ閾値以下の灰色に変更され、かつ、黒色の画素は色が変更されていないことを特徴とする請求項1に記載の画像付き光学コード。 The visual image is a monochrome image consisting of white and black pixels,
In the portion where the light color module overlaps the visual image, the black pixel of the visual image is changed to gray equal to or higher than the first brightness threshold in the color conversion target area, and the white pixel of the visual image has a color. Unaltered,
In the portion where the dark color module overlaps with the visual image, the white pixel of the visual image is changed to gray below the second brightness threshold in the color conversion target area, and the color of the black pixel is not changed. The optical code with an image according to claim 1.
視認画像は、明色モジュール及び暗色モジュールよりも小さい画素で構成されており、
少なくとも一部の明色モジュールが視認画像と重なる部分では、当該モジュールの少なくとも中央部を含む色変換対象領域で、視認画像の画素のうち、所定の第1の明るさ閾値未満である画素が、第1の明るさ閾値以上となるよう色が変更され、かつ、第1の明るさ閾値以上である画素は色が変更されておらず、
少なくとも一部の暗色モジュールが視認画像と重なる部分では、当該モジュールの少なくとも中央部を含む色変換対象領域で、視認画像の画素のうち、第1の明るさ閾値未満に設定された第2の明るさ閾値を上回る画素が、第2の明るさ閾値以下となるよう色が変更され、かつ、第2の明るさ閾値以下である画素は色が変更されておらず、
視認画像は白色と黒色の画素からなるモノクロ画像であり、
明色モジュールが視認画像と重なる部分では、前記色変換対象領域で、視認画像の黒色の画素が、第1の明るさ閾値以上の灰色に変更され、かつ、視認画像の白色の画素は色が変更されず、
暗色モジュールが視認画像と重なる部分では、前記色変換対象領域で、視認画像の白色の画素が、第2の明るさ閾値以下の灰色に変更され、かつ、黒色の画素は色が変更されておらず、
光学コード本体は、モジュールをマトリックス状に配置してなる二次元コードであって、明色モジュールと暗色モジュールのいずれになるかが予め決定され、読取装置による光学的読取りを補助するパターンを構成する固定領域を備えるものであり、
該固定領域を構成しない明色モジュールと視認画像が重なる部分では、当該モジュールの色変換対象領域はモジュールの中央部のみであり、当該モジュールの周辺部では、視認画像の黒色画素が、第1の明るさ閾値未満の灰色に変更され、かつ、視認画像の白色の画素は色が変更されておらず、
該固定領域を構成しない暗色モジュールと視認画像が重なる部分では、当該モジュールの色変換対象領域はモジュールの中央部のみであり、該モジュールの周辺部では、視認画像の白色画素が、第2の明るさ閾値を上回る灰色に変更され、かつ、視認画像の黒色の画素は色が変更されていないことを特徴とする画像付き光学コード。 An optical code with an image formed by superposing an optical code body composed of two types of modules, a light color module identified as a light color by a reading device and a dark color module identified as a dark color, on a visual image for viewing. ,
The visual image is composed of smaller pixels than the light color module and the dark color module,
In a portion where at least a part of the light color module overlaps with the visual recognition image, pixels that are less than a predetermined first brightness threshold among the pixels of the visual recognition image in the color conversion target region including at least the central portion of the module, The color is changed so that it is equal to or higher than the first brightness threshold, and the color of pixels that are equal to or higher than the first brightness threshold is not changed,
In a portion where at least a part of the dark color module overlaps with the visually recognized image, the second brightness set to be less than the first brightness threshold among the pixels of the visually recognized image in the color conversion target region including at least the central portion of the module. The color is changed so that the pixels that are above the threshold are less than or equal to the second brightness threshold, and the pixels that are less than or equal to the second brightness threshold are not changed in color ,
The visual image is a monochrome image consisting of white and black pixels,
In the portion where the light color module overlaps the visual image, the black pixel of the visual image is changed to gray equal to or higher than the first brightness threshold in the color conversion target area, and the white pixel of the visual image has a color. Unaltered,
In the portion where the dark color module overlaps with the visual image, the white pixel of the visual image is changed to gray below the second brightness threshold in the color conversion target area, and the color of the black pixel is not changed. Without
The optical code body is a two-dimensional code in which modules are arranged in a matrix, and it is determined in advance whether a light color module or a dark color module is used, and constitutes a pattern that assists optical reading by a reading device. A fixed area,
In a portion where the bright color module that does not constitute the fixed region overlaps with the visible image, the color conversion target region of the module is only the central portion of the module, and in the peripheral portion of the module, the black pixels of the visible image are the first pixels. It has been changed to gray below the brightness threshold, and the color of the white pixels in the viewing image has not changed,
In a portion where the dark color module that does not constitute the fixed region overlaps the visible image, the color conversion target region of the module is only the central portion of the module, and in the peripheral portion of the module, the white pixels of the visible image are the second brightness. An optical code with an image, wherein the color is changed to gray exceeding a threshold value, and the color of a black pixel of a visually recognized image is not changed.
該固定領域を構成するモジュールと視認画像が重なる部分では、前記色変換対象領域は、モジュール全体であることを特徴とする請求項1乃至請求項3のいずれか1項に記載の画像付き光学コード。 The optical code body is a two-dimensional code in which modules are arranged in a matrix, and it is determined in advance whether a light color module or a dark color module is used, and constitutes a pattern that assists optical reading by a reading device. A fixed area,
The optical code with an image according to any one of claims 1 to 3 , wherein the color conversion target area is the entire module in a portion where the module constituting the fixed area and the visible image overlap each other. .
明色モジュールが視認画像と重なる部分について、当該モジュールの少なくとも中央部を含む色変換対象領域で、視認画像の画素のうち、所定の第1の明るさ閾値未満である画素を、第1の明るさ閾値以上となるよう色を変更し、かつ、第1の明るさ閾値以上である画素は色を変更しないこととする明色化処理と、
暗色モジュールが視認画像と重なる部分について、当該モジュールの少なくとも中央部を含む色変換対象領域で、視認画像の画素のうち、第1の明るさ閾値未満に設定された第2の明るさ閾値を上回る画素を、第2の明るさ閾値以下となるよう色を変更し、かつ、第2の明るさ閾値以上である画素は色を変更しないこととする暗色化処理と、
明色化処理と暗色化処理を実行した部分について、視認画像の画素の色の変更度合いをモジュール単位で示すモジュール単位評価値を算出する色変更評価処理と、
モジュール単位評価値が相対的に高いモジュールについて、当該モジュールと視認画像が重なる部分において、明色化処理又は暗色化処理を取り消す色変更取消処理と
を備えることを特徴とする画像付き光学コードの作成方法。 It consists of two types of modules, a light color module identified as light color by a reader and a dark color module identified as dark color, and an optical code body equipped with an error correction function is superimposed on a visual image for visual observation. A method for creating an optical code with an image for creating an optical code with an image,
For a portion where the bright color module overlaps the visual image, a pixel that is less than a predetermined first brightness threshold among the pixels of the visual image in the color conversion target region including at least the center of the module is set to the first brightness. A brightening process in which the color is changed so as to be equal to or greater than the threshold value, and the pixel that is equal to or greater than the first brightness threshold value is not changed in color;
For the portion where the dark color module overlaps the visual image, in the color conversion target region including at least the central portion of the module, the pixel of the visual image exceeds the second brightness threshold set below the first brightness threshold. pixel, changing the color to be the following second brightness threshold, and is the second brightness threshold or more pixels and dark Kasho sense to not change color,
The portion executing the lightening process and darkening process, a color change evaluation process for calculating the module unit evaluation value indicating the change degree of color pixels of the viewed image in module units,
Creation of an optical code with an image, comprising a module having a relatively high module unit evaluation value, and a color change canceling process for canceling the lightening process or the darkening process in a portion where the visual image overlaps with the module Method.
色変更取消処理では、モジュール単位評価値が相対的に高いモジュールと、当該モジュールと同じシンボルを構成するモジュールについて、明色化処理又は暗色化処理を取り消すことを特徴とする請求項6に記載の画像付き光学コードの作成方法。 The error correction function performs error correction in a symbol unit constituted by a predetermined number of modules,
7. The color change canceling process according to claim 6 , wherein the lightening process or the darkening process is canceled for a module having a relatively high module unit evaluation value and a module constituting the same symbol as the module. How to create an optical code with an image.
明色モジュールが視認画像と重なる部分について、当該モジュールの少なくとも中央部を含む色変換対象領域で、視認画像の画素のうち、所定の第1の明るさ閾値未満である画素を、第1の明るさ閾値以上となるよう色を変更し、かつ、第1の明るさ閾値以上である画素は色を変更しないこととする明色化処理と、
暗色モジュールが視認画像と重なる部分について、当該モジュールの少なくとも中央部を含む色変換対象領域で、視認画像の画素のうち、第1の明るさ閾値未満に設定された第2の明るさ閾値を上回る画素を、第2の明るさ閾値以下となるよう色を変更し、かつ、第2の明るさ閾値以上である画素は色を変更しないこととする暗色化処理と、
光学コード本体を視認画像に重ね合わせる位置及び/又は角度の候補を複数決定する重ね合わせ位置候補決定処理と、
前記各候補について光学コード本体と視認画像を重ね合わせて、画像付き光学コードの候補となる候補画像データを得る候補画像データ作成処理と、
各候補画像データで、光学コード本体と視認画像の重なる部分について、視認画像の画素の色の変更度合いを示す候補画像評価値を算出する候補画像評価処理と、
候補画像評価値が最も小さい候補画像データを、画像付き光学コードとして決定する画像付き光学コード決定処理と
を備えることを特徴とする画像付き光学コードの作成方法。 An optical code with an image is created by superimposing an optical code body composed of two types of modules, a light color module identified as a light color and a dark color module identified as a dark color, on a visual image for viewing. A method of creating an optical code with an image,
For a portion where the bright color module overlaps the visual image, a pixel that is less than a predetermined first brightness threshold among the pixels of the visual image in the color conversion target region including at least the center of the module is set to the first brightness. A brightening process in which the color is changed so as to be equal to or greater than the threshold value, and the pixel that is equal to or greater than the first brightness threshold value is not changed in color;
For the portion where the dark color module overlaps the visual image, in the color conversion target region including at least the central portion of the module, the pixel of the visual image exceeds the second brightness threshold set below the first brightness threshold. A darkening process in which a pixel is changed in color so as to be equal to or lower than a second brightness threshold, and a pixel that is equal to or higher than the second brightness threshold is not changed in color ;
Overlay position candidate determination processing for determining a plurality of positions and / or angle candidates for superimposing the optical code body on the visual image;
A candidate image data creation process for obtaining candidate image data that is a candidate for an optical code with an image by superimposing a visual image on the optical code body for each candidate,
In each candidate image data, a candidate image evaluation process for calculating a candidate image evaluation value indicating a degree of change in the color of the pixel of the visible image for a portion where the optical code main body and the visible image overlap,
An image-attached optical code creation method comprising: an image-attached optical code determination process for determining candidate image data having the smallest candidate image evaluation value as an image-attached optical code.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2013250216A JP6273807B2 (en) | 2013-12-03 | 2013-12-03 | Optical code with image and method for producing the same |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2013250216A JP6273807B2 (en) | 2013-12-03 | 2013-12-03 | Optical code with image and method for producing the same |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2015108876A JP2015108876A (en) | 2015-06-11 |
| JP6273807B2 true JP6273807B2 (en) | 2018-02-07 |
Family
ID=53439201
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2013250216A Active JP6273807B2 (en) | 2013-12-03 | 2013-12-03 | Optical code with image and method for producing the same |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP6273807B2 (en) |
Family Cites Families (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2006302050A (en) * | 2005-04-21 | 2006-11-02 | Main:Kk | Two-dimensional bar code |
| JP5834879B2 (en) * | 2011-12-19 | 2015-12-24 | 富士通株式会社 | Image printing apparatus, method, program, image processing apparatus, method, and program |
-
2013
- 2013-12-03 JP JP2013250216A patent/JP6273807B2/en active Active
Also Published As
| Publication number | Publication date |
|---|---|
| JP2015108876A (en) | 2015-06-11 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US10318851B2 (en) | Generating and decoding two-dimensional code | |
| EP3309704B1 (en) | Two-dimensional code partitioning and decoding method and system | |
| EP2937817B1 (en) | Information code, information code generation method, information code reader device, and information code usage system | |
| US8714456B2 (en) | Two-dimensional code, two-dimensional code reader, and program | |
| US8358835B2 (en) | Method for detecting and correcting chromatic aberration, and apparatus and method for processing image using the same | |
| TW201432576A (en) | Two-dimensional code, system for creation of two-dimensional code, and analysis program | |
| JP6091708B2 (en) | 2D code, 2D code analysis system | |
| EP1909215A2 (en) | Image region detection method, recording medium, and device therefor | |
| US20160379031A1 (en) | High capacity 2d color barcode design and processing method for camera based applications | |
| JP2021119465A (en) | Enhanced matrix symbol error correction method | |
| JP5182182B2 (en) | Color correction method and imaging system | |
| AU2017380263A1 (en) | Method for detecting and recognising long-range high-density visual markers | |
| JP5115404B2 (en) | 2D code | |
| JP5673257B2 (en) | Code reading apparatus, code reading method and code reading program | |
| JP5720623B2 (en) | Two-dimensional code reader | |
| JP6273807B2 (en) | Optical code with image and method for producing the same | |
| CN110992328B (en) | Dark spot detection method and device | |
| JP2008287414A (en) | Optical recognition code recognition apparatus, method and program | |
| JP4766069B2 (en) | 2D information code display method | |
| JP7200793B2 (en) | 2D code reader | |
| JP4265526B2 (en) | Optical information reader | |
| JP2011197856A (en) | Optical information reading device | |
| RU2449364C2 (en) | Optical symbol, article to which optical symbol is attached, method for attaching optical symbol to article, optical symbol decoding method, related device and related program | |
| JP5653308B2 (en) | Region detection apparatus, region detection method, and program | |
| JP5003379B2 (en) | Image processing apparatus and program |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20161129 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20170824 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20170919 |
|
| A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20171107 |
|
| 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: 20171128 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 6273807 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |