JP2019165398A - Image processing apparatus, image processing method and program - Google Patents
Image processing apparatus, image processing method and program Download PDFInfo
- Publication number
- JP2019165398A JP2019165398A JP2018053028A JP2018053028A JP2019165398A JP 2019165398 A JP2019165398 A JP 2019165398A JP 2018053028 A JP2018053028 A JP 2018053028A JP 2018053028 A JP2018053028 A JP 2018053028A JP 2019165398 A JP2019165398 A JP 2019165398A
- Authority
- JP
- Japan
- Prior art keywords
- color
- image
- profile
- image processing
- processing apparatus
- 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
- 238000003672 processing method Methods 0.000 title claims 3
- 238000006243 chemical reaction Methods 0.000 claims abstract description 84
- 238000011156 evaluation Methods 0.000 claims description 24
- 230000035945 sensitivity Effects 0.000 claims description 18
- 238000003384 imaging method Methods 0.000 abstract description 11
- 230000001419 dependent effect Effects 0.000 abstract description 10
- 238000000034 method Methods 0.000 description 53
- 239000011159 matrix material Substances 0.000 description 7
- 238000010586 diagram Methods 0.000 description 5
- 230000014509 gene expression Effects 0.000 description 4
- 239000003086 colorant Substances 0.000 description 3
- 230000007423 decrease Effects 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 230000009466 transformation Effects 0.000 description 2
- 238000005286 illumination Methods 0.000 description 1
- 230000001502 supplementing effect Effects 0.000 description 1
- 238000002834 transmittance Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Images
Landscapes
- Image Processing (AREA)
- Color Television Image Signal Generators (AREA)
- Color Image Communication Systems (AREA)
Abstract
Description
本発明は、デジタル撮像装置で撮影したカラー画像データの色変換技術に関する。 The present invention relates to a color conversion technique for color image data photographed by a digital imaging device.
デジタルスチルカメラなどのデジタル撮像装置が広く普及している。デジタル撮像装置は、CCDやCMOSセンサなどの光電荷変換素子(撮像素子)で受光した光をデジタル信号に変換することでカラー画像データを生成する。撮像素子には透過率の異なるカラーフィルタが規則的に配置され、各画素に特定の波長光を入射する構成となっている。こうして得られる画像データ(以下、「RAW画像データ」)と呼ぶ。)における画素値は、カラーフィルタの配置に従うことになる。このRAW画像データに対して色補正や画素補間などの一連の画像処理が施されて、RGB画像データなどの一般的なカラー画像データが得られる。ここで、一般的なデジタル撮像装置で得られるRGB画像データの画素値(RGB値)は、使用されるカラーフィルタの特性に依存する色信号値(=デバイス依存の色信号値)である。そのため、XYZ、L*a*b*、sRGBといった標準的な色空間の規格に準拠した色信号値(=デバイス非依存の色信号値)に変換する必要がある。一般にこの変換処理には、カラープロファイルと呼ばれる各デバイスの色特性を記録したデータが用いられる。カラープロファイルは、複数の色を有するカラーチャートを所定の条件で撮影することで得られるデバイス依存の色信号値と、測色器で測定したデバイス非依存の色信号値との対応関係に基づいて作成される。予め用意されたカラープロファイルを参照することで、デバイス依存の色信号値がデバイス非依存の色信号値に変換される。ここで、正確な色変換結果を得るには、カラープロファイル作成時に想定している撮影条件と、実際に被写体を撮影した時の撮影条件との間にズレがないことが重要になる。この点、特許文献1には、複数の露出条件でカラープロファイルを作成・保持しておき、実際に被写体を撮影した時の露出条件と合致するカラープロファイルを適用することで、精度の良い色変換を実現する技術が提案されている。 Digital imaging devices such as digital still cameras are widely used. A digital imaging device generates color image data by converting light received by a photoelectric charge conversion device (imaging device) such as a CCD or CMOS sensor into a digital signal. Color filters having different transmittances are regularly arranged on the image sensor, and light having a specific wavelength is incident on each pixel. This is referred to as image data (hereinafter, “RAW image data”) obtained. ) Will follow the arrangement of the color filters. A series of image processing such as color correction and pixel interpolation is performed on the RAW image data, and general color image data such as RGB image data is obtained. Here, the pixel value (RGB value) of the RGB image data obtained by a general digital imaging device is a color signal value (= device-dependent color signal value) depending on the characteristics of the color filter used. Therefore, it is necessary to convert to color signal values (= device-independent color signal values) compliant with standard color space standards such as XYZ, L * a * b *, and sRGB. In general, data for recording color characteristics of each device called a color profile is used for this conversion process. The color profile is based on a correspondence relationship between a device-dependent color signal value obtained by photographing a color chart having a plurality of colors under a predetermined condition and a device-independent color signal value measured by a colorimeter. Created. By referring to a color profile prepared in advance, a device-dependent color signal value is converted into a device-independent color signal value. Here, in order to obtain an accurate color conversion result, it is important that there is no deviation between the shooting conditions assumed when the color profile is created and the shooting conditions when the subject is actually shot. In this regard, in Patent Document 1, color profiles are created and held under a plurality of exposure conditions, and a color profile that matches the exposure conditions when the subject is actually photographed is applied. A technique for realizing the above has been proposed.
上記特許文献1の技術によって高精度の色変換を行うためには、あらゆる露出条件に対応するカラープロファイルを予め作成し、メモリ等に保持しておく必要がある。しかしながら、露出条件の組合せは膨大であり、そのようなカラープロファイルの作成には莫大な手間と時間が掛かる。また、膨大な数のカラープロファイルを記憶するには膨大なメモリ容量が要求される。 In order to perform high-accuracy color conversion using the technique disclosed in Patent Document 1, it is necessary to create a color profile corresponding to any exposure condition in advance and store it in a memory or the like. However, the combination of exposure conditions is enormous, and creating such a color profile takes enormous effort and time. Also, a huge memory capacity is required to store a huge number of color profiles.
そこで本発明は、膨大な数のカラープロファイルを予め用意することなく、高精度の色変換を実現することを目的とする。 Therefore, an object of the present invention is to realize highly accurate color conversion without preparing an enormous number of color profiles in advance.
本発明に係る画像処理装置は、カラープロファイルを用いて入力画像を色変換する画像処理装置であって、前記入力画像を撮影した時の撮影パラメータと、前記カラープロファイル作成時に想定した撮影パラメータとの違いに基づいて、ゲイン補正の補正量を決定する決定手段と、前記ゲイン補正の補正量と前記カラープロファイルに基づいて、前記入力画像を色変換することで得られる色変換後画像を出力する出力手段と、を備えることを特徴とする。 An image processing apparatus according to the present invention is an image processing apparatus for color-converting an input image using a color profile, and includes an imaging parameter when the input image is captured and an imaging parameter assumed when the color profile is created. A determination means for determining a correction amount for gain correction based on the difference, and an output for outputting a color-converted image obtained by color-converting the input image based on the correction amount for gain correction and the color profile And means.
本発明によれば、膨大な数のカラープロファイルを予め用意しなくても、デバイス依存の色信号値をデバイス非依存の色信号値に精度よく変換することが可能となる。 According to the present invention, it is possible to accurately convert device-dependent color signal values to device-independent color signal values without preparing a huge number of color profiles in advance.
以下、本発明の実施形態について、図面を参照して説明する。なお、以下の実施形態は本発明を限定するものではなく、また、本実施形態で説明されている特徴の組み合わせの全てが本発明の解決手段に必須のものとは限らない。 Hereinafter, embodiments of the present invention will be described with reference to the drawings. The following embodiments do not limit the present invention, and all the combinations of features described in the present embodiment are not necessarily essential to the solution means of the present invention.
図1は、画像処理装置100のハードウェア構成の一例を示す図である。画像処理装置100は、CPU101、RAM102、HDD103、汎用インターフェース(I/F)104、モニタ108、メインバス109を備える。汎用I/F104は、デジタル撮像装置105、マウスやキーボードなどの入力装置106、メモリカードなどの外部メモリ107をメインバス109に接続する。そして、図2は、本実施形態に係る、画像処理装置100のソフトウェア構成を示す機能ブロック図であり、色処理条件決定部201、ゲイン補正部202、色変換部203、定義域外判定部204及び表示制御部205で構成される。これら各部は、CPU101がHDD103に格納された所定のプログラムをRAM102に展開しこれを実行することで実現される。また、HDD103には1又は複数のカラープロファイル210やRGB画像211のデータなどが記憶される。前述のとおり、カラープロファイルは、デバイス依存の色信号値をデバイス非依存の色信号値へと変換する色変換処理の際に参照されるデータである。図3は、デバイス依存のRGB値(8ビット)をデバイス非依存のLab値に変換する、3D-LUTのカラープロファイルの一例である。なお、Labとは、明度を表すL軸、色度を表すa軸とb軸の3つの要素で構成される、CIE(国際照明委員会)が定めたL*a*b*色空間を意味する。図3の3D−LUTは、RGBをLabに変換するカラープロファイルであるが、RGBからXYZへの変換、RGBからsRGBへの変換についても同様のカラープロファイルを作成可能である。以下では、カラープロファイルを単に「プロファイル」と表記することとする。そして、本実施形態では、このようなプロファイルが、様々な露出条件と対応付けて複数用意される。すなわち、シャッタスピード、絞り値、ISO感度といった露出の決定に関わる撮影パラメータをそれぞれ複数段階で異ならせたときのプロファイルを別々に作成し、HDD103等に保持しておく。これら予め用意・保持された1つ以上のプロファイル210を、色変換処理で実際に適用するプロファイルの候補という意味で、「候補プロファイル」と呼ぶこととする。
FIG. 1 is a diagram illustrating an example of a hardware configuration of the
本実施形態に係る画像処理の対象となる画像データは、デジタル撮像装置105や外部メモリ107から入力され、図4に示すフローチャートに沿って処理される。もちろん、入力された画像データをHDD103などの記憶装置に一旦記憶しておき、ユーザの指示に従いそれを読み出して処理してもよい。以下、図4のフローに沿って、本実施形態に係る色変換処理を中心とする画像処理について説明する。なお、以下の説明における記号「S」はステップを表す。
Image data to be subjected to image processing according to the present embodiment is input from the
S401では、候補プロファイルと、処理対象となる画像データが入力される。ここで処理対象となる画像データは、RAW画像データに対して所定の画像処理が施された、各画素がデバイス依存のRGBそれぞれ8ビット(0〜255)の画素値を持つRGB画像データである。また、入力される候補プロファイルの数は、上述のとおり、1つでもよいし複数でもよい。すなわち、被写体を撮影する際の予想される露出条件に合わせた特定のプロファイルが1つだけ用意されている場合はそれが入力され、複数の露出条件に対応できるよう候補プロファイルが複数用意されている場合はそれらの全部又は一部が入力される。入力されたRGB画像データは、色処理条件決定部201とゲイン補正部202に送られる。また、入力された候補プロファイルは、色処理条件決定部201に送られる。
In S401, a candidate profile and image data to be processed are input. Here, the image data to be processed is RGB image data in which predetermined image processing is performed on the RAW image data, and each pixel has a pixel value of 8 bits (0 to 255) for each device-dependent RGB. . Further, the number of candidate profiles to be input may be one or plural as described above. That is, if only one specific profile is prepared according to the expected exposure condition when photographing a subject, that profile is input, and a plurality of candidate profiles are prepared so as to correspond to a plurality of exposure conditions. In some cases, all or part of them are input. The input RGB image data is sent to the color processing
S402では、S401で入力されたRGB画像データと候補プロファイルとに基づいて、次のS403における色処理の条件が決定される。この色処理条件には、ゲイン補正処理で使用する補正量と、色変換処理で実際に適用するプロファイルの情報とが含まれる。色処理条件決定処理の詳細は後述する。 In S402, the color processing conditions in the next S403 are determined based on the RGB image data and the candidate profile input in S401. The color processing conditions include a correction amount used in the gain correction process and profile information actually applied in the color conversion process. Details of the color processing condition determination processing will be described later.
S403では、S401で入力されたRGB画像データを、S402で決定した条件に従った色処理(ゲイン補正処理+色変換処理)が実行される。色処理の詳細は後述する。 In S403, the RGB image data input in S401 is subjected to color processing (gain correction processing + color conversion processing) according to the conditions determined in S402. Details of the color processing will be described later.
S404では、S403における色変換処理の結果に基づく画像情報をモニタ108に表示する処理が実行される。この色変換結果表示処理の詳細は後述する。
In S404, a process of displaying image information on the
以上が、本実施形態に係る、画像処理装置100における色変換処理を中心とした画像処理の大まかな流れである。
The above is a general flow of image processing centering on color conversion processing in the
(色処理条件決定処理)
続いて、S402の色処理条件決定処理について詳しく説明する。この処理は、色処理条件決定部201において行われる。図5は、本実施形態に係る、色処理条件決定処理の詳細を示すフローチャートである。
(Color processing condition determination processing)
Next, the color processing condition determination process in S402 will be described in detail. This process is performed in the color processing
S501では、入力RGB画像の撮影時の撮影パラメータが取得される。デジタルカメラで撮影して得られたRAW画像データには、撮影時の露出条件、すなわち、シャッタスピード、絞り値、ISO感度といった露出に関わる撮影パラメータが、その機種名や撮影日時、レンズ焦点距離などと共に撮影画像情報として付加されている。RGB画像データにおいてもこの情報を引き継いで保持しておき、本ステップではその保持された情報の中から露出に関する撮影パラメータを取得する。ここでは、入力RGB画像の撮影パラメータとして、シャッタスピード=1/320秒、絞り値=F8、ISO感度=200が取得されたものとする。 In S501, shooting parameters at the time of shooting an input RGB image are acquired. RAW image data obtained by photographing with a digital camera includes exposure conditions at the time of photographing, that is, photographing parameters relating to exposure such as shutter speed, aperture value, ISO sensitivity, model name, photographing date, lens focal length, and the like. At the same time, it is added as photographed image information. This information is also inherited and held in the RGB image data, and in this step, shooting parameters relating to exposure are acquired from the held information. Here, it is assumed that shutter speed = 1/320 seconds, aperture value = F8, and ISO sensitivity = 200 are acquired as shooting parameters of the input RGB image.
S502では、S501で取得した撮影パラメータに基づき、色変換処理において実際に適用されるプロファイルが、S401で入力された候補プロファイルの中から決定される。ここで、露出に関わる撮影パラメータとプロファイルとの関係について説明しておく。図6(a)は、絞り値とISO感度を固定し、シャッタスピードを7段階で異ならせて7種類の候補プロファイル(profile_s1〜profile_s7)を用意した場合の対応表である。図6(b)は、シャッタスピードとISO感度を固定し、絞り値を7段階で異ならせて7種類の候補プロファイル(profile_f1〜profile_f7)を用意した場合の対応表である。図6(c)は、シャッタスピードと絞り値を固定し、ISO感度を7段階で異ならせて7種類の候補プロファイル(profile_i1〜profile_i7))を用意した場合の対応表である。候補プロファイルの数は多いほど良いが、解決課題で述べたとおり、現実には様々な制約がある。そこで、これら候補プロファイルを準備する際には、例えば図6(a)の“profile_s1”と図6(b)の“profile_f1”と図6(c)の“profile_i1”とを同じにしてもよい。プロファイルにおいては、カメラに取り込まれる光量の寄与率が大きいためである。このようにいくつかのプロファイルを共通にすることで、候補プロファイル作成の工数を削減することができる。本実施形態では、露出を決める撮影パラメータのうちシャッタスピードに基づいて、予め用意した複数の候補プロファイルの中から最適なものを実際に適用するプロファイルとして選択することとする。ここでは、図6(a)に示す7つの候補プロファイルのうち、“profile_s1”、“profile_s4”、“profile_s7”の3つを取得し、その中から適用するプロファイルを選択する場合を例に、以下説明を行うものとする。いま、入力RGB画像の撮影時のシャッタスピードが1/320秒であるのに対し、各候補プロファイルの想定シャッタスピードはprofile_s1が1/125秒、profile_s4が1/250秒、profile_s7が1/500秒である。この場合、撮影時のシャッタスピード(=1/320秒)と差分の絶対値が最小となる最も近いシャッタスピードは1/250秒である。よって、profile_s4が、色変換処理で実際に使用するプロファイルとして選択されることになる。なお、S401で入力された候補プロファイルが1つであれば、本ステップはスキップ可能である。この場合、当該候補プロファイルがそのまま色変換処理用のプロファイルとして決定される。 In S502, the profile actually applied in the color conversion process is determined from the candidate profiles input in S401 based on the shooting parameters acquired in S501. Here, the relationship between the shooting parameters related to exposure and the profile will be described. FIG. 6A is a correspondence table when seven types of candidate profiles (profile_s1 to profile_s7) are prepared by fixing the aperture value and the ISO sensitivity and changing the shutter speed in seven stages. FIG. 6B is a correspondence table when seven types of candidate profiles (profile_f1 to profile_f7) are prepared by fixing the shutter speed and ISO sensitivity and varying the aperture value in seven stages. FIG. 6C is a correspondence table when seven types of candidate profiles (profile_i1 to profile_i7)) are prepared by fixing the shutter speed and the aperture value and varying the ISO sensitivity in seven stages. The larger the number of candidate profiles, the better. However, as described in the solution problem, there are various restrictions in reality. Therefore, when preparing these candidate profiles, for example, “profile_s1” in FIG. 6A, “profile_f1” in FIG. 6B, and “profile_i1” in FIG. 6C may be the same. This is because the contribution ratio of the amount of light captured by the camera is large in the profile. Thus, by making several profiles common, the man-hours for creating candidate profiles can be reduced. In the present embodiment, an optimum one is selected as a profile to be actually applied from among a plurality of candidate profiles prepared in advance based on the shutter speed among the shooting parameters for determining the exposure. In this example, three profiles “profile_s1”, “profile_s4”, and “profile_s7” are acquired from the seven candidate profiles shown in FIG. 6A, and the profile to be applied is selected as an example. An explanation shall be given. Now, the shutter speed at the time of capturing the input RGB image is 1/220 seconds, whereas the assumed shutter speed of each candidate profile is 1/125 seconds for profile_s1, 1/250 seconds for profile_s4, and 1/500 seconds for profile_s7. It is. In this case, the closest shutter speed at which the absolute value of the difference between the shutter speed at the time of shooting (= 1/320 seconds) and the difference is minimum is 1/250 seconds. Therefore, profile_s4 is selected as a profile that is actually used in the color conversion process. If there is one candidate profile input in S401, this step can be skipped. In this case, the candidate profile is determined as a color conversion processing profile as it is.
S503では、S501で取得した入力RGB画像の撮影時の露出条件と、S502で選択された候補プロファイルで想定される露出条件とに基づき、ゲイン補正処理で使用する補正量が決定される。上述のとおり、ここでは、露出を決める撮影パラメータのうちシャッタスピードに基づいてゲイン補正量を決定することとしている。この場合、S502で選択された候補プロファイル(以下、「選択プロファイル」と呼ぶ。)の想定シャッタスピードTvprfと、入力RGB画像の撮影時シャッタスピードTvimgとに基づいて、ゲイン補正量αを算出する。具体的には、以下の式(1)からゲイン補正量αが求められる。
α=Tvprf/Tvimg ・・・式(1)
いま、Tvprf=1/250秒、Tvimg=1/320秒であるため、ゲイン補正量α=1.28となる。
S504では、S502で決定した選択プロファイルの情報が色変換部203へ、S503で決定したゲイン補正量の情報がゲイン補正部202へ、それぞれ出力される。
In S503, a correction amount to be used in the gain correction process is determined based on the exposure condition at the time of capturing the input RGB image acquired in S501 and the exposure condition assumed in the candidate profile selected in S502. As described above, here, the gain correction amount is determined based on the shutter speed among the photographing parameters that determine the exposure. In this case, the gain correction amount α is calculated based on the assumed shutter speed Tv prf of the candidate profile selected in S502 (hereinafter referred to as “selected profile”) and the shutter speed Tv img at the time of shooting the input RGB image. To do. Specifically, the gain correction amount α is obtained from the following equation (1).
α = Tv prf / Tv img (1)
Since Tv prf = 1/250 seconds and Tv img = 1/320 seconds, the gain correction amount α = 1.28.
In S504, the information of the selection profile determined in S502 is output to the
なお、本実施形態では、シャッタスピードに基づき色処理条件を決定する場合を例に説明したが、これに限定されない。絞り値やISO感度に基づき色処理条件を決定することも同様に可能である。 In this embodiment, the case where the color processing condition is determined based on the shutter speed is described as an example, but the present invention is not limited to this. It is also possible to determine the color processing conditions based on the aperture value and ISO sensitivity.
例えば、絞り値に基づく場合、そのゲイン補正量βは、入力RGB画像の撮影時絞り値Avimgと、選択プロファイルの想定絞り値Avprfとから、以下の式(2)で求めることができる。暫定
β=(Avprf/Avimg)2 ・・・式(2)
また、ISO感度に基づく場合、そのゲイン補正量γは、入力RGB画像の撮影時ISO感度ISOimgと、選択プロファイルの想定ISO感度ISOprfとから、以下の式(3)で求めることができる。
γ=ISOprf/ISOimg ・・・式(3)
さらには、上記式(1)〜式(3)を前提とした以下の式(4)に基づき、シャッタスピード、絞り値、ISO感度のいずれか2種類或いは3種類すべての撮影パラメータを用いてゲイン補正量Δを決定することも可能である。
Δ=α×β×γ ・・・式(4)
例えば、シャッタスピードを固定とし、絞り値とISO感度に基づき決定する場合には、α=1.0の定数とし、上記式(2)〜式(4)を用いてゲイン補正量Δを求めればよい。なお、ここでは数式を用いた演算によりゲイン補正量を導出する例を説明したが、各種撮影パラメータとゲイン補正量との関係を記したルックアップテーブル(LUT)を用意しておき、LUTを参照することでゲイン補正量を決定してもよい。
For example, when based on the aperture value, the gain correction amount β can be obtained from the following aperture value Av img of the input RGB image and the assumed aperture value Av prf of the selected profile by the following equation (2). Provisional β = (Av prf / Av img ) 2 ... Formula (2)
Further, when based on ISO sensitivity, the gain correction amount γ can be obtained by the following formula (3) from the ISO sensitivity ISO img at the time of shooting the input RGB image and the assumed ISO sensitivity ISO prf of the selected profile.
γ = ISO prf / ISO img (3)
Further, based on the following formula (4) based on the above formulas (1) to (3), the gain is obtained using any two or all three shooting parameters of shutter speed, aperture value, and ISO sensitivity. It is also possible to determine the correction amount Δ.
Δ = α × β × γ (4)
For example, when the shutter speed is fixed and the shutter speed is fixed and determined based on the aperture value and ISO sensitivity, α = 1.0 is set as a constant, and the gain correction amount Δ is obtained using the above equations (2) to (4). Good. Here, an example in which the gain correction amount is derived by calculation using a mathematical formula has been described. However, a lookup table (LUT) describing the relationship between various shooting parameters and the gain correction amount is prepared, and the LUT is referred to. By doing so, the gain correction amount may be determined.
以上が、本実施形態における色処理条件決定処理の内容である。
The above is the content of the color processing condition determination process in the present embodiment.
(色処理)
次に、S403の色処理について詳しく説明する。前述のとおり、ここでの色処理には、入力RGB画像のゲインを調整するゲイン補正処理と、選択プロファイルを適用してデバイス依存の色信号値をデバイス非依存の色信号値に変換する色変換処理とが含まれる。そして、ゲイン補正処理はゲイン補正部202において行われ、色変換処理は色変換部203において行われる。図7は、色処理の流れを示すフローチャートである。
(Color processing)
Next, the color processing in S403 will be described in detail. As described above, the color processing here includes gain correction processing for adjusting the gain of the input RGB image and color conversion for converting a device-dependent color signal value to a device-independent color signal value by applying a selection profile. Processing. The gain correction process is performed in the
S701では、色処理条件決定処理の結果であるゲイン補正量と選択プロファイルの情報がそれぞれ取得される。続くS702では、取得したゲイン補正量に基づき、入力RGB画像データに対してゲイン補正処理が実行される。具体的には、入力RGB画像の画素毎のRGB値それぞれに対して、取得されたゲイン補正量が乗算される。例えば、ゲイン補正量がシャッタスピードに基づき決定された場合の、ゲイン補正後の各画素のRGB値(Ra,Ga,Ba)は、以下の式(5)によって表される。
Ra=R×α
Ga=G×α
Ba=B×α ・・・式(5)
こうして、ゲイン補正が施されたRGB画像(以下、「補正後RGB画像」と呼ぶ。)が生成される。
In S701, the gain correction amount and the selection profile information, which are the results of the color processing condition determination process, are respectively acquired. In subsequent S702, a gain correction process is performed on the input RGB image data based on the acquired gain correction amount. Specifically, the acquired gain correction amount is multiplied by each RGB value for each pixel of the input RGB image. For example, when the gain correction amount is determined based on the shutter speed, the RGB value (Ra, Ga, Ba) of each pixel after gain correction is expressed by the following equation (5).
Ra = R × α
Ga = G × α
Ba = B × α (5)
In this way, an RGB image subjected to gain correction (hereinafter referred to as “corrected RGB image”) is generated.
次に、S703では、取得した選択プロファイルを適用して、S702で生成された補正後RGB画像の各画素の色信号値(Ra,Ga,Ba)が、デバイス非依存の色信号値へと変換される。この変換の手法には、前述の図3で示したLUTのプロファイルを用いる方法の他、例えば3次元の変換行列を用いた行列演算による方法がある。ここでは、補正後RGB画像が持つデバイス依存のRGBの色信号値を、3×3の変換行列のプロファイルを用いて、デバイス非依存のXYZの色信号値に変換する場合を例に説明する。 Next, in S703, the acquired selection profile is applied, and the color signal value (Ra, Ga, Ba) of each pixel of the corrected RGB image generated in S702 is converted into a device-independent color signal value. Is done. In addition to the method using the LUT profile shown in FIG. 3 described above, this conversion method includes, for example, a method based on matrix calculation using a three-dimensional conversion matrix. Here, a case will be described as an example where device-dependent RGB color signal values of the corrected RGB image are converted into device-independent XYZ color signal values using a 3 × 3 conversion matrix profile.
いま、選択プロファイルとしての3×3の変換行列Mが、以下の式(6)で表されるとする。 Now, it is assumed that a 3 × 3 transformation matrix M as a selection profile is expressed by the following equation (6).
このとき、変換後のXYZ値は、以下の式(7)によって求められる。
At this time, the XYZ value after conversion is obtained by the following equation (7).
入力RGB画像の画素値が8ビットの色信号値で表されている場合、各画素値は0から255までの整数値に限られる。そこで、入力値であるRGB値の全組み合わせについて、出力値であるXYZ値を予め上記式(7)に基づいて算出しておき、対応するRGB値との組を記述したLUTをプロファイルとして用意しておくことで、より簡便に色変換を実現できる。このとき、RGB値の全組み合わせではなく、代表的な組み合わせのみ記述したLUTを用意しておき、LUTに記述されていないRGB値に対応するXYZ値については補間演算によって導出するようにしてもよい。こうして、入力RGB画像に対して色変換処理が施された画像(以下、「色変換後画像」と呼ぶ。)が生成される。
When the pixel value of the input RGB image is represented by an 8-bit color signal value, each pixel value is limited to an integer value from 0 to 255. Therefore, for all combinations of RGB values that are input values, XYZ values that are output values are calculated in advance based on Equation (7) above, and an LUT that describes a pair with the corresponding RGB values is prepared as a profile. By doing so, color conversion can be realized more easily. At this time, an LUT describing only representative combinations instead of all combinations of RGB values may be prepared, and XYZ values corresponding to RGB values not described in the LUT may be derived by interpolation calculation. . In this way, an image obtained by performing color conversion processing on the input RGB image (hereinafter referred to as “color-converted image”) is generated.
S704では、S703で生成された色変換後画像のデータが、定義域外判定部204及び画像情報表示部205へ出力される。
In step S <b> 704, the color-converted image data generated in step S <b> 703 is output to the out-of-
以上が、色処理の内容である。
なお、S702のゲイン補正処理とS703の色変換処理との順番は入れ替えてもよい。どちらを先に行っても同等の結果が得られる。さらには、ゲイン補正量を用いて選択プロファイルを修正したプロファイルを用いて、直接に入力RGB画像データの色信号値をデバイス非依存の色信号値に変換してもよい。例えば、3×3の変換行列Mを持つプロファイルの場合、ゲイン補正量αに基づく修正後の変換行列Maは、以下の式(8)で表される。
The above is the content of the color processing.
Note that the order of the gain correction processing in S702 and the color conversion processing in S703 may be switched. Whichever is done first, the same result is obtained. Furthermore, the color signal value of the input RGB image data may be directly converted into a device independent color signal value using a profile obtained by correcting the selection profile using the gain correction amount. For example, in the case of a profile having a 3 × 3 conversion matrix M, the corrected conversion matrix Ma based on the gain correction amount α is expressed by the following equation (8).
また、本実施形態では、デバイス非依存の色信号値としてXYZ値に変換する例を説明したがこれに限られるものではない。例えば、L*a*b*、sRGB、LUVなどの色信号値に変換しても構わない。
In the present embodiment, the example of converting the device-independent color signal value into the XYZ value has been described, but the present invention is not limited to this. For example, it may be converted into color signal values such as L * a * b *, sRGB, and LUV.
(色変換結果表示処理)
続いて、S404の色変換結果表示処理について詳しく説明する。この処理は、表示制御部205において行われる。上述のとおり、S403の色処理では、入力RGB画像データに対してゲイン補正処理を行なう。このゲイン補正処理によって、プロファイルで定義される色域(前述の式(7)を用いた変換の場合はXYZ色空間における色域)外の色信号値に変換されることがある。図8を参照して説明する。図8は、図6(a)における“profile_s4”の特性を示すグラフであり、横軸が被写体の輝度、縦軸が画素値を表している。なお、本来はRGB値とXYZ値との3次元の対応関係が必要であるが、ここでは説明の便宜上、1次元としている。図8のグラフにおいて、実線801が“profile_s4”、破線802が色変換処理の対象入力画像にそれぞれ対応する。入力画像は8ビット(最大画素値が255)のRGB画像である。なお、前述の図6(a)〜(c)で示した対応表について補足すると、シャッタスピードが遅くなるほどプロファイル特性を示す実線801の傾きは大きくなる。例えば、シャッタスピードが2倍になれば、実線801の傾きも2倍になる。図6(c)の場合も同様、ISO感度の数値が大きくなるにつれてプロファイル特性を示す実線801の傾きは大きくなる。また、図6(b)の場合は、絞り値の数値が大きくなるにつれて、実線801の傾きは小さくなる。
(Color conversion result display process)
Next, the color conversion result display process in S404 will be described in detail. This process is performed in the
いま、被写体の輝度値が1000であったとする。この場合、入力画像上の画素値は、破線802から“120”になることが分かる。この画素値“120”に、例えば前述した露出差に基づいて導出したゲイン補正量α=1.28を乗算すると、画素値は“154”となる。この画素値“154”に、“profile_s4”を適用することで、被写体の輝度値“1000”を得ることができる。一方、被写体の輝度値が“1500”であったとする。この場合、入力画像上の画素値は“220”になる。この画素値“220”に対してゲイン補正量α=1.28を乗算すると、画素値は“282”となり、入力画像の最大画素値“255”を超えてしまう。こうなると、“profile_s4”を適用しても正しい輝度値“1500”を得ることはできないので、“profile_s4”で定義可能な最大輝度値“1400”を出力する等で対処することになる。このように、ゲイン補正の影響によって、入力RGB画像の色信号値がプロファイルで定義される色域外の色信号値に変換され、色変換精度が低下することがある。
Assume that the luminance value of the subject is 1000. In this case, it can be seen that the pixel value on the input image changes from the
そこで、本実施形態では、色変換画像をモニタ108などに表示する際、プロファイルに従った色変換処理が正しく出来なかった箇所が色変換後画像内に存在する場合、当該箇所をユーザが把握できるようにする。以下、図9のフローチャートを参照して詳しく説明する。
Therefore, in the present embodiment, when a color conversion image is displayed on the
S901では、色変換後画像データと選択プロファイルが取得される。続くS902では、取得した色変換画像の画素のうち注目する画素の画素値(ここでは、XYZ値)が取得される。この場合の注目画素は、例えば色変換後画像内の左上の画素から順に、注目画素として決定していけばよい。 In S901, image data after color conversion and a selection profile are acquired. In the subsequent S902, the pixel value (here, XYZ value) of the pixel of interest among the pixels of the acquired color conversion image is acquired. The pixel of interest in this case may be determined as the pixel of interest sequentially from the upper left pixel in the image after color conversion, for example.
S903では、S902で取得した注目画素の画素値が表す色が、選択プロファイルで定義される色域外の色か否かが判定される。この判定は、例えば、予め各プロファイルに色域の範囲を示す情報を付加しておき、選択プロファイルに付加された当該情報を参照して、注目画素の色信号値が色域の範囲の内側か外側かをチェックする。プロファイルで定義される色域がXYZ色空間の色域である場合は、例えば以下の式(9)及び式(10)を用いて判定することができる。
Y0≦Ymin ・・・式(9)
Y0≧Ymax ・・・式(10)
上記式(9)及び式(10)において、Y0は注目画素の輝度を表すY成分の信号値(Y信号)を示し、Ymax及びYminは選択プロファイルでのY信号の最大値と最小値をそれぞれ示す。X成分とZ成分の信号値についても同様に判定することができる。注目画素のXYZ値が上記式(9)と式(10)で示すいずれかの条件を満たす場合は、注目画素の変換後の色が定義域外の色であると判定する。なお、
プロファイルで定義される色域の情報が予め付加されていない場合でも、適宜導出して判定可能である。例えば、プロファイルが3×3の変換行列である場合は、前述の式(7)に対して、XYZ各成分の信号値が最大となるRGB=(255、255、255)と最少となるRGB=(0,0,0)を代入して演算する。これにより、XYZ各成分の信号値における最大値と最小値が得られる。また、プロファイルがLUTの場合は、そのLUT内のXYZ各成分における信号値の最大値と最小値をそのまま用いればよい。判定の結果、注目画素の画素値が表す色が選択プロファイルの定義域外となる場合はS904に移行し、定義域内に収まる場合はS905に移行する。
In S903, it is determined whether or not the color represented by the pixel value of the target pixel acquired in S902 is a color outside the color gamut defined by the selection profile. For this determination, for example, information indicating the range of the color gamut is added to each profile in advance, and whether the color signal value of the target pixel is within the range of the color gamut by referring to the information added to the selected profile. Check if it is outside. When the color gamut defined by the profile is the color gamut of the XYZ color space, it can be determined using, for example, the following equations (9) and (10).
Y 0 ≦ Y min (9)
Y 0 ≧ Y max (10)
In the above formulas (9) and (10), Y 0 represents the Y component signal value (Y signal) representing the luminance of the pixel of interest, and Y max and Y min represent the maximum and minimum values of the Y signal in the selected profile. Each value is shown. The X component and Z component signal values can be determined in the same manner. When the XYZ value of the target pixel satisfies any of the conditions expressed by the above formulas (9) and (10), it is determined that the color after conversion of the target pixel is a color outside the defined region. In addition,
Even when information on the color gamut defined by the profile is not added in advance, it can be determined by deriving as appropriate. For example, when the profile is a 3 × 3 transformation matrix, RGB = (255, 255, 255) where the signal value of each XYZ component is the maximum and RGB = the minimum where the signal value of each XYZ component is the above formula (7). Substitute (0,0,0) for operation. Thereby, the maximum value and the minimum value in the signal values of the XYZ components are obtained. When the profile is an LUT, the maximum value and the minimum value of the signal values in the XYZ components in the LUT may be used as they are. As a result of the determination, if the color represented by the pixel value of the target pixel is outside the definition area of the selection profile, the process proceeds to S904, and if it falls within the definition area, the process proceeds to S905.
S904では、その色が定義域外にあると判定された注目画素の、色変換後画像内の位置座標を示す情報が、RAM102等に記憶・保持される。次のS905では、色変換後画像の全画素について処理が完了したか否かが判定される。全画素について処理が完了していた場合は、S906に移行する。一方、未処理の画素があれば、S902に戻って次の画素を注目画素として処理を継続する。
In S <b> 904, information indicating the position coordinates in the image after color conversion of the pixel of interest for which it is determined that the color is out of the definition area is stored and held in the
S906では、S904で保持された座標情報を基づき、プロファイルの定義域外の色が色変換後画像内に存在することをユーザが把握可能な画像情報が生成され、モニタ108に表示される。例えば、色変換後画像の各画素のうちプロファイルの定義域外となった画素を強調表示した画像を生成して、当該画像をモニタ108に表示する。これにより、色変換処理の結果、その際に使用したプロファイルの定義域外の色が発生したことがユーザに分かるようにする。強調の方法は、当該箇所をユーザが認識しやすいような表示方法であればよい。例えば、定義域外となった箇所をその画素値にかかわらずモノクロ(白や黒)で表示するといった具合である。図10(a)及び(b)を参照して、プロファイルの定義域外となった色の画素を強調表示した画像の具体例について説明する。図10(a)は、光沢のある球体1001を被写体として撮影したRGB画像に対し、前述の色変換処理を行って得られた画像を示している。球体1001内の領域1002は光沢部分を示し、当該部分の画素の輝度値がプロファイルで定義域外と判定されていたとする。図10(b)は、定義域外と判定された画素で構成される領域1002の色を黒に変換して強調表示している。さらには、色を変えて強調表示した定義域外の箇所を点滅表示させるなどして、ユーザがより明確に認識可能となるようにしてもよい。
In S906, based on the coordinate information held in S904, image information that allows the user to grasp that a color outside the definition area of the profile exists in the color-converted image is generated and displayed on the
以上が、色変換結果表示処理の内容である。なお、S903の色域外判定処理において、定義域外と判定された画素がなかった場合は、図10(a)に示すような色変換後画像をそのまま表示すればよい。
The above is the content of the color conversion result display process. Note that, in the out-of-gamut determination process of S903, if there is no pixel determined to be out of the definition area, the color-converted image as shown in FIG.
本実施形態によれば、プロファイル作成時に想定される露出条件と、実際に被写体を撮影したときの撮影条件とが異なる場合でも、正しい色変換値を推定することが可能になる。また、ゲイン補正処理によりプロファイルの定義域外の色になってしまう場合には、その画素位置をユーザが確認できるようにする。これによりユーザは、露出条件を変更して被写体を撮り直すなどの対応が可能となり、測色評価が容易になる。 According to the present embodiment, it is possible to estimate a correct color conversion value even when the exposure condition assumed when creating the profile is different from the shooting condition when the subject is actually shot. Further, when the gain correction process results in a color outside the profile definition area, the user can check the pixel position. As a result, the user can take measures such as changing the exposure condition and re-taking the subject, thereby facilitating the colorimetric evaluation.
実施形態1では、色変換処理によってプロファイルで定義される色域から外れてしまう色が発生した場合に、色変換後画像のどの部分が定義域外となったのかをユーザが把握できるようにしていた。しかしながら、例えば被写体の重要部分でそのようなプロファイルの定義域外に色変換されてしまうことは事前に避けられるのが望ましい。そこで、予め画像内の所定の画素位置を指定し、当該指定した画素位置の色がプロファイルの定義域外とならないように色変換処理を行う態様について、実施形態2として説明する。 In the first embodiment, when a color out of the color gamut defined by the profile is generated by the color conversion process, the user can grasp which part of the image after color conversion is out of the definition gamut. . However, for example, it is desirable to avoid beforehand color conversion outside the definition area of such a profile in an important part of the subject. Therefore, an embodiment in which a predetermined pixel position in an image is designated in advance and color conversion processing is performed so that the color of the designated pixel position does not fall outside the definition area of the profile will be described as a second embodiment.
なお、画像処理装置のハードウェア構成など、実施形態1と共通する内容については説明を省略ないしは簡略化し、以下では差異点を中心に説明を行うものとする。
Note that description common to the first embodiment, such as the hardware configuration of the image processing apparatus, is omitted or simplified, and the following description will focus on differences.
図11は、本実施形態に係る、画像処理装置100のソフトウェア構成を示す機能ブロック図である。実施形態1と共通の色処理条件決定部201、ゲイン補正部202、色変換部203、定義域外判定部204及び表示制御部205に、さらに、基準点設定部1101と画像評価部1102が追加されている。基準点設定部1101は、入力RGB画像データにおける特定の画素位置を基準点として設定する。設定された基準点の位置座標の情報(基準点情報)は、色処理条件決定部201と画像評価部1102で利用される。色処理条件決定部201は、入力RGB画像データ、上述の基準点情報及び候補プロファイルに基づいて、ゲイン補正量を決定し、色変換処理に適用するプロファイルを選択する。画像評価部1102は、上述の基準点情報に基づいて色変換後画像を評価する。図11で示す各部も、CPU101がHDD103に格納された所定のプログラムをRAM102に展開しこれを実行することで実現される。
FIG. 11 is a functional block diagram showing a software configuration of the
図12は、本実施形態に係る、画像処理装置100における画像処理の流れを示すフローチャートである。以下、図12のフローに沿って、本実施形態に係る色変換処理を中心とする画像処理について説明する。
FIG. 12 is a flowchart showing the flow of image processing in the
S1201では、候補プロファイルと、処理対象となるRGB画像データが入力される。本実施形態の場合、変換後の色がプロファイルの定義域外の色となってしまうのを可能な限り避けるために、入力される候補プロファイルの数は複数が望ましく、さらにはなるべく多い方が望ましい。ここでは、複数の候補プロファイルが入力されたものとして、以下説明する。入力されたRGB画像データは、色処理条件決定部201とゲイン補正部202に送られる。また、入力された候補プロファイルは、色処理条件決定部201に送られる。
In S1201, a candidate profile and RGB image data to be processed are input. In the case of this embodiment, in order to avoid as much as possible that the color after conversion becomes a color outside the definition area of the profile, the number of candidate profiles to be input is preferably plural, and more preferably as large as possible. Here, the following description will be given assuming that a plurality of candidate profiles are input. The input RGB image data is sent to the color processing
S1202では、基準点となる画素位置が設定される。この画素位置は、例えばGUI(グラフィカルユーザインタフェース)を介したユーザ操作に基づいて指定される。図13(a)は、ユーザが基準点を指定するためのUI画面の一例を示している。ユーザは、図13(a)のUI画面内に表示される入力画像1301を見ながら、色変換結果を評価する際の基準となる被写体(ここでは球体)上の所望の点をマウス等で指定する。入力画像1301内の黒点1302が、ユーザによって指定された基準点を表している。いま、被写体である球体の色は左から右に次第に明るくなる横方向のグラデーションを持ち、その中心が基準点として設定されたものとする。ユーザが基準点1302を指定すると、入力画像の左上隅を原点(0,0)とした、基準点の画素位置の座標情報(ここでは、x=1500、y=1000)がUI画面内に表示される。こうして入力画像内の特定の画素位置が基準点として設定される。なお、基準点となる画素位置の指定方法はGUIを介したユーザ入力に限られるものではない。例えば、入力画像の中心の画素位置などを基準点のデフォルト位置として予め決定しておき、ユーザが特定の画素位置を指定しなくても基準点が設定されるようにしてもよい。こうして設定された特定の画素位置の座標情報が、基準点を特定する情報(基準点情報)として、色処理条件決定部201と画像評価部1102へ送られる。
In S1202, a pixel position that becomes a reference point is set. This pixel position is specified based on, for example, a user operation via a GUI (graphical user interface). FIG. 13A shows an example of a UI screen for the user to specify a reference point. The user designates a desired point on a subject (here, a sphere) as a reference when evaluating the color conversion result with a mouse or the like while viewing the
S1203では、入力RGB画像と複数の候補プロファイル、さらにS1202で設定した基準点とに基づいて、次のS1204における色処理の条件(ゲイン補正量及び実際に適用するプロファイル)を決定する色処理条件決定処理が実行される。この色処理条件決定処理の詳細は後述する。 In step S1203, color processing condition determination for determining color processing conditions (gain correction amount and profile to be actually applied) in next step S1204 based on the input RGB image, a plurality of candidate profiles, and the reference point set in step S1202. Processing is executed. Details of the color processing condition determination processing will be described later.
S1204では、入力RGB画像に対し、S1203で決定した色処理条件に従った色処理(ゲイン補正処理+色変換処理)が実行される。この色処理の内容は、実施形態1の図7のフローで説明したとおりであるので説明を省く。 In step S1204, color processing (gain correction processing + color conversion processing) is performed on the input RGB image according to the color processing conditions determined in step S1203. The contents of this color processing are as described in the flow of FIG.
S1205では、色変換後画像に対して、S1202で決定した基準点に基づく評価がなされる。例えば、基準点に対応する画素の色信号値とそれ以外の画素の色信号値との差分から、以下の式(11)で示す色度の距離eが画素毎に算出される。 In S1205, the color-converted image is evaluated based on the reference point determined in S1202. For example, the distance e of chromaticity represented by the following equation (11) is calculated for each pixel from the difference between the color signal value of the pixel corresponding to the reference point and the color signal value of the other pixels.
なお、上述した色度の距離eは評価値の一例であり、これに限定されない。例えば、XYZ各成分それぞれの色信号値における差分の絶対値を評価値としてもよい。或いは、基準となる白色のXYZ値を取得してLabなどの視覚均等色空間の色信号値に変換した上で、明度差、色度差、色差などを評価値とすることもできる。また、図13の例では、基準点の周辺の部分領域を対象に評価画像を生成したが、入力画像(色変換後画像)の全体に対応する評価画像を生成してもよい。
The chromaticity distance e described above is an example of an evaluation value, and is not limited to this. For example, the absolute value of the difference in the color signal value of each XYZ component may be used as the evaluation value. Alternatively, after obtaining a white XYZ value as a reference and converting it into a color signal value in a visual uniform color space such as Lab, a brightness difference, a chromaticity difference, a color difference, or the like can be used as an evaluation value. In the example of FIG. 13, the evaluation image is generated for a partial region around the reference point, but an evaluation image corresponding to the entire input image (color-converted image) may be generated.
S1206では、S1205で生成された評価画像が、S1204で生成された色変換後画像に代えて(或いは色変換後画像と共に)モニタ108に表示される。
In S1206, the evaluation image generated in S1205 is displayed on the
以上が、本実施形態に係る、画像処理装置100における色変換処理を中心とした画像処理の大まかな流れである。
The above is a general flow of image processing centering on color conversion processing in the
(色処理条件決定処理)
続いて、S1203の色処理条件決定処理について詳しく説明する。この処理は、色処理条件決定部201において行われる。図14は、本実施形態に係る、色処理条件決定処理の詳細を示すフローチャートである。
(Color processing condition determination processing)
Next, the color processing condition determination process in S1203 will be described in detail. This process is performed in the color processing
S1401では、入力されたRGB画像の撮影時の露出に関わる撮影パラメータと、前述のS1202で設定された基準点の情報が取得される。続くS1402では、前述のS1201で取得した複数の候補プロファイルの中から注目する候補プロファイルが1つ決定される。 In S1401, the shooting parameters related to the exposure at the time of shooting the input RGB image and the reference point information set in S1202 are acquired. In subsequent S1402, one candidate profile to be noticed is determined from the plurality of candidate profiles acquired in S1201 described above.
S1403では、S1401で取得した撮影パラメータと、S1402で決定された注目候補プロファイルの想定撮影パラメータとに基づき、ゲイン補正処理で使用する補正量が決定される。例えば、シャッタスピードを基にゲイン補正量を決定する場合、前述の式(1)を用いて、注目候補プロファイルの想定シャッタスピードTvprf、入力RGB画像の撮影時シャッタスピードTvimgとして、ゲイン補正量αが求められる。 In S1403, the correction amount used in the gain correction process is determined based on the shooting parameters acquired in S1401 and the assumed shooting parameters of the target candidate profile determined in S1402. For example, when the gain correction amount is determined based on the shutter speed, the gain correction amount is set as the assumed shutter speed Tv prf of the target candidate profile and the shutter speed Tv img at the time of shooting the input RGB image using the above-described equation (1). α is determined.
S1404では、S1403で決定したゲイン補正量に基づいて、基準点情報で特定される画素の画素値が、例えば前述の式(5)を用いるなどして補正される。そして、S1405では、その補正後の画素値が、注目候補プロファイルで定義される色域内の色か否かが判定される。この判定は、実施形態の図9のフローにおけるS903に準じて行えばよい。すなわち、プロファイルで定義される色域がXYZ色空間の色域である場合は、前述の式(9)及び式(10)における不等号の向きを逆にした式を用いる等により判定すればよい。判定の結果、基準点情報で特定される画素の補正後の画素値が、注目候補プロファイルの定義域内である場合はS1406に移行し、定義域外の場合はS1407に移行する。 In S1404, based on the gain correction amount determined in S1403, the pixel value of the pixel specified by the reference point information is corrected using, for example, the above equation (5). In step S1405, it is determined whether the corrected pixel value is a color within the color gamut defined by the target candidate profile. This determination may be performed according to S903 in the flow of FIG. 9 of the embodiment. That is, when the color gamut defined by the profile is the color gamut of the XYZ color space, the determination may be made by using an expression in which the direction of the inequality sign is reversed in the expressions (9) and (10). As a result of the determination, if the corrected pixel value of the pixel specified by the reference point information is within the definition area of the target candidate profile, the process proceeds to S1406, and if it is outside the definition area, the process proceeds to S1407.
S1406では、S1402で決定した注目候補プロファイルと、S1403で決定したゲイン補正量とを対応付けた、プロファイルとゲイン補正量との組合せ情報がRAM102等に保持される。続く1407では、S1201で取得した複数の候補プロファイルのすべてについて処理が完了したかどうかが判定される。全ての候補プロファイルについての処理が完了していれば、S1408に移行する。一方、未処理の候補プロファイルがあれば、S1402に戻って次の候補プロファイルを注目する候補プロファイルとして処理を継続する。
In S1406, the
S1408では、S1406で保持されたすべての組合せ情報の中から、最小のゲイン補正量を持つ組合せが選択され、当該組合せに係るゲイン補正量とプロファイルの情報が出力される。すなわち、選択された組合せに含まれるゲイン補正量の情報がゲイン補正部202へ、それに対応付けられた候補プロファイルの情報が色変換部203へ、それぞれ出力される。
In S1408, the combination having the minimum gain correction amount is selected from all the combination information held in S1406, and the gain correction amount and profile information related to the combination are output. That is, information on the gain correction amount included in the selected combination is output to the
以上が、本実施形態における色処理条件決定処理の内容である。
The above is the content of the color processing condition determination process in the present embodiment.
本実施形態によれば、入力画像内の指定された画素位置の色がプロファイルで定義される色域の中に確実に収まるように色変換することができる。その結果、被写体の重要部分等でプロファイルの定義域外の色が発生してしまうことを事前に避けることができ、ユーザにとってより望ましい色変換の実現が可能となる。
According to the present embodiment, it is possible to perform color conversion so that the color at the designated pixel position in the input image surely falls within the color gamut defined by the profile. As a result, it is possible to avoid the occurrence of a color outside the definition area of the profile in an important part of the subject in advance, and it is possible to realize color conversion that is more desirable for the user.
(その他の実施例)
本発明は、上述の実施形態の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサーがプログラムを読出し実行する処理でも実現可能である。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。
(Other examples)
The present invention supplies a program that realizes one or more functions of the above-described embodiments to a system or apparatus via a network or a storage medium, and one or more processors in a computer of the system or apparatus read and execute the program This process can be realized. It can also be realized by a circuit (for example, ASIC) that realizes one or more functions.
100 画像処理装置
201 色処理条件決定部
201 ゲイン補正部
203 色変換部
DESCRIPTION OF
Claims (17)
前記入力画像を撮影した時の撮影パラメータと、前記カラープロファイルの作成時の撮影パラメータとに基づいて、ゲイン補正の補正量を決定する決定手段と、
前記ゲイン補正の補正量と前記カラープロファイルに基づいて、前記入力画像を色変換することで得られる色変換後画像を出力する出力手段と、
を有することを特徴とする画像処理装置。 An image processing apparatus for color-converting an input image using a color profile,
Determination means for determining a correction amount for gain correction based on shooting parameters when shooting the input image and shooting parameters when creating the color profile;
Output means for outputting a color-converted image obtained by color-converting the input image based on the correction amount of the gain correction and the color profile;
An image processing apparatus comprising:
前記ゲイン補正を行った後の前記入力画像に対し、前記カラープロファイルを用いて前記色変換を行う色変換手段と、
をさらに有し、
前記出力手段は、前記色変換手段から出力される色変換後画像を出力する
ことを特徴とする請求項1に記載の画像処理装置。 Correction means for performing the gain correction on the input image using the correction amount;
Color conversion means for performing color conversion using the color profile for the input image after performing the gain correction;
Further comprising
The image processing apparatus according to claim 1, wherein the output unit outputs a color-converted image output from the color conversion unit.
前記色変換した入力画像に対して、前記ゲイン補正を行う補正手段と
をさらに有し、
前記出力手段は、前記補正手段から出力される画像を色変換後画像として出力する
ことを特徴とする請求項1に記載の画像処理装置。 Color conversion means for performing the color conversion on the input image using the color profile;
Correction means for performing the gain correction on the color-converted input image;
The image processing apparatus according to claim 1, wherein the output unit outputs an image output from the correction unit as a color-converted image.
前記入力画像に対し、前記修正を行った後の前記カラープロファイルを用いて前記色変換を行う色変換手段と、
をさらに有し、
前記出力手段は、前記色変換手段から出力される色変換後画像を出力する
ことを特徴とする請求項1に記載の画像処理装置。 Correction means for correcting the color profile using the determined correction amount;
Color conversion means for performing the color conversion using the color profile after the correction is performed on the input image;
Further comprising
The image processing apparatus according to claim 1, wherein the output unit outputs a color-converted image output from the color conversion unit.
前記決定手段は、その作成時に想定した撮影パラメータのレベルが、前記入力画像を撮影した時の撮影パラメータのレベルと最も近いカラープロファイルを、前記複数のカラープロファイルの中から選択し、
前記色変換手段は、選択されたカラープロファイルを用いて前記色変換を行う、
ことを特徴とする請求項5に記載の画像処理装置。 Storage means for storing a plurality of color profiles created by varying the exposure-related parameters at a plurality of levels;
The determination means selects a color profile whose shooting parameter level assumed at the time of creation is closest to the shooting parameter level at the time of shooting the input image from the plurality of color profiles,
The color conversion unit performs the color conversion using a selected color profile.
The image processing apparatus according to claim 5.
前記入力画像に対する基準点を設定する設定手段と、
をさらに備え、
前記決定手段は、前記入力画像内の前記基準点に対応する画素に対しゲイン補正を行なった場合の画素値が、前記カラープロファイルで定義される色域に収まることを条件に、前記複数のカラープロファイルの中から、前記色変換に用いるカラープロファイルを選択する
ことを特徴とする請求項5乃至8のいずれか1項に記載の画像処理装置。 Storage means for storing a plurality of color profiles created by varying the parameters relating to exposure at a plurality of levels;
Setting means for setting a reference point for the input image;
Further comprising
The determination unit is configured to provide the plurality of color values on condition that a pixel value when gain correction is performed on a pixel corresponding to the reference point in the input image is within a color gamut defined by the color profile. The image processing apparatus according to any one of claims 5 to 8, wherein a color profile used for the color conversion is selected from profiles.
前記評価画像を表示する表示手段と、
をさらに備えたことを特徴とする請求項12又は13に記載の画像処理装置。 Evaluation means for generating an evaluation image obtained by evaluating the image after the color conversion based on the reference point;
Display means for displaying the evaluation image;
The image processing apparatus according to claim 12, further comprising:
前記入力画像を撮影した時の撮影パラメータと、前記カラープロファイルの作成時に想定した撮影パラメータとの違いに基づいて、ゲイン補正の補正量を決定するステップと、
前記ゲイン補正の補正量と前記カラープロファイルに基づいて、前記入力画像を色変換することで得られる色変換後画像を出力するステップと、
を含むことを特徴とする画像処理方法。 An image processing method for color-converting an input image using a color profile,
Determining a correction amount for gain correction based on a difference between a shooting parameter when shooting the input image and a shooting parameter assumed when the color profile is created;
Outputting a color-converted image obtained by color-converting the input image based on the correction amount of the gain correction and the color profile;
An image processing method comprising:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2018053028A JP2019165398A (en) | 2018-03-20 | 2018-03-20 | Image processing apparatus, image processing method and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2018053028A JP2019165398A (en) | 2018-03-20 | 2018-03-20 | Image processing apparatus, image processing method and program |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2019165398A true JP2019165398A (en) | 2019-09-26 |
Family
ID=68064360
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2018053028A Pending JP2019165398A (en) | 2018-03-20 | 2018-03-20 | Image processing apparatus, image processing method and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2019165398A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP7467247B2 (en) | 2020-06-11 | 2024-04-15 | キヤノン株式会社 | Image processing device, image processing method, and program |
-
2018
- 2018-03-20 JP JP2018053028A patent/JP2019165398A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP7467247B2 (en) | 2020-06-11 | 2024-04-15 | キヤノン株式会社 | Image processing device, image processing method, and program |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR100467610B1 (en) | Method and apparatus for improvement of digital image quality | |
JP4883007B2 (en) | Image processing apparatus, image processing program, and image processing method | |
US8665348B2 (en) | Image processing apparatus and method using forward and inverse local adaptation processing and dynamic range processing | |
JP2004192614A (en) | Image processing device, image processing method, program and recording medium | |
JP2005210526A (en) | Image processing apparatus, method, and program, image pickup device, and image data outputting method and program | |
JP2005210370A (en) | Image processor, photographic device, image processing method, image processing program | |
US10281714B2 (en) | Projector and projection system that correct optical characteristics, image processing apparatus, and storage medium | |
KR20120118383A (en) | Image compensation device, image processing apparatus and methods thereof | |
JP6071419B2 (en) | Image processing apparatus and image processing method | |
JP2020145553A (en) | Image processing apparatus, image processing method and program | |
US20170154454A1 (en) | Image processing apparatus and image processing method | |
JP2005210495A (en) | Image processing apparatus, method, and program | |
JP4677699B2 (en) | Image processing method, image processing device, photographing device evaluation method, image information storage method, and image processing system | |
JP5156423B2 (en) | Color processing apparatus and color processing method | |
JP6611543B2 (en) | Image processing apparatus, image processing method, and program | |
CN115426487A (en) | Color correction matrix adjusting method and device, electronic equipment and readable storage medium | |
JP2005117524A (en) | Image processing system | |
JP2020136928A (en) | Image processing equipment, image processing methods, and programs | |
JP5950756B2 (en) | Image processing apparatus and image processing method | |
JP2019165398A (en) | Image processing apparatus, image processing method and program | |
JPH1141622A (en) | Image processor | |
JP5225491B2 (en) | Image processing apparatus and image processing method | |
JP2007318320A (en) | Image processor, imaging device, image processing method, and image processing program | |
JP2020088709A (en) | Image processing apparatus, image processing method and program | |
JP2019169910A (en) | Image processing apparatus, image processing method, and program |