JP7446847B2 - Image processing device, image processing method, and program - Google Patents

Image processing device, image processing method, and program Download PDF

Info

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
Application number
JP2020024948A
Other languages
Japanese (ja)
Other versions
JP2021132244A (en
Inventor
美咲 鈴木
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP2020024948A priority Critical patent/JP7446847B2/en
Publication of JP2021132244A publication Critical patent/JP2021132244A/en
Application granted granted Critical
Publication of JP7446847B2 publication Critical patent/JP7446847B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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. Patent Document 1 discloses that an emphasis signal is generated based on a gain map generated from a reduced image of an input image, and the contrast is improved by adding the emphasis signal to the gain map of the gain characteristic that is originally desired to be applied to the input image. Techniques for generating highly effective gain maps are disclosed.

特開2019-53590号公報JP2019-53590A

ところで、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 is a diagram showing a configuration example of an image processing apparatus according to an embodiment. 実施形態の画像処理のフローチャートである。It is a flowchart of image processing of an embodiment. コントラスト低下の説明図である。FIG. 3 is an explanatory diagram of contrast reduction. ゲイン特性とゲインマップの説明図である。FIG. 3 is an explanatory diagram of gain characteristics and a gain map. ゲインマップ強調信号生成処理のフローチャートである。5 is a flowchart of gain map emphasis signal generation processing. ゲイン特性の一例を示した図である。FIG. 3 is a diagram showing an example of gain characteristics. グローバルゲイン特性によるコントラスト低下の説明図である。FIG. 3 is an explanatory diagram of contrast reduction due to global gain characteristics. 本実施形態におけるゲイン特性の生成方法の説明図である。FIG. 2 is an explanatory diagram of a method for generating gain characteristics in this embodiment. コントラスト向上効果の説明図である。FIG. 3 is an explanatory diagram of contrast improvement effect. ゲインマップの強調信号の説明図である。FIG. 3 is an explanatory diagram of an emphasis signal of a gain map.

以下、本発明の実施形態を、添付の図面に基づいて詳細に説明する。なお、以下の実施形態において示す構成は一例に過ぎず、本発明は図示された構成に限定されるものではない。同一の構成または処理については、同じ参照符号を付して説明する。
図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 solid line portion 302 in FIG. 3 indicates an example of a luminance signal obtained by HDR development, and a dotted line portion 301 indicates an example of a luminance signal obtained by SDR development. Comparing the brightness signals of the solid line part 302 and the dotted line part 301, if the maximum brightness value of the signal by SDR development shown in the dotted line part 301 is Y1, the maximum brightness value of the signal by HDR development shown by the solid line part 302 The value is Y2. In the case of the example in FIG. 3, the difference in maximum luminance value between the signal shown by the dotted line part 301 and the signal shown by the solid line part 302 is Y2 - Y1, and the difference in the maximum luminance value between the signal shown by the dotted line part 301 and the signal shown by the solid line part 302 is Y2 - Y1, and the difference in the maximum luminance value between the signal shown by the dotted line part 301 and the signal shown by the solid line part 302 is Y2 - Y1. It can be seen that the contrast has decreased. The reason why there is a difference in signal values between HDR development and SDR development is that HDR can express a brighter range than SDR, and SDR developed signals are different from HDR. This is because the gradation is compressed compared to the developed signal. For example, when SDR development is performed, the signal value of the white portion of the image becomes lower than when HDR development is performed, resulting in a decrease in contrast. Therefore, when a RAW image obtained by HDR photography is subjected to HDR development and SDR development, the impression of the image differs in terms of contrast (that is, the contrast effect differs).

このようなことから、本実施形態の画像処理装置は、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 map generation section 110, a global gain map generation section 111, and a gain processing section 112.

ローカルゲインマップ生成部110は、画像処理装置に入力された輝度画像から、局所的にコントラストを調整するためのローカルゲインマップ(ローカルコントラストゲインマップ)を生成する。ローカルゲインマップは、前述の図4(b)のように各画素位置に対応してゲイン値が2次元配置されたマップである。ローカルゲインマップ生成部110は、入力された輝度画像から低周波画像を生成し、その低周波画像に対して、ゲイン特性を適用することにより、ローカルゲインマップを生成する。ローカルゲインマップ生成部110において用いられるゲイン特性の詳細は後述する。 The local gain map generation unit 110 generates a local gain map (local contrast gain map) for locally adjusting contrast from the luminance image input to the image processing device. The local gain map is a map in which gain values are two-dimensionally arranged corresponding to each pixel position, as shown in FIG. 4(b) described above. The local gain map generation unit 110 generates a low frequency image from the input luminance image, and generates a local gain map by applying gain characteristics to the low frequency image. Details of the gain characteristics used in the local gain map generation section 110 will be described later.

グローバルゲインマップ生成部111は、入力された輝度画像の輝度値に応じて、画像の明るさ調整するためのグローバルゲインマップ(グローバルコントラストゲインマップ)を生成する。グローバルゲインマップも、前述の図4(b)のように各画素位置に対応してゲイン値が2次元配置されたマップである。 The global gain map generation unit 111 generates a global gain map (global contrast gain map) for adjusting the brightness of the image according to the brightness value of the input brightness image. The global gain map is also a map in which gain values are two-dimensionally arranged corresponding to each pixel position, as shown in FIG. 4(b) described above.

さらにグローバルゲインマップ生成部111は、そのグローバルゲインマップに、ローカルゲインマップ生成部110で生成されたローカルゲインマップを加算することで、最終的なゲインマップを生成する。最終的なゲインマップも、図4(b)のように各画素位置に対応してゲイン値が2次元配置されたマップである。最終的なゲインマップは、入力画像に対してゲイン処理を行う際に用いられるゲインマップである。 Furthermore, the global gain map generation unit 111 generates a final gain map by adding the local gain map generated by the local gain map generation unit 110 to the global gain map. The final gain map is also a map in which gain values are two-dimensionally arranged corresponding to each pixel position, as shown in FIG. 4(b). The final gain map is a gain map used when performing gain processing on the input image.

このように、本実施形態の画像処理装置は、グローバルゲインマップによる明るさ調整とローカルゲインマップによるローカルコントラスト調整とをそれぞれ独立に制御可能となされている。さらに本実施形態の画像処理装置は、ローカルゲインマップに対して、強調信号を足すことで、コントラスト向上効果の高いローカルゲインマップを生成する。そして、本実施形態の画像処理装置は、それらグローバルゲインマップとローカルゲインマップとから、最終的なゲインマップを生成している。 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 map generation unit 110 generates a local gain map based on a luminance image that is an input image. Details of the local gain map generation process performed in step S201 will be described later.

次にステップS202において、グローバルゲインマップ生成部111は、輝度画像である入力画像の輝度に応じて明るさを調整するためのグローバルゲインマップを生成する。さらに、グローバルゲインマップ生成部111は、その生成したグローバルゲインマップと、ステップS201で生成されたローカルゲインマップとを基に、最終的なゲインマップを生成する。ステップS202で行われる、ローバルゲインマップの生成処理および最終的なゲインマップの生成処理の詳細は後述する。 Next, in step S202, the global gain map generation unit 111 generates a global gain map for adjusting brightness according to the brightness of the input image, which is a brightness image. Furthermore, the global gain map generation unit 111 generates a final gain map based on the generated global gain map and the local gain map generated in step S201. Details of the global gain map generation process and the final gain map generation process performed in step S202 will be described later.

次にステップ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 gain processing unit 112 performs a process of applying a gain to the input image (gain process) using the final gain map generated in step S202. Here, the luminance signal value at the coordinates (x, y) of the input image is set as IMin (x, y), and the luminance signal value of the output image after gain processing is set as IMout (x, y). In addition, when performing SDR development on a RAW image obtained by HDR photography, GMlast sets the gain value of the coordinates (x, y) in the final gain map in order to obtain the same contrast as the HDR developed image in the image after SDR development. Let it be (x, y). In this case, the luminance signal value IMout(x,y) of the output image after gain processing is expressed as in equation (1).

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 map generation unit 110 of FIG. 1.

ローカルゲインマップ生成部110は、第1の低周波画像生成部101、第2の低周波画像生成部102、補正ゲイン変換部103、ゲイン変換部104、ゲインマップ変換部105、ゲインマップ合成部106、ローカルゲインマップ算出部107を有する。 The local gain map generation section 110 includes a first low frequency image generation section 101, a second low frequency image generation section 102, a correction gain conversion section 103, a gain conversion section 104, a gain map conversion section 105, and a gain map synthesis section 106. , a local gain map calculation unit 107.

図5のステップS501において、第1の低周波画像生成部101は、入力画像に対して縮小処理を行って第1の縮小画像を生成し、その第1の縮小画像を第2の低周波画像生成部102へ出力する。また、第1の低周波画像生成部101は、第1の縮小画像を、元の入力画像のサイズまで拡大することで、入力画像とは周波数レベルが異なる低周波画像を生成し、その低周波画像を補正ゲイン変換部103へ出力する。 In step S501 of FIG. 5, the first low-frequency image generation unit 101 performs a reduction process on the input image to generate a first reduced image, and converts the first reduced image into a second low-frequency image. It is output to the generation unit 102. Furthermore, the first low-frequency image generation unit 101 generates a low-frequency image having a different frequency level from the input image by enlarging the first reduced image to the size of the original input image, and The image is output to the correction gain conversion unit 103.

第2の低周波画像生成部102は、第1の縮小画像に対して更に縮小処理を行って第2の縮小画像を生成する。このように、第1の縮小画像は入力画像を縮小処理することにより生成され、第2の縮小画像は第1の縮小画像を更に縮小処理することにより生成される。また第2の低周波画像生成部102は、第2の縮小画像を入力画像のサイズまで拡大することで、入力画像及び第1の縮小画像を拡大した低周波画像とは周波数レベルが異なる低周波画像を生成し、その低周波画像を補正ゲイン変換部103へ出力する。 The second low-frequency image generation unit 102 further performs reduction processing on the first reduced image to generate a second reduced image. In this way, the first reduced image is generated by reducing the input image, and the second reduced image is generated by further reducing the first reduced image. In addition, the second low-frequency image generation unit 102 enlarges the second reduced image to the size of the input image, thereby generating a low-frequency image whose frequency level is different from that of the input image and the low-frequency image obtained by enlarging the first reduced image. An image is generated and the low frequency image is output to the correction gain conversion unit 103.

以下、入力画像である輝度画像を入力輝度画像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 image generation unit 101 and the second low-frequency image generation unit 102, a known method such as processing using a bilinear method is used. be able to. In addition, a known method such as low-pass filter processing may be used as a method for obtaining a low-frequency image.

次にステップS502において、補正ゲイン変換部103は、グローバルゲインマップを生成する際に用いられるグローバルゲイン特性によって発生する可能性のあるコントラスト低下を補償するための補正ゲイン特性を生成する。 Next, in step S502, the correction gain conversion unit 103 generates a correction gain characteristic for compensating for contrast reduction that may occur due to the global gain characteristic used when generating the global gain map.

ここで、補正ゲイン特性の生成方法について説明するにあたり、グローバルゲインマップを生成する際に用いられるグローバルゲイン特性、及びそのグローバルゲイン特性によって発生する可能性があるコントラスト低下について説明する。
先ずグローバルゲイン特性について、図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 gradation correction curve 601 that is the target of brightness adjustment using the global gain map generated by the global gain map generation unit 111 of the image processing apparatus of this embodiment. Further, a solid line portion 604 in FIG. 6(b) is obtained by converting the gradation correction curve 601 in FIG. 6(a) into a gain table, and represents a global gain characteristic for brightness adjustment.

続いて、当該グローバルゲイン特性によって発生する可能性のあるコントラスト低下について、図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 solid line portion 701 in graph (a2) of FIG. 7A indicates a change in the brightness signal when the input image has an edge portion where the brightness value changes rapidly at a certain position in the x direction, for example. represents. A dotted line section 702 in graph (a2) indicates a change in the luminance signal of a low frequency image obtained by performing reduction processing, enlargement processing, or filter processing on the input image of the luminance signal as represented by the solid line section 701. represents. In other words, the luminance signal of the low-frequency image represented by the dotted line portion 702 is a signal in which the luminance signal at the edge portion of the solid line portion 701 gradually monotonically decreases due to reduction processing and enlargement processing of the input image, or filter processing. .

そして、グラフ(a2)の点線部702に示した信号を基に、輝度に対してゲインが単調減少になる階調特性を基に生成されるゲインマップは、グラフ(a3)の点線部703で表されるようなものとなる。すなわちグラフ(a3)の点線部703で表されるゲインマップは、グラフ(a2)で示される低周波画像の点線部702のように緩やかに変化する輝度信号を基に生成されるため、入力される輝度信号の変化に対して緩やかにゲインが変化するものとなる。 Then, based on the signal shown in the dotted line part 702 of the graph (a2), a gain map generated based on the gradation characteristic where the gain monotonically decreases with respect to the luminance is shown in the dotted line part 703 of the graph (a3). It becomes as expressed. In other words, the gain map represented by the dotted line section 703 in graph (a3) is generated based on the luminance signal that changes slowly as shown in the dotted line section 702 of the low frequency image shown in graph (a2), so the gain map is The gain changes gradually in response to changes in the luminance signal.

ここで、コントラスト向上効果においてポイントとなるのは、入力画像では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 solid line part 701 of the graph (a2) using the gain map shown in the dotted line part 703 of the graph (a3), after the gain processing The luminance signal becomes a signal as shown in the solid line portion 704 of graph (a4). That is, the luminance signal after gain processing shown in the solid line portion 704 of graph (a4) is a signal in which the contrast improvement effect is obtained in the signal portion in the range shown by the arrow 705.

しかしながら、輝度に対してゲインが単調に増加する階調特性を持つ場合、その階調特性を基に生成されるゲインマップでは、コントラスト向上効果を出すことが出来ない。
図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 solid line portion 711 in graph (b2) of FIG. 7(b) indicates a change in the brightness signal when the input image has an edge portion where the brightness value changes suddenly at a certain position in the x direction, for example. represents. A dotted line portion 712 in graph (b2) represents a change in the luminance signal of a low frequency image obtained by performing reduction processing, enlargement processing, or filter processing on the input image of the luminance signal as represented by the solid line portion 711. represents. In other words, the luminance signal of the low-frequency image represented by the dotted line portion 712 is a signal in which the luminance signal at the edge portion of the solid line portion 711 gradually monotonically decreases due to reduction processing and enlargement processing of the input image, or filter processing. .

そして、グラフ(b2)の点線部712に示した信号を基に、輝度に対してゲインが単調減少になる階調特性によって生成したゲインマップは、グラフ(b3)の点線部706で表されるようなものとなる。すなわちグラフ(b3)の点線部706で表されるゲインマップは、グラフ(b2)で示される低周波画像の点線部712のように緩やかに変化する輝度信号を基に生成されるため、入力される輝度信号の変化に対して緩やかにゲインが変化するものとなる。 Then, based on the signal shown in the dotted line part 712 of the graph (b2), a gain map generated by the gradation characteristic in which the gain monotonically decreases with respect to the luminance is represented by the dotted line part 706 of the graph (b3). It will be something like this. In other words, the gain map represented by the dotted line section 706 in graph (b3) is generated based on the luminance signal that changes slowly like the dotted line section 712 of the low frequency image shown in graph (b2). The gain changes gradually in response to changes in the luminance signal.

ここでポイントとなるのは、入力画像では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 solid line part 711 of the graph (b2) using the gain map shown in the dotted line part 706 of the graph (b3), after the gain processing The luminance signal becomes a signal as shown in the solid line portion 707 of graph (b4). The luminance signal after the gain processing shown in the solid line portion 707 of graph (b4) becomes a signal in which the gain changes gently in the signal portion within the range shown by the arrow 708. In other words, in this case, the contrast decreases.

このため、画像処理装置においては、前述のようなグローバルゲインマップによるコントラスト低下を補償するため、補正ゲイン特性を用いる。補正ゲイン特性の生成方法について、図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 solid line portion 604 in FIG. 6(b) represents the global gain characteristic for brightness adjustment. In contrast to this global gain characteristic, the correction gain characteristic monotonically increases as shown in the solid line section 603 in FIG. 6(c), as in the brightness region 602 of the global gain characteristic in FIG. 6(b). It is treated as a characteristic that converts the part into a monotonically decreasing part. The reason why the correction gain characteristic is made to be a monotonically decreasing characteristic is to obtain the effect of improving contrast.

ここで、図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 brightness region 602 from input brightness signal Y61 to Y62 shown in FIG. 6(b) is expressed by the following equation (2). The gain characteristic is as shown in equation (3) below. In the equation, Yin represents the input luminance signal value, A and Ad represent the slope, and Gα(Yin) and Gαd(Yin) each represent the gain when the input luminance signal value is Yin. Further, G61 indicates a gain value when the input luminance signal of the gain characteristic is Y61.

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 gain conversion unit 104 generates a gain characteristic that compensates for the decrease in contrast that occurs when performing SDR development of the RAW image obtained by HDR photography, based on the correction gain characteristic generated in step S502, the SDR gamma, and the HDR gamma. generate. In the present embodiment, the gain conversion unit 104 generates an HDR-SDR conversion gain characteristic as a gain characteristic that compensates for a decrease in contrast that occurs when a RAW image obtained by HDR photography is subjected to SDR development.

図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 line section 801 in FIG. 8A indicates HDR gamma, and a solid line section 802 indicates SDR gamma. Further, a solid line portion 803 in FIG. 8(b) indicates a gain characteristic applied when performing SDR development of a RAW image obtained by SDR photography.

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 line section 804, which has a steeper slope than the gain characteristic shown in the solid line section 803. It is necessary to have such HDR-SDR conversion gain characteristics.

本実施形態のゲイン変換部104は、SDR現像時のゲイン特性と、HDRガンマとSDRガンマとの差分とを基に、HDR-SDR変換ゲイン特性におけるゲイン特性の急峻度合を求める。
ここで、ゲイン変換部104は、図8(a)の入力輝度信号Y82付近のように、HDRガンマとSDRガンマとに差がある領域では、HDRガンマとSDRガンマの入力輝度信号に各々対応した出力輝度信号の差分を基に、SDR現像時のゲイン特性を変換する。すなわち本実施形態において、HDRガンマとSDRガンマの入力輝度信号に各々対応した出力輝度信号の差分は、HDRガンマとSDRガンマとの間のガンマ差分を表しており、このガンマ差分を基にHDR-SDR変換ゲイン特性を生成する。
The gain conversion unit 104 of this embodiment determines the steepness of the gain characteristic in the HDR-SDR conversion gain characteristic based on the gain characteristic during SDR development and the difference between HDR gamma and SDR gamma.
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 gain conversion unit 104 of the present embodiment has the same characteristics as shown in FIG. 8(b) in a region where the SDR gamma and HDR gamma have the same characteristics, such as from the origin to the vicinity of the input luminance signal Y81 in FIG. ), the gain characteristics are the same during SDR development and HDR development. That is, when performing SDR development on a RAW image obtained by HDR photography, the HDR-SDR conversion gain characteristic of an area where the SDR gamma and HDR gamma have the same characteristics is made into the gamma characteristic during SDR development.

次にステップS504において、ゲインマップ変換部105は、入力輝度画像に対して、前述のステップS503で生成されたHDR-SDR変換ゲイン特性を適用することでゲインマップを生成する。以下、入力輝度画像に対してHDR-SDR変換ゲイン特性を適用して生成されたゲインマップを等倍階層ゲインマップと表記する。 Next, in step S504, the gain map conversion unit 105 generates a gain map by applying the HDR-SDR conversion gain characteristic generated in step S503 described above to the input luminance image. Hereinafter, a gain map generated by applying HDR-SDR conversion gain characteristics to an input luminance image will be referred to as a same-size hierarchical gain map.

またゲインマップ変換部105は、ステップS501で生成された第1階層輝度画像IMMと第2階層輝度画像IMSとに対して、それぞれHDR-SDR変換ゲイン特性を適用することで、それら階層ごとのゲインマップを生成する。以下、第1階層輝度画像IMMに対してHDR-SDR変換ゲイン特性を適用して生成されたゲインマップを、第1階層ゲインマップと表記する。また、第2階層輝度画像IMSに対してHDR-SDR変換ゲイン特性を適用して生成されたゲインマップを、第2階層ゲインマップと表記する。 In addition, the gain map conversion unit 105 applies the HDR-SDR conversion gain characteristics to the first layer brightness image IMM and the second layer brightness image IMS generated in step S501, thereby obtaining a gain for each layer. Generate a map. Hereinafter, a gain map generated by applying the HDR-SDR conversion gain characteristic to the first layer luminance image IMM will be referred to as a first layer gain map. Further, a gain map generated by applying the HDR-SDR conversion gain characteristic to the second layer luminance image IMS will be referred to as a second layer gain map.

