JP2008245117A - Image processor, processing method, and processing program - Google Patents
Image processor, processing method, and processing program Download PDFInfo
- Publication number
- JP2008245117A JP2008245117A JP2007085472A JP2007085472A JP2008245117A JP 2008245117 A JP2008245117 A JP 2008245117A JP 2007085472 A JP2007085472 A JP 2007085472A JP 2007085472 A JP2007085472 A JP 2007085472A JP 2008245117 A JP2008245117 A JP 2008245117A
- Authority
- JP
- Japan
- Prior art keywords
- color space
- image data
- color
- target value
- input image
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Landscapes
- Image Processing (AREA)
- Facsimile Image Signal Circuits (AREA)
- Color Image Communication Systems (AREA)
Abstract
Description
本発明は、画像処理装置、画像処理方法および画像処理プログラムに関する。 The present invention relates to an image processing apparatus, an image processing method, and an image processing program.
従来から画像処理の一種として、入力画像データの各画素の値に基づいて入力画像データの統計値を生成する処理が行なわれている。また、かかる統計値に基づいて入力画像データに対する補正量を求め、当該求めた補正量に応じて画像データの各画素の値を補正し、補正後の画像データを次の処理ステップに渡す処理が行なわれている。 Conventionally, as one type of image processing, processing for generating a statistical value of input image data based on the value of each pixel of the input image data has been performed. Further, a process of obtaining a correction amount for the input image data based on the statistical value, correcting a value of each pixel of the image data according to the obtained correction amount, and passing the corrected image data to the next processing step. It is done.
この具体例として、入力画像データの各画素のうち、特定の記憶色(例えば、肌色)に該当する画素を集計し、集計した画素のRGB毎の平均値(統計値)を求め、この各平均値と、予め求めておいた肌色の画素の理想的なRGB毎の平均値(目標値)との差分に応じてRGBそれぞれに対する修正量ΔR、ΔG、ΔB(補正量)を求め、この修正量ΔR、ΔG、ΔBに応じてRGB毎のトーンカーブを生成し、このトーンカーブを利用して画像データの全画素の要素色を変換して画像データを補正する色修正装置が知られている(特許文献1参照。)。
上記補正後の画像データは、補正後の処理を考慮して所定の色空間(出力色空間)で表現された画像データとして、上記次の処理ステップに出力される。従って、上記補正量の計算や補正処理も基本的に出力色空間上で実行される。そのため従来においては、補正量の計算のための上記目標値も、出力色空間上で表現された情報として所定の記憶媒体に保存されており、補正量の計算に際して適宜読み出して利用されていた。
しかし、このように目標値をある一つの出力色空間に依存した情報としてしまうと、出力色空間の設定を別の色空間に変更した場合に、それまでの目標値を補正量の計算に使用できないという問題があった。またその結果、出力色空間の設定が変り得る場合には、各出力色空間の種類に合わせて目標値も別々に予め用意しておく必要があり、メモリ容量の消費が激しかった。
The corrected image data is output to the next processing step as image data expressed in a predetermined color space (output color space) in consideration of the corrected processing. Therefore, the correction amount calculation and correction processing are basically executed in the output color space. For this reason, conventionally, the target value for calculating the correction amount is also stored in a predetermined storage medium as information expressed in the output color space, and is appropriately read and used when calculating the correction amount.
However, if the target value is information that depends on one output color space in this way, when the output color space setting is changed to another color space, the previous target value is used to calculate the correction amount. There was a problem that I could not. As a result, if the setting of the output color space can be changed, it is necessary to prepare the target value separately in advance according to the type of each output color space, and the consumption of the memory capacity is severe.
本発明は上記課題に鑑みてなされたものであり、採用され得る出力色空間の違いによらず的確に補正処理のための補正量を取得し、目的の補正を実行することが可能な画像処理装置、画像処理方法および画像処理プログラムを提供することを目的とする。 The present invention has been made in view of the above problems, and is capable of accurately acquiring a correction amount for correction processing and executing target correction regardless of a difference in output color space that can be employed. An object is to provide an apparatus, an image processing method, and an image processing program.
上記目的を達成するため、本発明にかかる画像処理装置では、統計値取得手段は、入力画像データの所定の統計値であって、所定の出力色空間によって表現された統計値を取得する。目標値変換手段は、機器非依存色空間において定義された、上記統計値に対する目標値を取得するとともに、当該目標値を上記出力色空間における情報に変換する。補正量決定手段は、上記統計値取得手段が取得した統計値と上記変換後の情報との比較に基づいて、上記入力画像データに対する補正量を決定する。
つまり本発明によれば、補正量決定のための基準となる目標値は機器非依存色空間において定義されており、補正量決定の際に、この目標値を出力色空間における情報に変換して補正量を計算する。よって、従来のように各出力色空間の種類に合わせて目標値を別々に予め用意しておく煩雑さが無くなり、メモリの消費を抑えることができる。
In order to achieve the above object, in the image processing apparatus according to the present invention, the statistical value acquisition means acquires a predetermined statistical value of input image data, which is a statistical value expressed by a predetermined output color space. The target value conversion means acquires a target value for the statistical value defined in the device-independent color space, and converts the target value into information in the output color space. The correction amount determination unit determines a correction amount for the input image data based on a comparison between the statistical value acquired by the statistical value acquisition unit and the converted information.
In other words, according to the present invention, the target value serving as a reference for determining the correction amount is defined in the device-independent color space, and when determining the correction amount, the target value is converted into information in the output color space. Calculate the correction amount. Therefore, the trouble of separately preparing the target values in advance according to the types of output color spaces as in the prior art is eliminated, and memory consumption can be suppressed.
ここで統計値取得手段は、上記入力画像データを構成する各画素のうち特定の記憶色の色域に属する画素を抽出し、この抽出した画素群に基づいて生成した統計値を取得し、上記目標値変換手段は、機器非依存色空間において定義された上記記憶色の目標値を上記出力色空間における情報に変換するとしてもよい。そして、上記補正量決定手段は、上記記憶色にかかる統計値と、上記記憶色の目標値の変換後の情報との比較に基づいて補正量を決定する。かかる構成によれば、入力画像中の特定の記憶色を補正するために適した補正量を、機器非依存色空間において定義された目標値を用いて適切に得ることができる。 Here, the statistical value acquisition means extracts a pixel belonging to the color gamut of a specific memory color from each pixel constituting the input image data, acquires a statistical value generated based on the extracted pixel group, The target value conversion means may convert the target value of the memory color defined in the device-independent color space into information in the output color space. Then, the correction amount determination means determines the correction amount based on a comparison between the statistical value relating to the memory color and the information after the conversion of the target value of the memory color. According to such a configuration, it is possible to appropriately obtain a correction amount suitable for correcting a specific memory color in the input image using the target value defined in the device-independent color space.
また統計値取得手段は、上記記憶色の目標値に基づいて、記憶色の色域を機器非依存色空間において決定するとともに、当決定した色域を入力画像データの色空間に依存する色域に変換し、入力画像データを構成する各画素のうち当該変換後の色域に属する画素を抽出するとしてもよい。このように、画素抽出を行なう際の判断基準となる記憶色の色域の設定を、上記機器非依存色空間において定義された記憶色の目標値に基準に行うことにより、入力画像データから記憶色の色域に属する画素群を正確に抽出することができる。 The statistical value acquisition means determines the color gamut of the memory color in the device-independent color space based on the target value of the memory color, and the color gamut that depends on the color space of the input image data. It is also possible to extract the pixels belonging to the color gamut after the conversion from among the pixels constituting the input image data. As described above, by setting the gamut of the memory color, which is a criterion for pixel extraction, based on the target value of the memory color defined in the device-independent color space, it is possible to store from the input image data. Pixel groups belonging to the color gamut can be accurately extracted.
上記統計値取得手段は、上記入力画像データ内に存在する人顔を検出し、人顔の領域内の画素群に基づいて生成した統計値を取得し、上記目標値変換手段は、機器非依存色空間において定義された人顔の色の目標値を上記出力色空間における情報に変換するとしてもよい。そして上記補正量決定手段は、上記人顔にかかる統計値と、上記人顔の目標値の変換後の情報との比較に基づいて補正量を決定する。かかる構成によれば、入力画像中の人顔の色を補正するために適した補正量を、機器非依存色空間において定義された目標値を用いて適切に得ることができる。 The statistical value acquisition unit detects a human face existing in the input image data, acquires a statistical value generated based on a pixel group in the human face region, and the target value conversion unit is device-independent. The target value of the human face color defined in the color space may be converted into information in the output color space. The correction amount determining means determines the correction amount based on a comparison between the statistical value relating to the human face and the information after the conversion of the target value of the human face. According to such a configuration, it is possible to appropriately obtain a correction amount suitable for correcting the color of the human face in the input image using the target value defined in the device-independent color space.
また上記統計値取得手段は、上記入力画像データの明るさを表現する統計値を取得し、上記目標値変換手段は、機器非依存色空間において定義された所定の明るさ目標値を上記出力色空間における情報に変換するとしてもよい。そして上記補正量決定手段は、上記明るさを表現する統計値と、上記明るさ目標値の変換後の情報との比較に基づいて補正量を決定する。かかる構成によれば、入力画像の明るさを補正するために適した補正量を、機器非依存色空間において定義された目標値を用いて適切に得ることができる。 Further, the statistical value acquisition means acquires a statistical value representing the brightness of the input image data, and the target value conversion means uses a predetermined brightness target value defined in a device-independent color space as the output color. It may be converted into information in space. The correction amount determining means determines the correction amount based on a comparison between the statistical value representing the brightness and the information after the conversion of the brightness target value. According to this configuration, it is possible to appropriately obtain a correction amount suitable for correcting the brightness of the input image using the target value defined in the device-independent color space.
さらに画像処理装置は、上記決定した補正量に基づいて、上記出力色空間において入力画像データを補正する補正手段を備えるとしてもよい。かかる構成とすることで、記憶色や、人顔や、明るさ等をそれぞれ補正するための各補正量の全て或いは一部を用いて、出力色空間上で入力画像データを補正することができる。その結果、画像処理装置は、最適な補正が施されて上記出力画像空間において表現された画像データを、次の処理ステップに引き渡すことができる。 The image processing apparatus may further include a correction unit that corrects input image data in the output color space based on the determined correction amount. With this configuration, it is possible to correct the input image data in the output color space by using all or a part of each correction amount for correcting the memory color, the human face, the brightness, and the like. . As a result, the image processing apparatus can deliver the image data that has been optimally corrected and expressed in the output image space to the next processing step.
なおこれまでは、画像処理装置というカテゴリーで本発明にかかる技術的思想を説明したが、上記の画像処理装置が備える各手段にそれぞれ対応した処理工程を備える画像処理方法の発明や、画像処理装置が備える各手段にそれぞれ対応した機能をコンピュータに実行させる画像処理プログラムの発明をも把握可能であることは言うまでも無い。 Up to now, the technical idea according to the present invention has been described in the category of image processing apparatus. However, the invention of the image processing method including the processing steps respectively corresponding to the respective units included in the image processing apparatus, and the image processing apparatus It goes without saying that the invention of an image processing program for causing a computer to execute a function corresponding to each means included in can be grasped.
以下の順序に従って、本発明の実施形態を説明する。
(1)画像処理装置などの概略構成
(2)記憶色画素の抽出処理
(3)統計データの取得処理
(4)補正量の計算および補正処理
(5)変形例
(6)まとめ
The embodiment of the present invention will be described in the following order.
(1) Schematic configuration of image processing apparatus, etc. (2) Memory color pixel extraction process (3) Statistical data acquisition process (4) Correction amount calculation and correction process (5) Modification (6) Summary
(1)画像処理装置などの概略構成
図1は、本発明の一実施形態にかかる画像処理装置と、その周辺機器の概略構成をブロック図により示している。同図においては、画像処理の中心的な役割を果たす画像処理装置としてのコンピュータ20を示している。コンピュータ20は、CPU21、ROM22、RAM23、ハードディスク(HD)24などを備える。コンピュータ20には、各種の画像入力装置としてのスキャナ11、デジタルスチルカメラ12や、各種の画像出力装置としてのプリンタ31、ディスプレイ32が適宜接続される。
(1) Schematic Configuration of Image Processing Device, etc. FIG. 1 is a block diagram showing a schematic configuration of an image processing device and peripheral devices according to an embodiment of the present invention. FIG. 1 shows a
コンピュータ20においては、CPU21がRAM23をワークエリアとして使用しながら、ROM22やHD24等の所定の記憶媒体に保存されている各種プログラムを実行する。本実施形態では、CPU21はHD24に記憶されているアプリケーション(APL)25を読み出して実行する。実行されるAPL25は、概略、画像データ取得部25aと、画素抽出部25bと、統計データ取得部25cと、補正量取得部25dと、補正部25eといった各機能ブロックを構成する。
In the
画像データ取得部25aは、上記画像入力装置から出力される画像データや、HD24に予め保存されている画像データを、入力画像データとして取得する。
画素抽出部25bは、入力画像データを構成する画素のうち所定の条件に該当する画素を抽出(サンプリング)する。本実施形態では、特定の記憶色の色域に該当する画素を抽出する。特定の記憶色とは、肌色や、空色や、緑色や、赤色等といった、画像の中でも特に重要とされる特定の色を意味する。
The image
The pixel extraction unit 25b extracts (samples) pixels that satisfy a predetermined condition from the pixels constituting the input image data. In the present embodiment, pixels corresponding to the color gamut of a specific memory color are extracted. The specific memory color means a specific color that is particularly important in the image, such as skin color, sky blue, green, and red.
統計データ取得部25cは、画素抽出部25bによって抽出された画素群や、画像データ取得部25aから受け渡された入力画像データの画素群などに基づいて、各種統計値(統計データ)を生成し取得する。統計データ取得部25cは、画素群に基づいてヒストグラムを生成し、ヒストグラムの集計結果から各統計データを生成する統計データ生成部25c1と、この生成された統計データを、所定の機器非依存色空間によって表現される色情報に変換し、当該変換後の色情報をHD24に統計データ24cとして保存する統計データ変換部25c2とからなる。
The statistical
補正量取得部25dは、HD24から統計データ24cを読み出すとともに、補正目標値24bを取得して、入力画像データを補正するための補正量を決定する。補正目標値24bとは、統計データ24cの理想値であり、HD24等の所定の記憶媒体に予め保存されていたり、外部から入力される。本実施形態では、補正目標値24bは所定の機器非依存色空間において定義された情報としている。補正量取得部25dは、補正目標値24bを所定の出力色空間における情報に変換する目標値変換部25d1と、統計データ24cを同所定の出力色空間における情報に変換する統計データ変換部25d2と、上記変換後の統計データと補正目標値との比較に基づいて補正量を計算する補正量決定部25d3とからなる。
The correction
補正部25eは、画像データ取得部25aから入力画像データを受け取るとともに、上記決定された補正量に基づいて、入力画像データを画素単位で補正し、当該補正後の画像データを出力する。
画素抽出部25b、統計データ取得部25c、補正量取得部25d、補正部25eそれぞれによる処理の詳細については後述する。
The
Details of processing by the pixel extraction unit 25b, the statistical
コンピュータ20では、APL25はオペレーティングシステム26に組み込まれて実行され、オペレーティングシステム26には、プリンタドライバ27およびディスプレイドライバ28も組み込まれている。ディスプレイドライバ28はディスプレイ32への画像表示を制御するドライバであり、APL25の補正部25eから出力された補正後の画像データに基づいて、画像をディスプレイ32に表示させることが可能である。また、プリンタドライバ27は、APL25の補正部25eから出力された補正後の画像データに対して、インク色(例えば、シアン、マゼンタ、イエロー、ブラック)表色系への色変換処理やハーフトーン処理やラスタライズ処理などを実行して印刷データを生成するとともに、この印刷データをプリンタ31に出力することにより、プリンタ31に印刷データに基づく画像の印刷を実行させることが可能である。
In the
ここで、上記画像データ取得部25aが取得する入力画像データは、RGBの各要素色を複数階調(例えば、0〜255の256階調)で表現して各画素の色を規定したドットマトリクス状のデータである。RGB色空間としては、sRGB色空間が一般的であるが、AdobeRGB(AdobeはAdobe systems社の登録商標。)色空間など、sRGB色空間よりも広い色再現範囲を有する色空間も存在する。従って、デジタルスチルカメラ12などの画像入力装置から出力される入力画像データが採用する色空間(入力色空間)は、sRGB色空間であったり、sRGB色空間とは異なる色空間であったりする。一方、補正部25eが出力する画像データ、つまりAPL25がプリンタドライバ27等の次の処理ステップに受け渡す画像データを表現するための色空間(出力色空間)の設定は、入力色空間と同じであることもあれば異なることもある。
Here, the input image data acquired by the image
本実施形態では、入力色空間が何であるか、また入力色空間と出力色空間とが同じであるか否か、に拘らず入力画像データに対する適切な補正を実行可能な構成を実現している。以下では説明を容易とするため、入力色空間、出力色空間のそれぞれは、sRGB色空間とsRGB色空間よりも色再現範囲の広い特定の色空間(wRGB色空間)とのいずれかであるものとする。sRGB色空間とwRGB色空間とはいずれも機器依存色空間である。 In this embodiment, a configuration capable of executing appropriate correction on input image data regardless of what the input color space is and whether the input color space and the output color space are the same is realized. . In the following, for ease of explanation, each of the input color space and the output color space is either a sRGB color space or a specific color space (wRGB color space) having a wider color reproduction range than the sRGB color space. And Both the sRGB color space and the wRGB color space are device-dependent color spaces.
なお、本実施形態で説明するコンピュータ20が実行する処理は、その全て或いは一部を、上記画像入力装置の側で実行するとしてもよいし、上記画像出力装置の側で実行するとしてもよい。例えば、補正部25eの機能については、プリンタ31やディスプレイ32の側に備えさせ、プリンタ31やディスプレイ32が、上記APL25から受け渡された画像データを補正し、補正後の画像データに基づいて印刷処理や画像表示処理を行なうとしてもよい。この場合、コンピュータ20とプリンタ31、ディスプレイ32とによって画像処理システムが構築されると言える。
Note that all or a part of the processing executed by the
(2)記憶色画素の抽出処理
図2は、コンピュータ20がAPL25に従って実行する画像処理の一部であって、主に画素抽出部25bに従って実行する処理をフローチャートにより示している。
ステップS(以下、ステップの記載を省略する)100では、コンピュータ20は、入力画像データがいずれの色空間によって表現されているかを判別する。画像データ取得部25aが取得する入力画像データには、その画像データに関する各種付属情報を記述したヘッダが付加されており、かかるヘッダに入力色空間の種別を示した情報が記述されている。コンピュータ20は、このヘッダに記述された情報に基づいて、入力色空間の種別を判別する。
(2) Memory Color Pixel Extraction Processing FIG. 2 is a part of image processing executed by the
In step S (hereinafter, step description is omitted) 100, the
S110では、コンピュータ20は、HD24に予め保存されている色域定義情報24aを読み出す。ただし、コンピュータ20は色域定義情報24aをコンピュータ20外部から入力するようにしてもよい。色域定義情報24aは、機器非依存色空間において記憶色の範囲を定義した情報である。本実施形態では、機器非依存色空間として、国際照明委員会(CIE)で規定されたL*a*b*色空間を採用する。従って色域定義情報24aは、記憶色についてその明度(L*)、彩度(C*)、色相(h*)の各範囲を定義したものである(以下、「*」は省略)。
In S110, the
図3は、ある記憶色(例えば、肌色)の色域定義情報24aによって定義された色域Aの一例をLab色空間中に示している。同図に示すように、色域Aは、明度L、彩度C、色相hの各範囲、
Ls≦L≦Le
Cs≦C≦Ce
hs≦h≦he
によって区画された立体にて表現される。同図では、ab平面上へ色域Aの投影図もハッチングを施して併せて示している。
S120では、コンピュータ20は、色域Aの各面において変換基準点Pを設定する。変換基準点Pとは、色域Aの外郭上の座標のうち入力画像データの色空間に依存する情報への変換対象となる座標値を意味する。
FIG. 3 shows an example of the color gamut A defined by the color
L s ≦ L ≦ L e
C s ≦ C ≦ C e
h s ≤ h ≤ h e
It is expressed as a solid divided by. In the figure, the projection view of the color gamut A is also shown hatched on the ab plane.
In S120, the
図4に示すように、コンピュータ20は、色域Aの各面において1つずつ変換基準点P(P1〜P6)を設定する。変換基準点Pの位置を各面のどこにするかは種々の考えを採用できるが、本実施形態では各面の中心位置をそれぞれ変換基準点P1〜P6としている。ここで、変換基準点P1は、色域Aのうち色相角が最も小さい面上の点であり、変換基準点P2は、色域Aのうち色相角が最も大きい面上の点であり、変換基準点P3は、色域Aのうち彩度が最も低い面上の点であり、変換基準点P4は、色域Aのうち彩度が最も高い面上の点であり、変換基準点P5は、色域Aのうち明度が最も低い面上の点であり、変換基準点P6は、色域Aのうち明度が最も高い面上の点である。
As shown in FIG. 4, the
S130では、コンピュータ20は、変換基準点Pの座標データLabを入力色空間に依存する情報に変換する。まず、コンピュータ20は上記S100で判別済みの入力色空間の種別に応じたICCプロファイルをHD24等の所定の記憶媒体から取得し、当該ICCプロファイルを参照して各変換基準点Pの座標データLabをRGBデータに変換する。入力色空間がsRGB色空間である場合には、Lab色空間の複数の参照点についてそのLabデータとsRGB色空間におけるRGBデータとの変換対応関係を規定したICCプロファイルを取得し、そのプロファイルを参照することにより、各変換基準点PのLabデータをRGBデータに変換する。
In S130, the
変換基準点Pの座標値を入力画色空間に依存する情報に変換すると言った場合、最も単純には、上記のように変換して得られたRGBデータ自体が上記入力色空間に依存する情報に該当する。しかし本実施形態では、このように変換したRGBデータを更にHSV形式の情報に変換する。H(Hue)は色相、S(Saturation)は彩度、V(Value)は明度を意味する。RGBからHSVへの変換は、公知の変換式により実行可能である。 When it is said that the coordinate value of the conversion reference point P is converted into information dependent on the input image color space, the simplest is information in which the RGB data itself obtained by conversion as described above depends on the input color space. It corresponds to. However, in the present embodiment, the RGB data thus converted is further converted into HSV format information. H (Hue) means hue, S (Saturation) means saturation, and V (Value) means lightness. Conversion from RGB to HSV can be executed by a known conversion formula.
かかる処理の結果、図4に示した変換基準点P1〜P6は、
P1(L1,a1,b1)→P1´(H1,S1,V1)
P2(L2,a2,b2)→P2´(H2,S2,V2)
P3(L3,a3,b3)→P3´(H3,S3,V3)
P4(L4,a4,b4)→P4´(H4,S4,V4)
P5(L5,a5,b5)→P5´(H5,S5,V5)
P6(L6,a6,b6)→P6´(H6,S6,V6)
というように変換されたことになる。
As a result of such processing, the conversion reference points P1 to P6 shown in FIG.
P1 (L 1, a 1, b 1) → P1' (
P2 (L 2, a 2, b 2) → P2' (H 2, S 2, V 2)
P3 (L 3, a 3, b 3) → P3' (
P4 (L 4, a 4, b 4) → P4' (
P5 (L 5, a 5, b 5) → P5' (H 5, S 5, V 5)
P6 (L 6, a 6, b 6) → P6' (
It was converted as follows.
このようなHSVの値は変換元のRGBの数値によって決まる値であるため、入力色空間に依存する情報と言える。むろん、入力色空間がwRGB色空間である場合には、コンピュータ20はLab色空間からwRGB色空間への変換対応関係を規定したICCプロファイルを参照して各変換基準点PのLabデータをRGBデータに変換し、この変換後のRGBデータをHSV形式で表現する。
Since such HSV values are values determined by the RGB values of the conversion source, it can be said that the information depends on the input color space. Of course, when the input color space is the wRGB color space, the
なおコンピュータ20は、上記のようにLabデータをRGBデータに変換し、これをHSVデータに変換するという2段階の変換作業を行なうのではなく、入力色空間の種別毎にLabデータとHSVデータとの変換対応関係を規定したルックアップテーブル(LUT)を予め生成してHD24等の所定の記憶媒体に保持しておくとしてもよい。つまり、Lab色空間からsRGB色空間(あるいはwRGB色空間)への変換対応関係を規定するICCプロファイルにおける各RGBデータをHSVデータに変換するとともに、この変換によって得た各HSVデータを、変換元のRGBデータに対応するLabデータに対応付けることにより、LabデータをsRGB色空間(あるいはwRGB色空間)に依存したHSVデータに変換可能なLUTを生成する。
The
上記S130では、コンピュータ20は、このように生成した各LUTを入力色空間の種別に応じて選択して参照することにより、各変換基準点PのLabデータをHSVデータに変換するとしてもよい。
In S <b> 130, the
S140ではコンピュータ20は、S130の変換処理によって得られた、入力色空間に依存する情報に基づいて、画素抽出のための色域を決定する。
本実施形態においては変換基準点P1〜P6の変換結果として、座標値P1´〜P6´が得られているので、コンピュータ20はこれら座標値P1´〜P6´に基づいて画素抽出のための色域A´を決定する。座標値P1´は上記色域Aのうち色相角が最も小さい面上の変換基準点P1を変換した結果であり、座標値P2´は色域Aのうち色相角が最も大きい面上の変換基準点P2を変換した結果であるため、座標値P1´の色相H1と座標値P2´の色相H2とによって挟まれる範囲を色域A´の色相範囲とする。
In S140, the
In the present embodiment, since the coordinate values P1 ′ to P6 ′ are obtained as the conversion results of the conversion reference points P1 to P6, the
また、座標値P3´は色域Aのうち彩度が最も低い面上の変換基準点P3を変換した結果であり、座標値P4´は色域Aのうち彩度が最も高い面上の変換基準点P4を変換した結果であるため、座標値P3´の彩度S3と座標値P4´の彩度S4とによって挟まれる範囲を色域A´の彩度範囲とする。
また、座標値P5´は色域Aのうち明度が最も低い面上の変換基準点P5を変換した結果であり、座標値P6´は色域Aのうち明度が最も高い面上の変換基準点P6を変換した結果であるため、座標値P5´の明度V5と座標値P6´の明度V6とによって挟まれる範囲を色域A´の明度範囲とする。
The coordinate value P3 ′ is the result of converting the conversion reference point P3 on the surface with the lowest saturation in the color gamut A, and the coordinate value P4 ′ is the conversion on the surface with the highest saturation in the color gamut A. since the result of converting the reference point P4, the range sandwiched between the saturation S 3 and the coordinate values saturation S 4 of P4' coordinates P3' the saturation range of the color gamut A'.
The coordinate value P5 ′ is a result of converting the conversion reference point P5 on the surface having the lowest lightness in the color gamut A, and the coordinate value P6 ′ is the conversion reference point on the surface having the highest lightness in the color gamut A. Since it is the result of converting P6, the range between the brightness V 5 of the coordinate value P5 ′ and the brightness V 6 of the coordinate value P6 ′ is set as the brightness range of the color gamut A ′.
図5は、色域A´をHSV表色空間において示している。同図に示すように、色域A´は、
H1≦H≦H2
S3≦S≦S4
V5≦V≦V6
によって区画された立体にて表現される。
このようにS100〜S140の処理によって、色域定義情報24aが定義する色域(色域A)を入力画像データの色空間に依存する色域(色域A´)に変換することができる。また、変換後の色域についても明度と彩度と色相の各範囲によって定義することで、変換前の色域と変換後の色域との形状の類似性を保つことができる。
FIG. 5 shows the color gamut A ′ in the HSV color space. As shown in the figure, the color gamut A ′ is
H 1 ≦ H ≦ H 2
S 3 ≦ S ≦ S 4
V 5 ≦ V ≦ V 6
It is expressed as a solid divided by.
As described above, the color gamut (color gamut A) defined by the color
S150ではコンピュータ20は、入力画像データを構成する画素のうち、上記変換後の色域に属する画素を抽出する。この場合、各画素についてそのRGBデータをHSVデータで表現した上で上記変換後の色域に属するか否かを判断し、属する画素のみ抽出する。抽出された画素群は上述の統計データ取得部25cに受け渡され、統計データ24cの算出元のデータとなる。
なお図3,4では、1つの色域定義情報24aにかかる色域のみを図示しているが、上述したような記憶色の種類毎に色域定義情報24aは存在する。本実施形態では、少なくとも肌色と、空色と、緑色と、赤色と、低彩度色との色域をそれぞれ定義した色域定義情報24aが存在するものとする。コンピュータ20は、色域定義情報24a毎にそれらの色域を入力色空間に依存する色域に変換し、変換後の色域毎に画素抽出を行なう。
In S150, the
3 and 4, only the color gamut relating to one color
(3)統計データの取得処理
図6は、コンピュータ20がAPL25に従って実行する画像処理の一部であって、主に統計データ取得部25cに従って実行する処理をフローチャートにより示している。
S200では、コンピュータ20は、上述したように記憶色毎に抽出された画素群を対象として統計データを生成する。具体的には、一つの記憶色にかかる画素群に基づいて、要素色RGB毎のヒストグラムを生成し、そのRGB毎のヒストグラムそれぞれにおける平均値Rav、Gav、Bavを算出する。
(3) Statistical Data Acquisition Processing FIG. 6 is a part of image processing executed by the
In S200, the
図7(a)〜(c)は、RGBそれぞれのヒストグラムを例示している。各ヒストグラムは、縦軸に画素数、横軸に階調値(0〜255)を規定した頻度分布である。
平均値Rav、Gav、Bavの算出は、記憶色の種類毎に行なう。従ってS200では、入力画像データに関して、記憶色毎かつRGB毎の平均値が生成される。ただし、上記S150において抽出された画素数が入力画像データの全画素数に対して所定割合以上存在しない記憶色に関しては、統計データの生成は行なわない。入力画像データ中に存在しないか存在しても極めて少数である色については、補正を行う必要性が低いからである。
FIGS. 7A to 7C illustrate RGB histograms. Each histogram is a frequency distribution in which the number of pixels is defined on the vertical axis and the gradation value (0 to 255) is defined on the horizontal axis.
The average values Rav, Gav, and Bav are calculated for each type of memory color. Therefore, in S200, an average value for each memory color and for each RGB is generated for the input image data. However, statistical data is not generated for memory colors in which the number of pixels extracted in S150 does not exist over a predetermined ratio with respect to the total number of pixels of the input image data. This is because it is less necessary to perform correction for colors that are not present in the input image data or are very few even if they exist.
S210では、コンピュータ20は、入力画像データ全体を対象とした統計データを生成する。具体的には、入力画像データの全範囲の画素を対象としてRGB毎のヒストグラムを生成し、そのRGB毎のヒストグラムそれぞれにおける最大値Rmax、Gmax、Bmaxと、最小値Rmin、Gmin、Bminとを取得する。最大値および最小値を求める場合、単純にヒストグラム上の最も高階調側の階調値を最大値とし、最も低階調側の階調値を最小値としてもよい。しかし本実施形態では、最も高階調側の階調値と最も低階調側の階調値とからある分布割合(例えば、ヒストグラムの集計に用いた画像数の0.5%分)だけヒストグラムの内側に入った位置をそれぞれ最大値、最小値としている。このようにヒストグラムの上端と下端を所定割合だけカットすれば、高階調側や低階調側でノイズなどに起因して生じている白点や黒点の影響を無視した統計データを生成することができる。かかる上端と下端のカットは、他のヒストグラムに基づく統計データの生成時にも実行する。
In S210, the
S220では、コンピュータ20は、入力画像データを複数の領域に分割するとともに、分割した領域毎の統計データを生成する。
図8は、入力画像データDを複数の領域に分割した様子の一例を示している。同図では、入力画像データDを縦横それぞれ5分割し、計25個の領域Tを形成している。むろん、入力画像データDの分割の仕方は同図に示した態様に限られない。コンピュータ20は分割後の領域単位でRGB毎のヒスグラムを生成し、RGB毎のヒストグラムそれぞれの平均値Rav、Gav、Bavを算出する。従ってS220では、入力画像データに関して、分割した領域毎かつRGB毎の平均値が生成される。またS220では、平均値以外にも、各ヒストグラムの中央値(メジアン)Rmed、Gmed、Bmedを生成してもよい。
In S220, the
FIG. 8 shows an example of a state in which the input image data D is divided into a plurality of regions. In the figure, the input image data D is divided into 5 parts vertically and horizontally to form a total of 25 regions T. Of course, the method of dividing the input image data D is not limited to the mode shown in FIG. The
S230では、コンピュータ20は、入力画像データ中に存在する人物の顔(人顔)を検出するとともに、検出した人顔の領域内の画素群を対象とした統計データを生成する。人顔の検出処理は、公知の人顔検出用のプログラムを用いて実行可能である。ここでは、検出した人顔の範囲内の画素群に基づいてRGB毎のヒストグラムを生成し、そのRGB毎のヒストグラムそれぞれにおける平均値Rav、Gav、Bavを算出する。人顔が複数検出された場合は、検出した人顔毎に平均値Rav、Gav、Bavを算出する。むろん、人顔が検知されない場合は人顔に関する統計データは生成しない。
なお、上記各ヒストグラムを生成する場合、ヒストグラムの集計対象とした領域に属する全画素に基づいて生成してもよいが、同集計対象とした領域の中から所定の抽出率に基づいて抽出した画素に基づいて生成してもよい。
In S230, the
In addition, when generating each of the above histograms, it may be generated based on all pixels belonging to the area to be aggregated of the histogram, but pixels extracted based on a predetermined extraction rate from the area to be aggregated You may generate based on.
S240では、コンピュータ20は、上記のように生成した各統計データを、Lab色空間上の色情報に変換する。つまりS200〜S230で生成した各統計データは入力色空間に依存する情報であるため、これを機器非依存色空間であるLab色空間の情報に変換することにより、後の補正量計算の際に用いられる色空間(出力色空間)がどのようなものであっても統計データを容易に利用できるようにしている。具体的にはS240では、上記S100で判別済みの入力色空間に応じた変換プロファイル(入力デバイスプロファイルとも言う)をHD24等の所定の記憶媒体から取得し、当該変換プロファイルを参照して、統計データとしてのRGBデータをLabデータに変換する。入力色空間がsRGB色空間である場合には、sRGB色空間をLab色空間に変換する変換プロファイルを使用し、入力色空間がwRGB色空間である場合には、wRGB色空間をLab色空間に変換する変換プロファイルを使用する。
In S240, the
図9は、入力色空間に依存する情報としての各統計データをLabデータに変換した一例を示している。同図では、入力色空間がsRGB色空間である場合を示している。また同図および後述の図11では、Labデータについても0〜255の256階調にて表現している。
本実施形態では、要素色RGB別の統計データであって同種の統計データの組み合わせを一つの色とみなし、この組み合わせをLabデータに変換している。つまり、入力画像データ全体のヒストグラムの最大値Rmax、Gmax、Bmaxの組み合わせからなるRGBデータや、ある記憶色についての平均値Rav、Gav、BavからなるRGBデータや、ある分割後の領域についての平均値Rav、Gav、BavからなるRGBデータや、人顔の色にかかる平均値Rav、Gav、BavからなるRGBデータ等をそれぞれLabデータに変換している。
FIG. 9 shows an example in which each statistical data as information depending on the input color space is converted into Lab data. In the figure, the input color space is an sRGB color space. In FIG. 11 and FIG. 11 described later, Lab data is also expressed in 256 gradations from 0 to 255.
In the present embodiment, a combination of statistical data of the element colors RGB and the same kind of statistical data is regarded as one color, and this combination is converted into Lab data. That is, RGB data composed of a combination of maximum values Rmax, Gmax, Bmax of the histogram of the entire input image data, RGB data composed of average values Rav, Gav, Bav for a certain memory color, and an average for a certain divided area RGB data composed of values Rav, Gav, Bav, and RGB data composed of average values Rav, Gav, Bav relating to human face colors are converted into Lab data.
上記同種の統計データの組み合わせにおける一つ一つの値(例えば、ヒストグラムの最大値Rmax、Gmax、Bmax)は、必ずしもそれらが同じ画素に属していると言う訳ではないが、色味が互いに接近した画素に属していると言える。例えば、上記最大値Rmax、Gmax、Bmaxはいずれも白っぽい画素に属したものであろうし、上記最小値Rmin、Gmin、Bminはいずれも黒っぽい画素に属したものであると想定される。また、一つの記憶色についての平均値Rav、Gav、Bavや、分割後の一つの領域についての平均値Rav、Gav、Bavなども、その組み合わせを構成するRGBは色味が似通った画素に属していると想定される。さらに上述したように、各ヒストグラムから統計データを求める場合には、ヒストグラムの上端および下端をそれぞれ所定分布割合だけカットした上で求めており、ノイズの影響が統計データに表れることを防止している。従って、上記同種の統計データの組み合わせを一つの色として扱っても大きな支障はなく、これをLabデータに変換しても統計値としての情報が劣化することは殆ど無いと言える。また、上記同種の統計データの組み合わせをLabデータに変換することにより、入力画像データの要素色RGB毎に生成した各種統計データを効率的に、Lab色空間上の情報に変換できる。 The individual values (for example, the maximum values Rmax, Gmax, Bmax of the histogram) in the combination of the same kind of statistical data are not necessarily said to belong to the same pixel, but the colors are close to each other. It can be said that it belongs to a pixel. For example, it is assumed that the maximum values Rmax, Gmax, and Bmax all belong to whitish pixels, and the minimum values Rmin, Gmin, and Bmin all belong to blackish pixels. Also, the average values Rav, Gav, Bav for one memory color and the average values Rav, Gav, Bav for one divided area belong to pixels having similar colors. It is assumed that Furthermore, as described above, when obtaining statistical data from each histogram, the upper end and the lower end of the histogram are obtained after being cut by a predetermined distribution ratio, thereby preventing the influence of noise from appearing in the statistical data. . Therefore, it can be said that there is no major problem even if the combination of the same kind of statistical data is treated as one color, and even if this is converted into Lab data, the information as the statistical value is hardly deteriorated. Also, by converting the combination of statistical data of the same type into Lab data, various statistical data generated for each element color RGB of the input image data can be efficiently converted into information on the Lab color space.
S250では、コンピュータ20は、上記のようにLab色空間上の値に変換した後の統計データ24cをHD24に保存する。
なお図6の各ステップで説明した統計データの生成処理の順序は、上述したS200〜S230の順序に限られず、他の順序であってもよい。また、上述した各統計データの他にも、コンピュータ20は入力画像データに関する様々な統計値を生成可能である。
In S250, the
The order of the statistical data generation process described in each step of FIG. 6 is not limited to the order of S200 to S230 described above, and may be another order. In addition to the statistical data described above, the
(4)補正量の計算および補正処理
図10は、コンピュータ20がAPL25に従って実行する画像処理の一部であって、主に補正量取得部25d及び補正部25eに従って実行する処理をフローチャートにより示している。
S300では、コンピュータ20は出力色空間の種類を判別する。出力色空間は、補正量取得部25dによる補正量計算および補正部25eによる画像データの補正処理を実行するときに用いる色空間(作業用色空間)となる。よってコンピュータ20は、補正量の計算に先立って、出力色空間が何であるかを判別する。
(4) Correction amount calculation and correction processing FIG. 10 is a part of image processing executed by the
In S300, the
コンピュータ20は、例えば所定のユーザーインターフェース(UI)を介して外部から出力色空間の指定を受付けることにより、出力色空間の種類を判別する。あるいは、出力色空間の種類を予めデフォルトとして規定した情報がHD24等の所定の記憶媒体に存在する場合には、かかる情報を読み出すことにより出力色空間の種類を判別する。あるいは、上記S100と同様に、入力画像データのヘッダに記述されている付属情報を読み出し、付属情報中に出力色空間を指定する情報が存在する場合には、当該情報に基づいて出力色空間が何であるかを判別する。
The
S310では、コンピュータ20は、入力画像データに適用する補正の種類を決定する。本実施形態においては、補正部25eが実行可能な補正の種類として、記憶色補正、人顔補正、明るさ補正、カラーバランス補正、ホワイトバランス補正等(各補正の内容については後述)があり、コンピュータ20は、例えばUIを介して外部から補正種類の指定を受付けることにより、入力画像データに対して施す補正種類を決定する。また、コンピュータ20は、入力画像データのヘッダに撮影時のシーン情報(風景画、夜景画、人物画等)が記述されている場合には、当該シーン情報に応じて自動的に補正の種類を決定しても良いし、所定のシーン判別用のプログラムによって入力画像データの撮影シーンを判別し、この判別結果に応じて自動的に補正の種類を決定しても良い。また、上記UIを介して外部から指定された入力画像データのシーンの種類に応じて自動的に補正の種類を決定しても良い。
In S310, the
S320では、コンピュータ20は、上記S310で決定した種類にかかる補正を実現するために必要な補正目標値24bを、HD24等の所定の記憶媒体から読み出す。
S330では、コンピュータ20は、上記読み出した補正目標値24bを、上記S300において判別した出力色空間上のデータに変換する。本実施形態では、補正目標値24bは出力色空間によらずLabデータとして保存しているため、補正量計算を出力色空間において行なうために補正目標値24bについて色空間変換を行なう。
In S320, the
In S330, the
図11は、補正目標値24bの色空間を出力色空間へ変換した場合の一例を示している。同図では、上記S310において、記憶色(緑色)補正と、記憶色(空色)補正と、記憶色(肌色)補正と、記憶色(赤色)補正と、人顔補正と、明るさ補正とを実行することを決定した場合に行なう、補正目標値24bの変換の様子を示している。この場合上記S320では、各種補正目標値24bのうち、記憶色(緑色)補正の目標値と、記憶色(空色)補正の目標値と、記憶色(肌色)補正の目標値と、記憶色(赤色)補正の目標値と、人顔補正の目標値と、明るさ補正の目標値(明るさ目標値)とを読み出す。
FIG. 11 shows an example when the color space of the
同図は、出力色空間がwRGB色空間に設定されている場合の変換処理の例であり、この場合上記S330では、コンピュータ20は、上記読み出した目標値としての各Labデータを、Lab色空間からwRGB色空間への変換対応関係を規定した既述のICCプロファイルを用いてRGBデータに変換する。むろん、出力色空間がsRGB色空間である場合には、Lab色空間からsRGB色空間への変換対応関係を規定した既述のICCプロファイルを用いて、目標値としての各LabデータをRGBデータに変換する。
This figure is an example of conversion processing when the output color space is set to the wRGB color space. In this case, in S330, the
S340では、コンピュータ20は、上記S310で決定した種類にかかる補正を実行するために必要な統計データ24cをHD24から読み出す。図11の例に対応した説明を行なうと、コンピュータ20は、図9に示した統計データ24c(Labデータ)のうち、記憶色(緑色)についての統計データと、記憶色(空色)についての統計データと、記憶色(肌色)についての統計データと、記憶色(赤色)についての統計データと、人顔についての統計データと、入力画像データの各領域についての統計データであって各領域の平均値Rav、Gav、Bavを変換したLabデータと、を読み出す。
In S340, the
S350では、コンピュータ20は、上記読み出した統計データ24cを上記S300において判別した出力色空間上のRGBデータに変換する。ここでも、出力色空間がwRGB色空間である場合には、Lab色空間からwRGB色空間への変換対応関係を規定した既述のICCプロファイルを用いて、統計データとしての各LabデータをRGBデータに変換し、出力色空間がsRGB色空間である場合には、Lab色空間からsRGB色空間への変換対応関係を規定した既述のICCプロファイルを用いて、統計データとしての各LabデータをRGBデータに変換する。なお、上記S100〜S350までの処理を実行する点で、コンピュータ20はその一部の機能として、入力画像データの所定の統計値であって所定の出力色空間によって表現された統計値を取得する統計値取得手段を実現しているとも言える。
In S350, the
S360では、上記変換後の補正目標値と統計データとの比較結果に基づいて、補正量を計算する。
例えば、上記S330で変換した後の記憶色(緑色)補正の目標値がRgs、Ggs、Bgsであり、上記S350で変換した後の記憶色(緑)についての統計データがRg、Gg、Bgである場合、入力画像データに対して記憶色(緑)補正を行うための補正量ΔRg、ΔGg、ΔBgを式(1)〜(3)のように求める。
ΔRg=αg(Rgs−Rg) …(1)
ΔGg=αg(Ggs−Gg) …(2)
ΔBg=αg(Bgs−Bg) …(3)
In S360, the correction amount is calculated based on the comparison result between the corrected correction target value and the statistical data.
For example, the target values for memory color (green) correction after conversion in S330 are Rgs, Ggs, and Bgs, and the statistical data for the memory color (green) after conversion in S350 is Rg, Gg, and Bg. In some cases, correction amounts ΔRg, ΔGg, and ΔBg for performing memory color (green) correction on the input image data are obtained as shown in equations (1) to (3).
ΔRg = αg (Rgs−Rg) (1)
ΔGg = αg (Ggs−Gg) (2)
ΔBg = αg (Bgs−Bg) (3)
αgは、記憶色(緑色)補正に対して設定された重み付け係数であり、入力画像データに対する記憶色(緑色)補正の適用度合いを規定した係数である。かかる重み付け係数も補正目標値24bとともにHD24等の所定の記憶媒体に記録されている。
記憶色(空色)補正を行なうための補正量ΔRb、ΔGb、ΔBbと、記憶色(肌色)補正を行なうための補正量ΔRs、ΔGs、ΔBsと、記憶色(赤色)補正を行なうための補正量ΔRr、ΔGr、ΔBrと、人顔補正を行なうための補正量ΔRf、ΔGf、ΔBfとについても、上記補正量ΔRg、ΔGg、ΔBgと同様に、補正目標値としてのRGBデータと、統計データとしてのRGBデータとの要素色毎の差分に、その補正種類に応じて予め設定されている重み係数αを乗算することにより取得する。
αg is a weighting coefficient set for the memory color (green) correction, and is a coefficient that defines the degree of application of the memory color (green) correction to the input image data. Such a weighting coefficient is also recorded in a predetermined storage medium such as the
Correction amounts .DELTA.Rb, .DELTA.Gb, .DELTA.Bb for performing memory color (sky blue) correction, correction amounts .DELTA.Rs, .DELTA.Gs, .DELTA.Bs for performing memory color (skin color) correction, and correction amounts for performing memory color (red) correction. With respect to ΔRr, ΔGr, ΔBr and correction amounts ΔRf, ΔGf, ΔBf for performing human face correction, like the correction amounts ΔRg, ΔGg, ΔBg, RGB data as correction target values and statistical data It is obtained by multiplying the difference for each element color from the RGB data by a weighting factor α set in advance according to the correction type.
また、コンピュータ20は、明るさ補正のための補正量を次のように求める。図11からも判るように、予めLabデータとして保存されていた明るさ補正の目標値は、上記S330の処理によってRGBデータに変換される。コンピュータ20はまず、この明るさ補正の目標値としてのRGBデータから輝度Y(補正基準輝度Ysと呼ぶ)を求める。一般に、輝度Yの算出は、RGBの重み付け積算の式(4)
Y=0.30R+0.59G+0.11B …(4)
等によって算出可能である。ただし本実施形態では、上記明るさ補正の目標値としてのLabデータは、これをRGBデータに変換したときにRGBの各階調値が等値となるような値に設定してある。そのためコンピュータ20は、上記変換後の明るさ補正の目標値のRGBの階調値(R、G、Bいずれの階調値でも良い)を補正基準輝度Ysとする。
Moreover, the
Y = 0.30R + 0.59G + 0.11B (4)
Etc. However, in this embodiment, the Lab data as the brightness correction target value is set to a value such that the RGB gradation values are equal when converted to RGB data. For this reason, the
次に、コンピュータ20は、補正基準輝度Ysとの比較に用いる入力画像データの明るさを、上記S350で変換した後の各領域についての統計データ(RGBデータ)に基づいて決定する。この場合まず、各領域についての統計データ(RGBデータ)からそれぞれに輝度Yiを算出する。輝度の算出は上記式(4)により可能である。各領域についての統計データ(RGBデータ)は、入力画像データの各領域のRGB毎の平均値Rav、Gav、BavをLabデータに変換し、このLabデータを出力色空間に依存するRGBデータに変換したものであるため、各輝度Yiは、入力画像データを出力色空間上で表したときの各領域の輝度の略平均値をそれぞれ表していると言える。なお、各領域についての統計データは、入力画像データの明るさを表現する統計値に該当する。
各領域の輝度Yiを得たら、次にコンピュータ20は、輝度Yiの全てあるいは一部に基づいて、入力画像データの輝度平均値Yav(入力画像データの明るさ)を算出する。ここでは一例として、輝度平均値Yavを画像の略中央領域の輝度Yiを重視して算出する。
Next, the
After obtaining the luminance Yi of each area, the
図12は、輝度平均値Yavの算出処理を説明するための図である。同図では、上記図8と同様に入力画像データDを複数の領域Tに分割した様子を示している。また上述したように、ここでは各領域Tについて輝度Yi(同図においては、i=1〜25)が得られている。コンピュータ20は、入力画像データを中央領域と、中央領域以外の領域(縁領域と呼ぶ)に分け、中央領域の輝度と縁領域の各領域Tの輝度との差を算出し、各差の大きさと所定のしきい値THとを比較する。一例として、25個の領域のうち画像中央の9個の領域Tで形成される範囲を中央領域とし、中央領域の外側の16個の領域Tを縁領域とする。
FIG. 12 is a diagram for explaining the calculation process of the luminance average value Yav. This figure shows a state in which the input image data D is divided into a plurality of regions T as in FIG. Further, as described above, the luminance Yi (i = 1 to 25 in the figure) is obtained for each region T here. The
中央領域の輝度と言った場合には、中央領域中の各領域Tの輝度Yiの平均値を指してもよいし、中央領域中の特定の領域Tの輝度Yiを指しても良い。ここでは、中央領域内の一つの領域Tを注目ブロックT1とし、注目ブロックT1の輝度Ynと、縁領域の各領域Tの輝度(Y1,Y2,Y3…)との差をそれぞれ算出する。そして、縁領域の各領域Tのうち、上記算出された差の大きさがしきい値THを越えるものについては、輝度平均値Yavの算出対象からは除外し、除外しなかった縁領域の各領域Tの輝度Yiおよび中央領域の各領域TのYiに基づいて平均値を算出し、この算出結果を輝度平均値Yavとする。 In the case of the luminance of the central region, the average value of the luminance Yi of each region T in the central region may be indicated, or the luminance Yi of a specific region T in the central region may be indicated. Here, one region T in the central region is set as the target block T1, and the difference between the luminance Yn of the target block T1 and the luminance (Y1, Y2, Y3...) Of each region T of the edge region is calculated. Then, among the regions T of the edge region, those where the magnitude of the calculated difference exceeds the threshold value TH is excluded from the calculation target of the luminance average value Yav, and each region T of the edge region that is not excluded. An average value is calculated on the basis of the luminance Yi and Yi of each region T in the central region, and this calculation result is defined as a luminance average value Yav.
ただし、画像の略中央領域の輝度を重視して輝度平均値Yavを算出する手法は、上記手法に限られない。例えば、各領域Tの輝度Yiに対して、各領域Tの画像内での位置に応じた重み係数(0〜1の値)を与えて積算し、この積算結果を入力画像データの輝度平均値Yavとしてもよい。この重み係数は、画像の中央に近い領域Tほど大きな値を与えるものとする。また、各領域Tに与える重み係数の総和が1になるようにする。 However, the method of calculating the luminance average value Yav with emphasis on the luminance of the substantially central region of the image is not limited to the above method. For example, the luminance Yi of each region T is integrated by giving a weighting coefficient (a value of 0 to 1) according to the position in the image of each region T, and the integration result is the average luminance value of the input image data. Yav may be used. It is assumed that this weighting factor gives a larger value to the region T closer to the center of the image. In addition, the sum of the weighting coefficients given to each region T is set to 1.
上記のように補正基準輝度Ysと輝度平均値Yavとを算出したら、コンピュータ20は、入力画像データに対して明るさ補正を行うための明るさ補正量ΔYを式(5)のように求める。
ΔY=αy(Ys−Yav) …(5)
αyは、明るさ補正に対して設定された重み付け係数であり、かかる重み付け係数も補正目標値24bとともにHD24等の所定の記憶媒体に記録されている。
以上の処理によって、S360における補正量計算(記憶色(緑色)補正と、記憶色(空色)補正と、記憶色(肌色)補正と、記憶色(赤色)補正と、人顔補正と、明るさ補正とを行なう場合の各補正量の計算)が終了する。
After calculating the correction reference luminance Ys and the average luminance value Yav as described above, the
ΔY = αy (Ys−Yav) (5)
αy is a weighting coefficient set for brightness correction, and the weighting coefficient is also recorded in a predetermined storage medium such as the
Through the above processing, correction amount calculation (memory color (green) correction, memory color (sky blue) correction, memory color (skin color) correction, memory color (red) correction, human face correction, brightness, and brightness) in S360. The calculation of each correction amount when performing correction) is completed.
ここで、入力画像データの輝度平均値Yavを求める際に画像の略中央領域の輝度を重視したのは以下の理由による。画像の略中央領域には、例えば人物の顔など画像の中でも特に重要なものが表されていることが多い。従って、重要な被写体が表されている可能性の高い略中央領域の輝度を縁領域の輝度よりも重視してその入力画像データの明るさ(輝度平均値Yav)を求めることで、補正対象の画像にとって最適な明るさ補正量ΔYを得ることができる。また、逆光条件で撮影された画像のように、画像の中央部分が暗く中央部分の周囲が明るい画像の場合、中央部分の輝度を重視した補正量ΔYを設定することにより、暗い中央部分の明るさを上昇させる最適な明るさ補正を行なうことができる。 Here, the reason why the luminance of the substantially central region of the image is emphasized when obtaining the luminance average value Yav of the input image data is as follows. In the approximate center region of the image, for example, a particularly important image is often represented, for example, a human face. Accordingly, the luminance of the input image data (luminance average value Yav) is calculated by placing importance on the luminance of the substantially central region where an important subject is likely to be represented rather than the luminance of the edge region. An optimum brightness correction amount ΔY for the image can be obtained. Also, when the image is dark in the center part and bright around the center part, such as an image taken under backlight conditions, the brightness of the dark center part is set by setting a correction amount ΔY that emphasizes the brightness of the center part. It is possible to perform optimum brightness correction that increases the brightness.
S370では、コンピュータ20は、補正量に応じた補正度合いを持つ補正用LUTを生成する。例えば補正用LUTとしてトーンカーブを生成する。上記S360においてRGB毎の補正量を算出している場合は、RGB別のトーンカーブを生成する。上述した例では、RGB毎の補正量として、記憶色(緑色)の補正量ΔRg、ΔGg、ΔBg、記憶色(空色)の補正量ΔRb、ΔGb、ΔBb、記憶色(肌色)の補正量ΔRs、ΔGs、ΔBs、記憶色(赤色)の補正量ΔRr、ΔGr、ΔBr、人顔補正を行なうための補正量ΔRf、ΔGf、ΔBfを算出した。その為、コンピュータ20は、各補正量をRGB毎別に積算し、積算後の値をRGB毎の総合的な補正量ΔR、ΔG、ΔBとする。つまりこの場合、ΔR=ΔRg+ΔRb+ΔRs+ΔRr+ΔRf、ΔG=ΔGg+ΔGb+ΔGs+ΔGr+ΔGf、ΔB=ΔBg+ΔBb+ΔBs+ΔBr+ΔBf、となる。そして、上記補正量ΔR、ΔG、ΔBに応じたトーンカーブをそれぞれ生成する。
In S370, the
図13はトーンカーブの一例を示している。同図に示したトーンカーブCは、要素色Rについて入力階調値(0〜255)を出力階調値(0〜255)に補正するLUTの例であり、そのカーブの度合いを、上記補正量ΔRに応じて決定することにより生成されている。つまり、図中に示した入力階調値=出力階調値となる直線グラフF上の所定のコントロールポイントCPに補正量ΔRを加算する補正を施し、補正後のコントロールポイントCP´と直線グラフFの両端とを含むような曲線をスプライン補間を用いて算出し、算出した曲線をトーンカーブCとしている。コントロールポイントCPの位置は特に限られないが、例えば、補正量が正の値である場合には、入力階調範囲の中間値(128)より低階調側の一の入力階調値に対応する直線グラフF上の位置をコントロールポイントCPとし、補正量が負の値である場合には、上記中間値よりも高階調側の一つの入力階調値に対応する直線グラフF上の位置をコントロールポイントCPとすることができる。むろん、上記S350で変換した後の統計データのRGBの各階調値に基づいてコントロールポイントCPを決定してもよい。コンピュータ20は、このようにして、要素色GおよびBについてのトーンカーブもそれぞれ生成する。
また、上述したように明るさ補正のための補正量ΔYをも算出済みである場合には、このΔYに応じたトーンカーブも生成し、これを明るさ補正用LUTとする。
FIG. 13 shows an example of a tone curve. The tone curve C shown in the figure is an example of an LUT that corrects the input tone value (0 to 255) to the output tone value (0 to 255) for the element color R, and the degree of the curve is adjusted as described above. It is generated by determining according to the amount ΔR. That is, correction is performed by adding the correction amount ΔR to a predetermined control point CP on the straight line graph F where the input gradation value = output gradation value shown in the figure, and the corrected control point CP ′ and the straight line graph F are corrected. A curve including both ends of the curve is calculated using spline interpolation, and the calculated curve is set as a tone curve C. The position of the control point CP is not particularly limited. For example, when the correction amount is a positive value, it corresponds to one input gradation value lower than the intermediate value (128) of the input gradation range. If the position on the straight line graph F is the control point CP and the correction amount is a negative value, the position on the straight line graph F corresponding to one input gradation value on the higher gradation side than the intermediate value is set. It can be a control point CP. Of course, the control point CP may be determined based on the RGB gradation values of the statistical data after the conversion in S350. In this way, the
If the correction amount ΔY for brightness correction has already been calculated as described above, a tone curve corresponding to this ΔY is also generated and used as the brightness correction LUT.
S380では、コンピュータ20は、入力画像データの色空間を必要に応じて、出力色空間に変換する。かかる変換処理は、入力色空間と出力色空間とが異なる場合にのみ行い、入力色空間と出力色空間とが同じである場合には当該S380の処理はスキップする。コンピュータ20は、上記S100とS300において入力色空間の種別と出力色空間の種類とをそれぞれ判別済みである。そのため、かかる判別結果を参考にして、例えば、入力色空間がsRGB色空間で、出力色空間がwRGB色空間である場合には、コンピュータ20はsRGB色空間をwRGB色空間に変換する変換プロファイルをHD24等の所定の記憶媒体から読み出し、当該読み出した変換プロファイルを用いて入力画像データの各画素のRGBデータを出力色空間におけるRGBデータに変換する。逆に、入力色空間がwRGB色空間で、出力色空間がsRGB色空間である場合には、コンピュータ20はwRGB色空間をsRGB色空間に変換する変換プロファイルをHD24等の所定の記憶媒体から読み出し、当該読み出した変換プロファイルを用いて入力画像データの各画素のRGBデータを出力色空間におけるRGBデータに変換する。
In S380, the
S390では、コンピュータ20は、出力色空間において表現された入力画像データを対象として、各画素のRGBの階調値を上記S370で生成したRGB毎の補正用LUTに入力することにより補正する。また、明るさ補正用LUTを生成済みの場合は、各画素の輝度Yを明るさ補正用LUTに入力することにより補正する。
S400では、コンピュータ20は、上記S310において決定した補正種類にかかる全ての補正を施した後の画像データを出力し、図10の処理を終了する。
In S390, the
In S400, the
ここで、図9に示した各種統計データのうち、低彩度色についての統計データや、ヒストグラムの最大値を表した統計データ等についても、以下のように入力画像データの補正に用いることができる。
低彩度色についての統計データ(Labデータ)は、黒色や白色など彩度が低い所定の色域に属する画素群に基づいて算出したRGB毎の平均値を変換したものである。従って、この低彩度色についての統計データ(Labデータ)を出力色空間上のRGBデータに変換したときに、そのRGB間にずれがある場合、入力画像データのカラーバランスにずれが生じていると言える。そこで、コンピュータ20は、上記S310においてカラーバランス補正を行なうことを決定した場合には、低彩度色についての統計データ(Labデータ)を出力色空間上のRGBデータに変換し、当該変換後のRGBデータにおけるRGB間のずれ量(例えば、Gに対するRの差分、およびGに対するBの差分)を算出し、当該算出した差分を打ち消すように、入力画像データの各画素のRGBをそれぞれ補正することにより、入力画像データのカラーバランスを整えるとしてもよい。
Here, among the various statistical data shown in FIG. 9, statistical data for low saturation colors, statistical data representing the maximum value of the histogram, and the like are also used for correction of the input image data as follows. it can.
The statistical data (Lab data) for the low saturation color is obtained by converting an average value for each RGB calculated based on a pixel group belonging to a predetermined color gamut having a low saturation such as black or white. Therefore, when the statistical data (Lab data) for the low saturation color is converted into RGB data in the output color space, if there is a shift between the RGB, the color balance of the input image data is shifted. It can be said. Therefore, if the
また、上記ヒストグラムの最大値を表した統計データ(Labデータ)を出力色空間上のRGBデータに変換したときに、そのRGB間にずれがある場合、入力画像データのRGBの各最大値のずれ、つまりホワイトバランスにずれが生じていると言える。そこで、コンピュータ20は、上記S310においてホワイトバランス補正を行なうことを決定した場合には、上記ヒストグラムの最大値を表した統計データ(Labデータ)を出力色空間上のRGBデータに変換し、当該変換後のRGBデータにおけるRGB間のずれ(例えば、RGB共通の最大値として設定した所定の基準階調値に対するRGB各々の差分)を求める。そして、かかる差分に基づいて、入力画像データのRGBの各最大値が略一致するように補正を行なうことにより、入力画像データのホワイトバランスを整えるとしてもよい。
なお、カラーバランス補正およびホワイトバランス補正は、RGB間のずれを是正する補正であるので、かかる補正に対する目標値というものは存在しない。
Further, when the statistical data (Lab data) representing the maximum value of the histogram is converted into RGB data in the output color space, if there is a shift between the RGB, the shift of each RGB maximum value of the input image data In other words, it can be said that there is a deviation in white balance. Therefore, if the
Note that the color balance correction and the white balance correction are corrections for correcting a deviation between RGB, and therefore there is no target value for such correction.
(5)変形例
ここで、上記色域定義情報24aの内容は、補正目標値24bに基づいて生成するようにしてもよい。上述したように、コンピュータ20は補正目標値24bの一種として、各記憶色の目標値をLabデータの形式でそれぞれ有している。そこで、コンピュータ20は、各記憶色の目標値のLab空間における座標位置を中心として記憶色毎に図3に示すような所定大きさの立体を規定し、かかる立体を明度L、彩度C、色相hの各範囲によって定義した情報を各記憶色についての色域定義情報24aとしてHD24に保存するとしてもよい。このように色域定義情報24aを補正目標値24bに基づいて生成すれば、入力画像データの画素のうち、記憶色補正のための統計データの生成元となる画素を正確に抽出することができる。
(5) Modification Here, the content of the color
また、機器非依存色空間における情報として保存する統計データの利用方法は、上述した例以外にも種々考えられる。
例えばコンピュータ20は、画像のシーンが共通する入力画像データ(例えば、風景画の画像データ)を複数画像分取得し、各入力画像データについての統計データをそれぞれ生成するとともに、各入力画像データから生成した統計データを要素色別かつ種類別にそれぞれ平均化し、当該平均化後の統計データを、風景画についての標準的な統計データとしてHD24等の所定の記憶媒体に保存してもよい。この風景画についての標準的な統計データは、風景画を補正するときの汎用的な統計データとなる。むろんコンピュータ20は、風景画以外にも、人物画や夜景画など、各種シーン別の標準的な統計データをそれぞれ求めておくことが可能である。
Various methods of using statistical data stored as information in the device-independent color space can be considered other than the above-described examples.
For example, the
そしてコンピュータ20は、各シーン別の標準的な統計データの取得後は、補正対象となる入力画像データを入力した場合、当該入力画像データのシーンを判別し、該当するシーンに対応する標準的な統計データを読み出す。入力画像データのシーン判別は、上述したように、入力画像データのヘッダに記述された情報や、所定のシーン判別用のプログラムや、UIを介したユーザによるシーンの指定によって行なうことが可能である。そして、読み出した標準的な統計データと上記補正目標値24bとの比較結果に応じて補正量を計算し、この計算した補正量に応じた補正処理を行なう。この結果コンピュータ20は、新たに補正対象とした入力画像データについて、記憶色画素の抽出や、統計データの生成を行なうことなく、そのシーンの種類に応じた最適な補正を行うことが可能となる。
Then, after acquiring the standard statistical data for each scene, the
さらにコンピュータ20は、各シーン別の標準的な統計データを、持ち運び可能な各種記憶媒体や通信回線を介して、プリンタ31やディスプレイ32などの各画像出力装置に提供するとしてもよい。その結果、プリンタ31やディスプレイ32の側においても、各シーン別の標準的な統計データを用いて、各シーンに応じた適切な補正量の計算を行い、その補正量に応じた補正を施した後の画像データに基づく印刷や映像表示を行なうことができる。このような場合でも、統計データは機器非依存色空間の情報として提供されるため、各画像出力装置の側で必要に応じて色空間変換することにより容易に取り扱うことができ、汎用性が高い。
Further, the
(6)まとめ
このように本発明によれば、記憶色の範囲を機器非依存色空間において定義した色域定義情報24aを保持しておき、入力画像データから記憶色画素の抽出を行なう際に、色域定義情報24aが定義する色域を入力画像データの色空間に依存する色域に変換する。つまり、入力画像データの色空間がsRGB色空間やwRGB色空間のように異なる状況においても、ある記憶色について定義された色域定義情報24aを入力画像データの色空間に合わせた色域に変換する。そのため、入力画像データの色空間の違いに依らず常に記憶色に該当する画素を正確に抽出することができる。また、従来のように入力画像データが採用し得る色空間毎に色域定義情報を予め用意しておく必要もなくなる。
(6) Summary As described above, according to the present invention, the color
また本発明による色域の変換処理は、色域定義情報24aが定義する色域の外郭上の所定数の座標を入力画像データの色空間に依存する情報に変換するだけなので、入力画像データについて全画素を色域定義情報の表色系への変換を行なっていた場合と比較して、演算処理量が格段に減少し、画素抽出に要する時間を大きく短縮することができる。特に、色域定義情報24aが定義する色域を構成する面毎に1つの座標点を入力画像データの色空間に依存する情報に変換するだけなので、演算処理量は非常に少ない。
また、ある色空間で定義した色域を他の色空間に変換して表現する場合、変換後の色域の形状が大きく歪んでしまうことが有り得るが、本実施形態では、変換対象となる変換基準点Pを、色域定義情報24aの色域を構成する面毎の中心位置としている。そのため、変換後の座標点によって区画される色域に大きな歪みが生じることが防止され、その結果、記憶色にかかる画素のより正確な抽出が実現できる。
The color gamut conversion processing according to the present invention only converts a predetermined number of coordinates on the outline of the color gamut defined by the color
Also, when expressing a color gamut defined in a certain color space by converting it to another color space, the shape of the color gamut after conversion may be greatly distorted, but in this embodiment, the conversion to be converted The reference point P is set as the center position for each surface constituting the color gamut of the color
また本発明では、入力画像データから各種統計データを算出する際は色空間を維持した状態で算出し、この算出した統計データを機器非依存色空間の情報に変換して所定の記憶媒体に保存するようにした。従って、この保存した統計データは、補正量計算の際に用いられる作業用色空間(出力色空間)がsRGB色空間やwRGB色空間のように異なっても必要に応じて色空間変換して使用可能な、汎用性の高い情報であると言える。また、統計データを取得するにあたり、従来のように前もって入力画像データそのものを作業用色空間の情報に変換する作業が不要となり、必要となる色空間変換作業は、限られた情報量である統計データを機器非依存色空間の情報に変換することだけである。そのため、統計データを得るまでに要する演算処理量および時間が従来と比較して大幅に削減される。また、統計データの取得過程で、作業用色空間(出力色空間)の種別を判断する手間が不要となるため、その分においても統計データの取得処理が迅速化される。 Further, in the present invention, when calculating various statistical data from the input image data, the calculation is performed while maintaining the color space, and the calculated statistical data is converted into information on the device-independent color space and stored in a predetermined storage medium. I tried to do it. Therefore, the stored statistical data is used after color space conversion if necessary even if the work color space (output color space) used for calculating the correction amount is different as in the sRGB color space or the wRGB color space. It can be said that the information is highly versatile. In addition, the acquisition of statistical data eliminates the need to convert the input image data itself into work color space information as in the prior art, and the required color space conversion work requires a limited amount of information. It just converts the data into device-independent color space information. Therefore, the calculation processing amount and time required to obtain statistical data are greatly reduced as compared with the conventional case. In addition, since it is not necessary to determine the type of work color space (output color space) in the process of acquiring statistical data, the process of acquiring statistical data can be accelerated.
また、入力画像データを作業用色空間上の情報に変換すると、同じ入力画像データを同じ変換規則(変換プロファイル)に従って変換する場合であっても、変換処理を実行するAPL25が動作するプラットフォーム等の違いによって、変換結果が異なり得る。このように変換結果が異なると、当然にその変換結果に基づいて得られる統計データの内容も異なる結果となってしまう。従って、統計データの取得に際してはできるだけ入力画像データの色空間を維持した状態で行なうことが望ましい。本発明によれば、入力画像データから統計データを算出する際は色空間を維持した状態で算出を行なうため、統計データを算出する前に入力画像データを作業用色空間に変換していたことにより生じ得た統計データの誤差が無くなる。
Further, when the input image data is converted into information on the working color space, even if the same input image data is converted according to the same conversion rule (conversion profile), the platform on which the
また本発明では、統計データとの比較対象となる補正目標値24bを、機器非依存色空間において定義し、補正量計算の際には、補正目標値24bを出力色空間上の情報に変換する。従って、出力色空間がsRGB色空間やwRGB色空間のように異なる状況においても、補正目標値24bを出力色空間上の情報に変換することにより、正確な補正量計算を行うことが可能となる。また従来のように、採用し得る出力色空間毎に補正目標値24bを予め用意しておく煩雑さが解消され、かつメモリ資源の節約にもつながる。
In the present invention, the
20…コンピュータ、21…CPU、22…ROM、23…RAM、24…ハードディスク、24a…色域定義情報、24b…補正目標値、24c…統計データ、25…APL、25a…画像データ取得部、25b…画素抽出部、25c…統計データ取得部、25c1…統計データ生成部、25c2,25d2…統計データ変換部、25d…補正量取得部、25d1…目標値変換部、25d3…補正量決定部、25e…補正部
DESCRIPTION OF
Claims (8)
機器非依存色空間において定義された、上記統計値に対する目標値を取得するとともに、当該目標値を上記出力色空間における情報に変換する目標値変換手段と、
上記統計値取得手段が取得した統計値と上記変換後の情報との比較に基づいて、上記入力画像データに対する補正量を決定する補正量決定手段とを備えることを特徴とする画像処理装置。 Statistical value acquisition means for acquiring a statistical value that is a predetermined statistical value of input image data and expressed by a predetermined output color space;
Target value conversion means for acquiring a target value for the statistical value defined in the device-independent color space and converting the target value into information in the output color space;
An image processing apparatus comprising: a correction amount determination unit that determines a correction amount for the input image data based on a comparison between the statistical value acquired by the statistical value acquisition unit and the converted information.
上記目標値変換手段は、機器非依存色空間において定義された上記記憶色の目標値を上記出力色空間における情報に変換し、
上記補正量決定手段は、上記記憶色にかかる統計値と、上記記憶色の目標値の変換後の情報との比較に基づいて補正量を決定することを特徴とする請求項1に記載の画像処理装置。 The statistical value acquisition means extracts a pixel belonging to a color gamut of a specific memory color from each pixel constituting the input image data, acquires a statistical value generated based on the extracted pixel group,
The target value converting means converts the target value of the memory color defined in the device-independent color space into information in the output color space,
The image according to claim 1, wherein the correction amount determination unit determines a correction amount based on a comparison between a statistical value relating to the memory color and information after conversion of the target value of the memory color. Processing equipment.
上記目標値変換手段は、機器非依存色空間において定義された人顔の色の目標値を上記出力色空間における情報に変換し、
上記補正量決定手段は、上記人顔にかかる統計値と、上記人顔の目標値の変換後の情報との比較に基づいて補正量を決定することを特徴とする請求項1〜請求項3のいずれかに記載の画像処理装置。 The statistical value acquisition means detects a human face present in the input image data, acquires a statistical value generated based on a pixel group in a human face region,
The target value conversion means converts the target value of the human face color defined in the device-independent color space into information in the output color space,
The correction amount determination means determines a correction amount based on a comparison between a statistical value relating to the human face and information after conversion of the target value of the human face. An image processing apparatus according to any one of the above.
上記目標値変換手段は、機器非依存色空間において定義された所定の明るさ目標値を上記出力色空間における情報に変換し、
上記補正量決定手段は、上記明るさを表現する統計値と、上記明るさ目標値の変換後の情報との比較に基づいて補正量を決定することを特徴とする請求項1〜請求項4のいずれかに記載の画像処理装置。 The statistical value acquisition means acquires a statistical value representing the brightness of the input image data,
The target value conversion means converts a predetermined brightness target value defined in the device-independent color space into information in the output color space,
The correction amount determination means determines the correction amount based on a comparison between a statistical value representing the brightness and information after the conversion of the brightness target value. An image processing apparatus according to any one of the above.
機器非依存色空間において定義された、上記統計値に対する目標値を取得するとともに、当該目標値を上記出力色空間における情報に変換する目標値変換工程と、
上記統計値取得工程にて取得した統計値と上記変換後の情報との比較に基づいて、上記入力画像データに対する補正量を決定する補正量決定工程とを備えることを特徴とする画像処理方法。 A statistical value acquisition step of acquiring a predetermined statistical value of the input image data and expressing the statistical value expressed by a predetermined output color space;
A target value conversion step for obtaining a target value for the statistical value defined in the device-independent color space and converting the target value into information in the output color space;
An image processing method comprising: a correction amount determination step of determining a correction amount for the input image data based on a comparison between the statistical value acquired in the statistical value acquisition step and the converted information.
機器非依存色空間において定義された、上記統計値に対する目標値を取得するとともに、当該目標値を上記出力色空間における情報に変換する目標値変換機能と、
上記統計値取得機能によって取得した統計値と上記変換後の情報との比較に基づいて、上記入力画像データに対する補正量を決定する補正量決定機能とをコンピュータに実行させることを特徴とする画像処理プログラム。 A statistical value acquisition function for acquiring predetermined statistical values of the input image data and expressing the statistical values expressed by a predetermined output color space;
A target value conversion function for obtaining a target value for the statistical value defined in the device-independent color space and converting the target value into information in the output color space;
An image processing that causes a computer to execute a correction amount determination function that determines a correction amount for the input image data based on a comparison between the statistical value acquired by the statistical value acquisition function and the converted information. program.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2007085472A JP2008245117A (en) | 2007-03-28 | 2007-03-28 | Image processor, processing method, and processing program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2007085472A JP2008245117A (en) | 2007-03-28 | 2007-03-28 | Image processor, processing method, and processing program |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2008245117A true JP2008245117A (en) | 2008-10-09 |
Family
ID=39915859
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2007085472A Pending JP2008245117A (en) | 2007-03-28 | 2007-03-28 | Image processor, processing method, and processing program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2008245117A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112991286A (en) * | 2021-03-05 | 2021-06-18 | 浙江大华技术股份有限公司 | Image statistical data detection method, device and computer readable storage medium |
-
2007
- 2007-03-28 JP JP2007085472A patent/JP2008245117A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112991286A (en) * | 2021-03-05 | 2021-06-18 | 浙江大华技术股份有限公司 | Image statistical data detection method, device and computer readable storage medium |
CN112991286B (en) * | 2021-03-05 | 2024-04-26 | 浙江大华技术股份有限公司 | Image statistical data detection method, device and computer readable storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4424518B2 (en) | Image processing apparatus, image processing method, and image processing program | |
JP4424216B2 (en) | Image processing apparatus, image processing method, and image processing program | |
JP4666274B2 (en) | Color image processing apparatus and method | |
US8213733B2 (en) | Image processing apparatus, image processing method, computer program and storage medium | |
US8363125B2 (en) | Image processing apparatus, image processing method, and computer program product | |
US9055263B2 (en) | Apparatus, method and computer program for correcting an image using lookup tables generated by inputted image analysis | |
US20080112026A1 (en) | Color processing apparatus and method, and storage medium storing color processing program | |
US8477366B2 (en) | Apparatus, method and medium outputting wide gamut space image | |
JP2009055465A (en) | Image processing device and method | |
US8064693B2 (en) | Methods of and apparatus for adjusting colour saturation in an input image | |
JP2000224607A (en) | Image processor | |
JP4788393B2 (en) | Image processing apparatus, image processing method, and image processing program | |
JP2014033273A (en) | Color gamut conversion device, digital camera, color gamut conversion program, and color gamut conversion method | |
US6580822B1 (en) | Device, method and record medium for color space conversion from RGB data to CMYK data | |
US8873108B2 (en) | Image processing apparatus and image processing method | |
US20100328343A1 (en) | Image signal processing device and image signal processing program | |
JP4461164B2 (en) | Color conversion apparatus and color conversion method | |
JP2008245117A (en) | Image processor, processing method, and processing program | |
JP2008245116A (en) | Image processor, processing method, and processing program | |
JP2007195015A (en) | Color conversion apparatus, method, and program | |
JPH08275010A (en) | Method and device for image processing | |
JP2008227959A (en) | Image processing device, image processing method and image processing system | |
JP2008227958A (en) | Image processing device, image processing method and image processing program | |
JP2004112494A (en) | Image processor, image processing method and recording medium | |
JP2002094826A (en) | Image processing unit, image forming unit and method for processing image |