JP4418829B2 - Color correction method and image processing apparatus - Google Patents

Color correction method and image processing apparatus Download PDF

Info

Publication number
JP4418829B2
JP4418829B2 JP2007207253A JP2007207253A JP4418829B2 JP 4418829 B2 JP4418829 B2 JP 4418829B2 JP 2007207253 A JP2007207253 A JP 2007207253A JP 2007207253 A JP2007207253 A JP 2007207253A JP 4418829 B2 JP4418829 B2 JP 4418829B2
Authority
JP
Japan
Prior art keywords
light source
likelihood
color
image
image data
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.)
Expired - Fee Related
Application number
JP2007207253A
Other languages
Japanese (ja)
Other versions
JP2008085995A (en
Inventor
マシュー スピーグル ジョン
エドワード ドーラン ジョン
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
Priority claimed from US11/529,088 external-priority patent/US8055063B2/en
Application filed by Sharp Corp filed Critical Sharp Corp
Publication of JP2008085995A publication Critical patent/JP2008085995A/en
Application granted granted Critical
Publication of JP4418829B2 publication Critical patent/JP4418829B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

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

Description

本発明は、画像データにおける撮影シーンの光源の推定を行い、光源の推定結果に基づいて画像データの色補正(色調整)を行う色補正方法および画像処理装置に関するものである。   The present invention relates to a color correction method and an image processing apparatus that perform estimation of a light source of a shooting scene in image data and perform color correction (color adjustment) of the image data based on the estimation result of the light source.

近年、デジタルカメラやコンピュータ等が普及すると共に、デジタル画像データを表示出力するディスプレイや印字出力するプリンタなどの出力機器において高品質化が進んでいる。すなわち、これらの出力機器では、画像処理技術の向上とも相まって、品質の良い画像を色再現性良く表示したり出力したりすることが行われるようになってきている。   In recent years, with the spread of digital cameras, computers, and the like, the quality of output devices such as displays that display and output digital image data and printers that perform print output has increased. That is, in these output devices, along with improvements in image processing technology, it is becoming possible to display and output high-quality images with good color reproducibility.

例えば、デジタルカメラやデジタルビデオカメラ等、撮影シーンを画像として取り込む撮影機器では、撮影シーンの照明の状態によらず、画像が自然に見えるように取り込むために、例えば、R・G・Bの各センサーのバランスを調整する補正機構(ホワイトバランスの調整)が設けられている。しかしながら、このバランス調整が十分でなかったり、あるいは、誤った調整がなされると、取り込まれた画像は、本来有していない色に着色していたり(色カブリ)、不自然な色に再現されたりする。   For example, in a photographic device that captures a photographic scene as an image, such as a digital camera or a digital video camera, in order to capture an image so that it looks natural regardless of the illumination state of the photographic scene, for example, each of R, G, and B A correction mechanism (white balance adjustment) for adjusting the sensor balance is provided. However, if this balance adjustment is not sufficient or an incorrect adjustment is made, the captured image may be colored in a color that it does not originally have (color fogging), or reproduced in an unnatural color. Or

そこで、撮影時の光源を推定し、取り込まれた画像の色再現性を向上させる技術が検討されている。   Therefore, a technique for estimating the light source at the time of shooting and improving the color reproducibility of the captured image has been studied.

例えば、特許文献1には、以下の(a)〜(d)の工程によって光源を推定する技術が開示されている。
(a)撮影シーンの画像データ(サンプル画素のセンサー応答)に対し、ある1つの光源(テスト光源)を想定して、この光源の分光特性の影響を除去し、上記画像データを反射率ベクトル空間に投影し画像分布を生成する。
(b)次に、上記(a)の処理にて得られた画像分布に対し、基準の分布状態である参照分布との相関を求め、上記光源に対するスコア値(複数の評価結果の積)を求める。この参照分布は、被写体として想定できる物体表面の分光反射率のデータ(多様な代表的サンプル)を反射率ベクトル空間に投影して得られる。
(c)上記(a),(b)の処理をテスト光源別に繰り返し、それぞれのテスト光源に対するスコア値を求める。
(d)全てのテスト光源のうち、最も高いスコア値を持つテスト光源を推定光源とする。
特開2004−165932号公報(2004年6月10日公開) 特開2005−124186号公報(2005年5月12日公開) 特開2005−167948号公報(2005年6月23日公開)
For example, Patent Document 1 discloses a technique for estimating a light source by the following steps (a) to (d).
(A) Assuming a certain light source (test light source) with respect to image data of the shooting scene (sensor response of sample pixels), the influence of the spectral characteristics of this light source is removed, and the image data is reflected in the reflectance vector space. To generate an image distribution.
(B) Next, a correlation between the image distribution obtained by the process (a) and a reference distribution which is a standard distribution state is obtained, and a score value (product of a plurality of evaluation results) for the light source is obtained. Ask. This reference distribution is obtained by projecting spectral reflectance data (various representative samples) of an object surface that can be assumed as a subject onto a reflectance vector space.
(C) The processes (a) and (b) are repeated for each test light source, and the score value for each test light source is obtained.
(D) The test light source having the highest score value among all the test light sources is used as the estimated light source.
JP 2004-165932 A (released on June 10, 2004) Japanese Patent Laying-Open No. 2005-124186 (published on May 12, 2005) JP 2005-167948 A (published June 23, 2005)

しかしながら、従来の技術では、光源の推定結果が誤りであった場合に、撮像対象物の本来の色とは異なる色に着色してしまったり(色カブリ)、不自然な色に再現してしまったりするという不具合が生じる。   However, with the conventional technology, if the estimation result of the light source is incorrect, it may be colored in a color different from the original color of the object being picked up (color fogging), or reproduced in an unnatural color. There is a problem that you get stuck.

例えば、上記特許文献1の技術では、上記比較に用いる参照分布は物体表面の分光反射率に基づくものであるので、撮影シーンに物体からの反射光ではない光(例えば太陽からの光の散乱等)が含まれる場合、誤った光源が推定され得る。また、上記特許文献1において用いられる参照分布は代表的なサンプルの分光反射率によるものであるので、色の分布に偏りがある場合、誤った光源が推定され得る。   For example, in the technique disclosed in Patent Document 1, the reference distribution used for the comparison is based on the spectral reflectance of the object surface. Therefore, light that is not reflected light from the object (for example, scattering of light from the sun) in the shooting scene. ) Is included, an incorrect light source may be estimated. In addition, since the reference distribution used in Patent Document 1 is based on the spectral reflectance of a representative sample, an erroneous light source can be estimated if the color distribution is biased.

このため、撮像対象物からの反射光以外の光が含まれる場合や、画像データ全体の色の傾向が撮像対象物の本来の色に起因する場合などに標準的な色補正を行うと、好ましくない補正になる場合、すなわち実際の画像を忠実に再現できなくなる場合が多い。   Therefore, it is preferable to perform standard color correction when light other than the reflected light from the imaging target is included, or when the color tendency of the entire image data is caused by the original color of the imaging target. In many cases, the actual image cannot be faithfully reproduced.

本発明は、上記の問題点に鑑みてなされたものであり、その目的は、光源推定結果の正確さの度合い(尤度)に応じて色補正の程度を変更することのできる色補正方法および画像処理装置を提供することにある。   The present invention has been made in view of the above problems, and an object of the present invention is to provide a color correction method capable of changing the degree of color correction in accordance with the degree of accuracy (likelihood) of the light source estimation result, and An object is to provide an image processing apparatus.

本発明の画像処理装置は、上記の課題を解決するために、画像データにおける撮影シーンの光源を予測する光源推定部と、光源の推定結果に基づいて上記画像データの色補正を行う色補正部とを備えた画像処理装置であって、上記光源推定部が予測した光源が上記画素データに対する実際の光源である尤度を算出する尤度算出部と、上記尤度算出部が算出した尤度に基づいて上記色補正部における上記画像データに対する色補正量を制御する補正量制御部とを備えていることを特徴としている。   In order to solve the above problems, an image processing apparatus according to the present invention predicts a light source of a shooting scene in image data, and a color correction unit that performs color correction of the image data based on a light source estimation result A likelihood calculation unit that calculates the likelihood that the light source predicted by the light source estimation unit is an actual light source for the pixel data, and the likelihood calculated by the likelihood calculation unit And a correction amount control unit for controlling a color correction amount for the image data in the color correction unit.

また、本発明の色補正方法は、上記の課題を解決するために、画像データにおける撮影シーンの光源を予測する光源推定工程と、光源の推定結果に基づいて上記画像データの色補正を行う色補正工程とを含む色補正方法であって、上記光源推定工程で予測した光源が上記画素データに対する実際の光源である尤度を算出する尤度算出工程と、上記尤度算出工程で算出した尤度に基づいて上記色補正工程における上記画像データに対する色補正量を制御する補正量制御工程とを含むことを特徴としている。   In addition, in order to solve the above-described problem, the color correction method of the present invention predicts the light source of the photographic scene in the image data, and performs color correction on the image data based on the light source estimation result. A likelihood correction step of calculating a likelihood that the light source predicted in the light source estimation step is an actual light source for the pixel data, and a likelihood calculated in the likelihood calculation step. And a correction amount control step of controlling a color correction amount for the image data in the color correction step based on the degree.

上記の画像処理装置および色補正方法によれば、予測した光源が画素データに対する実際の光源である尤度を算出し、算出した尤度に基づいて画像データに対する色補正量を制御することができる。これにより、光源の誤判定に起因して画像データが不適切に色補正されることを抑制できる。   According to the image processing apparatus and the color correction method, the likelihood that the predicted light source is the actual light source for the pixel data can be calculated, and the color correction amount for the image data can be controlled based on the calculated likelihood. . As a result, it is possible to suppress the image data from being inappropriately color-corrected due to erroneous light source determination.

また、上記補正量制御部は、上記尤度算出部が算出した尤度が閾値以上の場合には上記色補正部に上記画像データに対する色補正を実行させ、閾値未満の場合には上記画像データに対する色補正を実行させない構成としてもよい。   The correction amount control unit causes the color correction unit to perform color correction on the image data when the likelihood calculated by the likelihood calculation unit is greater than or equal to a threshold, and when the likelihood is less than the threshold, the image data It is also possible to adopt a configuration in which no color correction is performed on the.

上記の構成によれば、上記尤度が高い場合には光源の影響を取り除く色補正を適切に行うことができ、上記尤度が低い場合には光源の誤判定に起因して画像データが不適切に色補正されることを防止できる。   According to the above configuration, when the likelihood is high, color correction that removes the influence of the light source can be appropriately performed, and when the likelihood is low, the image data is not correct due to an erroneous determination of the light source. Proper color correction can be prevented.

また、上記補正量制御部は、上記尤度算出部が算出した尤度が閾値未満の場合には閾値以上の場合よりも上記画像データに対する色補正量を少なくする構成としてもよい。また、上記補正量制御部は、上記尤度算出部が算出した尤度が小さくなるほど上記画像データに対する色補正量を少なくする構成としてもよい。   The correction amount control unit may be configured to reduce the color correction amount with respect to the image data when the likelihood calculated by the likelihood calculation unit is less than the threshold, as compared with the case where the likelihood is greater than or equal to the threshold. The correction amount control unit may be configured to reduce the color correction amount for the image data as the likelihood calculated by the likelihood calculation unit decreases.

上記の各構成によれば、上記尤度が高い場合には光源の影響を取り除く色補正を適切に行うことができ、上記尤度が低い場合には光源の誤判定に起因して画像データが不適切に色補正されることを抑制しつつ、光源の影響を低減させることができる。   According to each of the above configurations, when the likelihood is high, color correction that removes the influence of the light source can be appropriately performed, and when the likelihood is low, the image data is generated due to erroneous determination of the light source. The influence of the light source can be reduced while suppressing inappropriate color correction.

なお、上記画像処理装置は、コンピュータによって実現してもよく、この場合には、コンピュータを上記各部として動作させることにより、上記画像処理装置をコンピュータにて実現させるプログラム、およびそれを記録したコンピュータ読み取り可能な記録媒体も、本発明の範疇に含まれる。   The image processing apparatus may be realized by a computer. In this case, a program that causes the image processing apparatus to be realized by the computer by causing the computer to operate as each unit, and a computer reading that records the program. Possible recording media are also included in the scope of the present invention.

以上のように、本発明の画像処理装置は、上記光源推定部が予測した光源が上記画素データに対する実際の光源である尤度を算出する尤度算出部と、上記尤度算出部が算出した尤度に基づいて上記色補正部における上記画像データに対する色補正量を制御する補正量制御部とを備えている。   As described above, the image processing apparatus of the present invention calculates the likelihood that the light source predicted by the light source estimation unit is an actual light source for the pixel data, and the likelihood calculation unit calculates the likelihood. A correction amount control unit that controls a color correction amount for the image data in the color correction unit based on the likelihood.

また、本発明の色補正方法は、上記光源推定工程で予測した光源が上記画素データに対する実際の光源である尤度を算出する尤度算出工程と、上記尤度算出工程で算出した尤度に基づいて上記色補正工程における上記画像データに対する色補正量を制御する補正量制御工程とを含んでいる。   The color correction method according to the present invention includes a likelihood calculation step of calculating a likelihood that the light source predicted in the light source estimation step is an actual light source for the pixel data, and a likelihood calculated in the likelihood calculation step. And a correction amount control step for controlling a color correction amount for the image data in the color correction step.

