JP2020136890A - Image processing device, image processing method, imaging apparatus, program, and storage medium - Google Patents
Image processing device, image processing method, imaging apparatus, program, and storage medium Download PDFInfo
- Publication number
- JP2020136890A JP2020136890A JP2019027651A JP2019027651A JP2020136890A JP 2020136890 A JP2020136890 A JP 2020136890A JP 2019027651 A JP2019027651 A JP 2019027651A JP 2019027651 A JP2019027651 A JP 2019027651A JP 2020136890 A JP2020136890 A JP 2020136890A
- Authority
- JP
- Japan
- Prior art keywords
- signal
- color
- image
- color space
- expansion
- 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.)
- Granted
Links
- 238000012545 processing Methods 0.000 title claims abstract description 127
- 238000003384 imaging method Methods 0.000 title claims description 4
- 238000003672 processing method Methods 0.000 title claims 2
- 238000006243 chemical reaction Methods 0.000 claims abstract description 20
- 238000000034 method Methods 0.000 claims description 36
- 239000003086 colorant Substances 0.000 claims description 4
- 238000010586 diagram Methods 0.000 description 6
- 238000013459 approach Methods 0.000 description 4
- 238000005452 bending Methods 0.000 description 4
- 238000004040 coloring Methods 0.000 description 3
- 239000011159 matrix material Substances 0.000 description 3
- 229920006395 saturated elastomer Polymers 0.000 description 3
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000006866 deterioration Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000007274 generation of a signal involved in cell-cell signaling Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000035945 sensitivity Effects 0.000 description 1
- 230000003595 spectral effect Effects 0.000 description 1
Images
Landscapes
- Color Image Communication Systems (AREA)
- Studio Devices (AREA)
- Image Processing (AREA)
- Color Television Image Signal Generators (AREA)
- Processing Of Color Television Signals (AREA)
Abstract
Description
本発明は、画像を階調変換する技術に関するものである。 The present invention relates to a technique for gradation conversion of an image.
従来、デジタルカメラ等の撮像装置で撮影した画像に対して、撮像装置の特性および撮影条件を加味して、色に応じて異なるゲインをかけてカラーバランスを調整するホワイトバランスゲイン処理が行われている。しかしながら、入力画像の時点で白黒被写体の持つ信号のうち、G信号が飽和レベルに達している場合には、正しい色比率で信号が入力されない。そのため、ホワイトバランスゲイン処理を行っても、R,G,B信号の値が揃わず、色付きが発生してしまう。この色付きを抑制するために、従来は、他の色信号の信号値もG信号の飽和レベルで一律クリップすることにより対処していたが、高輝度側の階調が失われてしまうといった課題があった。 Conventionally, a white balance gain process is performed on an image taken by an image pickup device such as a digital camera to adjust the color balance by applying different gains according to the color in consideration of the characteristics of the image pickup device and the shooting conditions. There is. However, among the signals of the black and white subject at the time of the input image, when the G signal has reached the saturation level, the signal is not input at the correct color ratio. Therefore, even if the white balance gain processing is performed, the values of the R, G, and B signals do not match, and coloring occurs. In order to suppress this coloring, conventionally, the signal values of other color signals have been dealt with by uniformly clipping at the saturation level of the G signal, but there is a problem that the gradation on the high luminance side is lost. there were.
この課題に対し、入力された信号値を拡張し、色信号毎の飽和レベルを調整することにより、色付きを発生させずに高輝度側の階調を保持する技術が知られている。例えば、特許文献1では、入力画像のダイナミックレンジ拡張の上限値(拡張上限値)を決定し、各色信号の高輝度域の信号レベルを調整した後、飽和レベルの高い信号で、飽和レベルの低い信号を置換し、拡張上限値が白色となるようにする技術が提案されている。 To solve this problem, a technique is known in which the input signal value is expanded and the saturation level of each color signal is adjusted to maintain the gradation on the high luminance side without causing coloring. For example, in Patent Document 1, after determining the upper limit value (extension upper limit value) of the dynamic range expansion of the input image and adjusting the signal level in the high luminance region of each color signal, the signal having a high saturation level has a low saturation level. A technique has been proposed in which the signal is replaced so that the extended upper limit becomes white.
しかしながら、上述の特許文献1に開示された従来技術では、拡張上限値が白色になるよう、各色の高輝度域の階調特性を変換する。そのため、同一色相で明るさが連続的に変化する被写体では、中間から高輝度域の色信号のRGB組成比が変動し、被写体本来の色味と異なってしまうという画質劣化(色曲り)が発生する場合がある。 However, in the prior art disclosed in Patent Document 1 described above, the gradation characteristics in the high luminance region of each color are converted so that the extended upper limit value becomes white. Therefore, in a subject whose brightness changes continuously with the same hue, the RGB composition ratio of the color signal in the middle to high luminance range fluctuates, causing image quality deterioration (color bending) in which the original hue of the subject is different. May be done.
本発明は上述した課題に鑑みてなされたものであり、その目的は、入力画像に対して、色曲りを抑制しながら高輝度側のダイナミックレンジを拡張することができる画像処理装置を提供することである。 The present invention has been made in view of the above-mentioned problems, and an object of the present invention is to provide an image processing apparatus capable of expanding the dynamic range on the high-luminance side of an input image while suppressing color bending. Is.
本発明に係わる画像処理装置は、複数の色信号を持った画像信号である入力画像を入力する入力手段と、前記入力画像に対して、ホワイトバランス調整を行うホワイトバランス処理手段と、ホワイトバランス処理後の信号に対し、第1の色空間においてダイナミックレンジを拡張する第1の拡張処理を行う第1の拡張処理手段と、前記第1の拡張処理が行われた後の信号を第2の色空間の信号に変換する変換手段と、前記変換手段により前記第2の色空間に変換された信号に対し、前記第2の色空間においてダイナミックレンジをさらに拡張する第2の拡張処理を行う第2の拡張処理手段と、を備えることを特徴とする。 The image processing apparatus according to the present invention includes an input means for inputting an input image which is an image signal having a plurality of color signals, a white balance processing means for adjusting the white balance with respect to the input image, and a white balance processing. The first expansion processing means for performing the first expansion processing for expanding the dynamic range in the first color space with respect to the later signal, and the signal after the first expansion processing is performed for the second color. A second expansion process for further expanding the dynamic range in the second color space is performed on the conversion means for converting into a spatial signal and the signal converted into the second color space by the conversion means. It is characterized by comprising the extended processing means of the above.
本発明によれば、入力画像に対して、色曲りを抑制しながら高輝度側のダイナミックレンジを拡張することが可能となる。 According to the present invention, it is possible to extend the dynamic range on the high-luminance side of an input image while suppressing color bending.
以下、添付図面を参照して実施形態を詳しく説明する。尚、以下の実施形態は特許請求の範囲に係る発明を限定するものではない。実施形態には複数の特徴が記載されているが、これらの複数の特徴の全てが発明に必須のものとは限らず、また、複数の特徴は任意に組み合わせられてもよい。さらに、添付図面においては、同一若しくは同様の構成に同一の参照番号を付し、重複した説明は省略する。 Hereinafter, embodiments will be described in detail with reference to the accompanying drawings. The following embodiments do not limit the invention according to the claims. Although a plurality of features are described in the embodiment, not all of the plurality of features are essential to the invention, and the plurality of features may be arbitrarily combined. Further, in the attached drawings, the same or similar configurations are designated by the same reference numbers, and duplicate description is omitted.
図1は、本発明の画像処理装置の一実施形態である撮像装置の構成を示すブロック図である。図1において、撮像装置100は、撮像素子111、メカニカルシャッター113、カメラ制御部114、画像処理部115、操作部117、表示部118、記録メディア119を有する。また、被写体像を結像させる撮影光学系として、集光レンズ121、絞り122、フォーカスレンズ123、レンズ制御部124を有する。
FIG. 1 is a block diagram showing a configuration of an image pickup apparatus according to an embodiment of the image processing apparatus of the present invention. In FIG. 1, the
ユーザーは、操作部117の不図示のAF開始ボタン、撮影開始ボタン等を操作することにより、カメラ制御部114およびレンズ制御部124の制御内容を指定し、AF動作、撮影動作などを行うことができる。また、操作部117にはメニューボタンおよびコントロールボタンも配置されており、メニュー画面を表示部に表示させて、静止画撮影や動画撮影などのカメラの動作内容を設定することができる。
The user can specify the control contents of the
図2は、図1に示した画像処理部115の構成を示すブロック図である。本実施形態の画像処理部115では、ユーザーの指示、または、入力画像の特徴解析結果に基づいて、入力画像の高輝度側のダイナミックレンジを拡張する。
FIG. 2 is a block diagram showing the configuration of the
図2において、画像処理部115の画像入力端子200には、1画素につきR,G,Bの3色全ての信号値を持った画像信号が入力される。システム制御部114は、撮像装置100全体を制御するとともに、画像処理部115を制御する。また、システム制御部114では、ユーザーの操作または、画面内の入力画像の輝度や色信号の分布の解析結果に基づいて、入力画像の高輝度側ダイナミックレンジ拡張時の拡張上限値を決定し、第2の拡張処理部205に送出する。さらに、システム制御部114では、入力画像をM×N個の矩形領域に分割し、分割領域ごとのRGB信号の積算値を算出し、それらの比率から、入力画像に適用するホワイトバランスゲインを算出し、ホワイトバランスゲイン処理部202に送出する。
In FIG. 2, an image signal having signal values of all three colors of R, G, and B is input to the
ホワイトバランスゲイン処理部202は、画像入力端子200から入力された画像に対し、R,G,Bそれぞれの信号について、システム制御部114で決定されたホワイトバランスゲインを適用して、ホワイトバランス調整を行う。
The white balance
第1の拡張処理部203は、ホワイトバランスゲイン処理後のR,B信号を参照し、RGB色空間で、R,G,Bの色比が著しく変動しないよう、高輝度域のG信号を拡張する処理を行う。色空間変換処理部204は、第1の拡張処理部203から出力される拡張後のRGB色空間の信号を、YUV色空間の信号に変換する。
The first
第2の拡張処理部205は、YUV色空間において、あらかじめ設定された現像レンジまで、高輝度域のYUV信号の振幅を拡張する処理を行う。画像出力端子206は、第2の拡張処理部205による処理後のYUV信号を出力する。
The second
次に図3〜図8を参照して、本実施形態における画像処理部115の各処理ブロックの動作について説明する。なお、図2において、画像入力端子200から入力される入力画像は、撮像素子111によって生成される。撮像素子111には、カラーフィルタが配置されており、被写体からの光を分光して、R,G,Bの各信号値を出力する。R,G,Bの各信号レベルは、撮像素子111に入力される光量に応じて決まり、あらかじめ定められた所定の飽和レベルTH0で、信号の上限値がクリップされる。
Next, the operation of each processing block of the
図3は、撮像素子111に入力される光量と、画像入力端子200から入力される入力画像のRGB信号値の関係の一例を示した図である。Pin_R,Pin_G,Pin_Bは、それぞれR,G,B信号に対応する。横軸は、撮像素子111に入力される光量、縦軸は、入力画像のRGB各信号レベルの一例を示しており、撮像素子111に入力される光量に応じて、入力画像のRGB値が所定の比率で変化している。G信号は撮像素子111に入力される光量がBV0以上になると、撮像素子111からの出力信号レベルがTH0で飽和する。一方、R,B信号は、カラーフィルタの分光感度がGよりも低いため、撮像素子111に入力される光量が、BV0以上の値でも、撮像素子111からの出力信号レベルが飽和しない。
FIG. 3 is a diagram showing an example of the relationship between the amount of light input to the image sensor 111 and the RGB signal value of the input image input from the
次に、ホワイトバランスゲイン処理部202の動作について説明する。
Next, the operation of the white balance
入力画像のR,G,Bの信号値をそれぞれPin_R, Pin_G, Pin_B とすると、ホワイトバランスゲイン処理後の信号P1_R, P1_G, P1_B は、式(1)〜(3)の様に表される。WB_R,WB_G,WB_Bはホワイトバランスゲインの係数である。 Assuming that the signal values of R, G, and B of the input image are Pin_R, Pin_G, and Pin_B, respectively, the signals P1_R, P1_G, and P1_B after the white balance gain processing are represented by the equations (1) to (3). WB_R, WB_G, and WB_B are coefficients of white balance gain.
P1_R = WB_R × Pin_R …(1)
P1_G = WB_G × Pin_G …(2)
P1_B = WB_B × Pin_B …(3)
本実施形態ではG信号を基準に、R,B信号に対してホワイトバランスゲインを適用し、ホワイトバランスを調整する。したがって、式(1)〜(3)において、ホワイトバランスゲインの基準色であるG信号のゲインWB_Gの値は1(等倍)となり、それ以外の非基準色であるR,BのゲインWB_R,WB_Bの値は1よりも大きい値となる。
P1_R = WB_R x Pin_R ... (1)
P1_G = WB_G x Pin_G ... (2)
P1_B = WB_B x Pin_B ... (3)
In the present embodiment, the white balance gain is applied to the R and B signals with reference to the G signal to adjust the white balance. Therefore, in the equations (1) to (3), the value of the gain WB_G of the G signal, which is the reference color of the white balance gain, is 1 (equal magnification), and the gains WB_R of R and B, which are other non-reference colors, The value of WB_B is greater than 1.
図4は、ホワイトバランスゲインを適用した後の信号レベルの一例を示す図である。横軸が撮像素子111に入力される光量、縦軸は、画像入力端子200から入力されるRGB各信号に対して、式(1)〜(3)でホワイトバランスゲインを適用した後の信号レベルを示している。図4において、BV0以上の光量の被写体では、撮像素子111の出力飽和とホワイトバランス処理後のクリップ処理によって、G信号(P1_G)が飽和している。しかし、R信号(P1_R)、B信号(P1_B)については、センサ飽和レベルTH0以上の階調特性を維持している。
FIG. 4 is a diagram showing an example of the signal level after applying the white balance gain. The horizontal axis is the amount of light input to the image sensor 111, and the vertical axis is the signal level after applying the white balance gain in the equations (1) to (3) to each RGB signal input from the
ここで、システム制御部114において、入力画像に対するダイナミックレンジ拡張の拡張上限値がTH_maxに設定されているものとする。その場合、最も飽和レベルの高いR信号(P1_R)に近づくよう、G,Bの高輝度域の信号を拡張すると、高輝度域のRGB比が変動し、色曲りが発生してしまう。そこで、本実施形態では、拡張上限値に対して、RGB色空間とYUV色空間の2段階に分けて、信号レベルの拡張を行う。これにより、高輝度域での色比の変動を抑制しつつ、最終的な画像出力の輝度が所望の拡張上限値に達するよう処理を行う。
Here, it is assumed that the
具体的には、まず、第1の拡張処理部203において、RGB色空間で、色比がなるべく変動しないよう、R信号、B信号を参照しながら、高輝度域のG信号の拡張を行う。その後、拡張後のRGB信号を、色空間変換処理部204で、YUV色空間に変換し、第2の拡張処理部205において、出力輝度の最大値が拡張上限値になるよう、YUV空間で高輝度域の信号を拡張する。以下、より具体的に説明する。
Specifically, first, in the first
まず、第1の拡張処理部203の動作について説明する。第1の拡張処理部203では、RGB空間で、ホワイトバランス処理後のR,Bの信号値を維持し、G信号のみ高輝度域の信号を拡張する。G信号の拡張処理の一例として、本実施形態では、R−G色差、B−G色差を生成するためのG信号をそれぞれ独立に拡張し、拡張後に2種類のG信号の平均値を求める処理を行う。
First, the operation of the first
以下の説明において、P2_R、P2_G、P2_Bは、それぞれ、第1の拡張処理部203から出力されるR信号、G信号、B信号である。また、P2_GR、P2_GBは、拡張後のG信号生成のために中間的に生成される、R−G色差生成用のG信号、B−G色差生成用のG信号である。
In the following description, P2_R, P2_G, and P2_B are R signal, G signal, and B signal output from the first
図5は、第1の拡張処理部203の動作を示すフローチャートである。
FIG. 5 is a flowchart showing the operation of the first
図5において、S700で処理を開始し、ホワイトバランスゲイン処理後のRGB信号を第1の拡張処理部203に入力する。S701では、第1の拡張処理部203の出力のR信号としてホワイトバランスゲイン処理後のR信号をそのまま出力する。S711では、第1の拡張処理部203の出力のB信号としてホワイトバランスゲイン処理後のB信号をそのまま出力する。
In FIG. 5, the processing is started in S700, and the RGB signal after the white balance gain processing is input to the first
S702からS708は、R−G色差生成用のG信号の拡張処理の流れを示す。この処理フローにおいては、R信号をG信号の拡張の目標信号とし、G信号が所定の閾値以上であり、かつR信号以下である場合に拡張処理を行う。 S702 to S708 show the flow of the G signal expansion processing for generating the RG color difference. In this processing flow, the R signal is set as the target signal for expansion of the G signal, and the expansion processing is performed when the G signal is equal to or more than a predetermined threshold value and equal to or less than the R signal.
S702では、ホワイトバランスゲイン処理後のR,G信号を参照する。S703では、G信号の信号値が拡張処理を開始する閾値以上であるか否かを判定する。閾値以上である場合には、S704に進み、閾値未満である場合には、S707に進む。S707では、拡張処理前のG信号をR−G色差生成用のG信号として選択する。 In S702, the R and G signals after the white balance gain processing are referred to. In S703, it is determined whether or not the signal value of the G signal is equal to or greater than the threshold value for starting the expansion process. If it is equal to or more than the threshold value, the process proceeds to S704, and if it is less than the threshold value, the process proceeds to S707. In S707, the G signal before the expansion process is selected as the G signal for generating the RG color difference.
S704では、G信号の信号値がR信号以下か否かを判定し、R信号以下の場合にはS705に進む。G信号の信号値がR信号よりも大きい場合には、S707に進み、拡張処理前のG信号をR−G色差生成用のG信号として選択する。 In S704, it is determined whether or not the signal value of the G signal is equal to or less than the R signal, and if it is equal to or less than the R signal, the process proceeds to S705. If the signal value of the G signal is larger than the R signal, the process proceeds to S707, and the G signal before the expansion process is selected as the G signal for generating the RG color difference.
S705では、R信号を参照して、式(4)または式(5)に示す処理を行い、R−G色差生成用のG信号レベルの拡張を行う。 In S705, the processing shown in the equation (4) or the equation (5) is performed with reference to the R signal to expand the G signal level for generating the RG color difference.
P2_GR=(P1_R−P1_G)*f((P1_G−TH_t1)/(TH_t2−TH_t1))+P1_G …(4)
P2_GR=P1_R …(5)
式(4)は、拡張対象のG信号の信号レベルがR信号よりも低く、かつG信号の飽和レベルに達していない場合に適用される。式(4)において、TH_t1は、G信号の拡張処理を開始する信号レベルを示す。また、TH_t2は、G信号の拡張前の飽和レベルを示す。すなわち、G信号の信号レベルが、TH_t1からTH_t2に変化するまでの間に、f((P1_G−TH_t1)/(TH_t2−TH_t1))で決まる重みによって、ホワイトバランス処理後のG信号の信号レベルP1_Gを、拡張目標の信号レベルP1_Rに近づけるよう、拡張処理を行い、P2_GRとして出力する。このときの拡張処理の重みf(x)は、入力をx、出力をyとすると、例えば図6のような特性となる。
P2_GR = (P1_R-P1_G) * f ((P1_G-TH_t1) / (TH_t2-TH_t1)) + P1_G ... (4)
P2_GR = P1_R ... (5)
Equation (4) is applied when the signal level of the G signal to be extended is lower than that of the R signal and the saturation level of the G signal has not been reached. In the formula (4), TH_t1 indicates a signal level at which the expansion process of the G signal is started. Further, TH_t2 indicates the saturation level of the G signal before expansion. That is, the signal level of the G signal after white balance processing is P1_G by the weight determined by f ((P1_G-TH_t1) / (TH_t2-TH_t1)) until the signal level of the G signal changes from TH_t1 to TH_t2. Is expanded so as to approach the signal level P1_R of the expansion target, and is output as P2_GR. The weight f (x) of the expansion process at this time has the characteristics shown in FIG. 6, for example, assuming that the input is x and the output is y.
ここで、式(4)の処理により、P2_GRの信号レベルが拡張目標の信号レベルを超える場合には、式(5)が適用され、R信号が出力される。また、G信号の信号レベルがR信号よりも低いが、G信号の飽和レベルに達している場合にも、式(5)が適用され、R−G色差生成用のG信号としてR信号が出力される。 Here, when the signal level of P2_GR exceeds the signal level of the expansion target by the processing of the equation (4), the equation (5) is applied and the R signal is output. Further, even when the signal level of the G signal is lower than that of the R signal but the saturation level of the G signal is reached, the equation (5) is applied and the R signal is output as the G signal for generating the RG color difference. Will be done.
S706では、P2_GRをR−G色差生成用のG信号として選択する。S708では、S707または706から出力されるG信号のいずれかを、R−G色差生成用のG信号であるG1信号として選択し、S719に進む。 In S706, P2_GR is selected as the G signal for generating the RG color difference. In S708, either the G signal output from S707 or 706 is selected as the G1 signal which is the G signal for generating the RG color difference, and the process proceeds to S719.
ここで、R−G色差生成用のR信号、G信号の一例を図7(a)に示す。図7(a)において、P2_Rは、拡張目標の信号であるので、第1の拡張処理前後で信号レベルは変わらず、ホワイトバランスゲイン処理後のR信号P1_Rと等しくなる。また、G信号は、拡張開始の信号レベルTH_t1を超えたところから徐々に信号レベルが拡張され、R信号を超えないようにR信号に漸近し、TH_t3以降はR信号(P2_R)と等しくなる。 Here, an example of the R signal and the G signal for generating the RG color difference is shown in FIG. 7A. In FIG. 7A, since P2_R is the signal of the expansion target, the signal level does not change before and after the first expansion processing, and is equal to the R signal P1_R after the white balance gain processing. Further, the signal level of the G signal is gradually expanded from the point where it exceeds the signal level TH_t1 at the start of expansion, asymptotically approaches the R signal so as not to exceed the R signal, and becomes equal to the R signal (P2_R) after TH_t3.
図5の説明に戻って、S712からS718は、B−G色差生成用のG信号の拡張処理の流れを示す。この処理フローにおいては、B信号をG信号の拡張の目標信号とし、G信号が所定の閾値以上であり、かつB信号以下である場合に拡張処理を行う。 Returning to the description of FIG. 5, S712 to S718 show the flow of the G signal expansion processing for BG color difference generation. In this processing flow, the B signal is set as the target signal for expansion of the G signal, and the expansion processing is performed when the G signal is equal to or more than a predetermined threshold value and is equal to or less than the B signal.
S712では、ホワイトバランスゲイン処理後のB,G信号を参照する。S713では、G信号の信号値が拡張処理を開始する閾値以上であるか否かを判定する。閾値以上である場合には、S714に進み、閾値未満である場合には、S717に進む。S717では、拡張処理前のG信号をB−G色差生成用のG信号として選択する。 In S712, the B and G signals after the white balance gain processing are referred to. In S713, it is determined whether or not the signal value of the G signal is equal to or greater than the threshold value for starting the expansion process. If it is equal to or more than the threshold value, the process proceeds to S714, and if it is less than the threshold value, the process proceeds to S717. In S717, the G signal before the expansion process is selected as the G signal for generating the BG color difference.
S714では、G信号の信号値がB信号以下か否かを判定し、B信号以下の場合にはS715に進む。G信号の信号値がB信号よりも大きい場合には、S717に進み、拡張処理前のG信号をB−G色差生成用のG信号として選択する。 In S714, it is determined whether or not the signal value of the G signal is equal to or less than the B signal, and if it is equal to or less than the B signal, the process proceeds to S715. If the signal value of the G signal is larger than the B signal, the process proceeds to S717, and the G signal before the expansion process is selected as the G signal for generating the BG color difference.
S715では、B信号を参照して、式(6)または式(7)に示す処理を行い、B−G色差生成用のG信号レベルの拡張を行う。 In S715, the process shown in the equation (6) or the equation (7) is performed with reference to the B signal to expand the G signal level for generating the BG color difference.
P2_GB=(P1_B−P1_G)*f((P1_G−TH_t1)/(TH_t2−TH_t1))+P1_G …(6)
P2_GB=P1_B …(7)
式(6)は、拡張対象のG信号の信号レベルがB信号よりも低く、かつG信号の飽和レベルに達していない場合に適用される。式(6)において、TH_t1は、G信号の拡張処理を開始する信号レベルを示す。また、TH_t2は、G信号の拡張前の飽和レベルを示す。すなわち、G信号の信号レベルが、TH_t1からTH_t2に変化するまでの間に、f((P1_G−TH_t1)/(TH_t2−TH_t1))で決まる重みによって、ホワイトバランス処理後のG信号の信号レベルP1_Gを、拡張目標の信号レベルP1_Bに近づけるよう、拡張処理を行い、P2_GBとして出力する。このときの拡張処理の重みf(x)は、入力をx、出力をyとすると、例えば図6のような特性となる。
P2_GB = (P1_B-P1_G) * f ((P1_G-TH_t1) / (TH_t2-TH_t1)) + P1_G ... (6)
P2_GB = P1_B ... (7)
Equation (6) is applied when the signal level of the G signal to be extended is lower than that of the B signal and the saturation level of the G signal has not been reached. In equation (6), TH_t1 indicates the signal level at which the expansion process of the G signal is started. Further, TH_t2 indicates the saturation level of the G signal before expansion. That is, the signal level of the G signal after white balance processing is P1_G by the weight determined by f ((P1_G-TH_t1) / (TH_t2-TH_t1)) until the signal level of the G signal changes from TH_t1 to TH_t2. Is expanded so as to approach the signal level P1_B of the expansion target, and is output as P2_GB. The weight f (x) of the expansion process at this time has the characteristics shown in FIG. 6, for example, assuming that the input is x and the output is y.
ここで、式(6)の処理により、P2_GBの信号レベルが拡張目標の信号レベルを超える場合には、式(7)が適用され、B信号が出力される。また、G信号の信号レベルがB信号よりも低いが、G信号の飽和レベルに達している場合にも、式(7)が適用され、B−G色差生成用のG信号としてB信号が出力される。 Here, when the signal level of P2_GB exceeds the signal level of the expansion target by the processing of the equation (6), the equation (7) is applied and the B signal is output. Further, even when the signal level of the G signal is lower than that of the B signal but the saturation level of the G signal is reached, the equation (7) is applied and the B signal is output as the G signal for generating the BG color difference. Will be done.
S716では、P2_GBをB−G色差生成用のG信号として選択する。S718では、S717またはS716から出力されるG信号のいずれかを、B−G色差生成用のG信号であるG2信号として選択し、S719に進む。 In S716, P2_GB is selected as the G signal for generating the BG color difference. In S718, either the G signal output from S717 or S716 is selected as the G2 signal, which is the G signal for generating the BG color difference, and the process proceeds to S719.
ここで、B−G色差生成用のB信号、G信号の一例を図7(b)に示す。図7(b)において、P2_Bは、拡張目標の信号であるので、第1の拡張処理前後で信号レベルは変わらず、ホワイトバランスゲイン処理後のB信号P1_Bと等しくなる。また、拡張目標のB信号が拡張対象のG信号の飽和レベルを超えるところから、拡張対象のG信号はB信号に置換される。 Here, an example of the B signal and the G signal for generating the BG color difference is shown in FIG. 7 (b). In FIG. 7B, since P2_B is the signal of the expansion target, the signal level does not change before and after the first expansion processing, and is equal to the B signal P1_B after the white balance gain processing. Further, since the B signal of the expansion target exceeds the saturation level of the G signal of the expansion target, the G signal of the expansion target is replaced with the B signal.
S719では、R−G色差生成用のG信号G1と、B−G色差生成用のG信号G2の平均値を算出し、最終的な第1の拡張処理部203のG信号として出力する。
In S719, the average value of the G signal G1 for generating the RG color difference and the G signal G2 for generating the BG color difference is calculated and output as the final G signal of the first
図7(c)に、第1の拡張処理後のR,G,B信号の一例を示す。図7(c)において、P2_Gは、Rを参照したG信号の拡張結果と、Bを参照したG信号の拡張結果の平均値となる特性で拡張されている。そのため、図3に示す第1の拡張処理前のR,G,B信号と比べても、明るさに対するRGBの色比が著しく変動せず、信号のダイナミックレンジをTH_0から、TH_3まで拡張することができている。 FIG. 7C shows an example of the R, G, and B signals after the first expansion process. In FIG. 7C, P2_G is expanded with a characteristic that is an average value of the expansion result of the G signal referring to R and the expansion result of the G signal referring to B. Therefore, the color ratio of RGB to the brightness does not change significantly as compared with the R, G, and B signals before the first expansion process shown in FIG. 3, and the dynamic range of the signal is expanded from TH_0 to TH_3. Is done.
次に、色空間変換処理部204の処理内容について説明する。色空間変換処理部204では、第1の拡張処理後のRGB信号、P2_R,P2_G,P2_Bを用いて、式(8)〜式(10)の演算を行い、輝度・色差信号YUVを生成する。
Next, the processing contents of the color space
Y=a*P2_Rγ+b*P2_Gγ+c*P2_Bγ …(8)
V=p*(P2_Rγ−P2_RGγ)+q*(P2_Bγ−P2_BGγ) …(9)
U=r*(P2_Bγ−P2_BGγ)+s*(P2_Rγ−P2_RGγ) …(10)
式(8)〜式(10)において、γは、入力される拡張後の信号に対して適用されるガンマ変換処理の特性を示す係数であり、例えばγ=0.45となる。a,b,cは、ガンマ変換後のRGB信号から輝度信号を生成するためのマトリクス係数であり、a+b+c=1となるような係数が適用される。p,q,r,sは、γ変換後のRGB信号から色差信号を生成するためのマトリクス係数である。マトリクス係数p,q,r,sは、BT.601、BT.709など出力の映像信号規格と画質調整の要素に鑑みて、適宜調整されるものとする。
Y = a * P2_R γ + b * P2_G γ + c * P2_B γ ... (8)
V = p * (P2_R γ −P2_RG γ ) + q * (P2_B γ −P2_BG γ )… (9)
U = r * (P2_B γ- P2_BG γ ) + s * (P2_R γ- P2_RG γ ) ... (10)
In equations (8) to (10), γ is a coefficient indicating the characteristics of the gamma conversion process applied to the input expanded signal, and for example, γ = 0.45. a, b, and c are matrix coefficients for generating a luminance signal from the RGB signal after gamma conversion, and a coefficient such that a + b + c = 1 is applied. p, q, r, and s are matrix coefficients for generating a color difference signal from the RGB signal after γ conversion. The matrix coefficients p, q, r, and s shall be appropriately adjusted in consideration of the output video signal standard such as BT.601 and BT.709 and the elements of image quality adjustment.
次に、第2の拡張処理部205の処理内容について説明する。第2の拡張処理部205では、色空間変換処理部204から出力されるYUV信号に対して、式(11)〜式(13)に示す演算を行う。そして、システム制御部114で設定された拡張上限値に対応するYUV信号、Y_out,U_out,V_outを生成する。
Next, the processing content of the second
Y_out=Y*g(Y) …(11)
U_out=U*g(Y)*k …(12)
V_out=V*g(Y)*k …(13)
式(11)〜式(13)において、g(Y)は、色空間変換処理部204から出力される、第1の拡張処理後の輝度値Yに応じて決まる、YUV信号の振幅変調特性である。輝度値Yに対するゲインの特性を、図8に示す。
Y_out = Y * g (Y) ... (11)
U_out = U * g (Y) * k ... (12)
V_out = V * g (Y) * k ... (13)
In equations (11) to (13), g (Y) is an amplitude modulation characteristic of the YUV signal, which is output from the color space
ここでRGBのうち、輝度信号に対して組成比が最も大きいのはG信号であるため、G信号に基づいて、図8の特性を決める。図8において、振幅変調の開始輝度レベルx1と終了輝度レベルx2は、G信号に対する第1の拡張処理の下限拡張レベルTH_t1、G信号に対する第1の拡張処理の上限拡張レベルTH_t3を設定する。 Here, among RGB, the G signal has the largest composition ratio with respect to the luminance signal, so the characteristics of FIG. 8 are determined based on the G signal. In FIG. 8, the start luminance level x1 and the end luminance level x2 of the amplitude modulation set the lower limit expansion level TH_t1 of the first expansion process for the G signal and the upper limit extension level TH_t3 of the first expansion process for the G signal.
また、図8において、振幅変調ゲインの下限は、1.0であり、振幅変調ゲインの上限は、パラメータy1,y2の比で決まる。y1には、G信号に対する第1の拡張の上限拡張レベルTH_t3が設定され、y2には、システム制御部114から送出された、拡張上限値TH_maxが設定される。すなわち、振幅変調ゲインg(Y)は、輝度Yがx1からx2までの範囲で1.0から徐々に増大し、最終的に、上限値y2/y1=TH_max/TH_t3となる。
Further, in FIG. 8, the lower limit of the amplitude modulation gain is 1.0, and the upper limit of the amplitude modulation gain is determined by the ratio of the parameters y1 and y2. The upper limit expansion level TH_t3 of the first extension for the G signal is set in y1, and the extension upper limit value TH_max sent from the
このように目標値との差分に応じて算出された拡張量である、ゲインg(Y)を用いて、色空間変換処理部204から出力されるYUV信号の振幅がそれぞれ変調される。また、U,V信号に対しては、輝度信号Yと独立に彩度を微調整できるよう、式(12)、式(13)では、任意の係数kが設定される。
The amplitude of the YUV signal output from the color space
以上の処理により、本実施形態では、RGB色空間とYUV色空間の2段階に分けて、信号レベルの拡張を行うことにより、高輝度域での色比の変動を抑制しつつ、入力画像に対して、あらかじめ設定された、所望の上限輝度値を実現することが可能となる。 By the above processing, in the present embodiment, the signal level is expanded by dividing it into two stages of RGB color space and YUV color space, so that the input image can be obtained while suppressing the fluctuation of the color ratio in the high luminance range. On the other hand, it is possible to realize a preset upper limit brightness value.
(他の実施形態)
また本発明は、上述の実施形態の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサーがプログラムを読出し実行する処理でも実現できる。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現できる。
(Other embodiments)
The present invention also supplies a program that realizes one or more functions of the above-described embodiment to a system or device via a network or storage medium, and one or more processors in the computer of the system or device reads the program. It can also be realized by the processing to be executed. It can also be realized by a circuit (for example, ASIC) that realizes one or more functions.
発明は上記実施形態に制限されるものではなく、発明の精神及び範囲から離脱することなく、様々な変更及び変形が可能である。従って、発明の範囲を公にするために請求項を添付する。 The invention is not limited to the above embodiments, and various modifications and modifications can be made without departing from the spirit and scope of the invention. Therefore, a claim is attached to make the scope of the invention public.
100:撮像装置、114:システム制御部、115:画像処理部、202:ホワイトバランスゲイン処理部、203:第1の拡張処理部、204:色空間変換処理部、205:第2の拡張処理部 100: Imaging device, 114: System control unit, 115: Image processing unit, 202: White balance gain processing unit, 203: First expansion processing unit, 204: Color space conversion processing unit, 205: Second expansion processing unit
Claims (12)
前記入力画像に対して、ホワイトバランス調整を行うホワイトバランス処理手段と、
ホワイトバランス処理後の信号に対し、第1の色空間においてダイナミックレンジを拡張する第1の拡張処理を行う第1の拡張処理手段と、
前記第1の拡張処理が行われた後の信号を第2の色空間の信号に変換する変換手段と、
前記変換手段により前記第2の色空間に変換された信号に対し、前記第2の色空間においてダイナミックレンジをさらに拡張する第2の拡張処理を行う第2の拡張処理手段と、
を備えることを特徴とする画像処理装置。 An input means for inputting an input image, which is an image signal having a plurality of color signals,
A white balance processing means for adjusting the white balance of the input image,
A first expansion processing means for performing a first expansion processing for expanding the dynamic range in the first color space for the signal after the white balance processing, and
A conversion means for converting the signal after the first expansion process into a signal in the second color space, and
A second expansion processing means that performs a second expansion processing for further expanding the dynamic range in the second color space with respect to the signal converted into the second color space by the conversion means.
An image processing apparatus comprising.
請求項1乃至8のいずれか1項に記載の画像処理装置と、
を備えることを特徴とする撮像装置。 An imaging means for capturing a subject image and
The image processing apparatus according to any one of claims 1 to 8.
An imaging device characterized by comprising.
前記入力画像に対して、ホワイトバランス調整を行うホワイトバランス処理工程と、
ホワイトバランス処理後の信号に対し、第1の色空間においてダイナミックレンジを拡張する第1の拡張処理を行う第1の拡張処理工程と、
前記第1の拡張処理が行われた後の信号を第2の色空間の信号に変換する変換工程と、
前記変換工程において前記第2の色空間に変換された信号に対し、前記第2の色空間においてダイナミックレンジをさらに拡張する第2の拡張処理を行う第2の拡張処理工程と、
を有することを特徴とする画像処理方法。 An input process for inputting an input image, which is an image signal having a plurality of color signals,
A white balance processing step for adjusting the white balance of the input image, and
A first expansion processing step of performing a first expansion processing for expanding the dynamic range in the first color space for the signal after the white balance processing, and
A conversion step of converting the signal after the first expansion process into a signal in the second color space, and
A second expansion processing step of performing a second expansion processing for further expanding the dynamic range in the second color space with respect to the signal converted into the second color space in the conversion step.
An image processing method characterized by having.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2019027651A JP7344648B2 (en) | 2019-02-19 | 2019-02-19 | Image processing device, image processing method, imaging device, program, storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2019027651A JP7344648B2 (en) | 2019-02-19 | 2019-02-19 | Image processing device, image processing method, imaging device, program, storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2020136890A true JP2020136890A (en) | 2020-08-31 |
JP7344648B2 JP7344648B2 (en) | 2023-09-14 |
Family
ID=72263846
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2019027651A Active JP7344648B2 (en) | 2019-02-19 | 2019-02-19 | Image processing device, image processing method, imaging device, program, storage medium |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP7344648B2 (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2002135787A (en) * | 2000-10-18 | 2002-05-10 | Hitachi Ltd | Imaging apparatus |
JP2009118158A (en) * | 2007-11-06 | 2009-05-28 | Ricoh Co Ltd | Imaging apparatus and imaging method |
JP2014112780A (en) * | 2012-12-05 | 2014-06-19 | Samsung R&D Institute Japan Co Ltd | Image pickup device, image pickup method, and program |
JP2017126920A (en) * | 2016-01-15 | 2017-07-20 | キヤノン株式会社 | Imaging apparatus |
-
2019
- 2019-02-19 JP JP2019027651A patent/JP7344648B2/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2002135787A (en) * | 2000-10-18 | 2002-05-10 | Hitachi Ltd | Imaging apparatus |
JP2009118158A (en) * | 2007-11-06 | 2009-05-28 | Ricoh Co Ltd | Imaging apparatus and imaging method |
JP2014112780A (en) * | 2012-12-05 | 2014-06-19 | Samsung R&D Institute Japan Co Ltd | Image pickup device, image pickup method, and program |
JP2017126920A (en) * | 2016-01-15 | 2017-07-20 | キヤノン株式会社 | Imaging apparatus |
Also Published As
Publication number | Publication date |
---|---|
JP7344648B2 (en) | 2023-09-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5148989B2 (en) | Imaging device | |
JP6282156B2 (en) | Image device, image processing method, control program, and storage medium | |
US8254675B2 (en) | Image processing apparatus, imaging apparatus and image processing program | |
EP2426928A2 (en) | Image processing apparatus, image processing method and program | |
JP2012205244A (en) | Image processing device and method of controlling the same | |
JP4999871B2 (en) | Imaging apparatus and control method thereof | |
JP2017212532A (en) | Image processing apparatus | |
JP2018182376A (en) | Image processing apparatus | |
CN106575434B (en) | Image processing apparatus, imaging apparatus, and image processing method | |
WO2013153810A1 (en) | Imaging device and method for controlling same | |
JP6243629B2 (en) | Image processing apparatus and method, and imaging apparatus | |
JP6423668B2 (en) | Image processing apparatus, control method therefor, and program | |
JP2010273001A (en) | Image processor, imaging apparatus, and synthetic image generating method | |
JP2013192057A (en) | Imaging apparatus, control method of the same, and control program | |
JP7344648B2 (en) | Image processing device, image processing method, imaging device, program, storage medium | |
JP2017130836A (en) | Image processing apparatus, image processing method, and program | |
JP5335964B2 (en) | Imaging apparatus and control method thereof | |
JP2013009105A (en) | Image processing apparatus and image processing method | |
JP5803233B2 (en) | Imaging apparatus and imaging method | |
JP2008227959A (en) | Image processing device, image processing method and image processing system | |
JP7216516B2 (en) | IMAGE PROCESSING APPARATUS AND IMAGE PROCESSING METHOD, PROGRAM, STORAGE MEDIUM | |
JP5754929B2 (en) | Image processing apparatus and image processing method | |
US11641525B2 (en) | Image capturing apparatus capable of displaying live view image high in visibility, method of controlling image capturing apparatus, and storage medium | |
JP7282536B2 (en) | Image processing device, image processing method and program | |
JP6649176B2 (en) | Image processing apparatus and image processing method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
RD01 | Notification of change of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7421 Effective date: 20210103 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20210113 |
|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20220202 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20230106 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20230224 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20230418 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20230804 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20230904 |
|
R151 | Written notification of patent or utility model registration |
Ref document number: 7344648 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |