JP2010226580A - Color correction method and imaging system - Google Patents

Color correction method and imaging system Download PDF

Info

Publication number
JP2010226580A
JP2010226580A JP2009073449A JP2009073449A JP2010226580A JP 2010226580 A JP2010226580 A JP 2010226580A JP 2009073449 A JP2009073449 A JP 2009073449A JP 2009073449 A JP2009073449 A JP 2009073449A JP 2010226580 A JP2010226580 A JP 2010226580A
Authority
JP
Japan
Prior art keywords
color
imaging
reference pattern
information
code
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2009073449A
Other languages
Japanese (ja)
Other versions
JP5182182B2 (en
Inventor
Yuichi Ito
裕一 伊東
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Denso Wave Inc
Original Assignee
Denso Wave Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Denso Wave Inc filed Critical Denso Wave Inc
Priority to JP2009073449A priority Critical patent/JP5182182B2/en
Publication of JP2010226580A publication Critical patent/JP2010226580A/en
Application granted granted Critical
Publication of JP5182182B2 publication Critical patent/JP5182182B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Facsimile Image Signal Circuits (AREA)
  • Color Image Communication Systems (AREA)
  • Image Processing (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To carry out color correction of an image of an imaging object well by properly reflecting a prescribed prepared environment and an imaging environment when the imaging object is imaged by an imaging means. <P>SOLUTION: An imaging system 1 enables pretreatment. In the pretreatment, a prescribed first color reference pattern is imaged, and first color information is extracted from the first color reference pattern. In the pretreatment, a two-dimensional code wherein the first color information is recorded and a second reference pattern is arranged is also prepared. Meanwhile, when the imaging object is actually imaged, the prepared two-dimensional code is imaged together with an imaging object, and second color information is extracted by specifying the second color reference pattern in the image. Color correction of an image of the imaging object is carried out based on the first color information recorded in the two-dimensional code and the extracted second color information. <P>COPYRIGHT: (C)2011,JPO&INPIT

Description

本発明は、色補正方法及び撮像システムに関するものである。   The present invention relates to a color correction method and an imaging system.

撮像対象をカメラ等によって撮像する場合、同一物を撮像する場合であっても、撮像環境が異なると(例えば、周囲光の光量や種類、或いは、撮像手段から撮像対象までの距離や角度などが異なると)、得られる画像において色彩や濃度或いは輝度が異なってしまうという問題がある。従来は、このような問題に対し、例えばカラーチャートを用いた色補正を行うことで対応していた。   When the imaging object is imaged by a camera or the like, even if the same object is imaged, if the imaging environment is different (for example, the amount or type of ambient light or the distance or angle from the imaging means to the imaging object) If they are different, there is a problem that the color, density, or luminance of the obtained image is different. Conventionally, such a problem has been dealt with by performing color correction using a color chart, for example.

特許第3766380号公報Japanese Patent No. 3766380

例えば、特許文献1では、規定された色が付されたカラーチャートを撮像対象と共に撮像し、その撮像画像におけるカラーチャート部分の色値に基づいて撮像対象の各色を補正している。カラーチャートは、予め規定された各色が付されたものであるため、カラーチャート部分の色値を検出することで、その撮像環境がどのような状態にあるかを定量的に把握することができ、カラーチャート部分の色値に基づいて色補正を行うようにすれば、カラーチャートの本来的な色を基準として、撮像対象の画像を意図する色状態に近づけることができる。   For example, in Patent Document 1, a color chart with a specified color is imaged together with an imaging target, and each color of the imaging target is corrected based on the color value of the color chart portion in the captured image. Since the color chart is provided with each color specified in advance, it is possible to quantitatively grasp the state of the imaging environment by detecting the color value of the color chart portion. If color correction is performed based on the color values of the color chart portion, the image to be imaged can be brought close to the intended color state based on the original color of the color chart.

しかしながら、上記方法の場合、規定された色が正確に付されてなるカラーチャートを購入し、適正に管理しなければならず、管理負荷の面や、コスト面で不利になる虞がある。例えば、カラーチャートを紛失したり、汚れ等が生じると、その都度正規のカラーチャートを購入しなければならず、ユーザの金銭的負担が大きくなってしまう。   However, in the case of the above method, it is necessary to purchase and appropriately manage a color chart in which the specified color is accurately attached, which may be disadvantageous in terms of management load and cost. For example, if the color chart is lost or becomes dirty, a regular color chart must be purchased each time, increasing the financial burden on the user.

また、カラーチャートを撮像対象と共に撮像する場合、カラーチャートを如何に迅速且つ正確に検出するかが問題となる。例えば、カラーチャートに強い光が照射される等、外部環境に起因してカラーチャート部分の色状態が変化すると、規定された色配列を検出することが難しくなり、カラーチャートの検出に時間がかかったり、或いはカラーチャートの検出自体不能となることが懸念される。   Further, when a color chart is imaged together with an imaging target, how to detect the color chart quickly and accurately becomes a problem. For example, if the color state of the color chart changes due to the external environment, such as when the color chart is exposed to strong light, it becomes difficult to detect the specified color arrangement, and it takes time to detect the color chart. There is a concern that the color chart detection itself becomes impossible.

本発明は、上述した課題を解決するためになされたものであり、撮像手段によって撮像対象を撮像する場合に、当該撮像対象の画像の色補正を、所定の事前環境及び撮像環境を適切に反映して良好に、且つ負担を抑えて簡易に行い得る方法及びシステムを提供することを目的とする。   The present invention has been made in order to solve the above-described problems. When an imaging target is imaged by an imaging unit, the color correction of the image of the imaging target is appropriately reflected in a predetermined prior environment and imaging environment. It is an object of the present invention to provide a method and a system that can be performed easily and with a reduced burden.

請求項1の発明は、撮像手段によって撮像される撮像対象の画像の色補正を行う色補正方法であって、第1撮像手段により、第1色参照パターンを撮像する第1撮像ステップと、
第1抽出手段により、前記第1撮像ステップにて撮像された前記第1色参照パターンから第1色情報を抽出する第1抽出ステップと、前記第1色参照パターンと対応する第2色参照パターンが配置され且つ前記第1抽出ステップにて抽出された前記第1色情報が記録された二次元コードを、コード作成手段によって作成するコード作成ステップと、前記第1撮像手段と同一、又は前記第1撮像手段とは異なる前記撮像手段により、前記コード作成ステップにて作成された前記二次元コードと共に前記撮像対象を撮像する第2撮像ステップと、第2抽出手段により、前記第2撮像ステップにて撮像された前記二次元コードの画像において前記第2色参照パターンを特定し且つ当該第2色参照パターンから前記第2色情報を抽出する第2抽出ステップと、読取手段により、前記第2撮像ステップにて撮像された前記二次元コードの画像から前記第1色情報を読み取る読取ステップと、前記読取ステップにて読み取られた前記第1色情報と、前記第2抽出ステップにて抽出された前記第2色情報とに基づき、前記第2撮像ステップにて撮像された前記撮像対象の画像に対し、色補正手段により色補正を行う色補正ステップと、を含むことを特徴としている。
The invention of claim 1 is a color correction method for performing color correction of an image to be imaged that is imaged by an imaging means, the first imaging step of imaging a first color reference pattern by the first imaging means,
A first extraction step of extracting first color information from the first color reference pattern imaged in the first imaging step by a first extraction means; and a second color reference pattern corresponding to the first color reference pattern And a code creation step of creating a two-dimensional code in which the first color information extracted in the first extraction step is recorded by a code creation means, and the same as the first imaging means, or the first A second imaging step for imaging the imaging object together with the two-dimensional code created in the code creation step by the imaging means different from the one imaging means; and a second extraction means for the second imaging step. A second extraction step for specifying the second color reference pattern in the captured image of the two-dimensional code and extracting the second color information from the second color reference pattern. And reading means for reading the first color information from the image of the two-dimensional code imaged in the second imaging step by the reading means; and the first color information read in the reading step; Based on the second color information extracted in the second extraction step, a color correction step of performing color correction by color correction means on the image to be imaged imaged in the second imaging step; It is characterized by including.

請求項2の発明は、請求項1に記載の色補正方法において、前記第1色参照パターンが、情報コード内に配置されており、前記第1撮像ステップにおいて、前記撮像手段と同一の又は前記撮像手段とは異なる光学的情報読取手段により、前記情報コードの撮像が行われ、前記第1抽出ステップにおいて、前記光学的情報読取手段により、前記情報コードから前記第1色参照パターンを示す特定の色配列のセル群を検出する処理、及び当該セル群を構成する各セルの色データを検出する処理が行われ、前記各セルの前記色データが前記第1色情報として抽出されることを特徴としている。   According to a second aspect of the present invention, in the color correction method according to the first aspect, the first color reference pattern is arranged in an information code, and the first imaging step is the same as the imaging unit or the The information code is imaged by an optical information reading unit different from the imaging unit, and in the first extraction step, the optical information reading unit is used to specify a specific color pattern indicating the first color reference pattern from the information code. A process of detecting a cell group of a color array and a process of detecting color data of each cell constituting the cell group are performed, and the color data of each cell is extracted as the first color information. It is said.

請求項3の発明は、請求項1又は請求項2に記載の色補正方法において、前記読取ステップ及び前記第2抽出ステップの後に、前記読取ステップにて読み取られた前記第1色情報と前記第2抽出ステップにて抽出された前記第2色情報とを比較し、前記第1色情報と前記第2色情報とに所定の差異があるか否かを判断する判断ステップと、前記判断ステップによって前記所定の差異があると判断された場合に報知を行う報知ステップと、を含んでおり、前記判断ステップにて前記所定の差異があると判断された場合に、前記撮像対象の画像に対して前記色補正ステップが行われることを特徴としている。   According to a third aspect of the present invention, in the color correction method according to the first or second aspect, after the reading step and the second extracting step, the first color information read in the reading step and the first color information. A determination step for comparing the second color information extracted in two extraction steps to determine whether there is a predetermined difference between the first color information and the second color information; A notification step of performing a notification when it is determined that there is the predetermined difference, and when it is determined that there is the predetermined difference in the determination step, with respect to the image to be imaged The color correction step is performed.

請求項4の発明は、請求項1から請求項3のいずれか一項に記載の色補正方法であって、前記第2撮像ステップにおいて、前記コード作成ステップにて作成された前記二次元コードを撮像エリア内に複数分散させた状態でそれら複数の前記二次元コードを前記撮像対象と共に撮像し、前記色補正ステップにおいて、前記第2撮像ステップで撮像された前記撮像対象の画像を複数の領域に分割すると共に、各領域についての色補正を、各領域に近接する前記二次元コードの前記第2色情報に基づいて行うことを特徴としている。   Invention of Claim 4 is the color correction method as described in any one of Claims 1-3, Comprising: In the said 2nd imaging step, the said two-dimensional code created in the said code creation step is used. The plurality of the two-dimensional codes are imaged together with the imaging target in a state of being dispersed in the imaging area, and the image of the imaging target captured in the second imaging step is divided into a plurality of areas in the color correction step. In addition, the color correction for each region is performed based on the second color information of the two-dimensional code adjacent to each region.

請求項5の発明は、請求項1から請求項4のいずれか一項に記載の色補正方法において、前記第1色参照パターンは、複数色のセルが所定の配列で構成されたものであり、前記第2色参照パターンは、前記第1色参照パターンと同一のセル配列からなるものとされている。そして、前記第1抽出ステップでは、前記第1色参照パターンの画像について各セル色毎にRGB成分をそれぞれ抽出する処理を行い、前記第2抽出ステップでは、前記第2色参照パターンの画像について各セル色毎にRGB成分をそれぞれ抽出する処理を行っている。そして、前記色補正ステップでは、前記第1色参照パターンの各セル色毎のRGB成分と、前記第2色参照パターンの各セル色毎のRGB成分とに基づき、前記撮像対象の画像のR成分、G成分、B成分をそれぞれ補正している。   According to a fifth aspect of the present invention, in the color correction method according to any one of the first to fourth aspects, the first color reference pattern includes a plurality of color cells arranged in a predetermined arrangement. The second color reference pattern has the same cell arrangement as the first color reference pattern. In the first extraction step, an RGB component is extracted for each cell color from the image of the first color reference pattern, and in the second extraction step, each image of the second color reference pattern is A process of extracting RGB components for each cell color is performed. In the color correction step, based on the RGB component for each cell color of the first color reference pattern and the RGB component for each cell color of the second color reference pattern, the R component of the image to be imaged , G component and B component are respectively corrected.

請求項6の発明は、光学的情報読取手段と、コード作成手段と、撮像装置とを備えた撮像システムであって、前記光学的情報読取手段が、第1色参照パターンが配置された情報コードを撮像する第1撮像手段と、前記第1撮像手段によって撮像された前記情報コードにおいて前記第1色参照パターンを検出し、且つ当該第1参照パターンから第1色情報を抽出する第1抽出手段と、を備えている。
そして、前記コード作成手段は、前記第1色参照パターンと対応する第2色参照パターンが配置され且つ前記第1抽出手段によって抽出された前記第1色情報がデータ領域に記録された二次元コードを作成する構成をなしている。
更に、前記撮像装置は、撮像対象を、前記コード作成手段によって作成された前記二次元コードと共に撮像可能な撮像手段と、前記撮像手段によって前記撮像対象と共に撮像された前記二次元コードの画像において、前記第2色参照パターンを特定し、且つ当該第2色参照パターンから前記第2色情報を抽出する第2抽出手段と、前記撮像手段によって前記撮像対象と共に撮像された前記二次元コードの画像から、前記第1色情報を読み取る読取手段と、前記読取手段によって読み取られた前記第1色情報と、前記第2抽出手段によって抽出された前記第2色情報とに基づき、前記撮像手段によって撮像された前記撮像対象の画像に対して色補正を行う色補正手段と、を有している。
The invention of claim 6 is an imaging system comprising an optical information reading means, a code creating means, and an imaging device, wherein the optical information reading means is an information code in which a first color reference pattern is arranged. And a first extraction means for detecting the first color reference pattern in the information code imaged by the first imaging means and extracting the first color information from the first reference pattern. And.
The code creation means includes a two-dimensional code in which a second color reference pattern corresponding to the first color reference pattern is arranged and the first color information extracted by the first extraction means is recorded in a data area It is configured to create.
Further, the imaging apparatus may include an imaging unit capable of imaging an imaging target together with the two-dimensional code created by the code creating unit, and an image of the two-dimensional code captured together with the imaging target by the imaging unit. A second extraction means for specifying the second color reference pattern and extracting the second color information from the second color reference pattern; and an image of the two-dimensional code imaged together with the imaging target by the imaging means. Based on the reading means for reading the first color information, the first color information read by the reading means, and the second color information extracted by the second extracting means, an image is taken by the imaging means. Color correction means for performing color correction on the image to be imaged.

請求項1の発明は、撮像対象の撮像に先立って、事前に第1色参照パターンを撮像し、その撮像された第1色参照パターンから第1色情報を抽出している。そして、その抽出された第1色情報が記録され且つ第1色参照パターンと対応する第2色参照パターンが配置された二次元コードを作成している。
このようにすると、第1色参照パターンを撮像したときの事前環境下で、当該第1色参照パターンの色がどのように表現されているかを定量的に特定し、当該事前環境を反映した情報(第1色情報)として二次元コードに記録しておくことができる。
また、二次元コードには、第1色参照パターンに対応する第2色参照パターンが配置されている。従って、当該二次元コードを撮像したときに、第1色参照パターンを撮像したときの環境を反映したデータ(第1色情報)のみならず、そのデータの生成元のパターン(第1色参照パターン)と対応するパターンの画像をも取得できるようになる。
一方、撮像対象を実際に撮像するときには、上記のように作成された二次元コードを撮像対象と共に撮像し、二次元コードに付された第2色参照パターンから第2色情報を抽出している。
このようにすると、撮像対象を実際に撮像する際に、第2色参照パターンがどのように色表現されているかを定量的に示した情報(第2色情報)を取得することができる。この第2色情報は、撮像対象を実際に撮像する時の撮像環境を反映したデータであるため、この第2色情報と、事前環境を定量的に示す情報(第1色情報)とに基づいて、撮像対象の画像の色補正を行うようにすれば、撮像対象を実際に撮像するときの撮像環境と、第1色参照パターンを事前に撮像したときの事前環境と、をいずれも考慮して、適切な色補正を行うことができる。
According to the first aspect of the present invention, prior to imaging of the imaging target, the first color reference pattern is captured in advance, and the first color information is extracted from the captured first color reference pattern. Then, a two-dimensional code in which the extracted first color information is recorded and a second color reference pattern corresponding to the first color reference pattern is arranged is created.
If it does in this way, it will specify quantitatively how the color of the 1st color reference pattern is expressed in the prior environment when the 1st color reference pattern was imaged, and the information which reflected the prior environment It can be recorded in a two-dimensional code as (first color information).
In the two-dimensional code, a second color reference pattern corresponding to the first color reference pattern is arranged. Accordingly, when the two-dimensional code is imaged, not only the data (first color information) reflecting the environment when the first color reference pattern is imaged, but also the pattern (first color reference pattern) from which the data is generated ) And a corresponding pattern image can be acquired.
On the other hand, when the imaging target is actually imaged, the two-dimensional code created as described above is imaged together with the imaging target, and the second color information is extracted from the second color reference pattern attached to the two-dimensional code. .
In this way, it is possible to acquire information (second color information) that quantitatively indicates how the second color reference pattern is expressed when the imaging target is actually imaged. Since the second color information is data reflecting the imaging environment when the imaging target is actually imaged, the second color information is based on the second color information and information (first color information) quantitatively indicating the prior environment. Thus, if color correction is performed on the image to be imaged, both the imaging environment when the imaging target is actually imaged and the prior environment when the first color reference pattern is imaged in advance are considered. Thus, appropriate color correction can be performed.

請求項2の発明は、第1色参照パターンが情報コード内に配置されており、第1色参照パターンを撮像するステップ(第1撮像ステップ)では、光学的情報読取手段によって当該情報コードから第1色参照パターンを示す特定の色配列のセル群を検出している。
このようにすると、情報コードの一部を第1色参照パターンとして兼用することができる。また、光学的情報読取手段による各セルの認識処理を利用して、第1色参照パターンを迅速且つ正確に特定できるようになる。
また、第1色情報を抽出するステップ(第1抽出ステップ)では、上記セル群を構成する各セルの色データを検出し、各セルの色データを第1色情報として抽出している。このようにすると、第1色参照パターンを撮像したときの環境(事前環境)を、複数のセルの色データによって詳細に表すことができ、その抽出処理についても、各セル毎に迅速且つ正確に行うことができる。
According to a second aspect of the present invention, the first color reference pattern is arranged in the information code, and in the step of imaging the first color reference pattern (first imaging step), the optical information reading means reads the first color reference pattern from the information code. A cell group having a specific color arrangement indicating one color reference pattern is detected.
In this way, a part of the information code can be used as the first color reference pattern. In addition, the first color reference pattern can be quickly and accurately specified using the recognition processing of each cell by the optical information reading means.
In the step of extracting the first color information (first extraction step), the color data of each cell constituting the cell group is detected, and the color data of each cell is extracted as the first color information. In this way, the environment (preliminary environment) when the first color reference pattern is imaged can be expressed in detail by the color data of a plurality of cells, and the extraction process is also performed quickly and accurately for each cell. It can be carried out.

請求項3の発明は、読取ステップ及び第2抽出ステップの後に、読取ステップにて読み取られた第1色情報と第2抽出ステップにて抽出された第2色情報とを比較し、第1色情報と第2色情報とに所定の差異があるか否かを判断している。このようにすると、第1色参照パターンを撮像した時の環境(事前環境)と、撮像対象を実際に撮像したときの環境(撮像環境)とに差異があるか否かを、色情報を基準として適切に判断することができ、差異がある場合にはその旨をユーザに知らしめることができる。
また、判断ステップにて所定の差異があると判断された場合に、撮像対象の画像に対して色補正を行っている。このようにすると、撮像対象を撮像したときの環境(撮像環境)が、第1色参照パターンを撮像したときの環境(事前環境)に類似する場合には、色補正を省略して処理の迅速化を図ることができ、撮像環境が事前環境に対してある程度変化している場合には、色補正を行って、環境の差異に起因する画像の変化を補正することができる。
The invention of claim 3 compares, after the reading step and the second extracting step, the first color information read in the reading step and the second color information extracted in the second extracting step. It is determined whether or not there is a predetermined difference between the information and the second color information. In this way, whether or not there is a difference between the environment when the first color reference pattern is imaged (preliminary environment) and the environment when the imaging target is actually imaged (imaging environment) is based on the color information. If there is a difference, the user can be informed.
Further, when it is determined that there is a predetermined difference in the determination step, color correction is performed on the image to be captured. In this way, when the environment (imaging environment) when the imaging target is imaged is similar to the environment (preliminary environment) when the first color reference pattern is imaged, the color correction is omitted and the processing is performed quickly. When the imaging environment has changed to some extent with respect to the previous environment, color correction can be performed to correct image changes due to environmental differences.

請求項4の発明は、撮像対象を撮像する際に、コード作成ステップにて作成された二次元コードを撮像エリア内に複数分散させ、その状態で、撮像対象をそれら複数の二次元コードと共に撮像している。そして、得られた撮像対象の画像を複数の領域に分割しており、各領域についての色補正を、各領域に近接する二次元コードの色情報(第2色情報)に基づいて行っている。このようにすると、各領域の撮像環境及び事前環境を考慮し、領域毎に色補正を適切に行うことができる。   In the invention of claim 4, when imaging the imaging target, a plurality of two-dimensional codes created in the code creation step are dispersed in the imaging area, and in this state, the imaging target is imaged together with the plurality of two-dimensional codes. is doing. The obtained image to be imaged is divided into a plurality of areas, and color correction for each area is performed based on color information (second color information) of a two-dimensional code close to each area. . In this way, it is possible to appropriately perform color correction for each area in consideration of the imaging environment and the prior environment of each area.

請求項5の発明では、複数色のセルが所定の配列で構成されてなる第1色参照パターンと、第1色参照パターンと同一のセル配列からなる第2色参照パターンが用いられている。そして、第1抽出ステップでは、第1色参照パターンの画像について各セル色毎にRGB成分をそれぞれ抽出する処理を行い、第2抽出ステップでは、第2色参照パターンの画像について各セル色毎にRGB成分をそれぞれ抽出する処理を行っている。このようにすると、第1色参照パターンが撮像されたときの環境(事前環境)を、当該第1色参照パターンの各セル色毎に抽出されるRGB成分によって具体的且つ詳細に定量化することができる。また、撮像対象を撮像したときの環境(撮像環境)についても、第2色参照パターンの各セル色毎に抽出されるRGB成分によって具体的且つ詳細に定量化することができる。 更に、第1色参照パターンと第2色参照パターンとが同一のセル配列で構成されているため、第1色参照パターンの各セル色毎のRGB成分、及び第2色参照パターンの各セル色毎のRGB成分をそれぞれ抽出すれば、事前環境から撮像環境に変化したことに伴って、R成分、G成分、B成分それぞれに、どの程度の変化が生じているのかが明確になり、これに基づいて撮像対象の画像のR成分、G成分、B成分をそれぞれ補正すれば、両環境がR成分に与える影響、両環境がG成分に与える影響、両環境がB成分に与える影響をそれぞれ具体的に考慮して、撮像対象の画像のR成分、G成分、B成分を適切に補正することができる。
このように本発明によれば、RGBそれぞれについて、両環境が与える影響の正確な評価、及びそれを考慮した補正を独立して行うことができ、全ての成分についてより適切な補正が可能となる。
In the invention of claim 5, a first color reference pattern in which cells of a plurality of colors are configured in a predetermined arrangement and a second color reference pattern having the same cell arrangement as the first color reference pattern are used. In the first extraction step, RGB components are extracted for each cell color from the first color reference pattern image, and in the second extraction step, each cell color is extracted from the second color reference pattern image. Processing for extracting RGB components is performed. In this way, the environment (pre-environment) when the first color reference pattern is imaged is quantified specifically and in detail by the RGB components extracted for each cell color of the first color reference pattern. Can do. Further, the environment (imaging environment) when the imaging target is imaged can also be quantified specifically and in detail by the RGB components extracted for each cell color of the second color reference pattern. Furthermore, since the first color reference pattern and the second color reference pattern are composed of the same cell arrangement, the RGB components for each cell color of the first color reference pattern and the cell colors of the second color reference pattern If each RGB component is extracted, it becomes clear how much the R component, the G component, and the B component change due to the change from the previous environment to the imaging environment. If the R component, G component, and B component of the image to be captured are corrected based on the above, the influence of both environments on the R component, the influence of both environments on the G component, and the influence of both environments on the B component are specified. Therefore, it is possible to appropriately correct the R component, the G component, and the B component of the image to be imaged.
As described above, according to the present invention, it is possible to independently perform an accurate evaluation of the influences of both environments and to perform correction in consideration of each of RGB, and it is possible to perform more appropriate correction for all components. .

請求項6の発明によれば、請求項1と同様の効果を奏する撮像システムを実現できる。   According to the invention of claim 6, it is possible to realize an imaging system having the same effect as that of claim 1.

図1は、第1実施形態に係る撮像システムを概略的に例示するブロック図である。FIG. 1 is a block diagram schematically illustrating an imaging system according to the first embodiment. 図2は、図1の撮像システムによって行われる事前処理の流れを例示するフローチャートである。FIG. 2 is a flowchart illustrating the flow of pre-processing performed by the imaging system of FIG. 図3(a)は、情報コード撮像処理について説明する説明図である。図3(b)は、第1色参照パターンが付された情報コードを例示する説明図である。FIG. 3A is an explanatory diagram illustrating the information code imaging process. FIG. 3B is an explanatory diagram illustrating an information code to which the first color reference pattern is attached. 図4は、第1色情報を概念的に説明する説明図である。FIG. 4 is an explanatory diagram for conceptually explaining the first color information. 図5は、第2色参照パターンを含んだ二次元コードを例示する説明図である。FIG. 5 is an explanatory diagram illustrating a two-dimensional code including the second color reference pattern. 図6は、図1の撮像システムによって行われる撮像処理の流れを例示するフローチャートである。FIG. 6 is a flowchart illustrating the flow of imaging processing performed by the imaging system of FIG. 図7は、図6の撮像処理で行われる読取処理の流れを例示するフローチャートである。FIG. 7 is a flowchart illustrating the flow of the reading process performed in the imaging process of FIG. 図8は、図6の撮像処理で行われる第2色参照パターン検出処理の流れを例示するフローチャートである。FIG. 8 is a flowchart illustrating the flow of the second color reference pattern detection process performed in the imaging process of FIG. 図9は、図6の撮像処理で行われる補正データ生成処理の流れを例示するフローチャートである。FIG. 9 is a flowchart illustrating the flow of correction data generation processing performed in the imaging processing of FIG. 図10は、撮像対象を二次元コードと共に撮像する様子を説明する説明図である。FIG. 10 is an explanatory diagram for explaining a state in which an imaging target is imaged together with a two-dimensional code. 図11は、第2色参照パターン検出処理について説明する説明図である。FIG. 11 is an explanatory diagram illustrating the second color reference pattern detection process. 図12(a)は、二次元コードから読み出した第1色情報を説明する説明図であり、図12(b)は、第2色参照パターンから抽出した第2色情報を説明する説明図である。12A is an explanatory diagram for explaining the first color information read from the two-dimensional code, and FIG. 12B is an explanatory diagram for explaining the second color information extracted from the second color reference pattern. is there. 図13は、第1色情報及び第2色情報の差分データを説明する説明図である。FIG. 13 is an explanatory diagram illustrating difference data between the first color information and the second color information. 図14は、第2実施形態に係る撮像システムで行われる撮像処理の様子を概念的に説明する説明図である。FIG. 14 is an explanatory diagram for conceptually explaining the state of imaging processing performed in the imaging system according to the second embodiment. 図15は、第2実施形態に係る撮像システムで行われる読取処理を例示するフローチャートである。FIG. 15 is a flowchart illustrating a reading process performed by the imaging system according to the second embodiment. 図16は、いずれかの二次元コードの検出が失敗した例を概念的に説明する説明図である。FIG. 16 is an explanatory diagram for conceptually explaining an example in which detection of any two-dimensional code has failed.

[第1実施形態]
以下、本発明に係る色補正方法及び撮像システムを具現化した第1実施形態について、図面を参照して説明する。
(全体構成)
まず、撮像システムの全体構成について説明する。
図1は、本発明に係る撮像システムを概略的に例示するブロック図である。図1に示すように、第1実施形態に係る撮像システム1は、撮像装置10と、情報処理装置20と、印刷装置30とを備えており、様々な撮像対象を撮像し得るシステムとして構成されている。
[First embodiment]
Hereinafter, a color correction method and an imaging system according to a first embodiment of the present invention will be described with reference to the drawings.
(overall structure)
First, the overall configuration of the imaging system will be described.
FIG. 1 is a block diagram schematically illustrating an imaging system according to the present invention. As shown in FIG. 1, the imaging system 1 according to the first embodiment includes an imaging device 10, an information processing device 20, and a printing device 30, and is configured as a system that can image various imaging targets. ing.

撮像装置10は、様々な対象物を撮像し得るカメラとして構成されており、撮像対象からの反射光を受光可能な受光センサを有している。撮像装置10に設けられた受光センサは、例えば、C−MOSやCCD等の受光素子を2次元に配列したエリアセンサとして構成されており、撮像対象の画像データを情報処理装置20に出力する構成をなしている。
なお、本実施形態では、撮像装置10が「第1撮像手段」「第2撮像手段」の一例に相当する。
The imaging device 10 is configured as a camera that can image various objects, and includes a light receiving sensor that can receive reflected light from the imaging target. The light receiving sensor provided in the imaging device 10 is configured as an area sensor in which light receiving elements such as a C-MOS and a CCD are two-dimensionally arranged, and outputs image data to be imaged to the information processing device 20. I am doing.
In the present embodiment, the imaging device 10 corresponds to an example of “first imaging unit” and “second imaging unit”.

情報処理装置20は、例えばパーソナルコンピュータとして構成され、CPUや、ROM、RAM等の記憶手段などを備えており、各種情報処理を行うように構成されている。この情報処理装置20は、撮像装置10からの画像データを記憶手段に記憶して保存する機能、当該画像データに関する各種画像処理を行う機能、図2、図6に示すような各種撮像処理を行う機能などを有している。   The information processing apparatus 20 is configured as a personal computer, for example, and includes a storage unit such as a CPU, ROM, and RAM, and is configured to perform various types of information processing. The information processing apparatus 20 has a function of storing and storing image data from the imaging apparatus 10 in a storage unit, a function of performing various image processing relating to the image data, and various imaging processes as shown in FIGS. It has functions.

印刷装置30は、情報処理装置20に接続されており、情報処理装置20から印刷指令及び印刷すべきデータを受けて印刷を行う公知のプリンタとして構成されている。   The printing apparatus 30 is connected to the information processing apparatus 20 and is configured as a known printer that receives a print command and data to be printed from the information processing apparatus 20 and performs printing.

次に、本実施形態に係る撮像システム1を用いて行われる撮像処理について説明する。本実施形態に係る撮像システム1では、大きく分けて、色補正を行うために必要となる事前処理と、実際に対象物を撮像する撮像処理の2つの処理が行われるようになっている。以下、当該システムで行われる各処理について詳述する。   Next, an imaging process performed using the imaging system 1 according to the present embodiment will be described. In the imaging system 1 according to the present embodiment, roughly divided, two processes, a pre-process necessary for performing color correction, and an imaging process for actually capturing an object are performed. Hereinafter, each process performed in the system will be described in detail.

(事前処理)
まず、事前処理について説明する。
図2は、図1の撮像システムによって行われる事前処理の流れを例示するフローチャートである。図3(a)は、情報コード撮像処理について説明する説明図である。図3(b)は、第1色参照パターンが付された情報コードを例示する説明図である。図4は、第1色情報を概念的に説明する説明図である。
(Pre-processing)
First, pre-processing will be described.
FIG. 2 is a flowchart illustrating the flow of pre-processing performed by the imaging system of FIG. FIG. 3A is an explanatory diagram illustrating the information code imaging process. FIG. 3B is an explanatory diagram illustrating an information code to which the first color reference pattern is attached. FIG. 4 is an explanatory diagram for conceptually explaining the first color information.

図2に示す事前処理は、情報処理装置20によって実行される処理であり、まず、第1色参照パターンが付された情報コードを撮像する処理が行われる(S1)。この処理では、図3(a)のように情報コードQ1が付された対象物Rを撮像装置10に撮像させ、当該撮像装置10から情報コードQ1の画像データを取得する。   The pre-process shown in FIG. 2 is a process executed by the information processing apparatus 20, and first, a process of capturing an information code with the first color reference pattern is performed (S1). In this process, as shown in FIG. 3A, the imaging device 10 causes the imaging device 10 to image the object R to which the information code Q1 is attached, and the image data of the information code Q1 is acquired from the imaging device 10.

S1で用いられる情報コードQ1は、例えば、図3(b)のような構成をなしており、予め規定された第1色参照パターンP1がコード内の所定位置に配置されてなるものである。図3(b)の例では、情報コードQ1がQRコードとして構成されており、QRコードにおいて3つ備えられるべきファインダパターンFPの一つの中央部暗色領域を第1色参照パターンP1に変換した構成をなしている。   The information code Q1 used in S1 has, for example, a configuration as shown in FIG. 3B, and a first color reference pattern P1 defined in advance is arranged at a predetermined position in the code. In the example of FIG. 3B, the information code Q1 is configured as a QR code, and one central dark region of the finder pattern FP that should be provided in the QR code is converted into the first color reference pattern P1. I am doing.

図3(b)に示すように、第1色参照パターンP1は、情報コードQ1を構成する情報表示単位セル(即ち、明色セル及び暗色セル)と同じサイズのセルが複数集合してなるセル群によって構成されている。このセル群は、複数種類のセルが3行3列のマトリックス状に配置されてなるものであり、図3(b)の例では、8種類のセルが予め規定された順序で配置されている。具体的には、情報コードQ1の角部寄りにおける当該セル群の角位置に白色セル51が配置されており、この白色セル51から外縁に沿って時計回りに、シアン色セル52、赤色セル53、緑色セル54、白色セル55、マゼンタ色セル56、青色セル57、黄色セル58と配置されている。また、中心部には、黒色セル59が配置されている。   As shown in FIG. 3B, the first color reference pattern P1 is a cell in which a plurality of cells having the same size as information display unit cells (that is, light cells and dark cells) constituting the information code Q1 are collected. It is composed of groups. In this cell group, a plurality of types of cells are arranged in a matrix of 3 rows and 3 columns, and in the example of FIG. 3B, 8 types of cells are arranged in a predetermined order. . Specifically, a white cell 51 is arranged at a corner position of the cell group near the corner of the information code Q1, and a cyan cell 52 and a red cell 53 are clockwise from the white cell 51 along the outer edge. , Green cell 54, white cell 55, magenta cell 56, blue cell 57, and yellow cell 58. A black cell 59 is disposed in the center.

なお、本実施形態では、S1の情報コード撮像処理が「第1撮像ステップ」の一例に相当する。また、撮像装置10及び情報処理装置20が「第1撮像手段」の一例に相当する。   In the present embodiment, the information code imaging process of S1 corresponds to an example of a “first imaging step”. The imaging device 10 and the information processing device 20 correspond to an example of “first imaging unit”.

図2に示すように、S1の処理の後には、S1で取得された情報コードQ1の画像から第1色参照パターンP1を検出する処理を行う(S2)。本実施形態に係る撮像システム1では、S1で撮像する情報コードとしてQRコードを用いる点、及びこのQRコードの所定位置(図3の例ではファインダーパターンの中心部暗色領域)に第1色参照パターンP1を配置する点が予め規定されており、S2では、撮像された画像において、コード領域を特定すると共に、いずれかのファインダパターンの暗色領域において、第1色参照パターンを示す特定の色配列のセル群を検出している。なお、QRコードのコード領域を特定する方法は、周知の様々な方法を用いることができ、また、ファインダパターンの特定方法についても周知方法を用いることができる。   As shown in FIG. 2, after the process of S1, a process of detecting the first color reference pattern P1 from the image of the information code Q1 acquired in S1 is performed (S2). In the imaging system 1 according to the present embodiment, the first color reference pattern is used at the point where the QR code is used as the information code to be imaged at S1, and at a predetermined position of the QR code (in the example of FIG. A point where P1 is arranged is defined in advance. In S2, a code area is specified in the captured image, and a specific color array indicating the first color reference pattern is displayed in the dark color area of any finder pattern. A cell group is detected. It should be noted that various known methods can be used as the method for specifying the code area of the QR code, and known methods can also be used as the method for specifying the finder pattern.

また、S2の処理では、上記のようにコード領域及びファインダパターンの位置を特定した上で、コード領域内における第1色参照パターンP1が配置されるべき所定位置を参照する。本実施形態では、情報コードQ1内の所定位置に第1色参照パターンP1が配置されることが予め規定されており、例えば、図3(b)のように、ファインダパターンFP2の中央領域に第1色参照パターンP1を配置することが予め規定されている場合、上記のように検出された3つのファインダパターンFP1〜FP3の内の、その規定されたファインダパターンFP2の中央領域を参照し、上記セル群が存在することを確認する。例えば、ファインダパターンFP2の中央領域を特定した上で、中央領域の3×3のセル群が所定配列(角部の白色セルから外縁に沿って時計回りに、シアン色セル、赤色セル、緑色セル、白色セル、マゼンタ色セル、青色セル、黄色セルと配置され、中心部に黒色セルが配置される配列)であるか否かを確認し、所定配列であれば、第1色参照パターンP1が検出されたものとして以降の処理を行う。   Further, in the process of S2, after specifying the position of the code area and the finder pattern as described above, a predetermined position where the first color reference pattern P1 is to be arranged in the code area is referred to. In the present embodiment, it is preliminarily specified that the first color reference pattern P1 is arranged at a predetermined position in the information code Q1, and for example, as shown in FIG. 3B, the first color reference pattern P1 is arranged in the center area of the finder pattern FP2. When it is specified in advance that the one-color reference pattern P1 is to be arranged, the center area of the specified finder pattern FP2 among the three finder patterns FP1 to FP3 detected as described above is referred to, and Confirm that the cell group exists. For example, after specifying the central region of the finder pattern FP2, a 3 × 3 cell group in the central region is arranged in a predetermined arrangement (cyan cells, red cells, green cells clockwise from the white cells at the corners along the outer edge). , White cells, magenta cells, blue cells, yellow cells, and a black cell at the center). If it is a predetermined array, the first color reference pattern P1 is Subsequent processing is performed assuming that it has been detected.

図2に示すように、S2の処理の後には、第1色情報を抽出する処理が行われる(S3)。この処理では、S2で検出された第1色参照パターンP1において各セルの色データを抽出する。具体的には、図3(b)のように3行3列のマトリックス状のセル群として構成される第1色参照パターンP1において、各セルについてのR成分、G成分、B成分を検出する。例えば、白色セル51のR成分輝度値、G成分輝度値、B成分輝度値をそれぞれ求め、同様に、シアン色セル52についても、R成分輝度値、G成分輝度値、B成分輝度をそれぞれ求める。また、他の赤色セル53、緑色セル54、白色セル55、マゼンタ色セル56、青色セル57、黄色セル58、黒色セル59の各領域についてもR成分輝度値、G成分輝度値、B成分輝度値をそれぞれ求める。図4は、このようにして求められた各色のセルのR成分輝度値、G成分輝度値、B成分輝度値を例示しており、このようなデータが「第1色情報」に相当している。   As shown in FIG. 2, after the process of S2, a process of extracting the first color information is performed (S3). In this process, the color data of each cell is extracted from the first color reference pattern P1 detected in S2. Specifically, in the first color reference pattern P1 configured as a 3 × 3 matrix cell group as shown in FIG. 3B, the R component, G component, and B component for each cell are detected. . For example, the R component luminance value, the G component luminance value, and the B component luminance value of the white cell 51 are obtained, and similarly, the R component luminance value, the G component luminance value, and the B component luminance are obtained for the cyan cell 52, respectively. . The other red cell 53, green cell 54, white cell 55, magenta cell 56, blue cell 57, yellow cell 58, and black cell 59 also have R component luminance values, G component luminance values, and B component luminances. Find each value. FIG. 4 exemplifies the R component luminance value, the G component luminance value, and the B component luminance value of each color cell thus obtained. Such data corresponds to “first color information”. Yes.

なお、本実施形態では、第1色参照パターンP1に白セルが2つ設けられているが、このように色参照パターン内に所定色のセルを複数設ける場合、いずれか1つのセルのR成分輝度値、G成分輝度値、B成分輝度値を当該色の代表値として第1色情報に含ませてもよく、同色の複数セルのR成分輝度値の平均値、G成分輝度値の平均値、B成分輝度値の平均値を当該色の代表値としてれ第1色情報に含ませてもよい。   In the present embodiment, two white cells are provided in the first color reference pattern P1, but when a plurality of cells of a predetermined color are provided in the color reference pattern in this way, the R component of any one cell. The luminance value, the G component luminance value, and the B component luminance value may be included in the first color information as representative values of the color, and the average value of the R component luminance values and the average value of the G component luminance values of a plurality of cells of the same color The average value of the B component luminance values may be taken as the representative value of the color and included in the first color information.

本実施形態では、S2及びS3の処理が、「第1抽出ステップ」の一例に相当する。また、情報処理装置20が「第1抽出手段」の一例に相当し、第1撮像ステップにて撮像された第1色参照パターンP1から上記「第1色情報」を抽出する機能を有する。   In the present embodiment, the processes of S2 and S3 correspond to an example of “first extraction step”. The information processing apparatus 20 corresponds to an example of a “first extraction unit” and has a function of extracting the “first color information” from the first color reference pattern P1 imaged in the first imaging step.

図2に示すように、S3の処理の後には、二次元コード生成処理が行われる(S4)。この二次元コード作成処理では、上記第1色参照パターンP1に対応する第2色参照パターンP2が所定位置に配置され、且つS3で抽出された「第1色情報」が記録された二次元コードQ2の画像データを生成する。   As shown in FIG. 2, a two-dimensional code generation process is performed after the process of S3 (S4). In this two-dimensional code creation process, a two-dimensional code in which the second color reference pattern P2 corresponding to the first color reference pattern P1 is arranged at a predetermined position and the “first color information” extracted in S3 is recorded. Q2 image data is generated.

図5は、S4で生成される二次元コードQ2のコード構成を例示している。この二次元コードQ2は、QRコードとして構成されており、コード内の所定位置(具体的には、ファインダパターンFP4〜FP6のいずれかの中央部暗色領域)を第2色参照パターンP2に置換した構成をなしている。また、第2色参照パターンP2は、図3(b)に示す第1色参照パターンP1と同じ8種類(8色)のセルが3×3のマトリックス状に配置されており、これら8種類のセルが第1色参照パターンP1と同一のセル配列で並んでいる。具体的には、第1色参照パターンP1と同様に、角位置に白色セル61が配置されており、この白色セル61から外縁に沿って時計回りに、シアン色セル62、赤色セル63、緑色セル64、白色セル65、マゼンタ色セル66、青色セル67、黄色セル68と配置されている。また、中心部には、黒色セル69が配置されている。   FIG. 5 illustrates a code configuration of the two-dimensional code Q2 generated in S4. This two-dimensional code Q2 is configured as a QR code, and a predetermined position in the code (specifically, any one of the dark areas in the center of the finder patterns FP4 to FP6) is replaced with the second color reference pattern P2. It has a configuration. The second color reference pattern P2 has the same eight types (eight colors) of cells as the first color reference pattern P1 shown in FIG. 3B arranged in a 3 × 3 matrix. The cells are arranged in the same cell array as the first color reference pattern P1. Specifically, as in the first color reference pattern P1, white cells 61 are arranged at the corner positions, and cyan cells 62, red cells 63, and green are clockwise from the white cells 61 along the outer edge. A cell 64, a white cell 65, a magenta cell 66, a blue cell 67, and a yellow cell 68 are arranged. A black cell 69 is disposed in the center.

また、二次元コードQ2のデータ領域(例えば領域D1)には、上記「第1色情報」が符号化された状態で記録されている。データ領域に所定情報(ここでは第1色情報等)を記録したQRコードの生成方法は周知技術であるので詳細な省略するが、例えばJIS規格に規定される方法を用いて生成することができる。なお、図5では、データ領域の配置について一点鎖線にて概念的に示しているが、データ領域の構成については、JISに規定される例や、他の公知例など様々な構成を採用できる。   Further, the “first color information” is recorded in a data area (for example, the area D1) of the two-dimensional code Q2. A QR code generation method in which predetermined information (here, the first color information, etc.) is recorded in the data area is a well-known technique and will not be described in detail. For example, it can be generated using a method defined in the JIS standard. . In FIG. 5, the arrangement of the data area is conceptually indicated by a one-dot chain line, but various configurations such as an example defined in JIS and other known examples can be adopted for the configuration of the data area.

図2に示すように、S4の処理の後には、二次元コードを印刷する処理が行われる(S5)。S5の処理では、印刷装置30に対して印刷指令、及び二次元コードQ2の画像データを含んだ印刷データを出力し、印刷装置30は、情報処理装置20から印刷指令及び印刷データを取得すると、紙等の記録媒体に二次元コードQ2を印刷する。
本実施形態では、S4及びS5の処理が「二次元コード作成ステップ」の一例に相当する。また、情報処理装置20及び印刷装置30が「コード作成手段」の一例に相当する。
As shown in FIG. 2, the process of printing a two-dimensional code is performed after the process of S4 (S5). In the process of S <b> 5, the print command and the print data including the image data of the two-dimensional code Q <b> 2 are output to the printing device 30. When the printing device 30 acquires the print command and the print data from the information processing device 20, The two-dimensional code Q2 is printed on a recording medium such as paper.
In the present embodiment, the processes of S4 and S5 correspond to an example of a “two-dimensional code creation step”. Further, the information processing apparatus 20 and the printing apparatus 30 correspond to an example of a “code creation unit”.

なお、本実施形態では、S1で用いられる情報コードQ1(図3参照)が、二次元コードQ2を印刷する印刷装置30によって印刷されたものとされている。また、情報コードQ1が記録される記録媒体(紙等)は、S5で二次元コードQ2を印刷する記録媒体と同種類の媒体(例えば同種類の紙)とされている。   In the present embodiment, the information code Q1 (see FIG. 3) used in S1 is printed by the printing apparatus 30 that prints the two-dimensional code Q2. The recording medium (such as paper) on which the information code Q1 is recorded is the same type of medium (for example, the same type of paper) as the recording medium on which the two-dimensional code Q2 is printed in S5.

(対象撮像処理)
次に、撮像対象を実際に撮像する処理(撮像処理)について説明する。
図6は、撮像処理の流れを例示するフローチャートである。図7は、撮像処理で行われる読取処理の流れを例示するフローチャートである。図8は、撮像処理で行われる第2色参照パターン検出処理の流れを例示するフローチャートである。図9は、撮像処理で行われる補正データ生成処理の流れを例示するフローチャートである。図10は、撮像対象を二次元コードと共に撮像する様子を説明する説明図である。図11は、第2色参照パターン検出処理について説明する説明図である。図12(a)は、二次元コードから読み出した第1色情報を説明する説明図であり、図12(b)は、第2色参照パターンから抽出した第2色情報を説明する説明図である。図13は、第1色情報及び第2色情報の差分データを説明する説明図である。
(Target imaging processing)
Next, a process (imaging process) for actually imaging an imaging target will be described.
FIG. 6 is a flowchart illustrating the flow of the imaging process. FIG. 7 is a flowchart illustrating the flow of the reading process performed in the imaging process. FIG. 8 is a flowchart illustrating the flow of the second color reference pattern detection process performed in the imaging process. FIG. 9 is a flowchart illustrating the flow of the correction data generation process performed in the imaging process. FIG. 10 is an explanatory diagram for explaining a state in which an imaging target is imaged together with a two-dimensional code. FIG. 11 is an explanatory diagram illustrating the second color reference pattern detection process. 12A is an explanatory diagram for explaining the first color information read from the two-dimensional code, and FIG. 12B is an explanatory diagram for explaining the second color information extracted from the second color reference pattern. is there. FIG. 13 is an explanatory diagram illustrating difference data between the first color information and the second color information.

図6に示す撮像処理では、まず撮像する対象物(撮像対象)を事前処理で作成された二次元コードQ1と共に撮像する処理を行う(S10)。例えば図10のように対象物T(撮像対象)と二次元コードQ1とを近接させて配置し、このような状態で撮像装置10に撮像指令を与えこれらを撮像させる。
本実施形態では、S10の処理が「第2撮像ステップ」の一例に相当する。また、撮像装置10及び情報処理手段20が「撮像手段」「第2撮像手段」の一例に相当する。
In the imaging process shown in FIG. 6, first, a process of imaging an object to be imaged (imaging object) together with the two-dimensional code Q1 created by the pre-processing is performed (S10). For example, as shown in FIG. 10, the object T (imaging target) and the two-dimensional code Q1 are arranged close to each other, and in this state, an imaging command is given to the imaging device 10 to capture them.
In the present embodiment, the process of S10 corresponds to an example of “second imaging step”. The imaging device 10 and the information processing means 20 correspond to an example of “imaging means” and “second imaging means”.

図6に示すように、S10の処理の後には、二次元コードQ2を読み取る読取処理が行われる(S20)。この読取処理は、例えば図7のような流れで行われ、まず、対象物Tを二次元コードQ1と共に撮像した画像データを撮像装置10から取得し(S21)、その画像データにおいて二次元コードQ2のコード領域を検出する(S22)。更に、二次元コードQ2のフォーマットデータを参照して、当該二次元コードQ2のコード種を特定し(S23)、二次元コードQ2のデコード処理を行う(S24)。なお、コード領域の検出処理(S22)、コード種の特定処理(S23)、デコード処理(S24)については、QRコード等の各種二次元コードにおいて周知技術であるため詳細な説明は省略する。   As shown in FIG. 6, after the process of S10, a reading process for reading the two-dimensional code Q2 is performed (S20). This reading process is performed, for example, as shown in FIG. 7. First, image data obtained by imaging the object T together with the two-dimensional code Q1 is acquired from the imaging device 10 (S21), and the two-dimensional code Q2 in the image data is acquired. Is detected (S22). Furthermore, referring to the format data of the two-dimensional code Q2, the code type of the two-dimensional code Q2 is specified (S23), and the decoding process of the two-dimensional code Q2 is performed (S24). The code area detection process (S22), the code type identification process (S23), and the decoding process (S24) are well-known techniques in various two-dimensional codes such as QR codes, and thus detailed descriptions thereof are omitted.

S24にてデコードが成功した場合には、そのデコード結果を情報処理装置20内の記憶手段(例えばRAM,HDD等)に記憶する(S25)。本実施形態では、二次元コードQ2のデータ領域に「第1色情報」が記録されているため、デコードが成功した場合には、前記記憶手段に「第1色情報」が記録されることとなる。なお、図12(a)には、デコードによって得られた「第1色情報」を概念的に示している。
本実施形態では、S20の処理が「読取ステップ」の一例に相当する。また、情報処理装置20が「読取手段」の一例に相当する。
If the decoding is successful in S24, the decoding result is stored in storage means (for example, RAM, HDD, etc.) in the information processing apparatus 20 (S25). In the present embodiment, since “first color information” is recorded in the data area of the two-dimensional code Q2, when decoding is successful, “first color information” is recorded in the storage means. Become. FIG. 12A conceptually shows “first color information” obtained by decoding.
In the present embodiment, the process of S20 corresponds to an example of a “reading step”. The information processing apparatus 20 corresponds to an example of “reading unit”.

図6に示すように、上記読取処理(S20)の後には、デコードが成功したか否かを判断する処理が行われる(S30)。S20においてデコードが成功した場合(S30:Yes)には、第2色参照パターンを検出する処理が行われる(S40)。一方、S20においてデコードが成功しなかった場合(S30:No)には、図6に示す当該撮像処理を終了する。なお、デコードが成功しなかった場合には、S10で撮像された対象物の画像の色補正を行わないようにしてもよく、或いは過去に生成した補正データを利用して色補正を行うようにしてもよい。   As shown in FIG. 6, after the reading process (S20), a process for determining whether or not the decoding is successful is performed (S30). If the decoding is successful in S20 (S30: Yes), a process for detecting the second color reference pattern is performed (S40). On the other hand, if the decoding is not successful in S20 (S30: No), the imaging process shown in FIG. 6 is terminated. If the decoding is not successful, the color correction of the image of the object captured in S10 may not be performed, or the color correction may be performed using correction data generated in the past. May be.

次に、S40の第2色参照パターン検出処理について説明する。
S40の処理は、S10で撮像された二次元コードQ2の画像において第2色参照パターンP1を検出する処理であり、例えば図8のような流れで行われる。図8の例では、まず、二次元コードQ1のコード領域において、いずれかのセルを基点セルとする3×3のセル群を抽出し、当該セル群を構成する各セルの色を認識する(S41)。例えば、図11のようにいずれかのセルC1を基点セルとして、当該セルから右方向及び下方向に並ぶ3×3のセル群X1を抽出する。そしてこのセル群X1を構成する各セルの色をそれぞれ認識する。そして、当該セル群X1の配列が第2色参照パターンP2(図5)と同じ配列であるか否かを判断する(S42)。上述したように、第2色参照パターンP2は、角位置に白色セルが配置され、この白色セルから外縁に沿って時計回りに、シアン色セル、赤色セル、緑色セル、白色セル、マゼンタ色セル、青色セル、黄色セルと配置され、中心部に黒色セルが配置されたセル配列となっている。従って、セル群X1がこのようなセル配列となっている場合には第2色参照パターンP2に相当するセル群を発見したものとしてS42にてYesに進み、当該セル群(第2色参照パターンP2に相当するセル群)を特定する座標データを記憶しておく(S44)。
Next, the second color reference pattern detection process in S40 will be described.
The process of S40 is a process of detecting the second color reference pattern P1 in the image of the two-dimensional code Q2 imaged in S10, and is performed according to the flow as shown in FIG. In the example of FIG. 8, first, in the code area of the two-dimensional code Q1, a 3 × 3 cell group having any cell as a base cell is extracted, and the color of each cell constituting the cell group is recognized ( S41). For example, as shown in FIG. 11, any cell C1 is set as a base cell, and a 3 × 3 cell group X1 arranged in the right direction and the downward direction is extracted from the cell. And the color of each cell which comprises this cell group X1 is each recognized. Then, it is determined whether or not the array of the cell group X1 is the same array as the second color reference pattern P2 (FIG. 5) (S42). As described above, in the second color reference pattern P2, white cells are arranged at corner positions, and cyan cells, red cells, green cells, white cells, magenta cells are clockwise from the white cells along the outer edge. A blue cell and a yellow cell are arranged, and a black cell is arranged at the center. Therefore, if the cell group X1 has such a cell arrangement, it is determined that a cell group corresponding to the second color reference pattern P2 has been found, the process proceeds to Yes in S42, and the cell group (second color reference pattern) Coordinate data specifying a cell group corresponding to P2 is stored (S44).

一方、セル群X1が第2色参照パターンP2と異なるセル配列である場合には、S42にてNoに進んで基点セルを1セルずらし(S43)、そのずらしたセルC2を基点セルとするセル群X2についてS41、S42の処理を繰り返す。このような処理を、基点セルをずらしながら順次行い、第2色参照パターンP2に相当するセル群を発見するまで繰り返す。   On the other hand, if the cell group X1 has a cell arrangement different from that of the second color reference pattern P2, the process proceeds to No in S42 and the base cell is shifted by one cell (S43), and the shifted cell C2 is set as the base cell. The processes of S41 and S42 are repeated for the group X2. Such processing is sequentially performed while shifting the base cell, and is repeated until a cell group corresponding to the second color reference pattern P2 is found.

図6に示すように、S40の処理の後には、S50の判断処理が行われる。S50では、S40において第2色参照パターンP2の検出が成功したか否かを判断しており、S40において第2色参照パターンP2が正常に検出された場合(S50:Yes)には、S60の補正データ生成処理が行われる。一方、第2色参照パターンP2が正常に検出されなかった場合(S50:No)には、図6に示す当該撮像処理を終了する。なお、第2色参照パターンP2が検出されなかった場合には、S10で撮像された対象物の画像の色補正を行わないようにしてもよく、或いは過去に生成した補正データを利用して色補正を行うようにしてもよい。   As shown in FIG. 6, the determination process of S50 is performed after the process of S40. In S50, it is determined whether or not the detection of the second color reference pattern P2 is successful in S40. If the second color reference pattern P2 is normally detected in S40 (S50: Yes), the process proceeds to S60. Correction data generation processing is performed. On the other hand, when the second color reference pattern P2 is not normally detected (S50: No), the imaging process shown in FIG. 6 is terminated. If the second color reference pattern P2 is not detected, color correction of the image of the object imaged in S10 may not be performed, or color correction is performed using correction data generated in the past. Correction may be performed.

次に、S60の補正データ生成処理について説明する。
S60の処理は、例えば図9のような流れで行われ、まず、S40で検出された第2色参照パターンP2から第2色情報を抽出する処理が行われる(S61)。第2色情報の抽出は、上述した第1色情報の抽出と同様の方法で行われ、第2色参照パターンP2を構成する各セル色毎にRGB成分をそれぞれ抽出する。例えば、白色セル61(図5参照)のR成分輝度値、G成分輝度値、B成分輝度値をそれぞれ求め、同様に、シアン色セル62についても、R成分輝度値、G成分輝度値、B成分輝度をそれぞれ求める。また、他の赤色セル63、緑色セル64、白色セル65、マゼンタ色セル66、青色セル67、黄色セル68、黒色セル69の各領域についてもR成分輝度値、G成分輝度値、B成分輝度値をそれぞれ求める。図12(b)は、このようにして求められた各色のセルのR成分輝度値、G成分輝度値、B成分輝度値を例示しており、このようなデータが「第2色情報」に相当している。
Next, the correction data generation process of S60 will be described.
The process of S60 is performed according to the flow as shown in FIG. 9, for example. First, the process of extracting the second color information from the second color reference pattern P2 detected in S40 is performed (S61). The extraction of the second color information is performed by the same method as the extraction of the first color information described above, and RGB components are extracted for each cell color constituting the second color reference pattern P2. For example, the R component luminance value, the G component luminance value, and the B component luminance value of the white cell 61 (see FIG. 5) are respectively obtained. Similarly, for the cyan cell 62, the R component luminance value, the G component luminance value, B Each component luminance is obtained. The other red cell 63, green cell 64, white cell 65, magenta cell 66, blue cell 67, yellow cell 68, and black cell 69 also have R component luminance values, G component luminance values, and B component luminances. Find each value. FIG. 12B illustrates the R component luminance value, the G component luminance value, and the B component luminance value of each color cell thus obtained. Such data is represented as “second color information”. It corresponds.

S61の抽出処理の後には、S20(図6)の読取処理で得られた「第1色情報」を記憶手段から読み出し(S62)、この「第1色情報」と上記「第2色情報」の差分データを生成する(S63)。差分データの生成方法は様々に考えられ、図13では、その一例として、第1色参照パターンP1の各セル色毎のRGB成分から第2色参照パターンP2の各セル色毎のRGB成分を差し引いた値をそれぞれ求めている。例えば、図12(a)のように、第1色情報では、白色セルのR成分輝度値が156であり、図12(b)のように第2色情報では、白色セルのR成分輝度値が214であるため、図13では、白色セルのR成分の差分データを−58としている。同様に、第1色情報では、白色セルのG成分輝度値が154であり、第2色情報では、白色セルのG成分輝度値が180であるため、白色セルのG成分の差分データを−26としている。また、第1色情報では、白色セルのB成分輝度値が148であり、第2色情報では、白色セルのB成分輝度値が90であるため、白色セルのB成分の差分データを58とする。また、他の色でも同様であり、第1色情報では、シアン色セルのR成分輝度値が74であり、第2色情報では、シアン色セルのR成分輝度値が90であるため、シアン色セルのG成分の差分データを−16としている。   After the extraction process of S61, the “first color information” obtained by the reading process of S20 (FIG. 6) is read from the storage means (S62), and the “first color information” and the “second color information” are read out. Is generated (S63). There are various methods of generating difference data. In FIG. 13, as an example, the RGB component for each cell color of the second color reference pattern P2 is subtracted from the RGB component for each cell color of the first color reference pattern P1. Each value is obtained. For example, as shown in FIG. 12A, in the first color information, the R component luminance value of the white cell is 156, and in the second color information as shown in FIG. 12B, the R component luminance value of the white cell. Therefore, the difference data of the R component of the white cell is set to −58 in FIG. Similarly, in the first color information, the G component luminance value of the white cell is 154, and in the second color information, the G component luminance value of the white cell is 180. 26. In the first color information, the B component luminance value of the white cell is 148, and in the second color information, the B component luminance value of the white cell is 90. To do. The same applies to the other colors. In the first color information, the R component luminance value of the cyan cell is 74, and in the second color information, the R component luminance value of the cyan cell is 90. The difference data of the G component of the color cell is set to -16.

このように、第1色情報の各色の各成分値から、第2色情報の対応する色の対応する成分値を順次差し引いて、各色の各成分値について差分データを生成し、最終的に図13のような差分データを取得する。   In this way, the corresponding component values of the corresponding colors of the second color information are sequentially subtracted from the component values of the respective colors of the first color information, and difference data is generated for each component value of each color. Difference data such as 13 is acquired.

S63の処理の後には、図9に示すよう補正データを算出する処理が行われる(S64)。本実施形態では、補正データとして、撮像画像のR成分輝度値に加算すべき値(R成分加算値)、G成分輝度値に加算すべき値(G成分加算値)、B成分輝度値に加算すべき値(B成分加算値)をそれぞれ算出している。これら各成分加算値の算出方法は様々に考えられるが、ここでは、S63で取得された差分データにおいて、各成分毎に平均値を求め、それら各成分毎の平均値を各成分加算値としている。例えば、図13の例では、全色のR成分差分データが「−58,−16,−25,−49,−17,−17,−9,−24」であるため、これらの平均値「−27」(ここでは端数を四捨五入)をR成分加算値とする。同様に、全色のG成分差分データの平均値(−12)をG成分加算値として算出し、全色のB成分差分データの平均値(24)をB成分加算値として算出する。このように補正データ(各成分毎の加算値)を算出した後には、これら補正データを記憶手段に記憶しておく(S65)。   After the process of S63, a process of calculating correction data is performed as shown in FIG. 9 (S64). In this embodiment, as correction data, a value to be added to the R component luminance value of the captured image (R component addition value), a value to be added to the G component luminance value (G component addition value), and an addition to the B component luminance value Each value (B component addition value) to be calculated is calculated. There are various methods for calculating each component addition value. Here, in the difference data acquired in S63, an average value is obtained for each component, and the average value for each component is used as each component addition value. . For example, in the example of FIG. 13, the R component difference data for all colors is “−58, −16, −25, −49, −17, −17, −9, −24”. −27 ”(here, rounded off) is the R component addition value. Similarly, an average value (−12) of G component difference data for all colors is calculated as a G component addition value, and an average value (24) of B component difference data for all colors is calculated as a B component addition value. After calculating the correction data (added value for each component) in this way, the correction data is stored in the storage means (S65).

図6に示すように、S60の処理が終わると報知処理が行われる(S70)。この報知処理は、補正データが生成された場合にその旨を何らかの方法で報知する処理であり、例えば、情報処理装置20に設けられた図示しないディスプレイに「補正データ生成完了」といった情報を表示してもよく、予め決められた音声などによって補正データが作成された旨を報知しても良い。   As shown in FIG. 6, when the process of S60 ends, a notification process is performed (S70). This notification process is a process for notifying the fact that correction data has been generated by some method. For example, information such as “correction data generation completion” is displayed on a display (not shown) provided in the information processing apparatus 20. Alternatively, the fact that the correction data has been created may be notified by a predetermined voice or the like.

S70の後には、補正画像を生成する処理が行われる(S80)。S80の処理では、S10で生成された画像データに対してS60で得られた補正データに基づく色補正処理を行う。具体的には、S10で得られた画像データの各画素のR成分輝度値、G成分輝度値、B成分輝度値に対して、上記R成分加算値、G成分加算値、B成分加算値を加算する。例えば、画像データにおいて、ある画素のR成分輝度値、G成分輝度値、B成分輝度値がそれぞれ100、120、130であった場合には、上記のR成分加算値(−27)、G成分加算値(−12)、B成分加算値(24)を加算して、R成分輝度値、G成分輝度値、B成分輝度値をそれぞれ73、108、154に補正する。このような補正処理を全画素のR成分、G成分、B成分に対して行い、最終的に得られた画像を撮像対象の画像(補正画像)として、記憶或いは出力する。   After S70, a process for generating a corrected image is performed (S80). In the process of S80, color correction processing based on the correction data obtained in S60 is performed on the image data generated in S10. Specifically, the R component addition value, the G component addition value, and the B component addition value are set for the R component luminance value, the G component luminance value, and the B component luminance value of each pixel of the image data obtained in S10. to add. For example, in the image data, when the R component luminance value, G component luminance value, and B component luminance value of a certain pixel are 100, 120, and 130, respectively, the above R component addition value (−27), G component The addition value (−12) and the B component addition value (24) are added to correct the R component luminance value, the G component luminance value, and the B component luminance value to 73, 108, and 154, respectively. Such correction processing is performed on the R component, G component, and B component of all pixels, and the finally obtained image is stored or output as an image to be captured (corrected image).

本実施形態では、S40、S61の処理が、「第2抽出ステップ」の一例に相当する。また、S60及びS80が「色補正ステップ」の一例に相当する。また、情報処理装置20が、「第2抽出手段」「色補正手段」の一例に相当する。   In the present embodiment, the processes of S40 and S61 correspond to an example of a “second extraction step”. S60 and S80 correspond to an example of a “color correction step”. The information processing apparatus 20 corresponds to an example of “second extraction unit” and “color correction unit”.

(本実施形態の主な効果)
本実施形態では、撮像対象の撮像に先立って、事前に第1色参照パターンP1を撮像し、その撮像された第1色参照パターンP1から第1色情報を抽出している。そして、その抽出された第1色情報が記録され且つ第1色参照パターンP1と対応する第2色参照パターンP2が配置された二次元コードQ2を作成している。このようにすると、第1色参照パターンP1を撮像したときの環境(事前環境)において、当該第1色参照パターンP1の色がどのように表現されているかを定量的に特定し、これを、当該事前環境を反映した情報(第1色情報)として二次元コードQ2に記録しておくことができる。
(Main effects of this embodiment)
In the present embodiment, prior to imaging of the imaging target, the first color reference pattern P1 is captured in advance, and the first color information is extracted from the captured first color reference pattern P1. Then, a two-dimensional code Q2 in which the extracted first color information is recorded and the second color reference pattern P2 corresponding to the first color reference pattern P1 is arranged is created. If it does in this way, in the environment (prior environment) when the 1st color reference pattern P1 was imaged, it will specify quantitatively how the color of the 1st color reference pattern P1 is expressed, Information that reflects the prior environment (first color information) can be recorded in the two-dimensional code Q2.

また、二次元コードQ2には、第1色参照パターンP1に対応する第2色参照パターンP2が配置されている。従って、当該二次元コードQ2を撮像したときに、第1色参照パターンP1を撮像したときの環境を反映したデータ(第1色情報)のみならず、そのデータの生成元のパターン(第1色参照パターンP1)と対応するパターンの画像をも取得できるようになる。
更に、撮像対象を実際に撮像するときには、上記のように作成された二次元コードQ2を撮像対象と共に撮像し、二次元コードQ2に付された第2色参照パターンP2から第2色情報を抽出している。このようにすると、撮像対象を実際に撮像する際に、第2色参照パターンP2がどのように色表現されているかを定量的に示した情報(第2色情報)を取得することができる。この第2色情報は、撮像対象を実際に撮像する時の撮像環境を反映したデータであるため、この第2色情報と、事前環境を定量的に示す情報(第1色情報)とに基づいて、撮像対象の画像の色補正を行うようにすれば、撮像対象を実際に撮像するときの撮像環境と、第1色参照パターンP1を事前に撮像したときの事前環境と、をいずれも考慮して、適切な色補正を行うことができる。
In the two-dimensional code Q2, a second color reference pattern P2 corresponding to the first color reference pattern P1 is arranged. Accordingly, when the two-dimensional code Q2 is imaged, not only the data (first color information) reflecting the environment when the first color reference pattern P1 is imaged, but also the pattern (first color) from which the data is generated An image of a pattern corresponding to the reference pattern P1) can also be acquired.
Further, when the imaging target is actually imaged, the two-dimensional code Q2 created as described above is imaged together with the imaging target, and the second color information is extracted from the second color reference pattern P2 attached to the two-dimensional code Q2. is doing. In this way, it is possible to acquire information (second color information) that quantitatively indicates how the second color reference pattern P2 is color-expressed when the imaging target is actually imaged. Since the second color information is data reflecting the imaging environment when the imaging target is actually imaged, the second color information is based on the second color information and information (first color information) quantitatively indicating the prior environment. Thus, if color correction is performed on the image to be captured, both the imaging environment when the imaging target is actually captured and the preliminary environment when the first color reference pattern P1 is captured in advance are considered. Thus, appropriate color correction can be performed.

また、本実施形態では、第1色参照パターンP1が情報コードQ1内に配置されており、第1色参照パターンP1を撮像するステップ(第1撮像ステップ)では、光学的情報読取手段として機能する情報処理装置20により、当該情報コードQ1から第1色参照パターンP1を示す特定の色配列のセル群を検出している。
このようにすると、情報コードQ1の一部を第1色参照パターンP1として兼用することができる。また、光学的情報読取手段による各セルの認識処理を利用して、第1色参照パターンP1を迅速且つ正確に特定できるようになる。
また、第1色情報を抽出するステップ(第1抽出ステップ)では、上記セル群を構成する各セルの色データを検出し、各セルの色データを第1色情報として抽出している。このようにすると、第1色参照パターンP1を撮像したときの環境(事前環境)を、複数のセルの色データによって詳細に表すことができ、その抽出処理についても、各セル毎に迅速且つ正確に行うことができる。
In the present embodiment, the first color reference pattern P1 is arranged in the information code Q1, and functions as an optical information reading unit in the step of capturing the first color reference pattern P1 (first imaging step). The information processing apparatus 20 detects a cell group having a specific color arrangement indicating the first color reference pattern P1 from the information code Q1.
In this way, a part of the information code Q1 can also be used as the first color reference pattern P1. Further, the first color reference pattern P1 can be specified quickly and accurately by using the recognition processing of each cell by the optical information reading means.
In the step of extracting the first color information (first extraction step), the color data of each cell constituting the cell group is detected, and the color data of each cell is extracted as the first color information. In this way, the environment (pre-environment) when the first color reference pattern P1 is imaged can be expressed in detail by the color data of a plurality of cells, and the extraction process is also quick and accurate for each cell. Can be done.

また、本実施形態では、複数色のセルが所定の配列で構成されてなる第1色参照パターンP1と、第1色参照パターンP1と同一のセル配列からなる第2色参照パターンP2が用いられている。そして、第1抽出ステップでは、第1色参照パターンP1の画像に対して各セル色毎にRGB成分をそれぞれ抽出する処理を行い、第2抽出ステップでは、第2色参照パターンP2の画像に対して各セル色毎にRGB成分をそれぞれ抽出する処理を行っている。このようにすると、第1色参照パターンP1が撮像されたときの環境(事前環境)を、当該第1色参照パターンP1の各セル色毎に抽出されるRGB成分によって具体的且つ詳細に定量化することができる。また、撮像対象を撮像したときの環境(撮像環境)についても、第2色参照パターンP2の各セル色毎に抽出されるRGB成分によって具体的且つ詳細に定量化することができる。   In the present embodiment, a first color reference pattern P1 in which cells of a plurality of colors are configured in a predetermined arrangement and a second color reference pattern P2 having the same cell arrangement as the first color reference pattern P1 are used. ing. In the first extraction step, the RGB component is extracted for each cell color from the image of the first color reference pattern P1, and in the second extraction step, the image of the second color reference pattern P2 is extracted. Thus, processing for extracting RGB components for each cell color is performed. In this way, the environment (pre-environment) when the first color reference pattern P1 is imaged is quantified specifically and in detail by the RGB components extracted for each cell color of the first color reference pattern P1. can do. Also, the environment (imaging environment) when the imaging target is imaged can be quantified specifically and in detail by the RGB components extracted for each cell color of the second color reference pattern P2.