それゆえ、予測した光源が画素データに対する実際の光源である尤度を算出し、算出した尤度に基づいて画像データに対する色補正量を制御することができる。これにより、光源の誤判定に起因して画像データが不適切に色補正されることを抑制できる。   Therefore, the likelihood that the predicted light source is the actual light source for the pixel data can be calculated, and the color correction amount for the image data can be controlled based on the calculated likelihood. As a result, it is possible to suppress the image data from being inappropriately color-corrected due to erroneous light source determination.

本発明の一実施形態について説明する。なお、本実施形態では、本発明をデジタルカラー複写機の画像処理装置に適用した場合の例について主に説明する。   An embodiment of the present invention will be described. In this embodiment, an example in which the present invention is applied to an image processing apparatus of a digital color copying machine will be mainly described.

(1−1.デジタルカラー複写機1の構成)
図2は、デジタルカラー複写機1の概略構成を示す断面図である。この図に示すように、デジタルカラー複写機1は、カラー画像入力装置10、カラー画像処理装置20、およびカラー画像出力装置40を備えている。
(1-1. Configuration of Digital Color Copier 1)
FIG. 2 is a cross-sectional view showing a schematic configuration of the digital color copying machine 1. As shown in this figure, the digital color copying machine 1 includes a color image input device 10, a color image processing device 20, and a color image output device 40.

カラー画像入力装置10は、光学情報を電気信号に変換するデバイス(例えばCCD等の撮像素子)を備えたスキャナ部より構成され、原稿からの反射光像により得られる画像データをRGBのアナログ信号として出力する。   The color image input device 10 includes a scanner unit including a device (for example, an image sensor such as a CCD) that converts optical information into an electrical signal, and image data obtained from a reflected light image from a document is converted into an RGB analog signal. Output.

カラー画像入力装置10にて読み取られた原稿の画像データ(アナログ信号)は、カラー画像処理装置20内を、A/D変換部21、シェーディング補正部22、入力階調補正部23、入力補正部24、領域分離処理部25、色補正部26、黒生成下色除去部27、空間フィルタ処理部28、出力階調補正部29、および階調再現処理部30の順で送られ、CMYKのデジタルカラー信号として、カラー画像出力装置40へ出力される。なお、デジタルカラー複写機1を、有線または無線を介して通信可能に接続された他の装置から画像データを受信したり、メモリーカード等の記録媒体から画像データを読み出したりして画像データを取得できるようにしてもよく、この場合にも取得した画像データはカラー画像処理装置20内を上記の順で送られる。   The original image data (analog signal) read by the color image input device 10 is converted into an A / D conversion unit 21, a shading correction unit 22, an input tone correction unit 23, and an input correction unit in the color image processing device 20. 24, the region separation processing unit 25, the color correction unit 26, the black generation and under color removal unit 27, the spatial filter processing unit 28, the output gradation correction unit 29, and the gradation reproduction processing unit 30 are sent in this order, and CMYK digital The color signal is output to the color image output device 40. The digital color copier 1 acquires image data by receiving image data from other devices connected to be communicable via wire or wirelessly, or reading image data from a recording medium such as a memory card. In this case as well, the acquired image data is sent in the color image processing apparatus 20 in the above order.

A/D変換部21は、入力された画像データをRGBのアナログ信号からデジタル信号に変換する。   The A / D converter 21 converts input image data from RGB analog signals to digital signals.

シェーディング補正部22は、A/D変換部21より送られてきたデジタルRGB信号に対して、カラー画像入力装置10の照明系、結像系、撮像系で生じる各種の歪みを取り除く処理を施す。   The shading correction unit 22 performs processing for removing various distortions generated in the illumination system, the imaging system, and the imaging system of the color image input apparatus 10 on the digital RGB signal sent from the A / D conversion unit 21.

入力階調補正部23は、シェーディング補正部22にて各種の歪みが取り除かれたRGB信号に対して、カラーバランスを整えると同時に、濃度信号などカラー画像処理装置20に採用されている画像処理システムの扱い易い信号に変換する処理を施す。   The input tone correction unit 23 adjusts the color balance of the RGB signal from which various distortions have been removed by the shading correction unit 22 and at the same time, the image processing system employed in the color image processing apparatus 20 such as a density signal. The signal is converted into an easy-to-handle signal.

入力補正部24は、上記画像データに基づき、上記原稿(画像データ)の撮影シーンにおける光源の推定を行うと共に、その光源推定結果に基づいて画像データに対する色補正処理を行う。入力補正部24の詳細については後述する。   The input correction unit 24 estimates the light source in the shooting scene of the original (image data) based on the image data, and performs color correction processing on the image data based on the light source estimation result. Details of the input correction unit 24 will be described later.

領域分離処理部25は、画像データのRGB信号より、入力画像中の各画素を文字領域、網点領域、写真領域の何れかに分離する。また、領域分離処理部25は、その分離結果に基づき、画像データ中の各画素が上述のどの領域に属しているかを示す領域識別信号を生成し、この領域識別信号を黒生成下色除去部27、空間フィルタ処理部28、および階調再現処理部30へと出力する。さらに、領域分離処理部25は、入力補正部24より入力された画像データをそのまま後段の色補正部26に出力する。   The region separation processing unit 25 separates each pixel in the input image into one of a character region, a halftone dot region, and a photograph region from the RGB signal of the image data. Further, the region separation processing unit 25 generates a region identification signal indicating to which region each pixel in the image data belongs based on the separation result, and this region identification signal is generated as a black generation under color removal unit. 27, to the spatial filter processing unit 28 and the gradation reproduction processing unit 30. Further, the region separation processing unit 25 outputs the image data input from the input correction unit 24 to the subsequent color correction unit 26 as it is.

色補正部26は、色再現の忠実化を図るために、画像データに対して不要吸収成分を含むCMY色材の分光特性に基づいた色濁りを取り除く処理を行う。   The color correction unit 26 performs a process of removing color turbidity based on the spectral characteristics of the CMY color material including unnecessary absorption components from the image data in order to improve the color reproduction.

黒生成下色除去部27は、色補正後のCMYの3色信号から黒(K)信号を生成する黒生成処理を行う一方、元のCMY信号から黒生成で得たK信号を差し引いて新たなCMY信号を生成する下色除去処理を行うものである。これらの処理(黒生成処理・下色除去処理)の結果、CMYの3色信号はCMYKの4色信号に変換される。   The black generation and under color removal unit 27 performs black generation processing for generating a black (K) signal from the CMY three-color signals after color correction, while subtracting the K signal obtained by black generation from the original CMY signal to newly The undercolor removal process for generating a simple CMY signal is performed. As a result of these processes (black generation process / under color removal process), the CMY three-color signal is converted into a CMYK four-color signal.

空間フィルタ処理部28は、黒生成下色除去部27より入力されるCMYK信号の画像データに対して、領域識別信号を基にデジタルフィルタによる空間フィルタ処理を行い、空間周波数特性を補正する。これにより、出力画像のぼやけや粒状性劣化を軽減することができる。出力階調補正部29および階調再現処理部30においては、空間フィルタ処理部28と同様に、CMYK信号の画像データに対して、領域識別信号に基づいて後述する所定の処理が施される。   The spatial filter processing unit 28 performs spatial filter processing using a digital filter on the image data of the CMYK signal input from the black generation and under color removal unit 27 to correct the spatial frequency characteristics. As a result, blurring of the output image and deterioration of graininess can be reduced. In the output gradation correction unit 29 and the gradation reproduction processing unit 30, similar to the spatial filter processing unit 28, predetermined processing described later is performed on the image data of the CMYK signal based on the region identification signal.

例えば、領域分離処理部25にて文字に分離された領域は、文字の再現性を高めるために、空間フィルタ処理部28での空間フィルタ処理において、高周波成分の強調量が大きいフィルタが用いられる。同時に、階調再現処理部30において、高域周波成分の再現に適した高解像度のスクリーンによる二値化もしくは多値化処理が実施される。   For example, in a region separated into characters by the region separation processing unit 25, a filter having a high enhancement amount of high-frequency components is used in the spatial filter processing in the spatial filter processing unit 28 in order to improve the reproducibility of characters. At the same time, the gradation reproduction processing unit 30 performs binarization or multi-value processing using a high-resolution screen suitable for reproducing high-frequency components.

また、領域分離処理部25にて網点に分離された領域に関しては、空間フィルタ処理部28において、入力網点成分を除去するためのローパス・フィルタ処理が施される。そして、出力階調補正部29において、濃度信号などの信号をカラー画像出力装置40の特性値である網点面積率に変換する出力階調補正処理を行った後、階調再現処理部30で、最終的に画像を画素に分離してそれぞれの階調を再現できるように処理する階調再現処理が施される。   Further, with respect to the region separated into halftone dots by the region separation processing unit 25, the spatial filter processing unit 28 performs low pass filter processing for removing the input halftone component. The output tone correction unit 29 performs an output tone correction process for converting a signal such as a density signal into a halftone dot area ratio that is a characteristic value of the color image output device 40, and then the tone reproduction processing unit 30. A gradation reproduction process is performed in which the image is finally separated into pixels and each gradation is reproduced.

領域分離処理部25にて写真に分離された領域に関しては、階調再現性を重視したスクリーンでの二値化または多値化処理が行われる。   For the region separated into photographs by the region separation processing unit 25, binarization or multi-value processing on the screen is performed with emphasis on gradation reproducibility.

上述した各処理が施された画像データは、一旦記憶装置(図示せず)に記憶され、所定のタイミングで読み出されてカラー画像出力装置40に入力される。   The image data subjected to the above-described processes is temporarily stored in a storage device (not shown), read at a predetermined timing, and input to the color image output device 40.

カラー画像出力装置40は、画像データを紙などの記録材上に出力するもので、例えば、電子写真方式やインクジェット方式を用いたカラー画像出力装置等をあげることができるが特に限定されるものでは無い。なお、以上の処理は不図示のCPU(Central Processing Unit)により制御される。   The color image output device 40 outputs image data on a recording material such as paper. For example, a color image output device using an electrophotographic method or an ink jet method can be used, but the color image output device 40 is not particularly limited. No. The above processing is controlled by a CPU (Central Processing Unit) (not shown).

(1−2.入力補正部24の構成)
図3は、入力補正部24の概略構成を示すブロック図である。この図に示すように、入力補正部24は、色分布算出部241、記憶部242、尤度算出部243、光源推定部244、補正量制御部245、補正部246を備えている。
(1-2. Configuration of Input Correction Unit 24)
FIG. 3 is a block diagram illustrating a schematic configuration of the input correction unit 24. As shown in this figure, the input correction unit 24 includes a color distribution calculation unit 241, a storage unit 242, a likelihood calculation unit 243, a light source estimation unit 244, a correction amount control unit 245, and a correction unit 246.

色分布算出部241は、入力された画像データの色分布(色度ヒストグラム)を求める。   The color distribution calculation unit 241 obtains the color distribution (chromaticity histogram) of the input image data.

色分布の算出方法は特に限定されるものではないが、例えば、入力された画像データをCIEのx−y色空間に変換し、変換した画像データにおける各色の出現頻度(度数)をn×mサイズの2次元ヒストグラムで表して、これを入力された画像データの色分布とする方法を用いることができる。このようにして生成された2次元ヒストグラムは、x値をn階級に分割し、y値をm階級に分割したものとなる。なお、色分布の算出に用いる色空間はCIEのx−y色空間に限るものではなく、例えば、r=R/G,b=B/Gやr=R/(R+G+B),g=G/(R+G+B)で表されるRGBに基づく色空間などを用いてもよい。また、いずれの色空間を用いた場合にも、1セットの色度データにおける離散的な度数分布によって連続確率分布を近似できる。なお、各画素を画素の色度値を含むカラーベクトルによって表現してもよい。   The calculation method of the color distribution is not particularly limited. For example, the input image data is converted into the CIE xy color space, and the appearance frequency (frequency) of each color in the converted image data is set to n × m. It is possible to use a method of representing a two-dimensional histogram of the size and setting this as the color distribution of the input image data. The two-dimensional histogram generated in this way is obtained by dividing the x value into n classes and the y value into m classes. The color space used for calculating the color distribution is not limited to the CIE xy color space. For example, r = R / G, b = B / G, r = R / (R + G + B), g = G / A color space based on RGB represented by (R + G + B) may be used. In addition, in any color space, the continuous probability distribution can be approximated by a discrete frequency distribution in one set of chromaticity data. Each pixel may be expressed by a color vector including the chromaticity value of the pixel.

記憶部242には、平均的な撮影シーンの分光反射率を予め定めたデータである参照データの画像を複数の光源で照射した時の色分布データ(色度ヒストグラム)が光源毎に格納されている。なお、上記参照データとしては、例えば、標準サンプル(例えば、マンセルのカラーチップ)の分光反射率のデータから計算した値を用いることができる。   The storage unit 242 stores, for each light source, color distribution data (chromaticity histogram) obtained when a plurality of light sources irradiate an image of reference data, which is data in which the spectral reflectance of an average shooting scene is predetermined. Yes. As the reference data, for example, a value calculated from spectral reflectance data of a standard sample (for example, Munsell color chip) can be used.

尤度算出部243は、色分布算出部241が入力された画像データから算出した色分布データと、記憶部242に格納されている各光源モデルで参照データを照射した時の色分布データとの相関に基づいて、各画素についての各光源モデルに対する尤度(入力された画像データにおける各画素の実際の光源が各光源モデルである確率)p(x)、および/または、画像全体についての各光源モデルに対する尤度(入力された画像データの光源が各光源モデルである確率)p(X)を算出する。 The likelihood calculation unit 243 includes color distribution data calculated from the image data input by the color distribution calculation unit 241 and color distribution data obtained when reference data is irradiated with each light source model stored in the storage unit 242. Based on the correlation, the likelihood for each light source model for each pixel (probability that the actual light source for each pixel in the input image data is each light source model) p (x i ), and / or for the entire image The likelihood (probability that the light source of the input image data is each light source model) p (X) for each light source model is calculated.

例えば、表面反射率および光源のモデルを用いて色の度数分布を近似するようにしてもよい。色の度数分布の評価方法としては、例えば、代表的な反射率関数に基づいて多数の無作為標本を作成し、光源のスペクトル強度分布e(λ)の条件下で反射率関数r(λ)を与える方法がある。上記反射率関数r(λ)としては、例えばマンセル・マットの反射率462を用いることができる。センサー応答Riは、下記式(1)に示すように、センサー感度関数S(λ)に基づいて算出することができる。   For example, the color frequency distribution may be approximated using a surface reflectance and a light source model. As a method for evaluating the color frequency distribution, for example, a large number of random samples are created based on a typical reflectance function, and the reflectance function r (λ) is obtained under the condition of the spectral intensity distribution e (λ) of the light source. There is a way to give. As the reflectance function r (λ), for example, Munsell-Matte reflectance 462 can be used. The sensor response Ri can be calculated based on the sensor sensitivity function S (λ) as shown in the following formula (1).

また、撮像シーンにおける色分布の他の評価方法として、光源下における反射率を設定し、色度値のヒストグラムを算出する方法を用いてもよい。この方法は、大きなサンプルに対する無作為抽出法によって色度の頻度の期待値を算出する方法と等価である。2次元ヒストグラムの標準化によってp(X|e)で表される頻度分布を算出できる。この第2の光源の評価方法は、例えば推定された光源に対応する表面(被写体表面)の反射率の標準光源(例えばCIE・D6500)に対応する反射率へのマッピングに近似可能な色補正行列(色補正マトリクス)を計算するために用いることができる。この色補正行列を用いて画像の色補正を行うことにより、画像を従来の色補正技術よりも好適に補正することができる。 Further, as another evaluation method of the color distribution in the imaging scene, a method of setting a reflectance under a light source and calculating a histogram of chromaticity values may be used. This method is equivalent to a method of calculating an expected value of chromaticity frequency by a random sampling method for a large sample. A frequency distribution represented by p (X | e j ) can be calculated by standardization of the two-dimensional histogram. This second light source evaluation method is, for example, a color correction matrix that can be approximated to the mapping of the reflectance of the surface (subject surface) corresponding to the estimated light source to the reflectance corresponding to the standard light source (for example, CIE D6500). It can be used to calculate (color correction matrix). By performing color correction of the image using this color correction matrix, the image can be corrected more suitably than the conventional color correction technique.

なお、尤度算出部243における尤度算出方法については後述する。   The likelihood calculation method in the likelihood calculation unit 243 will be described later.

光源推定部244は、尤度算出部243が算出した各画素の尤度p(x)および/または画像全体の尤度p(X)に基づいて推定光源を求める。本実施形態では、光源推定部244がMAP(a maximum a posteriori estimator;最大事後確率)評価を行うことによって推定光源を求めるようになっている。 The light source estimation unit 244 obtains an estimated light source based on the likelihood p (x i ) of each pixel calculated by the likelihood calculation unit 243 and / or the likelihood p (X) of the entire image. In the present embodiment, the light source estimation unit 244 obtains an estimated light source by performing a MAP (a maximum a posteriori estimator) evaluation.

すなわち、入力画像データXに対するj番目の光源の事後確率をp(e|X)、このj番目の光源の事前確率をp(e)とする。この場合、事後確率p(e|X)はベイズの式により事前確率p(e)と尤度(尤度関数)p(X|e)とによって下記式(2)のように表される。 That is, the posterior probability of the j-th light source for the input image data X is p (e j | X), and the prior probability of the j-th light source is p (e j ). In this case, the posterior probability p (e j | X) is expressed by the following equation (2) from the prior probability p (e j ) and the likelihood (likelihood function) p (X | e j ) according to the Bayesian equation. Is done.

なお、入力画像データXの尤度p(X|e)は、画像中において画素同士が独立であると仮定すると、下記式(3)に示すように、画像中における全画素の尤度p(x|e)の積として算出することができる。 Note that the likelihood p (X | e j ) of the input image data X is the likelihood p of all pixels in the image as shown in the following equation (3), assuming that the pixels are independent in the image. It can be calculated as the product of (x i | e j ).

そして、光源推定部244は、上記のように算出される事後確率p(e|X)が最大である光源モデルを入力画像データの光源と推定する。 Then, the light source estimation unit 244 estimates the light source model having the maximum posterior probability p (e j | X) calculated as described above as the light source of the input image data.

補正量制御部245は、尤度算出部243が算出した各画素の尤度p(x)および/または画像全体の尤度p(X)に基づいて、入力画像データに対する色補正量(色補正の度合い)を設定する。色補正量の設定方法の詳細については後述する。 Based on the likelihood p (x i ) of each pixel calculated by the likelihood calculation unit 243 and / or the likelihood p (X) of the entire image, the correction amount control unit 245 determines the color correction amount (color Set the degree of correction). Details of the color correction amount setting method will be described later.

補正部246は、補正量制御部245の設定した補正量に基づいて入力画像データの色補正を行う。   The correction unit 246 performs color correction of the input image data based on the correction amount set by the correction amount control unit 245.

次に、入力補正部24における処理の流れについて、図1に示すフロー図を参照しながら説明する。   Next, the flow of processing in the input correction unit 24 will be described with reference to the flowchart shown in FIG.

入力補正部24に入力画像データが入力されると、まず、色分布算出部241が入力画像データの色分布(色度ヒストグラム)を算出する(S1)。   When input image data is input to the input correction unit 24, first, the color distribution calculation unit 241 calculates the color distribution (chromaticity histogram) of the input image data (S1).

次に、尤度算出部243が、記憶部242から各光源モデルで参照データを照らしたときの色分布データを読み出し、色分布算出部241の算出した入力画像データの色分布と比較することで、各光源モデルの尤度(画像全体の尤度p(X)および/または各画素の尤度p(x))を算出する(S2)。 Next, the likelihood calculation unit 243 reads the color distribution data when the reference data is illuminated with each light source model from the storage unit 242, and compares it with the color distribution of the input image data calculated by the color distribution calculation unit 241. The likelihood of each light source model (likelihood p (X) of the entire image and / or likelihood p (x i ) of each pixel) is calculated (S2).

次に、光源推定部244が、尤度算出部243の算出した尤度に基づいて光源を推定する(S3)。すなわち、尤度が最大である光源モデルを入力画像データの光源として推定する。   Next, the light source estimation unit 244 estimates a light source based on the likelihood calculated by the likelihood calculation unit 243 (S3). That is, the light source model having the maximum likelihood is estimated as the light source of the input image data.

また、補正量制御部245が、S3で推定した光源の尤度に応じて入力画像データを複数のレベルに分類する(S5)。なお、分類方法の詳細については後述する。   Further, the correction amount control unit 245 classifies the input image data into a plurality of levels according to the likelihood of the light source estimated in S3 (S5). Details of the classification method will be described later.

そして、補正量制御部245は、分類結果に応じて入力画像データに対する色補正の程度を設定する(S5)。ここで、補正量制御部245は、尤度が低いほど補正量(補正の程度)が少なくなるように色補正の程度を設定する。例えば、補正量制御部245は、尤度が閾値以上であるか閾値未満であるかに応じて2段階に分類する。そして、閾値以上である場合には、S3で推定した光源の影響を完全に取り除くための色補正、すなわち推定光源の分光特性を標準光源の分光特性に置き換える色補正を行わせる。一方、閾値未満である場合には、閾値以上の場合よりも色補正の程度を低減させる。すなわち、推定光源の分光特性を推定光源と標準光源との間の分光特性に置き換える色補正を行わせる。あるいは、閾値以上である場合には色補正を行う一方、閾値未満である場合には色補正を行わないようにしてもよい。また、尤度の大きさに応じて入力画像データを多段階に分類し、尤度が小さいほど補正の程度が小さくなるように多段階に色補正量を設定してもよい。   Then, the correction amount control unit 245 sets the degree of color correction for the input image data according to the classification result (S5). Here, the correction amount control unit 245 sets the degree of color correction so that the correction amount (degree of correction) decreases as the likelihood decreases. For example, the correction amount control unit 245 classifies into two stages depending on whether the likelihood is greater than or less than a threshold value. If it is equal to or greater than the threshold value, color correction for completely removing the influence of the light source estimated in S3, that is, color correction for replacing the spectral characteristic of the estimated light source with the spectral characteristic of the standard light source is performed. On the other hand, when it is less than the threshold, the degree of color correction is reduced as compared with the case where it is equal to or greater than the threshold. That is, color correction is performed to replace the spectral characteristic of the estimated light source with the spectral characteristic between the estimated light source and the standard light source. Alternatively, color correction may be performed when the value is equal to or greater than the threshold value, and color correction may not be performed when the value is less than the threshold value. Alternatively, the input image data may be classified into multiple stages according to the size of the likelihood, and the color correction amount may be set in multiple stages so that the degree of correction decreases as the likelihood decreases.

その後、補正部246が、補正量制御部245が設定した補正量に基づいて入力画像データの色補正を行う(S6)。   Thereafter, the correction unit 246 performs color correction of the input image data based on the correction amount set by the correction amount control unit 245 (S6).

(1−3.尤度の算出方法)
(1−3−1.尤度の算出方法の例1)
撮像シーンの光源についてMAP(a maximum a posteriori estimator;最大事後確率)評価を適用する。
(1-3. Method for calculating likelihood)
(1-3-1. Example 1 of likelihood calculation method)
MAP (a maximum a posteriori estimator) evaluation is applied to the light source of the imaging scene.

画像データXに与えられたj番目の光源eの事後確率をp(e|X)、このj番目の光源eの事前確率をp(e)とする。この場合、事後確率p(e|X)は、ベイズの式により、事前確率p(e)と尤度関数p(X|e)とによって下記式(4)のように表される。 The posterior probability of j-th light source e j given to the image data X p (e j | X) , the prior probability of the j th source e j and p (e j). In this case, the posterior probability p (e j | X) is expressed by the Bayesian equation by the prior probability p (e j ) and the likelihood function p (X | e j ) as in the following equation (4). .

画像中において画素同士が独立していると仮定すると、下記式(5)に示すように、画像データXの尤度関数p(X|e)は画像データXにおける全画素の尤度p(x|e)の積として算出される。 Assuming that the pixels are independent in the image, the likelihood function p (X | e j ) of the image data X is the likelihood p (( x i | e j ).

上記確率p(X)は、下記式(6)に示すように、全光源についての周辺確率の同時確率(複合確率、結合確率)p(X,e)に等しい。なお、積分記号の符号Eは、全光源の色空間にわたって積分することを意味している。   The probability p (X) is equal to the joint probability (composite probability, joint probability) p (X, e) of the peripheral probabilities for all light sources, as shown in the following formula (6). The symbol E of the integration symbol means that integration is performed over the color space of all light sources.

条件付き確率の定義により、上記式(6)から下記式(7)を導くことができる。   By defining the conditional probability, the following formula (7) can be derived from the above formula (6).

さらに、上記式(7)より同時確率は下記式(8)のようになる。   Furthermore, the joint probability is as shown in the following formula (8) from the above formula (7).

ここで、p(X|e)は画像データXが光源eに対応する画像である確率を示しており、p(e)は光源eの事前確率を示している。 Here, p (X | e) indicates the probability that the image data X is an image corresponding to the light source e, and p (e) indicates the prior probability of the light source e.

また、M個の個別の光源が存在する場合には、上記p(X)は下記式(9)のように表される。   Further, when there are M individual light sources, the above p (X) is expressed by the following formula (9).

また、全ての光源が同様に存在しうると仮定すると、下記式(10)に示すように条件付き確率の平均値を画像全体の尤度(確率)p(X)とすることができる。   Assuming that all the light sources can exist in the same manner, the average value of the conditional probabilities can be set as the likelihood (probability) p (X) of the entire image as shown in the following equation (10).

ここで、画素独立の仮定を適用すると、上記尤度p(X)は、下記式(11)に示すように各光源について条件付き確率の平均値として算出することができる。なお、p(x|ej)は、画素xの光源が光源eである確率を示している。 Here, when a pixel-independent assumption is applied, the likelihood p (X) can be calculated as an average value of conditional probabilities for each light source as shown in the following formula (11). Incidentally, p (x i | ej), the light source of the pixel x i indicates the probability that a light source e j.

(1−3−2.尤度の算出方法の例2)
上記した尤度p(X)の算出方法の例1は、尤度(確率)p(x)が0に近い画素が存在している場合に、大部分の画素の尤度p(x)が高い値の場合であっても、画像全体の尤度p(X)が0に近い値になってしまう場合がある。そこで、この問題を解決するために、以下に示す方法によって画像全体の確率p(X)を算出してもよい。
(1-3-2. Example 2 of likelihood calculation method)
Example 1 of a method of calculating the above-mentioned likelihood p (X), when the likelihood (probability) p (x i) is a pixel exists close to 0, most of the pixels likelihood p (x i ) Is a high value, the likelihood p (X) of the entire image may be close to 0. In order to solve this problem, the probability p (X) of the entire image may be calculated by the following method.

まず、画素独立の仮定の下で、一般的な損失を考慮せずに光源の事前確率が一定であると仮定し、下記式(12)に基づいて全光源についての全画素における周辺確率p(x)を算出する。 First, under the assumption of pixel independence, it is assumed that the prior probability of the light source is constant without considering a general loss, and the peripheral probability p ( x i ) is calculated.

そして、全光源についての全画素における周辺確率p(x)の算出結果に基づいて、画像の確率マップを作成する。この確率マップでは、光源モデルが画素の光源であり得ないことを示す値(0)、および画素の光源であり得ることを示す値(1)によって各画素の値[0,1]を示す。この確率マップを用いることにより、画素全体の尤度p(X)ではなく、画素の尤度p(x)の分布に基づいて分類を行うことができる。また、画素の周辺確率p(x)を与えることにより、画素独立の仮定を用いて画像全体の確率p(X)を下記式(13)によって容易に算出することができる。 Then, an image probability map is created based on the calculation result of the peripheral probability p (x i ) in all pixels for all light sources. In this probability map, the value [0, 1] of each pixel is indicated by a value (0) indicating that the light source model cannot be the light source of the pixel and a value (1) indicating that the light source model can be the light source of the pixel. By using this probability map, classification can be performed based on the distribution of the likelihood p (x i ) of the pixel, not the likelihood p (X) of the entire pixel. Further, by giving the pixel peripheral probability p (x i ), the probability p (X) of the entire image can be easily calculated by the following equation (13) using the pixel-independent assumption.

(1−3−3.尤度の算出方法の例3)
計算を効率的に行うために、画像のヒストグラムを用いて画像全体の尤度p(X)を算出してもよい。つまり、画像の色分布(ヒストグラム)をすでに計算しているので、このヒストグラムに基づいて画像全体の尤度p(X)を効率的に算出できる。
(1-3-3. Example 3 of likelihood calculation method)
In order to perform the calculation efficiently, the likelihood p (X) of the entire image may be calculated using a histogram of the image. That is, since the color distribution (histogram) of the image has already been calculated, the likelihood p (X) of the entire image can be efficiently calculated based on this histogram.

具体的には、画像全体の尤度p(X)を下記式(14)に基づいて算出する。   Specifically, the likelihood p (X) of the entire image is calculated based on the following formula (14).

上記式を周辺確率関数f(x)を用いて記載すると下記式(15)になる。 When the above equation is described using the marginal probability function f (x i ), the following equation (15) is obtained.

P個のビン(色度データ)における色の頻度のベクトルをgとすると、gは下記式のように表される。   If a vector of color frequencies in P bins (chromaticity data) is g, g is expressed by the following equation.

g=[N1,N2,・・・,Np]
全画素のヒストグラムにgが含まれるので、下記式(16)が成り立つ。
g = [N1, N2,..., Np]
Since g is included in the histogram of all pixels, the following equation (16) is established.

各画素についての上記f(x)の合計は、画像の色のヒストグラムを用いて下記式(17)のように近似できる。 The sum of f (x i ) for each pixel can be approximated by the following equation (17) using a histogram of the color of the image.

ここで、各画素のbは、各組における色の座標を示している。なお、この近似には、各画素に対する量子化誤差e(x,b)が含まれる場合がある。 Here, b j of each pixel indicates a color coordinate in each group. Note that this approximation may include a quantization error e (x i , b j ) for each pixel.

e(x,b)=f(x)−f(b
色度データの中心に向かうf(x)のベクトルをfと定義すると、下記式が成り立つ。
e (x i , b j ) = f (x i ) −f (b j )
When a vector of f (x) toward the center of the chromaticity data is defined as f, the following equation is established.

f=[f(b),f(b),・・・,f(b)]
ベクトルfとベクトルgとの内積を計算することにより、下記式に示すように画像の対数確率を算出できる。
f = [f (b 1 ), f (b 2 ),..., f (b p )]
By calculating the inner product of the vector f and the vector g, the log probability of the image can be calculated as shown in the following equation.

log p(X) ≒ <f,g>+C
(1−4.入力画像データの分類方法)
(1−4−1.入力画像データの分類方法の例1)
この実施例にかかるアルゴリズムでは、補正の要否(あるいは補正の程度)を制御するために、画像全体の尤度p(X)を用いる。
log p (X) ≈ <f, g> + C 0
(1-4. Method for classifying input image data)
(1-4-1. Example 1 of classification method of input image data)
In the algorithm according to this embodiment, the likelihood p (X) of the entire image is used to control whether or not correction is necessary (or the degree of correction).

具体的には、補正量制御部245が、画像全体の尤度p(X)が予め設定された固定閾値以上であるか否かを判断する。そして、尤度p(X)が固定閾値以上である場合、撮像シーンの確率モデルが適切であって、画像の実際の光源が推定された光源と一致している可能性が高いので、補正を行う(あるいは光源の影響を除去するように算出した補正量をそのまま適用して補正を行う)。   Specifically, the correction amount control unit 245 determines whether or not the likelihood p (X) of the entire image is greater than or equal to a preset fixed threshold value. If the likelihood p (X) is equal to or greater than a fixed threshold, the probability model of the imaging scene is appropriate, and the actual light source of the image is likely to match the estimated light source. (Or correction is performed by applying the correction amount calculated so as to remove the influence of the light source).

一方、確率P(X)が固定閾値未満である場合、画像が撮像シーンのモデルと一致しておらず、画像の実際の光源が推定された光源と一致していない可能性が高いので、補正を行わない(あるいは固定閾値以上の場合よりも補正量を少なくする)。   On the other hand, if the probability P (X) is less than the fixed threshold, the image does not match the model of the captured scene, and it is highly likely that the actual light source of the image does not match the estimated light source. Is not performed (or the correction amount is reduced as compared with the case where the threshold value is not less than the fixed threshold).

なお、上記閾値を固定値とせず、可変値にしてもよい。例えば、閾値を可変値とし、信頼性評価の結果に基づいて閾値を設定することで補正の程度を増減させるようにしてもよい。補正の程度の増減方法としては、例えば、特許文献2に開示されている方法を用いることができる。   The threshold value may be a variable value instead of a fixed value. For example, the threshold value may be a variable value and the degree of correction may be increased or decreased by setting the threshold value based on the reliability evaluation result. As a method for increasing or decreasing the degree of correction, for example, the method disclosed in Patent Document 2 can be used.

(1−4−2.入力画像データの分類方法の例2)
画素の尤度p(x)を組み合わせて得られる画像全体の尤度p(X)ではなく、画素の尤度p(x)の分布を用いて分類を行うようにしてもよい。
(1-4-2. Example 2 of classification method of input image data)
Classification may be performed using the distribution of the likelihood p (x i ) of the pixels instead of the likelihood p (X) of the entire image obtained by combining the likelihoods p (x i ) of the pixels.

この分類方法の例では、信頼値(confidence values)の累積確率分布の評価および後述する2つのパラメータによる制御を行う。なお、逆累積分布(inverse cumulative distribution)を用いてもよい。   In this classification method example, evaluation of the cumulative probability distribution of confidence values and control by two parameters described later are performed. Note that an inverse cumulative distribution may be used.

f(x)を画素の信頼値の度数分布とし、c(a)を0≦x≦aの範囲内における累積分布とすると、c(a)は下記式(18)のように表される。   When f (x) is a frequency distribution of pixel reliability values and c (a) is a cumulative distribution within a range of 0 ≦ x ≦ a, c (a) is expressed by the following equation (18).

上記式(18)によって算出されるc(a)を用いて、例えばc(a)<tproportionの場合には補正を行わず、c(a)≧tproportionの場合には補正を行うようにすればよい。 Using c (a) calculated by the above equation (18), for example, no correction is performed when c (a 0 ) <t proportion , and correction is performed when c (a 0 ) ≧ t proportion. What should I do?

この方法では、基本的に、各画像の累積的な分布の形状を評価する。パラメータaは画素の信頼値を示しており、c(a)は画素の信頼値の累積度数を示している。
累積閾値tproportionは、確率分布f(x)における領域を示している。
In this method, basically, the shape of the cumulative distribution of each image is evaluated. The parameter a 0 indicates the pixel reliability value, and c (a 0 ) indicates the cumulative frequency of the pixel reliability value.
Cumulative threshold t Proportion indicates a region in the probability distribution f (x).

この分類方法の例は、画像セットに対するパラメータaおよびtproportionの2つのパラメータに対する補正パーセンテージを最大値にすることによって最適化される。
図4は、これら2つのパラメータと補正パーセンテージ(percentage correct(ROC))との関係を示している。図4における等高線上の各点は、補正パーセンテージが互いに等しいことを示している。この図に示すように、a=0.1およびtproportion=0.2において補正パーセンテージは最大値0.875になる。最適な累積閾値tproportion=0.2の表面を通る断面図を図5に示す。
This example classification method is optimized by maximizing the correction percentage for the two parameters a 0 and t proportion for the image set.
FIG. 4 shows the relationship between these two parameters and the percentage correct (ROC). Each point on the contour line in FIG. 4 indicates that the correction percentages are equal to each other. As shown in this figure, the correction percentage reaches a maximum value of 0.875 at a 0 = 0.1 and t production = 0.2. FIG. 5 shows a cross-sectional view through the surface with the optimum cumulative threshold value t production = 0.2.

(1−4−3.入力画像データの分類方法の例3)
画素毎に重み付けを行い、その結果に基づいて算出される尤度を用いて光源の推定を行ってもよい。例えば、ある被写体を表す画素について、画素毎に光源を推定して推定光源の尤度(推定した光源が画素の実際の光源である確率)を求め、算出した各画素の尤度に応じて各画素の重み付けを行う。そして、上記処理を全画素について繰り返し、複数の画素の重み付け結果に基づいて光源を推定し、推定した光源についての画像全体の尤度p(X)を算出する。そして、上記尤度p(X)が閾値以上である場合には画素の色補正を行い(あるいは光源の影響を除去する色補正を行い)、閾値未満の場合には画素の色補正を行わない(あるいは閾値以上の場合よりも色補正の程度を小さくする)。
(1-4-3. Example 3 of classification method of input image data)
Weighting may be performed for each pixel, and the light source may be estimated using the likelihood calculated based on the result. For example, for a pixel representing a certain subject, a light source is estimated for each pixel, and the likelihood of the estimated light source (probability that the estimated light source is the actual light source of the pixel) is obtained. Pixel weighting is performed. Then, the above process is repeated for all the pixels, the light source is estimated based on the weighted result of the plurality of pixels, and the likelihood p (X) of the entire image for the estimated light source is calculated. If the likelihood p (X) is equal to or greater than the threshold value, pixel color correction is performed (or color correction for removing the influence of the light source is performed), and if the likelihood p (X) is less than the threshold value, pixel color correction is not performed. (Alternatively, the degree of color correction is made smaller than when the threshold value is exceeded).

画素の重み付けを行うことにより、実際には有り得ない光源を推定された画素(および実際には有り得ない光源を推定された画素の領域)が最終的な評価に及ぼす影響を低減できる。実際の補正は画像全体に適用されるとしても、撮像シーンの光源の評価としてはこの方法がより好ましい。重み付けの方法および重み付けを行うシステムとしては、例えば特許文献3に記載されている方法およびシステムを用いることができる。   By performing the pixel weighting, it is possible to reduce the influence of the pixel estimated from the light source that is not actually possible (and the region of the pixel from which the light source is actually impossible) on the final evaluation. Even if the actual correction is applied to the entire image, this method is more preferable for evaluating the light source of the imaging scene. As a weighting method and a weighting system, for example, the method and system described in Patent Document 3 can be used.

(1−5.処理結果の例)
上記した尤度の算出方法および入力画像データに分類方法を図6に示す画像群に適用した場合の処理結果の例を以下に示す。
(1-5. Example of processing result)
An example of processing results when the likelihood calculation method and the classification method for the input image data described above are applied to the image group shown in FIG. 6 is shown below.

図7は、図6に示した各画像の画素色度値(CIE色度=√(a*2+b*2))を用いた場合の、各画像における2次元色度ヒストグラム(色度データの中心をx=0.025〜0,675までの0.05刻みの値とし、yをxと同値としたときのCIEのx色度およびy色度)の占めるパーセンテージをまとめたものである。なお、以下の説明では、色度データにおける2次元ヒストグラムのパーセンテージを画像フットプリントエリア(image footprint area)という。また、図7に示した四角形は本来補正すべきでない画像を示しており、丸い点は本来補正すべきである画像を示している。 FIG. 7 shows a two-dimensional chromaticity histogram (chromaticity data of the chromaticity data) in each image when the pixel chromaticity value (CIE chromaticity = √ (a * 2 + b * 2 )) of each image shown in FIG. 6 is used. This is a summary of the percentages occupied by CIE x chromaticity and y chromaticity when the center is a value in increments of 0.05 from x = 0.025 to 0,675 and y is the same value as x. In the following description, the percentage of the two-dimensional histogram in the chromaticity data is referred to as an image footprint area. Further, the quadrangle shown in FIG. 7 indicates an image that should not be corrected originally, and the round dot indicates an image that should be corrected originally.

図3における全ての画像に対して補正を施した場合、適切な補正が行われた画像は45%(18/40)であった。   When all the images in FIG. 3 were corrected, 45% (18/40) of the images that were appropriately corrected.

なお、補正の適切さには補正方法および補正量が大きく影響する。また、補正を行う場合であっても、補正量が多い場合には不適切な補正になるが、補正量が少ない場合には不適切な補正にならない場合もある。上記パーセンテージはアルゴリズムの性質を評価するための一測定例であり、画像の色の傾向を大きく変更する補正を施した場合の結果を示している。   Note that the correction method and the correction amount greatly affect the appropriateness of correction. Even when correction is performed, the correction is inappropriate when the correction amount is large, but may not be correct when the correction amount is small. The above percentage is an example of measurement for evaluating the nature of the algorithm, and shows the result when correction is performed to greatly change the color tendency of the image.

図8は、上記した尤度の算出方法の例1の方法によって画像全体の尤度p(X)を算出し、上記した入力画像データの分類方法の例1によって分類を行った場合の結果を示している。なお、尤度p(X)の閾値は固定値とし、閾値以上の画像を補正すべき画像、閾値未満の画像を補正すべきでない画像とした。   FIG. 8 shows the result when the likelihood p (X) of the entire image is calculated by the method of the first example of the likelihood calculation method described above, and the classification is performed by the example 1 of the classification method of the input image data described above. Show. Note that the threshold value of likelihood p (X) is a fixed value, and an image that is equal to or greater than the threshold value is to be corrected, and an image that is less than the threshold value is not to be corrected.

図中に示した×印は補正すべきでないと判定された画像を示している。このアルゴリズムによって補正すべきであると判定された画像のパーセンテージは73%(29/40)であった。   The crosses shown in the figure indicate images that are determined not to be corrected. The percentage of images determined to be corrected by this algorithm was 73% (29/40).

また、図9(b)〜図9(d)は、図9(a)のオリジナル画像に対して尤度p(X)の閾値を固定して処理を行った場合の結果を示している。図9(b)に示した例では、画像全体の尤度p(X)が閾値に満たないので、色補正は施されていない。図9(d)に示した四角形62は尤度を考慮しない方法によって算出された推定光源、点64は尤度に基づいて算出された推定光源を示している。図9(c)は一致表面を示す図である。   FIGS. 9B to 9D show the results when processing is performed with the threshold value of likelihood p (X) fixed on the original image of FIG. 9A. In the example shown in FIG. 9B, since the likelihood p (X) of the entire image is less than the threshold value, color correction is not performed. A square 62 shown in FIG. 9D indicates an estimated light source calculated by a method that does not consider likelihood, and a point 64 indicates an estimated light source calculated based on the likelihood. FIG. 9C is a diagram showing the coincidence surface.

図10〜図12は、上記した尤度の算出方法の例2の方法によって各画素の尤度p(x)を算出し、上記した入力画像データの分類方法の例2によって分類を行った場合の例を示している。 10 to 12, the likelihood p (x i ) of each pixel is calculated by the above-described method 2 of likelihood calculation method, and classification is performed by the above-described input image data classification method example 2. An example of the case is shown.

図10(a)、図11(a)、図12(a)は、オリジナル画像である。   FIG. 10A, FIG. 11A, and FIG. 12A are original images.

図10(b)、図11(b)、図12(b)は、上記した各オリジナル画像を各画素の上記尤度p(x)に応じた階調で表現したグレースケール画像である。なお、このグレースケール画像は、信頼値画像(confidence images)とも呼ばれる。信頼値画像における白領域(あるいは白に近い領域)は撮像シーンモデルに適合している可能性の高い領域を示しており、黒領域(あるいは黒に近い領域)は適合しない可能性の高い領域を示している。 FIG. 10B, FIG. 11B, and FIG. 12B are gray scale images in which each of the above-described original images is expressed with a gradation corresponding to the likelihood p (x i ) of each pixel. This gray scale image is also called a confidence image. The white area (or the area close to white) in the confidence value image indicates an area that is highly likely to conform to the captured scene model, and the black area (or area close to black) indicates an area that is not likely to conform. Show.

図10(c)、図11(c)、図12(c)は、画素の尤度p(x)のヒストグラムを示している。図10(d)、図11(d)、図12(d)は、画素の尤度p(x)の分布の累積(累積ヒストグラム)を示している。 FIGS. 10C, 11C, and 12C show histograms of the pixel likelihood p (x i ). FIG. 10D, FIG. 11D, and FIG. 12D show the cumulative distribution (cumulative histogram) of the pixel likelihood p (x i ) distribution.

また、図10は補正を行うべきであると適切に判断される例を示しており、図11は補正を行うべきでないと適切に判断される例を示している。また、図12は実際には補正を行うべきではないにも関わらず、補正を行うべきであると不適切に分類される例を示している。   FIG. 10 shows an example in which it is appropriately determined that the correction should be performed, and FIG. 11 shows an example in which it is appropriately determined that the correction should not be performed. FIG. 12 shows an example in which correction should be performed inappropriately although the correction should not be actually performed.

図13は、図6に示した各画像について信頼値画像の累積ヒストグラムに基づいて分類を行った結果を示すグラフである。補正を行うべきと判定された画像は点(例えば符号102参照)、補正を行うべきでないと判定された画像は正方形(例えば符号104参照)で示されている。×印(例えば符号106参照)は補正すべきでない画像であるにもかかわらず補正を行うべきであると誤判定された画像を示しており、三角印(例えば符号108参照)は補正を行うべきであるにもかかわらず補正を行うべきでないと誤判定された画像を示している。この分類方法による分類結果における補正すべき画像のパーセンテージ(ROC)は、87.5%(35/40)であった。   FIG. 13 is a graph showing the result of classification for each image shown in FIG. 6 based on the cumulative histogram of the confidence value image. An image determined to be corrected is indicated by a point (for example, reference numeral 102), and an image determined not to be corrected is indicated by a square (for example, reference numeral 104). A cross mark (for example, reference numeral 106) indicates an image that is erroneously determined to be corrected although it is an image that should not be corrected, and a triangle mark (for example, reference numeral 108) should be corrected. In spite of the above, an image erroneously determined not to be corrected is shown. The percentage of images to be corrected (ROC) in the classification result by this classification method was 87.5% (35/40).

(1−6.撮像シーンの確率モデルの他の実施例)
画素の尤度p(x)および画像全体の尤度p(X)を算出するための確率モデルは、上記した例に限るものではなく、多様な確率モデルを用いることができる。どの確率モデルを用いるかは、上記したほとんどの実施例において画素の尤度p(x)および画像全体の尤度p(X)の利用にはほとんど影響しない。
(1-6. Another Example of Probabilistic Model of Imaging Scene)
The probability model for calculating the likelihood p (x i ) of the pixel and the likelihood p (X) of the entire image is not limited to the above example, and various probability models can be used. Which probability model is used has little effect on the use of the pixel likelihood p (x i ) and the overall image likelihood p (X) in most of the embodiments described above.

例えば、より好ましい分類および補正を行えるように、光源の事前確率が一定であるという仮定を撤回して実際の光源の事前確率を用いてもよい。光源の事前確率の一例として、例えば、黒体放射体(blackbody radiators)の軌跡や太陽光の軌跡からの距離に基づく確率が用いることができる。これらの軌跡は、青みがかった色から黄色がかった色まで変動し、野外の撮像シーンにおける光源に近似できる。撮像シーンの分類(例えば、室内であるか野外であるかなど)を行うために、光源の事前確率を一定とせず、実際の光源の事前確率に応じた事前確率関数を用いることにより、評価の正確性をより高めることもできる。   For example, the actual light source prior probability may be used withdrawing the assumption that the light source prior probability is constant so that more favorable classification and correction can be performed. As an example of the prior probability of the light source, for example, a probability based on the distance from the locus of blackbody radiators or the locus of sunlight can be used. These trajectories vary from a bluish color to a yellowish color and can approximate a light source in an outdoor imaging scene. In order to classify the imaging scene (for example, indoor or outdoor), the prior probability of the light source is not constant, and the evaluation is performed by using the prior probability function according to the prior probability of the actual light source. The accuracy can be further increased.

また、与えられた画像の集合体に基づいて生成される他の確率モデルを用いてもよい。単純な反射率セットは撮像シーンにおける実際の色の確率分布を反映しない(例えば、多数の植物を含む野外の写真は緑がかっていることが多い)が、実際の色の確率分布を反映させることができるように入力画像データに基づいて確率モデルを設定するようにしてもよい。これにより、単純な反射率セットを用いる方法よりも、より好ましい画像の分類を行うことができる。   Further, another probability model generated based on a given collection of images may be used. A simple reflectance set does not reflect the actual color probability distribution in the imaging scene (for example, outdoor photos with many plants are often greenish), but reflects the actual color probability distribution The probability model may be set based on the input image data so that Thereby, it is possible to classify images more preferable than a method using a simple reflectance set.

(1−7.確率モデルに関する有効性試験)
確率モデルが不適切な場合、光源の評価は不正確になる場合がある。そして、光源の評価が不正確な場合、不適切な色補正を行ってしまう場合が多くなる。そこで、確率モデルの有効性試験を行って、入力画像データが確率モデルから逸脱している程度を検出し、逸脱している程度に応じて補正量を減少させるようにしてもよい。補正量の増減方法としては、例えば特許文献2に記載されている方法を用いることができる。
(1-7. Efficacy test for probability model)
If the probabilistic model is inadequate, the evaluation of the light source may be inaccurate. If the evaluation of the light source is inaccurate, inappropriate color correction is often performed. Therefore, the effectiveness test of the probability model may be performed to detect the degree to which the input image data deviates from the probability model, and the correction amount may be reduced according to the degree of deviation. As a method of increasing / decreasing the correction amount, for example, the method described in Patent Document 2 can be used.

図14(a)および図14(b)はヒマワリ畑のデジタル写真画像であり、図14(a)はオリジナル画像、図14(b)は公知の方法で色補正を行った画像である。なお、図14(b)は、MAP評価アルゴリズムが適切に行われなかった場合の例を示している。この図に示し例では、画像の光源が黄色であると推定され、この推定結果に基づいて色補正が行われている。補正後の画像は、青緑がかった色の方向へ顕著にシフトしており、実際の画像を忠実に再現できていない。   14A and 14B are digital photographic images of sunflower fields, FIG. 14A is an original image, and FIG. 14B is an image that has been color-corrected by a known method. FIG. 14B shows an example when the MAP evaluation algorithm is not properly performed. In the example shown in this figure, it is estimated that the light source of the image is yellow, and color correction is performed based on the estimation result. The corrected image is significantly shifted in the direction of the bluish green color, and the actual image cannot be faithfully reproduced.

図15(a)および図15(b)は、明るい表面の色が光源に起因する色であると誤認された場合の他の例を示しており、図15(a)はオリジナル画像、図15(b)は公知の方法で色補正を行った画像を示している。この例では、光源が赤系の色であると推定され、その結果、不適切な色補正が行われている。図15(c)は事後確率分布あるいは「一致表面」を示している。図15(c)におけるa平面からの高さは、画像データの実際の光源である確率(尤度)を示している。図15(d)は、光源として評価された点のa平面における座標を示している。 FIG. 15A and FIG. 15B show another example in which the color of the bright surface is mistakenly recognized as the color caused by the light source, and FIG. 15A shows the original image and FIG. (B) shows an image subjected to color correction by a known method. In this example, it is estimated that the light source has a red color, and as a result, inappropriate color correction is performed. FIG. 15C shows a posterior probability distribution or “coincidence surface”. The height from the a * b * plane in FIG. 15C indicates the probability (likelihood) that the image data is an actual light source. FIG. 15D shows the coordinates in the a * b * plane of the points evaluated as light sources.

(1−7.光源の推定方法の他の実施例)
また、本実施形態では、各光源モデルについて入力画像データの実際の光源である確率(尤度)p(X)を算出し、尤度p(X)が最大である光源モデルを推定光源としているが、これに限るものではなく、他の方法によって光源を推定するようにしてもよい。
(1-7. Another Example of Light Source Estimation Method)
In this embodiment, the probability (likelihood) p (X) that is the actual light source of the input image data is calculated for each light source model, and the light source model having the maximum likelihood p (X) is used as the estimated light source. However, the present invention is not limited to this, and the light source may be estimated by other methods.

例えば、図16に示すように図3の構成に加えて評価値算出部247を設け、評価値算出部247が、色分布算出部241がS1で算出した入力画像データの色分布と、記憶部242から読み出した各光源モデルで参照データを照射した時の色分布との相関に基づいて各光源モデルについての評価値を算出し、光源推定部244が評価値算出部247の算出した評価値に基づいて光源を推定するようにしてもよい。この場合、尤度算出部243が光源推定部244の推定した光源についての尤度を算出し、補正量制御部245が尤度算出部243の算出した尤度に基づいて補正の程度を設定するようにすればよい。   For example, as shown in FIG. 16, an evaluation value calculation unit 247 is provided in addition to the configuration of FIG. 3, and the evaluation value calculation unit 247 calculates the color distribution of the input image data calculated by the color distribution calculation unit 241 in S1, and a storage unit. The evaluation value for each light source model is calculated based on the correlation with the color distribution when the reference data is emitted from each light source model read from 242, and the light source estimation unit 244 calculates the evaluation value calculated by the evaluation value calculation unit 247. Based on this, the light source may be estimated. In this case, the likelihood calculation unit 243 calculates the likelihood of the light source estimated by the light source estimation unit 244, and the correction amount control unit 245 sets the degree of correction based on the likelihood calculated by the likelihood calculation unit 243. What should I do?

上記評価値の算出方法は、本発明において特に限定されるものでは無く、従来の光源推定において用いられている手法(例えば、特許文献1におけるスコア値の算出方法)などを適用可能である。また、上記評価値は、差分、内積、ノルムなどベクトル間の差異を表す値であれば相関以外の数値であってもよい。   The calculation method of the evaluation value is not particularly limited in the present invention, and a method used in conventional light source estimation (for example, a score value calculation method in Patent Document 1) can be applied. The evaluation value may be a numerical value other than the correlation as long as it is a value representing a difference between vectors such as a difference, an inner product, and a norm.

また、評価値に基づく光源の推定方法は特に限定されるものではないが、例えば以下に示す方法を用いることができる。すなわち、複数の光源モデルがマトリクス状に配置されたxy平面において、近接する4つの光源モデルを頂点とする格子を1つのブロック(2×2光源モデルのブロック)とし、各ブロックにおける評価値合計として、ブロック内の4つの光源モデルに対する評価値の合計を算出する。そして、各ブロックにおける評価値合計の算出結果に基づいて、評価値合計が最大となるブロックを抽出する。なお、評価値合計が最大となるブロックを抽出することは、予め準備された複数の光源モデルの中から、推定光源の近傍にあると予定される所定数の光源モデルを抽出することを意味する。   The light source estimation method based on the evaluation value is not particularly limited, but for example, the following method can be used. That is, in the xy plane in which a plurality of light source models are arranged in a matrix, a grid having four adjacent light source models as vertices is defined as one block (2 × 2 light source model blocks), and the total evaluation value in each block The sum of the evaluation values for the four light source models in the block is calculated. Then, based on the calculation result of the total evaluation value in each block, a block having the maximum total evaluation value is extracted. Note that extracting the block with the maximum evaluation value means extracting a predetermined number of light source models that are expected to be in the vicinity of the estimated light source from among a plurality of light source models prepared in advance. .

その後、抽出されたブロックを構成する光源モデルの評価値を用いて、演算によって推定光源を求める。演算方法としては、例えば、下記の方法を用いることができる。すなわち、2×2光源モデルを1ブロックとした場合に、それぞれの光源モデルに対しての評価値および色度図上の座標から、推定光源の座標を以下の(19)式および(20)式により計算する。   Thereafter, the estimated light source is obtained by calculation using the evaluation value of the light source model constituting the extracted block. As a calculation method, for example, the following method can be used. That is, when the 2 × 2 light source model is one block, the coordinates of the estimated light source are expressed by the following equations (19) and (20) from the evaluation value for each light source model and the coordinates on the chromaticity diagram. Calculate with

なお、各ブロックの形状およびサイズは上記した例に限るものではない。例えば、多角形形状(例えば三角形)であってもよい。また、上記例では、ブロックのサイズが2×2光源モデルであるため、各ブロックは重なり合う領域を有さないが、ブロックのサイズも任意であり、各ブロックが重なり合う領域を有していてもよい。例えば、ブロックのサイズを3×3光源モデルとすれば、各ブロックは重なり合う領域を有するように設定することも可能である。   The shape and size of each block are not limited to the above example. For example, a polygonal shape (for example, a triangle) may be used. In the above example, since the block size is a 2 × 2 light source model, each block does not have an overlapping region, but the block size is also arbitrary, and each block may have an overlapping region. . For example, if the block size is a 3 × 3 light source model, each block can be set to have an overlapping region.

また、事後モード(posterior mode)、事後手段(posterior mean)、あるいはベイズ費用関数(Bayes cost function)を最小値にする技術を適用してもよい。また、最尤推定法により、事前確率の重みを考慮しない事後関数を用いてもよい。   Further, a technique for minimizing the posterior mode, the posterior mean, or the Bayes cost function may be applied. Further, a posterior function that does not consider the weight of the prior probability may be used by the maximum likelihood estimation method.

また、画素間の空間依存性(実像と共通)がより複雑な画像の確率モデル(例えばマルコフ確率場(Markov random fields)を用いるモデル)を用いてもよい。また、各画素を、画素の色度値を含むカラーベクトルによって表現してもよい。   In addition, an image probability model (for example, a model using Markov random fields) having a more complicated spatial dependency between pixels (common with a real image) may be used. Each pixel may be represented by a color vector including the chromaticity value of the pixel.

(1−8.プリンタドライバの実施形態)
本発明の画像処理方法(光源推定方法および色補正方法)は、ソフトウェア(アプリケーションプログラム)として実現することが可能である。この場合、上述した画像処理方法を含んだ画像処理をアプリケーション・ソフトウェアとして実現し、該アプリケーション・ソフトウェアを組み込んだプリンタドライバとしてコンピュータやプリンタに設けることができる。このようなプリンタドライバは、デジタルカメラ、フラットベッドスキャナなどの画像入力装置からコンピュータを介さずに直接入力された画像データをプリンタから出力するために、プリンタのファームウェアにより輝度階調の補正を実施する。
(1-8. Embodiment of Printer Driver)
The image processing method (light source estimation method and color correction method) of the present invention can be realized as software (application program). In this case, image processing including the above-described image processing method can be realized as application software, and can be provided in a computer or printer as a printer driver incorporating the application software. Such a printer driver performs luminance gradation correction by printer firmware in order to output image data directly input from an image input device such as a digital camera or a flatbed scanner without going through a computer. .

上記プリンタドライバを備えたプリンタの構成例を図17に示す。図17に示すプリンタ2は、カラー画像処理装置50、カラー画像出力装置60、および操作パネル70を備えて構成されている。また、カラー画像処理装置50は、復号処理部51、色変換部52、入力補正部53、色補正部54、黒生成下色除去部55、空間フィルタ処理部56、出力階調補正部57、および階調再現処理部58を備えて構成されている。   A configuration example of a printer including the printer driver is shown in FIG. The printer 2 shown in FIG. 17 includes a color image processing device 50, a color image output device 60, and an operation panel 70. Further, the color image processing apparatus 50 includes a decoding processing unit 51, a color conversion unit 52, an input correction unit 53, a color correction unit 54, a black generation and under color removal unit 55, a spatial filter processing unit 56, an output tone correction unit 57, And a gradation reproduction processing unit 58.

復号処理部51は、デジタルカメラなどから入力されたYCbCrの圧縮画像データ(符号化データ)を復号し、さらに逆量子化、逆直交変換を行って画像データに変換する。色変換部52は、輝度信号と色差信号とからなる上記画像データを、RGB信号あるいはRGB信号を補色反転したCMY(C:Cyan、M:Magenta、Y:Yellow)信号に再変換する。   The decoding processing unit 51 decodes YCbCr compressed image data (encoded data) input from a digital camera or the like, and further performs inverse quantization and inverse orthogonal transformation to convert the image data into image data. The color conversion unit 52 reconverts the image data including the luminance signal and the color difference signal into an RGB signal or a CMY (C: Cyan, M: Magenta, Y: Yellow) signal obtained by performing complementary color inversion of the RGB signal.

入力補正部53は、入力画像データの光源の推定および光源推定結果に基づく色補正処理を行う。すなわち、入力補正部53は、図2における入力補正部24と同様の処理を行うものである。   The input correction unit 53 performs light source estimation of the input image data and color correction processing based on the light source estimation result. That is, the input correction unit 53 performs the same processing as the input correction unit 24 in FIG.

色補正部54は、RGB信号あるいは補色反転したCMY信号に対して色補正処理を実施する。ここで、色補正処理とは、色再現の忠実化を目的として不要吸収成分を含むCMY色材の分光特性に基づいた色濁りを取り除く処理である。   The color correction unit 54 performs color correction processing on the RGB signals or the CMY signals obtained by inverting the complementary colors. Here, the color correction processing is processing for removing color turbidity based on spectral characteristics of CMY color materials including unnecessary absorption components for the purpose of faithful color reproduction.

黒生成下色除去部55は、黒生成部と下色除去部より構成され、黒生成部では、色補正されたCMY信号に基づいて、黒(K)生成処理が行われる。そして、下色除去部では、黒信号から計算される下色の量をCMY信号から減算し、CMYK4色のデータに変換される。   The black generation and lower color removal unit 55 includes a black generation unit and a lower color removal unit, and the black generation unit performs black (K) generation processing based on the color-corrected CMY signal. Then, the under color removal unit subtracts the amount of the under color calculated from the black signal from the CMY signal, and converts it into CMYK 4-color data.

次に、空間フィルタ処理部56において得られた画像データに対して、デジタルフィルタによる空間フィルタ処理がなされ、空間周波数特性を補正することによって出力画像のぼやけや粒状性劣化を防ぐように処理される。そして、出力階調補正部57で、濃度信号などの信号を画像出力装置の特性値である網点面積率に変換する出力階調補正処理が行われ、最終的に階調再現処理部58で、画像を画素に分離してそれぞれの階調を再現できるように処理する階調再現処理がなされる。   Next, the image data obtained in the spatial filter processing unit 56 is subjected to spatial filter processing using a digital filter, and is processed so as to prevent blurring of the output image and deterioration of graininess by correcting the spatial frequency characteristics. . An output tone correction unit 57 performs output tone correction processing for converting a signal such as a density signal into a halftone dot area ratio that is a characteristic value of the image output device. Then, gradation reproduction processing is performed in which the image is separated into pixels and processed so that each gradation can be reproduced.

上述した各処理が施された画像データは、一旦記憶装置に記録され、所定のタイミングで読み出されてカラー画像出力装置60に入力される。この画像出力装置は、画像データを紙などの記録媒体上に出力するもので、例えば、インクジェット方式や熱転写方式を用いたカラー画像出力装置等があげられるが特に限定されるものでは無い。   The image data subjected to the above-described processes is once recorded in a storage device, read out at a predetermined timing, and input to the color image output device 60. This image output device outputs image data onto a recording medium such as paper, and examples thereof include, but are not limited to, a color image output device using an inkjet method or a thermal transfer method.

また、操作パネル70には、特に図示していないが、モード選択ボタン・設定ボタン・テンキー等の入力手段が含まれるものとする。そして、ユーザの指示を受け付けると共に、ユーザに対し、設定されている出力モードなどを示す機能を有している。ユーザは、この操作パネル70を通してモードを選択することで処理をオン/オフしたり、任意にパラメータを設定したりすることができる。なお、以上の処理は不図示のCPU(Central Processing Unit)により制御される。上記光源の推定・補正処理は、操作パネル70より画像モード、例えば、色カブリ補正モードを選択した時のみ、実施するようにしても良い。   The operation panel 70 includes input means such as a mode selection button, a setting button, and a numeric keypad (not shown). It has a function of accepting user instructions and indicating the set output mode to the user. The user can turn on / off the process or arbitrarily set a parameter by selecting a mode through the operation panel 70. The above processing is controlled by a CPU (Central Processing Unit) (not shown). The light source estimation / correction processing may be performed only when an image mode, for example, a color fog correction mode is selected from the operation panel 70.

また、本発明の光源推定処理およびその結果に基づく補正処理は、アプリケーション・ソフトウェアによって実現しても良い。この場合、コンピュータに取り込んだ画像データ(スキャナなどの画像読取装置より読み込まれた画像データ、通信回線を介してダウンロードした画像データ等)に対して、上記光源推定処理および上記補正処理を行う。これらの処理が施された画像は、ディスプレイなどの画像表示装置に表示したり、プリンタなどの画像出力装置より出力したりされる。   Further, the light source estimation process and the correction process based on the result of the present invention may be realized by application software. In this case, the light source estimation process and the correction process are performed on image data (image data read from an image reading apparatus such as a scanner, image data downloaded via a communication line, etc.) captured in a computer. The image subjected to these processes is displayed on an image display device such as a display or output from an image output device such as a printer.

この場合のコンピュータシステムは、フラットベッドスキャナ・フィルムスキャナ・デジタルカメラなどの画像入力装置、所定のプログラムがロードされることにより上記画像処理方法など様々な処理が行われるコンピュータ、マウスやキーボードなどのユーザーインターフェース、コンピュータの処理結果を表示するCRTディスプレイ・液晶ディスプレイなどの画像表示装置およびコンピュータの処理結果を紙などに出力するプリンタなどの画像出力装置により構成される。さらには、データを保存するための外部記憶装置や、ネットワークを介してサーバなどに接続するための通信手段としてモデム、ネットワークカードなどが備えられる。   In this case, the computer system includes an image input device such as a flatbed scanner, a film scanner, and a digital camera, a computer that performs various processes such as the above image processing method by loading a predetermined program, and a user such as a mouse and a keyboard. The image processing apparatus includes an interface, an image display device such as a CRT display or a liquid crystal display that displays a processing result of the computer, and an image output device such as a printer that outputs the processing result of the computer to paper. Furthermore, a modem, a network card, etc. are provided as an external storage device for storing data, and a communication means for connecting to a server or the like via a network.

(1−9.プログラムの実施例)
また、カラー画像処理装置20を構成する各部(各ブロック)は、CPU等のプロセッサを用いてソフトウェアによって実現される。すなわち、カラー画像処理装置20は、各機能を実現する制御プログラムの命令を実行するCPU(central processing unit)、上記プログラムを格納したROM(read only memory)、上記プログラムを展開するRAM(random access memory)、上記プログラムおよび各種データを格納するメモリ等の記憶装置(記録媒体)などを備えている。そして、本発明の目的は、上述した機能を実現するソフトウェアであるカラー画像処理装置20の制御プログラムのプログラムコード(実行形式プログラム、中間コードプログラム、ソースプログラム)をコンピュータで読み取り可能に記録した記録媒体を、カラー画像処理装置20に供給し、そのコンピュータ(またはCPUやMPU)が記録媒体に記録されているプログラムコードを読み出し実行することによって達成される。
(1-9. Example of program)
Each unit (each block) constituting the color image processing apparatus 20 is realized by software using a processor such as a CPU. That is, the color image processing apparatus 20 includes a central processing unit (CPU) that executes instructions of a control program that implements each function, a read only memory (ROM) that stores the program, and a random access memory (RAM) that expands the program. ), A storage device (recording medium) such as a memory for storing the program and various data. An object of the present invention is a recording medium in which program codes (execution format program, intermediate code program, source program) of a control program of the color image processing apparatus 20 which is software for realizing the above-described functions are recorded so as to be readable by a computer. Is supplied to the color image processing apparatus 20, and the computer (or CPU or MPU) reads and executes the program code recorded on the recording medium.

上記記録媒体としては、例えば、磁気テープやカセットテープ等のテープ系、フロッピー(登録商標)ディスク/ハードディスク等の磁気ディスクやCD−ROM/MO/MD/DVD/CD−R等の光ディスクを含むディスク系、ICカード(メモリカードを含む)/光カード等のカード系、あるいはマスクROM/EPROM/EEPROM/フラッシュROM等の半導体メモリ系などを用いることができる。   Examples of the recording medium include tapes such as magnetic tapes and cassette tapes, magnetic disks such as floppy (registered trademark) disks / hard disks, and disks including optical disks such as CD-ROM / MO / MD / DVD / CD-R. Card system such as IC card, IC card (including memory card) / optical card, or semiconductor memory system such as mask ROM / EPROM / EEPROM / flash ROM.

また、カラー画像処理装置20を通信ネットワークと接続可能に構成し、通信ネットワークを介して上記プログラムコードを供給してもよい。この通信ネットワークとしては、特に限定されず、例えば、インターネット、イントラネット、エキストラネット、LAN、ISDN、VAN、CATV通信網、仮想専用網(virtual private network)、電話回線網、移動体通信網、衛星通信網等が利用可能である。また、通信ネットワークを構成する伝送媒体としては、特に限定されず、例えば、IEEE1394、USB、電力線搬送、ケーブルTV回線、電話線、ADSL回線等の有線でも、IrDAやリモコンのような赤外線、Bluetooth(登録商標)、802.11無線、HDR、携帯電話網、衛星回線、地上波デジタル網等の無線でも利用可能である。なお、本発明は、上記プログラムコードが電子的な伝送で具現化された、搬送波に埋め込まれたコンピュータデータ信号の形態でも実現され得る。   The color image processing apparatus 20 may be configured to be connectable to a communication network, and the program code may be supplied via the communication network. The communication network is not particularly limited. For example, the Internet, intranet, extranet, LAN, ISDN, VAN, CATV communication network, virtual private network, telephone line network, mobile communication network, satellite communication. A net or the like is available. Also, the transmission medium constituting the communication network is not particularly limited. For example, even in the case of wired such as IEEE 1394, USB, power line carrier, cable TV line, telephone line, ADSL line, etc., infrared rays such as IrDA and remote control, Bluetooth ( (Registered trademark), 802.11 wireless, HDR, mobile phone network, satellite line, terrestrial digital network, and the like can also be used. The present invention can also be realized in the form of a computer data signal embedded in a carrier wave in which the program code is embodied by electronic transmission.

また、カラー画像処理装置20の各ブロックは、ソフトウェアを用いて実現されるものに限らず、ハードウェアロジックによって構成されるものであってもよく、処理の一部を行うハードウェアと当該ハードウェアの制御や残余の処理を行うソフトウェアを実行する演算手段とを組み合わせたものであってもよい。   Further, each block of the color image processing apparatus 20 is not limited to being realized using software, and may be configured by hardware logic. Hardware that performs part of the processing and the hardware It may be a combination of arithmetic means for executing software for performing the above control and residual processing.

また、本実施形態にかかる色補正方法のアルゴリズムは、撮像シーンに含まれる物の物理的な色に起因する色ずれと、色補正エラーに起因する色ずれと、撮像シーンにおける光源の色に起因する色ずれとを識別する方法に関するものであると表現することもできる。また、本実施形態にかかる方法およびシステムは、画像データに示されている補正すべき色の撮像シーンに応じた色への補正を改善するためのものであると表現することもできる。本実施形態にかかる方法およびシステムは、画像に対して色補正を行うべきか否かを決定する段階を含んでいると表現することもできる。また、本実施形態にかかる方法及びシステムは、撮像シーンに含まれる色要素に応じて色補正量を増大させたり低減したりする構成であってもよい。   In addition, the algorithm of the color correction method according to the present embodiment is caused by a color shift caused by a physical color of an object included in an imaging scene, a color shift caused by a color correction error, and a color of a light source in the imaging scene. It can also be expressed that it relates to a method for identifying color misregistration. The method and system according to the present embodiment can also be expressed as improving the correction of the color to be corrected, which is indicated in the image data, to the color corresponding to the imaging scene. The method and system according to the present embodiment can also be expressed as including the step of determining whether or not to perform color correction on the image. In addition, the method and system according to the present embodiment may be configured to increase or decrease the color correction amount according to the color elements included in the imaging scene.

また、本実施形態では、確率的色補正アルゴリズム(probabilistic colorbalance correction algorithm)を用いるようにしてもよい。この場合、撮像シーンのカラーモデルの一例が設定され、このモデル内においてある画像がどの程度代表的(representative)であるかを評価する。このプロセスは、入力画像がモデルから統計的に逸脱することを検知することに似ている。また、本実施形態では、実際にはありそうもない撮像シーンの色あるいは光源の色(数学的な条件が大きく異なっている)であって、補正すべきでない画像を自動的に検知するようにしてもよい。   In the present embodiment, a probabilistic color balance correction algorithm may be used. In this case, an example of a color model of an imaging scene is set, and how representative a certain image is in this model is evaluated. This process is similar to detecting that the input image deviates statistically from the model. In this embodiment, an image that is unlikely to be actually captured or a light source color (the mathematical condition is greatly different) and that should not be corrected is automatically detected. May be.

本発明は上述した各実施形態に限定されるものではなく、請求項に示した範囲で種々の変更が可能であり、上述した実施形態において開示された各技術的手段を適宜組み合わせて得られる実施形態についても本発明の技術的範囲に含まれる。   The present invention is not limited to the above-described embodiments, and various modifications are possible within the scope shown in the claims, and the embodiments can be obtained by appropriately combining the respective technical means disclosed in the above-described embodiments. The form is also included in the technical scope of the present invention.

入力された画像データから撮影時の光源色を推定して、その推定光源に基づいて画像補正を行うことができ、カラー複写機やカラープリンタ等の用途に適用できる。 The light source color at the time of photographing can be estimated from the input image data, and image correction can be performed based on the estimated light source, which can be applied to uses such as a color copying machine and a color printer.

本発明の一実施形態にかかる画像処理装置における処理の流れを示すフロー図である。It is a flowchart which shows the flow of a process in the image processing apparatus concerning one Embodiment of this invention. 本発明の一実施形態にかかる画像処理装置を備えたカラー複写機の概略構成を示すブロック図である。1 is a block diagram illustrating a schematic configuration of a color copying machine including an image processing apparatus according to an embodiment of the present invention. 本発明の一実施形態にかかる画像処理装置に備えられる入力補正部の概略構成を示すブロック図である。It is a block diagram which shows schematic structure of the input correction | amendment part with which the image processing apparatus concerning one Embodiment of this invention is equipped. 本発明の一実施形態にかかる画像処理装置における、信頼値aおよび累積閾値tproportionの2つのパラメータに対する補正パーセンテージの関係を示すグラフである。In the image processing apparatus according to an embodiment of the present invention, it is a graph showing the relationship between the correction percentage of the two parameters confidence values a 0 and the accumulated threshold t Proportion. 図4に示したグラフにおいて累積閾値tproportion=0.2としたときの信頼値aと補正パーセンテージとの関係を示すグラフである。FIG. 5 is a graph showing the relationship between the confidence value a 0 and the correction percentage when the cumulative threshold value t production = 0.2 in the graph shown in FIG. テスト画像群のサムネイル画像を示す図である。It is a figure which shows the thumbnail image of a test image group. 図6に示したテスト画像の最適な分類結果を示すグラフである。It is a graph which shows the optimal classification | category result of the test image shown in FIG. 本発明の一実施形態にかかる画像処置装置による、画像の分類結果の一例を示す図である。It is a figure which shows an example of the classification result of the image by the image processing apparatus concerning one Embodiment of this invention. (a)はオリジナル画像(赤い花の画像)、(b)は(a)のオリジナル画像に対して本発明の一実施形態にかかる方法を適用した結果の一例を示す図である。(c)は(a)のオリジナル画像に対する事後確率分布を示しており、(d)は推定された光源のa平面における座標を示している。(A) is an original image (red flower image), (b) is a figure which shows an example of the result of applying the method concerning one Embodiment of this invention with respect to the original image of (a). (C) shows the posterior probability distribution for the original image of (a), and (d) shows the coordinates of the estimated light source in the a * b * plane. 本発明の一実施形態にかかる画像処置方法の適用結果の一例を示す図であり、(a)はオリジナル画像(赤いテント内の画像)、(b)はオリジナル画像を各画素に対する推定光源の尤度p(x)に応じた階調で表現したグレースケール画像、(c)は上記尤度p(x)のヒストグラム、(d)は上記尤度p(x)の分布の累積ヒストグラムを示している。It is a figure which shows an example of the application result of the image treatment method concerning one Embodiment of this invention, (a) is an original image (image in a red tent), (b) is the likelihood of the estimation light source with respect to each pixel to an original image. Gray scale image expressed by gradations corresponding to the degree p (x i ), (c) is a histogram of the likelihood p (x i ), and (d) is a cumulative histogram of the distribution of the likelihood p (x i ). Is shown. 本発明の一実施形態にかかる画像処置方法の適用結果の一例を示す図であり、(a)はオリジナル画像(赤みがかった花)、(b)はオリジナル画像を各画素に対する推定光源の尤度p(x)に応じた階調で表現したグレースケール画像、(c)は上記尤度p(x)のヒストグラム、(d)は上記尤度p(x)の分布の累積ヒストグラムを示している。It is a figure which shows an example of the application result of the image processing method concerning one Embodiment of this invention, (a) is an original image (reddish flower), (b) is likelihood p of the estimation light source with respect to each pixel to an original image. (x i) into a gray scale image representing the gradation corresponding, shows the cumulative histogram of the distribution of (c) a histogram, the likelihood p (x i) (d) in the above likelihood p (x i) ing. 本発明の一実施形態にかかる画像処置方法の適用結果の一例を示す図であり、(a)はオリジナル画像(さまざまな色の花の画像)、(b)はオリジナル画像を各画素に対する推定光源の尤度p(x)に応じた階調で表現したグレースケール画像、(c)は上記尤度p(x)のヒストグラム、(d)は上記尤度p(x)の分布の累積ヒストグラムを示している。It is a figure which shows an example of the application result of the image treatment method concerning one Embodiment of this invention, (a) is an original image (image of various colors flower), (b) is an estimated light source with respect to each pixel for an original image the likelihood p (x i) into a gray scale image representing the gradation corresponding, distribution of (c) a histogram, the likelihood p (x i) (d) in the above likelihood p (x i) A cumulative histogram is shown. 本発明の一実施形態にかかる画像処置方法の適用結果の一例を示す図であり、図6に示した各画像について信頼画像の累積ヒストグラムに基づいて分類を行った結果を示すグラフである。It is a figure which shows an example of the application result of the image treatment method concerning one Embodiment of this invention, and is a graph which shows the result of having classified each image shown in FIG. 6 based on the accumulation histogram of a reliable image. (a)はオリジナル画像(ヒマワリ畑のデジタル写真画像)、(b)は(a)のオリジナル画像に対して従来の光源推定方法および色補正方法を適用した結果の一例を示す図である。(A) is an original image (digital photograph image of a sunflower field), (b) is a figure which shows an example of the result of having applied the conventional light source estimation method and the color correction method with respect to the original image of (a). (a)はオリジナル画像(赤い花の画像)、(b)は(a)のオリジナル画像に対して従来の光源推定方法および色補正方法を適用した結果の一例を示す図である。(c)は(a)のオリジナル画像に対する事後確率分布を示しており、(d)は推定された光源のa平面における座標を示している。(A) is an original image (red flower image), (b) is a figure which shows an example of the result of having applied the conventional light source estimation method and the color correction method with respect to the original image of (a). (C) shows the posterior probability distribution for the original image of (a), and (d) shows the coordinates of the estimated light source in the a * b * plane. 本発明の一実施形態にかかる画像処理装置に備えられる入力補正部の変形例を示すブロック図である。It is a block diagram which shows the modification of the input correction part with which the image processing apparatus concerning one Embodiment of this invention is equipped. 本発明の一実施形態にかかる画像処理装置を備えたプリンタドライバの概略構成を示すブロック図である。1 is a block diagram illustrating a schematic configuration of a printer driver including an image processing apparatus according to an embodiment of the present invention.

符号の説明Explanation of symbols

1 デジタルカラー複写機
2 プリンタ
10 カラー画像入力装置
20 カラー画像処理装置
24 入力補正部
40 カラー画像出力装置
50 カラー画像処理装置
53 入力補正部
241 色分布算出部
242 記憶部
243 尤度算出部
244 光源推定部
245 補正量制御部
246 補正部
247 評価値算出部
DESCRIPTION OF SYMBOLS 1 Digital color copying machine 2 Printer 10 Color image input device 20 Color image processing device 24 Input correction part 40 Color image output device 50 Color image processing apparatus 53 Input correction part 241 Color distribution calculation part 242 Storage part 243 Likelihood calculation part 244 Light source Estimation unit 245 Correction amount control unit 246 Correction unit 247 Evaluation value calculation unit

Claims (7)

撮影によって取得された画像データの色度ヒストグラムである第1色分布データを算出する色分布算出部と、A color distribution calculation unit that calculates first color distribution data that is a chromaticity histogram of image data acquired by photographing;
予め定められた参照データの画像を複数の光源モデルでそれぞれ個別に照射した時の当該画像の色度ヒストグラムである第2色分布データが上記光源モデル毎に格納されている記憶部と、A storage unit in which second color distribution data, which is a chromaticity histogram of the image when a predetermined reference data image is individually irradiated with a plurality of light source models, is stored for each light source model;
上記第1色分布データと上記第2色分布データとに基づいて、上記画像データの撮影時における実際の光源が上記光源モデルである尤度を上記光源モデル毎に算出する尤度算出部と、A likelihood calculating unit that calculates, for each light source model, a likelihood that an actual light source at the time of photographing the image data is the light source model based on the first color distribution data and the second color distribution data;
上記尤度算出部の算出した各光源モデルの尤度に基づいて、上記画像データの撮影時における実際の光源に対応する光源モデルを推定する光源推定部と、  A light source estimation unit that estimates a light source model corresponding to an actual light source at the time of photographing the image data based on the likelihood of each light source model calculated by the likelihood calculation unit;
上記画像データに対して光源の影響を低減するための色補正を行う色補正部と、A color correction unit that performs color correction to reduce the influence of the light source on the image data;
上記色補正部における上記画像データに対する色補正量を制御する補正量制御部とを備えており、A correction amount control unit for controlling a color correction amount for the image data in the color correction unit,
上記尤度算出部は、The likelihood calculation unit
上記第1色分布データと上記第2色分布データとの比較結果から画素毎に求められる当該各画素の撮影時における実際の光源が上記各光源モデルである確率を用いて上記尤度を算出し、The likelihood is calculated using the probability that the actual light source at the time of photographing of each pixel is obtained for each pixel from the comparison result between the first color distribution data and the second color distribution data. ,
上記補正量制御部は、上記光源推定部が推定した上記光源モデルに対する尤度が閾値未満の場合には閾値以上の場合よりも上記画像データに対する色補正量を少なくすることを特徴とする画像処理装置。The correction amount control unit reduces the color correction amount for the image data when the likelihood for the light source model estimated by the light source estimation unit is less than a threshold, compared to the case where the likelihood is greater than or equal to the threshold. apparatus.
上記尤度算出部は、
上記尤度をp(X)、上記光源モデルの数をM、上記画像データにおける画素数をN、上記第1色分布データと上記第2色分布データとの比較結果から求められる画素x (iは1以上N以下の整数)の光源が光源e (jは1以上M以下の整数)である確率をp(x |e )として、
または
または
に基づいて上記尤度を算出することを特徴とする請求項1に記載の画像処理装置。
The likelihood calculation unit
The likelihood is p (X), the number of the light source models is M, the number of pixels in the image data is N, and the pixel x i (which is obtained from the comparison result between the first color distribution data and the second color distribution data ). p (x i | e j ) is the probability that i is an integer of 1 or more and N or less) and the light source is e j (j is an integer of 1 to M ).
Or
Or
The image processing apparatus according to claim 1, wherein the likelihood is calculated based on the image.
上記補正量制御部は、上記推定光源に対する尤度が閾値以上の場合には上記色補正部に上記画像データに対する色補正を実行させ、閾値未満の場合には上記画像データに対する色補正を実行させないように上記色補正量を制御することを特徴とする請求項1または2に記載の画像処理装置。The correction amount control unit causes the color correction unit to perform color correction on the image data when the likelihood with respect to the estimated light source is equal to or greater than a threshold, and does not perform color correction on the image data when the likelihood is less than the threshold. The image processing apparatus according to claim 1, wherein the color correction amount is controlled as described above. 上記補正量制御部は、上記推定光源に対する尤度が小さいほど上記画像データに対する色補正量が少なくなるように上記色補正量を多段階に制御することを特徴とする請求項1または2に記載の画像処理装置。The said correction amount control part controls the said color correction amount in multiple steps so that the color correction amount with respect to the said image data decreases, so that the likelihood with respect to the said estimation light source is small. Image processing apparatus. 撮影によって取得された画像データの色度ヒストグラムである第1色分布データを算出する色分布算出工程と、A color distribution calculating step of calculating first color distribution data which is a chromaticity histogram of image data acquired by photographing;
予め定められた参照データの画像を複数の光源モデルでそれぞれ個別に照射した時の当該画像の色度ヒストグラムである第2色分布データを上記光源モデル毎に予め格納しておく記憶工程と、A storage step of previously storing, for each light source model, second color distribution data, which is a chromaticity histogram of the image when the image of predetermined reference data is individually irradiated with a plurality of light source models, respectively;
上記第1色分布データと上記第2色分布データとに基づいて、上記画像データの撮影時における実際の光源が上記光源モデルである尤度を上記光源モデル毎に算出する尤度算出工程と、A likelihood calculating step for calculating, for each light source model, a likelihood that an actual light source at the time of photographing the image data is the light source model based on the first color distribution data and the second color distribution data;
上記尤度算出工程で算出した各光源モデルの尤度に基づいて、上記画像データの撮影時における実際の光源に対応する光源モデルを推定光源として抽出する光源推定工程、  Based on the likelihood of each light source model calculated in the likelihood calculation step, a light source estimation step for extracting a light source model corresponding to an actual light source at the time of photographing the image data as an estimated light source,
上記画像データに対して光源の影響を低減するための色補正を行う色補正工程と、A color correction step for performing color correction to reduce the influence of the light source on the image data;
上記色補正工程における上記画像データに対する色補正量を制御する補正量制御工程とを含み、A correction amount control step for controlling a color correction amount for the image data in the color correction step,
上記尤度算出工程では、上記第1色分布データと上記第2色分布データとの比較結果から画素毎に求められる当該各画素の撮影時における実際の光源が上記各光源モデルである確率を用いて上記尤度を算出し、In the likelihood calculation step, the probability that the actual light source at the time of photographing each pixel is obtained for each pixel from the comparison result between the first color distribution data and the second color distribution data is the light source model. To calculate the likelihood,
上記補正量制御工程では、上記光源推定工程で推定した上記光源モデルに対する尤度が閾値未満の場合には閾値以上の場合よりも上記画像データに対する色補正量を少なくすることを特徴とする色補正方法。In the correction amount control step, when the likelihood for the light source model estimated in the light source estimation step is less than a threshold value, the color correction amount for the image data is reduced as compared with the case where the likelihood is equal to or greater than the threshold value. Method.
請求項1から4のいずれか1項に記載の画像処理装置を動作させるためのプログラムであって、コンピュータを上記各部として機能させるためのプログラム。A program for operating the image processing apparatus according to any one of claims 1 to 4, wherein the program causes a computer to function as each unit. 請求項6に記載のプログラムを記録したコンピュータ読み取り可能な記録媒体。A computer-readable recording medium on which the program according to claim 6 is recorded.
JP2007207253A 2006-09-28 2007-08-08 Color correction method and image processing apparatus Expired - Fee Related JP4418829B2 (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
US11/529,088 US8055063B2 (en) 2003-09-30 2006-09-28 Methods and systems for improving robustness of color balance correction

Publications (2)

Publication Number Publication Date
JP2008085995A JP2008085995A (en) 2008-04-10
JP4418829B2 true JP4418829B2 (en) 2010-02-24

Family

ID=39356310

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007207253A Expired - Fee Related JP4418829B2 (en) 2006-09-28 2007-08-08 Color correction method and image processing apparatus

Country Status (1)

Country Link
JP (1) JP4418829B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6547626B2 (en) 2013-10-30 2019-07-24 日本電気株式会社 PROCESSING SYSTEM, PROCESSING METHOD AND PROGRAM FOR IMAGE FEATURE
JP6629139B2 (en) 2016-05-30 2020-01-15 株式会社東芝 Control device, control method, and program

Also Published As

Publication number Publication date
JP2008085995A (en) 2008-04-10

Similar Documents

Publication Publication Date Title
US10853925B2 (en) Methods, systems, and media for image processing
US7251056B2 (en) Image processing apparatus, image processing method and information recording medium
US8792735B2 (en) Image compressing apparatus which extracts black text edge pixels from an image and compresses a layer with black text edge pixels extracted
US7366350B2 (en) Image processing apparatus and method
US8165402B2 (en) Image processing method, image processing apparatus, image forming apparatus and storage medium
JP4197346B2 (en) Image processing apparatus, image processing method, image forming apparatus, image processing program, and recording medium
US20090290807A1 (en) Method for automatic enhancement of images containing snow
JP4529888B2 (en) Image processing apparatus, image processing method, and image processing program
JP2002245446A (en) Color image processor and its method
US8319853B2 (en) Image processing apparatus, image processing method, and computer program
JP2008099149A (en) Image processor, image processing method and image processing program
JP2002300402A (en) Image processor, processing method and recording medium
JP4079814B2 (en) Image processing method, image processing apparatus, image forming apparatus, imaging apparatus, and computer program
JP4418829B2 (en) Color correction method and image processing apparatus
JP4107812B2 (en) Image processing apparatus, image processing method, and recording medium
JP2007053439A (en) Isolated point discrimination apparatus, image processing apparatus, image reading apparatus, image forming apparatus, isolated point discrimination method, isolated point discrimination program, image processing program, and computer-readable recording medium
JP2006262404A (en) Device and method for estimating light source, image processor, and method for image processing
JP4219577B2 (en) Image processing apparatus, image output apparatus, image processing method, and storage medium
JP4112413B2 (en) Image processing apparatus, image forming apparatus, image processing method, image processing program, and computer-readable recording medium on which image processing program is recorded
JP2003209704A (en) Image processing method, image processor, image forming device, image processing program, and recording medium
JP2009070099A (en) Image-processing device, image-processing method, program and recording medium
JP4522978B2 (en) Image processing apparatus, image processing method, image forming apparatus, image processing program, and recording medium
JP4760044B2 (en) Determination of main subject in image
JP4040528B2 (en) Image processing apparatus, image processing method, image processing program, recording medium storing image processing program, and image forming apparatus including image processing apparatus
JP4086537B2 (en) Image processing method, image processing apparatus, image forming apparatus, computer program, and recording medium

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20090224

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090331

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090526

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20091104

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20091130

R150 Certificate of patent or registration of utility model

Ref document number: 4418829

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20121204

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20121204

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees