JP2009182845A - Apparatus and method for processing image - Google Patents

Apparatus and method for processing image Download PDF

Info

Publication number
JP2009182845A
JP2009182845A JP2008021394A JP2008021394A JP2009182845A JP 2009182845 A JP2009182845 A JP 2009182845A JP 2008021394 A JP2008021394 A JP 2008021394A JP 2008021394 A JP2008021394 A JP 2008021394A JP 2009182845 A JP2009182845 A JP 2009182845A
Authority
JP
Japan
Prior art keywords
spectral
imaging
matrix
spectral radiance
subject
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2008021394A
Other languages
Japanese (ja)
Inventor
Koichi Sugiyama
晃一 杉山
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.)
Sharp Corp
Original Assignee
Sharp Corp
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 Sharp Corp filed Critical Sharp Corp
Priority to JP2008021394A priority Critical patent/JP2009182845A/en
Priority to PCT/JP2009/050453 priority patent/WO2009096232A1/en
Publication of JP2009182845A publication Critical patent/JP2009182845A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide an apparatus for processing an image and a method for processing the image, capable of easily calculating spectral radiant intensity of a light illuminated to a shooting object, using an imaging apparatus for imaging the shooting object. <P>SOLUTION: An estimation matrix calculator 12 calculates a first estimation matrix W<SP>(1)</SP>, on the basis of the autocorrelation matrix B of the spectral radiant intensity of a light source to be used to provide an illuminating environment in the shooting object, the spectral transmission factor f<SP>(1)</SP>of a diffusing member, and the spectral sensitivity S of the imaging apparatus. A spectral radiant intensity calculator 11 calculates the spectral radiant intensity E<SP>(1)</SP>of the illuminating light incident to the shooting object OBJ from imaging data g<SP>(1)</SP><SB>RGB</SB>, using the first estimation matrix W<SP>(1)</SP>calculated by the estimation matrix calculator 12. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

本発明は、被写体を撮像する際の当該被写体に照射される照明光の分光放射輝度を算出可能な画像処理装置および画像処理方法に関するものである。   The present invention relates to an image processing apparatus and an image processing method capable of calculating the spectral radiance of illumination light applied to a subject when the subject is imaged.

近年、様々な照明環境下において撮像された被写体の色を、表示装置や印刷装置などの出力装置において、正確に再現するための技術が提案されている。   In recent years, techniques have been proposed for accurately reproducing the color of a subject imaged under various lighting environments in an output device such as a display device or a printing device.

代表的な技術として、被写体の分光反射率(反射スペクトル)に基づくカラーマネジメント技術が知られている。この技術は、被写体の色を波長領域で扱うことで実現され、被写体における照明環境にかかわらず正確な色再現が可能となる。このような被写体の分光反射率に基づいた撮像処理については、非特許文献1にその原理的な方法が開示されている。   As a representative technique, a color management technique based on the spectral reflectance (reflection spectrum) of a subject is known. This technique is realized by handling the color of the subject in the wavelength region, and enables accurate color reproduction regardless of the illumination environment of the subject. A non-patent document 1 discloses a principle method for such imaging processing based on the spectral reflectance of the subject.

ところで、被写体の分光反射率を推定するためには、その前提となる撮像時の照明環境下における分光放射輝度(照明スペクトル)を予め取得しておく必要がある。なぜならば、被写体からの分光放射輝度は、照明光の分光放射輝度および被写体の分光反射率に応じて定まるため、照明光の分光放射輝度が既知でなければ、被写体を撮像して得られる撮像データに基づいて、被写体の分光反射率を正確に算出できないからである。   By the way, in order to estimate the spectral reflectance of the subject, it is necessary to obtain in advance the spectral radiance (illumination spectrum) under the illumination environment at the time of imaging, which is the premise. This is because the spectral radiance from the subject is determined according to the spectral radiance of the illumination light and the spectral reflectance of the subject, so if the spectral radiance of the illumination light is not known, image data obtained by imaging the subject This is because the spectral reflectance of the subject cannot be accurately calculated based on the above.

また、照明光の分光放射輝度は、撮像装置のホワイトバランス調整などにも用いられる。このホワイトバランス調整とは、撮像装置を構成する複数の撮像素子から出力される輝度値のレベルを互いに調整するための係数を決定する作業である。ホワイトバランスが崩れると、白色の被写体を撮像装置によって撮像した場合に、本来の白色とは異なった色(たとえば、赤味を帯びた色など)が出力されるなど、正確に色再現を行なうことができない。なお、ホワイトバランス調整については、特許文献1や特許文献2に開示されている。
特開2001−057680号公報 特開2005−328386号公報 三宅洋一編、「分光画像処理入門」、財団法人東京大学出版会、2006年2月24日
The spectral radiance of the illumination light is also used for white balance adjustment of the imaging device. This white balance adjustment is an operation for determining a coefficient for mutually adjusting the levels of luminance values output from a plurality of image sensors constituting the imaging apparatus. When white balance is lost, when a white subject is imaged by an imaging device, a color that is different from the original white (for example, a reddish color) is output, and color reproduction is performed accurately. I can't. Note that white balance adjustment is disclosed in Patent Literature 1 and Patent Literature 2.
JP 2001-057680 A JP 2005-328386 A Yoichi Miyake, “Introduction to Spectral Image Processing”, The University of Tokyo Press, February 24, 2006

従来、照明光の分光放射輝度は、もっぱら分光放射計といった専用の測定装置を用いて測定されていた。分光放射計とは、光学系を通じて入射した光を回折格子(グレーティング)によって分光し、イメージセンサ(CCD(Charge Coupled Device)やCMOS(Complementary Metal Oxide Semiconductor)などが用いられる)にて受光し、波長毎の輝度値を取得する装置である。上述したようなカラーマネジメント技術を実現しようとすると、スチルカメラやビデオカメラといった撮像装置の他に、分光放射輝度を測定するための測定装置が必要となり、実現コストが高くなるという課題があった。   Conventionally, the spectral radiance of illumination light has been measured exclusively using a dedicated measuring device such as a spectroradiometer. A spectroradiometer is a system in which light incident through an optical system is dispersed by a diffraction grating (grating) and received by an image sensor (such as a charge coupled device (CCD) or complementary metal oxide semiconductor (CMOS)). It is a device that acquires the brightness value of each. If it is going to implement | achieve the color management techniques as mentioned above, in addition to an imaging device such as a still camera or a video camera, a measuring device for measuring spectral radiance is required, and there is a problem that the realization cost increases.

また、通常、被写体に照射される照明光を測定するためには、分光反射率が既知である標準白色板を被写体付近に設置し、その板面からの反射光を分光放射計によって測定する必要があり、撮像だけでなく、測定のための手間がかかるという課題があった。   Normally, in order to measure the illumination light irradiated to the subject, it is necessary to install a standard white plate with a known spectral reflectance near the subject and measure the reflected light from the plate surface with a spectroradiometer. There is a problem that it takes time and effort for measurement as well as imaging.

そこで、この発明は、かかる課題を解決するためになされたものであり、その目的は、被写体を撮像するための撮像装置を用いて、当該被写体に照射されている照明光の分光放射輝度を容易に算出可能な画像処理装置および画像処理方法を提供することである。   Accordingly, the present invention has been made to solve such a problem, and an object of the present invention is to easily reduce the spectral radiance of illumination light applied to the subject using an imaging device for imaging the subject. It is to provide an image processing apparatus and an image processing method that can be calculated.

この発明のある局面に従えば、撮像装置によって撮像された撮像データに対する画像処理が可能な画像処理装置を提供する。画像処理装置は、撮像装置を用いて、照明環境下において被写体に入射する光の少なくとも一部を拡散部材を介して撮像することで得られた第1撮像データを、受入れる入力手段と、照明環境を提供するために用いられ得る光源の分光放射輝度の自己相関行列と、拡散部材の分光透過率と、撮像装置の分光感度と、に基づいて算出される第1推定行列を用いて、第1撮像データから被写体に入射する照明光の分光放射輝度を算出する第1算出手段とを含む。   According to an aspect of the present invention, an image processing apparatus capable of performing image processing on imaging data captured by an imaging apparatus is provided. An image processing device uses an imaging device to receive first imaging data obtained by imaging at least a part of light incident on a subject under a lighting environment through a diffusing member, and an input environment that receives the first imaging data. The first estimation matrix calculated based on the autocorrelation matrix of the spectral radiance of the light source, the spectral transmittance of the diffusing member, and the spectral sensitivity of the imaging device that can be used to provide the first First calculating means for calculating the spectral radiance of the illumination light incident on the subject from the imaging data.

好ましくは、光源の分光放射輝度は、光源の種類毎に予め取得された特性値である。
好ましくは、拡散部材は、撮像装置の光軸上に配置され、拡散部材の入射強度は、光軸に対する角度についての所定の関数値で示される。
Preferably, the spectral radiance of the light source is a characteristic value acquired in advance for each type of light source.
Preferably, the diffusing member is disposed on the optical axis of the imaging device, and the incident intensity of the diffusing member is represented by a predetermined function value with respect to an angle with respect to the optical axis.

さらに好ましくは、関数値は、光軸に対する角度についての余弦関数である。
好ましくは、撮像装置は、撮像データとして、RGB表色系において定義される座標値を出力するように構成される。画像処理装置は、照明光の分光放射輝度と等色関数とを用いて、照明光の分光放射輝度に対応するRGB表色系における座標値を算出する第2算出手段と、第2算出手段において算出された座標値の比に基づいて、撮像装置におけるホワイトバランスを算出する第3算出手段とをさらに含む。
More preferably, the function value is a cosine function with respect to an angle with respect to the optical axis.
Preferably, the imaging device is configured to output coordinate values defined in the RGB color system as imaging data. The image processing apparatus includes: a second calculation unit that calculates a coordinate value in the RGB color system corresponding to the spectral radiance of the illumination light using the spectral radiance of the illumination light and the color matching function; And third calculating means for calculating white balance in the imaging apparatus based on the ratio of the calculated coordinate values.

好ましくは、照明光の分光放射輝度と、撮像装置の分光感度と、被写体に含まれ得る色の分光反射率の自己相関行列と、に基づいて算出される第2推定行列を用いて、照明環境下において撮像装置により被写体を撮像することで得られる第2撮像データから被写体の分光反射率を算出する第4算出手段をさらに含む。   Preferably, using the second estimation matrix calculated based on the spectral radiance of the illumination light, the spectral sensitivity of the imaging device, and the autocorrelation matrix of the spectral reflectance of colors that can be included in the subject, the illumination environment The apparatus further includes fourth calculation means for calculating the spectral reflectance of the subject from the second imaging data obtained by imaging the subject with the imaging device below.

さらに好ましくは、第4算出手段によって算出された被写体の分光反射率に基づいて、被写体を所定の照明環境下において撮像した場合に取得される画像データを生成する生成手段をさらに含む。   More preferably, the image processing apparatus further includes a generating unit that generates image data acquired when the subject is imaged under a predetermined illumination environment based on the spectral reflectance of the subject calculated by the fourth calculating unit.

この発明の別の局面に従う画像処理方法は、撮像装置を用いて、照明環境下において被写体に入射する光の少なくとも一部を拡散部材を介して撮像することで第1撮像データを取得するステップと、演算装置が、照明環境を提供するために用いられ得る光源の分光放射輝度の自己相関行列と、拡散部材の分光透過率と、撮像装置の分光感度と、に基づいて算出される第1推定行列を用いて、第1撮像データから被写体に入射する照明光の分光放射輝度を算出するステップとを含む。   An image processing method according to another aspect of the present invention includes a step of acquiring first imaging data by imaging at least a part of light incident on a subject under a lighting environment through a diffusing member using an imaging device. The first estimation is calculated based on the autocorrelation matrix of the spectral radiance of the light source, the spectral transmittance of the diffusing member, and the spectral sensitivity of the imaging device, which can be used by the arithmetic device to provide an illumination environment. Calculating a spectral radiance of illumination light incident on the subject from the first imaging data using a matrix.

この発明によれば、被写体を撮像するための撮像装置を用いて、当該被写体に照射されている照明光の分光放射輝度を容易に算出できる。   According to the present invention, it is possible to easily calculate the spectral radiance of the illumination light applied to the subject using the imaging device for imaging the subject.

この発明の実施の形態について、図面を参照しながら詳細に説明する。なお、図中の同一または相当部分については、同一符号を付してその説明は繰返さない。   Embodiments of the present invention will be described in detail with reference to the drawings. Note that the same or corresponding parts in the drawings are denoted by the same reference numerals and description thereof will not be repeated.

[実施の形態1]
<全体構成>
図1は、この発明の実施の形態1に従う画像処理装置1の機能構成図である。
[Embodiment 1]
<Overall configuration>
FIG. 1 is a functional configuration diagram of an image processing apparatus 1 according to the first embodiment of the present invention.

図1を参照して、画像処理装置1は、後述する撮像装置によって撮像された第1撮像データg(1) RGB(m,n)および第2撮像データg(2) RGB(m,n)に対して、本発明に係る画像処理方法を実行可能である。 Referring to FIG. 1, the image processing apparatus 1 includes first imaging data g (1) RGB (m, n) and second imaging data g (2) RGB (m, n) captured by an imaging apparatus described later. On the other hand, the image processing method according to the present invention can be executed.

より具体的には、画像処理装置1は、照明スペクトル推定部100と、色再現部200とを含む。照明スペクトル推定部100は、第1撮像データg(1) RGB(m,n)を用いて、被写体に入射する照明光の分光放射輝度E(1)(照明スペクトル)を算出する。続いて、色再現部200が、算出された分光放射輝度E(1)を用いて、第2撮像データg(2) RGB(m,n)から被写体の分光反射率を算出する。さらに、色再現部200は、この算出した被写体の分光反射率に基づいて、被写体の色再現を行なった画像データg(OUT) RGB(m,n)を出力する。この色再現部200から出力される画像データg(OUT) RGB(m,n)は、代表的に表示装置(ディスプレイ)や印刷装置(プリンタ)などの図示しない出力装置へ出力される。あるいは、図示しない記憶装置などに格納されてもよい。 More specifically, the image processing apparatus 1 includes an illumination spectrum estimation unit 100 and a color reproduction unit 200. The illumination spectrum estimation unit 100 calculates the spectral radiance E (1) (illumination spectrum) of the illumination light incident on the subject using the first imaging data g (1) RGB (m, n). Subsequently, the color reproduction unit 200 calculates the spectral reflectance of the subject from the second imaging data g (2) RGB (m, n) using the calculated spectral radiance E (1) . Furthermore, the color reproduction unit 200 outputs image data g (OUT) RGB (m, n) obtained by performing color reproduction of the subject based on the calculated spectral reflectance of the subject. The image data g (OUT) RGB (m, n) output from the color reproduction unit 200 is typically output to an output device (not shown) such as a display device (display) or a printing device (printer). Alternatively, it may be stored in a storage device (not shown).

なお、画像処理装置1は、代表的に、ハードウェアによって実現されるが、後述するように、その一部または全部をソフトウェアによって実現してもよい。   The image processing apparatus 1 is typically realized by hardware, but a part or all of the image processing apparatus 1 may be realized by software, as will be described later.

<撮像データの取得>
図2は、この発明の実施の形態1に従う画像処理装置1において処理対象となる撮像データの取得方法を説明するための図である。なお、図2には、所定の照明環境下において、被写体OBJを撮像する場合を示す。図2(a)は、第1撮像データg(1) RGB(m,n)を取得する手順を示し、図2(b)は、第2撮像データg(2) RGB(m,n)の取得する手順を示す。
<Acquisition of imaging data>
FIG. 2 is a diagram for describing a method for acquiring imaging data to be processed in image processing apparatus 1 according to the first embodiment of the present invention. FIG. 2 shows a case where the subject OBJ is imaged under a predetermined illumination environment. FIG. 2A shows a procedure for acquiring the first imaging data g (1) RGB (m, n), and FIG. 2B shows the second imaging data g (2) RGB (m, n). The procedure to acquire is shown.

まず、撮像データの取得(撮像)には、撮像装置400が用いられる。この撮像装置400は、一例として、デジタルスチルカメラやデジタルビデオカメラであり、特定の波長帯域における分光感度特性をもつ撮像素子(代表的に、CCD(Charge Coupled Device)やCMOS(Complementary Metal Oxide Semiconductor)など)を含んで構成される。撮像素子は、行列状に配置された複数の画素を含み、各画素に入射する光の強度に応じた輝度を撮像データとして出力する。このとき、各撮像素子から出力される輝度は、その分光感度に応じた値となる。撮像装置が撮像可能な特定の波長帯域のことをバンドと呼び、本実施の形態では、代表的に、主としてR(赤),G(緑),B(青)の分光感度特性を有する3バンドの撮像装置400を用いる場合について説明する。なお、デバイス構造としては、同一の基板上に複数種類の撮像素子を形成した構造、あるいは複数の基板上にそれぞれ対応する1種類の撮像素子を形成した構造のいずれを採用することもできる。また、各バンドの分光感度特性を決定付ける方法としては、素子自体の分光感度を異ならせるようにしてもよいし、同じ分光感度を有する素子を用いて、各素子の入力光側にR,G,Bのフィルタを設けることで実現してもよい。   First, the imaging device 400 is used for acquisition (imaging) of imaging data. The imaging apparatus 400 is, for example, a digital still camera or a digital video camera, and has an imaging element having a spectral sensitivity characteristic in a specific wavelength band (typically a CCD (Charge Coupled Device) or a CMOS (Complementary Metal Oxide Semiconductor). Etc.). The imaging element includes a plurality of pixels arranged in a matrix, and outputs luminance corresponding to the intensity of light incident on each pixel as imaging data. At this time, the luminance output from each image sensor has a value corresponding to the spectral sensitivity. A specific wavelength band that can be imaged by the imaging apparatus is called a band. In the present embodiment, typically, three bands mainly having spectral sensitivity characteristics of R (red), G (green), and B (blue). A case of using the imaging device 400 will be described. As the device structure, either a structure in which a plurality of types of image sensors are formed on the same substrate or a structure in which a corresponding type of image sensor is formed on a plurality of substrates can be adopted. Further, as a method for determining the spectral sensitivity characteristics of each band, the spectral sensitivity of the element itself may be made different, or an element having the same spectral sensitivity is used, and R, G are input to the input light side of each element. , B may be provided.

上述のように、撮像装置400が出力する撮像データは、R,G,Bの各輝度値(代表的に、それぞれが12ビット:0〜4095階調)の3次元の色情報となる。このように、撮像装置400が出力する撮像データは、RGB表色系において定義される。以下、撮像データg(1) RGB(m,n),g(2) RGB(m,n)の(m,n)は、撮像装置400の各撮像素子での対応する画素の座標を表わす。すなわち、撮像データg(1)(m,n),g(2) RGB(m,n)=[(座標(m,n)におけるRの撮像素子で検出された輝度値),(座標(m,n)におけるGの撮像素子で検出された輝度値),(座標(m,n)におけるBの撮像素子で検出された輝度値)]となる。 As described above, the imaging data output by the imaging apparatus 400 is three-dimensional color information of R, G, and B luminance values (typically, each of 12 bits: 0 to 4095 gradations). As described above, the imaging data output by the imaging apparatus 400 is defined in the RGB color system. Hereinafter, (m, n) of the imaging data g (1) RGB (m, n), g (2) RGB (m, n) represents the coordinates of the corresponding pixel in each imaging element of the imaging device 400. That is, the imaging data g (1) (m, n), g (2) RGB (m, n) = [(the luminance value detected by the R imaging element at the coordinates (m, n)), (coordinate (m , N) the luminance value detected by the G image sensor, and (the luminance value detected by the B image sensor at the coordinates (m, n))].

図2(a)を参照して、被写体OBJには、任意の光源300が発する照明光が照射されているとする。このような光源300によって実現される照明環境下において、まず第1撮像データg(1) RGB(m,n)を取得する場合には、撮像装置400を用いて、光源300から被写体OBJに入射する光の少なくとも一部を拡散部材402を介して得られる光(すなわち、拡散部材402を透過した後の光)を撮像する。 Referring to FIG. 2A, it is assumed that illumination light emitted from an arbitrary light source 300 is irradiated on the subject OBJ. In the illumination environment realized by such a light source 300, when first imaging data g (1) RGB (m, n) is first acquired, the imaging device 400 is used to enter the subject OBJ from the light source 300. The light obtained through the diffusing member 402 (that is, the light after passing through the diffusing member 402) is imaged at least part of the light to be transmitted.

より具体的には、第1撮像データg(1) RGB(m,n)を取得する場合には、その光軸Ax1が被写体OBJに照明光が入射するいずれかの経路上になるように撮像装置400を配置する。さらに、この光軸Ax1上の撮像装置400と光源300との間(好ましくは、撮像装置400の直近)に拡散部材402が配置される。なお、被写体OBJに入射する照明光の経路には、光源300から被写体OBJに直接的に入射する経路、および光源300から壁材などで反射されて被写体OBJに間接的に入射する経路を含む。 More specifically, when the first imaging data g (1) RGB (m, n) is acquired, imaging is performed so that the optical axis Ax1 is on any path on which the illumination light enters the subject OBJ. A device 400 is arranged. Furthermore, a diffusing member 402 is disposed between the imaging device 400 and the light source 300 on this optical axis Ax1 (preferably in the immediate vicinity of the imaging device 400). The path of illumination light incident on the subject OBJ includes a path directly incident on the subject OBJ from the light source 300 and a path incident on the subject OBJ after being reflected from the light source 300 by a wall material or the like.

拡散部材402は、撮像装置400で撮像される光を空間的に拡散、すなわち空間的に平均化するための部材であり、代表的に既知の分光透過率をもつ乳白色の拡散板が用いられる。代替的に、積分球などを用いてもよい。このような拡散部材402を用いることで、撮像装置400に入射する照明光の強度分布を一様化でき、これによって、後述する照明光の分光放射輝度の推定精度を高めることができる。   The diffusing member 402 is a member for spatially diffusing the light imaged by the imaging device 400, that is, spatially averaging, and a milky white diffusing plate having a known spectral transmittance is typically used. Alternatively, an integrating sphere or the like may be used. By using such a diffusing member 402, the intensity distribution of the illumination light incident on the imaging device 400 can be made uniform, thereby increasing the estimation accuracy of the spectral radiance of the illumination light described later.

さらに、拡散部材402として乳白色の拡散板を用いる場合には、所定の入射角特性を有する拡散板(一般的に、コサインコレクタ、コサインディフューザ、コサインレセプタなどと称される。)を用いることが好ましい。このような拡散板では、拡散部材402を通過した後の光の入射強度が、撮像装置400の光軸Ax1に対する角度(立体角)についての余弦関数(コサイン)で示される。このような余弦関数の入射角特性をもつ拡散板を用いることで、何らの特別の演算を要することなく、単位面積当たりに入射する照明光のエネルギー量(分光放射照度)を反映した撮像データを取得できる。また、入射角特性をもたない拡散板を用いた場合には、外乱光を抑制するために、撮像装置400の視野角を相対的に小さくする必要があるが、このような入射角特性を有する拡散板を用いた場合には、撮像装置400の視野角を意識することなく、光源300からの照明光を撮像することもできる。   Further, when a milky white diffusion plate is used as the diffusion member 402, it is preferable to use a diffusion plate having a predetermined incident angle characteristic (generally referred to as a cosine collector, a cosine diffuser, a cosine receptor, or the like). . In such a diffusing plate, the incident intensity of light after passing through the diffusing member 402 is indicated by a cosine function (cosine) with respect to an angle (solid angle) with respect to the optical axis Ax1 of the imaging device 400. By using a diffusing plate having such an incident angle characteristic of a cosine function, imaging data reflecting the amount of illumination light energy (spectral irradiance) incident per unit area can be obtained without requiring any special calculation. You can get it. In addition, when a diffuser plate having no incident angle characteristic is used, it is necessary to relatively reduce the viewing angle of the imaging device 400 in order to suppress disturbance light. In the case of using the diffusing plate, the illumination light from the light source 300 can be imaged without being conscious of the viewing angle of the imaging device 400.

上述の手順に従って取得された第1撮像データg(1) RGB(m,n)は、照明環境下において被写体OBJに入射する照明光を反映した色情報を含むことになる。 The first imaging data g (1) RGB (m, n) acquired according to the above procedure includes color information reflecting illumination light incident on the subject OBJ under the illumination environment.

次に、図2(b)を参照して、第2撮像データg(2) RGB(m,n)は、図2(a)と同じ撮像装置400を用いて、被写体OBJを撮像することで生成される。このとき、撮像装置400の光軸Ax2上には、図2(a)の場合と異なり、拡散部材402が配置されることはない。なお、第1撮像データg(1) RGB(m,n)の取得に使用される撮像装置400と、第2撮像データg(2) RGB(m,n)の取得に使用される撮像装置400とは、必ずしも同一のものを用いる必要はなく、少なくとも撮像素子の分光感度が実質的に既知であれば、異なる撮像装置400を用いてもよい。 Next, referring to FIG. 2B, the second imaging data g (2) RGB (m, n) is obtained by imaging the subject OBJ using the same imaging apparatus 400 as in FIG. Generated. At this time, unlike the case of FIG. 2A, the diffusing member 402 is not disposed on the optical axis Ax2 of the imaging device 400. Note that the imaging device 400 used for acquiring the first imaging data g (1) RGB (m, n) and the imaging device 400 used for acquiring the second imaging data g (2) RGB (m, n). Are not necessarily the same, and different imaging devices 400 may be used as long as at least the spectral sensitivity of the imaging device is substantially known.

また、図2(a)において第1撮像データg(1) RGB(m,n)を撮像したときの撮像装置400の光軸Ax1と、図2(b)において第2撮像データg(2) RGB(m,n)を撮像するときの撮像装置400の光軸Ax2とは、互いに一致させることが好ましい。図2(b)において取得される第2撮像データg(2) RGB(m,n)は、主として、被写体OBJからの反射光によるものである。この反射光は、被写体OBJで反射されて光軸Ax2上を逆方向に伝搬する光であり、この反射光を生じる照明光は、主として、撮像装置400の光軸Ax2上を被写体OBJ側に向けて伝搬する。したがって、この反射光を生じる照明光を第1撮像データg(1) RGB(m,n)として撮像することで、より適切な照明光の分光放射輝度を算出することができる。 2A, the optical axis Ax1 of the imaging device 400 when imaging the first imaging data g (1) RGB (m, n), and the second imaging data g (2) in FIG. 2B. It is preferable to match the optical axis Ax2 of the imaging device 400 when imaging RGB (m, n). The second imaging data g (2) RGB (m, n) acquired in FIG. 2B is mainly due to the reflected light from the subject OBJ. This reflected light is reflected by the subject OBJ and propagates in the opposite direction on the optical axis Ax2, and the illumination light that generates this reflected light is mainly directed toward the subject OBJ on the optical axis Ax2 of the imaging device 400. Propagate. Therefore, by capturing the illumination light that generates the reflected light as the first imaging data g (1) RGB (m, n), a more appropriate spectral radiance of the illumination light can be calculated.

<照明光の分光放射輝度の算出処理>
再度、図1を参照して、照明スペクトル推定部100によって実行される、被写体に入射する照明光の分光放射輝度E(1)(照明スペクトル)の算出処理について説明する。なお、照明光の分光放射輝度E(1)は、本来、波長λについての連続関数になるはずであるが、本実施の形態では、分光放射輝度E(1)として、可視光領域(380〜780ナノメートル)について、所定の波長幅(1ナノメータ幅)でサンプリングした離散値を用いるものとする。以下に説明する行列演算の便宜上、本実施の形態に従う分光放射輝度E(1)は、波長λ=380,381,・・・,780の計401個の輝度値を含む401行×401列の行列とする。この分光放射輝度E(1)を示す行列では、その対角要素に各波長における輝度値がセットされるとともに、対角要素以外の要素にはゼロがセットされている。
<Calculation processing of spectral radiance of illumination light>
With reference to FIG. 1 again, the calculation process of the spectral radiance E (1) (illumination spectrum) of the illumination light incident on the subject executed by the illumination spectrum estimation unit 100 will be described. Note that the spectral radiance E (1) of the illumination light should originally be a continuous function with respect to the wavelength λ, but in this embodiment, the spectral radiance E (1) is the visible light region (380 to 380). For 780 nanometers), discrete values sampled with a predetermined wavelength width (1 nanometer width) shall be used. For the convenience of matrix operation described below, the spectral radiance E (1) according to the present embodiment is 401 rows × 401 columns including a total of 401 luminance values of wavelengths λ = 380, 381,. A matrix. In the matrix indicating the spectral radiance E (1) , the luminance value at each wavelength is set in the diagonal element, and zero is set in elements other than the diagonal element.

照明スペクトル推定部100は、入力部10と、分光放射輝度算出部11と、推定行列算出部12と、光源データ格納部13とを含む。   The illumination spectrum estimation unit 100 includes an input unit 10, a spectral radiance calculation unit 11, an estimation matrix calculation unit 12, and a light source data storage unit 13.

入力部10は、図2(a)に示すように、撮像装置400を用いて、照明環境下において被写体OBJに入射する光の少なくとも一部を拡散部材402を介して撮像することで得られた第1撮像データg(1) RGB(m,n)を受入れる。さらに、入力部10は、第1撮像データg(1) RGB(m,n)に基づいて、この第1撮像データg(1) RGB(m,n)を代表する撮像データg(1) RGBを出力する。この撮像データg(1) RGBは、R,G,Bの3つの輝度値(代表値)からなる線形化された色データである。一例として、入力部10は、第1撮像データg(1) RGB(m,n)に含まれる輝度値を平均化するための部位を含み、第1撮像データg(1) RGB(m,n)の各画素における輝度値をR,G,Bの別に平均し、この平均化した値(R,G,B)を撮像データg(1) RGBとして出力する。 As shown in FIG. 2A, the input unit 10 is obtained by imaging at least a part of light incident on the subject OBJ through the diffusing member 402 using the imaging device 400 in an illumination environment. First imaging data g (1) RGB (m, n) is received. Further, the input unit 10 based on the first image data g (1) RGB (m, n) , the first imaging data g (1) RGB (m, n) image pickup data g (1) representing the RGB Is output. The imaging data g (1) RGB is linearized color data composed of three luminance values (representative values) of R, G, and B. As an example, the input unit 10, the first imaging data g (1) RGB (m, n) includes a portion for averaging the luminance value included in the first imaging data g (1) RGB (m, n ) Is averaged separately for each of R, G, and B, and the averaged value (R, G, B) is output as imaging data g (1) RGB .

なお、第1撮像データg(1) RGB(m,n)に逆ガンマ特性(非線形性)が与えられている場合には、入力部10がこの逆ガンマ特性を打ち消すための処理を行なうことで、第1撮像データg(1) RGB(m,n)を線形化してもよい。一般的に、表示装置では、入力信号レベルと実際に表示される輝度レベルとの間は非線形な関係(ガンマ特性)を有している。このような表示装置における非線形性を打ち消して、人間の視覚に適応した画像が表示されるように、撮像装置400からは、当該表示装置のガンマ特性と逆の非線形性(逆ガンマ特性)をもつような撮像データが出力されることが多い。このように、撮像データに逆ガンマ特性が与えられている場合には、以後の処理を正確に実行できないので、たとえば入力部10がこのような逆ガンマ特性を打ち消して、線形化された第1撮像データg(1) RGB(m,n)を生成する。 If the first imaging data g (1) RGB (m, n) has an inverse gamma characteristic (non-linearity), the input unit 10 performs processing for canceling the inverse gamma characteristic. The first imaging data g (1) RGB (m, n) may be linearized. In general, a display device has a non-linear relationship (gamma characteristic) between an input signal level and an actually displayed luminance level. The imaging device 400 has a non-linearity (inverse gamma characteristic) opposite to the gamma characteristic of the display device so that an image adapted to human vision is displayed by canceling such non-linearity in the display device. Such imaging data is often output. As described above, when the inverse gamma characteristic is given to the imaging data, the subsequent processing cannot be executed accurately. For example, the input unit 10 cancels the inverse gamma characteristic and linearizes the first data. Imaging data g (1) RGB (m, n) is generated.

一般的にガンマ特性および逆ガンマ特性はべき乗の関数として表わすことができる。たとえば、撮像装置400における逆ガンマ値をγcとすると、以下のような演算式に従って、第1撮像データg(1) RGB(m,n)を線形化することができる。 In general, the gamma characteristic and the inverse gamma characteristic can be expressed as a power function. For example, when the inverse gamma value in the imaging apparatus 400 is γc, the first imaging data g (1) RGB (m, n) can be linearized according to the following arithmetic expression.

g’(1) RGB(m,n)=g(1) RGB(m,n)1/γc
また、このような線形化処理は、上述の撮像データg(1) RGBを算出するための平均化処理の実行前に行なう必要がある。一方で、撮像装置400を構成する撮像素子の画素サイズが相対的に大きければ、上述の線形化処理には膨大な演算量が必要となる。そのため、入力部10の演算処理能力が十分に高い場合には、上述のべき乗演算を直接的に実行してもよいが、演算処理能力に制限がある場合には、ルックアップテーブル(LUT:Look-Up Table)を用いることが有効である。このルックアップテーブルは、入力される撮像データが取り得るすべての輝度値の各々に対応付けて、上述の変換式の結果を予め格納したデータテーブルであり、この入力と出力との対応関係を参照するだけで変換後の値を取得できるので、演算量を大幅に低減できる。
g ′ (1) RGB (m, n) = g (1) RGB (m, n) 1 / γc
Further, such a linearization process needs to be performed before the execution of the averaging process for calculating the above-described imaging data g (1) RGB . On the other hand, if the pixel size of the image sensor that constitutes the image capturing apparatus 400 is relatively large, the above-described linearization process requires a huge amount of calculation. For this reason, when the arithmetic processing capability of the input unit 10 is sufficiently high, the power operation described above may be directly executed. However, when the arithmetic processing capability is limited, a lookup table (LUT: Lookup) is used. -Up Table) is effective. This lookup table is a data table in which the result of the above-described conversion formula is stored in advance in association with each of all the luminance values that can be taken by the input imaging data. Refer to the correspondence between this input and output. Since the converted value can be acquired simply by doing this, the amount of calculation can be greatly reduced.

分光放射輝度算出部11は、後述する推定行列算出部12で算出された第1推定行列W(1)を用いて、撮像データg(1) RGBから被写体OBJに入射する照明光の分光放射輝度E(1)を算出する。より具体的には、分光放射輝度算出部11は、第1推定行列W(1)と撮像データg(1) RGBとの行列積によって、照明光の分光放射輝度E(1)を算出する。上述したように、本実施の形態では、所定の波長幅(代表的に、1ナノメータ幅)でサンプリングした401行×401列の分光放射輝度E(1)を用いるので、第1推定行列W(1)は、波長成分数×撮像装置400のバンド数、すなわち401行×3列の行列となる。 The spectral radiance calculation unit 11 uses the first estimation matrix W (1) calculated by the estimation matrix calculation unit 12 to be described later, and the spectral radiance of illumination light incident on the subject OBJ from the imaging data g (1) RGB. E (1) is calculated. More specifically, the spectral radiance calculation unit 11 calculates the spectral radiance E (1) of the illumination light based on the matrix product of the first estimation matrix W (1) and the imaging data g (1) RGB . As described above, in the present embodiment, the spectral radiance E (1) of 401 rows × 401 columns sampled with a predetermined wavelength width (typically 1 nanometer width ) is used, so the first estimation matrix W ( 1) is the number of wavelength components × the number of bands of the imaging device 400, that is, a matrix of 401 rows × 3 columns.

推定行列算出部12は、被写体OBJにおける照明環境を提供するために用いられ得る光源の分光放射輝度の自己相関行列B、拡散部材402の分光透過率f(1)、撮像装置400の分光感度Sに基づいて、第1推定行列W(1)を算出する。以下、分光感度Sは401行×3列の行列、分光透過率f(1)は401行×3列の行列であるものとする。 The estimation matrix calculation unit 12 includes an autocorrelation matrix B of spectral radiance of a light source that can be used to provide an illumination environment in the subject OBJ, a spectral transmittance f (1) of the diffusing member 402, and a spectral sensitivity S of the imaging device 400. Based on, the first estimation matrix W (1) is calculated. Hereinafter, it is assumed that the spectral sensitivity S is a matrix of 401 rows × 3 columns, and the spectral transmittance f (1) is a matrix of 401 rows × 3 columns.

以下、第1撮像データg(1) RGB(m,n)から分光放射輝度E(1)を算出できる原理について説明する。 Hereinafter, the principle by which the spectral radiance E (1) can be calculated from the first imaging data g (1) RGB (m, n) will be described.

撮像装置400に入射する拡散部材402を通過した後の光(スペクトル)は、拡散部材402(あるいは、被写体OBJ)に照射される照明光の分光放射輝度E(1)(λ)と、拡散部材402の分光透過率f(1)(λ)との積に相当する。なお、拡散部材402の分光透過率f(1)(λ)は、拡散部材402の全体に亘って一定であるとする。そして、撮像装置400から出力される第1画像データを代表する撮像データg(1) RGBの各成分値g(1) (i=R,G,B)は、各撮像素子の分光感度S(λ)(i=R,G,B)をさらに乗じた上で、波長領域にわたって光エネルギーを積分したものに相当する。このような関係は、(1)式に示す関係式として表わすことができる。 The light (spectrum) that has passed through the diffusing member 402 incident on the imaging device 400 includes the spectral radiance E (1) (λ) of the illumination light applied to the diffusing member 402 (or the subject OBJ), and the diffusing member. This corresponds to the product of the spectral transmittance f (1) (λ) of 402. The spectral transmittance f (1) (λ) of the diffusing member 402 is assumed to be constant over the entire diffusing member 402. The imaging data g (1) RGB component values g (1) i (i = R, G, B) representing the first image data output from the imaging device 400 are the spectral sensitivities S of the imaging elements. This is equivalent to a product obtained by further multiplying i (λ) (i = R, G, B) and integrating the light energy over the wavelength region. Such a relationship can be expressed as a relational expression shown in Expression (1).

Figure 2009182845
Figure 2009182845

ここで、n(m,n)は、各撮像素子に現れる白色ノイズなどによって生じる加法性ノイズであり、撮像装置400の撮像素子やレンズの特性、および照明環境などに依存する値である。 Here, n i (m, n) is additive noise generated by white noise or the like appearing in each image sensor, and is a value depending on the characteristics of the image sensor and the lens of the imaging apparatus 400, the illumination environment, and the like.

上述したように、本実施の形態では、所定の波長幅(代表的に、1ナノメータ幅)でサンプリングした行列演算式を用いる。すなわち、(1)式の右辺第1項の積分式を、各撮像素子の各波長における感度を示す行列である分光感度Sと、各波長における放射輝度を示す行列である分光放射輝度E(1)と、各波長における透過率を示す行列である分光透過率f(1)との行列演算により実現する。なお、分光感度Sおよび分光透過率f(1)については既知である。 As described above, in the present embodiment, a matrix arithmetic expression sampled with a predetermined wavelength width (typically 1 nanometer width) is used. That is, the integral expression of the first term on the right side of the equation (1) is expressed by the spectral sensitivity S that is a matrix indicating the sensitivity at each wavelength of each image sensor and the spectral radiance E 1 that is a matrix indicating the radiance at each wavelength. ) And spectral transmittance f (1) which is a matrix indicating the transmittance at each wavelength. The spectral sensitivity S and the spectral transmittance f (1) are already known.

ここで、加法性ノイズn(m,n)は、一般的に十分に小さな値であるので、(1)式から無視すると、(1)式から次の行列演算式を導くことができる。 Here, the additive noise n i (m, n) is generally a sufficiently small value, and therefore, if ignored from the expression (1), the following matrix operation expression can be derived from the expression (1).

(1)=St・E(1)・f(1) ・・・(2)
この(2)式に基づいて、分光放射輝度E(1)を算出することを考える。具体的には、以下に示す(3)式に従って照明光の分光放射輝度E(1)を算出する。
g (1) = St · E (1) · f (1) ... (2)
Consider calculating the spectral radiance E (1) based on the equation (2). Specifically, the spectral radiance E (1) of the illumination light is calculated according to the following equation (3).

(1)=W(1)・g(1) ・・・(3)
(3)式において、W(1)は第1推定行列である。第1推定行列W(1)は、以下に説明するウィナー推定の手法によって算出される。具体的には、第1推定行列W(1)は、システム行列Iを以下に示す(4)式と定めた上で、(2)式を変形することで(5)式のように導出される。
f (1) = W (1) · g (1) (3)
In the equation (3), W (1) is a first estimation matrix. The first estimation matrix W (1) is calculated by the winner estimation method described below. Specifically, the first estimation matrix W (1) is derived as shown in equation (5) by modifying the equation (2) after defining the system matrix I as the following equation (4). The

I=St×f(1)t ・・・(4)
(1)=B・I・(I・B・I−1 ・・・(5)
但し、「×」は、行列要素同士の積を意味し、「」は、転置行列を意味し、「−1」は、逆行列を意味する。
I = S t × f (1) t (4)
W (1) = B · I t · (I · B · I t) -1 ··· (5)
However, “×” means a product of matrix elements, “ t ” means a transposed matrix, and “ −1 ” means an inverse matrix.

(5)式において、Bは、照明環境を提供するために用いられ得る光源の分光放射輝度の自己相関行列(以下、「演算行列」とも称す。)である。本実施の形態においては、複数の光源の候補についての分光放射輝度を予め取得しておき、統計上の視点から、各光源の分光放射輝度との相関性を利用して照明光の分光放射輝度E(1)を推定する。すなわち、光源の種類毎に取得された統計データを予め用意しておき、この統計データの特徴に従って、照明光の分光放射輝度E(1)を算出する。 In the equation (5), B is an autocorrelation matrix (hereinafter also referred to as “calculation matrix”) of spectral radiance of a light source that can be used to provide an illumination environment. In the present embodiment, spectral radiance for a plurality of light source candidates is acquired in advance, and from a statistical viewpoint, the spectral radiance of illumination light is used by utilizing the correlation with the spectral radiance of each light source. E (1) is estimated. That is, statistical data acquired for each type of light source is prepared in advance, and the spectral radiance E (1) of illumination light is calculated according to the characteristics of the statistical data.

この分光放射輝度の自己相関行列Bは、照明光の分光放射輝度E(1)を推定するための基準となるので、照明環境を提供するために用いられている可能性の高い光源の種類(たとえば、蛍光灯、白熱灯、キセノン灯、水銀灯などの発光原理別)に応じて、適切な統計データを用いることが好ましい。 Since the autocorrelation matrix B of the spectral radiance serves as a reference for estimating the spectral radiance E (1) of the illumination light, the type of the light source that is likely to be used to provide the illumination environment ( For example, it is preferable to use appropriate statistical data according to the light emission principle of fluorescent lamps, incandescent lamps, xenon lamps, mercury lamps, and the like.

このような光源の分光放射輝度は、各光源について予め実験的に取得することもできるし、国際照明委員会(CIE)やISO(International Organization for Standardization)あるいはJIS(Japanese Industrial Standards)によって標準化されている統計データを用いてもよい。   The spectral radiance of such a light source can be obtained experimentally in advance for each light source, or standardized by the International Commission on Illumination (CIE), ISO (International Organization for Standardization) or JIS (Japanese Industrial Standards). Statistical data may be used.

図3は、この発明の実施の形態1に従う分光放射輝度の自己相関行列Bの生成処理を説明するための図である。図3を参照して、まず、少なくとも1種類以上の光源(光源1〜光源N)の分光放射輝度の値を各要素とする光源の群行列Estを作成する。すなわち、光源i(1≦i≦N)の各サンプリング波長λ(1≦j≦k)における成分値(放射輝度)をe(λ)とすると、各光源の成分値e(λ)を行方向に配置した光源の群行列Estを作成する。 FIG. 3 is a diagram for describing processing for generating an autocorrelation matrix B of spectral radiance according to the first embodiment of the present invention. Referring to FIG. 3, first, a light source group matrix Est is created with spectral radiance values of at least one light source (light source 1 to light source N) as elements. That is, assuming that the component value (radiance) at each sampling wavelength λ j (1 ≦ j ≦ k) of the light source i (1 ≦ i ≦ N) is e ij ), the component value e i (λ Create a light source group matrix Est with j ) arranged in the row direction.

さらに、以下の演算式に従って、この群行列Estに基づいて自己相関行列Bを算出する。 Further, an autocorrelation matrix B is calculated based on the group matrix Est according to the following arithmetic expression.

B=Est・Est ・・・(6)
なお、可視光領域(380〜780ナノメートル)を1ナノメータ幅でサンプリングして得られる分光放射輝度E(1)を算出するためには、同じサンプリング間隔(要素数)をもつ群行列Estを用いる必要がある。従って、1つの光源の分光放射輝度を示す401行×1列の行列をn個分だけ結合した群行列Estは、401行×n列の行列となり、この群行列Estの自己相関行列は、401行×401列の行列となる。
B = E st · E st t (6)
In order to calculate the spectral radiance E (1) obtained by sampling the visible light region (380-780 nm) at 1 nanometer width, the group matrix E st with the same sampling interval (number of elements) It is necessary to use it. Accordingly, a group matrix Est in which n matrixes of 401 rows × 1 column indicating the spectral radiance of one light source are combined is a 401 row × n column matrix, and the autocorrelation matrix of the group matrix Est is , 401 rows × 401 columns matrix.

また、光源の分光放射輝度としては、たとえば蛍光灯や白熱灯といった単体の光源が発する分光放射輝度を用いてもよいし、複数種類の光源が組み合わされて生じる分光放射輝度を用いてもよい。さらに、屋外では、太陽光などの分光放射輝度を組み合わせてもよい。すなわち、本実施の形態において、照明光の分光放射輝度E(1)を推定するためには、照明環境を提供するために用いられる可能性の高い光源の分光放射輝度から得られる自己相関行列Bを用いることが好ましい。 As the spectral radiance of the light source, for example, spectral radiance emitted from a single light source such as a fluorescent lamp or an incandescent lamp may be used, or spectral radiance generated by combining a plurality of types of light sources may be used. Further, outdoors, spectral radiance such as sunlight may be combined. That is, in this embodiment, in order to estimate the spectral radiance E (1) of illumination light, the autocorrelation matrix B obtained from the spectral radiance of a light source that is likely to be used to provide an illumination environment. Is preferably used.

なお、ウィナー推定の詳細については、上述の非特許文献1(三宅洋一編、「分光画像処理入門」、財団法人東京大学出版会、2006年2月24日)に詳しいので、こちらを参照されたい。   The details of Wiener estimation are detailed in Non-Patent Document 1 (Yoichi Miyake, “Introduction to Spectral Image Processing”, The University of Tokyo Press, February 24, 2006). Please refer here. .

再度、図2を参照して、光源データ格納部13は、上述のような手順によって算出される、演算行列である自己相関行列Bを予め格納する。   Referring to FIG. 2 again, the light source data storage unit 13 stores in advance an autocorrelation matrix B, which is an arithmetic matrix, calculated by the procedure as described above.

推定行列算出部12は、上述の(4)式に従って、予め格納している拡散部材402の分光透過率f(1)および撮像装置400の分光感度Sに基づいて、システム行列Iを算出するとともに、上述の(5)式に従って、このシステム行列Iと、光源データ格納部13から読み出した自己相関行列Bとに基づいて、第1推定行列W(1)を算出する。続いて、分光放射輝度算出部11が、上述の(3)式に従って、推定行列算出部12からの第1推定行列W(1)と、入力部10からの撮像データg(1) RGBとに基づいて、照明光の分光放射輝度E(1)を算出する。 The estimation matrix calculation unit 12 calculates the system matrix I based on the spectral transmittance f (1) of the diffusing member 402 stored in advance and the spectral sensitivity S of the imaging device 400 according to the above-described equation (4). The first estimation matrix W (1) is calculated based on the system matrix I and the autocorrelation matrix B read from the light source data storage unit 13 in accordance with the above equation (5). Subsequently, the spectral radiance calculation unit 11 converts the first estimation matrix W (1) from the estimation matrix calculation unit 12 and the imaging data g (1) RGB from the input unit 10 according to the above equation (3). Based on this, the spectral radiance E (1) of the illumination light is calculated.

このように推定行列算出部12が算出した照明光の分光放射輝度E(1)は、後述するホワイトバランス算出処理および色再現処理に利用される。 Thus, the spectral radiance E (1) of the illumination light calculated by the estimation matrix calculation unit 12 is used for white balance calculation processing and color reproduction processing described later.

なお、本発明と図2に示す各要素との対応関係については、入力部10が「入力手段」に相当し、分光放射輝度算出部11と、推定行列算出部12と、光源データ格納部13とが「第1算出手段」に相当する。   As for the correspondence between the present invention and each element shown in FIG. 2, the input unit 10 corresponds to “input means”, and the spectral radiance calculation unit 11, the estimation matrix calculation unit 12, and the light source data storage unit 13. Corresponds to “first calculation means”.

<ホワイトバランス算出処理>
照明スペクトル推定部100は、三刺激値変換部14と、座標変換部15と、ホワイトバランス算出部16とをさらに含む。これらの部位は、算出された照明光の分光放射輝度E(1)に基づいて、撮像装置400のホワイトバランスを算出する。このホワイトバランスの値に基づいて、撮像装置400の撮像素子からそれぞれ出力されるR,G,Bの輝度値のレベルを互いに調整するためのホワイトバランス調整が可能になる。
<White balance calculation processing>
The illumination spectrum estimation unit 100 further includes a tristimulus value conversion unit 14, a coordinate conversion unit 15, and a white balance calculation unit 16. These parts calculate the white balance of the imaging apparatus 400 based on the calculated spectral radiance E (1) of the illumination light. Based on this white balance value, it is possible to perform white balance adjustment for mutually adjusting the levels of the R, G, and B luminance values output from the image sensor of the imaging apparatus 400.

三刺激値変換部14は、波長領域で規定された分光放射輝度E(1)からXYZ表色系の三刺激値X,Y,Zを算出する。この三刺激値X,Y,Zは、被写体OBJが撮像される照明環境における分光放射輝度E(1)を人間が観測したと仮定した場合の特性値を示す。より具体的には、照明光の分光放射輝度E(1)についてのXYZ表色系の三刺激値X,Y,Zは、以下に示す(7)式のようになる。 The tristimulus value conversion unit 14 calculates tristimulus values X, Y, and Z in the XYZ color system from the spectral radiance E (1) defined in the wavelength region. The tristimulus values X, Y, and Z indicate characteristic values when it is assumed that the human has observed the spectral radiance E (1) in the illumination environment where the subject OBJ is imaged. More specifically, the tristimulus values X, Y, and Z of the XYZ color system for the spectral radiance E (1) of the illumination light are expressed by the following equation (7).

Figure 2009182845
Figure 2009182845

(7)式において、h(λ)(i=R,G,B)は等色関数であり、人間の視覚感度特性に相当する関数である。この等色関数h(λ)は国際照明委員会(CIE)によって規定されている。 In the equation (7), h i (λ) (i = R, G, B) is a color matching function, which is a function corresponding to human visual sensitivity characteristics. This color matching function h i (λ) is defined by the International Commission on Illumination (CIE).

上述しているように、分光放射輝度E(1)を401行×401列の行列であるので、三刺激値変換部14は、(7)式に相当する演算を、以下に示す行列演算によって実現する。 As described above, since the spectral radiance E (1) is a matrix of 401 rows × 401 columns, the tristimulus value conversion unit 14 performs an operation corresponding to Equation (7) by a matrix operation shown below. Realize.

三刺激値[X(1),Y(1),Z(1)]=h・E(1) ・・・(8)
ここで、行列hは、等色関数h(λ)の各サンプリング波長における値を要素とする401行×3列の行列である。
Tristimulus values [X (1) , Y (1) , Z (1) ] = h t · E (1) (8)
Here, the matrix h is a matrix of 401 rows × 3 columns whose elements are values at the respective sampling wavelengths of the color matching function h i (λ).

続いて、座標変換部15は、この三刺激値X(1),Y(1),Z(1)をRGB表色系において定義される座標値R(1),G(1),B(1)に変換する。より具体的には、座標変換部15は、以下に示す演算式に従って、RGB表色系において定義される座標値R(1),G(1),B(1)を算出する。 Subsequently, the coordinate conversion unit 15 converts the tristimulus values X (1) , Y (1) , Z (1) into coordinate values R (1) , G (1) , B ( defined in the RGB color system. Convert to 1) . More specifically, the coordinate conversion unit 15 calculates coordinate values R (1) , G (1) , and B (1) defined in the RGB color system according to the arithmetic expression shown below.

(1)=a11(1)+a12(1)+a13(1)
(1)=a21(1)+a22(1)+a23(1)
(1)=a31(1)+a32(1)+a33(1)
ここで、a11〜a33は、被写体の測色値(XYZ表色系)と、実際に撮像装置に記録される信号値(RGB表色系)との対応関係を表す3行×3列の変換行列である。このような行列のことを表示装置におけるRGB⇔XYZ変換行列と呼ぶ。a11〜a33を3行×3列の行列としてとらえると、後述の(15)式にて、
t・E(1)・W(2)=M
とした場合の逆行列M−1に相当することになる。
R (1) = a 11 X (1) + a 12 Y (1) + a 13 Z (1)
G (1) = a 21 X (1) + a 22 Y (1) + a 23 Z (1)
B (1) = a 31 X (1) + a 32 Y (1) + a 33 Z (1)
Here, a 11 to a 33 are 3 rows × 3 columns representing the correspondence between the colorimetric values of the subject (XYZ color system) and the signal values (RGB color system) actually recorded in the imaging apparatus. Is the transformation matrix. Such a matrix is called an RGB⇔XYZ conversion matrix in the display device. When catch a 11 ~a 33 as a matrix of 3 rows × 3 columns, at later of (15),
h t · E (1) · W (2) = M
This corresponds to the inverse matrix M− 1 .

さらに、ホワイトバランス算出部16は、座標値R(1),G(1),B(1)の比に基づいて、撮像装置400におけるホワイトバランスを算出する。一般的に、ホワイトバランス調整の完了とは、R(1):G(1):B(1)=1:1:1が成立することであるため、この比率が崩れている場合には、ホワイトバランス調整が十分ではないといえる。このような場合には、撮像装置400を構成する各色の撮像素子の出力ゲインを独立に調整することで、ホワイトバランスが調整される。すなわち、R,G,Bの撮像素子に乗じるべき調整ゲインは、1/R(1):1/G(1):1/B(1)となる。 Further, the white balance calculation unit 16 calculates the white balance in the imaging apparatus 400 based on the ratio of the coordinate values R (1) , G (1) , B (1) . In general, completion of white balance adjustment means that R (1) : G (1) : B (1) = 1: 1: 1 is established. It can be said that the white balance adjustment is not sufficient. In such a case, the white balance is adjusted by independently adjusting the output gains of the image pickup elements of the respective colors constituting the image pickup apparatus 400. That is, the adjustment gain to be multiplied by the R, G, and B image sensors is 1 / R (1) : 1 / G (1) : 1 / B (1) .

したがって、ホワイトバランス算出部16は、座標値R(1),G(1),B(1)の比、あるいはその逆比である1/R(1):1/G(1):1/B(1)をホワイトバランスとして出力する。このホワイトバランス算出部16から出力されるホワイトバランスは、ユーザによる手動のゲイン調整に用いられる。あるいは、撮像装置400のゲイン調整部(図示しない)に与えられて、当該ゲイン調整部が自動的に撮像装置400のゲインを調整するようにしてもよい。 Therefore, the white balance calculation unit 16 calculates the ratio of the coordinate values R (1) , G (1) , B (1) or the inverse ratio 1 / R (1) : 1 / G (1) : 1 / B (1) is output as white balance. The white balance output from the white balance calculation unit 16 is used for manual gain adjustment by the user. Alternatively, a gain adjustment unit (not shown) of the imaging device 400 may be provided so that the gain adjustment unit automatically adjusts the gain of the imaging device 400.

なお、本発明と図2に示す各要素との対応関係については、三刺激値変換部14および座標変換部15が「第2算出手段」に相当し、ホワイトバランス算出部16が「第3算出手段」に相当する。   2, the tristimulus value conversion unit 14 and the coordinate conversion unit 15 correspond to “second calculation means”, and the white balance calculation unit 16 sets “third calculation”. It corresponds to “means”.

<色再現処理>
次に、上述の処理によって算出された分光放射輝度E(1)を用いて、第2撮像データg(2) RGB(m,n)から被写体の色再現を行なって画像データg(OUT) RGB(m,n)を生成する処理について説明する。
<Color reproduction processing>
Next, using the spectral radiance E (1) calculated by the above-described processing, the color of the subject is reproduced from the second imaging data g (2) RGB (m, n), and the image data g (OUT) RGB A process for generating (m, n) will be described.

色再現部200は、入力部20と、分光反射率算出部21と、推定行列算出部22と、分光反射率データ格納部23と、画像データ生成部24と、座標変換部25とを含む。   The color reproduction unit 200 includes an input unit 20, a spectral reflectance calculation unit 21, an estimation matrix calculation unit 22, a spectral reflectance data storage unit 23, an image data generation unit 24, and a coordinate conversion unit 25.

入力部20は、図2(b)に示すように、撮像装置400を用いて、被写体OBJを撮像して得られた第2撮像データg(2) RGB(m,n)を受入れる。そして、入力部20は、処理に応じて、この第2撮像データg(2) RGB(m,n)を分光反射率算出部21へ出力する。 As illustrated in FIG. 2B, the input unit 20 receives second imaging data g (2) RGB (m, n) obtained by imaging the subject OBJ using the imaging device 400. Then, the input unit 20 outputs the second imaging data g (2) RGB (m, n) to the spectral reflectance calculation unit 21 according to the processing.

なお、第2撮像データg(2) RGB(m,n)に逆ガンマ特性(非線形性)が与えられている場合には、上述した入力部10と同様に、入力部20についてもこの逆ガンマ特性を打ち消すための処理を行なうようにしてもよい。すなわち、撮像装置400における逆ガンマ値をγcとすると、以下のような演算式に従って、第2撮像データg(2) RGB(m,n)を線形化することができる。 Note that when the second imaging data g (2) RGB (m, n) is provided with an inverse gamma characteristic (nonlinearity), the input unit 20 also has the inverse gamma, as with the input unit 10 described above. You may make it perform the process for negating a characteristic. That is, when the inverse gamma value in the imaging apparatus 400 is γc, the second imaging data g (2) RGB (m, n) can be linearized according to the following arithmetic expression.

g’(2) RGB(m,n)=g(2) RGB(m,n)1/γc
さらに、上述したように、このような線形化処理をルックアップテーブルを用いて実行してもよい。
g ′ (2) RGB (m, n) = g (2) RGB (m, n) 1 / γc
Furthermore, as described above, such a linearization process may be executed using a lookup table.

分光反射率算出部21は、後述する推定行列算出部22で算出された第2推定行列W(2)を用いて、第2撮像データg(2)から被写体OBJの分光反射率を算出する。さらに、分光反射率算出部21は、任意の照明環境下における被写体OBJの色再現データである画像データg(OUT) RGB(m,n)を出力する。この色再現データとは、被写体OBJの分光反射率に基づいて、任意の照明環境下において当該被写体OBJがどのように観測されるかを演算処理によって再現したものである。 The spectral reflectance calculator 21 calculates the spectral reflectance of the subject OBJ from the second imaging data g (2) using the second estimation matrix W (2) calculated by the estimation matrix calculator 22 described later. Further, the spectral reflectance calculator 21 outputs image data g (OUT) RGB (m, n) that is color reproduction data of the subject OBJ under an arbitrary illumination environment. This color reproduction data is a reproduction of how the subject OBJ is observed under an arbitrary illumination environment based on the spectral reflectance of the subject OBJ.

推定行列算出部22は、被写体OBJに含まれ得る色の分光反射率から算出される自己相関行列Aと、照明スペクトル推定部100によって算出された照明光の分光放射輝度E(1)と、撮像装置400の分光感度Sとに基づいて、第2推定行列W(2)を算出する。 The estimation matrix calculation unit 22 includes an autocorrelation matrix A calculated from spectral reflectances of colors that can be included in the subject OBJ, the spectral radiance E (1) of the illumination light calculated by the illumination spectrum estimation unit 100, and imaging. Based on the spectral sensitivity S of the apparatus 400, a second estimation matrix W (2) is calculated.

以下、第2撮像データg(2) RGB(m,n)から色再現された画像データg(OUT) RGB(m,n)を生成する原理について説明する。 Hereinafter, the principle of generating image data g (OUT) RGB (m, n) that is color-reproduced from the second imaging data g (2) RGB (m, n) will be described.

撮像装置400の座標(m,n)の画素に入射する被写体OBJからの光(スペクトル)は、被写体OBJに照射される照明光の分光放射輝度E(1)(λ)と、被写体OBJの当該画素に対応する位置の分光反射率f(2)(m,n;λ)との積に相当する。そして、撮像装置400から出力される第2撮像データg(2) RGB(m,n)の各成分値g(2) (m,n)(i=R,G,B)は、各撮像素子の分光感度S(λ)(i=R,G,B)をさらに乗じた上で、波長領域にわたって光エネルギーを積分したものに相当する。このような関係は、(9)式に示す関係式として表わすことができる。 The light (spectrum) from the subject OBJ that enters the pixel at the coordinates (m, n) of the imaging device 400 is the spectral radiance E (1) (λ) of the illumination light irradiated on the subject OBJ and the subject OBJ. This corresponds to the product of the spectral reflectance f (2) (m, n; λ) at the position corresponding to the pixel. Then, each component value g (2) i (m, n) (i = R, G, B) of the second imaging data g (2) RGB (m, n) output from the imaging device 400 is obtained for each imaging. This corresponds to a product obtained by further multiplying the spectral sensitivity S i (λ) (i = R, G, B) of the element and integrating the light energy over the wavelength region. Such a relationship can be expressed as a relational expression shown in Expression (9).

Figure 2009182845
Figure 2009182845

ここで、n(m,n)は、各撮像素子に現れる白色ノイズなどによって生じる加法性ノイズであり、撮像装置400の撮像素子やレンズの特性、および照明環境などに依存する値である。 Here, n i (m, n) is additive noise generated by white noise or the like appearing in each image sensor, and is a value depending on the characteristics of the image sensor and the lens of the imaging apparatus 400, the illumination environment, and the like.

上述したように、本実施の形態では、所定の波長幅(代表的に、1ナノメータ幅)でサンプリングした行列演算式を用いる。すなわち、(9)式の右辺第1項の積分式を、各撮像素子の各波長における分光感度を示す行列である分光感度Sと、各波長における分光放射輝度を示す行列である分光放射輝度E(1)と、各波長における被写体OBJの分光反射率を示す行列である分光反射率f(2)(m,n)との行列演算により実現する。代表的に、可視光領域(380〜780ナノメートル)を1ナノメータ幅でサンプリングした場合には、分光反射率f(2)(m,n)は、各要素あたり401行×1列の行列となる。 As described above, in the present embodiment, a matrix arithmetic expression sampled with a predetermined wavelength width (typically 1 nanometer width) is used. That is, the integral expression of the first term on the right side of the equation (9) is expressed as follows: spectral sensitivity S that is a matrix indicating the spectral sensitivity at each wavelength of each image sensor, and spectral radiance E that is a matrix indicating the spectral radiance at each wavelength. This is realized by matrix calculation of (1) and spectral reflectance f (2) (m, n) which is a matrix indicating the spectral reflectance of the subject OBJ at each wavelength. Typically, when the visible light region (380 to 780 nanometers) is sampled with a width of 1 nanometer, the spectral reflectance f (2) (m, n) is expressed as a matrix of 401 rows × 1 column for each element. Become.

ここで、加法性ノイズn(m,n)は、一般的に十分に小さな値であるので、(9)式から無視すると、(9)式から次の行列演算式を導くことができる。 Here, the additive noise n i (m, n) is generally a sufficiently small value, and therefore, if ignored from the expression (9), the following matrix operation expression can be derived from the expression (9).

(2) RGB(m,n)=St・E(1)・f(2)(m,n) ・・・(10)
この(10)式に基づいて、分光反射率f(2)(m,n)を算出することを考える。具体的には、以下に示す(11)式に従って被写体OBJの分光反射率f(2)(m,n)を算出する。
g (2) RGB (m, n) = St · E (1) · f (2) (m, n) (10)
Consider calculating the spectral reflectance f (2) (m, n) based on the equation (10). Specifically, the spectral reflectance f (2) (m, n) of the subject OBJ is calculated according to the following equation (11).

(2)(m,n)=W(2)・g(2) RGB(m,n) ・・・(11)
(11)式において、W(2)は第2推定行列である。第2推定行列W(2)は、上述した第1推定行列W(1)の算出と同様に、ウィナー推定の手法によって算出される。具体的には、第2推定行列W(2)は、システム行列Hを以下に示す(12)式と定めた上で、(11)式を変形することで(13)式のように導出される。
f (2) (m, n) = W (2) · g (2) RGB (m, n) (11)
In equation (11), W (2) is the second estimation matrix. The second estimation matrix W (2) is calculated by the winner estimation method, similarly to the calculation of the first estimation matrix W (1) described above. Specifically, the second estimation matrix W (2) is derived as the following equation (13) by modifying the equation (11) after defining the system matrix H as the following equation (12). The

H=S・E(1) ・・・(12)
(2)=A・H・(H・A・H−1 ・・・(13)
但し、「」は、転置行列を意味し、「−1」は、逆行列を意味する。
H = S t · E (1) (12)
W (2) = A · H t · (H · A · H t ) −1 (13)
However, “ t ” means a transposed matrix, and “ −1 ” means an inverse matrix.

(13)式において、Aは、被写体OBJに含まれ得る色の分光反射率から算出される自己相関行列であり、被写体OBJの分光反射率を推定するための基準となる。この自己相関行列Aは、一例として、ISO(International Organization for Standardization)において標準化されている分光反射率のデータベースであるSOCS(Standard Object Color Sample)を参照することで決定できる。あるいは、被写体OBJの材質などが予め分っている場合には、被写体OBJ自身の分光反射率を別の方法によって予め測定しておき、自己相関行列Aを決定してもよい。   In equation (13), A is an autocorrelation matrix calculated from the spectral reflectances of colors that can be included in the subject OBJ, and serves as a reference for estimating the spectral reflectance of the subject OBJ. For example, the autocorrelation matrix A can be determined by referring to a standard object color sample (SOCS) that is a database of spectral reflectance standardized in ISO (International Organization for Standardization). Alternatively, when the material of the subject OBJ is known in advance, the spectral reflectance of the subject OBJ itself may be measured in advance by another method to determine the autocorrelation matrix A.

この自己相関行列Aは、図3における自己相関行列Bの生成処理と同様の処理によって生成される。この自己相関行列Aの生成に用いられる群行列としては、たとえば、複数のカラー見本からなるカラーチャートの各色の分光反射率を用いることができる。本実施の形態においては、可視光領域(380〜780ナノメートル)を1ナノメータ幅でサンプリングして得られる401行×401列の分光放射輝度E(1)が用いられるので、自己相関行列Aも401行×401列の行列となる。 This autocorrelation matrix A is generated by a process similar to the process of generating the autocorrelation matrix B in FIG. As the group matrix used to generate the autocorrelation matrix A, for example, the spectral reflectance of each color of a color chart composed of a plurality of color samples can be used. In the present embodiment, a spectral radiance E (1) of 401 rows × 401 columns obtained by sampling the visible light region (380 to 780 nanometers) with a width of 1 nanometer is used. The matrix is 401 rows × 401 columns.

この自己相関行列Aは、分光反射率データ格納部23に予め格納される。
さらに、上述のようなウィナー推定の手法に代えて、主成分分析の手法を用いてもよい。
The autocorrelation matrix A is stored in advance in the spectral reflectance data storage unit 23.
Further, a principal component analysis technique may be used instead of the above-described winner estimation technique.

以上のように、推定行列算出部22は、(12)式および(13)式に従って、照明光の分光放射輝度E(1)と、撮像装置400の分光感度Sと、被写体OBJに含まれ得る色の分光放射輝度から得られた自己相関行列Aとに基づいて、第2推定行列W(2)を算出する。そして、分光反射率算出部21は、(11)式に従って、この第2推定行列W(2)を用いて、第2撮像データg(2) RGB(m,n)から被写体OBJの分光反射率f(2)(m,n)を算出する。 As described above, the estimation matrix calculation unit 22 can be included in the spectral radiance E (1) of the illumination light, the spectral sensitivity S of the imaging device 400, and the subject OBJ according to the equations (12) and (13). Based on the autocorrelation matrix A obtained from the spectral radiance of the color, a second estimation matrix W (2) is calculated. Then, the spectral reflectance calculation unit 21 uses the second estimation matrix W (2) according to the equation (11), and uses the second imaging data g (2) RGB (m, n) as the spectral reflectance of the subject OBJ. f (2) Calculate (m, n).

このように算出された分光反射率f(2)(m,n)が被写体OBJのもつ色の本質であり、分光反射率f(2)(m,n)を用いることで、被写体OBJがどのような照明環境下で観測されたものであっても、その色再現を行なうことができる。 The spectral reflectance f (2) (m, n) calculated in this way is the essence of the color of the subject OBJ. By using the spectral reflectance f (2) (m, n), which subject OBJ is selected Even if it is observed under such an illumination environment, the color reproduction can be performed.

すなわち、任意の分光放射輝度E(λ)の条件下で、分光反射率f(m,n;λ)の被写体を観測した場合のXYZ表色系の三刺激値X,Y,Zは、以下に示す(14)式のようになる。   That is, the tristimulus values X, Y, and Z of the XYZ color system when an object having a spectral reflectance f (m, n; λ) is observed under the condition of an arbitrary spectral radiance E (λ) are as follows: (14) shown in FIG.

Figure 2009182845
Figure 2009182845

(14)式において、h(λ)(i=R,G,B)は等色関数であり、人間の視覚感度特性に相当する関数である。 In the equation (14), h i (λ) (i = R, G, B) is a color matching function, which is a function corresponding to human visual sensitivity characteristics.

この(14)式において、色再現に使用する分光放射輝度E(λ)を任意に決定できるが、本実施の形態においては、被写体OBJの撮像時と同じ照明環境下における色再現を行なう場合について例示する。   In this equation (14), the spectral radiance E (λ) used for color reproduction can be arbitrarily determined. However, in this embodiment, color reproduction is performed under the same illumination environment as when the subject OBJ is imaged. Illustrate.

すなわち、画像データ生成部24は、等色関数hと、被写体OBJに入射する照明光の分光放射輝度E(1)と、被写体OBJの分光反射率f(2)(m,n)(=W(2)・g(2) RGB(m,n))とを用いて、分光放射輝度E(1)である照明環境下において被写体OBJの色再現を行なった画像データg(OUT) XYZ(m,n)を生成する。すなわち、画像データ生成部24は、(15)式に示す演算式を実行する。 That is, the image data generation unit 24 uses the color matching function h, the spectral radiance E (1) of the illumination light incident on the subject OBJ, and the spectral reflectance f (2) (m, n) (= W (2) · g (2) RGB (m, n)) and image data g (OUT) XYZ (m ) in which the color reproduction of the subject OBJ is performed in the illumination environment having the spectral radiance E (1). , N). That is, the image data generation unit 24 executes the arithmetic expression shown in Expression (15).

(OUT) XYZ(m,n)=ht・E(1)・W(2)・g(2) RGB(m,n) ・・・(15)
ここで、画像データg(OUT) XYZ(m,n)は、XYZ表色系の座標値として定義される。
g (OUT) XYZ (m, n) = ht · E (1) · W (2) · g (2) RGB (m, n) (15)
Here, the image data g (OUT) XYZ (m, n) is defined as coordinate values of the XYZ color system.

続いて、座標変換部25は、この画像データg(OUT) XYZ(m,n)をRGB表色系において定義される画像データg(OUT) RGB(m,n)に変換する。この座標変換部25により実行される座標変換処理は、上述した座標変換部15における処理と同様であるので、詳細な説明は繰返さない。 Subsequently, the coordinate conversion unit 25 converts the image data g (OUT) XYZ (m, n) into image data g (OUT) RGB (m, n) defined in the RGB color system. Since the coordinate conversion process executed by coordinate conversion unit 25 is the same as the process in coordinate conversion unit 15 described above, detailed description will not be repeated.

以上のような処理によって、第2撮像データg(2) RGB(m,n)から被写体OBJの色再現データである画像データg(OUT) RGB(m,n)が生成される。 Through the above processing, image data g (OUT) RGB (m, n), which is color reproduction data of the subject OBJ, is generated from the second imaging data g (2) RGB (m, n).

なお、画像データg(OUT) RGB(m,n)がガンマ特性をもつ表示装置などへ出力される場合には、当該出力先のガンマ特性を打ち消すための処理を行なうことが好ましい。この場合には、座標変換部25がガンマ特性を付与するような処理を含んでいてもよい。このガンマ特性を付与する処理は、表示装置のガンマ値γdとすると、生成される画像データg(OUT) RGB(m,n)について、このガンマ値γdについてのべき乗を演算することで実現される。なお、上述した入力部10および20と同様に、ルックアップテーブル(LUT)を用いることで、演算量を大幅に低減することもできる。 When the image data g (OUT) RGB (m, n) is output to a display device having a gamma characteristic, it is preferable to perform a process for canceling the gamma characteristic of the output destination. In this case, the coordinate conversion unit 25 may include a process for giving a gamma characteristic. When the gamma value γd of the display device is used, the process for imparting the gamma characteristic is realized by calculating the power of the gamma value γd for the generated image data g (OUT) RGB (m, n). . Note that, similarly to the input units 10 and 20 described above, the amount of calculation can be significantly reduced by using a lookup table (LUT).

上述の説明では、画像データ生成部24が被写体OBJの撮像時と同じ照明環境下において色再現を行なう構成について例示したが、色再現を行なう照明環境を異なるものとしてもよい。すなわち、画像データ生成部24が画像データg(OUT) XYZ(m,n)の生成に用いる分光放射輝度Eを任意に決定できる。 In the above description, the configuration in which the image data generation unit 24 performs color reproduction under the same illumination environment as when the subject OBJ is imaged is illustrated, but the illumination environment in which color reproduction is performed may be different. That is, the spectral radiance E used by the image data generation unit 24 to generate the image data g (OUT) XYZ (m, n) can be arbitrarily determined.

なお、本発明と図2に示す各要素との対応関係については、分光反射率算出部21および推定行列算出部22が「第4算出手段」に相当し、画像データ生成部24が「生成手段」に相当する。   2, the spectral reflectance calculation unit 21 and the estimation matrix calculation unit 22 correspond to “fourth calculation unit”, and the image data generation unit 24 sets “ Is equivalent to.

<処理手順>
本実施の形態に従う画像処理装置1における処理手順をまとめると、以下のようになる。
<Processing procedure>
The processing procedure in the image processing apparatus 1 according to the present embodiment is summarized as follows.

図4は、この発明の実施の形態1に従う画像処理装置1における全体処理手順を示すフローチャートである。   FIG. 4 is a flowchart showing an overall processing procedure in image processing apparatus 1 according to the first embodiment of the present invention.

図1および図4を参照して、まず、入力部10が、被写体OBJに入射する光の少なくとも一部を拡散部材402を介して撮像した第1撮像データg(1) RGB(m,n)を受入れる(ステップS100)。続いて、入力部10は、受入れた第1撮像データg(1) RGB(m,n)を代表する撮像データg(1) RGBを生成する(ステップS102)。なお、入力部10は、必要に応じて、第1撮像データを線形化する。 With reference to FIGS. 1 and 4, first, the input unit 10 captures first imaging data g (1) RGB (m, n) obtained by imaging at least part of the light incident on the subject OBJ through the diffusing member 402. Is accepted (step S100). Subsequently, the input unit 10 generates imaging data g (1) RGB representing the received first imaging data g (1) RGB (m, n) (step S102). Note that the input unit 10 linearizes the first imaging data as necessary.

次に、推定行列算出部12が、被写体OBJにおける照明環境を提供するために用いられ得る光源の分光放射輝度の自己相関行列B、拡散部材402の分光透過率f(1)、撮像装置400の分光感度Sに基づいて、第1推定行列W(1)を算出する(ステップS104)。続いて、分光放射輝度算出部11が、ステップS104で算出された第1推定行列W(1)を用いて、撮像データg(1) RGBから被写体OBJに入射する照明光の分光放射輝度E(1)を算出する(ステップS106)。 Next, the estimation matrix calculation unit 12 uses the autocorrelation matrix B of the spectral radiance of the light source that can be used to provide the illumination environment in the subject OBJ, the spectral transmittance f (1) of the diffusing member 402, and the imaging device 400. Based on the spectral sensitivity S, a first estimation matrix W (1) is calculated (step S104). Subsequently, the spectral radiance calculation unit 11 uses the first estimation matrix W (1) calculated in step S104, and the spectral radiance E ( 1) of the illumination light incident on the subject OBJ from the imaging data g (1) RGB. 1) is calculated (step S106).

次に、三刺激値変換部14が、分光放射輝度E(1)からXYZ表色系の三刺激値X,Y,Zを算出する(ステップS110)。続いて、座標変換部15が、XYZ表色系の三刺激値X,Y,Zを、RGB表色系において定義される座標値R(1),G(1),B(1)に変換する(ステップS112)。さらに、ホワイトバランス算出部16が、座標値R(1),G(1),B(1)の比に基づいて、撮像装置400におけるホワイトバランスを算出する(ステップS114)。 Next, the tristimulus value conversion unit 14 calculates tristimulus values X, Y, and Z of the XYZ color system from the spectral radiance E (1) (step S110). Subsequently, the coordinate conversion unit 15 converts the tristimulus values X, Y, and Z in the XYZ color system to coordinate values R (1) , G (1) , and B (1) defined in the RGB color system. (Step S112). Further, the white balance calculation unit 16 calculates the white balance in the imaging apparatus 400 based on the ratio of the coordinate values R (1) , G (1) , B (1) (step S114).

一方、入力部20が、照明環境下において撮像装置400により被写体OBJを撮像することで得られる第2撮像データg(2) RGB(m,n)を受入れる(ステップS120)。なお、入力部20は、必要に応じて、第2撮像データを線形化する。 On the other hand, the input unit 20 receives the second imaging data g (2) RGB (m, n) obtained by imaging the subject OBJ by the imaging device 400 in an illumination environment (step S120). The input unit 20 linearizes the second imaging data as necessary.

次に、推定行列算出部22が、被写体OBJに含まれ得る色の分光反射率から算出される自己相関行列A、照明スペクトル推定部100によって算出された照明光の分光放射輝度E(1)、撮像装置400の分光感度Sに基づいて、第2推定行列W(2)を算出する(ステップS122)。続いて、分光反射率算出部21が、ステップS122で算出された第2推定行列W(2)を用いて、第2撮像データg(2)から被写体OBJの分光反射率f(2)(m,n)を算出する(ステップS124)。さらに、画像データ生成部24が、等色関数h、被写体OBJに入射する照明光の分光放射輝度E(1)、ステップS124で算出さされた被写体OBJの分光反射率f(2)(m,n)を用いて、被写体OBJの色再現を行なった画像データg(OUT) XYZ(m,n)を生成する(ステップS126)。さらに、座標変換部25が、ステップS126において生成された画像データg(OUT) XYZ(m,n)をRGB表色系において定義される画像データg(OUT) RGB(m,n)に変換し(ステップS128)、この変換後の画像データg(OUT) RGB(m,n)を出力する。 Next, the estimation matrix calculation unit 22 calculates the autocorrelation matrix A calculated from the spectral reflectances of colors that can be included in the subject OBJ, the spectral radiance E (1) of the illumination light calculated by the illumination spectrum estimation unit 100, Based on the spectral sensitivity S of the imaging device 400, a second estimation matrix W (2) is calculated (step S122). Subsequently, the spectral reflectance calculation unit 21 uses the second estimation matrix W (2) calculated in step S122 to calculate the spectral reflectance f (2) (m ) of the subject OBJ from the second imaging data g (2). , N) is calculated (step S124). Further, the image data generating unit 24 uses the color matching function h, the spectral radiance E (1) of the illumination light incident on the subject OBJ, and the spectral reflectance f (2) (m, ) of the subject OBJ calculated in step S124. n) is used to generate image data g (OUT) XYZ (m, n) in which color reproduction of the subject OBJ is performed (step S126). Further, the coordinate conversion unit 25 converts the image data g (OUT) XYZ (m, n) generated in step S126 into image data g (OUT) RGB (m, n) defined in the RGB color system. (Step S128), the converted image data g (OUT) RGB (m, n) is output.

<本実施の形態による作用効果>
この発明の実施の形態1によれば、被写体OBJを撮像するための撮像装置を用いて、被写体OBJに照射される照明光の分光放射輝度を算出することができる。そのため、照明光の分光放射輝度を測定するための専用の測定装置を用いることなく、容易に分光放射輝度を取得することができる。
<Operational effects of the present embodiment>
According to the first embodiment of the present invention, the spectral radiance of the illumination light applied to the subject OBJ can be calculated using the imaging device for imaging the subject OBJ. Therefore, the spectral radiance can be easily acquired without using a dedicated measuring device for measuring the spectral radiance of the illumination light.

さらに、このように算出された照明光の分光放射輝度に基づいて、被写体OBJの分光反射率を正確に推定した上で、当該撮像すべき照明環境において撮像(観察)されるであろう色を適切に再現することができる。   Furthermore, based on the spectral radiance of the illumination light calculated in this way, the spectral reflectance of the subject OBJ is accurately estimated, and then the color that will be imaged (observed) in the illumination environment to be imaged. Can be reproduced appropriately.

また、照明光の分光放射輝度に基づいて、撮像装置のホワイトバランスを適切に調整できるので、撮像素子の特性のバラツキなどに影響されることなく、より正確な色再現を実現することができる。   In addition, since the white balance of the imaging device can be appropriately adjusted based on the spectral radiance of the illumination light, more accurate color reproduction can be realized without being affected by variations in the characteristics of the imaging device.

なお、上述の実施の形態では、「照明光の分光放射輝度の算出処理」、「ホワイトバランス算出処理」、「色再現処理」の3つの処理を1つの画像処理装置で実現する構成について例示したが、少なくとも「照明光の分光放射輝度の算出処理」を実行可能な装置であれば、本願発明の課題は解決可能である。   In the above-described embodiment, the configuration in which the three processes of “spectral radiance calculation processing of illumination light”, “white balance calculation processing”, and “color reproduction processing” are realized by one image processing apparatus is illustrated. However, the problem of the present invention can be solved as long as the apparatus can execute at least “calculation processing of spectral radiance of illumination light”.

[実施の形態2]
上述の実施の形態1においては、被写体OBJに照射される照明光の分光放射輝度を推定するために1種類の自己相関行列Bを用いる構成について例示した。一方で、照明光の分光放射輝度(スペクトル)は、光源の種類によって大きく変化することが知られている。これは、光源の発光原理などによって、その発光スペクトル(輝線スペクトル)は様々な固有の特性を有するからである。そのため、被写体OBJを撮影する照明環境に応じて、光源の種類毎に予め生成した自己相関行列Bを選択的に用いることが好ましい。
[Embodiment 2]
In the first embodiment described above, the configuration in which one type of autocorrelation matrix B is used to estimate the spectral radiance of the illumination light applied to the subject OBJ has been illustrated. On the other hand, it is known that the spectral radiance (spectrum) of illumination light varies greatly depending on the type of light source. This is because the emission spectrum (bright line spectrum) has various unique characteristics depending on the emission principle of the light source. For this reason, it is preferable to selectively use the autocorrelation matrix B generated in advance for each type of light source in accordance with the illumination environment for photographing the subject OBJ.

そこで、実施の形態2においては、複数の光源の種類毎(カテゴリー毎)に自己相関行列を複数格納しておき、被写体OBJを撮影する照明環境に相応しいものをユーザが選択できる構成について例示する。   Therefore, in the second embodiment, a configuration in which a plurality of autocorrelation matrices are stored for each type of light source (for each category), and the user can select a configuration suitable for the lighting environment for photographing the subject OBJ is illustrated.

<全体構成>
図5は、この発明の実施の形態2に従う画像処理装置1Aの機能構成図である。
<Overall configuration>
FIG. 5 is a functional configuration diagram of an image processing apparatus 1A according to the second embodiment of the present invention.

図5を参照して、画像処理装置1Aは、図1に示す画像処理装置1において、照明スペクトル推定部100に代えて、照明スペクトル推定部100Aを設けたものである。一方、色再現部200については、図1に示す画像処理装置1の色再現部200と同様であるので、詳細な説明は繰返さない。   Referring to FIG. 5, image processing apparatus 1 </ b> A is provided with an illumination spectrum estimation unit 100 </ b> A in place of illumination spectrum estimation unit 100 in image processing apparatus 1 shown in FIG. 1. On the other hand, color reproduction unit 200 is similar to color reproduction unit 200 of image processing apparatus 1 shown in FIG. 1, and therefore detailed description thereof will not be repeated.

照明スペクトル推定部100Aは、図1に示す照明スペクトル推定部100において、光源データ格納部13に代えて、光源データ格納部13Aを設けたものである。その他の部位については、実施の形態1と同様であるので、詳細な説明は繰返さない。   The illumination spectrum estimation unit 100A is provided with a light source data storage unit 13A in place of the light source data storage unit 13 in the illumination spectrum estimation unit 100 shown in FIG. Since other parts are the same as those in the first embodiment, detailed description will not be repeated.

光源データ格納部13Aは、照明環境を提供するために用いられ得るM種類の光源毎に予め定められた演算行列である、自己相関行列B,B,・・・,Bを予め格納する。そして、光源データ格納部13Aは、ユーザなどからの外部指令に応じて、予め格納する自己相関行列B,B,・・・,Bのうち、選択されたものを推定行列算出部12へ出力する。 The light source data storage unit 13A stores in advance an autocorrelation matrix B 1 , B 2 ,..., B M that is a predetermined calculation matrix for each of M types of light sources that can be used to provide an illumination environment. To do. Then, the light source data storage unit 13A selects the selected one of the autocorrelation matrices B 1 , B 2 ,..., B M stored in advance in accordance with an external command from the user or the like. Output to.

以下、この光源データ格納部13Aに格納される複数の自己相関行列について説明する。   Hereinafter, a plurality of autocorrelation matrices stored in the light source data storage unit 13A will be described.

たとえば、一般的な蛍光灯の分光照射輝度(スペクトル)は、その中に封入されている水銀などの輝線スペクトルに相当する波長にピークを有するような波形を有する。一方、白熱灯の分光照射輝度(スペクトル)には、その発光原理上、ピークが存在しない。このように、光源の分光照射輝度(スペクトル)は、その種類毎に異なったものとなる。そのため、被写体OBJに入射する照明光の分光放射輝度E(1)(照明スペクトル)を推定するためには、基準となる自己相関行列Bを適切に選択する必要がある。 For example, the spectral irradiation luminance (spectrum) of a general fluorescent lamp has a waveform having a peak at a wavelength corresponding to an emission line spectrum of mercury or the like enclosed therein. On the other hand, there is no peak in the spectral illumination luminance (spectrum) of the incandescent lamp due to its emission principle. Thus, the spectral illumination brightness (spectrum) of the light source differs for each type. Therefore, in order to estimate the spectral radiance E (1) (illumination spectrum) of the illumination light incident on the subject OBJ, it is necessary to appropriately select the autocorrelation matrix B as a reference.

一方、ある程度の予備知識を有するユーザは、撮像装置400を用いて被写体OBJを撮影する際に、どのような光源による照明環境下であるかを判断することができる。たとえば、被写体OBJの撮影場所は屋内であるか、あるいは屋外であるかや、撮影場所が屋内であれば、光源として蛍光灯が用いられているか、あるいは白熱灯が用いられているかといった判断は可能である。そのため、このようなユーザが判断できる程度の分類の下に、光源の種類別に複数の自己相関行列を予め用意しておき、ユーザが被写体OBJの撮影状況に応じて任意に選択できれば、照明光の分光放射輝度E(1)(照明スペクトル)の推定精度を高めることができる。 On the other hand, a user who has a certain amount of prior knowledge can determine what kind of light source the lighting environment is in when photographing the subject OBJ using the imaging device 400. For example, whether the subject OBJ is shot indoors or outdoors, or if the shooting location is indoors, it is possible to determine whether a fluorescent lamp is used as a light source or an incandescent lamp is used. It is. Therefore, a plurality of autocorrelation matrices are prepared in advance for each light source type under such a classification that can be determined by the user, and if the user can arbitrarily select according to the shooting situation of the subject OBJ, The estimation accuracy of the spectral radiance E (1) (illumination spectrum) can be increased.

そこで、本実施の形態に従う光源データ格納部13Aは、一例として、「蛍光灯」、「白熱灯」、「キセノン灯」、「水銀灯」、「太陽光」とった種類毎に複数の自己相関行列B,B,・・・,Bを予め格納しており、ユーザなどによる選択指令SELに応じて、これらのうち対応するものを自己相関行列Bとして推定行列算出部12へ出力する。すなわち、自己相関行列Bは、「蛍光灯」の分光放射輝度の統計データのみから生成し、自己相関行列Bは、「白熱灯」の分光放射輝度の統計データのみから生成するといった具合である。 Therefore, as an example, the light source data storage unit 13A according to the present embodiment includes a plurality of autocorrelation matrices for each type of “fluorescent lamp”, “incandescent lamp”, “xenon lamp”, “mercury lamp”, and “sunlight”. B 1 , B 2 ,..., B M are stored in advance, and in response to a selection command SEL by a user or the like, the corresponding one is output as an autocorrelation matrix B to the estimation matrix calculation unit 12. That is, the autocorrelation matrix B 1 is generated only from the statistical data of the spectral radiance of “fluorescent lamp”, and the autocorrelation matrix B 2 is generated only from the statistical data of the spectral radiance of “incandescent lamp”. is there.

推定行列算出部12は、この光源データ格納部13Aから受けた自己相関行列Bに基づいて、照明光の分光放射輝度E(1)を推定する。 The estimation matrix calculation unit 12 estimates the spectral radiance E (1) of the illumination light based on the autocorrelation matrix B received from the light source data storage unit 13A.

なお、照明光の分光放射輝度E(1)の推定精度を高めるためには、光源の種類をより細別した自己相関行列を予め格納しておくことが好ましい。さらに、単体の光源だけでなく、たとえば「蛍光灯」と「白熱灯」とを組み合わせた場合に生じる分光放射輝度に基づいて、自己相関行列を生成しておいてもよい。すなわち、光源データ格納部13Aには、被写体OBJを撮影する際の照明環境として想定される様々な分光放射輝度に基づいて生成された自己相関行列を予め格納しておくことが好ましい。 In order to increase the estimation accuracy of the spectral radiance E (1) of the illumination light, it is preferable to store in advance an autocorrelation matrix that further classifies the type of light source. Furthermore, not only a single light source, but also an autocorrelation matrix may be generated based on the spectral radiance generated when, for example, a “fluorescent lamp” and an “incandescent lamp” are combined. That is, it is preferable to store in advance in the light source data storage unit 13A auto-correlation matrices generated based on various spectral radiances assumed as illumination environments when photographing the subject OBJ.

その他の処理については、基本的に上述した実施の形態1と同様であるので、詳細な説明は繰返さない。   Other processes are basically the same as those in the first embodiment described above, and thus detailed description will not be repeated.

なお、本発明と図5に示す各要素との対応関係については、入力部10が「入力手段」に相当し、分光放射輝度算出部11および推定行列算出部12が「第1算出手段」に相当し、光源データ格納部13Aが「選択手段」に相当し、三刺激値変換部14および座標変換部15が「第2算出手段」に相当し、ホワイトバランス算出部16が「第3算出手段」に相当し、分光反射率算出部21および推定行列算出部22が「第4算出手段」に相当し、画像データ生成部24が「生成手段」に相当する。   For the correspondence between the present invention and each element shown in FIG. 5, the input unit 10 corresponds to “input unit”, and the spectral radiance calculation unit 11 and the estimation matrix calculation unit 12 become “first calculation unit”. The light source data storage unit 13A corresponds to the “selecting unit”, the tristimulus value conversion unit 14 and the coordinate conversion unit 15 correspond to the “second calculation unit”, and the white balance calculation unit 16 corresponds to the “third calculation unit”. The spectral reflectance calculation unit 21 and the estimation matrix calculation unit 22 correspond to “fourth calculation unit”, and the image data generation unit 24 corresponds to “generation unit”.

<処理手順>
図6は、この発明の実施の形態2に従う画像処理装置1Aにおける全体処理手順を示すフローチャートである。なお、図6に示すフローチャート中の各ステップのうち、図4に示すフローチャート中のステップと同一内容のステップについては、同じ符号を付している。
<Processing procedure>
FIG. 6 is a flowchart showing an overall processing procedure in image processing apparatus 1A according to the second embodiment of the present invention. Of the steps in the flowchart shown in FIG. 6, steps having the same contents as the steps in the flowchart shown in FIG.

図5および図6を参照して、まず、入力部10が、被写体OBJに入射する光の少なくとも一部を拡散部材402を介して撮像した第1撮像データg(1) RGB(m,n)を受入れる(ステップS100)。続いて、入力部10は、受入れた第1撮像データg(1) RGB(m,n)を代表する撮像データg(1) RGBを生成する(ステップS102)。なお、入力部10は、必要に応じて、第1撮像データを線形化する。 With reference to FIGS. 5 and 6, first, the input unit 10 captures at least part of the light incident on the subject OBJ through the diffusion member 402. First imaging data g (1) RGB (m, n) Is accepted (step S100). Subsequently, the input unit 10 generates imaging data g (1) RGB representing the received first imaging data g (1) RGB (m, n) (step S102). Note that the input unit 10 linearizes the first imaging data as necessary.

次に、光源データ格納部13Aが、予め格納する自己相関行列B,B,・・・,Bのうち、選択指令SELに応じて1つの自己相関行列を自己相関行列Bとして推定行列算出部12へ出力する(ステップS103)。その後、推定行列算出部12が、光源データ格納部13Aからの自己相関行列B、拡散部材402の分光透過率f(1)、撮像装置400の分光感度Sに基づいて、第1推定行列W(1)を算出する(ステップS104)。続いて、分光放射輝度算出部11が、ステップS104で算出された第1推定行列W(1)を用いて、撮像データg(1) RGBから被写体OBJに入射する照明光の分光放射輝度E(1)を算出する(ステップS106)。 Next, among the autocorrelation matrices B 1 , B 2 ,..., B M stored in advance by the light source data storage unit 13A, one autocorrelation matrix is estimated as an autocorrelation matrix B according to the selection command SEL. It outputs to the calculation part 12 (step S103). Thereafter, the estimation matrix calculator 12 determines the first estimation matrix W ( based on the autocorrelation matrix B from the light source data storage 13 </ b> A, the spectral transmittance f (1) of the diffusing member 402, and the spectral sensitivity S of the imaging device 400. 1) is calculated (step S104). Subsequently, the spectral radiance calculation unit 11 uses the first estimation matrix W (1) calculated in step S104, and the spectral radiance E ( 1) of the illumination light incident on the subject OBJ from the imaging data g (1) RGB. 1) is calculated (step S106).

次に、三刺激値変換部14が、分光放射輝度E(1)からXYZ表色系の三刺激値X,Y,Zを算出する(ステップS110)。続いて、座標変換部15が、XYZ表色系の三刺激値X,Y,Zを、RGB表色系において定義される座標値R(1),G(1),B(1)に変換する(ステップS112)。さらに、ホワイトバランス算出部16が、座標値R(1),G(1),B(1)の比に基づいて、撮像装置400におけるホワイトバランスを算出する(ステップS114)。 Next, the tristimulus value conversion unit 14 calculates tristimulus values X, Y, and Z of the XYZ color system from the spectral radiance E (1) (step S110). Subsequently, the coordinate conversion unit 15 converts the tristimulus values X, Y, and Z in the XYZ color system to coordinate values R (1) , G (1) , and B (1) defined in the RGB color system. (Step S112). Further, the white balance calculation unit 16 calculates the white balance in the imaging apparatus 400 based on the ratio of the coordinate values R (1) , G (1) , B (1) (step S114).

一方、入力部20が、照明環境下において撮像装置400により被写体OBJを撮像することで得られる第2撮像データg(2) RGB(m,n)を受入れる(ステップS120)。なお、入力部20は、必要に応じて、第2撮像データを線形化する。 On the other hand, the input unit 20 receives the second imaging data g (2) RGB (m, n) obtained by imaging the subject OBJ by the imaging device 400 in an illumination environment (step S120). The input unit 20 linearizes the second imaging data as necessary.

次に、推定行列算出部22が、被写体OBJに含まれ得る色の分光反射率から算出される自己相関行列A、照明スペクトル推定部100によって算出された照明光の分光放射輝度E(1)、撮像装置400の分光感度Sに基づいて、第2推定行列W(2)を算出する(ステップS122)。続いて、分光反射率算出部21が、ステップS122で算出された第2推定行列W(2)を用いて、第2撮像データg(2)から被写体OBJの分光反射率f(2)(m,n)を算出する(ステップS124)。さらに、画像データ生成部24が、等色関数h、被写体OBJに入射する照明光の分光放射輝度E(1)、ステップS124で算出さされた被写体OBJの分光反射率f(2)(m,n)を用いて、被写体OBJの色再現を行なった画像データg(OUT) XYZ(m,n)を生成する(ステップS126)。さらに、座標変換部25が、ステップS126において生成された画像データg(OUT) XYZ(m,n)をRGB表色系において定義される画像データg(OUT) RGB(m,n)に変換し(ステップS128)、この変換後の画像データg(OUT) RGB(m,n)を出力する。 Next, the estimation matrix calculation unit 22 calculates the autocorrelation matrix A calculated from the spectral reflectances of colors that can be included in the subject OBJ, the spectral radiance E (1) of the illumination light calculated by the illumination spectrum estimation unit 100, Based on the spectral sensitivity S of the imaging device 400, a second estimation matrix W (2) is calculated (step S122). Subsequently, the spectral reflectance calculation unit 21 uses the second estimation matrix W (2) calculated in step S122 to calculate the spectral reflectance f (2) (m ) of the subject OBJ from the second imaging data g (2). , N) is calculated (step S124). Further, the image data generating unit 24 uses the color matching function h, the spectral radiance E (1) of the illumination light incident on the subject OBJ, and the spectral reflectance f (2) (m, ) of the subject OBJ calculated in step S124. n) is used to generate image data g (OUT) XYZ (m, n) in which color reproduction of the subject OBJ is performed (step S126). Further, the coordinate conversion unit 25 converts the image data g (OUT) XYZ (m, n) generated in step S126 into image data g (OUT) RGB (m, n) defined in the RGB color system. (Step S128), the converted image data g (OUT) RGB (m, n) is output.

<本実施の形態による作用効果>
この発明の実施の形態2によれば、上述の実施の形態1と同様の作用効果を得ることができるとともに、被写体OBJの撮影状況などに応じて適切な自己相関行列を選択することで、照明光の分光放射輝度をより正確に推定することができる。
<Operational effects of the present embodiment>
According to the second embodiment of the present invention, it is possible to obtain the same effects as those of the first embodiment described above, and by selecting an appropriate autocorrelation matrix in accordance with the shooting situation of the subject OBJ, etc. The spectral radiance of light can be estimated more accurately.

[実施の形態2の変形例]
上述の実施の形態2においては、ユーザなどによる選択指令SELに応じて、複数の自己相関行列のうちいずれか1つが選択され、さらに、この選択された自己相関行列に基づいて、第1推定行列W(1)が生成される構成について例示した。この第1推定行列W(1)の生成には、拡散部材402の分光透過率f(1)および撮像装置400の分光感度Sが用いられるが、これらの値は、撮像装置400および拡散部材402が交換されない限り不変である。そこで、実施の形態2の変形例として、複数の自己相関行列B,B,・・・,Bからそれぞれ算出される複数の第1推定行列W(1) ,W(1) ,・・・,W(1) を予め算出しておく構成について例示する。
[Modification of Embodiment 2]
In the above-described second embodiment, any one of a plurality of autocorrelation matrices is selected in response to a selection command SEL by a user or the like, and the first estimation matrix is further based on the selected autocorrelation matrix. The configuration in which W (1) is generated has been illustrated. The first estimation matrix W (1) is generated using the spectral transmittance f (1) of the diffusing member 402 and the spectral sensitivity S of the imaging device 400. These values are used for the imaging device 400 and the diffusing member 402. As long as is not exchanged. Therefore, as a modification of the second embodiment, a plurality of auto-correlation matrix B 1, B 2, · · ·, a plurality of are calculated from B M first estimation matrix W (1) 1, W ( 1) 2 ,..., W (1) An example of a configuration in which m is calculated in advance will be described.

<全体構成>
図7は、この発明の実施の形態2の変形例に従う画像処理装置1Bの機能構成図である。
<Overall configuration>
FIG. 7 is a functional configuration diagram of an image processing device 1B according to a modification of the second embodiment of the present invention.

図7を参照して、画像処理装置1Bは、図5に示す画像処理装置1において、照明スペクトル推定部100に代えて、照明スペクトル推定部100Bを設けたものである。一方、色再現部200については、図1に示す画像処理装置1と同様であるので、詳細な説明は繰返さない。   Referring to FIG. 7, an image processing device 1B is provided with an illumination spectrum estimation unit 100B in place of the illumination spectrum estimation unit 100 in the image processing device 1 shown in FIG. On the other hand, color reproduction unit 200 is the same as that of image processing apparatus 1 shown in FIG. 1, and therefore detailed description will not be repeated.

照明スペクトル推定部100Bは、図1に示す照明スペクトル推定部100において、推定行列算出部12および光源データ格納部13に代えて、推定行列格納部17を設けたものである。その他の部位については、実施の形態1と同様であるので、詳細な説明は繰返さない。   The illumination spectrum estimation unit 100B includes an estimation matrix storage unit 17 in place of the estimation matrix calculation unit 12 and the light source data storage unit 13 in the illumination spectrum estimation unit 100 shown in FIG. Since other parts are the same as those in the first embodiment, detailed description will not be repeated.

推定行列格納部17は、照明環境を提供するために用いられ得る複数の光源の分光放射輝度に基づいて予め算出される第1推定行列W(1) ,W(1) ,・・・,W(1) を予め格納する。そして、推定行列格納部17は、ユーザなどからの外部指令に応じて、予め格納する第1推定行列W(1) ,W(1) ,・・・,W(1) のうち、選択されたものを分光放射輝度算出部11へ出力する。 The estimation matrix storage unit 17 includes first estimation matrices W (1) 1 , W (1) 2 ,... That are calculated in advance based on spectral radiances of a plurality of light sources that can be used to provide an illumination environment. , W (1) M is stored in advance. And the estimation matrix storage part 17 respond | corresponds to the external instruction | command from a user etc. among 1st estimation matrix W (1) 1 , W (1) 2 , ..., W (1) M stored beforehand. The selected one is output to the spectral radiance calculation unit 11.

この第1推定行列W(1) ,W(1) ,・・・,W(1) は、実施の形態2に従う画像処理装置1Aの光源データ格納部13Aに格納されるB,B,・・・,Bのからそれぞれ算出される。第1推定行列W(1) ,W(1) ,・・・,W(1) の算出に際して、既知の拡散部材402の分光透過率f(1)および撮像装置400の分光感度Sが用いられる。 The first estimation matrix W (1) 1, W ( 1) 2, ···, W (1) M is, B 1 is stored in the source data storage section 13A of the image processing apparatus 1A according to the second embodiment, It is calculated from B 2 ,..., B M , respectively. First estimation matrix W (1) 1, W ( 1) 2, ···, W (1) when calculating the M, the spectral sensitivity of the known spectral transmittance f (1) of the diffusion member 402 and the image pickup apparatus 400 S Is used.

なお、実施の形態2の変形例では、撮像装置400および拡散部材402の少なくとも一方が交換された場合には、光源データ格納部13Aに格納されるB,B,・・・,Bを再度計算する必要がある。 In the modification of the second embodiment, when at least one of the imaging device 400 and the diffusing member 402 is replaced, B 1 , B 2 ,..., B M stored in the light source data storage unit 13A. Need to be calculated again.

その他の処理については、基本的に上述した実施の形態1または2と同様であるので、詳細な説明は繰返さない。   Since other processes are basically the same as those in the first or second embodiment described above, detailed description will not be repeated.

なお、本発明と図7に示す各要素との対応関係については、入力部10が「入力手段」に相当し、推定行列格納部17が「第1算出手段」に相当し、三刺激値変換部14および座標変換部15が「第2算出手段」に相当し、ホワイトバランス算出部16が「第3算出手段」に相当し、分光反射率算出部21および推定行列算出部22が「第4算出手段」に相当し、画像データ生成部24が「生成手段」に相当する。   For the correspondence between the present invention and each element shown in FIG. 7, the input unit 10 corresponds to “input unit”, the estimated matrix storage unit 17 corresponds to “first calculation unit”, and the tristimulus value conversion The unit 14 and the coordinate conversion unit 15 correspond to the “second calculation unit”, the white balance calculation unit 16 corresponds to the “third calculation unit”, and the spectral reflectance calculation unit 21 and the estimation matrix calculation unit 22 correspond to the “fourth calculation unit”. The image data generation unit 24 corresponds to “generation means”.

<処理手順>
図8は、この発明の実施の形態2の変形例に従う画像処理装置1Bにおける全体処理手順を示すフローチャートである。なお、図8に示すフローチャート中の各ステップのうち、図4に示すフローチャート中のステップと同一内容のステップについては、同じ符号を付している。
<Processing procedure>
FIG. 8 is a flowchart showing an overall processing procedure in image processing apparatus 1B according to the modification of the second embodiment of the present invention. Of the steps in the flowchart shown in FIG. 8, steps having the same contents as those in the flowchart shown in FIG. 4 are denoted by the same reference numerals.

図7および図8を参照して、まず、入力部10が、被写体OBJに入射する光の少なくとも一部を拡散部材402を介して撮像した第1撮像データg(1) RGB(m,n)を受入れる(ステップS100)。続いて、入力部10は、受入れた第1撮像データg(1) RGB(m,n)を代表する撮像データg(1) RGBを生成する(ステップS102)。なお、入力部10は、必要に応じて、第1撮像データを線形化する。 With reference to FIGS. 7 and 8, first, the input unit 10 captures first imaging data g (1) RGB (m, n) obtained by imaging at least a part of the light incident on the subject OBJ through the diffusing member 402. Is accepted (step S100). Subsequently, the input unit 10 generates imaging data g (1) RGB representing the received first imaging data g (1) RGB (m, n) (step S102). Note that the input unit 10 linearizes the first imaging data as necessary.

次に、推定行列格納部17が、予め格納する第1推定行列W(1) ,W(1) ,・・・,W(1) のうち、選択指令SELに応じて1つの第1推定行列を第1推定行列W(1)として分光放射輝度算出部11へ出力する(ステップS105)。続いて、分光放射輝度算出部11が、ステップS105で選択された第1推定行列W(1)を用いて、撮像データg(1) RGBから被写体OBJに入射する照明光の分光放射輝度E(1)を算出する(ステップS106)。 Next, the estimation matrix storage unit 17 selects one of the first estimation matrices W (1) 1 , W (1) 2 ,..., W (1) M stored in advance according to the selection command SEL. One estimation matrix is output to the spectral radiance calculation unit 11 as a first estimation matrix W (1) (step S105). Subsequently, the spectral radiance calculation unit 11 uses the first estimation matrix W (1) selected in step S105, and the spectral radiance E ( 1) of the illumination light incident on the subject OBJ from the imaging data g (1) RGB. 1) is calculated (step S106).

次に、三刺激値変換部14が、分光放射輝度E(1)からXYZ表色系の三刺激値X,Y,Zを算出する(ステップS110)。続いて、座標変換部15が、XYZ表色系の三刺激値X,Y,Zを、RGB表色系において定義される座標値R(1),G(1),B(1)に変換する(ステップS112)。さらに、ホワイトバランス算出部16が、座標値R(1),G(1),B(1)の比に基づいて、撮像装置400におけるホワイトバランスを算出する(ステップS114)。 Next, the tristimulus value conversion unit 14 calculates tristimulus values X, Y, and Z of the XYZ color system from the spectral radiance E (1) (step S110). Subsequently, the coordinate conversion unit 15 converts the tristimulus values X, Y, and Z in the XYZ color system to coordinate values R (1) , G (1) , and B (1) defined in the RGB color system. (Step S112). Further, the white balance calculation unit 16 calculates the white balance in the imaging apparatus 400 based on the ratio of the coordinate values R (1) , G (1) , B (1) (step S114).

一方、入力部20が、照明環境下において撮像装置400により被写体OBJを撮像することで得られる第2撮像データg(2) RGB(m,n)を受入れる(ステップS120)。なお、入力部20は、必要に応じて、第2撮像データを線形化する。 On the other hand, the input unit 20 receives the second imaging data g (2) RGB (m, n) obtained by imaging the subject OBJ by the imaging device 400 in an illumination environment (step S120). The input unit 20 linearizes the second imaging data as necessary.

次に、推定行列算出部22が、被写体OBJに含まれ得る色の分光反射率から算出される自己相関行列A、照明スペクトル推定部100によって算出された照明光の分光放射輝度E(1)、撮像装置400の分光感度Sに基づいて、第2推定行列W(2)を算出する(ステップS122)。続いて、分光反射率算出部21が、ステップS122で算出された第2推定行列W(2)を用いて、第2撮像データg(2)から被写体OBJの分光反射率f(2)(m,n)を算出する(ステップS124)。さらに、画像データ生成部24が、等色関数h、被写体OBJに入射する照明光の分光放射輝度E(1)、ステップS124で算出さされた被写体OBJの分光反射率f(2)(m,n)を用いて、被写体OBJの色再現を行なった画像データg(OUT) XYZ(m,n)を生成する(ステップS126)。さらに、座標変換部25が、ステップS126において生成された画像データg(OUT) XYZ(m,n)をRGB表色系において定義される画像データg(OUT) RGB(m,n)に変換し(ステップS128)、この変換後の画像データg(OUT) RGB(m,n)を出力する。 Next, the estimation matrix calculation unit 22 calculates the autocorrelation matrix A calculated from the spectral reflectances of colors that can be included in the subject OBJ, the spectral radiance E (1) of the illumination light calculated by the illumination spectrum estimation unit 100, Based on the spectral sensitivity S of the imaging device 400, a second estimation matrix W (2) is calculated (step S122). Subsequently, the spectral reflectance calculation unit 21 uses the second estimation matrix W (2) calculated in step S122 to calculate the spectral reflectance f (2) (m ) of the subject OBJ from the second imaging data g (2). , N) is calculated (step S124). Further, the image data generating unit 24 uses the color matching function h, the spectral radiance E (1) of the illumination light incident on the subject OBJ, and the spectral reflectance f (2) (m, ) of the subject OBJ calculated in step S124. n) is used to generate image data g (OUT) XYZ (m, n) in which color reproduction of the subject OBJ is performed (step S126). Further, the coordinate conversion unit 25 converts the image data g (OUT) XYZ (m, n) generated in step S126 into image data g (OUT) RGB (m, n) defined in the RGB color system. (Step S128), the converted image data g (OUT) RGB (m, n) is output.

<本実施の形態による作用効果>
この発明の実施の形態2の変形例によれば、上述の実施の形態1および2と同様の作用効果を得ることができるとともに、複数の第1推定行列W(1) ,W(1) ,・・・,W(1) の算出処理を簡略化できるので、より演算処理を高速化できる。
<Operational effects of the present embodiment>
According to the modification of the second embodiment of the present invention, the same operational effects as those of the first and second embodiments can be obtained, and a plurality of first estimation matrices W (1) 1 , W (1) 2 ,..., W (1) Since the calculation process of M can be simplified, the calculation process can be further accelerated.

[実施の形態3]
上述の実施の形態2においては、光源データの種類毎に複数の自己相関行列を予め格納しておき、任意に選択された自己相関行列を用いて、照明光の分光放射輝度(スペクトル)の推定が行なわれる構成について例示した。一方、以下に説明する実施の形態3においては、複数の自己相関行列の各々を用いた照明光の分光放射輝度の推定結果に対して評価を行なった上で、最も適切な推定結果を出力する構成について例示する。
[Embodiment 3]
In Embodiment 2 described above, a plurality of autocorrelation matrices are stored in advance for each type of light source data, and the spectral radiance (spectrum) of illumination light is estimated using an arbitrarily selected autocorrelation matrix. The configuration in which is performed is illustrated. On the other hand, in Embodiment 3 described below, the most appropriate estimation result is output after evaluating the estimation result of the spectral radiance of the illumination light using each of the plurality of autocorrelation matrices. The configuration will be exemplified.

<全体構成>
この発明の実施の形態3に従う画像処理装置は、図1に示す実施の形態1に従う画像処理装置1において、照明スペクトル推定部100に代えて、照明スペクトル推定部100Cを設けたものである。一方、色再現部200については、図1に示す画像処理装置1と同様であるので、詳細な説明は繰返さない。
<Overall configuration>
The image processing apparatus according to the third embodiment of the present invention is the image processing apparatus 1 according to the first embodiment shown in FIG. 1 except that an illumination spectrum estimation unit 100C is provided instead of the illumination spectrum estimation unit 100. On the other hand, color reproduction unit 200 is the same as that of image processing apparatus 1 shown in FIG. 1, and therefore detailed description will not be repeated.

図9は、この発明の実施の形態3に従う画像処理装置の照明スペクトル推定部100Cの機能構成図である。なお、本実施の形態に従う画像処理装置に含まれる色再現部200については図示しない。   FIG. 9 is a functional configuration diagram of an illumination spectrum estimation unit 100C of the image processing device according to the third embodiment of the present invention. The color reproduction unit 200 included in the image processing apparatus according to the present embodiment is not shown.

図9を参照して、照明スペクトル推定部100Cは、入力部10と、分光放射輝度算出部11A,11B,11C,11Dと、選択部18と、評価部19と、三刺激値変換部14と、座標変換部15と、ホワイトバランス算出部16とをさらに含む。これらのうち、入力部10と、三刺激値変換部14と、座標変換部15と、ホワイトバランス算出部16とについては、実施の形態1(図1)において説明したので、詳細な説明は繰返さない。   Referring to FIG. 9, the illumination spectrum estimation unit 100C includes an input unit 10, spectral radiance calculation units 11A, 11B, 11C, and 11D, a selection unit 18, an evaluation unit 19, and a tristimulus value conversion unit 14. The coordinate conversion unit 15 and the white balance calculation unit 16 are further included. Among these, since the input unit 10, the tristimulus value conversion unit 14, the coordinate conversion unit 15, and the white balance calculation unit 16 have been described in the first embodiment (FIG. 1), detailed description will be repeated. Absent.

分光放射輝度算出部11A,11B,11C,11Dは、照明環境を提供するために用いられ得る複数の光源の分光放射輝度に基づいて算出される第1推定行列W(1) ,W(1) ,W(1) ,W(1) を用いて、撮像データg(1)から被写体OBJに入射する照明光の分光放射輝度E(1) ,E(1) ,E(1) ,E(1) をそれぞれ算出する。この第1推定行列W(1) ,W(1) ,W(1) ,W(1) は、図7に示す推定行列格納部17が格納する第1推定行列W(1) ,W(1) ,・・・,W(1) と実質的に同様である。すなわち、第1推定行列W(1) ,W(1) ,W(1) ,W(1) は、照明環境を提供するために用いられ得る複数の光源の種類毎に予め定められた自己相関行列B,B,・・・,Bに基づいて、上述した手順と同様の手順に従って算出される。なお、図9には4種類の第1推定行列W(1)を例示するが、第1推定行列W(1)は複数である限りにおいて、その数は制限されない。また、図9には、第1推定行列W(1) ,W(1) ,W(1) ,W(1) を予め算出しておく構成を例示するが、図5に示す照明スペクトル推定部100Aのように、演算処理毎に動的に算出してもよい。 Spectral radiance calculation units 11A, 11B, 11C, and 11D calculate first estimation matrices W (1) 1 , W (1 ) calculated based on spectral radiances of a plurality of light sources that can be used to provide an illumination environment. ) 2 , W (1) 3 , W (1) 4 , spectral radiance E (1) 1 , E (1) 2 , E ( ) of the illumination light incident on the subject OBJ from the imaging data g (1) 1) Calculate 3 and E (1) 4 respectively. The first estimation matrix W (1) 1 , W (1) 2 , W (1) 3 , W (1) 4 is the first estimation matrix W (1) stored in the estimation matrix storage unit 17 shown in FIG. 1 , W (1) 2 ,..., W (1) M is substantially the same as M. That is, the first estimation matrix W (1) 1 , W (1) 2 , W (1) 3 , W (1) 4 is determined in advance for each type of a plurality of light sources that can be used to provide an illumination environment. Based on the obtained autocorrelation matrices B 1 , B 2 ,..., B 4 , calculation is performed according to the same procedure as described above. In addition, although four types of 1st estimation matrix W (1) is illustrated in FIG. 9, as long as there are multiple 1st estimation matrices W (1) , the number is not restrict | limited. FIG. 9 illustrates a configuration in which the first estimation matrix W (1) 1 , W (1) 2 , W (1) 3 , W (1) 4 is calculated in advance. As with the illumination spectrum estimation unit 100A, the calculation may be dynamically performed for each calculation process.

本実施の形態では、一例として、第1推定行列W(1) は、蛍光灯の統計データに基づいて作成された自己相関行列Bから算出されており、第1推定行列W(1) は、白熱灯の統計データに基づいて作成された自己相関行列Bから算出されており、第1推定行列W(1) は、キセノン灯の統計データに基づいて作成された自己相関行列Bから算出されているものとする。さらに、第1推定行列W(1) は、蛍光灯、白熱灯、キセノン灯のすべてを含む統計データに基づいて作成された自己相関行列Bから算出されているものとする。 In the present embodiment, as an example, the first estimation matrix W (1) 1 is calculated from the autocorrelation matrix B 1 created based on the fluorescent lamp statistical data, and the first estimation matrix W (1) 2 is calculated from the autocorrelation matrix B 2 created based on the incandescent lamp statistical data, and the first estimation matrix W (1) 3 is the autocorrelation matrix created based on the xenon lamp statistical data. It assumed to be calculated from the B 3. Furthermore, it is assumed that the first estimation matrix W (1) 4 is calculated from an autocorrelation matrix B 4 created based on statistical data including all of the fluorescent lamp, the incandescent lamp, and the xenon lamp.

分光放射輝度算出部11A,11B,11C,11Dは、それぞれ算出した照明光の分光放射輝度E(1) ,E(1) ,E(1) ,E(1) を、選択部18へそれぞれ出力する。 Spectral radiance calculation units 11A, 11B, 11C, and 11D select the calculated spectral radiances E (1) 1 , E (1) 2 , E (1) 3 , and E (1) 4 of the illumination light, respectively. 18 respectively.

選択部18は、後述する評価部19による評価結果に従って、入力された照明光の分光放射輝度E(1) ,E(1) ,E(1) ,E(1) のうち1つを、照明光の分光放射輝度E(1)として出力する。 The selection unit 18 selects one of the spectral radiances E (1) 1 , E (1) 2 , E (1) 3 , and E (1) 4 of the input illumination light according to the evaluation result by the evaluation unit 19 described later. Are output as the spectral radiance E (1) of the illumination light.

評価部19は、分光放射輝度算出部11A,11B,11C,11Dがそれぞれ算出した照明光の分光放射輝度E(1) ,E(1) ,E(1) ,E(1) のうち、最も適切に推定がなされたものを評価する。より具体的には、評価部19は、予め規定した基準パターンと比較することで、照明光の分光放射輝度E(1) ,E(1) ,E(1) ,E(1) を評価する。 The evaluation unit 19 includes spectral radiances E (1) 1 , E (1) 2 , E (1) 3 , E (1) 4 of the illumination light calculated by the spectral radiance calculation units 11A, 11B, 11C, and 11D, respectively. Of these, the one that is most appropriately estimated is evaluated. More specifically, the evaluation unit 19 compares the spectral radiance E (1) 1 , E (1) 2 , E (1) 3 , E (1) of the illumination light by comparing with a reference pattern defined in advance. 4 is evaluated.

本実施の形態では、一例として、それぞれ第1推定行列W(1) ,W(1) ,W(1) (あるいは、対応する自己相関行列B,B,B)の算出時に用いた光源の分光放射輝度(統計値または実測値)からそれぞれ算出した基準パターンE(1) 1AVE,E(1) 2AVE,E(1) 3AVEを用いる。より具体的には、たとえば、第1推定行列W(1) に対応する基準パターンE(1) 1AVEは、第1推定行列W(1) の算出に用いた自己相関行列Bの生成元となった光源の群行列Est(図3参照)の各要素を平均化することで算出される。すなわち、図3に示すように、光源iの群行列Estが成分値e(λ){1≦i≦N,1≦j≦k}からなる場合には、対応する基準パターンE(1) AVEの各サンプリング波長λ(1≦j≦k)における成分値をeAVE(λ)とすると、以下のような関係が成立する。 In the present embodiment, as an example, calculation of first estimation matrices W (1) 1 , W (1) 2 , W (1) 3 (or corresponding autocorrelation matrices B 1 , B 2 , B 3 ), respectively. The reference patterns E (1) 1AVE , E (1) 2AVE , E (1) 3AVE calculated from the spectral radiance (statistical value or actually measured value) of the light source used at times are used. More specifically, for example, a reference pattern E (1) 1AVE corresponding to the first estimation matrix W (1) 1, the generation of the autocorrelation matrix B 1 used in the calculation of the first estimated matrix W (1) 1 It is calculated by averaging each element of the original light source group matrix E st (see FIG. 3). That is, as shown in FIG. 3, when the group matrix E st of the light source i is composed of component values e ij ) {1 ≦ i ≦ N, 1 ≦ j ≦ k}, the corresponding reference pattern E ( 1) When the sampling wavelength lambda j of AVE component values in (1 ≦ j ≦ k) and e AVEj), the following relationship is established.

成分値eAVE(λ)={e(λ)+e(λ)+・・・+e(λ)}/N
本実施の形態では、このような算出手順に従って、基準パターンとして、蛍光灯、白熱灯、キセノン灯のそれぞれを代表する分光放射輝度(スペクトル)が予め算出される。なお、第1推定行列W(1) に対応する基準パターンについては、必ずしも算出する必要はない。これは、第1推定行列W(1) に対応する自己相関行列Bが蛍光灯、白熱灯、キセノン灯のすべてを含む統計データに基づいて作成されたものであるため、この自己相関行列Bから基準パターンを作成したとしても、各光源の特徴がぼやけてしまい、基準パターンとしての効果が薄まるからである。
Component value e AVEj ) = {e 1j ) + e 2j ) +... + E Nj )} / N
In the present embodiment, according to such a calculation procedure, spectral radiance (spectrum) representative of each of a fluorescent lamp, an incandescent lamp, and a xenon lamp is calculated in advance as a reference pattern. Note that the reference pattern corresponding to the first estimation matrix W (1) 4 is not necessarily calculated. This is because the autocorrelation matrix B 4 corresponding to the first estimation matrix W (1) 4 is created based on statistical data including all of the fluorescent lamp, the incandescent lamp, and the xenon lamp. even create a reference pattern from the B 4, will blurred characteristics of each light source, because the effect of the reference pattern Usumaru.

次に、図10および図11を参照して、評価部19による照明光の分光放射輝度E(1) ,E(1) ,E(1) ,E(1) の評価方法について説明する。 Next, with reference to FIG. 10 and FIG. 11, the evaluation unit 19 evaluates the spectral radiance E (1) 1 , E (1) 2 , E (1) 3 , E (1) 4 of the illumination light. explain.

図10は、評価部19による照明光の分光放射輝度E(1) ,E(1) ,E(1) と基準パターンE(1) 1AVE,E(1) 2AVE,E(1) 3AVEとの比較処理を説明するための図である。図11は、図10における類似度の算出処理を説明するための図である。 FIG. 10 shows the spectral radiance E (1) 1 , E (1) 2 , E (1) 3 and the reference pattern E (1) 1AVE , E (1) 2AVE , E (1) of the illumination light by the evaluation unit 19. It is a figure for demonstrating the comparison process with 3AVE . FIG. 11 is a diagram for explaining the similarity calculation process in FIG. 10.

図10を参照して、評価部19は、分光放射輝度算出部11A,11B,11Cがそれぞれ算出した照明光の分光放射輝度E(1) ,E(1) ,E(1) と基準パターンE(1) 1AVE,E(1) 2AVE,E(1) 3AVEとをそれぞれ比較し、比較結果(一例として、類似度)を算出する。なお、照明光の分光放射輝度E(1) ,E(1) ,E(1) および基準パターンE(1) 1AVE,E(1) 2AVE,E(1) 3AVEは、いずれも0〜1の範囲に規格化されているものとする。 Referring to FIG. 10, the evaluation unit 19 includes spectral radiances E (1) 1 , E (1) 2 , E (1) 3 of illumination light calculated by the spectral radiance calculation units 11A, 11B, and 11C, respectively. The reference patterns E (1) 1AVE , E (1) 2AVE , E (1) 3AVE are respectively compared, and the comparison result (similarity as an example) is calculated. The spectral radiance E (1) 1 , E (1) 2 , E (1) 3 and the reference pattern E (1) 1AVE , E (1) 2AVE , E (1) 3AVE are all 0. It is assumed that it is standardized in the range of ~ 1.

図10(a)に示すように、蛍光灯の統計データに基づいて作成された基準パターンE(1) 1AVEでは、特定の波長にピークが存在している。一方、図10(b)に示すように、白熱灯の統計データに基づいて作成された基準パターンE(1) 2AVEでは、ピークは存在せず、波長が長くなるほどその輝度が高くなっていることがわかる。また、図10(c)に示すように、キセノン灯の統計データに基づいて作成された基準パターンE(1) 3AVEでは、若干のピークが存在するとともに、可視光領域のほぼ全体に亘って高い輝度を有していることがわかる。 As shown in FIG. 10A, in the reference pattern E (1) 1AVE created based on the fluorescent lamp statistical data, there is a peak at a specific wavelength. On the other hand, as shown in FIG. 10B, in the reference pattern E (1) 2AVE created based on the statistical data of the incandescent lamp, there is no peak, and the luminance increases as the wavelength increases. I understand. In addition, as shown in FIG. 10C , the reference pattern E (1) 3AVE created based on the statistical data of the xenon lamp has a slight peak and is high over almost the entire visible light region. It turns out that it has a brightness | luminance.

評価部19は、各分光放射輝度が対応する基準パターンにどの程度類似しているかについて評価する。代表的に、評価部19は、波長領域上の波形同士の偏差に基づいて、類似度を算出する。   The evaluation unit 19 evaluates how similar each spectral radiance is to the corresponding reference pattern. Typically, the evaluation unit 19 calculates the similarity based on the deviation between the waveforms on the wavelength region.

図11は、分光放射輝度算出部11Aが算出した照明光の分光放射輝度E(1) と基準パターンE(1) 1AVEとの比較処理を説明するための図を示す。図11(a)は、照明光の分光放射輝度E(1) と基準パターンE(1) 1AVEとを同一の波長領域上にプロットした状態を示し、図11(b)は、各波長における偏差を算出する処理を示す。 FIG. 11 is a diagram for explaining a comparison process between the spectral radiance E (1) 1 of the illumination light calculated by the spectral radiance calculation unit 11A and the reference pattern E (1) 1AVE . FIG. 11A shows a state in which the spectral radiance E (1) 1 of the illumination light and the reference pattern E (1) 1AVE are plotted on the same wavelength region, and FIG. The process which calculates a deviation is shown.

評価部19は、各サンプリング波長λ(1≦j≦k)において、照明光の分光放射輝度E(1) と基準パターンE(1) 1AVEとの間の偏差(規格化値)err(1≦j≦k)を順次算出する。続いて、評価部19は、サンプリング波長λの偏差errのすべてについての総和平均を算出することで、評価結果(類似度)を算出する。すなわち、類似度SMは、サンプリング波長λの偏差errを用いて、以下のような演算式で算出できる。 The evaluation unit 19 calculates the deviation (standardized value) err j between the spectral radiance E (1) 1 of the illumination light and the reference pattern E (1) 1AVE at each sampling wavelength λ j (1 ≦ j ≦ k). (1 ≦ j ≦ k) is calculated sequentially. Subsequently, the evaluation unit 19 calculates an evaluation result (similarity) by calculating a total average of all the deviations err j of the sampling wavelength λ j . That is, the similarity SM can be calculated by the following arithmetic expression using the deviation err j of the sampling wavelength λ j .

類似度SM={1−(err+err+・・・+err)/k}×100[%]
なお、図10には、蛍光灯の照明環境下で本実施の形態に従う画像処理方法を実施した場合に実測された類似度を示す。このような類似度の算出処理の結果、第1推定行列W(1) に基づいて推定された照明光の分光放射輝度E(1) の類似度が最も高く、評価部19は、この照明光の分光放射輝度E(1) を分光放射輝度E(1)として出力する。また、この評価結果は、実際に蛍光灯の照明環境下で実測したという事実に合致する。
Similarity SM = {1- (err 1 + err 2 +... + Err k ) / k} × 100 [%]
FIG. 10 shows the measured similarity when the image processing method according to the present embodiment is performed under the illumination environment of a fluorescent lamp. As a result of the similarity calculation process, the similarity of the spectral radiance E (1) 1 of the illumination light estimated based on the first estimation matrix W (1) 1 is the highest. The spectral radiance E (1) 1 of the illumination light is output as the spectral radiance E (1) . Moreover, this evaluation result agrees with the fact that it was actually measured under the fluorescent lamp illumination environment.

また、被写体OBJの照明環境が、蛍光灯、白熱灯、キセノン灯を組み合わせることで提供されている場合や、これら以外の光源によって提供されている場合には、照明光の分光放射輝度E(1) ,E(1) ,E(1) のいずれについても、その類似度が十分高くない場合も想定される。このような場合には、蛍光灯、白熱灯、キセノン灯の特徴をすべて反映した第1推定行列W(1) に基づいて推定された照明光の分光放射輝度E(1) を照明光の分光放射輝度E(1)として出力する場合が適切な場合もある。そこで、評価部19は、照明光の分光放射輝度E(1) ,E(1) ,E(1) についての評価結果(類似度)がいずれも許容値を下回っている場合などには、分光放射輝度E(1) を照明光の分光放射輝度E(1)として出力する。 Further, when the illumination environment of the subject OBJ is provided by combining a fluorescent lamp, an incandescent lamp, and a xenon lamp, or provided by a light source other than these, the spectral radiance E (1) of the illumination light. ) 1 , E (1) 2 , E (1) For any of 3 , it is assumed that the degree of similarity is not sufficiently high. In such a case, the spectral radiance E (1) 4 of the illumination light estimated based on the first estimation matrix W (1) 4 reflecting all the characteristics of the fluorescent lamp, the incandescent lamp, and the xenon lamp is used as the illumination light. It may be appropriate to output as the spectral radiance E (1) . Therefore, the evaluation unit 19 is used when the evaluation results (similarities) for the spectral radiances E (1) 1 , E (1) 2 , E (1) 3 of the illumination light are all below the allowable value. outputs the spectral radiance E (1) 4 as the spectral radiance E of the illumination light (1).

なお、上述の説明では、分光放射輝度算出部11A,11B,11C,11Dが、照明光の分光放射輝度E(1) ,E(1) ,E(1) ,E(1) を並行して同時に算出し、その後類似度を算出する構成について例示したが、第1推定行列の各々について、照明光の分光放射輝度の算出処理と類似度の算出処理とを順次実行するようにしてもよい。この場合には、いずれかの第1推定行列により推定された照明光の分光放射輝度についての類似度が、所定しきい値(たとえば、95%)を超えたことが判明した時点で、以後の処理を行なうことなく、当該次元の分光放射輝度を出力できるので、処理を簡素化することができる。 In the above description, the spectral radiance calculation units 11A, 11B, 11C, and 11D perform spectral radiance E (1) 1 , E (1) 2 , E (1) 3 , E (1) 4 of illumination light. However, the calculation process of the spectral radiance of the illumination light and the calculation process of the similarity degree are sequentially executed for each of the first estimation matrices. May be. In this case, when it is determined that the similarity with respect to the spectral radiance of the illumination light estimated by any of the first estimation matrices exceeds a predetermined threshold (for example, 95%), Since the spectral radiance of the dimension can be output without performing the process, the process can be simplified.

また、第1推定行列W(1) に基づいて照明光の分光放射輝度E(1) を推定する必然性はない。すなわち、照明光の分光放射輝度E(1) ,E(1) ,E(1) についての類似度がいずれも許容値を下回っている場合には、推定不可能を出力してもよい。 Further, there is no necessity to estimate the spectral radiance E (1) 4 of the illumination light based on the first estimation matrix W (1) 4 . In other words, if the similarities of the spectral radiances E (1) 1 , E (1) 2 , and E (1) 3 of the illumination light are all below the allowable value, the estimation impossible is output. Good.

また、上述した、偏差に基づく類似度の算出に代えて、相関係数などを用いて類似度を算出してもよい。   Further, instead of calculating the similarity based on the deviation described above, the similarity may be calculated using a correlation coefficient or the like.

その他の処理については、基本的に上述した実施の形態1と同様であるので、詳細な説明は繰返さない。   Other processes are basically the same as those in the first embodiment described above, and thus detailed description will not be repeated.

なお、本発明と図9に示す各要素との対応関係については、入力部10が「入力手段」に相当し、11A,11B,11C,11Dが「第1算出手段」に相当し、選択部18および評価部19が「評価手段」に相当する。   For the correspondence between the present invention and each element shown in FIG. 9, the input unit 10 corresponds to “input means”, 11A, 11B, 11C, and 11D correspond to “first calculation means”, and the selection unit 18 and the evaluation unit 19 correspond to “evaluation means”.

<処理手順>
本実施の形態に従う画像処理装置における処理手順をまとめると、以下のようになる。
<Processing procedure>
The processing procedure in the image processing apparatus according to the present embodiment is summarized as follows.

図12は、この発明の実施の形態3に従う画像処理装置における全体処理手順を示すフローチャートである。なお、図12に示すフローチャート中の各ステップのうち、図4に示すフローチャート中のステップと同一内容のステップについては、同じ符号を付している。また、図13は、図12に示すステップS108に示す評価サブルーチンの処理手順を示すフローチャートである。   FIG. 12 is a flowchart showing an overall processing procedure in the image processing apparatus according to the third embodiment of the present invention. Of the steps in the flowchart shown in FIG. 12, steps having the same contents as those in the flowchart shown in FIG. 4 are denoted by the same reference numerals. FIG. 13 is a flowchart showing the procedure of the evaluation subroutine shown in step S108 shown in FIG.

図9および図12を参照して、まず、入力部10が、被写体OBJに入射する光の少なくとも一部を拡散部材402を介して撮像した第1撮像データg(1) RGB(m,n)を受入れる(ステップS100)。続いて、入力部10は、受入れた第1撮像データg(1) RGB(m,n)を代表する撮像データg(1) RGBを生成する(ステップS102)。なお、入力部10は、必要に応じて、第1撮像データを線形化する。 With reference to FIGS. 9 and 12, first, the input unit 10 captures at least part of the light incident on the object OBJ through the diffusion member 402. First imaging data g (1) RGB (m, n) Is accepted (step S100). Subsequently, the input unit 10 generates imaging data g (1) RGB representing the received first imaging data g (1) RGB (m, n) (step S102). Note that the input unit 10 linearizes the first imaging data as necessary.

次に、分光放射輝度算出部11A,11B,11C,11Dが、それぞれ第1推定行列W(1) ,W(1) ,W(1) ,W(1) を用いて、撮像データg(1) RGBから被写体OBJに入射する照明光の分光放射輝度E(1) ,E(1) ,E(1) ,E(1) をそれぞれ算出する(ステップS107)。続いて、評価部19が、評価サブルーチンを実行し、ステップS107で算出された照明光の分光放射輝度E(1) ,E(1) ,E(1) ,E(1) のうち最も推定精度の高いものを評価する(ステップS108)。さらに、選択部18が、ステップS108における評価結果に従って、照明光の分光放射輝度E(1) ,E(1) ,E(1) ,E(1) のうち1つを、照明光の分光放射輝度E(1)として出力する(ステップS109)。 Next, the spectral radiance calculation units 11A, 11B, 11C, and 11D capture images using the first estimation matrices W (1) 1 , W (1) 2 , W (1) 3 , and W (1) 4 , respectively. Data g (1) Spectral radiance E (1) 1 , E (1) 2 , E (1) 3 , E (1) 4 of the illumination light incident on the subject OBJ from RGB is calculated (step S107). Subsequently, the evaluation unit 19 executes an evaluation subroutine, and the spectral radiances E (1) 1 , E (1) 2 , E (1) 3 , and E (1) 4 of the illumination light calculated in step S107. Among them, the one with the highest estimation accuracy is evaluated (step S108). Further, the selection unit 18 illuminates one of the spectral radiances E (1) 1 , E (1) 2 , E (1) 3 , E (1) 4 of the illumination light according to the evaluation result in step S108. Output as spectral radiance E (1) of light (step S109).

次に、三刺激値変換部14が、分光放射輝度E(1)からXYZ表色系の三刺激値X,Y,Zを算出する(ステップS110)。続いて、座標変換部15が、XYZ表色系の三刺激値X,Y,Zを、RGB表色系において定義される座標値R(1),G(1),B(1)に変換する(ステップS112)。さらに、ホワイトバランス算出部16が、座標値R(1),G(1),B(1)の比に基づいて、撮像装置400におけるホワイトバランスを算出する(ステップS114)。 Next, the tristimulus value conversion unit 14 calculates tristimulus values X, Y, and Z of the XYZ color system from the spectral radiance E (1) (step S110). Subsequently, the coordinate conversion unit 15 converts the tristimulus values X, Y, and Z in the XYZ color system to coordinate values R (1) , G (1) , and B (1) defined in the RGB color system. (Step S112). Further, the white balance calculation unit 16 calculates the white balance in the imaging apparatus 400 based on the ratio of the coordinate values R (1) , G (1) , B (1) (step S114).

一方、入力部20が、照明環境下において撮像装置400により被写体OBJを撮像することで得られる第2撮像データg(2) RGB(m,n)を受入れる(ステップS120)。なお、入力部20は、必要に応じて、第2撮像データを線形化する。 On the other hand, the input unit 20 receives the second imaging data g (2) RGB (m, n) obtained by imaging the subject OBJ by the imaging device 400 in an illumination environment (step S120). The input unit 20 linearizes the second imaging data as necessary.

次に、推定行列算出部22が、被写体OBJに含まれ得る色の分光反射率から算出される自己相関行列A、照明スペクトル推定部100によって算出された照明光の分光放射輝度E(1)、撮像装置400の分光感度Sに基づいて、第2推定行列W(2)を算出する(ステップS122)。続いて、分光反射率算出部21が、ステップS122で算出された第2推定行列W(2)を用いて、第2撮像データg(2)から被写体OBJの分光反射率f(2)(m,n)を算出する(ステップS124)。さらに、画像データ生成部24が、等色関数h、被写体OBJに入射する照明光の分光放射輝度E(1)、ステップS124で算出さされた被写体OBJの分光反射率f(2)(m,n)を用いて、被写体OBJの色再現を行なった画像データg(OUT) XYZ(m,n)を生成する(ステップS126)。さらに、座標変換部25が、ステップS126において生成された画像データg(OUT) XYZ(m,n)をRGB表色系において定義される画像データg(OUT) RGB(m,n)に変換し(ステップS128)、この変換後の画像データg(OUT) RGB(m,n)を出力する。 Next, the estimation matrix calculation unit 22 calculates the autocorrelation matrix A calculated from the spectral reflectances of colors that can be included in the subject OBJ, the spectral radiance E (1) of the illumination light calculated by the illumination spectrum estimation unit 100, Based on the spectral sensitivity S of the imaging device 400, a second estimation matrix W (2) is calculated (step S122). Subsequently, the spectral reflectance calculation unit 21 uses the second estimation matrix W (2) calculated in step S122 to calculate the spectral reflectance f (2) (m ) of the subject OBJ from the second imaging data g (2). , N) is calculated (step S124). Further, the image data generating unit 24 uses the color matching function h, the spectral radiance E (1) of the illumination light incident on the subject OBJ, and the spectral reflectance f (2) (m, ) of the subject OBJ calculated in step S124. n) is used to generate image data g (OUT) XYZ (m, n) in which color reproduction of the subject OBJ is performed (step S126). Further, the coordinate conversion unit 25 converts the image data g (OUT) XYZ (m, n) generated in step S126 into image data g (OUT) RGB (m, n) defined in the RGB color system. (Step S128), the converted image data g (OUT) RGB (m, n) is output.

図13を参照して、評価部19は、照明光の分光放射輝度E(1) と予め定められた基準パターンE(1) 1AVEとを比較することで、両者の間の類似度SMを算出する(ステップS200)。同様に、評価部19は、照明光の分光放射輝度E(1) と予め定められた基準パターンE(1) 2AVEとを比較することで、両者の間の類似度SMを算出する(ステップS202)。同様に、評価部19は、照明光の分光放射輝度E(1) と予め定められた基準パターンE(1) 3AVEとを比較することで、両者の間の類似度SMを算出する(ステップS204)。 Referring to FIG. 13, the evaluation unit 19 compares the spectral radiance E (1) 1 of the illumination light with a predetermined reference pattern E (1) 1AVE , thereby determining the similarity SM 1 between the two. Is calculated (step S200). Similarly, the evaluation unit 19 compares the spectral radiance E (1) 2 of the illumination light with a predetermined reference pattern E (1) 2AVE to calculate the similarity SM 2 between them ( Step S202). Similarly, the evaluation unit 19 compares the spectral radiance E (1) 3 of the illumination light with a predetermined reference pattern E (1) 3AVE to calculate a similarity SM 3 between them ( Step S204).

続いて、評価部19は、ステップS200,S202,S204において算出された類似度SM,SM,SMのうち、その値が最も高いものを抽出する(ステップS206)。さらに、評価部19は、ステップS206で抽出した類似度が所定の許容値以上であるか否かを判断する(ステップS208)。 Subsequently, the evaluation unit 19 extracts the one having the highest value among the similarities SM 1 , SM 2 , SM 3 calculated in steps S200, S202, S204 (step S206). Furthermore, the evaluation unit 19 determines whether or not the similarity extracted in step S206 is greater than or equal to a predetermined allowable value (step S208).

類似度が所定の許容値以上である場合(ステップS208においてYESの場合)には、評価部19は、ステップS206で抽出した類似度に対応する分光放射輝度が最も推定精度の高いと評価する(ステップS210)。   If the similarity is equal to or greater than a predetermined allowable value (YES in step S208), the evaluation unit 19 evaluates that the spectral radiance corresponding to the similarity extracted in step S206 has the highest estimation accuracy ( Step S210).

一方、類似度が所定の許容値以上でない場合(ステップS208においてNOの場合)には、評価部19は、照明光の分光放射輝度E(1) ,E(1) ,E(1) 以外、すなわち
照明光の分光放射輝度E(1) が最も推定精度の高いと評価する(ステップS212)。
On the other hand, when the similarity is not equal to or greater than the predetermined allowable value (NO in step S208), the evaluation unit 19 evaluates the spectral radiance E (1) 1 , E (1) 2 , E (1) of the illumination light. It is evaluated that the spectral radiance E (1) 4 of illumination light other than 3 has the highest estimation accuracy (step S212).

その後、処理は図12のステップS109に進む。
<本実施の形態による作用効果>
この発明の実施の形態3によれば、上述の実施の形態1と同様の作用効果を得ることができるとともに、何らの予備知識を持たないユーザであっても、照明光の分光放射輝度を高い推定精度で取得することができる。そのため、被写体OBJが様々な条件下で行なわれたとしても、照明光の分光放射輝度の推定精度を維持できる。
Thereafter, the processing proceeds to step S109 in FIG.
<Operational effects of the present embodiment>
According to the third embodiment of the present invention, the same operational effects as those of the above-described first embodiment can be obtained, and the spectral radiance of illumination light is high even for a user who does not have any prior knowledge. It can be obtained with estimation accuracy. Therefore, even if the subject OBJ is performed under various conditions, the estimation accuracy of the spectral radiance of the illumination light can be maintained.

[実施の形態1〜3の変形例]
上述の実施の形態1〜3においては、主としてハードウェアで構成された画像処理装置を用いる構成について例示したが、その全部または一部をソフトウェアで実現してもよい。すなわち、コンピュータを用いて、画像処理装置における処理を実現してもよい。
[Modification of Embodiments 1 to 3]
In the above-described first to third embodiments, the configuration using the image processing apparatus mainly configured by hardware is illustrated, but all or a part thereof may be realized by software. That is, the processing in the image processing apparatus may be realized using a computer.