なお図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 map conversion unit 105 outputs the same-size hierarchical gain map GML (x, y) generated by applying the HDR-SDR conversion gain characteristics as described above to the local gain map calculation unit 107. Further, the gain map conversion unit 105 converts the first layer gain map GMM (x, y) and the second layer gain map GMS (x, y) generated by applying the HDR-SDR conversion gain characteristics into a gain map synthesis unit. 106.

次にステップ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 map synthesis unit 106 synthesizes the first layer gain map GMM (x, y) and the second layer gain map GMS (x, y) generated in step S504. Generate a gain map. Note that in FIG. 1, the composite gain map at coordinates (x, y) is expressed as GMc(x, y). As a method for generating the composite gain map, a known method may be used in which a gain signal of a gain map with a large image size and a gain signal of a gain map with a small image size are weighted and added according to the signal difference in gain. The composite gain map GMc(x,y) generated by the gain map composition section 106 is sent to the local gain map calculation section 107.

図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 input luminance signal 901 shown in FIG. 9A is a signal having an edge portion where the luminance signal Y1 increases to the luminance signal Y2 at a certain position in the x direction. Further, a solid line portion 902 in FIG. 9(b) represents a gain signal generated from the input luminance signal 901 shown in FIG. 9(a), and the gain signal G1d corresponds to the luminance value Y2 of the input luminance signal 901. However, the gain signal G2d corresponds to the luminance value Y1 of the input luminance signal 901. On the other hand, a dotted line portion 903 in FIG. 9(b) represents a composite gain signal based on a composite gain map generated by the gain map synthesis unit 106 for the input luminance signal 901 in FIG. 9(a). The composite gain signal indicated by the dotted line part 903 is obtained by combining the gain maps generated from the reduced image (low frequency image) as described above. It has the characteristic of gradually decreasing in G2d.

次にステップ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 map calculation unit 107 calculates an emphasis signal of the local gain map based on the composite gain map generated in step S505 and the same-size hierarchical gain map generated in step S504. . Note that in FIG. 1, the value of the local gain map at coordinates (x, y) is expressed as GMlocal (x, y). If the value of the composite gain map at coordinates (x, y) is GMcomp(x, y), the value of the gain map of the equal-sized layer is GML(x, y), and the adjustment coefficient is k, then the value of the local gain map GMlocal( x, y) is expressed by equation (5).

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 solid line portion 904 in FIG. 9(c) is a local gain map calculated based on the input luminance signal 901 in FIG. 9(a) described above and a composite gain signal shown in a dotted line portion 903 in FIG. Shows emphasized signal. By using the gain signal shown in the solid line section 902 generated from the input luminance signal 901 and the composite gain signal shown in the dotted line section 903, the calculation (subtraction) of equation (5) is performed, so that the result as shown in the solid line section 904 is performed. An emphasis signal of a local gain map is generated.

なお、式(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 gain conversion unit 104 in FIG. 1.
Next, the global gain map and final gain map generation processing performed by the global gain map generation unit 111 of FIG. 1 in step S202 of FIG. 2 will be described with reference to FIGS. 6 and 9.
The global gain map generation section 111 includes a global gain map calculation section 108 and a final gain map generation section 109.

前述の通り、図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 tone correction curve 601 that is the target of brightness adjustment performed by the global gain map generation unit 111 in the image processing apparatus of this embodiment. The gradation correction curve is calculated using a known method that can calculate the gain for the entire image area by, for example, performing spline interpolation to match the brightness value of the target area in the image to the target brightness value. can do. Furthermore, as described above, the solid line portion 604 in FIG. 6(b) is the gradation correction curve 601 in FIG. 6(a) converted into a gain table, and represents the gain characteristics for brightness adjustment. ing.

図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 solid line portion 905 in FIG. 9(d) indicates each gain of the global gain map generated based on the input luminance signal 901 illustrated in FIG. 9(a) using the global gain characteristic illustrated in FIG. 6(b). It shows a gain signal with values plotted in the x direction. In FIG. 9(d), the horizontal axis represents the position in the x direction, and the vertical axis represents the gain signal. The gain signal in the solid line portion 905 in FIG. 9(d) has a gain characteristic in which the gain value increases from G1 to G2 in response to the portion where the luminance value increases from Y1 to Y2 in the input luminance signal 901 in FIG. 9(a). It is a signal with Note that the gain value G1 is a gain value corresponding to the luminance value Y1 of the input luminance signal, and the gain value G2 is a gain value corresponding to the luminance value Y2.

このように、グローバルゲインマップ算出部108は、グローバルゲイン特性を用い、図9(a)の入力輝度信号901を基に、図9(d)に示すようなゲイン特性のグローバルゲインマップを生成する。そして、グローバルゲインマップ算出部108にて生成されたグローバルゲインマップは、最終ゲインマップ生成部109に出力される。なお、図1では、座標(x,y)におけるグローバルゲインマップの値をGMglobal(x,y)と表記し、最終ゲインマップの値をGMlast(x,y)と表記している。 In this way, the global gain map calculation unit 108 uses the global gain characteristics to generate a global gain map with the gain characteristics shown in FIG. 9(d) based on the input luminance signal 901 in FIG. 9(a). . Then, the global gain map generated by the global gain map calculation section 108 is output to the final gain map generation section 109. Note that in FIG. 1, the value of the global gain map at coordinates (x, y) is expressed as GMglobal (x, y), and the value of the final gain map is expressed as GMlast (x, y).

最終ゲインマップ生成部109は、ローカルゲインマップ算出部107で生成されたローカルゲインマップと、グローバルゲインマップ算出部108で生成されたグローバルゲインマップとを基に、最終的なゲインマップを生成する。そして、最終ゲインマップ生成部109は、そのグローバルゲインマップをゲイン処理部112に出力する。 The final gain map generation unit 109 generates a final gain map based on the local gain map generated by the local gain map calculation unit 107 and the global gain map generated by the global gain map calculation unit 108. Then, the final gain map generation section 109 outputs the global gain map to the gain processing section 112.

ここで、図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 map generation unit 109 calculates the gain signal GMlast(x,y) of the final gain map using equation (6).

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 gain processing unit 112 performs gain processing to apply a final gain map to the input image. As mentioned above, if the input luminance signal value at coordinates (x, y) is IMin (x, y) and the final gain map value is GMlast (x, y), then the output luminance signal value after gain processing IMout ( x, y) are determined by the above-mentioned equation (1).

本実施形態の画像処理装置は、以上説明したような画像処理を行うことにより、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.
前記生成手段は、前記画像の画素ごとに対応したゲイン値からなるゲインマップを生成し、
前記処理手段は、前記ゲインマップの前記画素ごとに対応したゲイン値を用いて前記ゲイン処理を行うことを特徴とする請求項に記載の画像処理装置。
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.
前記生成手段は、
前記画像に対して明るさ調整を行うグローバルゲインマップと、
前記画像に対して局所的にコントラスト調整を行うためのローカルゲインマップと、を生成し、
前記グローバルゲインマップと前記ローカルゲインマップとを加算して、前記処理手段が前記ゲイン処理に用いる最終的なゲインマップを生成することを特徴とする請求項に記載の画像処理装置。
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のダイナミックレンジに対応するように変更した特性となる、前記ゲイン特性とに基づいて、前記ローカルゲインマップを生成することを特徴とする請求項に記載の画像処理装置。
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 .
前記生成手段は、前記画像と、前記画像を縮小処理した後に前記画像のサイズに拡大した画像、または、前記画像をフィルタ処理した画像とを基に前記ローカルゲインマップを生成することを特徴とする請求項またはに記載の画像処理装置。 The generating means generates the local gain map based on the image and an image obtained by reducing the image and then enlarging it to the size of the image, or an image obtained by filtering the image. The image processing apparatus according to claim 3 or 4 . 前記生成手段は、前記画像と、前記画像を縮小処理した後に前記画像のサイズに拡大して得られた周波数が異なる少なくとも2つの画像、または、前記画像をフィルタ処理して得られた周波数が異なる少なくとも2つの画像とを基に、前記ローカルゲインマップを生成することを特徴とする請求項に記載の画像処理装置。 The generating means is configured to generate at least two images having different frequencies, the image and the images obtained by reducing the image and then enlarging it to the size of the image, or by filtering the image and having different frequencies. The image processing apparatus according to claim 5 , wherein the local gain map is generated based on at least two images . 画像処理装置が実行する画像処理方法であって、
未現像の画像を現像する際のゲイン処理に用いるゲイン信号を生成する生成工程と、
前記生成工程により生成されたゲイン信号を用いて、前記未現像の画像に対して前記ゲイン処理を行う処理工程と、を有し、
前記未現像の画像を用いて、第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.
コンピュータを、請求項1乃至6のいずれか1項に記載の画像処理装置が有する各手段として機能させるためのプログラム。 A program for causing a computer to function as each means included in the image processing apparatus according to any one of claims 1 to 6 .
JP2020024948A 2020-02-18 2020-02-18 Image processing device, image processing method, and program Active JP7446847B2 (en)

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)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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

Patent Citations (1)

* Cited by examiner, † Cited by third party
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