更に、第1色参照パターンP1と第2色参照パターンP2とが同一のセル配列で構成されているため、第1色参照パターンP1の各セル色毎のRGB成分、及び第2色参照パターンP2の各セル色毎のRGB成分をそれぞれ抽出すれば、事前環境から撮像環境に変化したことに伴って、R成分、G成分、B成分それぞれに、どの程度の変化が生じているのかが明確になる。そして、この変化を加味して撮像対象の画像のR成分、G成分、B成分をそれぞれ補正すれば、両環境がR成分に与える影響、両環境がG成分に与える影響、両環境がB成分に与える影響をそれぞれ具体的に考慮して、撮像対象の画像のR成分、G成分、B成分を適切に補正することができる。   Further, since the first color reference pattern P1 and the second color reference pattern P2 are configured in the same cell arrangement, the RGB components for each cell color of the first color reference pattern P1 and the second color reference pattern P2 If the RGB components for each cell color are respectively extracted, it is clear how much the R component, the G component, and the B component change due to the change from the previous environment to the imaging environment. Become. Then, if the R component, G component, and B component of the image to be imaged are corrected in consideration of this change, the influence of both environments on the R component, the influence of both environments on the G component, and both environments are the B component. The R component, the G component, and the B component of the image to be imaged can be appropriately corrected by specifically considering the influence on the image.

このように本発明によれば、RGBそれぞれの成分について、両環境が与える影響を正確に評価することができると共に、両環境が各成分に与える影響をそれぞれ考慮して各成分の補正を独立して行うことができ、ひいては全ての成分についてより適切な補正が可能となる。   As described above, according to the present invention, it is possible to accurately evaluate the influence of both environments for each component of RGB, and to independently correct each component in consideration of the influence of both environments on each component. Thus, more appropriate correction can be performed for all components.

[第2実施形態]
次に第2実施形態について説明する。図14は、第2実施形態に係る撮像システムで行われる撮像処理の様子を概念的に説明する説明図である。図15は、第2実施形態に係る撮像システムで行われる読取処理を例示するフローチャートである。図16は、いずれかの二次元コードの検出が失敗した例を概念的に説明する説明図である。
[Second Embodiment]
Next, a second embodiment will be described. FIG. 14 is an explanatory diagram for conceptually explaining the state of imaging processing performed in the imaging system according to the second embodiment. FIG. 15 is a flowchart illustrating a reading process performed by the imaging system according to the second embodiment. FIG. 16 is an explanatory diagram for conceptually explaining an example in which detection of any two-dimensional code has failed.

第2実施形態に係る撮像システムは、第1実施形態と同一のハードウェア構成であり、第1実施形態と同一の事前処理が行われるようになっている。従って、これらについては適宜図1〜図5を参照し、詳細な説明は省略する。   The imaging system according to the second embodiment has the same hardware configuration as that of the first embodiment, and the same pre-processing as that of the first embodiment is performed. Therefore, with reference to FIGS. 1 to 5 as appropriate, detailed description thereof will be omitted.

以下、第2実施形態に係る撮像システムで行われる撮像処理について説明する。
第2実施形態に係る撮像システムでも、図6と同様の流れで撮像処理が行われるため、図6を参照して当該処理を説明することとする。なお、本実施形態では、撮像処理で行われる各処理の具体的な内容が第1実施形態と若干異なっている。
Hereinafter, imaging processing performed in the imaging system according to the second embodiment will be described.
In the imaging system according to the second embodiment, the imaging process is performed in the same flow as in FIG. 6, and therefore the process will be described with reference to FIG. 6. In the present embodiment, the specific contents of each process performed in the imaging process are slightly different from those in the first embodiment.

まず、S10の処理について説明すると、本実施形態では事前処理において上述の二次元コードQ2(図5)を複数作成しており、S10では、図14のように、それら二次元コードQ2を複数分散させて対象物T(撮像対象)と共に撮像している。なお、この処理で得られた画像データは、情報処理装置20内の記憶手段(図示略)に記憶される。   First, the processing of S10 will be described. In the present embodiment, a plurality of the above-described two-dimensional codes Q2 (FIG. 5) are created in the pre-processing. Thus, the image is taken together with the object T (imaging object). Note that the image data obtained by this processing is stored in storage means (not shown) in the information processing apparatus 20.

S10の処理が終わると読取処理が行われる(S20)。本実施形態では、例えば図15のような流れで読取処理が行われ、まず、S10で生成された画像データを取得する処理が行われる(S221)。そして、その画像データによって構成される撮像画像においてコード領域を検出する処理が行われる(S222)。なお、コード領域を検出する方法は、第1実施形態と同様の公知方法が用いられ、本実施形態では図14のように複数の二次元コードQ2が撮像されているため、S222ではこれら複数の二次元コードQ2の各コード領域が検出されることとなる。   When the process of S10 is completed, a reading process is performed (S20). In the present embodiment, for example, the reading process is performed in the flow as shown in FIG. 15, and first, the process of acquiring the image data generated in S10 is performed (S221). And the process which detects a code area | region in the captured image comprised by the image data is performed (S222). As a method for detecting the code area, a known method similar to that of the first embodiment is used. In this embodiment, a plurality of two-dimensional codes Q2 are imaged as shown in FIG. Each code area of the two-dimensional code Q2 is detected.

S223〜S226では、検出された各コード領域についてのデコード、登録が行われる。まず、S223では、いずれかのコード領域に着目し、当該コード領域を構成する二次元コードQ2のコード種を特定する(S223)。そして、当該コード領域についてのデコード処理を行う(S224)。その後、S224において当該コード領域のデコードが成功したか否かを判断し(S225)、成功した場合には、当該コード領域の二次元コードQ2を登録する(S226)。S226の登録処理では、S224でデコードが成功した当該コード領域についての位置情報(撮像画像内における当該コード領域の位置データ)と、デコード結果(第2色情報)とを記憶する。   In S223 to S226, the detected code areas are decoded and registered. First, in S223, paying attention to one of the code areas, the code type of the two-dimensional code Q2 constituting the code area is specified (S223). Then, the decoding process for the code area is performed (S224). Thereafter, in S224, it is determined whether or not the decoding of the code area is successful (S225). If the decoding is successful, the two-dimensional code Q2 of the code area is registered (S226). In the registration processing in S226, the position information (position data of the code area in the captured image) about the code area successfully decoded in S224 and the decoding result (second color information) are stored.

その後、S222で検出された全てのコード領域についてデコードを試みたか否かを判断し(S227)、いずれかのコード領域が残っている場合にはS227にてYesに進み、残っているコード領域についてS223〜S226の処理を行う。一方、検出された全てのコード領域についてS223以降の処理が行われた場合には、S227にてNoに進み、当該読取処理を終了する。   Thereafter, it is determined whether or not decoding has been attempted for all the code areas detected in S222 (S227). If any code area remains, the process proceeds to Yes in S227, and the remaining code area is determined. The processing of S223 to S226 is performed. On the other hand, if the processing from S223 onward is performed for all the detected code areas, the process proceeds to No in S227, and the reading process is terminated.

図6に示すように、S20の読取処理が終了した後には、S30においていずれかのコード領域のデコードが成功したか否かを判断し、デコードが成功したコード領域が存在する場合にはS30にてYesに進み、S40の第2色参照パターン検出処理を行う。S40の第2色参照パターン検出処理では、デコードが成功した各コード領域それぞれに対して図8の処理を行い、各コード領域において第2色参照パターンP2を検出する。このようにして、デコードが成功した全てのコード領域において第2色参照パターンP2を検出する。   As shown in FIG. 6, after the reading process in S20 is completed, it is determined in S30 whether or not any code area has been successfully decoded. If there is a code area that has been successfully decoded, the process proceeds to S30. The process proceeds to Yes, and the second color reference pattern detection process of S40 is performed. In the second color reference pattern detection process of S40, the process shown in FIG. 8 is performed for each code area that has been successfully decoded, and the second color reference pattern P2 is detected in each code area. In this way, the second color reference pattern P2 is detected in all the code areas that have been successfully decoded.

S40の処理の後には、図6に示すように、いずれかの第2色参照パターンP2の検出が成功しているか否かを判断し(S50)、成功している場合にはS50にてYesに進んで補正データ生成処理を行う(S60)。   After the process of S40, as shown in FIG. 6, it is determined whether or not the detection of any of the second color reference patterns P2 is successful (S50), and if successful, Yes in S50. Then, the correction data generation process is performed (S60).

本実施形態では、S60の処理において、検出が成功した各第2色参照パターン全てについて、図13と同様の差分データを生成し、各第2色参照パターン毎に第1実施形態と同様の補正データを算出している。例えば、S40において、図14に示すような第2色参照パターンP2a、P2b、P2c、P2dが検出された場合には、これら各第2色参照パターンP2a、P2b、P2c、P2dに対して図9と同様の処理を行い、各第2色参照パターンP2a、P2b、P2c、P2dに対応する補正データをそれぞれ算出し、記憶する。   In the present embodiment, difference data similar to that in FIG. 13 is generated for all the second color reference patterns that have been successfully detected in the processing of S60, and correction similar to that in the first embodiment is performed for each second color reference pattern. Data is calculated. For example, when the second color reference patterns P2a, P2b, P2c, and P2d as shown in FIG. 14 are detected in S40, the second color reference patterns P2a, P2b, P2c, and P2d are detected as shown in FIG. The correction data corresponding to each of the second color reference patterns P2a, P2b, P2c, and P2d is calculated and stored.

例えば、第2色参照パターンP2aに対応する補正データを生成する方法について説明すると、まず第2色参照パターンP2aから第2色情報を抽出(S61と同様:図9)すると共に、第2色参照パターンP2aに記録された第1色情報を読み出し(S62と同様:図9)、これら第1色情報及び第2色情報に基づいて第2色参照パターンP2aに対応する差分データを算出する(S63と同様:図9)。そして、この差分データに基づいて第1実施形態と同様の方法で当該第2色参照パターンP2aに対応する補正データ(R成分加算値、G成分加算値、B成分加算値)を算出し(S64と同様:図9)、それを記憶する。   For example, a method for generating correction data corresponding to the second color reference pattern P2a will be described. First, the second color information is extracted from the second color reference pattern P2a (similar to S61: FIG. 9) and the second color reference is made. First color information recorded in the pattern P2a is read (similar to S62: FIG. 9), and difference data corresponding to the second color reference pattern P2a is calculated based on the first color information and the second color information (S63). Same as FIG. 9). Then, based on the difference data, correction data (R component addition value, G component addition value, B component addition value) corresponding to the second color reference pattern P2a is calculated by the same method as in the first embodiment (S64). Same as FIG. 9), and memorize it.

このような処理を、他の第2色参照パターンP2b、P2c、P2dについても行い、第2色参照パターンP2bに対応する補正データ(R成分加算値、G成分加算値、B成分加算値)、第2色参照パターンP2cに対応する補正データ(R成分加算値、G成分加算値、B成分加算値)、第2色参照パターンP2dに対応する補正データ(R成分加算値、G成分加算値、B成分加算値)を算出する。このような補正データが生成された場合には、第1実施形態と同様の報知処理を行い(S70)、その後、補正画像を生成する処理を行う(S80)。   Such processing is also performed for the other second color reference patterns P2b, P2c, and P2d, and correction data (R component addition value, G component addition value, B component addition value) corresponding to the second color reference pattern P2b, Correction data corresponding to the second color reference pattern P2c (R component addition value, G component addition value, B component addition value), correction data corresponding to the second color reference pattern P2d (R component addition value, G component addition value, B component addition value) is calculated. When such correction data is generated, a notification process similar to that of the first embodiment is performed (S70), and then a process of generating a corrected image is performed (S80).

本実施形態では、S80における補正画像の生成方法が第1実施形態と異なっており、本実施形態のS80の処理では、まず、S10で取得した撮像対象の画像において、各二次元コードQ2の位置を特定し、これら二次元コードQ2の位置に基づいて、当該画像を複数の領域に分割している。画像の分割方法は様々に考えられ、例えば、図14のように、対象物T(撮像対象)の画像の中心位置(例えば上下方向及び左右方向の中心となる位置)P1を求め、当該中心位置P1を通り、且つ互いに隣接する二次元コードの中間位置を通る境界線をそれぞれ設定する方法が挙げられる。図14の例では、左上の二次元コードQ2aと右上の二次元コードQ2bの中間位置を通り、且つ前記中心位置P1を通る境界線L1が設定され、同様に、右上の二次元コードQ2bと右下の二次元コードQ2dの中間位置を通り、且つ前記中心位置P1を通る境界線L2が設定され、右下の二次元コードQ2dと左下の二次元コードQ2cの中間位置を通り、且つ前記中心位置P1を通る境界線L3が設定され、左上の二次元コードQ2aと左下の二次元コードQ2cの中間位置を通り、且つ前記中心位置P1を通る境界線L4が設定されている。このような境界線L1〜L4を設定することにより、撮像画像ARを4つの領域AR1〜AR4に分割している。   In the present embodiment, the corrected image generation method in S80 is different from that in the first embodiment. In the processing in S80 of the present embodiment, first, the position of each two-dimensional code Q2 in the image to be imaged acquired in S10. And the image is divided into a plurality of regions based on the position of the two-dimensional code Q2. There are various image division methods. For example, as shown in FIG. 14, the center position (for example, the center in the vertical direction and the horizontal direction) P1 of the image of the target T (imaging target) is obtained, and the center position is determined. A method of setting each boundary line passing through P1 and passing through an intermediate position of two-dimensional codes adjacent to each other is mentioned. In the example of FIG. 14, a boundary line L1 passing through the middle position between the upper left two-dimensional code Q2a and the upper right two-dimensional code Q2b and passing through the center position P1 is set. Similarly, the upper right two-dimensional code Q2b and the right A boundary line L2 passing through the intermediate position of the lower two-dimensional code Q2d and passing through the central position P1 is set, passes through the intermediate position of the lower right two-dimensional code Q2d and the lower left two-dimensional code Q2c, and the central position A boundary line L3 passing through P1 is set, and a boundary line L4 passing through the middle position between the upper left two-dimensional code Q2a and the lower left two-dimensional code Q2c and passing through the center position P1 is set. By setting such boundary lines L1 to L4, the captured image AR is divided into four areas AR1 to AR4.

そして、このように画像を複数の領域に分割した後、各領域についての色補正を、各領域に近接する二次元コードQ2の第2色情報に基づいて行う。例えば、図14のように、分割された領域AR1〜AR4のそれぞれに二次元コードQ2が配置されている場合、各領域の色補正を、各領域内の二次元コードQ2によって得られた補正データに基づいて行う。例えば、領域AR1の画像の色補正は、領域AR1に含まれる二次元コードQ2aに対応する補正データ(即ち、第2色参照パターンP2aに対応する補正データ)に基づいて行われ、具体的には領域AR1の各画素のR成分輝度値、G成分輝度値、B成分輝度値に対して、第2色参照パターンP2aに対応する補正データのR成分加算値、G成分加算値、B成分加算値をそれぞれ加算する。   Then, after the image is divided into a plurality of regions in this way, color correction for each region is performed based on the second color information of the two-dimensional code Q2 that is close to each region. For example, as shown in FIG. 14, when the two-dimensional code Q2 is arranged in each of the divided areas AR1 to AR4, the color correction of each area is performed by correction data obtained by the two-dimensional code Q2 in each area. Based on. For example, the color correction of the image in the area AR1 is performed based on correction data corresponding to the two-dimensional code Q2a included in the area AR1 (that is, correction data corresponding to the second color reference pattern P2a). R component addition value, G component addition value, and B component addition value of correction data corresponding to the second color reference pattern P2a with respect to the R component luminance value, G component luminance value, and B component luminance value of each pixel in the area AR1 Are respectively added.

他の領域AR2〜AR4も同様であり、領域AR2については、当該領域AR2に含まれる二次元コードQ2bに対応する補正データにによって色補正(領域AR1と同様の色補正)を行い、領域AR3についても、当該領域AR3に含まれる二次元コードQ2dに対応する補正データによって色補正(領域AR1と同様の色補正)を行う。また、領域AR4についても、当該領域AR4に含まれる二次元コードQ2cに対応する補正データによって色補正(領域AR1と同様の色補正)を行う。   The same applies to the other areas AR2 to AR4. For the area AR2, color correction (color correction similar to the area AR1) is performed on the correction data corresponding to the two-dimensional code Q2b included in the area AR2, and the area AR3 is displayed. Also, color correction (color correction similar to the area AR1) is performed using correction data corresponding to the two-dimensional code Q2d included in the area AR3. For the area AR4, color correction (color correction similar to that for the area AR1) is performed using correction data corresponding to the two-dimensional code Q2c included in the area AR4.

なお、上記方法では、図16のように、本来4つあるべき二次元コードQ2のうちの3つしか検出されなかった場合(或いは3つしかデコードが成功しなかった場合)であっても、これら3つの二次元コードQ2に基づいて適切に色補正を行うことができる。この場合、デコードが成功した3つの二次元コードQ2e、Q2f、Q2gに基づいて撮像画像を複数の領域に分割することができ、例えば、図16のように、右上の二次元コードQ2eと右下の二次元コードQ2fの中間位置を通り、且つ前記中心位置P1を通る境界線L21を設定し、同様に、右下の二次元コードQ2fと左下の二次元コードQ2gの中間位置を通り、且つ前記中心位置P1を通る境界線L22を設定し、更に、左下の二次元コードQ2gと右上の二次元コードQ2eの中間位置を通り、且つ前記中心位置P1を通る境界線L23を設定する。このような境界線L21〜L23を設定することにより、撮像画像を3つの領域AR21〜AR23に分割することができる。この場合も、各領域の色補正を、各領域内の二次元コードQ2によって得られた補正データに基づいて行うことができる。   In the above method, as shown in FIG. 16, even when only three of the two-dimensional codes Q2 that should originally be four are detected (or when only three are successfully decoded), Color correction can be appropriately performed based on these three two-dimensional codes Q2. In this case, the captured image can be divided into a plurality of regions based on the three successfully decoded two-dimensional codes Q2e, Q2f, and Q2g. For example, as shown in FIG. 16, the upper-right two-dimensional code Q2e and the lower-right code A boundary line L21 passing through the intermediate position of the two-dimensional code Q2f and passing through the center position P1, and similarly passing through the intermediate position of the two-dimensional code Q2f on the lower right and the two-dimensional code Q2g on the lower left, A boundary line L22 passing through the center position P1 is set, and further, a boundary line L23 passing through an intermediate position between the lower left two-dimensional code Q2g and the upper right two-dimensional code Q2e and passing through the center position P1 is set. By setting such boundary lines L21 to L23, the captured image can be divided into three areas AR21 to AR23. Also in this case, the color correction of each area can be performed based on the correction data obtained by the two-dimensional code Q2 in each area.

[他の実施形態]
本発明は上記記述及び図面によって説明した実施形態に限定されるものではなく、例えば次のような実施形態も本発明の技術的範囲に含まれる。
[Other Embodiments]
The present invention is not limited to the embodiments described with reference to the above description and drawings. For example, the following embodiments are also included in the technical scope of the present invention.

上記実施形態では、第1色参照パターンP1を撮像する撮像手段(第1撮像手段)と、第2色参照パターンP2を撮像する撮像手段(第2撮像手段)が同一である例を示したが、これらが異なる撮像手段によって撮像されてもよい。   In the above embodiment, an example in which the imaging unit (first imaging unit) that images the first color reference pattern P1 and the imaging unit (second imaging unit) that images the second color reference pattern P2 is the same is shown. These may be imaged by different imaging means.

上記実施形態では、画像を撮像する手段として撮像装置10が用いられ、色補正等の各種画像処理を行う手段として、撮像装置10とは別体の情報処理装置20が用いられた撮像システム1を例示したが、撮像システムの構成は、このような構成に限られるものではなく、例えば、単一のケース内に撮像手段と情報処理手段とが設けられるような構成であってもよい。   In the embodiment described above, the imaging apparatus 10 is used as a means for capturing an image, and the imaging system 1 using an information processing apparatus 20 separate from the imaging apparatus 10 as a means for performing various image processing such as color correction. Although illustrated, the configuration of the imaging system is not limited to such a configuration. For example, the imaging system and the information processing unit may be provided in a single case.

上記実施形態では、S1の処理の例として、第1色参照パターンP1が付されたQRコードQ1を撮像する例を説明したが、第1色参照パターンが付されたものであれば他の種類の情報コード(例えば、データマトリックスコード、マキシコード等)であってもよい。   In the above embodiment, as an example of the processing of S1, an example in which the QR code Q1 with the first color reference pattern P1 is captured has been described. However, other types may be used as long as the first color reference pattern is attached. Information code (for example, data matrix code, maxi code, etc.).

上記実施形態では、S1において第1色参照パターンP1が付された情報コードQ1を撮像する例を示したが、第1色参照パターンP1の画像が取得できればこの例に限定されるものではなく、例えば、第1色参照パターンP1のみを撮像してもよい。   In the above-described embodiment, an example in which the information code Q1 to which the first color reference pattern P1 is attached in S1 is shown. However, the present invention is not limited to this example as long as an image of the first color reference pattern P1 can be acquired. For example, only the first color reference pattern P1 may be imaged.

上記実施形態では、情報コードQ1の特定部分に第1色参照パターンP1が配置される点が予め規定されていたが、第1色参照パターンP1が配置される位置を予め規定せずにセル配列のみを規定しておいてもよい。この場合、S2において、規定されたセル配列を検出する処理を行うようにすればよい。   In the above embodiment, the point where the first color reference pattern P1 is arranged in the specific part of the information code Q1 is defined in advance. However, the cell arrangement is not performed without predefining the position where the first color reference pattern P1 is arranged. You may prescribe only. In this case, a process for detecting a prescribed cell array may be performed in S2.

上記実施形態では、第2色参照パターンとして、第1色参照パターンと同一の色配列で構成されるパターンを例示したが、「第1色参照パターンと対応する第2色参照パターン」は、このような同一構成に限られるものではない。例えば、第1色参照パターンとはセル配列は異なるが、第1色参照パターンに含まれる種類を全て含んだセル群を、第2色参照パターンとして構成してもよい。   In the above embodiment, as the second color reference pattern, a pattern having the same color arrangement as the first color reference pattern is exemplified, but the “second color reference pattern corresponding to the first color reference pattern” It is not restricted to the same structure. For example, although the cell arrangement is different from that of the first color reference pattern, a cell group including all types included in the first color reference pattern may be configured as the second color reference pattern.

第1実施形態では、S60(図6)で補正データが生成された場合に、撮像対象の画像に対して色補正処理を行っていたが、S60とS70の間に、第1色情報と第2色情報とを比較し、第1色情報と第2色情報とに所定の差異があるか否かを判断する判断ステップを設け、この判断ステップにおいて所定の差異があると判断された場合にS70の報知処理(報知ステップ)を行うようにしてもよい。「所定の差異」は様々に考えられるが、例えば、補正データとして得られたR成分加算値、G成分加算値、B成分加算値のいずれかの絶対値が所定閾値(例えば10)を超える場合に「所定の差異」があると判断するようにしてもよい。或いは、第1色情報と第2色情報に基づいて各色ごと且つ各成分ごとに得られる差分値のいずれかの絶対値が所定閾値(例えば10)を超える場合に、「所定の差異」があると判断するようにしてもよい。
そして、上記判断ステップにて「所定の差異」があると判断された場合に、S80の色補正処理(色補正ステップ)を行うようにすることができる。このようにすると、第1色参照パターンP1を撮像した時の環境(事前環境)と、撮像対象を実際に撮像したときの環境(撮像環境)とに差異があるか否かを、色情報を基準として適切に判断することができ、差異がある場合にはその旨をユーザに知らしめることができる。また、撮像対象を撮像したときの環境(撮像環境)が、第1色参照パターンP1を撮像したときの環境(事前環境)に類似する場合には、色補正を省略して処理の迅速化を図ることができ、撮像環境が事前環境に対してある程度変化している場合には、色補正を行って、環境の差異に起因する画像の変化を補正することができる。
In the first embodiment, when the correction data is generated in S60 (FIG. 6), the color correction processing is performed on the image to be imaged. However, the first color information and the first color information between S60 and S70 are used. A determination step is provided for comparing the two color information and determining whether or not there is a predetermined difference between the first color information and the second color information, and when it is determined in this determination step that there is a predetermined difference You may make it perform the alerting | reporting process (notification step) of S70. There are various “predetermined differences”. For example, when the absolute value of any of the R component addition value, the G component addition value, and the B component addition value obtained as correction data exceeds a predetermined threshold (for example, 10) It may be determined that there is a “predetermined difference”. Alternatively, there is a “predetermined difference” when the absolute value of any of the difference values obtained for each color and for each component based on the first color information and the second color information exceeds a predetermined threshold (for example, 10). You may make it judge.
When it is determined that there is a “predetermined difference” in the determination step, the color correction process (color correction step) in S80 can be performed. In this way, whether or not there is a difference between the environment when the first color reference pattern P1 is imaged (preliminary environment) and the environment when the imaging target is actually imaged (imaging environment) is determined by the color information. It can be determined appropriately as a reference, and if there is a difference, the user can be informed accordingly. Further, when the environment (imaging environment) when the imaging target is imaged is similar to the environment (preliminary environment) when the first color reference pattern P1 is imaged, the color correction is omitted to speed up the processing. If the imaging environment has changed to some extent with respect to the previous environment, color correction can be performed to correct image changes due to environmental differences.

第2実施形態では、画像を分割する一例を示したが、分割方法はこれに限定されない。例えば、二次元コードの位置に関係なく、撮像画像を予め規定された複数領域に分割するようにしてもよい。この場合、各領域の色補正を、各領域に含まれる二次元コード(含まれていない場合には最も近い二次元コード)に基づいて行えばよい。   In the second embodiment, an example of dividing an image has been shown, but the dividing method is not limited to this. For example, the captured image may be divided into a plurality of predetermined regions regardless of the position of the two-dimensional code. In this case, the color correction of each area may be performed based on the two-dimensional code included in each area (or the closest two-dimensional code if not included).

1…撮像システム
10…撮像装置(撮像手段、第1撮像手段、第2撮像手段)
20…情報処理装置(第1抽出手段、第2抽出手段、読取手段、コード作成手段、色補正手段、光学的情報読取手段)
30…印刷装置(コード作成手段)
Q1…情報コード
Q2…二次元コード
P1…第1色参照パターン
P2…第2色参照パターン
DESCRIPTION OF SYMBOLS 1 ... Imaging system 10 ... Imaging device (Imaging means, 1st imaging means, 2nd imaging means)
20. Information processing apparatus (first extraction means, second extraction means, reading means, code creating means, color correcting means, optical information reading means)
30 ... Printing device (code creation means)
Q1 ... Information code Q2 ... Two-dimensional code P1 ... First color reference pattern P2 ... Second color reference pattern

Claims (6)

撮像手段によって撮像される撮像対象の画像の色補正を行う色補正方法であって、
第1撮像手段により、第1色参照パターンを撮像する第1撮像ステップと、
第1抽出手段により、前記第1撮像ステップにて撮像された前記第1色参照パターンから第1色情報を抽出する第1抽出ステップと、
前記第1色参照パターンと対応する第2色参照パターンが配置され且つ前記第1抽出ステップにて抽出された前記第1色情報が記録された二次元コードを、コード作成手段によって作成するコード作成ステップと、
前記第1撮像手段と同一、又は前記第1撮像手段とは異なる前記撮像手段により、前記コード作成ステップにて作成された前記二次元コードと共に前記撮像対象を撮像する第2撮像ステップと、
第2抽出手段により、前記第2撮像ステップにて撮像された前記二次元コードの画像において前記第2色参照パターンを特定し且つ当該第2色参照パターンから前記第2色情報を抽出する第2抽出ステップと、
読取手段により、前記第2撮像ステップにて撮像された前記二次元コードの画像から前記第1色情報を読み取る読取ステップと、
前記読取ステップにて読み取られた前記第1色情報と、前記第2抽出ステップにて抽出された前記第2色情報とに基づき、前記第2撮像ステップにて撮像された前記撮像対象の画像に対し、色補正手段により色補正を行う色補正ステップと、
を有することを特徴とする色補正方法。
A color correction method for performing color correction of an image to be imaged captured by an imaging means,
A first imaging step of imaging a first color reference pattern by a first imaging means;
A first extraction step of extracting first color information from the first color reference pattern imaged in the first imaging step by a first extraction unit;
Code creation for creating a two-dimensional code in which a second color reference pattern corresponding to the first color reference pattern is arranged and in which the first color information extracted in the first extraction step is recorded is created by a code creation means Steps,
A second imaging step of imaging the imaging object together with the two-dimensional code created in the code creation step by the imaging means that is the same as or different from the first imaging means;
A second extraction unit that specifies the second color reference pattern in the image of the two-dimensional code imaged in the second imaging step and extracts the second color information from the second color reference pattern; An extraction step;
A reading step of reading the first color information from the image of the two-dimensional code imaged in the second imaging step by a reading unit;
Based on the first color information read in the reading step and the second color information extracted in the second extraction step, an image of the imaging target imaged in the second imaging step is added. On the other hand, a color correction step for performing color correction by the color correction means,
A color correction method comprising:
前記第1色参照パターンは、情報コード内に配置されており、
前記第1撮像ステップでは、前記撮像手段と同一の又は前記撮像手段とは異なる光学的情報読取手段により、前記情報コードの撮像が行われ
前記第1抽出ステップでは、前記光学的情報読取手段により、前記情報コードから前記第1色参照パターンを示す特定の色配列のセル群を検出する処理、及び当該セル群を構成する各セルの色データを検出する処理が行われ、前記各セルの前記色データが前記第1色情報として抽出されることを特徴とする請求項1に記載の色補正方法。
The first color reference pattern is arranged in an information code;
In the first imaging step, imaging of the information code is performed by an optical information reading unit that is the same as or different from the imaging unit, and in the first extraction step, by the optical information reading unit, A process of detecting a cell group of a specific color array indicating the first color reference pattern from the information code, and a process of detecting color data of each cell constituting the cell group are performed, and the color of each cell The color correction method according to claim 1, wherein data is extracted as the first color information.
前記読取ステップ及び前記第2抽出ステップの後に、前記読取ステップにて読み取られた前記第1色情報と前記第2抽出ステップにて抽出された前記第2色情報とを比較し、前記第1色情報と前記第2色情報とに所定の差異があるか否かを判断する判断ステップと、
前記判断ステップによって前記所定の差異があると判断された場合に報知を行う報知ステップと、
を含み、
前記判断ステップにて前記所定の差異があると判断された場合に、前記撮像対象の画像に対して前記色補正ステップが行われることを特徴とする請求項1又は請求項2に記載の色補正方法。
After the reading step and the second extracting step, the first color information read in the reading step is compared with the second color information extracted in the second extracting step, and the first color A determination step of determining whether there is a predetermined difference between the information and the second color information;
An informing step for informing when it is determined by the determining step that the predetermined difference exists;
Including
The color correction according to claim 1, wherein the color correction step is performed on the image to be imaged when it is determined that the predetermined difference is present in the determination step. Method.
前記第2撮像ステップでは、前記コード作成ステップにて作成された前記二次元コードを撮像エリア内に複数分散させた状態でそれら複数の前記二次元コードを前記撮像対象と共に撮像し、
前記色補正ステップは、前記第2撮像ステップで撮像された前記撮像対象の画像を複数の領域に分割すると共に、各領域についての色補正を、各領域に近接する前記二次元コードの前記第2色情報に基づいて行うことを特徴とする請求項1から請求項3のいずれか一項に記載の色補正方法。
In the second imaging step, a plurality of the two-dimensional codes created in the code creation step are imaged together with the imaging target in a state where a plurality of the two-dimensional codes are dispersed in an imaging area,
In the color correction step, the image to be imaged captured in the second imaging step is divided into a plurality of regions, and color correction for each region is performed using the second of the two-dimensional code adjacent to each region. The color correction method according to claim 1, wherein the color correction method is performed based on color information.
前記第1色参照パターンは、複数色のセルが所定の配列で構成されたものであり、
前記第2色参照パターンは、前記第1色参照パターンと同一のセル配列からなり、
前記第1抽出ステップでは、前記第1色参照パターンの画像について各セル色毎にRGB成分をそれぞれ抽出する処理を行い、
前記第2抽出ステップでは、前記第2色参照パターンの画像について各セル色毎にRGB成分をそれぞれ抽出する処理を行い、
前記色補正ステップでは、前記第1色参照パターンの各セル色毎のRGB成分と、前記第2色参照パターンの各セル色毎のRGB成分とに基づき、前記撮像対象の画像のR成分、G成分、B成分をそれぞれ補正することを特徴とする請求項1から請求項4のいずれか一項に記載の色補正方法。
The first color reference pattern includes a plurality of color cells arranged in a predetermined arrangement,
The second color reference pattern is composed of the same cell array as the first color reference pattern,
In the first extraction step, an RGB component is extracted for each cell color for the image of the first color reference pattern,
In the second extraction step, a process of extracting RGB components for each cell color is performed on the image of the second color reference pattern,
In the color correction step, based on the RGB component for each cell color of the first color reference pattern and the RGB component for each cell color of the second color reference pattern, the R component of the image to be captured, G The color correction method according to claim 1, wherein each of the component and the B component is corrected.
光学的情報読取手段と、コード作成手段と、撮像装置とを備えた撮像システムであって、
前記光学的情報読取手段は、
第1色参照パターンが配置された情報コードを撮像する第1撮像手段と、
前記第1撮像手段によって撮像された前記情報コードにおいて前記第1色参照パターンを検出し、且つ当該第1参照パターンから第1色情報を抽出する第1抽出手段と、
を備え、、
前記コード作成手段は、前記第1色参照パターンと対応する第2色参照パターンが配置され且つ前記第1抽出手段によって抽出された前記第1色情報がデータ領域に記録された二次元コードを作成する構成をなしており、
前記撮像装置は、
撮像対象を、前記コード作成手段によって作成された前記二次元コードと共に撮像可能な撮像手段と、
前記撮像手段によって前記撮像対象と共に撮像された前記二次元コードの画像において、前記第2色参照パターンを特定し、且つ当該第2色参照パターンから前記第2色情報を抽出する第2抽出手段と、
前記撮像手段によって前記撮像対象と共に撮像された前記二次元コードの画像から、前記第1色情報を読み取る読取手段と、
前記読取手段によって読み取られた前記第1色情報と、前記第2抽出手段によって抽出された前記第2色情報とに基づき、前記撮像手段によって撮像された前記撮像対象の画像に対して色補正を行う色補正手段と、
を有することを特徴とする撮像システム。
An imaging system comprising an optical information reading means, a code creating means, and an imaging device,
The optical information reading means includes
First imaging means for imaging an information code on which a first color reference pattern is arranged;
First extraction means for detecting the first color reference pattern in the information code imaged by the first imaging means and extracting the first color information from the first reference pattern;
With
The code creation means creates a two-dimensional code in which a second color reference pattern corresponding to the first color reference pattern is arranged and the first color information extracted by the first extraction means is recorded in a data area Is configured to
The imaging device
Imaging means capable of imaging an imaging target together with the two-dimensional code created by the code creating means;
Second extraction means for specifying the second color reference pattern and extracting the second color information from the second color reference pattern in the image of the two-dimensional code imaged together with the imaging target by the imaging means; ,
Reading means for reading the first color information from the image of the two-dimensional code imaged together with the imaging object by the imaging means;
Based on the first color information read by the reading unit and the second color information extracted by the second extraction unit, color correction is performed on the image to be imaged captured by the imaging unit. Color correction means to perform;
An imaging system comprising:
JP2009073449A 2009-03-25 2009-03-25 Color correction method and imaging system Expired - Fee Related JP5182182B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009073449A JP5182182B2 (en) 2009-03-25 2009-03-25 Color correction method and imaging system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009073449A JP5182182B2 (en) 2009-03-25 2009-03-25 Color correction method and imaging system

Publications (2)

Publication Number Publication Date
JP2010226580A true JP2010226580A (en) 2010-10-07
JP5182182B2 JP5182182B2 (en) 2013-04-10

Family

ID=43043259

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009073449A Expired - Fee Related JP5182182B2 (en) 2009-03-25 2009-03-25 Color correction method and imaging system

Country Status (1)

Country Link
JP (1) JP5182182B2 (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013145295A1 (en) 2012-03-30 2013-10-03 富士通株式会社 Color chart detection device, color chart detection method and color chart detection computer program
WO2016163266A1 (en) * 2015-04-06 2016-10-13 コニカミノルタ株式会社 Color measuring device and color measuring method
JP2017076893A (en) * 2015-10-15 2017-04-20 凸版印刷株式会社 Color calibration sheet and color calibration method using hologram
JP2017123675A (en) * 2017-02-21 2017-07-13 パイオニア株式会社 Imaging apparatus and image processing method
WO2019145390A1 (en) * 2018-01-26 2019-08-01 Universitat De Barcelona Colour correction
JP2020003878A (en) * 2018-06-25 2020-01-09 株式会社日立製作所 Marker and image processing device
WO2022224969A1 (en) * 2021-04-20 2022-10-27 日本発條株式会社 Composite two-dimensional code, printed material, information processing system, and program

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005223527A (en) * 2004-02-04 2005-08-18 Noritsu Koki Co Ltd Photoprinting apparatus
JP2006164048A (en) * 2004-12-09 2006-06-22 Nikon Corp Electronic device, function control method thereof, providing method of function control information therefor and control method of communication terminal
JP2006170872A (en) * 2004-12-17 2006-06-29 Seiko Epson Corp Guiding information system and portable device
JP2006277315A (en) * 2005-03-29 2006-10-12 Nec Corp Pattern recognition device, pattern recognition method, and electronic equipment provided with the pattern recognition device
JP2006338251A (en) * 2005-06-01 2006-12-14 Kddi Corp Color image superposition barcode, and method and device for generating color image superposition barcode
JP2007116544A (en) * 2005-10-21 2007-05-10 Canon Inc Imaging apparatus and control method therefor, control program therefor, and recording medium storing control program
JP2007164631A (en) * 2005-12-15 2007-06-28 Canon Inc Indicator identification method and indicator identification device
JP2007272320A (en) * 2006-03-30 2007-10-18 Mitsubishi Electric Corp Entry management system
JP2008022410A (en) * 2006-07-14 2008-01-31 Dainippon Printing Co Ltd Apparatus and system for preparing profile
JP2009003770A (en) * 2007-06-22 2009-01-08 Nikon Corp Color two-dimensional code reader, its method of reading, and electronic camera

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005223527A (en) * 2004-02-04 2005-08-18 Noritsu Koki Co Ltd Photoprinting apparatus
JP2006164048A (en) * 2004-12-09 2006-06-22 Nikon Corp Electronic device, function control method thereof, providing method of function control information therefor and control method of communication terminal
JP2006170872A (en) * 2004-12-17 2006-06-29 Seiko Epson Corp Guiding information system and portable device
JP2006277315A (en) * 2005-03-29 2006-10-12 Nec Corp Pattern recognition device, pattern recognition method, and electronic equipment provided with the pattern recognition device
JP2006338251A (en) * 2005-06-01 2006-12-14 Kddi Corp Color image superposition barcode, and method and device for generating color image superposition barcode
JP2007116544A (en) * 2005-10-21 2007-05-10 Canon Inc Imaging apparatus and control method therefor, control program therefor, and recording medium storing control program
JP2007164631A (en) * 2005-12-15 2007-06-28 Canon Inc Indicator identification method and indicator identification device
JP2007272320A (en) * 2006-03-30 2007-10-18 Mitsubishi Electric Corp Entry management system
JP2008022410A (en) * 2006-07-14 2008-01-31 Dainippon Printing Co Ltd Apparatus and system for preparing profile
JP2009003770A (en) * 2007-06-22 2009-01-08 Nikon Corp Color two-dimensional code reader, its method of reading, and electronic camera

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9721532B2 (en) 2012-03-30 2017-08-01 Fujitsu Limited Color chart detection apparatus, color chart detection method, and color chart detection computer program
WO2013145295A1 (en) 2012-03-30 2013-10-03 富士通株式会社 Color chart detection device, color chart detection method and color chart detection computer program
US10502627B2 (en) 2015-04-06 2019-12-10 Konica Minolta, Inc. Color measuring device and color measuring method
WO2016163266A1 (en) * 2015-04-06 2016-10-13 コニカミノルタ株式会社 Color measuring device and color measuring method
JPWO2016163266A1 (en) * 2015-04-06 2018-02-08 コニカミノルタ株式会社 Color measuring device and color measuring method
JP2017076893A (en) * 2015-10-15 2017-04-20 凸版印刷株式会社 Color calibration sheet and color calibration method using hologram
JP2017123675A (en) * 2017-02-21 2017-07-13 パイオニア株式会社 Imaging apparatus and image processing method
WO2019145390A1 (en) * 2018-01-26 2019-08-01 Universitat De Barcelona Colour correction
CN111869193A (en) * 2018-01-26 2020-10-30 巴塞罗纳大学 Color correction
JP2021511610A (en) * 2018-01-26 2021-05-06 ウニベルシタ デ バルセローナ Color correction
US11308300B2 (en) 2018-01-26 2022-04-19 Universitat De Barcelona Colour correction
JP7267629B2 (en) 2018-01-26 2023-05-02 ウニベルシタ デ バルセローナ color correction
JP2020003878A (en) * 2018-06-25 2020-01-09 株式会社日立製作所 Marker and image processing device
WO2022224969A1 (en) * 2021-04-20 2022-10-27 日本発條株式会社 Composite two-dimensional code, printed material, information processing system, and program

Also Published As

Publication number Publication date
JP5182182B2 (en) 2013-04-10

Similar Documents

Publication Publication Date Title
JP5182182B2 (en) Color correction method and imaging system
KR100916867B1 (en) Image processing apparatus and image processing method
JP4591211B2 (en) Image processing apparatus, image processing method, medium, code reading apparatus, and program
CN101308574B (en) Image processing method, image zone detection method, image processing apparatus and image zone detection apparatus
JP4574503B2 (en) Image processing apparatus, image processing method, and program
JP4863346B2 (en) Color image superimposed barcode generation method and apparatus
JP2004234318A (en) Two-dimension information code, and display method, generation method and reading method thereof
JP2007213359A (en) Two-dimensional code detection system and two-dimensional code detection program
CN102484724A (en) Projection image area detecting device
TWI501159B (en) QR code
JP2007074578A (en) Image processor, photography instrument, and program
US10992837B2 (en) Information processing apparatus, control method thereof, and storage medium
US20060215232A1 (en) Method and apparatus for processing selected images on image reproduction machines
US10424039B2 (en) Digital watermarks
US8351737B2 (en) Image processing apparatus
US10936837B1 (en) 2D barcode overlays
JP4140519B2 (en) Image processing apparatus, program, and recording medium
JP2009289066A (en) Position specification method and color specification method and id creation method
JP5720623B2 (en) Two-dimensional code reader
JP4222013B2 (en) Image correction apparatus, character recognition method, and image correction program
JP2017072958A (en) Image processing device, method and program for decoding information multiplexed on image
JP2003203198A (en) Imaging device, imaging method, computer readable storage medium and computer program
JP2005250865A (en) Color code, reader for color code and document presentation apparatus
JP2011155365A (en) Image processing apparatus and image processing method
JP6677209B2 (en) Image processing apparatus, processing method, and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20110214

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20121231

R150 Certificate of patent or registration of utility model

Ref document number: 5182182

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20160125

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20160125

Year of fee payment: 3

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees