JP7446847B2 - Image processing device, image processing method, and program - Google Patents
Image processing device, image processing method, and program Download PDFInfo
- Publication number
- JP7446847B2 JP7446847B2 JP2020024948A JP2020024948A JP7446847B2 JP 7446847 B2 JP7446847 B2 JP 7446847B2 JP 2020024948 A JP2020024948 A JP 2020024948A JP 2020024948 A JP2020024948 A JP 2020024948A JP 7446847 B2 JP7446847 B2 JP 7446847B2
- Authority
- JP
- Japan
- Prior art keywords
- gain
- image
- dynamic range
- characteristic
- processing
- 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.)
- Active
Links
- 238000012545 processing Methods 0.000 title claims description 113
- 238000003672 processing method Methods 0.000 title claims 3
- 238000011161 development Methods 0.000 claims description 66
- 238000000034 method Methods 0.000 claims description 29
- 238000012937 correction Methods 0.000 claims description 19
- 230000009467 reduction Effects 0.000 claims description 13
- 230000008569 process Effects 0.000 claims description 12
- 238000001914 filtration Methods 0.000 claims 2
- 238000006243 chemical reaction Methods 0.000 description 39
- 238000010586 diagram Methods 0.000 description 15
- 230000007423 decrease Effects 0.000 description 14
- 230000000694 effects Effects 0.000 description 14
- 239000002131 composite material Substances 0.000 description 12
- 230000003247 decreasing effect Effects 0.000 description 7
- 230000006872 improvement Effects 0.000 description 6
- 230000015572 biosynthetic process Effects 0.000 description 5
- 230000008859 change Effects 0.000 description 5
- 238000003786 synthesis reaction Methods 0.000 description 5
- 230000004044 response Effects 0.000 description 3
- 238000003384 imaging method Methods 0.000 description 2
- 239000003086 colorant Substances 0.000 description 1
- 230000006835 compression Effects 0.000 description 1
- 238000007906 compression Methods 0.000 description 1
- 238000007796 conventional method Methods 0.000 description 1
- 230000007274 generation of a signal involved in cell-cell signaling Effects 0.000 description 1
- 239000000203 mixture Substances 0.000 description 1
- 238000011946 reduction process Methods 0.000 description 1
Images
Landscapes
- Image Processing (AREA)
- Facsimile Image Signal Circuits (AREA)
Description
本発明は、撮像された画像を階調処理等する画像処理技術に関する。 The present invention relates to an image processing technique that performs gradation processing or the like on a captured image.
ハイダイナミックレンジ(HDR:High Dynamic Range)表示は、標準ダイナミックレンジ(SDR:Standard Dynamic Range)表示と比べて、ダイナミックレンジの広い映像の表現が可能である。HDR表示の場合、SDR表示では表現しきれなかった高輝度の表現や輝度の高い色の表現が可能である。 High Dynamic Range (HDR) display can express images with a wider dynamic range than Standard Dynamic Range (SDR) display. In the case of HDR display, it is possible to express high brightness and colors with high brightness, which cannot be fully expressed with SDR display.
また従来技術として、入力画像から低周波画像を生成し、その低周波画像に基づく階調処理を入力画像に施すことで、画像のコントラストを向上させる技術がある。特許文献1には、入力画像の縮小画像から生成したゲインマップを基に強調信号を生成し、入力画像に本来適用したいゲイン特性のゲインマップに対して、その強調信号を足すことで、コントラスト向上効果の高いゲインマップを生成する技術が開示されている。
Furthermore, as a conventional technique, there is a technique for improving the contrast of an image by generating a low-frequency image from an input image and performing gradation processing on the input image based on the low-frequency image.
ところで、HDR撮影したRAW(生)画像をHDR現像した場合には、狙い通りのコントラストで現像されるため、コントラストの低下は発生しない。これに対し、HDR撮影したRAW画像をSDR現像する場合には、SDR現像によって階調圧縮が生ずるため、画像のコントラストが低下してしまう。またHDR撮影したRAW画像を、HDR現像してHDR表示可能な表示装置に表示した場合と、SDR現像してSDR表示しかできない表示装置に表示した場合とでは、画像の印象が異なってしまう。 By the way, when a RAW image photographed using HDR is subjected to HDR development, the image is developed with the desired contrast, so no reduction in contrast occurs. On the other hand, when a RAW image photographed using HDR is subjected to SDR development, gradation compression occurs due to SDR development, resulting in a decrease in the contrast of the image. Furthermore, the impression of the image will be different when a RAW image shot in HDR is developed using HDR and displayed on a display device capable of displaying HDR, and when developed using SDR and displayed on a display device capable of displaying only SDR.
そこで、本発明は、HDR撮影したRAW画像をSDR現像した場合でも、HDR現像した場合のコントラストに近い印象の画像を生成可能にすることを目的とする。 Therefore, an object of the present invention is to make it possible to generate an image with a contrast similar to that obtained when HDR development is performed even when a RAW image photographed using HDR is subjected to SDR development.
本発明の画像処理装置は、未現像の画像を現像する際のゲイン処理に用いるゲイン信号を生成する生成手段と、前記生成手段により生成されたゲイン信号を用いて、前記未現像の画像に対して前記ゲイン処理を行う処理手段と、を有し、前記未現像の画像を用いて、第1のダイナミックレンジよりも狭いダイナミックレンジである第2のダイナミックレンジに対応した現像処理が行われる場合、前記生成手段は、前記第1のダイナミックレンジに対応したガンマ特性と前記第2のダイナミックレンジに対応したガンマ特性とで差がない領域では共通した特性となり、前記第1のダイナミックレンジに対応したガンマ特性と前記第2のダイナミックレンジに対応したガンマ特性とに差がある領域では、前記第2のダイナミックレンジに対応したガンマ特性を前記第1のダイナミックレンジに対応するように変更した特性となる、ゲイン特性に基づいて、前記ゲイン信号を生成することを特徴とする。 The image processing apparatus of the present invention includes a generation means for generating a gain signal used for gain processing when developing an undeveloped image, and a gain signal generated by the generation means to generate a gain signal for the undeveloped image. processing means for performing the gain processing using the undeveloped image, and the undeveloped image is used to perform development processing corresponding to a second dynamic range that is a narrower dynamic range than the first dynamic range; The generating means is configured to generate a gamma characteristic corresponding to the first dynamic range that has a common characteristic in a region where there is no difference between the gamma characteristic corresponding to the first dynamic range and the gamma characteristic corresponding to the second dynamic range. In a region where there is a difference between the characteristics and the gamma characteristics corresponding to the second dynamic range, the gamma characteristics corresponding to the second dynamic range are changed to correspond to the first dynamic range, The method is characterized in that the gain signal is generated based on gain characteristics .
本発明によれば、HDR撮影したRAW画像をSDR現像した場合でも、HDR現像した場合のコントラストに近い印象の画像を生成可能となる。 According to the present invention, even when a RAW image photographed using HDR is subjected to SDR development, it is possible to generate an image with a contrast similar to that obtained when HDR development is performed.
以下、本発明の実施形態を、添付の図面に基づいて詳細に説明する。なお、以下の実施形態において示す構成は一例に過ぎず、本発明は図示された構成に限定されるものではない。同一の構成または処理については、同じ参照符号を付して説明する。
図1は、本実施形態の画像処理装置の概略構成を示した機能ブロック図である。また、図2は、本実施形態の画像処理装置における画像処理の流れを示したフローチャートである。
Hereinafter, embodiments of the present invention will be described in detail based on the accompanying drawings. Note that the configurations shown in the following embodiments are merely examples, and the present invention is not limited to the illustrated configurations. Identical configurations or processes will be described using the same reference numerals.
FIG. 1 is a functional block diagram showing a schematic configuration of an image processing apparatus according to this embodiment. Further, FIG. 2 is a flowchart showing the flow of image processing in the image processing apparatus of this embodiment.
図1に示した画像処理装置の構成および図2に示したフローチャートの処理の詳細について述べる前に、本実施形態における画像処理の概要を説明する。
本実施形態の画像処理装置は、入力された画像に対しゲイン処理を行い、その処理後の画像を出力するような画像処理を実施する。画像処理装置への入力画像は、ハイダイナミックレンジ(HDR)撮影が可能な撮像装置による撮像で得られたRAW(生)画像、つまり未現像の撮像画像であるとする。また画像処理装置に入出力する画像は輝度信号によって構成されている輝度画像であるとする。撮像画像の取得やその撮像信号に対する現像処理、輝度画像の生成処理等の各種信号処理のための構成とその説明は省略する。
Before describing the configuration of the image processing apparatus shown in FIG. 1 and the details of the processing in the flowchart shown in FIG. 2, an overview of the image processing in this embodiment will be described.
The image processing apparatus of this embodiment performs image processing such as performing gain processing on an input image and outputting the processed image. It is assumed that the input image to the image processing device is a RAW image obtained by imaging with an imaging device capable of high dynamic range (HDR) photography, that is, an undeveloped captured image. It is also assumed that the image input/output to the image processing device is a luminance image composed of luminance signals. The configuration and explanation thereof for various signal processing such as acquisition of a captured image, development processing for the captured image signal, and generation processing of a brightness image will be omitted.
ここで、HDR撮影で得られたRAW画像(未現像の撮像画像)を、HDR現像する場合とSDR現像する場合とで生ずる画像の印象の変化について説明する。
図3は、HDR撮影で得られたRAW画像を、SDR現像した場合とHDR現像した場合とで輝度信号に生ずる差を示した図である。図3の縦軸は輝度信号を示し、横軸は画像のx方向(x座標方向)を示している。図3中の実線部302はHDR現像による輝度信号例を示し、点線部301はSDR現像による輝度信号例を示している。これら実線部302と点線部301の輝度信号を比較すると、点線部301で示されたSDR現像による信号の最大輝度値がY1である場合、実線部302で示されたHDR現像による信号の最大輝度値はY2となる。この図3の例の場合、点線部301で示される信号と実線部302で示される信号との間の最大輝度値の差はY2-Y1となり、HDR現像による信号に比べ、SDR現像による信号のコントラストは低下していることが判る。このようにHDR現像された場合とSDR現像された場合とで信号値に差が生ずる原因は、HDRの方がSDRと比べて、より明るいレンジまで表現可能であり、SDR現像された信号はHDR現像された信号と比べて階調が圧縮されているためである。例えば、SDR現像が行われた場合、HDR現像が行われた場合に比べて、画像の白部分の信号値が低くなってコントラストが低下する。したがって、HDR撮影で得られたRAW画像を、HDR現像した場合とSDR現像した場合とでは、コントラストに関して画像の印象が異なる(つまりコントラスト効果が異なる)ようになる。
Here, a change in image impression that occurs when a RAW image (undeveloped captured image) obtained by HDR photography is subjected to HDR development and SDR development will be described.
FIG. 3 is a diagram showing the difference that occurs in luminance signals when a RAW image obtained by HDR photography is subjected to SDR development and when HDR development is performed. The vertical axis in FIG. 3 indicates the luminance signal, and the horizontal axis indicates the x direction (x coordinate direction) of the image. A
このようなことから、本実施形態の画像処理装置は、HDR撮影したRAW画像をSDR現像する場合、HDR現像時とSDR現像時との両ガンマ特性を基に、現像処理時のゲイン処理に用いるゲイン特性を調整する。
本実施形態の画像処理装置は、HDR現像時とSDR現像時とでガンマ特性が同じ(ガンマ特性に差がない)領域については、SDR撮影したRAW画像をSDR現像する場合と同じ(共通の)特性のゲイン処理が行われるようにする。一方、画像処理装置は、HDR現像時とSDR現像時とでガンマ特性に差が生じている領域については、入力画像から生成した低周波画像に基づくゲインマップと、HDR現像とSDR現像とのガンマ特性の差分とに基づいてゲインマップの強調信号を生成する。そして画像処理装置は、入力画像に本来適用したいゲイン特性のゲインマップに対して、前述のように生成したゲインマップの強調信号を足すことで、コントラスト向上効果の高いゲインマップを生成し、そのゲインマップを用いたゲイン処理を入力画像に施す。これにより、SDR現像時にもHDR現像時に近い印象のコントラストの画像の取得が可能となる。なお、以下の説明において、HDR現像時のガンマ特性をHDRガンマと表記し、SDR現像時のガンマ特性をSDRガンマと表記する。
For this reason, when performing SDR development on a RAW image captured using HDR, the image processing apparatus of the present embodiment uses the gamma characteristics of both HDR development and SDR development for gain processing during development processing. Adjust gain characteristics.
The image processing apparatus of this embodiment has the same gamma characteristics (no difference in gamma characteristics) between HDR development and SDR development as in the case of SDR development of a RAW image shot with SDR (common). Allow characteristic gain processing to be performed. On the other hand, for areas where there is a difference in gamma characteristics between HDR development and SDR development, the image processing device uses a gain map based on a low-frequency image generated from the input image and a gamma map between HDR development and SDR development. A gain map emphasis signal is generated based on the characteristic difference. Then, the image processing device generates a gain map with a high contrast improvement effect by adding the emphasis signal of the gain map generated as described above to the gain map of the gain characteristic originally desired to be applied to the input image, and Apply gain processing to the input image using a map. This makes it possible to obtain an image with a contrast similar to that during HDR development even during SDR development. In the following description, the gamma characteristic during HDR development will be expressed as HDR gamma, and the gamma characteristic during SDR development will be expressed as SDR gamma.
ここで、ゲイン特性とは、例えば図4(a)のグラフに示すように、横軸を入力輝度信号、縦軸をゲイン信号としたテーブルによって表される特性である。また、ゲインマップは、図4(b)に示すように、画像の各画素位置に対応して適用するゲイン値が決められたマップである。図4(b)の例では、各画素の座標(x,y)の位置に対してそれぞれ適用されるゲイン値Gain(x,y)が2次元配列されたマップとなされている。各画素の座標(x,y)のxの値は0,1,2,・・・,W-1の何れか、yの値は0,1,2,・・・,H-1の何れかとなる。 Here, the gain characteristic is a characteristic expressed by a table in which the horizontal axis is the input luminance signal and the vertical axis is the gain signal, as shown in the graph of FIG. 4A, for example. Further, the gain map is a map in which gain values to be applied are determined corresponding to each pixel position of the image, as shown in FIG. 4(b). In the example of FIG. 4(b), the map is a two-dimensional array of gain values Gain(x, y) applied to the position of the coordinates (x, y) of each pixel. The x value of the coordinates (x, y) of each pixel is 0, 1, 2, ..., W-1, and the y value is 0, 1, 2, ..., H-1. It will be.
以下、前述したようなコントラスト向上効果の高いゲインマップを生成可能な、図1の本実施形態の画像処理装置の構成及び画像処理について詳細に説明する。
本実施形態の画像処理装置は、大別して、ローカルゲインマップ生成部110と、グローバルゲインマップ生成部111と、ゲイン処理部112との、3つを有して構成されている。
Hereinafter, the configuration and image processing of the image processing apparatus of this embodiment shown in FIG. 1, which can generate a gain map with a high contrast improvement effect as described above, will be described in detail.
The image processing apparatus of this embodiment is roughly divided into three components: a local gain
ローカルゲインマップ生成部110は、画像処理装置に入力された輝度画像から、局所的にコントラストを調整するためのローカルゲインマップ(ローカルコントラストゲインマップ)を生成する。ローカルゲインマップは、前述の図4(b)のように各画素位置に対応してゲイン値が2次元配置されたマップである。ローカルゲインマップ生成部110は、入力された輝度画像から低周波画像を生成し、その低周波画像に対して、ゲイン特性を適用することにより、ローカルゲインマップを生成する。ローカルゲインマップ生成部110において用いられるゲイン特性の詳細は後述する。
The local gain
グローバルゲインマップ生成部111は、入力された輝度画像の輝度値に応じて、画像の明るさ調整するためのグローバルゲインマップ(グローバルコントラストゲインマップ)を生成する。グローバルゲインマップも、前述の図4(b)のように各画素位置に対応してゲイン値が2次元配置されたマップである。
The global gain
さらにグローバルゲインマップ生成部111は、そのグローバルゲインマップに、ローカルゲインマップ生成部110で生成されたローカルゲインマップを加算することで、最終的なゲインマップを生成する。最終的なゲインマップも、図4(b)のように各画素位置に対応してゲイン値が2次元配置されたマップである。最終的なゲインマップは、入力画像に対してゲイン処理を行う際に用いられるゲインマップである。
Furthermore, the global gain
このように、本実施形態の画像処理装置は、グローバルゲインマップによる明るさ調整とローカルゲインマップによるローカルコントラスト調整とをそれぞれ独立に制御可能となされている。さらに本実施形態の画像処理装置は、ローカルゲインマップに対して、強調信号を足すことで、コントラスト向上効果の高いローカルゲインマップを生成する。そして、本実施形態の画像処理装置は、それらグローバルゲインマップとローカルゲインマップとから、最終的なゲインマップを生成している。 In this manner, the image processing apparatus of this embodiment is capable of independently controlling brightness adjustment using the global gain map and local contrast adjustment using the local gain map. Furthermore, the image processing device of this embodiment generates a local gain map with a high contrast improvement effect by adding an emphasis signal to the local gain map. Then, the image processing apparatus of this embodiment generates a final gain map from these global gain maps and local gain maps.
以下、本実施形態の画像処理装置において行われる画像処理について、図2のフローチャートを用いて詳細に説明する。また、図2のフローチャートと図1の機能ブロック図との対応について説明する。 Image processing performed in the image processing apparatus of this embodiment will be described in detail below using the flowchart of FIG. Furthermore, the correspondence between the flowchart in FIG. 2 and the functional block diagram in FIG. 1 will be explained.
先ずステップS201において、ローカルゲインマップ生成部110は、入力画像である輝度画像を基に、ローカルゲインマップを生成する。ステップS201で行われる、ローカルゲインマップ生成処理の詳細は後述する。
First, in step S201, the local gain
次にステップS202において、グローバルゲインマップ生成部111は、輝度画像である入力画像の輝度に応じて明るさを調整するためのグローバルゲインマップを生成する。さらに、グローバルゲインマップ生成部111は、その生成したグローバルゲインマップと、ステップS201で生成されたローカルゲインマップとを基に、最終的なゲインマップを生成する。ステップS202で行われる、ローバルゲインマップの生成処理および最終的なゲインマップの生成処理の詳細は後述する。
Next, in step S202, the global gain
次にステップS203において、ゲイン処理部112は、ステップS202で生成された最終的なゲインマップを用いて、入力画像に対しゲインをかける処理(ゲイン処理)を行う。ここで、入力画像の座標(x,y)における輝度信号値をIMin(x,y)とし、ゲイン処理後の出力画像の輝度信号値をIMout(x,y)とする。また、HDR撮影によるRAW画像をSDR現像する場合に、SDR現像後の画像においてHDR現像された画像と同等のコントラストを得るための最終的なゲインマップにおける座標(x,y)のゲイン値をGMlast(x,y)とする。この場合、ゲイン処理後の出力画像の輝度信号値IMout(x,y)は、式(1)のように表される。
Next, in step S203, the
IMout(x,y)=GMlast(x,y)×IMin(x,y) 式(1) IMout(x,y)=GMlast(x,y)×IMin(x,y) Equation (1)
なお以下の説明において、HDR撮影によるRAW画像をSDR現像する場合に、SDR現像後の画像をHDR現像された画像と同等のコントラストにするためのゲインマップのゲイン特性を、HDR-SDR変換ゲイン特性と表記する。HDR-SDR変換ゲイン特性の詳細については後述する。 In the following explanation, when performing SDR development on a RAW image obtained by HDR photography, the gain characteristic of the gain map for making the image after SDR development have the same contrast as the HDR developed image will be referred to as the HDR-SDR conversion gain characteristic. It is written as. Details of the HDR-SDR conversion gain characteristics will be described later.
以上が本実施形態の画像処理装置における画像処理の大まかな流れであり、本実施形態の画像処理において主眼点となる部分はステップS201の処理である。
以下、ステップS201で行われるローカルゲインマップ生成処理について、図5のフローチャートを用いて詳細に説明する。図5のフローチャートに示すローカルゲインマップ生成処理は、図1のローカルゲインマップ生成部110にて行われる処理である。
The above is the general flow of image processing in the image processing apparatus of this embodiment, and the main focus in the image processing of this embodiment is the process of step S201.
Hereinafter, the local gain map generation process performed in step S201 will be described in detail using the flowchart of FIG. The local gain map generation process shown in the flowchart of FIG. 5 is the process performed by the local gain
ローカルゲインマップ生成部110は、第1の低周波画像生成部101、第2の低周波画像生成部102、補正ゲイン変換部103、ゲイン変換部104、ゲインマップ変換部105、ゲインマップ合成部106、ローカルゲインマップ算出部107を有する。
The local gain
図5のステップS501において、第1の低周波画像生成部101は、入力画像に対して縮小処理を行って第1の縮小画像を生成し、その第1の縮小画像を第2の低周波画像生成部102へ出力する。また、第1の低周波画像生成部101は、第1の縮小画像を、元の入力画像のサイズまで拡大することで、入力画像とは周波数レベルが異なる低周波画像を生成し、その低周波画像を補正ゲイン変換部103へ出力する。
In step S501 of FIG. 5, the first low-frequency
第2の低周波画像生成部102は、第1の縮小画像に対して更に縮小処理を行って第2の縮小画像を生成する。このように、第1の縮小画像は入力画像を縮小処理することにより生成され、第2の縮小画像は第1の縮小画像を更に縮小処理することにより生成される。また第2の低周波画像生成部102は、第2の縮小画像を入力画像のサイズまで拡大することで、入力画像及び第1の縮小画像を拡大した低周波画像とは周波数レベルが異なる低周波画像を生成し、その低周波画像を補正ゲイン変換部103へ出力する。
The second low-frequency
以下、入力画像である輝度画像を入力輝度画像IMinと表記し、第1の縮小画像を拡大した低周波画像である輝度画像を第1階層輝度画像IMM、第2の縮小画像を拡大した低周波画像である輝度画像を第2階層輝度画像IMSと表記する。
なお、第1の低周波画像生成部101および第2の低周波画像生成部102で行われる縮小処理や拡大処理の手法としては、例えばバイリニア法を用いた処理等のような公知の手法を用いることができる。その他にも、低周波画像を得る手法としては、ローパスフィルタ処理等のような公知の手法が用いられてもよい。
Hereinafter, the luminance image that is the input image will be referred to as the input luminance image IMin, the luminance image that is the low-frequency image obtained by enlarging the first reduced image will be referred to as the first-layer luminance image IMM, and the low-frequency image obtained by enlarging the second reduced image will be referred to as the first layer luminance image IMM. The brightness image that is the image is referred to as a second layer brightness image IMS.
Note that, as a method of reduction processing and enlargement processing performed in the first low-frequency
次にステップS502において、補正ゲイン変換部103は、グローバルゲインマップを生成する際に用いられるグローバルゲイン特性によって発生する可能性のあるコントラスト低下を補償するための補正ゲイン特性を生成する。
Next, in step S502, the correction
ここで、補正ゲイン特性の生成方法について説明するにあたり、グローバルゲインマップを生成する際に用いられるグローバルゲイン特性、及びそのグローバルゲイン特性によって発生する可能性があるコントラスト低下について説明する。
先ずグローバルゲイン特性について、図6を用いて説明する。
図6(a)のグラフは横軸が入力の輝度信号、縦軸が出力の輝度信号を示し、図6(b)と図6(c)のグラフはそれぞれ横軸が入力の輝度信号、縦軸が出力のゲイン信号を示している。図6(a)は、本実施形態の画像処理装置のグローバルゲインマップ生成部111で生成されるグローバルゲインマップによる明るさ調整の目標となる階調補正のカーブ601を示す図である。また、図6(b)の実線部604は、図6(a)の階調補正のカーブ601をゲインテーブルに変換したものであり、明るさ調整を行うためのグローバルゲイン特性を表している。
Here, in explaining the method for generating the corrected gain characteristic, the global gain characteristic used when generating the global gain map and the contrast reduction that may occur due to the global gain characteristic will be explained.
First, global gain characteristics will be explained using FIG. 6.
In the graph of FIG. 6(a), the horizontal axis shows the input luminance signal and the vertical axis shows the output luminance signal. In the graphs of FIGS. 6(b) and 6(c), the horizontal axis shows the input luminance signal and the vertical axis shows the input luminance signal, respectively. The axis shows the output gain signal. FIG. 6A is a diagram showing a
続いて、当該グローバルゲイン特性によって発生する可能性のあるコントラスト低下について、図7を用いて説明する。
図7(a)のグラフ(a1)はグローバルゲイン特性を表しており、横軸が入力輝度信号を示し、縦軸が出力ゲイン信号を示している。図7(a)のグラフ(a2)~(a4)は、グラフ(a1)で表されたグローバルゲイン特性において、入力輝度信号Y71からY72までのように、ゲインが概ね単調減少する特性を持つ低周波画像を用いた、ローカルコントラストの向上効果の説明図である。図7(a)のグラフ(a2)と(a4)は横軸がx方向(x座標方向)を示し、縦軸が輝度信号を示している。図7(a)のグラフ(a3)は横軸がx方向を示し、縦軸がゲイン信号を示している。
Next, contrast reduction that may occur due to the global gain characteristic will be explained using FIG. 7.
Graph (a1) in FIG. 7A represents global gain characteristics, where the horizontal axis represents the input luminance signal and the vertical axis represents the output gain signal. Graphs (a2) to (a4) in FIG. 7(a) show that in the global gain characteristic shown in graph (a1), the input luminance signal Y71 to Y72 has a characteristic in which the gain almost monotonically decreases. FIG. 3 is an explanatory diagram of the effect of improving local contrast using a frequency image. In graphs (a2) and (a4) in FIG. 7A, the horizontal axis indicates the x direction (x coordinate direction), and the vertical axis indicates the luminance signal. In the graph (a3) of FIG. 7A, the horizontal axis indicates the x direction, and the vertical axis indicates the gain signal.
図7(a)のグラフ(a1)における入力輝度信号Y71とY72のような輝度差がある画像の場合、グラフ(a2)のように輝度信号を表すことができる。図7(a)のグラフ(a2)の実線部701は、入力画像が例えばx方向の或る位置において輝度値が急激に変化するようなエッジ部を有している場合の輝度信号の変化を表している。グラフ(a2)の点線部702は、実線部701で表されるような輝度信号の入力画像に対して縮小処理および拡大処理、又はフィルタ処理を行って得られた低周波画像の輝度信号の変化を表している。つまり点線部702で表される低周波画像の輝度信号は、入力画像の縮小処理および拡大処理、又はフィルタ処理によって、実線部701のエッジ部の輝度信号が緩やかに単調減少する信号となっている。
In the case of an image with a difference in brightness such as the input brightness signals Y71 and Y72 in graph (a1) of FIG. 7A, the brightness signal can be expressed as in graph (a2). A
そして、グラフ(a2)の点線部702に示した信号を基に、輝度に対してゲインが単調減少になる階調特性を基に生成されるゲインマップは、グラフ(a3)の点線部703で表されるようなものとなる。すなわちグラフ(a3)の点線部703で表されるゲインマップは、グラフ(a2)で示される低周波画像の点線部702のように緩やかに変化する輝度信号を基に生成されるため、入力される輝度信号の変化に対して緩やかにゲインが変化するものとなる。
Then, based on the signal shown in the dotted
ここで、コントラスト向上効果においてポイントとなるのは、入力画像ではx方向において輝度信号が減少するのに対し、ゲイン信号は緩やかに増加することである。つまり、グラフ(a2)とグラフ(a3)の例の場合、入力画像の輝度信号はx方向で低下しているのに対し、ゲイン信号は緩やかに増加している。また、ゲイン信号は、グラフ(a1)の特性に基づいて決まるため、グラフ(a2)において入力輝度信号Y72となっている部分はグラフ(a3)ではゲインG72となる。一方、グラフ(a2)において入力輝度信号Y71となっている部分はグラフ(a3)ではゲインG71となる。 Here, the key point in the contrast improvement effect is that in the input image, the luminance signal decreases in the x direction, whereas the gain signal gradually increases. That is, in the examples of graphs (a2) and (a3), the luminance signal of the input image is decreasing in the x direction, while the gain signal is gradually increasing. Further, since the gain signal is determined based on the characteristics of the graph (a1), the portion that is the input luminance signal Y72 in the graph (a2) becomes the gain G72 in the graph (a3). On the other hand, the portion of the graph (a2) that is the input luminance signal Y71 has a gain G71 in the graph (a3).
そして、グラフ(a3)の点線部703に示すようなゲインマップを用いて、グラフ(a2)の実線部701に示した入力画像の輝度信号に対してゲイン処理を行うと、そのゲイン処理後の輝度信号はグラフ(a4)の実線部704に示すような信号となる。すなわち、グラフ(a4)の実線部704に示したゲイン処理後の輝度信号は、矢印705で示される範囲の信号部分においてコントラスト向上効果が得られた信号となる。
Then, when gain processing is performed on the luminance signal of the input image shown in the
しかしながら、輝度に対してゲインが単調に増加する階調特性を持つ場合、その階調特性を基に生成されるゲインマップでは、コントラスト向上効果を出すことが出来ない。
図7(b)を用い、輝度に対してゲインが単調に増加する階調特性を持つ低周波画像を基に生成したゲインマップにおける問題点について説明する。
図7(b)のグラフ(b1)は、図7(a)のグラフ(a1)と同様に、グローバルゲイン特性を表しており、横軸が入力輝度信号を示し、縦軸が出力ゲイン信号を示している。図7(b)のグラフ(b2)~(b4)は、グラフ(b1)で表されたグローバルゲイン特性において、入力輝度信号Y73からY74までのように、ゲインが概ね単調増加する特性を持つ低周波画像を用いた、ローカルコントラストの効果を説明する図である。図7(b)のグラフ(b2)と(b4)は横軸がx方向(x座標方向)を示し、縦軸が輝度信号を示している。図7(b)のグラフ(b3)は横軸がx方向を示し、縦軸がゲイン信号を示している。
However, when a gradation characteristic is such that the gain monotonically increases with respect to luminance, a gain map generated based on the gradation characteristic cannot produce an effect of improving contrast.
A problem with a gain map generated based on a low-frequency image having gradation characteristics in which the gain monotonically increases with respect to luminance will be explained using FIG. 7(b).
Graph (b1) in FIG. 7(b), like graph (a1) in FIG. 7(a), represents the global gain characteristic, with the horizontal axis representing the input luminance signal and the vertical axis representing the output gain signal. It shows. Graphs (b2) to (b4) in FIG. 7(b) show that in the global gain characteristic shown in graph (b1), the input luminance signal Y73 to Y74 has a characteristic in which the gain increases monotonically. It is a figure explaining the effect of local contrast using a frequency image. In graphs (b2) and (b4) in FIG. 7(b), the horizontal axis indicates the x direction (x coordinate direction), and the vertical axis indicates the luminance signal. In the graph (b3) of FIG. 7(b), the horizontal axis indicates the x direction, and the vertical axis indicates the gain signal.
図7(b)のグラフ(b1)における入力輝度信号Y73とY74のような輝度差がある画像の場合、グラフ(b2)のように輝度信号を表すことができる。図7(b)のグラフ(b2)の実線部711は、入力画像が例えばx方向の或る位置において輝度値が急激に変化するようなエッジ部を有している場合の輝度信号の変化を表している。グラフ(b2)の点線部712は、実線部711で表されるような輝度信号の入力画像に対して縮小処理および拡大処理、又はフィルタ処理を行って得られた低周波画像の輝度信号の変化を表している。つまり点線部712で表される低周波画像の輝度信号は、入力画像の縮小処理および拡大処理、又はフィルタ処理によって、実線部711のエッジ部の輝度信号が緩やかに単調減少する信号となっている。
In the case of an image with a difference in brightness such as the input brightness signals Y73 and Y74 in graph (b1) of FIG. 7(b), the brightness signal can be expressed as in graph (b2). A
そして、グラフ(b2)の点線部712に示した信号を基に、輝度に対してゲインが単調減少になる階調特性によって生成したゲインマップは、グラフ(b3)の点線部706で表されるようなものとなる。すなわちグラフ(b3)の点線部706で表されるゲインマップは、グラフ(b2)で示される低周波画像の点線部712のように緩やかに変化する輝度信号を基に生成されるため、入力される輝度信号の変化に対して緩やかにゲインが変化するものとなる。
Then, based on the signal shown in the dotted
ここでポイントとなるのは、入力画像ではx方向において輝度信号が減少するのに対し、ゲイン信号も緩やかに減少することである。つまり、グラフ(b2)とグラフ(b3)の例の場合、入力画像の輝度信号はx方向で低下しているのに対し、ゲイン信号も緩やかに減少している。また、ゲイン信号は、グラフ(b1)の特性に基づいて決まるため、グラフ(b2)において入力輝度信号Y73となっている部分はグラフ(b3)ではゲインG73となる。一方、グラフ(b2)において入力輝度信号Y74となっている部分はグラフ(b3)ではゲインG74となる。 The key point here is that while the luminance signal in the input image decreases in the x direction, the gain signal also decreases gradually. In other words, in the examples of graphs (b2) and (b3), while the luminance signal of the input image is decreasing in the x direction, the gain signal is also decreasing gradually. Furthermore, since the gain signal is determined based on the characteristics of the graph (b1), the portion that is the input luminance signal Y73 in the graph (b2) becomes the gain G73 in the graph (b3). On the other hand, the portion of the graph (b2) that is the input luminance signal Y74 has a gain G74 in the graph (b3).
そして、グラフ(b3)の点線部706に示すようなゲインマップを用いて、グラフ(b2)の実線部711に示した入力画像の輝度信号に対してゲイン処理を行うと、そのゲイン処理後の輝度信号はグラフ(b4)の実線部707に示すような信号となる。グラフ(b4)の実線部707に示したゲイン処理後の輝度信号は、矢印708で示される範囲の信号部分においてゲインが穏やかに変化した信号となる。つまりこの場合、コントラストは低下してしまう。
Then, when gain processing is performed on the luminance signal of the input image shown in the
このため、画像処理装置においては、前述のようなグローバルゲインマップによるコントラスト低下を補償するため、補正ゲイン特性を用いる。補正ゲイン特性の生成方法について、図6(b)を用いて説明する。
前述の通り、図6(b)の実線部604は、明るさ調整を行うためのグローバルゲイン特性を表している。このグローバルゲイン特性に対し、補正ゲイン特性は、図6(c)の実線部603に示すように、図6(b)のグローバルゲイン特性の輝度域602の部分のように単調増加となっている部分を単調減少に変換した特性となされる。補正ゲイン特性を単調減少する特性にする理由は、コントラスト向上の効果が得られるようにするためである。
Therefore, in the image processing apparatus, a correction gain characteristic is used to compensate for the decrease in contrast due to the global gain map as described above. A method for generating the correction gain characteristic will be explained using FIG. 6(b).
As described above, the
ここで、図6(b)に示した入力輝度信号Y61からY62までの輝度域602に対し、本来のゲイン処理であるグローバルゲイン特性で適用したい特性を下記の式(2)で示すと、補正ゲイン特性は、下記式(3)のようになる。なお、式中のYinは入力の輝度信号値、A及びAdは傾き、Gα(Yin)及びGαd(Yin)はそれぞれ入力輝度信号値がYinのときのゲインを表す。また、G61はゲイン特性の入力輝度信号がY61の時のゲイン値を指す。
Here, the characteristic to be applied in the global gain characteristic, which is the original gain processing, to the
Gα(Yin)=A(Yin-Y61)+G61 (A>0) 式(2)
Gαd(Yin)=Ad(Yin-Y61)+G61 (Ad<0) 式(3)
Gα(Yin)=A(Yin-Y61)+G61 (A>0) Formula (2)
Gαd(Yin)=Ad(Yin-Y61)+G61 (Ad<0) Formula (3)
図5のフローチャートに説明を戻す。
ステップS503において、ゲイン変換部104は、ステップS502で生成した補正ゲイン特性と、SDRガンマ及びHDRガンマとを基に、HDR撮影によるRAW画像をSDR現像する際に生ずるコントラスト低下を補償するゲイン特性を生成する。本実施形態において、ゲイン変換部104は、HDR撮影によるRAW画像をSDR現像する際に生ずるコントラスト低下を補償するゲイン特性として、HDR-SDR変換ゲイン特性を生成する。
The explanation returns to the flowchart of FIG.
In step S503, the
図8は本実施形態の画像処理装置におけるHDR-SDR変換ゲイン特性の生成方法の説明に用いる図である。図8(a)の縦軸は出力輝度信号を示し、横軸は入力輝度信号を示している。図8(b)の縦軸はゲイン信号を示し、横軸は入力輝度信号を示している。
図8(a)の点線部801はHDRガンマ、実線部802はSDRガンマをそれぞれ示している。また図8(b)の実線部803はSDR撮影によるRAW画像をSDR現像する場合に適用されるゲイン特性を示している。
FIG. 8 is a diagram used to explain a method of generating HDR-SDR conversion gain characteristics in the image processing apparatus of this embodiment. The vertical axis in FIG. 8(a) indicates the output luminance signal, and the horizontal axis indicates the input luminance signal. The vertical axis of FIG. 8(b) shows the gain signal, and the horizontal axis shows the input luminance signal.
A dotted
HDR撮影によるRAW画像をSDR現像する場合、SDR現像後の画像においてHDR現像された画像と同等のコントラストを得るには、SDR現像時のゲイン特性の傾きを急峻にする必要がある。すなわちSDR現像後の画像においてHDR現像された画像と同等のコントラストを得るためには、SDR現像時のゲイン特性を、実線部803に示したゲイン特性よりも傾きが急峻な、点線部804に示すようなHDR-SDR変換ゲイン特性にする必要がある。
When a RAW image obtained by HDR photography is subjected to SDR development, in order to obtain the same contrast as the HDR developed image in the SDR developed image, it is necessary to make the slope of the gain characteristic during SDR development steep. In other words, in order to obtain the same contrast as the HDR developed image in the image after SDR development, the gain characteristic during SDR development is shown in the dotted
本実施形態のゲイン変換部104は、SDR現像時のゲイン特性と、HDRガンマとSDRガンマとの差分とを基に、HDR-SDR変換ゲイン特性におけるゲイン特性の急峻度合を求める。
ここで、ゲイン変換部104は、図8(a)の入力輝度信号Y82付近のように、HDRガンマとSDRガンマとに差がある領域では、HDRガンマとSDRガンマの入力輝度信号に各々対応した出力輝度信号の差分を基に、SDR現像時のゲイン特性を変換する。すなわち本実施形態において、HDRガンマとSDRガンマの入力輝度信号に各々対応した出力輝度信号の差分は、HDRガンマとSDRガンマとの間のガンマ差分を表しており、このガンマ差分を基にHDR-SDR変換ゲイン特性を生成する。
The
Here, in a region where there is a difference between the HDR gamma and the SDR gamma, such as near the input luminance signal Y82 in FIG. The gain characteristics during SDR development are converted based on the difference between the output luminance signals. That is, in this embodiment, the difference between the output luminance signals corresponding to the input luminance signals of HDR gamma and SDR gamma represents the gamma difference between HDR gamma and SDR gamma, and based on this gamma difference, HDR- Generate SDR conversion gain characteristics.
例えば入力の輝度信号の値をYinとし、ステップS502で求めた補正ゲイン特性でYinのときのゲインをGαd(Yin)とする。また、Yinに対応したSDRガンマにおける出力輝度信号をYsdr、Yinに対応したHDRガンマにおける出力輝度信号をYhdrとし、さらに調整係数をmとする。このとき、HDR-SDR変換ゲイン特性であるGβ(Yin)は、式(4)で表される。なお式(4)において、調整係数mの値を変更することで、コントラストの強調具合のコントロールが可能となる。 For example, let the value of the input luminance signal be Yin, and let Gαd(Yin) be the gain when Yin based on the correction gain characteristic obtained in step S502. Furthermore, it is assumed that the output luminance signal in the SDR gamma corresponding to Yin is Ysdr, the output luminance signal in the HDR gamma corresponding to Yin is Yhdr, and the adjustment coefficient is m. At this time, Gβ(Yin), which is the HDR-SDR conversion gain characteristic, is expressed by equation (4). Note that in equation (4), the degree of contrast enhancement can be controlled by changing the value of the adjustment coefficient m.
Gβ(Yin)=Gαd(Yin)-m×Gαd(Yin)×(Yhdr-Ysdr) 式(4) Gβ (Yin) = Gαd (Yin) - m x Gαd (Yin) x (Yhdr - Ysdr) Equation (4)
また本実施形態のゲイン変換部104は、SDRガンマとHDRガンマとが、図8(a)の原点から入力輝度信号Y81付近までのように同一の特性になっている領域では、図8(b)に示すように、SDR現像時およびHDR現像時のゲイン特性を同一とする。つまり、HDR撮影によるRAW画像をSDR現像する場合において、SDRガンマとHDRガンマとが同一の特性になっている領域のHDR-SDR変換ゲイン特性は、SDR現像時のガンマ特性になされる。
Furthermore, the
次にステップS504において、ゲインマップ変換部105は、入力輝度画像に対して、前述のステップS503で生成されたHDR-SDR変換ゲイン特性を適用することでゲインマップを生成する。以下、入力輝度画像に対してHDR-SDR変換ゲイン特性を適用して生成されたゲインマップを等倍階層ゲインマップと表記する。
Next, in step S504, the gain
またゲインマップ変換部105は、ステップS501で生成された第1階層輝度画像IMMと第2階層輝度画像IMSとに対して、それぞれHDR-SDR変換ゲイン特性を適用することで、それら階層ごとのゲインマップを生成する。以下、第1階層輝度画像IMMに対してHDR-SDR変換ゲイン特性を適用して生成されたゲインマップを、第1階層ゲインマップと表記する。また、第2階層輝度画像IMSに対してHDR-SDR変換ゲイン特性を適用して生成されたゲインマップを、第2階層ゲインマップと表記する。
In addition, the gain
なお図1においては、HDR-SDR変換ゲイン特性をGβと表記しており、入力輝度画像IMinの座標(x,y)に対してHDR-SDR変換ゲイン特性Gβを適用した等倍階層ゲインマップをGML(x,y)と表記している。また、第1階層輝度画像IMMの座標(x,y)に対してHDR-SDR変換ゲイン特性Gβを適用した第1階層ゲインマップを、GMM(x,y)と表記する。同様に、第2階層輝度画像IMSの座標(x,y)に対してHDR-SDR変換ゲイン特性Gβを適用した第1階層ゲインマップを、GMS(x,y)と表記する。 In Fig. 1, the HDR-SDR conversion gain characteristic is expressed as Gβ, and a same-size hierarchical gain map is created by applying the HDR-SDR conversion gain characteristic Gβ to the coordinates (x, y) of the input luminance image IMin. It is written as GML (x, y). Furthermore, a first layer gain map obtained by applying the HDR-SDR conversion gain characteristic Gβ to the coordinates (x, y) of the first layer luminance image IMM is expressed as GMM (x, y). Similarly, the first layer gain map obtained by applying the HDR-SDR conversion gain characteristic Gβ to the coordinates (x, y) of the second layer luminance image IMS is expressed as GMS (x, y).
そしてゲインマップ変換部105は、前述のようにHDR-SDR変換ゲイン特性を適用して生成した等倍階層ゲインマップGML(x,y)を、ローカルゲインマップ算出部107に出力する。また、ゲインマップ変換部105は、HDR-SDR変換ゲイン特性を適用して生成した第1階層ゲインマップGMM(x,y)及び第2階層ゲインマップGMS(x,y)を、ゲインマップ合成部106に出力する。
Then, the gain
次にステップS505において、ゲインマップ合成部106は、ステップS504で生成された第1階層ゲインマップGMM(x,y)と第2階層ゲインマップGMS(x,y)とを合成することで、合成ゲインマップを生成する。なお図1においては、座標(x,y)における合成ゲインマップをGMc(x,y)と表記している。合成ゲインマップの生成方法は、画像サイズの大きいゲインマップのゲイン信号と画像サイズの小さいゲインマップのゲイン信号をゲインの信号差に応じて加重加算する公知の手法を用いることができる。ゲインマップ合成部106にて生成された合成ゲインマップGMc(x,y)は、ローカルゲインマップ算出部107に送られる。
Next, in step S505, the gain
図9(a)は、入力輝度画像の輝度信号(入力輝度信号901)の例を表した図であり、縦軸が輝度信号を示し、横軸がx方向の座標を示している。図9(a)に示した入力輝度信号901は、x方向の或る位置において輝度信号Y1から輝度信号Y2に上昇するようなエッジ部を有した信号であるとする。また、図9(b)の実線部902は、図9(a)に示した入力輝度信号901から生成されるゲイン信号を表しており、ゲイン信号G1dは入力輝度信号901の輝度値Y2に対応し、ゲイン信号G2dは入力輝度信号901の輝度値Y1に対応している。一方、図9(b)の点線部903は、図9(a)の入力輝度信号901に対して、ゲインマップ合成部106で生成された合成ゲインマップによる合成ゲイン信号を表している。点線部903で示される合成ゲイン信号は、前述したように縮小画像(低周波画像)から生成されるゲインマップを合成することで得られるため、入力輝度信号901に対して、ゲイン信号がG1dからG2dに緩やかに減少する特性を持つ。
FIG. 9A is a diagram showing an example of a brightness signal of an input brightness image (input brightness signal 901), in which the vertical axis represents the brightness signal and the horizontal axis represents the coordinate in the x direction. It is assumed that the
次にステップS506において、ローカルゲインマップ算出部107は、ステップS505で生成された合成ゲインマップと、ステップS504で生成された等倍階層ゲインマップとを基に、ローカルゲインマップの強調信号を算出する。なお図1では、座標(x,y)におけるローカルゲインマップの値を、GMlocal(x,y)と表記している。座標(x,y)の合成ゲインマップの値をGMcomp(x,y)、等倍階層のゲインマップの値をGML(x,y)、調整係数をkとすると、ローカルゲインマップの値GMlocal(x,y)は式(5)で表される。
Next, in step S506, the local gain
GMlocal(x,y)=k(GMcomp(x,y)-GML(x,y)) 式(5) GMlocal (x, y) = k (GMcomp (x, y) - GML (x, y)) Equation (5)
図9(c)の実線部904は、前述した図9(a)の入力輝度信号901および図9(b)の点線部903で示される合成ゲイン信号を基に算出される、ローカルゲインマップの強調信号を示している。入力輝度信号901から生成される実線部902に示すゲイン信号と、点線部903に示す合成ゲイン信号とを用い、式(5)の演算(減算)が行われることで、実線部904に示すようなローカルゲインマップの強調信号が生成される。
A
なお、式(5)における合成ゲインマップの値GMcomp(x,y)と等倍階層のゲインマップの値GML(x,y)の差分値に乗算される調整係数kは、任意に設定可能である。すなわち、調整係数kの設定により、ゲインマップの強調信号はコントロール可能となされている。また、調整係数kは、合成ゲインマップ、もしくは等倍階層のゲインマップの値に応じて変化させてもよい。 Note that the adjustment coefficient k multiplied by the difference value between the composite gain map value GMcomp(x, y) and the gain map value GML(x, y) of the equal-sized layer in equation (5) can be set arbitrarily. be. That is, the emphasis signal of the gain map can be controlled by setting the adjustment coefficient k. Further, the adjustment coefficient k may be changed according to the value of the composite gain map or the gain map of the equal-sized layer.
図10(a)は、SDR現像時におけるローカルゲインマップの強調信号の一例を示しており、図10(b)は本実施形態において前述のようにして求めたローカルゲインマップの強調信号の例を示した図である。図10(b)に示した強調信号を用いることで、HDR撮影によるRAW画像をSDR現像する場合に、HDR現像時のコントラスト効果を得ることができるようになる。例えばSDR現像時におけるローカルゲインマップの強調信号のピーク値は図10(a)のゲイン信号G101のようになる。これに対し、本実施形態によるローカルゲインマップの強調信号によれば、図10(b)に示すように、HDR撮影によるRAW画像をSDR現像する場合に、HDR現像時と同等のピーク値であるゲイン信号G102となる。すなわち、本実施形態によれば、HDR撮影によるRAW画像をSDR現像する場合において、コントラスト効果が高い強調信号が得ることができる。 FIG. 10(a) shows an example of the emphasis signal of the local gain map during SDR development, and FIG. 10(b) shows an example of the emphasis signal of the local gain map obtained as described above in this embodiment. FIG. By using the emphasis signal shown in FIG. 10(b), when performing SDR development of a RAW image obtained by HDR photography, it is possible to obtain a contrast effect during HDR development. For example, the peak value of the emphasis signal of the local gain map during SDR development becomes the gain signal G101 in FIG. 10(a). On the other hand, according to the emphasis signal of the local gain map according to the present embodiment, as shown in FIG. 10(b), when a RAW image obtained by HDR photography is subjected to SDR development, the peak value is equivalent to that during HDR development. This becomes a gain signal G102. That is, according to this embodiment, when performing SDR development on a RAW image obtained by HDR photography, an emphasis signal with a high contrast effect can be obtained.
以上が本実施形態の画像処理装置に係る画像処理であり、本実施形態において主眼点となる部分は図1のゲイン変換部104で行われる図5のステップS503の処理である。
次に図2のステップS202において、図1のグローバルゲインマップ生成部111が行うグローバルゲインマップおよび最終ゲインマップの生成処理について、図6および図9を用いて説明する。
グローバルゲインマップ生成部111は、グローバルゲインマップ算出部108、最終ゲインマップ生成部109を有して構成されている。
The above is the image processing according to the image processing apparatus of this embodiment, and the main point in this embodiment is the process of step S503 in FIG. 5 performed by the
Next, the global gain map and final gain map generation processing performed by the global gain
The global gain
前述の通り、図6(a)は横軸が入力輝度信号、縦軸が出力輝度信号を表し、図6(b)はそれぞれ横軸が入力輝度信号、縦軸が出力のゲイン信号を表している。図6(a)は、本実施形態の画像処理装置において、グローバルゲインマップ生成部111で行われる明るさ調整の目標となる階調補正のカーブ601を示している。階調補正のカーブは、例えば、画像内の対象領域の輝度値を目標輝度値に合わせるようにスプライン補間を行うことで、画像の全領域に対するゲインを求められるような公知の方法を用いて算出することができる。また前述したように、図6(b)の実線部604は、図6(a)の階調補正のカーブ601をゲインテーブルに変換したものであり、明るさ調整を行うためのゲイン特性を表している。
As mentioned above, in FIG. 6(a), the horizontal axis represents the input brightness signal and the vertical axis represents the output brightness signal, and in FIG. 6(b), the horizontal axis represents the input brightness signal and the vertical axis represents the output gain signal. There is. FIG. 6A shows a
図9(d)の実線部905は、図6(b)に示したグローバルゲイン特性を用いて、図9(a)に例示した入力輝度信号901を基に生成されるグローバルゲインマップの各ゲイン値をx方向にプロットしたゲイン信号を示している。図9(d)は、横軸がx方向の位置、縦軸がゲイン信号を表している。図9(d)の実線部905のゲイン信号は、図9(a)の入力輝度信号901において輝度値Y1からY2に上昇する部分に対応してゲイン値G1からG2に増加するようなゲイン特性を有する信号である。なお、ゲイン値G1は入力輝度信号の輝度値Y1に対応したゲイン値、ゲイン値G2は輝度値Y2に対応したゲイン値である。
A
このように、グローバルゲインマップ算出部108は、グローバルゲイン特性を用い、図9(a)の入力輝度信号901を基に、図9(d)に示すようなゲイン特性のグローバルゲインマップを生成する。そして、グローバルゲインマップ算出部108にて生成されたグローバルゲインマップは、最終ゲインマップ生成部109に出力される。なお、図1では、座標(x,y)におけるグローバルゲインマップの値をGMglobal(x,y)と表記し、最終ゲインマップの値をGMlast(x,y)と表記している。
In this way, the global gain
最終ゲインマップ生成部109は、ローカルゲインマップ算出部107で生成されたローカルゲインマップと、グローバルゲインマップ算出部108で生成されたグローバルゲインマップとを基に、最終的なゲインマップを生成する。そして、最終ゲインマップ生成部109は、そのグローバルゲインマップをゲイン処理部112に出力する。
The final gain
ここで、図9(d)の例において、座標を(x,y)とし、グローバルゲインマップのゲイン信号をGMglobal(x,y)、ローカルゲインマップのゲイン信号をGMlocal(x,y)とする。この場合、最終ゲインマップ生成部109は、式(6)により、最終的なゲインマップのゲイン信号GMlast(x,y)を算出する。
Here, in the example of FIG. 9(d), the coordinates are (x, y), the gain signal of the global gain map is GMglobal (x, y), and the gain signal of the local gain map is GMlocal (x, y). . In this case, the final gain
GMlast(x,y)=GMlocal(x,y)+GMglobal(x,y) 式(6) GMlast (x, y) = GMlocal (x, y) + GMglobal (x, y) Equation (6)
次にステップS203において、ゲイン処理部112は、入力画像に対し最終的なゲインマップをかけるゲイン処理を行う。前述の通り、座標(x,y)の入力輝度信号値をIMin(x,y)、最終的なゲインマップの値をGMlast(x,y)とすると、ゲイン処理後の出力輝度信号値IMout(x,y)は前述の式(1)で求められる。
Next, in step S203, the
本実施形態の画像処理装置は、以上説明したような画像処理を行うことにより、HDR-SDR変換ゲイン特性を適用したゲイン処理後の出力画像であるRAW画像を得ることができる。
なお、本実施形態では入力画像および出力画像はRAW画像として説明しているが、入力画像および出力画像をいわゆるYUVなど他フォーマットの画像であってもよい。
以上説明したように、本実施形態の画像処理装置によれば、HDR撮影したRAW画像からSDR現像が行われる場合に、HDR現像結果に近いコントラスト効果を得ることが可能となる。
By performing the image processing as described above, the image processing apparatus of this embodiment can obtain a RAW image that is an output image after gain processing to which the HDR-SDR conversion gain characteristic is applied.
Note that although the input image and the output image are described as RAW images in this embodiment, the input image and the output image may be images in other formats such as so-called YUV.
As described above, according to the image processing apparatus of this embodiment, when SDR development is performed from a RAW image shot in HDR, it is possible to obtain a contrast effect close to the HDR development result.
本発明は、上述の実施形態の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける一つ以上のプロセッサがプログラムを読出し実行する処理でも実現可能である。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。
上述の実施形態は、何れも本発明を実施するにあたっての具体化の例を示したものに過ぎず、これらによって本発明の技術的範囲が限定的に解釈されてはならないものである。すなわち、本発明は、その技術思想、又はその主要な特徴から逸脱することなく、様々な形で実施することができる。
The present invention provides a system or device with a program that implements one or more functions of the embodiments described above via a network or a storage medium, and one or more processors in the computer of the system or device reads and executes the program. This can also be achieved by processing. It can also be realized by a circuit (for example, ASIC) that realizes one or more functions.
The above-described embodiments are merely examples of implementation of the present invention, and the technical scope of the present invention should not be construed as limited by these embodiments. That is, the present invention can be implemented in various forms without departing from its technical idea or main features.
101:第1の低周波画像生成部、102:第2の低周波画像生成部、103:補正ゲイン変換部、104:ゲイン変換部、105:ゲインマップ変換部、106:ゲインマップ合成部、107:ローカルゲインマップ算出部、108:グローバルゲインマップ算出部、109:最終ゲインマップ生成部、110:ローカルゲインマップ生成部、111:グローバルゲインマップ生成部、112:ゲイン処理部 101: First low frequency image generation section, 102: Second low frequency image generation section, 103: Correction gain conversion section, 104: Gain conversion section, 105: Gain map conversion section, 106: Gain map synthesis section, 107 : Local gain map calculation unit, 108: Global gain map calculation unit, 109: Final gain map generation unit, 110: Local gain map generation unit, 111: Global gain map generation unit, 112: Gain processing unit
Claims (8)
前記生成手段により生成されたゲイン信号を用いて、前記未現像の画像に対して前記ゲイン処理を行う処理手段と、を有し、
前記未現像の画像を用いて、第1のダイナミックレンジよりも狭いダイナミックレンジである第2のダイナミックレンジに対応した現像処理が行われる場合、前記生成手段は、前記第1のダイナミックレンジに対応したガンマ特性と前記第2のダイナミックレンジに対応したガンマ特性とで差がない領域では共通した特性となり、前記第1のダイナミックレンジに対応したガンマ特性と前記第2のダイナミックレンジに対応したガンマ特性とに差がある領域では、前記第2のダイナミックレンジに対応したガンマ特性を前記第1のダイナミックレンジに対応するように変更した特性となる、ゲイン特性に基づいて、前記ゲイン信号を生成することを特徴とする画像処理装置。 generating means for generating a gain signal used in gain processing when developing an undeveloped image;
processing means for performing the gain processing on the undeveloped image using the gain signal generated by the generation means;
When a development process corresponding to a second dynamic range that is a narrower dynamic range than the first dynamic range is performed using the undeveloped image, the generating means In a region where there is no difference between the gamma characteristics and the gamma characteristics corresponding to the second dynamic range, the gamma characteristics are common, and the gamma characteristics corresponding to the first dynamic range and the gamma characteristics corresponding to the second dynamic range are the same. In a region where there is a difference between the two, the gain signal is generated based on a gain characteristic that is a characteristic obtained by changing the gamma characteristic corresponding to the second dynamic range to correspond to the first dynamic range. Characteristic image processing device.
前記処理手段は、前記ゲインマップの前記画素ごとに対応したゲイン値を用いて前記ゲイン処理を行うことを特徴とする請求項1に記載の画像処理装置。 The generating means generates a gain map consisting of gain values corresponding to each pixel of the image,
The image processing apparatus according to claim 1 , wherein the processing means performs the gain processing using a gain value corresponding to each pixel of the gain map.
前記画像に対して明るさ調整を行うグローバルゲインマップと、
前記画像に対して局所的にコントラスト調整を行うためのローカルゲインマップと、を生成し、
前記グローバルゲインマップと前記ローカルゲインマップとを加算して、前記処理手段が前記ゲイン処理に用いる最終的なゲインマップを生成することを特徴とする請求項2に記載の画像処理装置。 The generating means is
a global gain map that performs brightness adjustment on the image;
generating a local gain map for locally performing contrast adjustment on the image;
3. The image processing apparatus according to claim 2 , wherein the processing means generates a final gain map used in the gain processing by adding the global gain map and the local gain map.
前記画像から前記グローバルゲインマップに応じた前記ゲイン処理で生ずるコントラスト低下を補償するための補正ゲイン特性を生成し、
前記補正ゲイン特性と、前記第1のダイナミックレンジに対応したガンマ特性と前記第2のダイナミックレンジに対応したガンマ特性とで差がない領域では共通した特性となり、前記第1のダイナミックレンジに対応したガンマ特性と前記第2のダイナミックレンジに対応したガンマ特性とに差がある領域では、前記第2のダイナミックレンジに対応したガンマ特性を前記第1のダイナミックレンジに対応するように変更した特性となる、前記ゲイン特性とに基づいて、前記ローカルゲインマップを生成することを特徴とする請求項3に記載の画像処理装置。 The generating means is
generating a correction gain characteristic from the image to compensate for contrast reduction caused by the gain processing according to the global gain map;
In a region where there is no difference between the correction gain characteristic, the gamma characteristic corresponding to the first dynamic range, and the gamma characteristic corresponding to the second dynamic range, the characteristic is common, and the gamma characteristic corresponding to the first dynamic range is a common characteristic. In a region where there is a difference between the gamma characteristics and the gamma characteristics corresponding to the second dynamic range, the gamma characteristics corresponding to the second dynamic range are changed to correspond to the first dynamic range. The image processing apparatus according to claim 3 , wherein the local gain map is generated based on the gain characteristics .
未現像の画像を現像する際のゲイン処理に用いるゲイン信号を生成する生成工程と、
前記生成工程により生成されたゲイン信号を用いて、前記未現像の画像に対して前記ゲイン処理を行う処理工程と、を有し、
前記未現像の画像を用いて、第1のダイナミックレンジよりも狭いダイナミックレンジである第2のダイナミックレンジに対応した現像処理が行われる場合、前記生成工程では、前記第1のダイナミックレンジに対応したガンマ特性と前記第2のダイナミックレンジに対応したガンマ特性とで差がない領域では共通した特性となり、前記第1のダイナミックレンジに対応したガンマ特性と前記第2のダイナミックレンジに対応したガンマ特性とに差がある領域では、前記第2のダイナミックレンジに対応したガンマ特性を前記第1のダイナミックレンジに対応するように変更した特性となる、ゲイン特性に基づいて、前記ゲイン信号を生成することを特徴とする画像処理方法。 An image processing method executed by an image processing device, the method comprising:
a generation step of generating a gain signal used for gain processing when developing an undeveloped image;
a processing step of performing the gain processing on the undeveloped image using the gain signal generated in the generation step,
When the undeveloped image is subjected to development processing corresponding to a second dynamic range, which is a narrower dynamic range than the first dynamic range, in the generation step, processing corresponding to the first dynamic range is performed. In a region where there is no difference between the gamma characteristics and the gamma characteristics corresponding to the second dynamic range, the gamma characteristics are common, and the gamma characteristics corresponding to the first dynamic range and the gamma characteristics corresponding to the second dynamic range are the same. In a region where there is a difference between the two, the gain signal is generated based on a gain characteristic that is a characteristic obtained by changing the gamma characteristic corresponding to the second dynamic range to correspond to the first dynamic range. Featured image processing method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2020024948A JP7446847B2 (en) | 2020-02-18 | 2020-02-18 | Image processing device, image processing method, and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2020024948A JP7446847B2 (en) | 2020-02-18 | 2020-02-18 | Image processing device, image processing method, and program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2021132244A JP2021132244A (en) | 2021-09-09 |
JP7446847B2 true JP7446847B2 (en) | 2024-03-11 |
Family
ID=77551268
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2020024948A Active JP7446847B2 (en) | 2020-02-18 | 2020-02-18 | Image processing device, image processing method, and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP7446847B2 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20230252611A1 (en) * | 2022-02-09 | 2023-08-10 | Samsung Electronics Co., Ltd. | Generation of three-dimensional (3d) lookup table for tone mapping or other image processing functions |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2018169003A1 (en) | 2017-03-15 | 2018-09-20 | ソニー株式会社 | Imaging device, video signal processing device, and video signal processing method |
-
2020
- 2020-02-18 JP JP2020024948A patent/JP7446847B2/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2018169003A1 (en) | 2017-03-15 | 2018-09-20 | ソニー株式会社 | Imaging device, video signal processing device, and video signal processing method |
Also Published As
Publication number | Publication date |
---|---|
JP2021132244A (en) | 2021-09-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4894595B2 (en) | Image processing apparatus and method, and program | |
KR101051604B1 (en) | Image processing apparatus and method | |
JP4214457B2 (en) | Image processing apparatus and method, recording medium, and program | |
JP2005204195A (en) | Image processing apparatus and method, recording medium, and program | |
JP2006114005A (en) | Gradation conversion apparatus, program, electronic camera, and method therefor | |
JP6485068B2 (en) | Image processing method and image processing apparatus | |
US8000554B2 (en) | Automatic dynamic range adjustment in digital imaging | |
JP2017011327A (en) | Image processing apparatus, image processing method, and program | |
JP2006115444A (en) | Method, device, program for image processing, and electronic camera | |
JP7446847B2 (en) | Image processing device, image processing method, and program | |
JP3424060B2 (en) | Gradation correction device and video signal processing device using the same | |
JP4119290B2 (en) | Video processing apparatus and imaging system | |
JP2007180851A (en) | Gray scale transformation device, program and method for raw image, and electronic camera | |
JP2019028537A (en) | Image processing apparatus and image processing method | |
JP6755811B2 (en) | Image processing equipment, image processing methods, and programs | |
JP2004221645A (en) | Image processing apparatus and method therefor, recording medium, and program | |
JP2011015277A (en) | Image processing device, image processing method, image processing program, and recording medium recording image processing program | |
US7558435B2 (en) | Signal processing apparatus, method of processing a signal, recording medium, and program | |
JP2011120299A (en) | Gradation conversion apparatus, program, electronic camera, and method therefor | |
JP3233114B2 (en) | Image processing apparatus and image processing method | |
JP4277550B2 (en) | Signal processing apparatus and method, recording medium, and program | |
JP2018128764A (en) | Image processing device, image processing method and program | |
JP4455554B2 (en) | Image processing apparatus and image processing method | |
JP2019053590A (en) | Image processing apparatus, image processing method, and program | |
JP4329391B2 (en) | Signal processing apparatus and method, recording medium, and program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20230217 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20231117 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20231128 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20240115 |
|
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: 20240130 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20240228 |
|
R151 | Written notification of patent or utility model registration |
Ref document number: 7446847 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |