JP2009182845A - Apparatus and method for processing image - Google Patents
Apparatus and method for processing image Download PDFInfo
- 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
Links
Images
Abstract
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
ところで、被写体の分光反射率を推定するためには、その前提となる撮像時の照明環境下における分光放射輝度(照明スペクトル)を予め取得しておく必要がある。なぜならば、被写体からの分光放射輝度は、照明光の分光放射輝度および被写体の分光反射率に応じて定まるため、照明光の分光放射輝度が既知でなければ、被写体を撮像して得られる撮像データに基づいて、被写体の分光反射率を正確に算出できないからである。 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に開示されている。
従来、照明光の分光放射輝度は、もっぱら分光放射計といった専用の測定装置を用いて測定されていた。分光放射計とは、光学系を通じて入射した光を回折格子(グレーティング)によって分光し、イメージセンサ(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
図1を参照して、画像処理装置1は、後述する撮像装置によって撮像された第1撮像データg(1) RGB(m,n)および第2撮像データg(2) RGB(m,n)に対して、本発明に係る画像処理方法を実行可能である。
Referring to FIG. 1, the
より具体的には、画像処理装置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
なお、画像処理装置1は、代表的に、ハードウェアによって実現されるが、後述するように、その一部または全部をソフトウェアによって実現してもよい。
The
<撮像データの取得>
図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
まず、撮像データの取得(撮像)には、撮像装置400が用いられる。この撮像装置400は、一例として、デジタルスチルカメラやデジタルビデオカメラであり、特定の波長帯域における分光感度特性をもつ撮像素子(代表的に、CCD(Charge Coupled Device)やCMOS(Complementary Metal Oxide Semiconductor)など)を含んで構成される。撮像素子は、行列状に配置された複数の画素を含み、各画素に入射する光の強度に応じた輝度を撮像データとして出力する。このとき、各撮像素子から出力される輝度は、その分光感度に応じた値となる。撮像装置が撮像可能な特定の波長帯域のことをバンドと呼び、本実施の形態では、代表的に、主としてR(赤),G(緑),B(青)の分光感度特性を有する3バンドの撮像装置400を用いる場合について説明する。なお、デバイス構造としては、同一の基板上に複数種類の撮像素子を形成した構造、あるいは複数の基板上にそれぞれ対応する1種類の撮像素子を形成した構造のいずれを採用することもできる。また、各バンドの分光感度特性を決定付ける方法としては、素子自体の分光感度を異ならせるようにしてもよいし、同じ分光感度を有する素子を用いて、各素子の入力光側にR,G,Bのフィルタを設けることで実現してもよい。
First, the
上述のように、撮像装置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
図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
より具体的には、第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
拡散部材402は、撮像装置400で撮像される光を空間的に拡散、すなわち空間的に平均化するための部材であり、代表的に既知の分光透過率をもつ乳白色の拡散板が用いられる。代替的に、積分球などを用いてもよい。このような拡散部材402を用いることで、撮像装置400に入射する照明光の強度分布を一様化でき、これによって、後述する照明光の分光放射輝度の推定精度を高めることができる。
The diffusing
さらに、拡散部材402として乳白色の拡散板を用いる場合には、所定の入射角特性を有する拡散板(一般的に、コサインコレクタ、コサインディフューザ、コサインレセプタなどと称される。)を用いることが好ましい。このような拡散板では、拡散部材402を通過した後の光の入射強度が、撮像装置400の光軸Ax1に対する角度(立体角)についての余弦関数(コサイン)で示される。このような余弦関数の入射角特性をもつ拡散板を用いることで、何らの特別の演算を要することなく、単位面積当たりに入射する照明光のエネルギー量(分光放射照度)を反映した撮像データを取得できる。また、入射角特性をもたない拡散板を用いた場合には、外乱光を抑制するために、撮像装置400の視野角を相対的に小さくする必要があるが、このような入射角特性を有する拡散板を用いた場合には、撮像装置400の視野角を意識することなく、光源300からの照明光を撮像することもできる。
Further, when a milky white diffusion plate is used as the
上述の手順に従って取得された第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
また、図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
<照明光の分光放射輝度の算出処理>
再度、図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
照明スペクトル推定部100は、入力部10と、分光放射輝度算出部11と、推定行列算出部12と、光源データ格納部13とを含む。
The illumination
入力部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
なお、第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
一般的にガンマ特性および逆ガンマ特性はべき乗の関数として表わすことができる。たとえば、撮像装置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
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
分光放射輝度算出部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
推定行列算出部12は、被写体OBJにおける照明環境を提供するために用いられ得る光源の分光放射輝度の自己相関行列B、拡散部材402の分光透過率f(1)、撮像装置400の分光感度Sに基づいて、第1推定行列W(1)を算出する。以下、分光感度Sは401行×3列の行列、分光透過率f(1)は401行×3列の行列であるものとする。
The estimation
以下、第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(i=R,G,B)は、各撮像素子の分光感度Si(λ)(i=R,G,B)をさらに乗じた上で、波長領域にわたって光エネルギーを積分したものに相当する。このような関係は、(1)式に示す関係式として表わすことができる。
The light (spectrum) that has passed through the diffusing
ここで、ni(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
上述したように、本実施の形態では、所定の波長幅(代表的に、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.
ここで、加法性ノイズni(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).
g(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).
f(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)
W(1)=B・It・(I・B・It)−1 ・・・(5)
但し、「×」は、行列要素同士の積を意味し、「t」は、転置行列を意味し、「−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)の各サンプリング波長λj(1≦j≦k)における成分値(放射輝度)をei(λj)とすると、各光源の成分値ei(λj)を行方向に配置した光源の群行列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 (
さらに、以下の演算式に従って、この群行列Estに基づいて自己相関行列Bを算出する。 Further, an autocorrelation matrix B is calculated based on the group matrix Est according to the following arithmetic expression.
B=Est・Est t ・・・(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
推定行列算出部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
このように推定行列算出部12が算出した照明光の分光放射輝度E(1)は、後述するホワイトバランス算出処理および色再現処理に利用される。
Thus, the spectral radiance E (1) of the illumination light calculated by the estimation
なお、本発明と図2に示す各要素との対応関係については、入力部10が「入力手段」に相当し、分光放射輝度算出部11と、推定行列算出部12と、光源データ格納部13とが「第1算出手段」に相当する。
As for the correspondence between the present invention and each element shown in FIG. 2, the
<ホワイトバランス算出処理>
照明スペクトル推定部100は、三刺激値変換部14と、座標変換部15と、ホワイトバランス算出部16とをさらに含む。これらの部位は、算出された照明光の分光放射輝度E(1)に基づいて、撮像装置400のホワイトバランスを算出する。このホワイトバランスの値に基づいて、撮像装置400の撮像素子からそれぞれ出力されるR,G,Bの輝度値のレベルを互いに調整するためのホワイトバランス調整が可能になる。
<White balance calculation processing>
The illumination
三刺激値変換部14は、波長領域で規定された分光放射輝度E(1)からXYZ表色系の三刺激値X,Y,Zを算出する。この三刺激値X,Y,Zは、被写体OBJが撮像される照明環境における分光放射輝度E(1)を人間が観測したと仮定した場合の特性値を示す。より具体的には、照明光の分光放射輝度E(1)についてのXYZ表色系の三刺激値X,Y,Zは、以下に示す(7)式のようになる。
The tristimulus
(7)式において、hi(λ)(i=R,G,B)は等色関数であり、人間の視覚感度特性に相当する関数である。この等色関数hi(λ)は国際照明委員会(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
三刺激値[X(1),Y(1),Z(1)]=ht・E(1) ・・・(8)
ここで、行列hは、等色関数hi(λ)の各サンプリング波長における値を要素とする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
R(1)=a11X(1)+a12Y(1)+a13Z(1)
G(1)=a21X(1)+a22Y(1)+a23Z(1)
B(1)=a31X(1)+a32Y(1)+a33Z(1)
ここで、a11〜a33は、被写体の測色値(XYZ表色系)と、実際に撮像装置に記録される信号値(RGB表色系)との対応関係を表す3行×3列の変換行列である。このような行列のことを表示装置におけるRGB⇔XYZ変換行列と呼ぶ。a11〜a33を3行×3列の行列としてとらえると、後述の(15)式にて、
ht・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
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
したがって、ホワイトバランス算出部16は、座標値R(1),G(1),B(1)の比、あるいはその逆比である1/R(1):1/G(1):1/B(1)をホワイトバランスとして出力する。このホワイトバランス算出部16から出力されるホワイトバランスは、ユーザによる手動のゲイン調整に用いられる。あるいは、撮像装置400のゲイン調整部(図示しない)に与えられて、当該ゲイン調整部が自動的に撮像装置400のゲインを調整するようにしてもよい。
Therefore, the white
なお、本発明と図2に示す各要素との対応関係については、三刺激値変換部14および座標変換部15が「第2算出手段」に相当し、ホワイトバランス算出部16が「第3算出手段」に相当する。
2, the tristimulus
<色再現処理>
次に、上述の処理によって算出された分光放射輝度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
入力部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
なお、第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
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
推定行列算出部22は、被写体OBJに含まれ得る色の分光反射率から算出される自己相関行列Aと、照明スペクトル推定部100によって算出された照明光の分光放射輝度E(1)と、撮像装置400の分光感度Sとに基づいて、第2推定行列W(2)を算出する。
The estimation
以下、第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) i(m,n)(i=R,G,B)は、各撮像素子の分光感度Si(λ)(i=R,G,B)をさらに乗じた上で、波長領域にわたって光エネルギーを積分したものに相当する。このような関係は、(9)式に示す関係式として表わすことができる。
The light (spectrum) from the subject OBJ that enters the pixel at the coordinates (m, n) of the
ここで、ni(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
上述したように、本実施の形態では、所定の波長幅(代表的に、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.
ここで、加法性ノイズni(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).
g(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).
f(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=St・E(1) ・・・(12)
W(2)=A・Ht・(H・A・Ht)−1 ・・・(13)
但し、「t」は、転置行列を意味し、「−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
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
このように算出された分光反射率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.
(14)式において、hi(λ)(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
g(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
以上のような処理によって、第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
上述の説明では、画像データ生成部24が被写体OBJの撮像時と同じ照明環境下において色再現を行なう構成について例示したが、色再現を行なう照明環境を異なるものとしてもよい。すなわち、画像データ生成部24が画像データg(OUT) XYZ(m,n)の生成に用いる分光放射輝度Eを任意に決定できる。
In the above description, the configuration in which the image
なお、本発明と図2に示す各要素との対応関係については、分光反射率算出部21および推定行列算出部22が「第4算出手段」に相当し、画像データ生成部24が「生成手段」に相当する。
2, the spectral
<処理手順>
本実施の形態に従う画像処理装置1における処理手順をまとめると、以下のようになる。
<Processing procedure>
The processing procedure in the
図4は、この発明の実施の形態1に従う画像処理装置1における全体処理手順を示すフローチャートである。
FIG. 4 is a flowchart showing an overall processing procedure in
図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
次に、推定行列算出部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
次に、三刺激値変換部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
一方、入力部20が、照明環境下において撮像装置400により被写体OBJを撮像することで得られる第2撮像データg(2) RGB(m,n)を受入れる(ステップS120)。なお、入力部20は、必要に応じて、第2撮像データを線形化する。
On the other hand, the
次に、推定行列算出部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
<本実施の形態による作用効果>
この発明の実施の形態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,
照明スペクトル推定部100Aは、図1に示す照明スペクトル推定部100において、光源データ格納部13に代えて、光源データ格納部13Aを設けたものである。その他の部位については、実施の形態1と同様であるので、詳細な説明は繰返さない。
The illumination
光源データ格納部13Aは、照明環境を提供するために用いられ得るM種類の光源毎に予め定められた演算行列である、自己相関行列B1,B2,・・・,BMを予め格納する。そして、光源データ格納部13Aは、ユーザなどからの外部指令に応じて、予め格納する自己相関行列B1,B2,・・・,BMのうち、選択されたものを推定行列算出部12へ出力する。
The light source
以下、この光源データ格納部13Aに格納される複数の自己相関行列について説明する。
Hereinafter, a plurality of autocorrelation matrices stored in the light source
たとえば、一般的な蛍光灯の分光照射輝度(スペクトル)は、その中に封入されている水銀などの輝線スペクトルに相当する波長にピークを有するような波形を有する。一方、白熱灯の分光照射輝度(スペクトル)には、その発光原理上、ピークが存在しない。このように、光源の分光照射輝度(スペクトル)は、その種類毎に異なったものとなる。そのため、被写体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
そこで、本実施の形態に従う光源データ格納部13Aは、一例として、「蛍光灯」、「白熱灯」、「キセノン灯」、「水銀灯」、「太陽光」とった種類毎に複数の自己相関行列B1,B2,・・・,BMを予め格納しており、ユーザなどによる選択指令SELに応じて、これらのうち対応するものを自己相関行列Bとして推定行列算出部12へ出力する。すなわち、自己相関行列B1は、「蛍光灯」の分光放射輝度の統計データのみから生成し、自己相関行列B2は、「白熱灯」の分光放射輝度の統計データのみから生成するといった具合である。
Therefore, as an example, the light source
推定行列算出部12は、この光源データ格納部13Aから受けた自己相関行列Bに基づいて、照明光の分光放射輝度E(1)を推定する。
The estimation
なお、照明光の分光放射輝度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
その他の処理については、基本的に上述した実施の形態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
<処理手順>
図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
次に、光源データ格納部13Aが、予め格納する自己相関行列B1,B2,・・・,BMのうち、選択指令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
次に、三刺激値変換部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
一方、入力部20が、照明環境下において撮像装置400により被写体OBJを撮像することで得られる第2撮像データg(2) RGB(m,n)を受入れる(ステップS120)。なお、入力部20は、必要に応じて、第2撮像データを線形化する。
On the other hand, the
次に、推定行列算出部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
<本実施の形態による作用効果>
この発明の実施の形態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の変形例として、複数の自己相関行列B1,B2,・・・,BMからそれぞれ算出される複数の第1推定行列W(1) 1,W(1) 2,・・・,W(1) mを予め算出しておく構成について例示する。
[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
<全体構成>
図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
照明スペクトル推定部100Bは、図1に示す照明スペクトル推定部100において、推定行列算出部12および光源データ格納部13に代えて、推定行列格納部17を設けたものである。その他の部位については、実施の形態1と同様であるので、詳細な説明は繰返さない。
The illumination spectrum estimation unit 100B includes an estimation
推定行列格納部17は、照明環境を提供するために用いられ得る複数の光源の分光放射輝度に基づいて予め算出される第1推定行列W(1) 1,W(1) 2,・・・,W(1) Mを予め格納する。そして、推定行列格納部17は、ユーザなどからの外部指令に応じて、予め格納する第1推定行列W(1) 1,W(1) 2,・・・,W(1) Mのうち、選択されたものを分光放射輝度算出部11へ出力する。
The estimation
この第1推定行列W(1) 1,W(1) 2,・・・,W(1) Mは、実施の形態2に従う画像処理装置1Aの光源データ格納部13Aに格納されるB1,B2,・・・,BMのからそれぞれ算出される。第1推定行列W(1) 1,W(1) 2,・・・,W(1) Mの算出に際して、既知の拡散部材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
なお、実施の形態2の変形例では、撮像装置400および拡散部材402の少なくとも一方が交換された場合には、光源データ格納部13Aに格納されるB1,B2,・・・,BMを再度計算する必要がある。
In the modification of the second embodiment, when at least one of the
その他の処理については、基本的に上述した実施の形態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
<処理手順>
図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
次に、推定行列格納部17が、予め格納する第1推定行列W(1) 1,W(1) 2,・・・,W(1) Mのうち、選択指令SELに応じて1つの第1推定行列を第1推定行列W(1)として分光放射輝度算出部11へ出力する(ステップS105)。続いて、分光放射輝度算出部11が、ステップS105で選択された第1推定行列W(1)を用いて、撮像データg(1) RGBから被写体OBJに入射する照明光の分光放射輝度E(1)を算出する(ステップS106)。
Next, the estimation
次に、三刺激値変換部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
一方、入力部20が、照明環境下において撮像装置400により被写体OBJを撮像することで得られる第2撮像データg(2) RGB(m,n)を受入れる(ステップS120)。なお、入力部20は、必要に応じて、第2撮像データを線形化する。
On the other hand, the
次に、推定行列算出部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
<本実施の形態による作用効果>
この発明の実施の形態2の変形例によれば、上述の実施の形態1および2と同様の作用効果を得ることができるとともに、複数の第1推定行列W(1) 1,W(1) 2,・・・,W(1) Mの算出処理を簡略化できるので、より演算処理を高速化できる。
<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
<全体構成>
この発明の実施の形態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
図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
図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
分光放射輝度算出部11A,11B,11C,11Dは、照明環境を提供するために用いられ得る複数の光源の分光放射輝度に基づいて算出される第1推定行列W(1) 1,W(1) 2,W(1) 3,W(1) 4を用いて、撮像データg(1)から被写体OBJに入射する照明光の分光放射輝度E(1) 1,E(1) 2,E(1) 3,E(1) 4をそれぞれ算出する。この第1推定行列W(1) 1,W(1) 2,W(1) 3,W(1) 4は、図7に示す推定行列格納部17が格納する第1推定行列W(1) 1,W(1) 2,・・・,W(1) Mと実質的に同様である。すなわち、第1推定行列W(1) 1,W(1) 2,W(1) 3,W(1) 4は、照明環境を提供するために用いられ得る複数の光源の種類毎に予め定められた自己相関行列B1,B2,・・・,B4に基づいて、上述した手順と同様の手順に従って算出される。なお、図9には4種類の第1推定行列W(1)を例示するが、第1推定行列W(1)は複数である限りにおいて、その数は制限されない。また、図9には、第1推定行列W(1) 1,W(1) 2,W(1) 3,W(1) 4を予め算出しておく構成を例示するが、図5に示す照明スペクトル推定部100Aのように、演算処理毎に動的に算出してもよい。
Spectral
本実施の形態では、一例として、第1推定行列W(1) 1は、蛍光灯の統計データに基づいて作成された自己相関行列B1から算出されており、第1推定行列W(1) 2は、白熱灯の統計データに基づいて作成された自己相関行列B2から算出されており、第1推定行列W(1) 3は、キセノン灯の統計データに基づいて作成された自己相関行列B3から算出されているものとする。さらに、第1推定行列W(1) 4は、蛍光灯、白熱灯、キセノン灯のすべてを含む統計データに基づいて作成された自己相関行列B4から算出されているものとする。 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) 1,E(1) 2,E(1) 3,E(1) 4を、選択部18へそれぞれ出力する。
Spectral
選択部18は、後述する評価部19による評価結果に従って、入力された照明光の分光放射輝度E(1) 1,E(1) 2,E(1) 3,E(1) 4のうち1つを、照明光の分光放射輝度E(1)として出力する。
The
評価部19は、分光放射輝度算出部11A,11B,11C,11Dがそれぞれ算出した照明光の分光放射輝度E(1) 1,E(1) 2,E(1) 3,E(1) 4のうち、最も適切に推定がなされたものを評価する。より具体的には、評価部19は、予め規定した基準パターンと比較することで、照明光の分光放射輝度E(1) 1,E(1) 2,E(1) 3,E(1) 4を評価する。
The
本実施の形態では、一例として、それぞれ第1推定行列W(1) 1,W(1) 2,W(1) 3(あるいは、対応する自己相関行列B1,B2,B3)の算出時に用いた光源の分光放射輝度(統計値または実測値)からそれぞれ算出した基準パターンE(1) 1AVE,E(1) 2AVE,E(1) 3AVEを用いる。より具体的には、たとえば、第1推定行列W(1) 1に対応する基準パターンE(1) 1AVEは、第1推定行列W(1) 1の算出に用いた自己相関行列B1の生成元となった光源の群行列Est(図3参照)の各要素を平均化することで算出される。すなわち、図3に示すように、光源iの群行列Estが成分値ei(λj){1≦i≦N,1≦j≦k}からなる場合には、対応する基準パターンE(1) AVEの各サンプリング波長λj(1≦j≦k)における成分値をeAVE(λj)とすると、以下のような関係が成立する。 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 i (λ j ) {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 AVE (λ j), the following relationship is established.
成分値eAVE(λj)={e1(λj)+e2(λj)+・・・+eN(λj)}/N
本実施の形態では、このような算出手順に従って、基準パターンとして、蛍光灯、白熱灯、キセノン灯のそれぞれを代表する分光放射輝度(スペクトル)が予め算出される。なお、第1推定行列W(1) 4に対応する基準パターンについては、必ずしも算出する必要はない。これは、第1推定行列W(1) 4に対応する自己相関行列B4が蛍光灯、白熱灯、キセノン灯のすべてを含む統計データに基づいて作成されたものであるため、この自己相関行列B4から基準パターンを作成したとしても、各光源の特徴がぼやけてしまい、基準パターンとしての効果が薄まるからである。
Component value e AVE (λ j ) = {e 1 (λ j ) + e 2 (λ j ) +... + E N (λ j )} / 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) 1,E(1) 2,E(1) 3,E(1) 4の評価方法について説明する。
Next, with reference to FIG. 10 and FIG. 11, the
図10は、評価部19による照明光の分光放射輝度E(1) 1,E(1) 2,E(1) 3と基準パターン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
図10を参照して、評価部19は、分光放射輝度算出部11A,11B,11Cがそれぞれ算出した照明光の分光放射輝度E(1) 1,E(1) 2,E(1) 3と基準パターンE(1) 1AVE,E(1) 2AVE,E(1) 3AVEとをそれぞれ比較し、比較結果(一例として、類似度)を算出する。なお、照明光の分光放射輝度E(1) 1,E(1) 2,E(1) 3および基準パターンE(1) 1AVE,E(1) 2AVE,E(1) 3AVEは、いずれも0〜1の範囲に規格化されているものとする。
Referring to FIG. 10, the
図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
図11は、分光放射輝度算出部11Aが算出した照明光の分光放射輝度E(1) 1と基準パターンE(1) 1AVEとの比較処理を説明するための図を示す。図11(a)は、照明光の分光放射輝度E(1) 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は、各サンプリング波長λj(1≦j≦k)において、照明光の分光放射輝度E(1) 1と基準パターンE(1) 1AVEとの間の偏差(規格化値)errj(1≦j≦k)を順次算出する。続いて、評価部19は、サンプリング波長λjの偏差errjのすべてについての総和平均を算出することで、評価結果(類似度)を算出する。すなわち、類似度SMは、サンプリング波長λjの偏差errjを用いて、以下のような演算式で算出できる。
The
類似度SM={1−(err1+err2+・・・+errk)/k}×100[%]
なお、図10には、蛍光灯の照明環境下で本実施の形態に従う画像処理方法を実施した場合に実測された類似度を示す。このような類似度の算出処理の結果、第1推定行列W(1) 1に基づいて推定された照明光の分光放射輝度E(1) 1の類似度が最も高く、評価部19は、この照明光の分光放射輝度E(1) 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) 1,E(1) 2,E(1) 3のいずれについても、その類似度が十分高くない場合も想定される。このような場合には、蛍光灯、白熱灯、キセノン灯の特徴をすべて反映した第1推定行列W(1) 4に基づいて推定された照明光の分光放射輝度E(1) 4を照明光の分光放射輝度E(1)として出力する場合が適切な場合もある。そこで、評価部19は、照明光の分光放射輝度E(1) 1,E(1) 2,E(1) 3についての評価結果(類似度)がいずれも許容値を下回っている場合などには、分光放射輝度E(1) 4を照明光の分光放射輝度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
なお、上述の説明では、分光放射輝度算出部11A,11B,11C,11Dが、照明光の分光放射輝度E(1) 1,E(1) 2,E(1) 3,E(1) 4を並行して同時に算出し、その後類似度を算出する構成について例示したが、第1推定行列の各々について、照明光の分光放射輝度の算出処理と類似度の算出処理とを順次実行するようにしてもよい。この場合には、いずれかの第1推定行列により推定された照明光の分光放射輝度についての類似度が、所定しきい値(たとえば、95%)を超えたことが判明した時点で、以後の処理を行なうことなく、当該次元の分光放射輝度を出力できるので、処理を簡素化することができる。
In the above description, the spectral
また、第1推定行列W(1) 4に基づいて照明光の分光放射輝度E(1) 4を推定する必然性はない。すなわち、照明光の分光放射輝度E(1) 1,E(1) 2,E(1) 3についての類似度がいずれも許容値を下回っている場合には、推定不可能を出力してもよい。 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
<処理手順>
本実施の形態に従う画像処理装置における処理手順をまとめると、以下のようになる。
<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
次に、分光放射輝度算出部11A,11B,11C,11Dが、それぞれ第1推定行列W(1) 1,W(1) 2,W(1) 3,W(1) 4を用いて、撮像データg(1) RGBから被写体OBJに入射する照明光の分光放射輝度E(1) 1,E(1) 2,E(1) 3,E(1) 4をそれぞれ算出する(ステップS107)。続いて、評価部19が、評価サブルーチンを実行し、ステップS107で算出された照明光の分光放射輝度E(1) 1,E(1) 2,E(1) 3,E(1) 4のうち最も推定精度の高いものを評価する(ステップS108)。さらに、選択部18が、ステップS108における評価結果に従って、照明光の分光放射輝度E(1) 1,E(1) 2,E(1) 3,E(1) 4のうち1つを、照明光の分光放射輝度E(1)として出力する(ステップS109)。
Next, the spectral
次に、三刺激値変換部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
一方、入力部20が、照明環境下において撮像装置400により被写体OBJを撮像することで得られる第2撮像データg(2) RGB(m,n)を受入れる(ステップS120)。なお、入力部20は、必要に応じて、第2撮像データを線形化する。
On the other hand, the
次に、推定行列算出部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
図13を参照して、評価部19は、照明光の分光放射輝度E(1) 1と予め定められた基準パターンE(1) 1AVEとを比較することで、両者の間の類似度SM1を算出する(ステップS200)。同様に、評価部19は、照明光の分光放射輝度E(1) 2と予め定められた基準パターンE(1) 2AVEとを比較することで、両者の間の類似度SM2を算出する(ステップS202)。同様に、評価部19は、照明光の分光放射輝度E(1) 3と予め定められた基準パターンE(1) 3AVEとを比較することで、両者の間の類似度SM3を算出する(ステップS204)。
Referring to FIG. 13, the
続いて、評価部19は、ステップS200,S202,S204において算出された類似度SM1,SM2,SM3のうち、その値が最も高いものを抽出する(ステップS206)。さらに、評価部19は、ステップS206で抽出した類似度が所定の許容値以上であるか否かを判断する(ステップS208)。
Subsequently, the
類似度が所定の許容値以上である場合(ステップS208においてYESの場合)には、評価部19は、ステップS206で抽出した類似度に対応する分光放射輝度が最も推定精度の高いと評価する(ステップS210)。
If the similarity is equal to or greater than a predetermined allowable value (YES in step S208), the
一方、類似度が所定の許容値以上でない場合(ステップS208においてNOの場合)には、評価部19は、照明光の分光放射輝度E(1) 1,E(1) 2,E(1) 3以外、すなわち
照明光の分光放射輝度E(1) 4が最も推定精度の高いと評価する(ステップS212)。
On the other hand, when the similarity is not equal to or greater than the predetermined allowable value (NO in step S208), the
その後、処理は図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
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
図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
コンピュータ本体150は、相互にバスで接続された、演算装置であるCPU(Central Processing Unit)160と、メモリ162と、記憶装置である固定ディスク164と、通信インターフェース170とをさらに含む。
The computer
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
モニタ152は、CPU160が出力する情報を表示するための表示部であって、一例としてLCD(Liquid Crystal Display)やCRT(Cathode Ray Tube)などから構成される。マウス156は、クリックやスライドなどの動作に応じたユーザから指令を受付ける。キーボード154は、入力されるキーに応じたユーザから指令を受付ける。CPU160は、プログラムされた命令を順次実行することで、各種の演算を実施する演算処理部である。メモリ162は、CPU160のプログラム実行に応じて、各種の情報を記憶する。通信インターフェース170は、CPU160が出力した情報を、例えば電気信号に変換して他の装置へ送出するとともに、他の装置から電気信号を受信してCPU160が利用できる情報に変換する。固定ディスク164は、CPU160が実行するプログラムや予め定められたデータなどを記憶する不揮発性の記憶装置である。また、コンピュータには、必要に応じて、プリンタなどの他の出力装置が接続されてもよい。
The
さらに、本実施の形態に係るプログラムは、コンピュータのオペレーティングシステム(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.
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または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.
前記画像処理装置は、
前記照明光の分光放射輝度と等色関数とを用いて、前記照明光の分光放射輝度に対応する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.
演算装置が、前記照明環境を提供するために用いられ得る光源の分光放射輝度の自己相関行列と、前記拡散部材の分光透過率と、前記撮像装置の分光感度と、に基づいて算出される第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.
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)
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)
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 |
-
2008
- 2008-01-31 JP JP2008021394A patent/JP2009182845A/en active Pending
Patent Citations (3)
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)
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)
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 |