JP2017017564A - Color correction program, color correction method, and color correction apparatus - Google Patents

Color correction program, color correction method, and color correction apparatus Download PDF

Info

Publication number
JP2017017564A
JP2017017564A JP2015133081A JP2015133081A JP2017017564A JP 2017017564 A JP2017017564 A JP 2017017564A JP 2015133081 A JP2015133081 A JP 2015133081A JP 2015133081 A JP2015133081 A JP 2015133081A JP 2017017564 A JP2017017564 A JP 2017017564A
Authority
JP
Japan
Prior art keywords
color
correction
subject
component
sample image
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
JP2015133081A
Other languages
Japanese (ja)
Other versions
JP6531522B2 (en
Inventor
由樹雄 平井
Yukio Hirai
由樹雄 平井
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.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2015133081A priority Critical patent/JP6531522B2/en
Publication of JP2017017564A publication Critical patent/JP2017017564A/en
Application granted granted Critical
Publication of JP6531522B2 publication Critical patent/JP6531522B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Image Processing (AREA)
  • Color Television Image Signal Generators (AREA)
  • Processing Of Color Television Signals (AREA)
  • Facsimile Image Signal Circuits (AREA)
  • Color Image Communication Systems (AREA)

Abstract

PROBLEM TO BE SOLVED: To improve a color reproducibility.SOLUTION: A color correction apparatus 100 performs a processing of acquiring an image; a processing of converting the image into a component of a color space including luminance and chromaticity; a processing of determining whether or not a pixel included in the image converted into the component of color space is the pixel corresponding to a subject of which a spectral reflectance of an infrared light is higher than that of a visible light; and a processing of shifting a color component of the pixel corresponding to the subject on the color space according to correction data associated with a ratio of a distance relating to a color distribution of the pixel corresponding to the subject and a degree of spread between a first sample image of which the subject is imaged at the state of receiving a light corresponding to a wavelength of the visible light and infrared light and a second sample image of which the subject is imaged at the state of receiving the light corresponding to the wavelength of visible light.SELECTED DRAWING: Figure 1

Description

本発明は、色補正プログラム、色補正方法及び色補正装置に関する。   The present invention relates to a color correction program, a color correction method, and a color correction apparatus.

カメラは、多種多様な用途に利用される。例えば、カメラは、監視カメラや車載カメラとして実装されたり、各種の生体認証や角膜反射を利用する視線検出などに使用される画像の撮像装置として実装されたりする。   Cameras are used in a wide variety of applications. For example, the camera may be implemented as a surveillance camera or an in-vehicle camera, or may be implemented as an image capturing device used for various types of biometric authentication or gaze detection using corneal reflection.

例えば、監視カメラや車載カメラの場合、昼夜兼用で用いられる場合がある。この場合、昼間には、赤外光を除去する赤外線カットフィルタを装着することにより、人が眼で認識できる可視光を受光素子に結像させる一方で、夜間や暗闇では、赤外線カットフィルタを除去することにより、近赤外を始めとする赤外光を照明として活用することがある。また、生体認証や視線検出などの機能が搭載される情報処理端末の場合、生体認証や視線検出に用いる画像と、それ以外の用途に用いる画像とを1つのカメラに撮像させることにより、装置の規模やコストの低減を目指す動向も見られる。   For example, in the case of a surveillance camera or an in-vehicle camera, it may be used both day and night. In this case, by installing an infrared cut filter that removes infrared light in the daytime, visible light that can be recognized by the human eye is imaged on the light receiving element, while the infrared cut filter is removed at night and in the dark. As a result, infrared light such as near infrared may be used as illumination. Further, in the case of an information processing terminal equipped with functions such as biometric authentication and line-of-sight detection, an image used for biometric authentication and line-of-sight detection and an image used for other purposes are captured by one camera, thereby There are also trends aimed at reducing scale and costs.

このように撮像素子が可視光及び赤外光を受光する場合、カメラにより撮像される画像は、可視光の下で人が眼で認識する色合いとは異なる。このことから、可視光及び赤外光を受光する撮像素子により撮像された画像の色味を補正することにより、可視光が受光される場合、言い換えれば赤外光が受光されない場合と同等の色味を再現する技術が提案されている。   When the imaging device receives visible light and infrared light in this way, the image captured by the camera is different from the color that a person recognizes with eyes under visible light. From this, by correcting the color of an image captured by an image sensor that receives visible light and infrared light, visible light is received, in other words, the same color as when infrared light is not received. Techniques for reproducing the taste have been proposed.

一例として、マトリクス演算により入力画像を補正する方法がある。この方法では、複数の色、例えば24色を含むカラーチャートが異なる画像入力系で撮影された2つの画像から色補正に用いるマトリクス係数が算出される。すなわち、光路上に赤外線カットフィルタが組み込まれた状態で撮影が行われた画像と、光路上に赤外線カットフィルタが組み込まれない状態で撮影が行われた画像との2つの画像から、撮像素子の分光感度特性を等色関数に近似させるマトリクス係数が最小自乗法により求められる。かかるマトリクス係数を用いる演算により、入力画像の色補正が行われる。   As an example, there is a method of correcting an input image by matrix calculation. In this method, matrix coefficients used for color correction are calculated from two images taken by different image input systems of a plurality of colors, for example, a color chart including 24 colors. That is, from two images of an image taken with an infrared cut filter incorporated on the optical path and an image taken with no infrared cut filter incorporated on the optical path, A matrix coefficient that approximates the spectral sensitivity characteristic to the color matching function is obtained by the method of least squares. The color correction of the input image is performed by the calculation using the matrix coefficient.

ところが、上記のマトリクス演算により色補正を行う場合、赤外光の分光反射率が高い特定の被写体、例えば植物の葉や化学繊維の布などには、色の再現性を十分に発揮することができない場合がある。例えば、植物の葉の場合、葉に含まれるクロロフィルの影響により、可視光の上限を超える近赤外光に対応する波長で分光反射率が高くなる。このため、自然光や照明などの環境光に含まれる赤外光が画像に与える色味の影響は、植物の葉以外の他の被写体よりも植物の葉の方が大きい。それ故、上記のマトリクス演算により色補正を行ったとしても、他の被写体に比べて植物の葉の色を十分に再現することはできない。この結果、可視光の下では緑色と認識されている葉の色が、同じく可視光で緑に認識されているカラーチャートの緑とは異なる色で認識されてしまうことになる。   However, when color correction is performed by the above matrix calculation, color reproducibility can be sufficiently exerted on a specific subject having a high spectral reflectance of infrared light, such as a plant leaf or a chemical fiber cloth. There are cases where it is not possible. For example, in the case of plant leaves, the spectral reflectance increases at a wavelength corresponding to near-infrared light exceeding the upper limit of visible light due to the influence of chlorophyll contained in the leaves. For this reason, the influence of the color that infrared light included in environmental light such as natural light or illumination has on an image is greater in the leaves of plants than in other subjects than the leaves of plants. Therefore, even if color correction is performed by the above matrix calculation, the leaf color of the plant cannot be sufficiently reproduced as compared with other subjects. As a result, the color of the leaf, which is recognized as green under visible light, is recognized as a color different from the green color of the color chart that is also recognized as green with visible light.

このような色再現性の低下を抑制するために、次のような補正データ生成装置も提案されている。この補正データ生成装置では、赤外線カットフィルタが装着されない状態で上記の特定の被写体が撮像された第1のサンプル画像と、赤外線カットフィルタが装着された状態で上記の特定の被写体が撮像された第2のサンプル画像とを用いて、上記の特定の被写体の色を補正する補正データが生成される。   In order to suppress such a decrease in color reproducibility, the following correction data generation apparatus has also been proposed. In the correction data generation device, the first sample image in which the specific subject is imaged without the infrared cut filter and the first sample image in which the specific subject is imaged with the infrared cut filter attached. Correction data for correcting the color of the specific subject is generated using the two sample images.

かかる補正データ生成装置では、特定の被写体に含まれる色が色空間上で無彩色に近い局所的な領域に集中するとの知見が利用される。このような知見の下、補正データ生成装置は、第1のサンプル画像上で特定の被写体が映る範囲を指定させることにより、当該特定の被写体に含まれる色が色空間上で分布する楕円領域を設定する。そして、補正データ生成装置では、第1のサンプル画像を用いて設定された楕円領域を第2のサンプル画像に含まれる特定の被写体の色が分布する楕円領域へシフトさせるシフト量を補正量として算出する。その上で、入力される画像に含まれる画素の色が第1のサンプル画像を用いて設定された色空間上の楕円領域に含まれるか否かにより、赤外光の分光反射率が高い部分とそれ以外の部分へ分離される。すなわち、赤外光の分光反射率が高い部分には、上記の補正データを用いて色をシフトさせる補正が行われる一方で、それ以外の部分には、上記のマトリクス演算により色補正が行われる。   In such a correction data generation device, the knowledge that colors included in a specific subject are concentrated in a local area close to an achromatic color in the color space is used. Based on such knowledge, the correction data generation device specifies an elliptical region in which the color included in the specific subject is distributed in the color space by designating a range in which the specific subject appears on the first sample image. Set. Then, the correction data generation device calculates, as a correction amount, a shift amount that shifts the elliptical region set using the first sample image to the elliptical region in which the color of a specific subject included in the second sample image is distributed. To do. In addition, a portion having a high spectral reflectance of infrared light depending on whether or not the color of the pixel included in the input image is included in an elliptical region on the color space set using the first sample image And other parts. That is, correction for shifting the color using the above correction data is performed on the portion where the spectral reflectance of infrared light is high, while color correction is performed on the other portions by the above matrix calculation. .

特開2013−150269号公報JP2013-150269A 特開2014−200045号公報JP 2014-200045 A 特開2005−328845号公報JP 2005-328845 A 特開2013−128259号公報JP2013-128259A 特開2006−094112号公報JP 2006-094112 A

豊田 善隆,久野 徹也,石田 晃三,杉浦 博明「カラー撮像可能な近赤外撮像装置の研究」映像情報メディア学会誌 Vol.64,No.1,pp.101〜110 2010年Yoshitaka Toyoda, Tetsuya Kuno, Shinzo Ishida, Hiroaki Sugiura “Study on Near-Infrared Imaging Device Capable of Color Imaging”, Journal of the Institute of Image Information and Television Engineers, Vol. 64, no. 1, pp. 101-110 2010

しかしながら、上記の技術では、次に説明するように、色の再現性に自ずから限界がある。   However, the above technique has its own limitations in color reproducibility, as will be described below.

すなわち、上記の補正データ生成装置では、特定の被写体に含まれる色が第1のサンプル画像の色空間上で無彩色に近い局所的な領域に集中するという知見を利用する。ところが、上記の第2のサンプル画像上でも、特定の被写体に含まれる色が局所的な領域に集中する訳ではなく、実際には、第1のサンプル画像上の分布よりも広範囲にわたって分布する。それにもかかわらず、上記の補正データ生成装置では、上記のシフト量を一律に適用することにより色補正が行われるので、色補正後も特定の被写体の色は局所的な領域に集中することになる。この結果、特定の被写体の色が可視光の下で認識される色と類似する色に補正されたとしても、実物のようには広がりを持たない色に補正されるので、色の再現性には限界が生じる。   That is, the correction data generation apparatus uses the knowledge that colors included in a specific subject are concentrated in a local region close to an achromatic color in the color space of the first sample image. However, even in the above-described second sample image, the colors included in the specific subject are not concentrated in the local area, but actually, they are distributed over a wider range than the distribution on the first sample image. Nevertheless, since the correction data generation apparatus performs color correction by uniformly applying the shift amount, the color of a specific subject is concentrated in a local area even after color correction. Become. As a result, even if the color of a specific subject is corrected to a color similar to the color recognized under visible light, it is corrected to a color that does not have a spread like the real thing, so color reproducibility is improved. There is a limit.

1つの側面では、本発明は、色の再現性を高めることができる色補正プログラム、色補正方法及び色補正装置を提供することを目的とする。   In one aspect, an object of the present invention is to provide a color correction program, a color correction method, and a color correction apparatus that can improve color reproducibility.

一態様では、コンピュータに、画像を取得する処理と、画像を輝度及び色度を含む色空間の成分へ変換する処理と、前記色空間の成分へ変換された画像に含まれる画素が赤外光の分光反射率が可視光の分光反射率よりも高い被写体に対応する画素であるか否かを判定する処理と、前記被写体が可視光および赤外光の波長に対応する光を受光する状態で撮像された第1のサンプル画像と、前記被写体が可視光の波長に対応する光を受光する状態で撮像された第2のサンプル画像との間で前記被写体に対応する画素の色度の分布に関する距離及び広がり度合の比が対応付けられた補正データにしたがって、前記被写体に対応する画素の色成分を色空間上でシフトする色補正を実行する処理とを実行させる。   In one embodiment, the computer includes processing for acquiring an image, processing for converting the image into a component of a color space including luminance and chromaticity, and pixels included in the image converted into the component of the color space are infrared light. A process for determining whether or not the pixel corresponds to a subject whose spectral reflectance is higher than that of visible light, and the subject receives light corresponding to wavelengths of visible light and infrared light. The distribution of chromaticity of pixels corresponding to the subject between the first sample image taken and the second sample image taken in a state where the subject receives light corresponding to the wavelength of visible light According to the correction data in which the ratio between the distance and the spread degree is associated, a process of executing color correction for shifting the color component of the pixel corresponding to the subject on the color space is executed.

色の再現性を高めることができる。   Color reproducibility can be improved.

図1は、実施例1に係る色補正システムに含まれる各装置の機能的構成を示すブロック図である。FIG. 1 is a block diagram illustrating a functional configuration of each device included in the color correction system according to the first embodiment. 図2Aは、サンプル画像の一例を示す図である。FIG. 2A is a diagram illustrating an example of a sample image. 図2Bは、サンプル画像の一例を示す図である。FIG. 2B is a diagram illustrating an example of a sample image. 図3Aは、RGBの各成分が持つ輝度値の一例を示す図である。FIG. 3A is a diagram illustrating an example of luminance values of RGB components. 図3Bは、RGBの各成分が持つ輝度値の一例を示す図である。FIG. 3B is a diagram illustrating an example of luminance values of RGB components. 図4Aは、ヒストグラムの一例を示す図である。FIG. 4A is a diagram illustrating an example of a histogram. 図4Bは、ヒストグラムの一例を示す図である。FIG. 4B is a diagram illustrating an example of a histogram. 図5は、UV平面上における色の分布の一例を示す図である。FIG. 5 is a diagram illustrating an example of a color distribution on the UV plane. 図6は、実施例1に係る設定処理の手順を示すフローチャートである。FIG. 6 is a flowchart illustrating the procedure of the setting process according to the first embodiment. 図7は、実施例1に係る第1の補正データの算出処理の手順を示すフローチャートである。FIG. 7 is a flowchart of the first correction data calculation process according to the first embodiment. 図8は、実施例1に係る色補正処理の手順を示すフローチャートである。FIG. 8 is a flowchart illustrating the procedure of the color correction process according to the first embodiment. 図9は、YUV空間における色の分布の一例を示す図である。FIG. 9 is a diagram illustrating an example of a color distribution in the YUV space. 図10Aは、UV平面上における色の分布の一例を示す図である。FIG. 10A is a diagram illustrating an example of a color distribution on the UV plane. 図10Bは、UV平面上における色の分布の一例を示す図である。FIG. 10B is a diagram illustrating an example of a color distribution on the UV plane. 図11は、第1の補正データの一例を示す図である。FIG. 11 is a diagram illustrating an example of the first correction data. 図12は、実施例2に係る色補正処理の手順を示すフローチャートである。FIG. 12 is a flowchart illustrating a procedure of color correction processing according to the second embodiment. 図13は、実施例1及び実施例2に係る色補正プログラムを実行するコンピュータのハードウェア構成例を示す図である。FIG. 13 is a diagram illustrating a hardware configuration example of a computer that executes a color correction program according to the first and second embodiments.

以下に添付図面を参照して本願に係る色補正プログラム、色補正方法及び色補正装置について説明する。なお、この実施例は開示の技術を限定するものではない。そして、各実施例は、処理内容を矛盾させない範囲で適宜組み合わせることが可能である。   Hereinafter, a color correction program, a color correction method, and a color correction apparatus according to the present application will be described with reference to the accompanying drawings. Note that this embodiment does not limit the disclosed technology. Each embodiment can be appropriately combined within a range in which processing contents are not contradictory.

[色補正システムの構成]
図1は、実施例1に係る色補正システムに含まれる各装置の機能的構成を示すブロック図である。図1に示す色補正システム1は、可視光及び赤外光の波長に対応する光を含んで撮像された画像の色を人の色覚特性に合わせて補正する色補正処理を実現するものである。なお、ここでは、一例として、赤外線を除去するフィルタ、いわゆる赤外線(Infrared)カットフィルタが装着されない状態で撮影される場合を例示するが、後述のように、赤外光に対応する波長のうち一部の波長域の光を透過する光学フィルタが装着された状態で撮影される画像が入力される場合も適用範囲に含まれることは言うまでもない。
[Configuration of color correction system]
FIG. 1 is a block diagram illustrating a functional configuration of each device included in the color correction system according to the first embodiment. A color correction system 1 shown in FIG. 1 realizes a color correction process for correcting the color of an image captured including light corresponding to wavelengths of visible light and infrared light in accordance with human color vision characteristics. . Here, as an example, a case where the image is taken without a filter that removes infrared rays, that is, a so-called infrared cut filter, is exemplified. However, as described later, one of the wavelengths corresponding to infrared light is used. Needless to say, the scope of application includes a case where an image photographed in a state where an optical filter that transmits light in a certain wavelength region is attached is input.

ここで、上記の色補正処理の一環として、可視光及び赤外光の波長の光を含んで撮像された画像のうち赤外光の分光反射率が高い特定の被写体に対応する画素の色成分を当該被写体の色が色空間上で分布する範囲よりも広範囲へばらつかせてシフトさせる。このように、植物の葉や化学繊維の布などの特定の被写体に色補正が行われた場合に当該特定の被写体の色が色空間上で局所的な領域に集中することを抑制する。この結果、特定の被写体の色が可視光の下で認識される色と類似する色に補正されると共に、実物のように同色の分類であってもその中で互いが広がりを持つ色に補正される。このような色補正処理によって、一側面として、色の再現性の向上を実現する。   Here, as part of the above color correction processing, color components of pixels corresponding to a specific subject having a high spectral reflectance of infrared light among images picked up including light having wavelengths of visible light and infrared light. Are shifted in a wider range than the range in which the color of the subject is distributed in the color space. In this way, when color correction is performed on a specific subject such as a plant leaf or a chemical fiber cloth, the color of the specific subject is prevented from being concentrated in a local area on the color space. As a result, the color of a specific subject is corrected to a color that is similar to the color recognized under visible light, and even if it is classified as the same color as the real thing, it is corrected to a color in which each other has a spread. Is done. By such color correction processing, improvement of color reproducibility is realized as one aspect.

図1に示すように、色補正システム1には、設定装置10と、色補正装置100とが含まれる。これら設定装置10及び色補正装置100は、所定のネットワークを介して通信可能に接続される。かかるネットワークには、一例として、有線または無線を問わず、インターネット(Internet)を始め、LAN(Local Area Network)やVPN(Virtual Private Network)などの任意の種類の通信網を採用できる。   As shown in FIG. 1, the color correction system 1 includes a setting device 10 and a color correction device 100. The setting device 10 and the color correction device 100 are connected to be communicable via a predetermined network. As an example, any type of communication network such as the Internet (Internet), LAN (Local Area Network), and VPN (Virtual Private Network) can be adopted as such a network, regardless of whether it is wired or wireless.

設定装置10は、色補正に関する各種パラメータの設定を行う装置である。   The setting device 10 is a device that sets various parameters relating to color correction.

一実施形態として、設定装置10は、色補正装置100に対し、色補正に関する補正データを設定すると共に、赤外光の分光反射率が他の波長域よりも高い特定の被写体とそれ以外の他の被写体とを分離する分離条件を設定する。なお、図1には、色補正に関する各種パラメータが設定装置10を通じて設定される例を示すが、色補正装置100の出荷前等に色補正装置100に予め設定されることとしてもよい。また、設定装置10及び色補正装置100は、必ずしも別体として構築されずともよく、色補正装置100に設定装置10の機能を併せ持たせることもできる。   As one embodiment, the setting device 10 sets correction data related to color correction to the color correction device 100, a specific subject whose infrared light spectral reflectance is higher than other wavelength regions, and other than that. Separation conditions for separating the subject from each other are set. Although FIG. 1 shows an example in which various parameters relating to color correction are set through the setting device 10, they may be set in advance in the color correction device 100 before the color correction device 100 is shipped. Further, the setting device 10 and the color correction device 100 do not necessarily need to be constructed separately, and the color correction device 100 can also have the function of the setting device 10.

色補正装置100は、上記の色補正処理を実現するコンピュータである。   The color correction apparatus 100 is a computer that realizes the color correction process.

一実施形態として、色補正装置100は、パッケージソフトウェアやオンラインソフトウェアとして上記の色補正処理を実行する色補正プログラムを所望のコンピュータにインストールさせることによって実装できる。例えば、上記の色補正プログラムを情報処理装置に実行させることにより、情報処理装置を色補正装置100として機能させることができる。ここで言う情報処理装置には、デスクトップ型またはノート型のパーソナルコンピュータの他、スマートフォン、携帯電話機やPHS(Personal Handyphone System)などの移動体通信端末、さらには、PDA(Personal Digital Assistants)などのスレート端末などがその範疇に含まれる。また、ユーザが使用する端末装置をクライアントとし、当該クライアントに上記の色補正処理に関するサービスを提供するサーバ装置として実装することもできる。例えば、色補正装置100は、画像、または、画像に紐付けられた識別情報を入力とし、当該画像に対する上記の色補正処理の実行結果を出力する色補正サービスを提供するサーバ装置として実装される。この場合、色補正装置100は、Webサーバとして実装することとしてもよいし、アウトソーシングによって上記の色補正処理に関するサービスを提供するクラウドとして実装することとしてもかまわない。   As one embodiment, the color correction apparatus 100 can be implemented by installing a color correction program for executing the above color correction processing as package software or online software on a desired computer. For example, the information processing apparatus can function as the color correction apparatus 100 by causing the information processing apparatus to execute the color correction program. The information processing apparatus mentioned here includes a desktop or notebook personal computer, a mobile communication terminal such as a smartphone, a mobile phone or a personal handyphone system (PHS), or a slate such as a PDA (Personal Digital Assistants). Terminals are included in the category. Further, the terminal device used by the user can be used as a client, and the client can be implemented as a server device that provides the client with services related to the color correction processing. For example, the color correction apparatus 100 is implemented as a server apparatus that provides a color correction service that receives an image or identification information associated with the image and outputs the execution result of the color correction processing for the image. . In this case, the color correction apparatus 100 may be implemented as a Web server, or may be implemented as a cloud that provides a service related to the color correction processing described above by outsourcing.

[設定装置10の構成]
続いて、本実施例に係る設定装置10の機能的構成について説明する。図1に示すように、設定装置10は、第1取得部11と、第2取得部12と、特定部13と、変換部14と、補正データ設定部15と、分離条件設定部16とを有する。なお、設定装置10は、図1に示した機能部以外にも既知のコンピュータが有する各種の機能部、例えば各種の入力デバイスや音声出力デバイスなどの機能部を有することとしてもかまわない。
[Configuration of Setting Device 10]
Subsequently, a functional configuration of the setting apparatus 10 according to the present embodiment will be described. As illustrated in FIG. 1, the setting device 10 includes a first acquisition unit 11, a second acquisition unit 12, a specification unit 13, a conversion unit 14, a correction data setting unit 15, and a separation condition setting unit 16. Have. Note that the setting device 10 may include various functional units included in known computers, for example, functional units such as various input devices and audio output devices, in addition to the functional units illustrated in FIG.

このうち、第1取得部11及び第2取得部12は、いずれも色補正に関する各種パラメータを生成する素材とするサンプル画像を取得する処理部である。以下では、第1取得部11により取得されるサンプル画像のことを「第1のサンプル画像」と記載すると共に、第2取得部12により取得されるサンプル画像のことを「第2のサンプル画像」と記載する場合がある。   Among these, the first acquisition unit 11 and the second acquisition unit 12 are both processing units that acquire sample images as materials for generating various parameters relating to color correction. Hereinafter, the sample image acquired by the first acquisition unit 11 is referred to as a “first sample image”, and the sample image acquired by the second acquisition unit 12 is referred to as a “second sample image”. May be described.

一実施形態として、第1取得部11及び第2取得部12は、CCD(Charge Coupled Device)やCMOS(Complementary Metal Oxide Semiconductor)などの撮像素子を搭載するカメラにより撮像されたサンプル画像を取得することができる。また、第1取得部11及び第2取得部12は、ハードディスクや光ディスクなどの補助記憶装置またはメモリカードやUSB(Universal Serial Bus)メモリなどのリムーバブルメディアに保存されたサンプル画像を読み出すことにより取得することもできる。この他、第1取得部11及び第2取得部12は、外部装置からネットワークを介して受信することによってサンプル画像を取得することもできる。   As one embodiment, the first acquisition unit 11 and the second acquisition unit 12 acquire a sample image captured by a camera equipped with an image sensor such as a charge coupled device (CCD) or a complementary metal oxide semiconductor (CMOS). Can do. The first acquisition unit 11 and the second acquisition unit 12 acquire the sample image by reading a sample image stored in an auxiliary storage device such as a hard disk or an optical disk or a removable medium such as a memory card or a USB (Universal Serial Bus) memory. You can also In addition, the 1st acquisition part 11 and the 2nd acquisition part 12 can also acquire a sample image by receiving via a network from an external device.

図2A及び図2Bは、サンプル画像の一例を示す図である。ここでは、一例として、RGBの3つの受光素子を有する撮像素子により、各画素がRGBの輝度値を持つ画像が撮像される場合を想定して以下の説明を行うこととする。このうち、赤の成分Rは、可視光の波長のうち赤の波長域と赤外光の波長域を受光し、緑の成分Gは、可視光の波長のうち緑の波長域と赤外光の波長域を受光し、青の成分Bは、可視光の波長のうち青の波長域と赤外光の波長域を受光する。   2A and 2B are diagrams illustrating examples of sample images. Here, as an example, the following description will be made on the assumption that an image having three RGB light receiving elements is used to capture an image in which each pixel has RGB luminance values. Among these, the red component R receives the red wavelength range and the infrared wavelength range among the visible light wavelengths, and the green component G includes the green wavelength range and the infrared light among the visible light wavelengths. The blue component B receives the blue wavelength range and the infrared wavelength range among the visible light wavelengths.

図2Aに示す第1のサンプル画像20A及び図2Bに示す第2のサンプル画像20Bは、同一のカメラにより同一の位置及び同一の画角で同一の目標が撮影された画像である点は共通するが、互いの画像が撮影される画像入力系の一部が異なる。すなわち、図2Aに示す第1のサンプル画像20Aは、赤外線カットフィルタが装着されない状態で撮影される画像である一方で、図2Bに示す第2のサンプル画像20Bは、赤外線カットフィルタが装着された状態で撮影される画像である点が異なる。このため、第1のサンプル画像20Aには、可視光の波長を持つ光に加え、赤外光の波長を持つ光の影響が含まれる一方で、第2のサンプル画像20Bには、赤外光の波長を持つ光の影響は含まれない。なお、ここでは、第1のサンプル画像の撮影形態の一例として、赤外線カットフィルタが装着されない状態で撮影される場合を例示したが、可視光領域および使用する赤外の波長領域の帯域幅、例えば近赤外光の波長の一部を透過する光学フィルタが挿入された状態で撮影される画像を第1のサンプル画像とすることもできる。   The first sample image 20A shown in FIG. 2A and the second sample image 20B shown in FIG. 2B are common in that the same target is photographed at the same position and the same angle of view by the same camera. However, a part of the image input system in which images of each other are taken is different. That is, the first sample image 20A shown in FIG. 2A is an image taken without an infrared cut filter, while the second sample image 20B shown in FIG. 2B has an infrared cut filter attached. The difference is that the image is taken in a state. Therefore, the first sample image 20A includes the influence of light having the wavelength of infrared light in addition to light having the wavelength of visible light, while the second sample image 20B includes infrared light. This does not include the influence of light having a wavelength of. In addition, although the case where it image | photographed in the state which is not mounting | wearing with an infrared cut filter was illustrated as an example of the imaging | photography form of a 1st sample image here, the bandwidth of the visible light region and the infrared wavelength region to be used, for example, An image photographed with an optical filter that transmits a part of the wavelength of near-infrared light being inserted may be used as the first sample image.

これら第1のサンプル画像20A及び第2のサンプル画像20Bを撮影する場合、一例として、上記の特定の被写体が撮像範囲に含まれる状態で撮影が行われる。かかる特定の被写体の一例として、クロロフィルなどの化学物質を葉っぱに含有する植物などが挙げられる。このように植物が撮影される場合、第1のサンプル画像20A及び第2のサンプル画像20Bの間で、植物の像21A及び植物の像21Bの形状は、同様に映る一方で、色の映り方は異なる。すなわち、植物の場合、植物の葉に含まれるクロロフィルの影響によって他の被写体よりも赤外光の分光反射率が大きくなる。それ故、植物の像21Bは人の眼で認識される色と同様に緑色で映る一方で、植物の像21Aは赤外光の反射光の影響により灰色がかった青磁色や灰色がかった淡い緑色に映る。   When the first sample image 20A and the second sample image 20B are photographed, for example, the photographing is performed in a state where the specific subject is included in the imaging range. An example of such a specific subject is a plant containing a chemical substance such as chlorophyll in a leaf. When the plant is photographed in this way, the shape of the plant image 21A and the plant image 21B is reflected in the same manner between the first sample image 20A and the second sample image 20B. Is different. That is, in the case of a plant, the spectral reflectance of infrared light becomes larger than other subjects due to the influence of chlorophyll contained in the leaves of the plant. Therefore, the plant image 21B appears green like the color recognized by the human eye, while the plant image 21A is grayish celadon or grayish pale green due to the influence of reflected light of infrared light. Reflected in.

さらに、上記の特定の被写体以外の他の被写体が撮像範囲に含まれる状態で撮影が行われる。かかる他の被写体の一例として、図2A及び図2Bに示すように、4行6列に異なる24色が配列されたカラーチャートが挙げられる。このようなカラーチャートを撮像範囲に含めることによって、特定の被写体以外の他の被写体に色補正を行う場合に用いる補正量、例えば背景の項で上述したマトリクス係数などを後段の処理部で設定することが可能となる。   Furthermore, shooting is performed in a state where other subjects other than the specific subject are included in the imaging range. An example of such another subject is a color chart in which 24 different colors are arranged in 4 rows and 6 columns, as shown in FIGS. 2A and 2B. By including such a color chart in the imaging range, a correction amount used when color correction is performed on a subject other than a specific subject, for example, the matrix coefficient described above in the background section, is set in a subsequent processing unit. It becomes possible.

なお、ここでは、上記の特定の被写体の一例として、植物を例示したが、これ以外にも所定の波長、例えば約700nmを境界に分光反射率が上昇する物体であれば、植物以外のものを被写体とすることとしてもかまわない。すなわち、可視光の上界付近または近赤外光の波長域で分光反射率が可視光に対応する波長域の分光反射率よりも上昇する物体であれば、如何なる物体、例えば化学繊維の布などであってもかまわない。   Here, a plant is illustrated as an example of the specific subject described above, but other than this, any object other than a plant may be used as long as the spectral reflectance increases at a predetermined wavelength, for example, about 700 nm. It does not matter as a subject. That is, any object, for example, a cloth of a chemical fiber, is used as long as the spectral reflectance is higher than the spectral reflectance in the wavelength range corresponding to visible light near the upper limit of visible light or in the near infrared wavelength range. It doesn't matter.

特定部13は、各サンプル画像上で特定の被写体の一部または全部を形成する第1の領域および各サンプル画像上で特定の被写体以外の他の被写体の一部または全部を形成する第2の領域を特定する処理部である。   The specifying unit 13 forms a first region that forms part or all of a specific subject on each sample image, and a second region that forms part or all of a subject other than the specific subject on each sample image. It is a processing unit for specifying an area.

一実施形態として、特定部13は、設定装置10の表示部や設定装置10に接続された外部装置の表示部に第1のサンプル画像及び第2のサンプル画像のうち少なくともいずれか1つのサンプル画像を表示させる。その上で、特定部13は、表示部に表示されたサンプル画像上で植物の葉を形成する1または複数の画素を含む範囲を図示しない入力部を通じて指定させる。例えば、特定部13は、ポインティングデバイスを介してドラッグ&ドロップの範囲指定を受け付けることによってサンプル画像上で植物の葉に対応する第1の領域を特定することができる。また、特定部13は、上記の第1の領域を特定する場合と同様の要領で、サンプル画像上でカラーチャートの一部または全部を形成する第2の領域を特定する。なお、ここでは、第1の領域および第2の領域を操作入力により特定する場合を例示したが、必ずしも操作入力により特定せずともかまわない。例えば、サンプル画像にテンプレートマッチングなどの画像認識を適用することにより、サンプル画像上でラベリングされた領域のうち植物や植物の葉との間で形状が類似する領域を第1の領域として特定すると共に、カラーチャートとの間で形状が類似する領域を第2の領域として特定することとしてもかまわない。   As one embodiment, the specifying unit 13 displays at least one of the first sample image and the second sample image on the display unit of the setting device 10 or the display unit of the external device connected to the setting device 10. Is displayed. Then, the specifying unit 13 causes a range including one or a plurality of pixels forming a plant leaf to be designated on the sample image displayed on the display unit through an input unit (not shown). For example, the specifying unit 13 can specify the first region corresponding to the leaf of the plant on the sample image by receiving the drag and drop range specification via the pointing device. The specifying unit 13 specifies a second region that forms part or all of the color chart on the sample image in the same manner as in the case of specifying the first region. In addition, although the case where the first area and the second area are specified by an operation input is illustrated here, it does not necessarily have to be specified by an operation input. For example, by applying image recognition such as template matching to the sample image, a region similar in shape to a plant or a plant leaf among the regions labeled on the sample image is specified as the first region. A region similar in shape to the color chart may be specified as the second region.

変換部14は、サンプル画像のデータ形式を変換する処理部である。   The conversion unit 14 is a processing unit that converts the data format of the sample image.

一実施形態として、変換部14は、第1取得部11により取得される第1のサンプル画像および第2取得部12により取得される第2のサンプル画像のデータ形式を輝度と色差を含む空間で表現されるデータ形式へ変換する。例えば、変換部14は、第1のサンプル画像および第2のサンプル画像に含まれる各画素の画素値をRGB空間で表現されていたRGBの画素値から輝度Y及び2つの色差によって表現される画素値へ変換する。なお、ここでは、各サンプル画像をYUV空間へ変換する場合を例示するが、変換先の色空間はYUV空間に限定されず、サンプル画像を他の色空間、例えばL*a*b空間に変換することとしてもかまわない。   As an embodiment, the conversion unit 14 converts the data format of the first sample image acquired by the first acquisition unit 11 and the second sample image acquired by the second acquisition unit 12 in a space including luminance and color difference. Convert to a data format that can be represented. For example, the conversion unit 14 includes pixels represented by luminance Y and two color differences from the RGB pixel values represented in the RGB space for the pixel values of the pixels included in the first sample image and the second sample image. Convert to value. Here, the case where each sample image is converted to the YUV space is illustrated, but the color space of the conversion destination is not limited to the YUV space, and the sample image is converted to another color space, for example, L * a * b space. It doesn't matter as you do.

補正データ設定部15は、色補正に関する補正データを色補正装置100に設定する処理部である。   The correction data setting unit 15 is a processing unit that sets correction data related to color correction in the color correction apparatus 100.

一実施形態として、補正データ設定部15は、上記の特定の被写体に関する色補正に用いる第1の補正データと、上記の特定の被写体以外の他の被写体に関する色補正に用いる第2の補正データとを算出する。   As one embodiment, the correction data setting unit 15 includes first correction data used for color correction related to the specific subject, second correction data used for color correction related to a subject other than the specific subject, Is calculated.

(1)第1の補正データ
図3A及び図3Bは、RGBの各成分が持つ輝度値の一例を示す図である。図3A及び図3Bには、第1のサンプル画像及び第2のサンプル画像の間で同一の座標に位置する画素の輝度値がRGBの成分別に示されている。すなわち、図3A及び図3Bの左部には、図2Bに示した第2のサンプル画像上の植物の像21Bに含まれる画素の1つである画素22Bまたは画素23Bが持つR成分、G成分及びB成分の輝度値が示されると共に、図3A及び図3Bの右部には、図2Aに示した第1のサンプル画像上で上記の画素22Bまたは画素23Bと同一の座標に位置する画素22Aまたは画素23Aが持つR成分、G成分及びB成分の輝度値が示されている。さらに、図3A及び図3Bには、R成分、G成分及びB成分ごとに輝度値の中で占める可視光および赤外光の光量の内訳が示されている。すなわち、図3A及び図3Bには、可視光を受光することにより計測される輝度値が黒地の塗り潰しで示される一方で、赤外光を受光することにより計測される輝度値が白地の塗り潰しで示されている。
(1) First Correction Data FIGS. 3A and 3B are diagrams illustrating examples of luminance values of RGB components. In FIG. 3A and FIG. 3B, the luminance value of the pixel located at the same coordinate between the first sample image and the second sample image is shown for each RGB component. That is, in the left part of FIG. 3A and FIG. 3B, the R component and the G component possessed by the pixel 22B or the pixel 23B which is one of the pixels included in the plant image 21B on the second sample image shown in FIG. 2B. 3A and 3B, the right side of FIGS. 3A and 3B shows a pixel 22A located at the same coordinates as the pixel 22B or the pixel 23B on the first sample image shown in FIG. 2A. Or, the luminance values of the R component, G component, and B component of the pixel 23A are shown. Further, FIGS. 3A and 3B show the breakdown of the amount of visible light and infrared light in the luminance value for each of the R component, the G component, and the B component. That is, in FIG. 3A and FIG. 3B, the luminance value measured by receiving visible light is shown as a black background, while the luminance value measured by receiving infrared light is shown as a white background. It is shown.

図3A及び図3Bに示す通り、第2のサンプル画像上の画素22B及び画素23Bのいずれにおいても、R成分、G成分及びB成分のうちG成分の輝度値が最も高く、G成分に比べてR成分の輝度値及びB成分の輝度値は小さい。このため、画素22B及び画素23Bは、いずれも緑色として分類されることになるが、これは、あくまで分類が同一であるのであって色味が同一であることまでは意味しない。すなわち、同じ緑色にもバラツキがあり、画素22Bの方が画素23Bよりも濃い緑色として視認される。   As shown in FIGS. 3A and 3B, the luminance value of the G component is the highest among the R component, the G component, and the B component in any of the pixel 22B and the pixel 23B on the second sample image, and compared with the G component. The luminance value of the R component and the luminance value of the B component are small. For this reason, both the pixel 22B and the pixel 23B are classified as green, but this does not mean that the classification is the same and the color is the same. That is, the same green color also varies, and the pixel 22B is visually recognized as darker green than the pixel 23B.

一方、第1のサンプル画像上の画素22A及び画素23Aでは、可視光の波長に対応する光だけでなく、赤外光の波長に対応する光も受光される。この場合、RGBの各成分で赤外光の波長に対応する光が受光される分、R成分、G成分及びB成分の間で輝度値の比が第2のサンプル画像上の画素22B及び画素23Bよりも相対的に小さくなる。この結果、画素22A及び画素23Aが視認される色は、無彩色に近づくことにより彩度が減少するに伴って色のバラツキも少なくなる。   On the other hand, the pixels 22A and 23A on the first sample image receive not only light corresponding to the wavelength of visible light but also light corresponding to the wavelength of infrared light. In this case, the ratio of the luminance value among the R component, G component, and B component is the pixel 22B and the pixel on the second sample image by the amount of light corresponding to the wavelength of infrared light received by each RGB component. It becomes relatively smaller than 23B. As a result, the color in which the pixel 22A and the pixel 23A are visually recognized is less likely to have a color variation as the saturation is reduced by approaching an achromatic color.

図4A及び図4Bは、ヒストグラムの一例を示す図である。図4A及び図4Bには、第1のサンプル画像上の第1の領域に含まれる画素が持つ色差に関するヒストグラムが白地の塗りつぶしで示されると共に、第2のサンプル画像上の第1の領域に含まれる画素が持つ色差に関するヒストグラムが黒地の塗りつぶしで示されている。図4A及び図4Bに示すグラフの縦軸は、度数を指し、グラフの横軸は、階級値である色差Uまたは色差Vを指す。   4A and 4B are diagrams illustrating examples of histograms. In FIGS. 4A and 4B, a histogram relating to the color difference of the pixels included in the first region on the first sample image is indicated by a white background and included in the first region on the second sample image. A histogram relating to the color difference of each pixel is shown with a black background. 4A and 4B, the vertical axis indicates the frequency, and the horizontal axis of the graph indicates the color difference U or the color difference V, which is a class value.

図4A及び図4Bに示すヒストグラムは、図3A及び図3Bを用いて説明したように、可視光だけが受光される場合と可視光及び赤外光が受光される場合とで第1の領域に含まれる画素の色が色空間上で散らばる分布の広がり度合に差があり、後者の方が前者よりも分布の広がり度合は小さいこと、言い換えれば前者の方が後者よりも分布の広がり度合が大きいことを裏付ける。   As described with reference to FIGS. 3A and 3B, the histograms shown in FIGS. 4A and 4B are in the first region when only visible light is received and when visible light and infrared light are received. There is a difference in the extent of the distribution in which the colors of the contained pixels are scattered in the color space, and the latter has a smaller extent of distribution than the former, in other words, the former has a greater extent of distribution than the latter I support that.

かかる広がり度合の差に着目し、補正データ設定部15は、一例として、第1のサンプル画像の第1の領域に含まれる画素の色成分が色空間上で点在する分布と、第2のサンプル画像の第1の領域に含まれる画素の色成分が色空間上で点在する分布とから、互いの分布に関する距離に加え、互いの分布の広がり度合の比を第1の補正データとして算出する。   Focusing on the difference in the spread degree, the correction data setting unit 15, as an example, has a distribution in which the color components of pixels included in the first region of the first sample image are scattered in the color space, and the second From the distribution in which the color components of the pixels included in the first region of the sample image are scattered in the color space, in addition to the distance related to the mutual distribution, the ratio of the extent of the mutual distribution is calculated as the first correction data To do.

このように2つの分布の距離に加え、2つの分布の広がり度合の比を第1の補正データとして用いることによって、特定の被写体に対応する画素が持つ色成分をシフトさせる色補正が行われる場合に、シフト後の色成分が色空間上で局所的な領域に集中することを抑制する。   In this way, in addition to the distance between the two distributions, by using the ratio of the extents of the two distributions as the first correction data, color correction for shifting the color component of the pixel corresponding to the specific subject is performed. In addition, the shifted color components are prevented from being concentrated in a local area on the color space.

より具体的には、補正データ設定部15は、変換部14によりRGB空間からYUV空間へ変換された第1のサンプル画像のうち、特定部13により特定された第1の領域に含まれる各画素の間で色差の平均値をU成分およびV成分ごとに算出する。同様に、補正データ設定部15は、変換部14によりRGB空間からYUV空間へ変換された第2のサンプル画像のうち、特定部13により特定された第1の領域に含まれる各画素の間で色差の平均値をU成分およびV成分ごとに算出する。その上で、補正データ設定部15は、第1のサンプル画像から算出された色差の平均値の座標と、第2のサンプル画像から算出された色差の平均値の座標との距離をU成分およびV成分ごとに算出する。   More specifically, the correction data setting unit 15 includes each pixel included in the first region specified by the specifying unit 13 among the first sample images converted from the RGB space to the YUV space by the conversion unit 14. The average value of the color difference is calculated for each U component and V component. Similarly, the correction data setting unit 15 among the pixels included in the first region specified by the specifying unit 13 among the second sample images converted from the RGB space to the YUV space by the conversion unit 14. The average value of the color difference is calculated for each U component and V component. Then, the correction data setting unit 15 determines the distance between the average color difference coordinate calculated from the first sample image and the average color difference coordinate calculated from the second sample image as the U component and Calculated for each V component.

このようにして第1のサンプル画像及び第2のサンプル画像から算出される第1の領域間の色差の距離は、特定の被写体に対応する画素が持つ色成分を色空間上でシフトさせるシフト量Δu及びΔvとして用いられる。なお、ここでは、一例として、色差の平均値から距離を求める場合を例示したが、必ずしも平均値でなくともよく、中央値や最頻値から距離を求めることとしてもかまわない。   The distance of the color difference between the first areas calculated from the first sample image and the second sample image in this way is the shift amount for shifting the color component of the pixel corresponding to the specific subject on the color space. Used as Δu and Δv. Here, as an example, the case where the distance is obtained from the average value of the color differences is illustrated, but the distance may not necessarily be the average value, and the distance may be obtained from the median value or the mode value.

さらに、補正データ設定部15は、変換部14によりRGB空間からYUV空間へ変換された第1のサンプル画像のうち、特定部13により特定された第1の領域に含まれる画素が持つ色差の分布の広がり度合をU成分及びV成分ごとに算出する。かかる分布の広がり度合を評価する統計量の一例として、上記のシフト量Δu及びΔvの算出に用いられた色差の平均値を用いて、色差の標準偏差や分散を算出することができる。同様に、補正データ設定部15は、変換部14によりRGB空間からYUV空間へ変換された第2のサンプル画像のうち、特定部13により特定された第1の領域に含まれる画素が持つ色差の分布の広がり度合をU成分及びV成分ごとに算出する。その上で、補正データ設定部15は、第1のサンプル画像から算出された広がり度合と、第2のサンプル画像から算出された広がり度合との間で広がり度合の比をU成分およびV成分ごとに算出する。   Further, the correction data setting unit 15 distributes the color difference of the pixels included in the first region specified by the specifying unit 13 among the first sample images converted from the RGB space to the YUV space by the conversion unit 14. Is calculated for each U component and V component. As an example of a statistic that evaluates the degree of spread of the distribution, the standard deviation and variance of the color difference can be calculated using the average value of the color differences used for calculating the shift amounts Δu and Δv. Similarly, the correction data setting unit 15 determines the color difference of the pixels included in the first region specified by the specifying unit 13 among the second sample images converted from the RGB space to the YUV space by the conversion unit 14. The extent of distribution is calculated for each U component and V component. In addition, the correction data setting unit 15 sets the ratio of the spread degree between the spread degree calculated from the first sample image and the spread degree calculated from the second sample image for each of the U component and the V component. To calculate.

このようにして第1のサンプル画像及び第2のサンプル画像から算出される第1の領域間の広がり度合の比σu_hi及びσv_hiは、特定の被写体に対応する画素が持つ色成分をシフト量Δu及びΔvにしたがってシフトさせる色空間の範囲を規定する補正量として用いられる。   The ratios σu_hi and σv_hi of the spread degree between the first regions calculated from the first sample image and the second sample image in this way are the color components of the pixels corresponding to the specific subject, and the shift amounts Δu and It is used as a correction amount that defines the range of the color space to be shifted according to Δv.

これらシフト量Δu及びΔvと広がり度合の比σu_hi及びσv_hiとが第1の補正データとして色補正装置100の補正データ記憶部160へ登録されることにより、第1の補正データが色補正装置100に設定される。なお、ここでは、UV平面上のシフト量及び広がり度合の比を算出する場合を例示したが、L*a*b空間上のab平面上のシフト量及び広がり度合の比を算出することとしてもかまわない。   The shift amounts Δu and Δv and the spread degree ratios σu_hi and σv_hi are registered as first correction data in the correction data storage unit 160 of the color correction device 100, whereby the first correction data is stored in the color correction device 100. Is set. In addition, although the case where the ratio of the shift amount and the spread degree on the UV plane is calculated is illustrated here, the ratio of the shift amount and the spread degree on the ab plane in the L * a * b space may be calculated. It doesn't matter.

(2)第2の補正データ
また、上記の第2の補正データは、あくまで一例として、上記の非特許文献1「カラー撮像可能な近赤外撮像装置の研究」に開示された方法にしたがって算出することができる。すなわち、補正データ設定部15は、第1のサンプル画像および第2のサンプル画像の2つのサンプル画像に含まれる画素のうち第2の領域に含まれる画素が持つRGBの画素値から、撮像素子の分光感度特性を等色関数に近似させるマトリクス係数を最小自乗法により求めることができる。
(2) Second Correction Data The second correction data is calculated according to the method disclosed in Non-Patent Document 1 “Study on Near-Infrared Imaging Device Capable of Color Imaging” as an example. can do. In other words, the correction data setting unit 15 determines the image pickup element from the RGB pixel values of the pixels included in the second region among the pixels included in the two sample images of the first sample image and the second sample image. A matrix coefficient that approximates the spectral sensitivity characteristic to the color matching function can be obtained by the method of least squares.

このようにして算出されたマトリクス係数が第2の補正データとして色補正装置100の補正データ記憶部160へ登録されることにより、第2の補正データが色補正装置100に設定される。   The matrix coefficient calculated in this way is registered as the second correction data in the correction data storage unit 160 of the color correction apparatus 100, whereby the second correction data is set in the color correction apparatus 100.

分離条件設定部16は、上記の特定の被写体とそれ以外の他の被写体とを分離する分離条件を色補正装置100に設定する処理部である。   The separation condition setting unit 16 is a processing unit that sets, in the color correction apparatus 100, a separation condition for separating the specific subject from other subjects.

一実施形態として、分離条件設定部16は、上記の分離条件の一例として、第1のサンプル画像に含まれる画素のうち第1の領域に含まれる各画素の色が色空間上で点在する座標の分布の形状及び大きさが定義された領域を色補正装置100に設定することができる。例えば、分離条件設定部16は、第1のサンプル画像上の第1の領域に含まれる各画素のUV成分がUV平面上で点在する座標の分布を楕円中心点、楕円軸長および楕円回転角度などのパラメータで定義することにより、UV平面上の楕円領域として近似することができる。このとき、分離条件設定部16は、第1のサンプル画像内で第1の領域を形成する画素が色空間のUV平面上で集中して分布する箇所に絞って楕円領域を定義するために、画素間の距離が所定値以内である画素同士を包含の対象とし、所定値を超える画素を包含の対象から除外することもできる。このように第1のサンプル画像上で第1の被写体を形成する画素のUV成分がUV平面上で点在する分布を表す楕円領域を算出する。その上で、分離条件設定部16は、上記の楕円領域を分離条件として色補正装置100の分離条件記憶部140へ登録することにより、分離条件を色補正装置100に設定する。なお、ここでは、分布を楕円領域に近似する場合を例示したが、他の形状、例えば多角形に近似することとしてもかまわない。   As one embodiment, the separation condition setting unit 16 scatters the colors of the pixels included in the first region among the pixels included in the first sample image as an example of the above-described separation condition in the color space. An area in which the shape and size of the coordinate distribution is defined can be set in the color correction apparatus 100. For example, the separation condition setting unit 16 determines the distribution of coordinates where the UV components of each pixel included in the first region on the first sample image are scattered on the UV plane as the ellipse center point, the ellipse axis length, and the ellipse rotation. By defining with parameters such as an angle, it can be approximated as an elliptical region on the UV plane. At this time, the separation condition setting unit 16 defines an elliptical region by narrowing down to a location where pixels forming the first region are concentrated and distributed on the UV plane of the color space in the first sample image. It is also possible to include pixels whose distance between pixels is within a predetermined value and exclude pixels that exceed the predetermined value from the inclusion target. In this manner, an elliptical area representing a distribution in which the UV components of the pixels forming the first subject are scattered on the UV plane on the first sample image is calculated. In addition, the separation condition setting unit 16 sets the separation condition in the color correction apparatus 100 by registering the above elliptical area as the separation condition in the separation condition storage unit 140 of the color correction apparatus 100. Here, the case where the distribution is approximated to an elliptical area is illustrated, but it may be approximated to another shape, for example, a polygon.

なお、上記の第1取得部11、第2取得部12、特定部13、変換部14及び補正データ設定部15及び分離条件設定部16などの処理部は、次のようにして実装できる。例えば、中央処理装置、いわゆるCPU(Central Processing Unit)などに、上記の各処理部と同様の機能を発揮するプロセスを各種の半導体メモリ素子、例えばRAM(Random Access Memory)やフラッシュメモリなどに展開して実行させることにより実現できる。これらの処理部は、必ずしも中央処理装置で実行されずともよく、MPU(Micro Processing Unit)やDSP(Digital Signal Processor)に実行させることとしてもよい。また、上記の各機能部は、ASIC(Application Specific Integrated Circuit)やFPGA(Field Programmable Gate Array)などのハードワイヤードロジックによっても実現できる。   The processing units such as the first acquisition unit 11, the second acquisition unit 12, the identification unit 13, the conversion unit 14, the correction data setting unit 15, and the separation condition setting unit 16 can be implemented as follows. For example, in a central processing unit, a so-called CPU (Central Processing Unit), a process that performs the same function as each processing unit described above is developed in various semiconductor memory devices, such as RAM (Random Access Memory) and flash memory. It can be realized by executing. These processing units are not necessarily executed by the central processing unit, but may be executed by an MPU (Micro Processing Unit) or a DSP (Digital Signal Processor). Each functional unit described above can also be realized by a hard wired logic such as an application specific integrated circuit (ASIC) or a field programmable gate array (FPGA).

[色補正装置100の構成]
次に、本実施例に係る色補正装置100の機能的構成について説明する。図1に示すように、色補正装置100は、取得部110と、変換部120と、判定部130と、分離条件記憶部140と、補正部150と、補正データ記憶部160とを有する。
[Configuration of Color Correction Apparatus 100]
Next, a functional configuration of the color correction apparatus 100 according to the present embodiment will be described. As illustrated in FIG. 1, the color correction apparatus 100 includes an acquisition unit 110, a conversion unit 120, a determination unit 130, a separation condition storage unit 140, a correction unit 150, and a correction data storage unit 160.

取得部110は、画像を取得する処理部である。ここで言う「画像」は、設定装置10の第1取得部11及び第2取得部12により取得されるサンプル画像とは異なり、上記の色補正処理を適用する画像を指す。以下では、色補正が行われる元となる画像という一側面から「原画像」と記載する場合がある。なお、ここでは、原画像の撮影形態の一例として、赤外線カットフィルタが装着されない状態で撮影される場合を想定するが、可視光領域および使用する赤外の波長領域の帯域幅、例えば近赤外光の波長の一部を透過する光学フィルタが挿入された状態で撮影される画像を原画像とすることもできる。   The acquisition unit 110 is a processing unit that acquires an image. The “image” here refers to an image to which the above color correction processing is applied, unlike the sample image acquired by the first acquisition unit 11 and the second acquisition unit 12 of the setting device 10. In the following description, an “original image” may be described from one aspect of an image from which color correction is performed. Here, as an example of the form of the original image, it is assumed that the image is captured without an infrared cut filter, but the bandwidth of the visible light region and the infrared wavelength region to be used, for example, near infrared An image captured with an optical filter that transmits a part of the wavelength of light being inserted may be used as an original image.

一実施形態として、取得部110は、CCDやCMOSなどの撮像素子を搭載するカメラにより撮像された原画像を取得することができる。また、取得部110は、ハードディスクや光ディスクなどの補助記憶装置またはメモリカードやUSB(Universal Serial Bus)メモリなどのリムーバブルメディアに保存された原画像を読み出すことにより取得することもできる。この他、取得部110は、外部装置からネットワークを介して受信することによって原画像を取得することもできる。   As one embodiment, the acquisition unit 110 can acquire an original image captured by a camera equipped with an image sensor such as a CCD or a CMOS. The acquisition unit 110 can also acquire an original image stored in an auxiliary storage device such as a hard disk or an optical disk or a removable medium such as a memory card or a USB (Universal Serial Bus) memory. In addition, the acquisition unit 110 can also acquire an original image by receiving it from an external device via a network.

変換部120は、原画像のデータ形式を変換する処理部である。   The conversion unit 120 is a processing unit that converts the data format of the original image.

一実施形態として、変換部120は、取得部110により取得される原画像のデータ形式を輝度と色度を含む空間で表現されるデータ形式へ変換する。例えば、変換部120は、原画像に含まれる各画素の画素値をRGB空間で表現されていたRGBの画素値から輝度Y及び2つの色差によって表現される画素値へ変換する。なお、ここでは、原画像をYUV空間へ変換する場合を例示するが、変換先の色空間はYUV空間に限定されず、原画像を他の色空間、例えばL*a*b空間に変換することとしてもかまわない。   As one embodiment, the conversion unit 120 converts the data format of the original image acquired by the acquisition unit 110 into a data format expressed in a space including luminance and chromaticity. For example, the conversion unit 120 converts the pixel value of each pixel included in the original image from the RGB pixel value expressed in the RGB space to the pixel value expressed by the luminance Y and two color differences. Here, the case where the original image is converted to the YUV space is exemplified, but the color space of the conversion destination is not limited to the YUV space, and the original image is converted to another color space, for example, the L * a * b space. It doesn't matter.

判定部130は、分離条件記憶部140に記憶された分離条件を参照して、原画像に含まれる画素が特定の被写体に対応する画素であるか否かを判定する処理部である。   The determination unit 130 is a processing unit that refers to the separation condition stored in the separation condition storage unit 140 and determines whether a pixel included in the original image is a pixel corresponding to a specific subject.

一実施形態として、判定部130は、変換部120により色空間へ変換された原画像に含まれる画素のうち画素を1つ選択する。続いて、判定部130は、分離条件記憶部140に記憶された分離条件、すなわち上述の第1の領域に対応するUV平面上の楕円領域を参照して、先に原画像から選択された画素のUV成分がUV平面上で第1の領域に対応する楕円領域に含まれるか否かを判定する。このとき、画素のUV成分がUV平面上で第1の領域に対応する楕円領域に含まれない場合、当該画素が特定の被写体を形成しない画素であると推定できる。この場合、特定の被写体以外の他の被写体に適用する色補正、例えばマトリクス演算による色補正が補正部150により選択される。一方、画素のUV成分がUV平面上で第1の領域に対応する楕円領域に含まれる場合、当該画素が特定の被写体を形成する画素であると推定できる。この場合、第1の被写体に適用する色補正、例えばシフト量Δu及びΔvと広がり度合の比σu_hi及びσv_hiとにしたがってUV平面上で色をシフトさせる色補正が補正部150により選択される。なお、ここでは、あくまで一例として、画素のUV成分がUV平面上で第1の領域に対応する楕円領域に含まれるか否かにより、特定の被写体に対応する画素とそうでない画素とを分離する場合を例示したが、これ以外の他の分離条件を用いることができるのは言うまでもない。   As one embodiment, the determination unit 130 selects one pixel from the pixels included in the original image converted into the color space by the conversion unit 120. Subsequently, the determination unit 130 refers to the separation condition stored in the separation condition storage unit 140, that is, the pixel previously selected from the original image with reference to the elliptical region on the UV plane corresponding to the first region described above. Is determined to be included in an elliptical area corresponding to the first area on the UV plane. At this time, if the UV component of the pixel is not included in the elliptical region corresponding to the first region on the UV plane, it can be estimated that the pixel is a pixel that does not form a specific subject. In this case, the correction unit 150 selects color correction to be applied to a subject other than the specific subject, for example, color correction by matrix calculation. On the other hand, when the UV component of a pixel is included in an elliptical region corresponding to the first region on the UV plane, it can be estimated that the pixel is a pixel that forms a specific subject. In this case, the correction unit 150 selects color correction to be applied to the first subject, for example, color correction that shifts the color on the UV plane according to the shift amounts Δu and Δv and the spread degree ratios σu_hi and σv_hi. Note that here, as an example only, a pixel corresponding to a specific subject is separated from a pixel that is not based on whether or not the UV component of the pixel is included in an elliptical region corresponding to the first region on the UV plane. Although the case is illustrated, it goes without saying that other separation conditions can be used.

補正部150は、補正データ記憶部160に記憶された補正データを参照して、色補正を実行する処理部である。   The correction unit 150 is a processing unit that performs color correction with reference to the correction data stored in the correction data storage unit 160.

一実施形態として、補正部150は、画素のUV成分がUV平面上で第1の領域に対応する楕円領域に含まれるか否かにより、特定の被写体に適用する色補正または特定の被写体以外の他の被写体に適用する色補正を切り換えて実行する。   As one embodiment, the correction unit 150 performs color correction to be applied to a specific subject or other than a specific subject depending on whether or not the UV component of the pixel is included in an elliptical region corresponding to the first region on the UV plane. Switch and execute color correction to be applied to other subjects.

例えば、画素のUV成分がUV平面上で第1の領域に対応する楕円領域に含まれない場合、補正部150は、他の被写体に適用する色補正、例えばマトリクス演算による色補正を実行する。すなわち、補正部150は、補正データ記憶部160に記憶された第2の補正データ、すなわちマトリクス係数を参照して、当該画素が持つRGBの画素値に第2の補正データに定義されたマトリクス係数を乗算するマトリクス演算を実行する。なお、補正部150は、上記の色補正の他にも、上記の色補正が実行された画素値にγ補正および彩度補正などを併せて実行することもできる。   For example, when the UV component of the pixel is not included in the elliptical area corresponding to the first area on the UV plane, the correction unit 150 performs color correction applied to another subject, for example, color correction by matrix calculation. That is, the correction unit 150 refers to the second correction data stored in the correction data storage unit 160, that is, the matrix coefficient, and the matrix coefficient defined in the second correction data to the RGB pixel value of the pixel. A matrix operation for multiplying is executed. In addition to the color correction described above, the correction unit 150 can also execute γ correction, saturation correction, and the like on the pixel value on which the color correction has been executed.

一方、画素のUV成分がUV平面上で第1の領域に対応する楕円領域に含まれる場合、補正部150は、特定の被写体に適用する色補正、例えばシフト量Δu及びΔvと広がり度合の比σu_hi及びσv_hiとにしたがってUV平面上で色をシフトさせる色補正を実行する。   On the other hand, when the UV component of the pixel is included in an elliptical area corresponding to the first area on the UV plane, the correction unit 150 performs color correction to be applied to a specific subject, for example, the ratio between the shift amounts Δu and Δv and the spread degree. Color correction is performed to shift the color on the UV plane according to σu_hi and σv_hi.

これを具体的に説明すると、補正部150は、先に選択された画素が持つU成分の値を下記の式(1)へ代入すると共に、同画素が持つV成分の値を下記の式(2)へ代入することにより、当該画素の色成分をシフトさせる。   More specifically, the correction unit 150 substitutes the value of the U component of the previously selected pixel into the following formula (1), and sets the value of the V component of the pixel to the following formula ( By substituting in 2), the color component of the pixel is shifted.

u_o=u_in+Δu+(u_in-u_in平均)*σu_hi・・・式(1)
v_o=v_in+Δv+(v_in-v_in平均)*σv_hi・・・式(2)
u_o = u_in + Δu + (u_in-u_in average) * σu_hi (1)
v_o = v_in + Δv + (v_in-v_in average) * σv_hi (2)

ここで、上記の式(1)における「Δu」は、第1の補正データに含まれるU成分のシフト量を指し、「σu_hi」は、第1の補正データに含まれるU成分の広がり度合の比を指す。さらに、上記の式(1)における「u_in」は、原画像の画素が持つU成分の値を指し、「u_o」は、シフト後のU成分の値を指し、「u_in平均」は、原画像の各画素が持つU成分の平均値を指す。また、上記の式(2)における「Δv」は、第1の補正データに含まれるV成分のシフト量を指し、「σv_hi」は、第1の補正データに含まれるV成分の広がり度合の比を指す。さらに、上記の式(2)における「v_in」は、原画像の画素が持つV成分の値を指し、「v_o」は、シフト後のV成分の値を指し、「v_in平均」は、原画像の各画素が持つV成分の平均値を指す。   Here, “Δu” in the above equation (1) indicates the shift amount of the U component included in the first correction data, and “σu_hi” is the spread degree of the U component included in the first correction data. Refers to the ratio. Furthermore, “u_in” in the above equation (1) indicates the value of the U component of the pixel of the original image, “u_o” indicates the value of the U component after the shift, and “u_in average” indicates the original image This means the average value of U components of each pixel. In the above equation (2), “Δv” indicates the shift amount of the V component included in the first correction data, and “σv_hi” indicates the ratio of the spread degree of the V component included in the first correction data. Point to. Furthermore, “v_in” in the above equation (2) indicates the value of the V component of the pixel of the original image, “v_o” indicates the value of the V component after the shift, and “v_in average” indicates the original image Means the average value of the V component of each pixel.

このようにシフト量Δu及びΔvに加え、広がり度合の比σu_hi及びσv_hiを用いて色補正を行うことによって、シフト後の色成分が色空間上で局所的な領域に集中することを抑制する。この結果、特定の被写体の色が可視光の下で認識される色と類似する色に補正されると共に、実物のように広がりを持つ色に補正される。   In this way, color correction is performed using the spread degree ratios σu_hi and σv_hi in addition to the shift amounts Δu and Δv, thereby suppressing the color components after the shift from being concentrated in a local region in the color space. As a result, the color of the specific subject is corrected to a color similar to the color recognized under visible light, and is also corrected to a color having a spread like a real object.

図5は、UV平面上における色の分布の一例を示す図である。図5に示すグラフの縦軸は、色差Vを指し、横軸は、色差Uを指す。図5には、第1のサンプル画像上の第1の領域に含まれる画素が持つ色成分の分布がUV平面上に円のマークでプロットされる一方で、第2のサンプル画像上の第1の領域に含まれる画素が持つ色成分の分布がUV平面上に菱形のマークでプロットされている。さらに、図5には、第1のサンプル画像に含まれる画素のうち第1の領域に含まれる各画素の色が色空間上で点在する座標の分布が楕円に近似された楕円領域51と、第2のサンプル画像に含まれる画素のうち第1の領域に含まれる各画素の色が色空間上で点在する座標の分布が楕円に近似された楕円領域52とが示されている。   FIG. 5 is a diagram illustrating an example of a color distribution on the UV plane. The vertical axis of the graph shown in FIG. 5 indicates the color difference V, and the horizontal axis indicates the color difference U. In FIG. 5, the distribution of the color components of the pixels included in the first region on the first sample image is plotted with a circle mark on the UV plane, while the first on the second sample image is plotted. The distribution of the color components of the pixels included in the region is plotted with rhombus marks on the UV plane. Further, FIG. 5 shows an ellipse area 51 in which the distribution of coordinates in which the color of each pixel included in the first area among the pixels included in the first sample image is scattered in the color space is approximated to an ellipse. In addition, an ellipse region 52 in which the distribution of coordinates in which the color of each pixel included in the first region among the pixels included in the second sample image is scattered in the color space is approximated to an ellipse is shown.

図5に示す通り、シフト量Δu及びΔvに加え、広がり度合の比σu_hi及びσv_hiを用いて色補正を行う場合、原画像に含まれる画素のうちUV平面の楕円領域51に含まれる画素の色成分が当該楕円領域51よりも広範囲な楕円領域52へシフトされる。それ故、特定の被写体の色が可視光の下で認識される色と類似する色に補正されるに留まらず、実物のように同色の分類であってもその中で互いが広がりを持つ色に補正できる。   As shown in FIG. 5, when color correction is performed using the spread ratios σu_hi and σv_hi in addition to the shift amounts Δu and Δv, the color of the pixel included in the elliptical region 51 on the UV plane among the pixels included in the original image The component is shifted to an elliptical area 52 that is wider than the elliptical area 51. Therefore, the color of a specific subject is not only corrected to a color similar to the color recognized under visible light, but even if it is classified as the same color as the real thing, it is a color in which each other has a spread. Can be corrected.

このようにシフト量Δu及びΔvと広がり度合の比σu_hi及びσv_hiとにしたがってUV平面上でシフトされた画素の色成分の値は当該画素の輝度Yの値とともに、RGB空間の画素値、すなわちRGBの各成分の輝度値へ逆変換される。   Thus, the value of the color component of the pixel shifted on the UV plane according to the shift amounts Δu and Δv and the spread degree ratios σu_hi and σv_hi, together with the luminance Y value of the pixel, the pixel value in the RGB space, that is, RGB Is converted back to the luminance value of each component.

このようにして原画像の各画素の色補正が行われた後、色補正後の画像は、任意の出力先へ出力することができる。例えば、色補正後の画像を所定のディスプレイに表示させたり、ハードディスクや光ディスクなどの補助記憶装置またはメモリカードやUSBメモリなどのリムーバブルメディアに保存したりすることもできる。この他、画像を入力として各種の処理をコンピュータに実行させるアプリケーションプログラムへ色補正後の画像を出力したり、ネットワークを介して、色補正後の画像を任意の外部装置へ送信したりすることもできる。   After color correction of each pixel of the original image is performed in this way, the image after color correction can be output to an arbitrary output destination. For example, the color-corrected image can be displayed on a predetermined display, or can be stored in an auxiliary storage device such as a hard disk or an optical disk, or a removable medium such as a memory card or a USB memory. In addition, the image after color correction may be output to an application program that causes a computer to execute various processes using the image as an input, or the image after color correction may be transmitted to an arbitrary external device via a network. it can.

なお、上記の取得部110、変換部120、判定部130及び補正部150などの機能部は、次のようにして実装できる。例えば、中央処理装置、いわゆるCPUなどに、上記の各処理部と同様の機能を発揮するプロセスをメモリ上に展開して実行させることにより実現できる。これらの処理部は、必ずしも中央処理装置で実行されずともよく、MPUやDSPに実行させることとしてもよい。また、上記の各機能部は、ASICやFPGAなどのハードワイヤードロジックによっても実現できる。   The functional units such as the acquisition unit 110, the conversion unit 120, the determination unit 130, and the correction unit 150 described above can be implemented as follows. For example, it can be realized by causing a central processing unit, a so-called CPU, or the like to develop and execute a process that exhibits the same function as each of the above processing units on a memory. These processing units do not necessarily have to be executed by the central processing unit, and may be executed by an MPU or DSP. Each functional unit described above can also be realized by a hard-wired logic such as ASIC or FPGA.

また、上記の分離条件記憶部140及び補正データ記憶部160には、一例として、各種の半導体メモリ素子、例えばRAMやフラッシュメモリを採用できる。また、上記の分離条件記憶部140及び補正データ記憶部160は、必ずしも主記憶装置でなくともよく、補助記憶装置であってもかまわない。この場合、HDD、光ディスクやSSDなどを採用できる。   In addition, as the separation condition storage unit 140 and the correction data storage unit 160, various semiconductor memory elements such as a RAM and a flash memory can be employed as an example. Further, the separation condition storage unit 140 and the correction data storage unit 160 are not necessarily a main storage device and may be an auxiliary storage device. In this case, an HDD, an optical disk, an SSD, or the like can be employed.

[処理の流れ]
続いて、本実施例に係る色補正システムの処理の流れについて説明する。なお、ここでは、設定装置10により実行される(1)設定処理、設定処理の一手順として実行される(2)第1の補正データの算出処理を説明した後に、色補正装置100により実行される(3)色補正処理を説明することとする。
[Process flow]
Next, the process flow of the color correction system according to the present embodiment will be described. Here, (1) the setting process executed by the setting apparatus 10 and (2) the first correction data calculation process executed as one procedure of the setting process are described, and then executed by the color correction apparatus 100. (3) The color correction process will be described.

(1)設定処理
図6は、実施例1に係る設定処理の手順を示すフローチャートである。この処理は、一例として、色補正装置100への設定指示を受け付けた場合に起動される。図6に示すように、設定処理が起動されると、第1取得部11により第1のサンプル画像が取得されると共に第2取得部12により第2のサンプル画像が取得される(ステップS101)。
(1) Setting Processing FIG. 6 is a flowchart illustrating a setting processing procedure according to the first embodiment. This process is started when a setting instruction to the color correction apparatus 100 is received as an example. As shown in FIG. 6, when the setting process is started, the first sample image is acquired by the first acquisition unit 11 and the second sample image is acquired by the second acquisition unit 12 (step S101). .

続いて、特定部13は、ステップS101で取得された第1のサンプル画像から特定の被写体の一部または全部を形成する第1の領域を特定すると共に、第1のサンプル画像から特定の被写体以外の他の被写体の一部または全部を形成する第2の領域を特定する(ステップS102)。   Subsequently, the specifying unit 13 specifies a first region that forms part or all of the specific subject from the first sample image acquired in step S101, and other than the specific subject from the first sample image. A second region that forms part or all of the other subject is identified (step S102).

そして、変換部14は、第1取得部11により取得される第1のサンプル画像および第2取得部12により取得される第2のサンプル画像のデータ形式を輝度と色度を含む空間で表現されるデータ形式へ変換する(ステップS103)。   The conversion unit 14 expresses the data format of the first sample image acquired by the first acquisition unit 11 and the second sample image acquired by the second acquisition unit 12 in a space including luminance and chromaticity. (Step S103).

その後、補正データ設定部15は、第1のサンプル画像の第1の領域に含まれる画素の色成分が色空間上で点在する分布と、第2のサンプル画像の第1の領域に含まれる画素の色成分が色空間上で点在する分布とから、互いの分布に関する距離に加え、互いの分布の広がり度合の比を第1の補正データとして算出する(ステップS104)。   Thereafter, the correction data setting unit 15 includes the distribution in which the color components of the pixels included in the first region of the first sample image are scattered in the color space and the first region of the second sample image. From the distribution in which the color components of the pixels are scattered in the color space, in addition to the distance related to the mutual distribution, the ratio of the extent of the mutual distribution is calculated as first correction data (step S104).

また、補正データ設定部15は、第1のサンプル画像および第2のサンプル画像の2つのサンプル画像に含まれる画素のうち第2の領域に含まれる画素が持つRGBの画素値から、撮像素子の分光感度特性を等色関数に近似させるマトリクス係数を第2の補正データとして算出する(ステップS105)。   In addition, the correction data setting unit 15 calculates the pixel value of the image sensor from the RGB pixel values of the pixels included in the second region among the pixels included in the two sample images of the first sample image and the second sample image. A matrix coefficient that approximates the spectral sensitivity characteristic to the color matching function is calculated as second correction data (step S105).

そして、補正データ設定部15は、ステップS104で算出された第1の補正データ及びステップS105で算出された第2の補正データを色補正装置100の補正データ記憶部160へ登録することにより、複数種の色補正に用いられる各補正データを色補正装置100に設定する(ステップS106)。   Then, the correction data setting unit 15 registers the first correction data calculated in step S104 and the second correction data calculated in step S105 in the correction data storage unit 160 of the color correction apparatus 100, so that a plurality of correction data are set. Each correction data used for the color correction of the seed is set in the color correction apparatus 100 (step S106).

その後、分離条件設定部16は、第1のサンプル画像上の第1の領域に含まれる各画素の色成分が色空間上で点在する座標の分布を楕円に近似することにより得られた色空間上の楕円領域を分離条件として算出する(ステップS107)。   Thereafter, the separation condition setting unit 16 obtains a color obtained by approximating an ellipse with a coordinate distribution in which the color components of each pixel included in the first region on the first sample image are scattered in the color space. An elliptical area in the space is calculated as a separation condition (step S107).

その上で、分離条件設定部16は、ステップS107で算出された分離条件を色補正装置100の分離条件記憶部140へ登録することにより、分離条件を色補正装置100に設定し(ステップS108)、処理を終了する。   After that, the separation condition setting unit 16 registers the separation condition calculated in step S107 in the separation condition storage unit 140 of the color correction device 100, thereby setting the separation condition in the color correction device 100 (step S108). The process is terminated.

なお、図6に示したフローチャートでは、ステップS104の処理が実行された後にステップS105の処理が実行される場合を例示したが、これらの処理は逆の順番で実行することもできるし、並行して実行することもできる。また、図6に示したフローチャートでは、ステップS104〜ステップS106の処理が実行された後にステップS107〜ステップS108の処理が実行される場合を例示したが、これらの処理も逆の順番で実行することもできるし、並行して実行することもできる。   In the flowchart shown in FIG. 6, the case where the process of step S105 is executed after the process of step S104 is illustrated, but these processes can be executed in the reverse order or in parallel. Can also be executed. Further, in the flowchart shown in FIG. 6, the case where the processing of Step S107 to Step S108 is executed after the processing of Step S104 to Step S106 is illustrated, but these processing are also executed in the reverse order. You can also run in parallel.

(2)第1の補正データの算出処理
図7は、実施例1に係る第1の補正データの算出処理の手順を示すフローチャートである。この処理は、図6に示したステップS104の処理に対応する処理であり、ステップS103の処理の実行後に起動される。
(2) First Correction Data Calculation Processing FIG. 7 is a flowchart illustrating a procedure of first correction data calculation processing according to the first embodiment. This process is a process corresponding to the process in step S104 shown in FIG. 6, and is started after the process in step S103 is executed.

図7に示すように、補正データ設定部15は、ステップS103でRGB空間からYUV空間へ変換された第1のサンプル画像のうち、ステップS102で特定された第1の領域に含まれる各画素の間で色差の平均値をU成分およびV成分ごとに算出する(ステップS201)。   As illustrated in FIG. 7, the correction data setting unit 15 includes the first sample image converted from the RGB space to the YUV space in step S103, for each pixel included in the first region specified in step S102. The average value of the color difference is calculated for each U component and V component (step S201).

同様に、補正データ設定部15は、ステップS103でRGB空間からYUV空間へ変換された第2のサンプル画像のうち、ステップS102で特定された第1の領域に含まれる各画素の間で色差の平均値をU成分およびV成分ごとに算出する(ステップS202)。   Similarly, the correction data setting unit 15 of the second sample image converted from the RGB space to the YUV space in step S103 determines the color difference between the pixels included in the first region specified in step S102. The average value is calculated for each U component and V component (step S202).

その上で、補正データ設定部15は、ステップS201で第1のサンプル画像から算出された色差の平均値の座標と、ステップS202で第2のサンプル画像から算出された色差の平均値の座標との距離を算出することによりシフト量をU成分およびV成分ごとに算出する(ステップS203)。   Then, the correction data setting unit 15 determines the average color difference coordinates calculated from the first sample image in step S201 and the average color difference coordinates calculated from the second sample image in step S202. Is calculated for each U component and V component (step S203).

また、補正データ設定部15は、ステップS103でRGB空間からYUV空間へ変換された第1のサンプル画像のうち、ステップS102で特定された第1の領域に含まれる画素が持つ色差の分布の広がり度合をU成分及びV成分ごとに算出する(ステップS204)。   Further, the correction data setting unit 15 spreads the distribution of color differences of the pixels included in the first region specified in step S102 out of the first sample image converted from the RGB space to the YUV space in step S103. The degree is calculated for each U component and V component (step S204).

同様に、補正データ設定部15は、ステップS103でRGB空間からYUV空間へ変換された第2のサンプル画像のうち、ステップS102で特定された第1の領域に含まれる画素が持つ色差の分布の広がり度合をU成分及びV成分ごとに算出する(ステップS205)。   Similarly, the correction data setting unit 15 of the second sample image converted from the RGB space to the YUV space in step S103 has a color difference distribution of the pixels included in the first area specified in step S102. The degree of spread is calculated for each U component and V component (step S205).

その上で、補正データ設定部15は、ステップS204で第1のサンプル画像から算出された広がり度合と、ステップS205で第2のサンプル画像から算出された広がり度合との間で広がり度合の比をU成分およびV成分ごとに算出し(ステップS206)、処理を終了する。   In addition, the correction data setting unit 15 sets a ratio of the spread degree between the spread degree calculated from the first sample image in step S204 and the spread degree calculated from the second sample image in step S205. Calculation is performed for each of the U component and the V component (step S206), and the process ends.

これら一連の手順によって、シフト量Δu及びΔvと広がり度合の比σu_hi及びσv_hiとが第1の補正データとして算出されることになる。   Through these series of procedures, the shift amounts Δu and Δv and the spread degree ratios σu_hi and σv_hi are calculated as the first correction data.

なお、図7に示したフローチャートでは、ステップS201の処理が実行された後にステップS202の処理が実行される場合を例示したが、これらの処理は逆の順番で実行することもできるし、並行して実行することもできる。また、図7に示したフローチャートでは、ステップS204の処理が実行された後にステップS205の処理が実行される場合を例示したが、これらの処理は逆の順番で実行することもできるし、並行して実行することもできる。さらに、図7に示したフローチャートでは、ステップS201〜ステップS203の処理が実行された後にステップS204〜ステップS206の処理が実行される場合を例示したが、これらの処理も逆の順番で実行することもできるし、並行して実行することもできる。   In the flowchart shown in FIG. 7, the case where the process of step S202 is executed after the process of step S201 is illustrated, but these processes can be executed in the reverse order or in parallel. Can also be executed. In the flowchart shown in FIG. 7, the case where the process of step S <b> 205 is executed after the process of step S <b> 204 is illustrated, but these processes can be executed in the reverse order or in parallel. Can also be executed. Furthermore, in the flowchart shown in FIG. 7, the case where the processing of step S204 to step S206 is executed after the processing of step S201 to step S203 is illustrated, but these processing are also executed in the reverse order. You can also run in parallel.

(3)色補正処理
図8は、実施例1に係る色補正処理の手順を示すフローチャートである。この色補正処理は、一例として、色補正を実行する対象とする原画像が指定された場合に起動する。図8に示すように、色補正を実行する対象とする原画像が指定されると、取得部110により原画像が取得される(ステップS301)。続いて、変換部120は、ステップS301で取得された原画像のデータ形式を輝度と色度を含む空間で表現されるデータ形式へ変換する(ステップS302)。
(3) Color Correction Processing FIG. 8 is a flowchart illustrating the procedure of color correction processing according to the first embodiment. As an example, this color correction process is started when an original image to be subjected to color correction is designated. As shown in FIG. 8, when an original image to be subjected to color correction is designated, the acquisition unit 110 acquires the original image (step S301). Subsequently, the conversion unit 120 converts the data format of the original image acquired in step S301 into a data format expressed in a space including luminance and chromaticity (step S302).

そして、判定部130は、ステップS302で色空間へ変換された原画像に含まれる画素のうち画素を1つ選択する(ステップS303)。続いて、判定部130は、分離条件記憶部140に記憶された分離条件、すなわち上述の第1の領域に対応するUV平面上の楕円領域を参照して、ステップS303で原画像から選択された画素のUV成分がUV平面上で第1の領域に対応する楕円領域に含まれるか否かを判定する(ステップS304)。   Then, the determination unit 130 selects one of the pixels included in the original image converted into the color space in step S302 (step S303). Subsequently, the determination unit 130 is selected from the original image in step S303 with reference to the separation condition stored in the separation condition storage unit 140, that is, the elliptical region on the UV plane corresponding to the first region described above. It is determined whether or not the UV component of the pixel is included in an elliptical area corresponding to the first area on the UV plane (step S304).

ここで、画素のUV成分がUV平面上で第1の領域に対応する楕円領域に含まれる場合(ステップS304Yes)、当該画素が無彩色に近い色を持ち、かつ赤外光の受光量が多い画素であると推定できるので、上記の特定の被写体を形成する画素である公算が高まる。この場合、補正部150は、補正データ記憶部160に記憶された第1の補正データに定義されたシフト量Δu及びΔvと広がり度合の比σu_hi及びσv_hiとにしたがって当該画素のUV成分をUV平面上でシフトさせた後にRGB空間の画素値へ逆変換する色補正を実行する(ステップS305)。   Here, when the UV component of the pixel is included in an elliptical region corresponding to the first region on the UV plane (step S304 Yes), the pixel has a color close to an achromatic color and has a large amount of infrared light received. Since it can be estimated that it is a pixel, the probability that it is a pixel that forms the specific subject is increased. In this case, the correction unit 150 converts the UV component of the pixel into the UV plane according to the shift amounts Δu and Δv defined in the first correction data stored in the correction data storage unit 160 and the spread degree ratios σu_hi and σv_hi. After the above shift, color correction is performed to reversely convert the pixel values into the RGB space (step S305).

一方、画素のUV成分がUV平面上で第1の領域に対応する楕円領域に含まれない場合(ステップS304No)、補正部150は、次のような処理を行う。すなわち、補正部150は、補正データ記憶部160に記憶された第2の補正データ、すなわちマトリクス係数を参照して、当該画素が持つRGBの画素値に第2の補正データに定義されたマトリクス係数を乗算するマトリクス演算を実行する他の被写体用の色補正を行う(ステップS306)。   On the other hand, when the UV component of the pixel is not included in the elliptical area corresponding to the first area on the UV plane (step S304 No), the correction unit 150 performs the following process. That is, the correction unit 150 refers to the second correction data stored in the correction data storage unit 160, that is, the matrix coefficient, and the matrix coefficient defined in the second correction data to the RGB pixel value of the pixel. The color correction for another subject that executes the matrix operation for multiplying by is performed (step S306).

その後、原画像に含まれる全ての画素が選択されるまで(ステップS307No)、上記のステップS303〜ステップS306までの処理が繰り返し実行される。そして、原画像に含まれる全ての画素が選択されると(ステップS307Yes)、補正部150は、所定の出力先に対し、補正後の画像を出力し(ステップS308)、処理を終了する。   Thereafter, the processes from step S303 to step S306 are repeatedly executed until all the pixels included in the original image are selected (No in step S307). Then, when all the pixels included in the original image are selected (Yes in step S307), the correction unit 150 outputs the corrected image to a predetermined output destination (step S308), and ends the process.

なお、図8のフローチャートでは、原画像に含まれる画素がステップS303で選択された順番に色補正が行われる場合を例示したが、各画素に対する色補正は並列して実行できることは言うまでもない。   In the flowchart of FIG. 8, the case where color correction is performed in the order in which the pixels included in the original image are selected in step S303 is illustrated, but it goes without saying that the color correction for each pixel can be performed in parallel.

[効果の一側面]
上述してきたように、本実施例に係る色補正システム1は、可視光及び赤外光の波長の光を含んで撮像された画像のうち赤外光の分光反射率が高い特定の被写体に対応する画素の色成分を当該被写体の色が色空間上で分布する範囲よりも広範囲へばらつかせてシフトさせる。このように、植物の葉や化学繊維の布などの特定の被写体に色補正が行われた場合に当該特定の被写体の色が色空間上で局所的な領域に集中することを抑制する。この結果、特定の被写体の色が可視光の下で認識される色と類似する色に補正されると共に、実物のように同色の分類であってもその中で互いが広がりを持つ色に補正される。したがって、色の再現性を高めることが可能になる。
[One aspect of effect]
As described above, the color correction system 1 according to the present embodiment corresponds to a specific subject having a high spectral reflectance of infrared light among images captured including light having wavelengths of visible light and infrared light. The color component of the pixel to be shifted is shifted over a wider range than the range in which the color of the subject is distributed in the color space. In this way, when color correction is performed on a specific subject such as a plant leaf or a chemical fiber cloth, the color of the specific subject is prevented from being concentrated in a local area on the color space. As a result, the color of a specific subject is corrected to a color that is similar to the color recognized under visible light, and even if it is classified as the same color as the real thing, it is corrected to a color in which each other has a spread. Is done. Therefore, it becomes possible to improve color reproducibility.

さて、これまで開示の装置に関する実施例について説明したが、本発明は上述した実施例以外にも、種々の異なる形態にて実施されてよいものである。そこで、以下では、本発明に含まれる他の実施例を説明する。   Although the embodiments related to the disclosed apparatus have been described above, the present invention may be implemented in various different forms other than the above-described embodiments. Therefore, another embodiment included in the present invention will be described below.

[入力画像]
上記の実施例1では、可視光および赤外光の波長に対応する光が撮像素子に結像される撮影形態の一例として、赤外線カットフィルタが装着されない状態で撮影される画像が入力される場合を例示したが、画像の撮影形態はこれに限定されない。例えば、可視光領域および使用する赤外の波長領域の帯域幅を透過する光学フィルタが挿入された状態で撮影される画像を第1のサンプル画像とし、図6に示した設定処理を適用することもできるし、当該画像を原画像とし、図7に示した色補正処理を適用することもできる。
[Input image]
In the first embodiment, as an example of a photographing form in which light corresponding to the wavelengths of visible light and infrared light is imaged on the image sensor, an image photographed without an infrared cut filter is input However, the image capturing mode is not limited to this. For example, an image photographed with an optical filter that transmits the visible light region and the bandwidth of the infrared wavelength region to be used is inserted as the first sample image, and the setting process shown in FIG. 6 is applied. It is also possible to use the image as an original image and apply the color correction processing shown in FIG.

[色補正のブレンド]
上記の実施例1では、画素のUV成分がUV平面上で第1の領域に対応する楕円領域に含まれるか否かによって2種類の色補正が排他的に実施される場合を例示したが、2種類の色補正を混合することもできる。例えば、色補正装置100は、画素が持つ色成分が楕円領域に含まれる場合に、下記の式(3)を用いて、色のシフト補正及びマトリクス演算による色補正をブレンドできる。
[Color Correction Blend]
In the first embodiment, the case where the two types of color correction are performed exclusively depending on whether the UV component of the pixel is included in the elliptical region corresponding to the first region on the UV plane is exemplified. Two types of color correction can also be mixed. For example, when the color component of a pixel is included in an elliptical area, the color correction apparatus 100 can blend color shift correction and color correction by matrix calculation using the following equation (3).

RGB=r’g’b’×w1+rgb×(1-w1)・・・式(3)   RGB = r′g’b ′ × w1 + rgb × (1-w1) (3)

上記の式(3)に示す「r’」、「g’」及び「b’」は、色のシフト補正後のRGBの値であり、上記の式(3)に示す「r」、「g」及び「b」は、マトリクス演算による色補正後のRGBの値である。また、上記の式(3)に示す「w1」は、画素が特定の被写体である確率を指し、例えば、0≦w1≦1の任意の値を設定できる。これによって、例えば、画素が特定の被写体である確率が高くなるにしたがって色のシフト補正の割合を高くし、画素が特定の被写体である確率が低くなるにしたがって、マトリクス演算による色補正の割合を高くして色補正をブレンドできる。なお、ここでは、RGB空間でブレンド処理を実行する場合を例示したが、ブレンド処理の適用範囲はRGB空間の画像に留まらず、その他の色空間、例えばYUVあるいはL*a*b等でブレンド処理を実行した後にRGBに変換してもかまわない。   “R ′”, “g ′”, and “b ′” shown in the above equation (3) are RGB values after color shift correction, and “r”, “g” shown in the above equation (3). "And" b "are RGB values after color correction by matrix calculation. Also, “w1” shown in the above equation (3) indicates the probability that the pixel is a specific subject, and for example, an arbitrary value of 0 ≦ w1 ≦ 1 can be set. Thus, for example, the rate of color shift correction is increased as the probability that a pixel is a specific subject increases, and the rate of color correction by matrix calculation is increased as the probability that a pixel is a specific subject is decreased. You can increase the color correction blend. Here, the case where the blend process is executed in the RGB space is illustrated, but the application range of the blend process is not limited to the image in the RGB space, and the blend process is performed in another color space such as YUV or L * a * b. It is also possible to convert to RGB after executing.

[3次元への拡張]
上記の実施例1では、色差U及び色差Vの2次元のUV平面でシフトさせる場合を例示したが、適用範囲が2次元の平面上でのシフトに限定されない。例えば、色補正システム1では、輝度Y、色差U及び色差Vの3次元の色空間上で原画像に含まれる画素の色をシフトさせることもできる。
[Extension to 3D]
In the first embodiment, the case where the color difference U and the color difference V are shifted on the two-dimensional UV plane is exemplified, but the application range is not limited to the shift on the two-dimensional plane. For example, in the color correction system 1, the colors of the pixels included in the original image can be shifted in a three-dimensional color space of luminance Y, color difference U, and color difference V.

具体的には、設定装置10は、図7に示したステップS201の処理及びステップS202の処理でU成分の平均値およびV成分の平均値と共にY成分の平均値をさらに算出する。その上で、設定装置10は、ステップS203の処理で第1のサンプル画像から算出された輝度Yの平均値の座標と、第2のサンプル画像から算出された輝度Yの平均値の座標との距離を算出することにより、輝度Yに関するシフト量Δyをさらに算出する。さらに、設定装置10は、ステップS204の処理及びステップS205の処理でU成分の広がり度合およびV成分の広がり度合と共にY成分の広がり度合をさらに算出する。その上で、設定装置10は、ステップS206の処理で第1のサンプル画像から算出された輝度Yの広がり度合と、第2のサンプル画像から算出された輝度Yの広がり度合との間で輝度Yの広がり度合の比σy_hiを算出する。これら一連の手順によって、シフト量Δu、Δv及びΔyと広がり度合の比σu_hi、σv_hi及びσy_hiとが第1の補正データとして色補正装置100へ設定されることになる。   Specifically, the setting device 10 further calculates the average value of the Y component together with the average value of the U component and the average value of the V component in the process of step S201 and the process of step S202 illustrated in FIG. After that, the setting device 10 calculates the coordinates of the average value of the luminance Y calculated from the first sample image in the process of step S203 and the coordinates of the average value of the luminance Y calculated from the second sample image. By calculating the distance, the shift amount Δy related to the luminance Y is further calculated. Further, the setting device 10 further calculates the spread degree of the Y component together with the spread degree of the U component and the spread degree of the V component in the process of step S204 and the process of step S205. In addition, the setting device 10 determines that the luminance Y is between the spread degree of the luminance Y calculated from the first sample image and the spread degree of the luminance Y calculated from the second sample image in the process of step S206. The ratio σy_hi of the extent of spread is calculated. Through these series of procedures, the shift amounts Δu, Δv and Δy and the spread degree ratios σu_hi, σv_hi and σy_hi are set in the color correction apparatus 100 as the first correction data.

このような設定の下、色補正装置100は、図8に示したステップS303で選択された画素が持つU成分の値を上記の式(1)へ代入すると共に同画素が持つV成分の値を上記の式(2)へ代入し、さらに、同画素が持つY成分の値を下記式(4)へ代入することにより、当該画素の色成分を3次元空間上でシフトさせる。   Under such settings, the color correction apparatus 100 substitutes the value of the U component of the pixel selected in step S303 shown in FIG. 8 into the above equation (1) and the value of the V component of the pixel. Is substituted into the above equation (2), and further, the value of the Y component of the pixel is substituted into the following equation (4), thereby shifting the color component of the pixel in the three-dimensional space.

y_o=y_in+Δy+(y_in-y_in平均)*σy_hi・・・式(4)   y_o = y_in + Δy + (y_in-y_in average) * σy_hi (4)

図9は、YUV空間における色の分布の一例を示す図である。図5に示すグラフには、輝度Y、色差V及び色差Uの3軸が示されている。図9には、第1のサンプル画像上の第1の領域に含まれる画素が持つ色成分の分布がYUV空間上に円のマークでプロットされる一方で、第2のサンプル画像上の第1の領域に含まれる画素が持つ色成分の分布がYUV空間上に菱形のマークでプロットされている。さらに、図9には、第1のサンプル画像に含まれる画素のうち第1の領域に含まれる各画素の色が色空間上で点在する座標の分布が楕円球に近似された楕円球91と、第2のサンプル画像に含まれる画素のうち第1の領域に含まれる各画素の色が色空間上で点在する座標の分布が楕円球に近似された楕円球92とが示されている。   FIG. 9 is a diagram illustrating an example of a color distribution in the YUV space. In the graph shown in FIG. 5, three axes of luminance Y, color difference V, and color difference U are shown. In FIG. 9, the distribution of the color components of the pixels included in the first region on the first sample image is plotted with a circle mark on the YUV space, while the first on the second sample image is plotted. The distribution of the color components of the pixels included in the area is plotted with rhombus marks on the YUV space. Further, FIG. 9 shows an elliptic sphere 91 in which the distribution of coordinates in which the color of each pixel included in the first region among the pixels included in the first sample image is scattered in the color space is approximated to an elliptic sphere. And an elliptical sphere 92 in which the distribution of coordinates in which the colors of the pixels included in the first region among the pixels included in the second sample image are scattered in the color space is approximated to an elliptical sphere. Yes.

図5に示す通り、シフト量Δy及び広がり度合の比σy_hiをさらに用いて色補正を行う場合、原画像に含まれる画素のうちUV平面の楕円領域51に含まれる画素の色成分が当該楕円球91よりも広範囲な楕円球92へシフトされる。この際、可視光の波長に対応する光に加えて赤外光の波長に対応する光も受光されることにより増加する輝度も加味して色のシフト補正を行うことができる。よって、色の再現性の更なる向上が可能になる。   As shown in FIG. 5, when color correction is further performed using the shift amount Δy and the spread degree ratio σy_hi, the color components of the pixels included in the elliptical region 51 of the UV plane among the pixels included in the original image are the elliptical spheres. Shifted to an elliptical sphere 92 wider than 91. At this time, color shift correction can be performed in consideration of luminance that increases by receiving light corresponding to the wavelength of infrared light in addition to light corresponding to the wavelength of visible light. Therefore, the color reproducibility can be further improved.

[広がり方向]
上記の実施例1では、色補正を行う場合に広がり度合の比を用いる場合を例示したが、かかる広がり度合の比と共に広がり方向の差もさらに第1の補正データとして設定し、色補正に活用できる。
[Spreading direction]
In the first embodiment, the ratio of the spread degree is used when performing the color correction. However, the spread direction difference and the difference in the spread direction are further set as the first correction data and used for the color correction. it can.

すなわち、第1のサンプル画像に含まれる画素のうち第1の領域に含まれる各画素の色が色空間上で点在する座標の分布が楕円に近似される楕円領域と、第2のサンプル画像に含まれる画素のうち第1の領域に含まれる各画素の色が色空間上で点在する座標の分布が楕円に近似される楕円領域との間で、互いの短軸及び長軸により規定される方向が一致するとは限らない。   That is, among the pixels included in the first sample image, an elliptical region in which the distribution of coordinates in which the color of each pixel included in the first region is scattered in the color space is approximated to an ellipse, and the second sample image Stipulated by the mutual short axis and long axis between the ellipse area in which the distribution of coordinates in which the color of each pixel included in the first area is scattered in the color space is approximated to an ellipse. The directions are not necessarily the same.

このことから、設定装置10は、第1のサンプル画像から定義される楕円領域と、第2のサンプル画像から定義される楕円領域との間で互いの短軸及び長軸により規定される方向の相対角度を求める。その上で、設定装置10は、先の相対角度を広がり方向の差Δθとして第1の補正データへ加えることができる。このような第1の補正データの設定の下、色補正装置100は、シフト量Δu及びΔvにしたがって画素の色成分を移動させると共に広がり度合の比σu_hi及びσv_hiにしたがって画素の色成分の移動を拡大し、さらに、広がり方向の差ΔθにしたがってUV平面上で画素の色成分を回転させる。このように広がり方向の差が加味される場合、シフト後の色成分が実物に近づく結果、色の再現性をさらに高めることが可能になる。   From this, the setting device 10 has an elliptical area defined from the first sample image and an elliptical area defined from the second sample image in the direction defined by the short axis and the long axis. Find the relative angle. In addition, the setting device 10 can add the above relative angle as the difference Δθ in the spreading direction to the first correction data. Under such setting of the first correction data, the color correction apparatus 100 moves the color component of the pixel according to the shift amounts Δu and Δv and moves the color component of the pixel according to the spread degree ratios σu_hi and σv_hi. In addition, the color component of the pixel is rotated on the UV plane according to the difference Δθ in the spreading direction. When the difference in the spread direction is taken into account in this way, the color reproducibility can be further improved as a result of the color component after the shift approaching the real thing.

[移動変換行列]
本実施例では、シフト量Δu及びΔvと、広がり度合の比σu_hi及びσv_hiと、広がり方向の差Δθとの3つの補正量を設定して色のシフト補正を行う場合を例示したが、これら3つの補正量が加味された移動変換行列を求め、当該移動変換行列を第1の補正データとして設定することもできる。
[Movement transformation matrix]
In this embodiment, the case where the color shift correction is performed by setting three correction amounts of the shift amounts Δu and Δv, the spread degree ratios σu_hi and σv_hi, and the spread direction difference Δθ is illustrated. It is also possible to obtain a movement conversion matrix including one correction amount and set the movement conversion matrix as the first correction data.

例えば、第1のサンプル画像上の第1の領域に含まれる画素の個数がnであるとしたとき、第1のサンプル画像上の第1の領域に含まれるn個の画素が持つU成分及びV成分は、下記の式(5)に示す通り、2次元のベクトルデータAとして表すことができる。この場合、第2のサンプル画像上の第1の領域に含まれる画素の個数もnであるので、第2のサンプル画像上の第1の領域に含まれるn個の画素が持つU成分及びV成分は、下記の式(6)に示す通り、2次元のベクトルデータBとして表すことができる。   For example, when the number of pixels included in the first region on the first sample image is n, the U component of n pixels included in the first region on the first sample image and The V component can be expressed as two-dimensional vector data A as shown in the following formula (5). In this case, since the number of pixels included in the first region on the second sample image is also n, the U component and V included in the n pixels included in the first region on the second sample image. The component can be expressed as two-dimensional vector data B as shown in the following equation (6).

このうち、2次元のベクトルデータAに含まれるn個の画素に関するU成分及びV成分ごとの平均値は、下記の式(7)で表すことができ、かかる式(7)を用いて、2次元のベクトルデータAの共分散行列Σは、下記の式(9)で表すことができる。一方、2次元のベクトルデータBに含まれるn個の画素に関するU成分及びV成分ごとの平均値は、下記の式(8)で表すことができ、かかる式(8)を用いて、2次元のベクトルデータBの共分散行列Σは、下記の式(10)で表すことができる。 Among these, the average value for each of the U component and the V component regarding n pixels included in the two-dimensional vector data A can be expressed by the following equation (7). covariance matrix sigma a vector data a dimension can be expressed by the following equation (9). On the other hand, the average value for each of the U component and the V component regarding n pixels included in the two-dimensional vector data B can be expressed by the following equation (8). The covariance matrix Σ b of the vector data B can be expressed by the following equation (10).

この場合、2次元のベクトルデータAの固有値D及び固有ベクトルVは、数値解析ソフトウェア等で固有値及び固有ベクトルを算出するのに使用される関数eigを用いて、下記の式(11)の通りに算出できる。同様に、2次元のベクトルデータBの固有値D及び固有ベクトルVは、関数eigを用いて、下記の式(12)の通りに算出できる。なお、ここでは、固有値及び固有ベクトルの算出に関数eigを用いる場合を例示したが、他の関数を用いることとしてもかまわない。 In this case, the eigenvalue D a and eigenvector V a of the two-dimensional vector data A are expressed by the following equation (11) using a function eig used for calculating eigenvalues and eigenvectors by numerical analysis software or the like. It can be calculated. Similarly, the eigenvalues D b and eigenvectors V b of the two-dimensional vector data B, using function eig, can be calculated according to Equation (12) below. Although the case where the function eig is used for the calculation of the eigenvalue and the eigenvector is illustrated here, other functions may be used.

このように2次元のベクトルデータAの固有値D及び固有ベクトルVが算出された後、2次元のベクトルデータAの移動変換行列Aoutは、下記の式(13)の通りに算出される。また、2次元のベクトルデータBの移動変換行列Boutは、下記の式(14)の通りに算出される。その後、補正行列outは、移動変換行列Aout及び移動変換行列Boutの比から下記の式(15)の通りに求まる。 After the eigenvalue D a and the eigenvector V a of the two-dimensional vector data A are calculated in this way, the movement transformation matrix A out of the two-dimensional vector data A is calculated as the following equation (13). Further, the movement transformation matrix B out of the two-dimensional vector data B is calculated as in the following equation (14). Thereafter, the correction matrix out is obtained from the ratio of the movement conversion matrix A out and the movement conversion matrix B out according to the following equation (15).

out=Bout/Aout・・・式(15) out = B out / A out (15)

このような補正行列outが第1の補正データとして設定された場合、色補正装置100は、原画像のうち第1の領域に対応する楕円領域に含まれる画素に関する2次元のベクトルデータinを入力とし、上記の補正行列outとの間でベクトル演算を行うことにより、上記の「広がり方向」の項で説明した、広がり方向を用いる色補正と同等の色の再現性を得ることができる。   When such a correction matrix out is set as the first correction data, the color correction apparatus 100 inputs the two-dimensional vector data in related to the pixels included in the elliptical area corresponding to the first area in the original image. By performing vector calculation with the correction matrix out, it is possible to obtain a color reproducibility equivalent to the color correction using the spread direction described in the above “spread direction” section.

図10A及び図10Bは、UV平面上における色の分布の一例を示す図である。図10A及び図10Bに示すグラフの縦軸は、色差Vを指し、横軸は、色差Uを指す。図10Aには、2次元のベクトルデータAの分布が円のマークでプロットされる一方で、2次元のベクトルデータBの分布がUV平面上に三角のマーク「△」でプロットされている。さらに、図10Bには、2次元のベクトルデータAの分布が円のマークでプロットされる一方で、上記の2次元のベクトルデータA及び補正行列outの演算結果、すなわち補正後の2次元のベクトルデータの分布がUV平面上に逆三角のマーク「▽」でプロットされている。   10A and 10B are diagrams illustrating an example of a color distribution on the UV plane. 10A and 10B, the vertical axis indicates the color difference V, and the horizontal axis indicates the color difference U. In FIG. 10A, the distribution of the two-dimensional vector data A is plotted with a circle mark, while the distribution of the two-dimensional vector data B is plotted with a triangular mark “Δ” on the UV plane. Further, in FIG. 10B, while the distribution of the two-dimensional vector data A is plotted with a circle mark, the calculation result of the two-dimensional vector data A and the correction matrix out, that is, the corrected two-dimensional vector The distribution of data is plotted with an inverted triangle mark “▽” on the UV plane.

図10A及び図10Bに示すように、目標とする2次元のベクトルデータBの分布と、補正後の2次元のベクトルデータの分布とは、互いが近似していると言える。このため、補正行列outを用いて2次元のベクトルデータinの色補正を行う場合でも、上記の「広がり方向」の項で説明した、広がり方向を用いる色補正と同等の色の再現性を得ることができると推定できる。なお、ここでは、2次元のベクトルデータとする場合を例示したが、輝度Yをさらに含めて3次元のベクトルデータとして拡張し、補正行列outの設定、補正行列outを用いる色補正を行うこともできる。   As shown in FIGS. 10A and 10B, it can be said that the distribution of the target two-dimensional vector data B and the corrected distribution of the two-dimensional vector data are close to each other. For this reason, even when color correction of the two-dimensional vector data in is performed using the correction matrix out, color reproducibility equivalent to the color correction using the spread direction described in the above-mentioned “spread direction” is obtained. Can be estimated. Note that, here, the case of using two-dimensional vector data is illustrated, but the luminance Y may be further expanded as three-dimensional vector data to set the correction matrix out and perform color correction using the correction matrix out. it can.

[環境条件]
上記の実施例1では、第1の補正データとして、シフト量Δu及びΔvと、広がり度合の比σu_hi及びσv_hiとを1つ例示したが、画像が撮影される環境に関する条件ごとにシフト量Δu、シフト量Δv、広がり度合の比σu_hi及び広がり度合の比σv_hiなどの補正量を設定することもできる。
[Environmental condition]
In the first embodiment, the shift amounts Δu and Δv and the spread degree ratios σu_hi and σv_hi are exemplified as the first correction data, but the shift amounts Δu, Correction amounts such as a shift amount Δv, a spread degree ratio σu_hi, and a spread degree ratio σv_hi can also be set.

図11は、第1の補正データの一例を示す図である。図11には、環境条件の一例として、カメラの撮像範囲で計測される照度ごとに補正量が対応付けられた第1の補正データが示されている。図11の例で言えば、原画像を撮像するカメラの撮像範囲で計測される照度が照度1に対応する照度の範囲に含まれる場合、シフト量1及び広がり度合の比1が色補正に用いられる。また、原画像を撮像するカメラの撮像範囲で計測される照度が照度2に対応する照度の範囲に含まれる場合、シフト量2及び広がり度合の比2が色補正に用いられる。また、原画像を撮像するカメラの撮像範囲で計測される照度が照度3に対応する照度の範囲に含まれる場合、シフト量3及び広がり度合の比3が色補正に用いられる。これによって、カメラの撮像範囲で計測される照度の多寡に合わせて色補正に用いる補正量を変更することができる。なお、図11には、環境条件の一例として、照度を例示したが、環境条件はこれに限定されず、原画像が撮影される時間帯、センシングまたはブラウジングにより取得可能な天気の種類などを環境条件とすることもできる。   FIG. 11 is a diagram illustrating an example of the first correction data. FIG. 11 shows, as an example of the environmental condition, first correction data in which a correction amount is associated with each illuminance measured in the imaging range of the camera. In the example of FIG. 11, when the illuminance measured in the imaging range of the camera that captures the original image is included in the illuminance range corresponding to illuminance 1, the shift amount 1 and the spread degree ratio 1 are used for color correction. It is done. When the illuminance measured in the imaging range of the camera that captures the original image is included in the illuminance range corresponding to the illuminance 2, the shift amount 2 and the spread degree ratio 2 are used for color correction. When the illuminance measured in the imaging range of the camera that captures the original image is included in the illuminance range corresponding to the illuminance 3, the shift amount 3 and the spread degree ratio 3 are used for color correction. Accordingly, the correction amount used for color correction can be changed according to the amount of illuminance measured in the imaging range of the camera. In FIG. 11, the illuminance is illustrated as an example of the environmental condition. However, the environmental condition is not limited to this, and the environment such as the time zone when the original image is captured, the type of weather that can be acquired by sensing or browsing, and the like. It can also be a condition.

このように環境条件ごとに補正量が設定される場合、図8に示した処理の手順の一部を変更し、図12に示す手順で色補正処理を実行すればよい。図12は、実施例2に係る色補正処理の手順を示すフローチャートである。図12には、図8に示した処理と同一の手順については同一のステップ番号が付与されている。図12に示すように、図8に示したステップS301の処理が実行された後に、色補正装置100は、環境条件を検出する(ステップS401)。例えば、環境条件が照度である場合、カメラ周辺に設けられた照度センサから照度を取得すればよい。続いて、色補正装置100は、補正データ記憶部160に第1の補正データとして記憶された補正量のうちステップS401で検出された環境条件に対応する補正量を取得する(ステップS402)。かかるステップS402の処理によりステップS305の色補正に用いる補正量が取得された後には、図8に示したステップS302〜ステップS308の処理を実行すればよい。   When the correction amount is set for each environmental condition in this way, a part of the processing procedure shown in FIG. 8 may be changed, and the color correction processing may be executed according to the procedure shown in FIG. FIG. 12 is a flowchart illustrating a procedure of color correction processing according to the second embodiment. In FIG. 12, the same step number is assigned to the same procedure as the process shown in FIG. As shown in FIG. 12, after the process of step S301 shown in FIG. 8 is executed, the color correction apparatus 100 detects an environmental condition (step S401). For example, when the environmental condition is illuminance, the illuminance may be acquired from an illuminance sensor provided around the camera. Subsequently, the color correction apparatus 100 acquires a correction amount corresponding to the environmental condition detected in step S401 among the correction amounts stored as the first correction data in the correction data storage unit 160 (step S402). After the correction amount used for the color correction in step S305 is acquired by the processing in step S402, the processing in steps S302 to S308 shown in FIG. 8 may be executed.

[分散および統合]
また、図示した各装置の各構成要素は、必ずしも物理的に図示の如く構成されておらずともよい。すなわち、各装置の分散・統合の具体的形態は図示のものに限られず、その全部または一部を、各種の負荷や使用状況などに応じて、任意の単位で機能的または物理的に分散・統合して構成することができる。例えば、取得部110、変換部120、判定部130または補正部150を色補正装置100の外部装置としてネットワーク経由で接続するようにしてもよい。また、取得部110、変換部120、判定部130または補正部150を別の装置がそれぞれ有し、ネットワーク接続されて協働することで、上記の色補正装置100の機能を実現するようにしてもよい。
[Distribution and integration]
In addition, each component of each illustrated apparatus does not necessarily have to be physically configured as illustrated. In other words, the specific form of distribution / integration of each device is not limited to that shown in the figure, and all or a part thereof may be functionally or physically distributed or arbitrarily distributed in arbitrary units according to various loads or usage conditions. Can be integrated and configured. For example, the acquisition unit 110, the conversion unit 120, the determination unit 130, or the correction unit 150 may be connected as an external device of the color correction apparatus 100 via a network. In addition, another device has the acquisition unit 110, the conversion unit 120, the determination unit 130, or the correction unit 150, and the functions of the color correction device 100 described above are realized by cooperation through a network connection. Also good.

[色補正プログラム]
また、上記の実施例で説明した各種の処理は、予め用意されたプログラムをパーソナルコンピュータやワークステーションなどのコンピュータで実行することによって実現することができる。そこで、以下では、図13を用いて、上記の実施例と同様の機能を有する色補正プログラムを実行するコンピュータの一例について説明する。
[Color correction program]
The various processes described in the above embodiments can be realized by executing a prepared program on a computer such as a personal computer or a workstation. In the following, an example of a computer that executes a color correction program having the same function as that of the above embodiment will be described with reference to FIG.

図13は、実施例1及び実施例2に係る色補正プログラムを実行するコンピュータのハードウェア構成例を示す図である。図13に示すように、コンピュータ1000は、操作部1100aと、スピーカ1100bと、カメラ1100cと、ディスプレイ1200と、通信部1300とを有する。さらに、このコンピュータ1000は、CPU1500と、ROM1600と、HDD1700と、RAM1800とを有する。これら1100〜1800の各部はバス1400を介して接続される。   FIG. 13 is a diagram illustrating a hardware configuration example of a computer that executes a color correction program according to the first and second embodiments. As illustrated in FIG. 13, the computer 1000 includes an operation unit 1100 a, a speaker 1100 b, a camera 1100 c, a display 1200, and a communication unit 1300. Further, the computer 1000 includes a CPU 1500, a ROM 1600, an HDD 1700, and a RAM 1800. These units 1100 to 1800 are connected via a bus 1400.

HDD1700には、図13に示すように、上記の実施例1で示した取得部110、変換部120、判定部130及び補正部150と同様の機能を発揮する色補正プログラム1700aが記憶される。この色補正プログラム1700aは、図1に示した取得部110、変換部120、判定部130及び補正部150の各構成要素と同様、統合又は分離してもかまわない。すなわち、HDD1700には、必ずしも上記の実施例1で示した全てのデータが格納されずともよく、処理に用いるデータがHDD1700に格納されればよい。   As illustrated in FIG. 13, the HDD 1700 stores a color correction program 1700 a that exhibits the same functions as those of the acquisition unit 110, the conversion unit 120, the determination unit 130, and the correction unit 150 described in the first embodiment. The color correction program 1700a may be integrated or separated as with the components of the acquisition unit 110, the conversion unit 120, the determination unit 130, and the correction unit 150 illustrated in FIG. In other words, the HDD 1700 does not necessarily store all the data shown in the first embodiment, and the HDD 1700 may store data used for processing.

このような環境の下、CPU1500は、HDD1700から色補正プログラム1700aを読み出した上でRAM1800へ展開する。この結果、色補正プログラム1700aは、図13に示すように、色補正プロセス1800aとして機能する。この色補正プロセス1800aは、RAM1800が有する記憶領域のうち色補正プロセス1800aに割り当てられた領域にHDD1700から読み出した各種データを展開し、この展開した各種データを用いて各種の処理を実行する。例えば、色補正プロセス1800aが実行する処理の一例として、図8や図12に示す処理や実施例2で説明した処理などが含まれる。なお、CPU1500では、必ずしも上記の実施例1で示した全ての処理部が動作せずともよく、実行対象とする処理に対応する処理部が仮想的に実現されればよい。   Under such an environment, the CPU 1500 reads the color correction program 1700a from the HDD 1700 and develops it in the RAM 1800. As a result, the color correction program 1700a functions as a color correction process 1800a as shown in FIG. The color correction process 1800a expands various data read from the HDD 1700 in an area allocated to the color correction process 1800a in the storage area of the RAM 1800, and executes various processes using the expanded data. For example, as an example of processing executed by the color correction process 1800a, the processing shown in FIGS. 8 and 12, the processing described in the second embodiment, and the like are included. Note that the CPU 1500 does not necessarily operate all the processing units described in the first embodiment, and it is only necessary to virtually realize a processing unit corresponding to a process to be executed.

なお、上記の色補正プログラム1700aは、必ずしも最初からHDD1700やROM1600に記憶されておらずともかまわない。例えば、コンピュータ1000に挿入されるフレキシブルディスク、いわゆるFD、CD−ROM、DVDディスク、光磁気ディスク、ICカードなどの「可搬用の物理媒体」に色補正プログラム1700aを記憶させる。そして、コンピュータ1000がこれらの可搬用の物理媒体から色補正プログラム1700aを取得して実行するようにしてもよい。また、公衆回線、インターネット、LAN、WANなどを介してコンピュータ1000に接続される他のコンピュータまたはサーバ装置などに色補正プログラム1700aを記憶させておき、コンピュータ1000がこれらから色補正プログラム1700aを取得して実行するようにしてもよい。   Note that the color correction program 1700a is not necessarily stored in the HDD 1700 or the ROM 1600 from the beginning. For example, the color correction program 1700a is stored in a “portable physical medium” such as a flexible disk inserted into the computer 1000, so-called FD, CD-ROM, DVD disk, magneto-optical disk, IC card or the like. The computer 1000 may acquire and execute the color correction program 1700a from these portable physical media. In addition, the color correction program 1700a is stored in another computer or server device connected to the computer 1000 via a public line, the Internet, a LAN, a WAN, etc., and the computer 1000 acquires the color correction program 1700a from these. May be executed.

1 色補正システム
10 設定装置
11 第1取得部
12 第2取得部
13 特定部
14 変換部
15 補正データ設定部
16 分離条件設定部
100 色補正装置
110 取得部
120 変換部
130 判定部
140 分離条件記憶部
150 補正部
160 補正データ記憶部
DESCRIPTION OF SYMBOLS 1 Color correction system 10 Setting apparatus 11 1st acquisition part 12 2nd acquisition part 13 Specification part 14 Conversion part 15 Correction data setting part 16 Separation condition setting part 100 Color correction apparatus 110 Acquisition part 120 Conversion part 130 Determination part 140 Separation condition memory | storage 150 correction unit 160 correction data storage unit

Claims (5)

コンピュータに、
画像を取得する処理と、
画像を輝度及び色度を含む色空間の成分へ変換する処理と、
前記色空間の成分へ変換された画像に含まれる画素が赤外光の分光反射率が可視光の分光反射率よりも高い被写体に対応する画素であるか否かを判定する処理と、
前記被写体が可視光および赤外光の波長に対応する光を受光する状態で撮像された第1のサンプル画像と、前記被写体が可視光の波長に対応する光を受光する状態で撮像された第2のサンプル画像との間で前記被写体に対応する画素の色度の分布に関する距離及び広がり度合の比が対応付けられた補正データにしたがって、前記被写体に対応する画素の色成分を色空間上でシフトする色補正を実行する処理と
を実行させることを特徴とする色補正プログラム。
On the computer,
Processing to acquire images,
A process of converting an image into a component of a color space including luminance and chromaticity;
A process of determining whether or not a pixel included in the image converted into the color space component is a pixel corresponding to a subject having a spectral reflectance of infrared light higher than that of visible light;
A first sample image captured in a state where the subject receives light corresponding to wavelengths of visible light and infrared light, and a first sample image captured in a state where the subject receives light corresponding to the wavelength of visible light. The color component of the pixel corresponding to the subject is represented on the color space according to the correction data in which the ratio of the distance and spread degree relating to the chromaticity distribution of the pixel corresponding to the subject is correlated with the two sample images. A color correction program that executes a process of executing color correction for shifting.
前記補正データには、前記第1のサンプル画像及び前記第2のサンプル画像の間で前記被写体に対応する画素の輝度の分布に関する距離及び広がり度合の比がさらに対応付けられるものであって、
前記色補正を実行する処理は、前記補正データにしたがって、前記被写体に対応する画素の輝度成分及び色度成分を色空間上でシフトする色補正を実行することを特徴とする請求項1に記載の色補正プログラム。
The correction data is further associated with a ratio of a distance and a spread degree regarding a luminance distribution of pixels corresponding to the subject between the first sample image and the second sample image,
The process for executing the color correction performs color correction for shifting a luminance component and a chromaticity component of a pixel corresponding to the subject in a color space according to the correction data. Color correction program.
前記補正データには、前記第1のサンプル画像及び前記第2のサンプル画像の間で前記被写体に対応する画素の色度の分布に関する広がり方向の差がさらに対応付けられるものであって、
前記色補正を実行する処理は、前記補正データに含まれる広がり方向の差にしたがって、前記被写体に対応する画素の色成分を色空間上で回転させる色補正をさらに実行することを特徴とする請求項1または2に記載の色補正プログラム。
The correction data is further associated with a difference in spreading direction regarding the distribution of chromaticity of pixels corresponding to the subject between the first sample image and the second sample image,
The process for executing the color correction further executes color correction for rotating a color component of a pixel corresponding to the subject in a color space in accordance with a difference in spread direction included in the correction data. Item 3. A color correction program according to item 1 or 2.
コンピュータが、
画像を取得する処理と、
画像を輝度及び色度を含む色空間の成分へ変換する処理と、
前記色空間の成分へ変換された画像に含まれる画素が赤外光の分光反射率が可視光の分光反射率よりも高い被写体に対応する画素であるか否かを判定する処理と、
前記被写体が可視光および赤外光の波長に対応する光を受光する状態で撮像された第1のサンプル画像と、前記被写体が可視光の波長に対応する光を受光する状態で撮像された第2のサンプル画像との間で前記被写体に対応する画素の色度の分布に関する距離及び広がり度合の比が対応付けられた補正データにしたがって、前記被写体に対応する画素の色成分を色空間上でシフトする色補正を実行する処理と
を実行することを特徴とする色補正方法。
Computer
Processing to acquire images,
A process of converting an image into a component of a color space including luminance and chromaticity;
A process of determining whether or not a pixel included in the image converted into the color space component is a pixel corresponding to a subject having a spectral reflectance of infrared light higher than that of visible light;
A first sample image captured in a state where the subject receives light corresponding to wavelengths of visible light and infrared light, and a first sample image captured in a state where the subject receives light corresponding to the wavelength of visible light. The color component of the pixel corresponding to the subject is represented on the color space according to the correction data in which the ratio of the distance and spread degree relating to the chromaticity distribution of the pixel corresponding to the subject is correlated with the two sample images. A color correction method comprising: performing a process of performing color correction for shifting.
赤外光の分光反射率が可視光の分光反射率よりも高い被写体が可視光および赤外光の波長に対応する光を受光する状態で撮像された第1のサンプル画像と、前記被写体が可視光の波長に対応する光を受光する状態で撮像された第2のサンプル画像との間で前記被写体に対応する画素の色度の分布に関する距離及び広がり度合の比が対応付けられた補正データを記憶する記憶部と、
画像を取得する取得部と、
画像を輝度及び色度を含む色空間の成分へ変換する変換部と、
前記色空間の成分へ変換された画像に含まれる画素が赤外光の分光反射率が可視光の分光反射率よりも高い被写体に対応する画素であるか否かを判定する判定部と、
前記補正データにしたがって前記被写体に対応する画素の色成分を色空間上でシフトする色補正を実行する補正部と
を有することを特徴とする色補正装置。
A first sample image captured in a state in which a subject having a spectral reflectance of infrared light higher than that of visible light receives light corresponding to wavelengths of visible light and infrared light, and the subject is visible Correction data in which a ratio of a distance and a spread degree relating to a chromaticity distribution of a pixel corresponding to the subject is associated with a second sample image captured in a state of receiving light corresponding to a wavelength of light. A storage unit for storing;
An acquisition unit for acquiring images;
A conversion unit for converting an image into a component of a color space including luminance and chromaticity;
A determination unit that determines whether a pixel included in the image converted into the color space component is a pixel corresponding to a subject whose spectral reflectance of infrared light is higher than that of visible light;
A color correction apparatus comprising: a correction unit that performs color correction for shifting a color component of a pixel corresponding to the subject in a color space according to the correction data.
JP2015133081A 2015-07-01 2015-07-01 Color correction program, color correction method and color correction apparatus Active JP6531522B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2015133081A JP6531522B2 (en) 2015-07-01 2015-07-01 Color correction program, color correction method and color correction apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2015133081A JP6531522B2 (en) 2015-07-01 2015-07-01 Color correction program, color correction method and color correction apparatus

Publications (2)

Publication Number Publication Date
JP2017017564A true JP2017017564A (en) 2017-01-19
JP6531522B2 JP6531522B2 (en) 2019-06-19

Family

ID=57831235

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2015133081A Active JP6531522B2 (en) 2015-07-01 2015-07-01 Color correction program, color correction method and color correction apparatus

Country Status (1)

Country Link
JP (1) JP6531522B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018152804A (en) * 2017-03-15 2018-09-27 株式会社朋栄 Optimum color matching processing method and image processing apparatus

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006013582A (en) * 2004-06-22 2006-01-12 Mitsubishi Electric Corp Imaging apparatus and signal processing method thereof
JP2007214933A (en) * 2006-02-10 2007-08-23 Fujifilm Corp Color image pickup device and its control method
US20100165110A1 (en) * 2008-12-25 2010-07-01 Kyocera Corporation Image Pickup Apparatus, Imaging Method and Method for Correcting Infrared Light
JP2013128259A (en) * 2011-12-19 2013-06-27 Fujitsu Ltd Imaging apparatus, image processing apparatus, image processing program, and image processing method
JP2014200045A (en) * 2013-03-29 2014-10-23 富士通株式会社 Correction data generation device, correction data generation program, and color correction device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006013582A (en) * 2004-06-22 2006-01-12 Mitsubishi Electric Corp Imaging apparatus and signal processing method thereof
JP2007214933A (en) * 2006-02-10 2007-08-23 Fujifilm Corp Color image pickup device and its control method
US20100165110A1 (en) * 2008-12-25 2010-07-01 Kyocera Corporation Image Pickup Apparatus, Imaging Method and Method for Correcting Infrared Light
JP2013128259A (en) * 2011-12-19 2013-06-27 Fujitsu Ltd Imaging apparatus, image processing apparatus, image processing program, and image processing method
JP2014200045A (en) * 2013-03-29 2014-10-23 富士通株式会社 Correction data generation device, correction data generation program, and color correction device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018152804A (en) * 2017-03-15 2018-09-27 株式会社朋栄 Optimum color matching processing method and image processing apparatus

Also Published As

Publication number Publication date
JP6531522B2 (en) 2019-06-19

Similar Documents

Publication Publication Date Title
US11798147B2 (en) Image processing method and device
US9858680B2 (en) Image processing device and imaging apparatus
US20140240477A1 (en) Multi-spectral imaging system for shadow detection and attenuation
US9135726B2 (en) Image generation apparatus, image generation method, and recording medium
CN107871309B (en) Detection method, detection device, and recording medium
KR102383129B1 (en) Method for correcting image based on category and recognition rate of objects included image and electronic device for the same
US10929961B2 (en) Electronic device and method for correcting images using external electronic device
KR20200072393A (en) Apparatus and method for determining image sharpness
US11563889B2 (en) Electronic device and method for controlling camera using external electronic device
WO2022160895A1 (en) Image processing method, image processing apparatus, electronic system and readable storage medium
WO2015145917A1 (en) Image-correcting device, image correction method, and program-recording medium
JP6157165B2 (en) Gaze detection device and imaging device
CN112767291A (en) Visible light image and infrared image fusion method and device and readable storage medium
WO2010116478A1 (en) Image processing device, image processing method, and image processing program
CN112040202A (en) Scene recognition method, device and storage medium
JP6398860B2 (en) Color correction apparatus, color correction method, and color correction program
CN108399617B (en) Method and device for detecting animal health condition
JP6977483B2 (en) Image processing equipment, image processing methods, image processing systems and programs
EP3695340B1 (en) Method and system for face detection
WO2016113805A1 (en) Image processing method, image processing apparatus, image pickup apparatus, program, and storage medium
JP6531522B2 (en) Color correction program, color correction method and color correction apparatus
US20180302536A1 (en) Image processing apparatus and control method thereof
CN111160063B (en) Internet of things IPC two-dimensional code distribution network image enhancement method and system
TW202101385A (en) Skin tone image gamut weight detecting method and device thereof
JP6094333B2 (en) Correction data generation apparatus, correction data generation program, and color correction apparatus

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20180306

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20190118

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20190219

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20190411

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20190506

R150 Certificate of patent or registration of utility model

Ref document number: 6531522

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150