図14は、この発明の実施の形態の変形例に従う画像処理装置1#を実現するコンピュータの概略構成図である。   FIG. 14 is a schematic configuration diagram of a computer that realizes an image processing apparatus 1 # according to a modification of the embodiment of the present invention.

図14を参照して、コンピュータは、FD(Flexible Disk)駆動装置166およびCD−ROM(Compact Disk-Read Only Memory)駆動装置168を搭載したコンピュータ本体150と、モニタ152と、キーボード154と、マウス156とを含む。   Referring to FIG. 14, the computer includes a computer main body 150 on which an FD (Flexible Disk) driving device 166 and a CD-ROM (Compact Disk-Read Only Memory) driving device 168 are mounted, a monitor 152, a keyboard 154, and a mouse. 156.

コンピュータ本体150は、相互にバスで接続された、演算装置であるCPU(Central Processing Unit)160と、メモリ162と、記憶装置である固定ディスク164と、通信インターフェース170とをさらに含む。   The computer main body 150 further includes a CPU (Central Processing Unit) 160 that is an arithmetic device, a memory 162, a fixed disk 164 that is a storage device, and a communication interface 170 that are connected to each other via a bus.

FD駆動装置166にはFD166aが装着され、CD−ROM駆動装置168にはCD−ROM168aが装着される。本実施の形態の変形例に従う画像処理装置1#は、CPU160がメモリ162などのコンピュータハードウェアを用いて、ソフトウェアを実行することで実現できる。一般的に、このようなソフトウェアは、FD166aやCD−ROM168aなどの記録媒体に格納されて、またはネットワークなどを介して流通する。そして、このようなソフトウェアは、FD駆動装置166やCD−ROM駆動装置168などにより記録媒体から読取られて、または通信インターフェース170にて受信されて、固定ディスク164に格納される。さらに、固定ディスク164からメモリ162に読出されて、CPU160により実行される。   An FD 166a is mounted on the FD driving device 166, and a CD-ROM 168a is mounted on the CD-ROM driving device 168. Image processing apparatus 1 # according to the modification of the present embodiment can be realized by CPU 160 executing software using computer hardware such as memory 162. In general, such software is stored in a recording medium such as the FD 166a or the CD-ROM 168a, or distributed via a network or the like. Such software is read from a recording medium by the FD driving device 166, the CD-ROM driving device 168, or the like, or received by the communication interface 170 and stored in the fixed disk 164. Further, it is read from the fixed disk 164 to the memory 162 and executed by the CPU 160.

モニタ152は、CPU160が出力する情報を表示するための表示部であって、一例としてLCD(Liquid Crystal Display)やCRT(Cathode Ray Tube)などから構成される。マウス156は、クリックやスライドなどの動作に応じたユーザから指令を受付ける。キーボード154は、入力されるキーに応じたユーザから指令を受付ける。CPU160は、プログラムされた命令を順次実行することで、各種の演算を実施する演算処理部である。メモリ162は、CPU160のプログラム実行に応じて、各種の情報を記憶する。通信インターフェース170は、CPU160が出力した情報を、例えば電気信号に変換して他の装置へ送出するとともに、他の装置から電気信号を受信してCPU160が利用できる情報に変換する。固定ディスク164は、CPU160が実行するプログラムや予め定められたデータなどを記憶する不揮発性の記憶装置である。また、コンピュータには、必要に応じて、プリンタなどの他の出力装置が接続されてもよい。   The monitor 152 is a display unit for displaying information output by the CPU 160, and includes, for example, an LCD (Liquid Crystal Display) or a CRT (Cathode Ray Tube). The mouse 156 receives a command from a user corresponding to an operation such as click or slide. The keyboard 154 receives a command from the user corresponding to the input key. The CPU 160 is an arithmetic processing unit that executes various arithmetic operations by sequentially executing programmed instructions. The memory 162 stores various types of information according to the program execution of the CPU 160. The communication interface 170 converts the information output from the CPU 160 into, for example, an electrical signal and sends it to another device, and receives the electrical signal from the other device and converts it into information that can be used by the CPU 160. Fixed disk 164 is a non-volatile storage device that stores programs executed by CPU 160 and predetermined data. In addition, other output devices such as a printer may be connected to the computer as necessary.

さらに、本実施の形態に係るプログラムは、コンピュータのオペレーティングシステム(OS)の一部として提供されるプログラムモジュールのうち、必要なモジュールを所定の配列で所定のタイミングで呼出して処理を実行させるものであってもよい。その場合、プログラム自体には上記モジュールが含まれずOSと協働して処理が実行される。このようなモジュールを含まないプログラムも、本発明に係るプログラムに含まれ得る。   Furthermore, the program according to the present embodiment is a program module that is provided as a part of a computer operating system (OS) and calls necessary modules in a predetermined arrangement at a predetermined timing to execute processing. There may be. In that case, the program itself does not include the module, and the process is executed in cooperation with the OS. A program that does not include such a module can also be included in the program according to the present invention.

また、本実施の形態に係るプログラムは他のプログラムの一部に組込まれて提供されるものであってもよい。その場合にも、プログラム自体には上記他のプログラムに含まれるモジュールが含まれず、他のプログラムと協働して処理が実行される。   Further, the program according to the present embodiment may be provided by being incorporated in a part of another program. Even in this case, the program itself does not include the module included in the other program, and the process is executed in cooperation with the other program.

今回開示された実施の形態はすべての点で例示であって制限的なものではないと考えられるべきである。本発明の範囲は上記した説明ではなくて特許請求の範囲によって示され、特許請求の範囲と均等の意味および範囲内でのすべての変更が含まれることが意図される。   The embodiment disclosed this time should be considered as illustrative in all points and not restrictive. The scope of the present invention is defined by the terms of the claims, rather than the description above, and is intended to include any modifications within the scope and meaning equivalent to the terms of the claims.

この発明の実施の形態1に従う画像処理装置の機能構成図である。1 is a functional configuration diagram of an image processing device according to a first embodiment of the present invention. この発明の実施の形態1に従う画像処理装置において処理対象となる撮像データの取得方法を説明するための図である。It is a figure for demonstrating the acquisition method of the imaging data used as the process target in the image processing apparatus according to Embodiment 1 of this invention. この発明の実施の形態1に従う分光放射輝度の自己相関行列の生成処理を説明するための図である。It is a figure for demonstrating the production | generation process of the autocorrelation matrix of the spectral radiance according to Embodiment 1 of this invention. この発明の実施の形態1に従う画像処理装置における全体処理手順を示すフローチャートである。It is a flowchart which shows the whole process sequence in the image processing apparatus according to Embodiment 1 of this invention. この発明の実施の形態2に従う画像処理装置の機能構成図である。It is a function block diagram of the image processing apparatus according to Embodiment 2 of this invention. この発明の実施の形態2に従う画像処理装置における全体処理手順を示すフローチャートである。It is a flowchart which shows the whole process sequence in the image processing apparatus according to Embodiment 2 of this invention. この発明の実施の形態2の変形例に従う画像処理装置の機能構成図である。It is a function block diagram of the image processing apparatus according to the modification of Embodiment 2 of this invention. この発明の実施の形態2の変形例に従う画像処理装置における全体処理手順を示すフローチャートである。It is a flowchart which shows the whole process sequence in the image processing apparatus according to the modification of Embodiment 2 of this invention. この発明の実施の形態3に従う画像処理装置の照明スペクトル推定部の機能構成図である。It is a function block diagram of the illumination spectrum estimation part of the image processing apparatus according to Embodiment 3 of this invention. 評価部による照明光の分光放射輝度と基準パターンとの比較処理を説明するための図である。It is a figure for demonstrating the comparison process of the spectral radiance of the illumination light by an evaluation part, and a reference pattern. 図10における類似度の算出処理を説明するための図である。It is a figure for demonstrating the calculation process of the similarity in FIG. この発明の実施の形態3に従う画像処理装置における全体処理手順を示すフローチャートである。It is a flowchart which shows the whole process sequence in the image processing apparatus according to Embodiment 3 of this invention. 図12に示すステップS108に示す評価サブルーチンの処理手順を示すフローチャートである。It is a flowchart which shows the process sequence of the evaluation subroutine shown to step S108 shown in FIG. この発明の実施の形態の変形例に従う画像処理装置を実現するコンピュータの概略構成図である。It is a schematic block diagram of the computer which implement | achieves the image processing apparatus according to the modification of embodiment of this invention.

符号の説明Explanation of symbols

Ax1,Ax2 光軸、OBJ 被写体、1,1A,1B 画像処理装置、10,20 入力部、11,11A,11B,11C,11D 分光放射輝度算出部、12 推定行列算出部、13,13A 光源データ格納部、14 三刺激値変換部、15 座標変換部、16 ホワイトバランス算出部、17 推定行列格納部、18 選択部、19 評価部、21 分光反射率算出部、22 推定行列算出部、23 分光反射率データ格納部、24 画像データ生成部、25 座標変換部、100,100A,100B,100C 照明スペクトル推定部、150 コンピュータ本体、152 モニタ、154 キーボード、156 マウス、162 メモリ、164 固定ディスク、166 FD駆動装置、168 CD−ROM駆動装置、170 通信インターフェース、200 色再現部、300 光源、400 撮像装置、402 拡散部材。   Ax1, Ax2 Optical axis, OBJ Subject, 1, 1A, 1B Image processing device, 10, 20 Input unit, 11, 11A, 11B, 11C, 11D Spectral radiance calculation unit, 12 Estimation matrix calculation unit, 13, 13A Light source data Storage unit, 14 Tristimulus value conversion unit, 15 Coordinate conversion unit, 16 White balance calculation unit, 17 Estimation matrix storage unit, 18 Selection unit, 19 Evaluation unit, 21 Spectral reflectance calculation unit, 22 Estimation matrix calculation unit, 23 Spectroscopy Reflectance data storage unit, 24 image data generation unit, 25 coordinate conversion unit, 100, 100A, 100B, 100C illumination spectrum estimation unit, 150 computer main body, 152 monitor, 154 keyboard, 156 mouse, 162 memory, 164 fixed disk, 166 FD drive unit, 168 CD-ROM drive unit, 170 communication interface Face, 200 color reproducing unit, 300 light source, 400 an imaging device, 402 diffusing member.

Claims (8)

撮像装置によって撮像された撮像データに対する画像処理が可能な画像処理装置であって、
前記撮像装置を用いて、照明環境下において被写体に入射する光の少なくとも一部を拡散部材を介して撮像することで得られた第1撮像データを、受入れる入力手段と、
前記照明環境を提供するために用いられ得る光源の分光放射輝度の自己相関行列と、前記拡散部材の分光透過率と、前記撮像装置の分光感度と、に基づいて算出される第1推定行列を用いて、前記第1撮像データから前記被写体に入射する照明光の分光放射輝度を算出する第1算出手段とを備える、画像処理装置。
An image processing apparatus capable of performing image processing on imaging data captured by an imaging apparatus,
Input means for receiving first imaging data obtained by imaging at least a part of light incident on a subject under a lighting environment through the diffusion member using the imaging device;
A first estimation matrix calculated based on an autocorrelation matrix of spectral radiance of a light source that can be used to provide the illumination environment, a spectral transmittance of the diffusing member, and a spectral sensitivity of the imaging device. And an image processing apparatus comprising: a first calculation unit that calculates a spectral radiance of illumination light incident on the subject from the first imaging data.
前記光源の分光放射輝度は、光源の種類毎に予め取得された特性値である、請求項1に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the spectral radiance of the light source is a characteristic value acquired in advance for each type of light source. 前記拡散部材は、前記撮像装置の光軸上に配置され、
前記拡散部材の入射強度は、前記光軸に対する角度についての所定の関数値で示される、請求項1または2に記載の画像処理装置。
The diffusing member is disposed on the optical axis of the imaging device,
The image processing apparatus according to claim 1, wherein the incident intensity of the diffusing member is represented by a predetermined function value with respect to an angle with respect to the optical axis.
前記関数値は、前記光軸に対する角度についての余弦関数である、請求項3に記載の画像処理装置。   The image processing apparatus according to claim 3, wherein the function value is a cosine function with respect to an angle with respect to the optical axis. 前記撮像装置は、前記撮像データとして、RGB表色系において定義される座標値を出力するように構成され、
前記画像処理装置は、
前記照明光の分光放射輝度と等色関数とを用いて、前記照明光の分光放射輝度に対応するRGB表色系における座標値を算出する第2算出手段と、
前記第2算出手段において算出された座標値の比に基づいて、前記撮像装置におけるホワイトバランスを算出する第3算出手段とをさらに備える、請求項1〜4のいずれか1項に記載の画像処理装置。
The imaging device is configured to output coordinate values defined in the RGB color system as the imaging data,
The image processing apparatus includes:
Second calculation means for calculating coordinate values in the RGB color system corresponding to the spectral radiance of the illumination light using the spectral radiance of the illumination light and the color matching function;
5. The image processing according to claim 1, further comprising: a third calculation unit that calculates a white balance in the imaging device based on a ratio of coordinate values calculated by the second calculation unit. apparatus.
前記照明光の分光放射輝度と、前記撮像装置の分光感度と、前記被写体に含まれ得る色の分光反射率の自己相関行列と、に基づいて算出される第2推定行列を用いて、前記照明環境下において前記撮像装置により前記被写体を撮像することで得られる第2撮像データから前記被写体の分光反射率を算出する第4算出手段をさらに備える、請求項1〜5のいずれか1項に記載の画像処理装置。   Using the second estimation matrix calculated based on the spectral radiance of the illumination light, the spectral sensitivity of the imaging device, and the autocorrelation matrix of the spectral reflectance of colors that can be included in the subject, the illumination 6. The apparatus according to claim 1, further comprising a fourth calculation unit configured to calculate a spectral reflectance of the subject from second imaging data obtained by imaging the subject with the imaging device under an environment. Image processing apparatus. 前記第4算出手段によって算出された前記被写体の分光反射率に基づいて、前記被写体を所定の照明環境下において撮像した場合に取得される画像データを生成する生成手段をさらに備える、請求項6に記載の画像処理装置。   The image processing apparatus according to claim 6, further comprising a generation unit configured to generate image data acquired when the subject is imaged under a predetermined illumination environment based on the spectral reflectance of the subject calculated by the fourth calculation unit. The image processing apparatus described. 撮像装置を用いて、照明環境下において被写体に入射する光の少なくとも一部を拡散部材を介して撮像することで第1撮像データを取得するステップと、
演算装置が、前記照明環境を提供するために用いられ得る光源の分光放射輝度の自己相関行列と、前記拡散部材の分光透過率と、前記撮像装置の分光感度と、に基づいて算出される第1推定行列を用いて、前記第1撮像データから前記被写体に入射する照明光の分光放射輝度を算出するステップとを備える、画像処理方法。
Using the imaging device to acquire first imaging data by imaging at least a part of light incident on the subject through a diffusing member in an illumination environment;
A computing device is calculated based on an autocorrelation matrix of spectral radiance of a light source that can be used to provide the illumination environment, a spectral transmittance of the diffusing member, and a spectral sensitivity of the imaging device. Calculating a spectral radiance of illumination light incident on the subject from the first imaging data using one estimation matrix.
JP2008021394A 2008-01-31 2008-01-31 Apparatus and method for processing image Pending JP2009182845A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2008021394A JP2009182845A (en) 2008-01-31 2008-01-31 Apparatus and method for processing image
PCT/JP2009/050453 WO2009096232A1 (en) 2008-01-31 2009-01-15 Image processing device and image processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008021394A JP2009182845A (en) 2008-01-31 2008-01-31 Apparatus and method for processing image

Publications (1)

Publication Number Publication Date
JP2009182845A true JP2009182845A (en) 2009-08-13

Family

ID=41036432

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008021394A Pending JP2009182845A (en) 2008-01-31 2008-01-31 Apparatus and method for processing image

Country Status (1)

Country Link
JP (1) JP2009182845A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011223382A (en) * 2010-04-12 2011-11-04 Olympus Corp Imaging device
JP2013250452A (en) * 2012-05-31 2013-12-12 Sharp Corp Image adjustment unit, image display device, computer program, recording medium, and image adjustment method
WO2018066212A1 (en) * 2016-10-05 2018-04-12 シャープ株式会社 Estimation device and estimation device control method

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002344979A (en) * 2001-05-21 2002-11-29 Minolta Co Ltd Digital image pickup device, illuminance component acquisition method, program and recording medium
JP2005202673A (en) * 2004-01-15 2005-07-28 Kddi Corp Image recognition apparatus
JP2006005509A (en) * 2004-06-16 2006-01-05 Sony Corp Characteristic evaluation apparatus and characteristic evaluation method for imaging apparatus

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002344979A (en) * 2001-05-21 2002-11-29 Minolta Co Ltd Digital image pickup device, illuminance component acquisition method, program and recording medium
JP2005202673A (en) * 2004-01-15 2005-07-28 Kddi Corp Image recognition apparatus
JP2006005509A (en) * 2004-06-16 2006-01-05 Sony Corp Characteristic evaluation apparatus and characteristic evaluation method for imaging apparatus

Non-Patent Citations (6)

* Cited by examiner, † Cited by third party
Title
CSNG200600536003; 富永昌治: 'マルチバンドイメージング技術とビジョン応用' 情報処理学会論文誌 Vol.47, No. SIG5(CVIM13), 20060315, pp.20-34, 社団法人情報処理学会 *
CSNG200700341002; 内山俊郎: '"マルチスペクトル撮影による光源環境計測とスペクトルに基づく画像生成"' 電子情報通信学会技術研究報告 Vol.105, No.535, 20060112, pp.7-12, 社団法人電子情報通信学会 *
JPN6009008012; 富永昌治: 'マルチバンドイメージング技術とビジョン応用' 情報処理学会論文誌 Vol.47, No. SIG5(CVIM13), 20060315, pp.20-34, 社団法人情報処理学会 *
JPN6009008014; W.K. Platt, et. al.: '"Spectral estimation techniques for the spectral calibration of a color image scanner"' APPLIED OPTICS Vol.15, No.1, 197601, pp.73-75 *
JPN6009008016; 内山俊郎: '"マルチスペクトル撮影による光源環境計測とスペクトルに基づく画像生成"' 電子情報通信学会技術研究報告 Vol.105, No.535, 20060112, pp.7-12, 社団法人電子情報通信学会 *
JPN6009046820; C.-C. Chiao 他: '"Characterization of natural illuminants in forests and the use of digital video data to reconstruc' Journal of the Optical Society of America A Vol.17, No.10, 20001001, pp.1713-1721 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011223382A (en) * 2010-04-12 2011-11-04 Olympus Corp Imaging device
US9188841B2 (en) 2010-04-12 2015-11-17 Olympus Corporation Imaging device
JP2013250452A (en) * 2012-05-31 2013-12-12 Sharp Corp Image adjustment unit, image display device, computer program, recording medium, and image adjustment method
WO2018066212A1 (en) * 2016-10-05 2018-04-12 シャープ株式会社 Estimation device and estimation device control method

Similar Documents

Publication Publication Date Title
KR100278642B1 (en) Color image processing apparatus and method
US7436997B2 (en) Light source estimating device, light source estimating method, and imaging device and image processing method
US10168215B2 (en) Color measurement apparatus and color information processing apparatus
US7884968B2 (en) System for capturing graphical images using hyperspectral illumination
US6538242B1 (en) Method of measuring spectral responsivity characteristic of image pick-up device and method of configuring imaging data
US20070177230A1 (en) Methods and apparatuses for determining a color calibration for different spectral light inputs in an imaging apparatus measurement
US7457000B2 (en) Image input system, conversion matrix calculating method, and computer software product
JP6113319B2 (en) Image color distribution inspection apparatus and image color distribution inspection method
JP5841091B2 (en) Image color distribution inspection apparatus and image color distribution inspection method
JP2021113744A (en) Imaging system
JP6969164B2 (en) Evaluation device, evaluation program and evaluation method
JP2009182845A (en) Apparatus and method for processing image
JP5120936B2 (en) Image processing apparatus and image processing method
JP2003024283A (en) Skin surface state observing apparatus
JP2020012668A (en) Evaluation device, measurement device, evaluation method and evaluation program
JP2009188807A (en) Imaging method and imaging system
JP2010139324A (en) Color irregularity measuring method and color irregularity measuring device
WO2009096232A1 (en) Image processing device and image processing method
JP3577977B2 (en) Illumination light spectral characteristic estimation device
JPH11304589A (en) Ambient light measuring system
JP4588076B2 (en) Imaging method and imaging system
US20220159182A1 (en) Method of Color Inspection by Using Monochrome Imaging With Multiple Wavelengths of Light
JP2001186540A (en) Colorimetry conversion coefficient calculation method, colorimetry image conversion method, and colorimetry conversion coefficient calculation device and colorimetry image converter, and computer-readable information recording medium for recording colorimetry conversion coefficient calculation program or colorimetry image pickup program
WO2009098968A1 (en) Imaging method and imaging system
JP2000337965A (en) Method for measuring spectral distribution of light source of image pickup system

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20100218

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20120821

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20121218