JP2011086976A - Image processor and image processing method - Google Patents

Image processor and image processing method Download PDF

Info

Publication number
JP2011086976A
JP2011086976A JP2009235896A JP2009235896A JP2011086976A JP 2011086976 A JP2011086976 A JP 2011086976A JP 2009235896 A JP2009235896 A JP 2009235896A JP 2009235896 A JP2009235896 A JP 2009235896A JP 2011086976 A JP2011086976 A JP 2011086976A
Authority
JP
Japan
Prior art keywords
component
image data
correction parameter
input image
image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2009235896A
Other languages
Japanese (ja)
Other versions
JP5392560B2 (en
Inventor
Kiriko Yamada
桐子 山田
Kenji Kubota
賢治 久保田
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.)
Victor Company of Japan Ltd
Original Assignee
Victor Company of Japan Ltd
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 Victor Company of Japan Ltd filed Critical Victor Company of Japan Ltd
Priority to JP2009235896A priority Critical patent/JP5392560B2/en
Publication of JP2011086976A publication Critical patent/JP2011086976A/en
Application granted granted Critical
Publication of JP5392560B2 publication Critical patent/JP5392560B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Image Processing (AREA)
  • Color Television Image Signal Generators (AREA)
  • Facsimile Image Signal Circuits (AREA)
  • Color Image Communication Systems (AREA)
  • Studio Devices (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To perform contrast correction to obtain a natural image without sense of incongruity after the correction. <P>SOLUTION: The image processor includes a filtering portion, a reflectance component calculation processing portion, a correction parameter calculation portion, and a multiplication portion. The filtering portion extracts an illumination light component of input image data. The reflectance component calculation processing portion divides the input image data by the extracted illumination light component to calculate a reflectance component of the input image data. The correction parameter calculation portion calculates a correction parameter based on the calculated reflectance component. The multiplication portion multiplies the input image data by the calculated correction parameter to generate corrected image data. <P>COPYRIGHT: (C)2011,JPO&INPIT

Description

本発明は、コントラストを補正する画像処理技術に係り、特に、レチネックス理論(Retinex理論)を適用したコントラスト補正画像処理技術に関する。   The present invention relates to an image processing technique for correcting contrast, and more particularly, to a contrast-corrected image processing technique to which Retinex theory is applied.

コントラストを補正する画像処理として、入力階調に対する出力階調の変化を表したカーブであるトーンカーブを調整する方法が広く用いられている。例えば、図9に示すようなS字形状のトーンカーブを用いて、図10(a)に示した原画像の補正を行なうと、明るい部分はより明るく、暗い部分はより暗くなる補正結果となり、図10(b)に示すようなコントラストが強調された補正画像を得ることができる。   As image processing for correcting contrast, a method of adjusting a tone curve, which is a curve representing a change in output tone with respect to an input tone, is widely used. For example, when the original image shown in FIG. 10A is corrected using an S-shaped tone curve as shown in FIG. 9, the bright part becomes brighter and the dark part becomes darker. A corrected image with enhanced contrast as shown in FIG. 10B can be obtained.

特開2005−26804号公報JP 2005-26804 A

トーンカーブをS字型に調整することで、明暗差の少ない画像のコントラストを強調する補正を行なうことができるが、この方法では、単一のトーンカーブを用いて画像全体が一律に補正されることになるため、同じ明るさの画素であれば周囲の明るさに関わらず同じ明るさに補正されることになる。   By adjusting the tone curve to be S-shaped, it is possible to perform correction that enhances the contrast of an image with little difference between light and dark, but with this method, the entire image is uniformly corrected using a single tone curve. Therefore, pixels having the same brightness are corrected to the same brightness regardless of the surrounding brightness.

このため、周囲とのバランスから明るくする必要のない部分が明るくなったり、暗くする必要のない部分が暗くなったりすることがあり、補正結果が不自然で見栄えが悪化する場合がある。また、コントラストが強くなりすぎて滑らかな階調変化が失われることもあり、この場合も、補正結果が不自然で見栄えが悪化することになる。   For this reason, a portion that does not need to be brightened from the balance with the surroundings may become bright, or a portion that does not need to be darkened may darken, and the correction result may be unnatural and the appearance may deteriorate. In addition, the contrast becomes too strong and the smooth gradation change may be lost. In this case, the correction result is unnatural and the appearance is deteriorated.

例えば、図10(a)の領域A0と領域B0とは、ほぼ同じ明るさであるため、図10(b)の領域A1と領域B1のように同じ明るさの補正結果となる。しかし、岩肌が写っている領域B0は、周囲に比べて明るい部分であるのにも関わらず、領域B1は暗く補正されすぎて不自然な補正結果となっている。これを避けるために、領域B1が明るくなるようなトーンカーブを用いると、領域A1と周囲の空との明るさの差が不明瞭になってしまう。また、補正後の図10(b)では、灯台の白色が過剰に明るく補正され、階調変化が失われており、不自然なコントラスト補正結果となっている。   For example, since the area A0 and the area B0 in FIG. 10A have substantially the same brightness, the same brightness correction results are obtained as in the areas A1 and B1 in FIG. 10B. However, although the area B0 in which the rock surface is reflected is a bright part compared with the surrounding area, the area B1 is corrected too darkly, resulting in an unnatural correction result. To avoid this, if a tone curve that brightens the area B1 is used, the difference in brightness between the area A1 and the surrounding sky becomes unclear. Further, in FIG. 10B after correction, the lighthouse white color is corrected to be excessively bright, and the gradation change is lost, resulting in an unnatural contrast correction result.

そこで、本発明は、補正後の画像が自然で違和感のないコントラスト補正を行なう画像処理装置および画像処理方法を提供することを目的とする。   Therefore, an object of the present invention is to provide an image processing apparatus and an image processing method for performing contrast correction with a natural and uncomfortable image after correction.

上記課題を解決するため、本発明の第1の態様である画像処理装置は、入力画像データの照明光成分を抽出するフィルタリング手段と、前記入力画像データを抽出された前記照明光成分で除算することにより入力画像データの反射率成分を算出する反射率成分算出処理手段と、算出された前記反射率成分に基づいて補正パラメータを算出する補正パラメータ算出手段と、算出された前記補正パラメータと前記入力画像データとを乗算することにより補正画像データを生成する乗算手段とを備えたことを特徴とする。   In order to solve the above problems, an image processing apparatus according to a first aspect of the present invention divides the input image data by the extracted illumination light component, filtering means for extracting the illumination light component of the input image data, and A reflectance component calculation processing unit that calculates a reflectance component of the input image data, a correction parameter calculation unit that calculates a correction parameter based on the calculated reflectance component, the calculated correction parameter, and the input Multiplying means for generating corrected image data by multiplying image data is provided.

ここで、前記補正パラメータ算出手段は、前記反射率成分と定数とを乗じることで前記補正パラメータを算出することができる。   Here, the correction parameter calculation means can calculate the correction parameter by multiplying the reflectance component and a constant.

上記課題を解決するため、本発明の第2の態様である画像処理装置は、入力画像データの照明光成分を抽出するフィルタリング手段と、前記入力画像データを抽出された前記照明光成分で除算することにより入力画像データの反射率成分を算出する反射率成分算出処理手段と、前記入力画像データの彩度成分と輝度成分との比と負の相関関係にある彩度ゲインを算出する彩度ゲイン算出手段と、算出された前記反射率成分および前記彩度ゲインに基づいて補正パラメータを算出する補正パラメータ算出手段と、算出された前記補正パラメータと前記入力画像データとを乗算することにより補正画像データを生成する乗算手段とを備えたことを特徴とする。   In order to solve the above problems, an image processing apparatus according to a second aspect of the present invention divides the input image data by the extracted illumination light component, filtering means for extracting the illumination light component of the input image data, and A reflectance component calculation processing means for calculating a reflectance component of the input image data, and a saturation gain for calculating a saturation gain having a negative correlation with a ratio between the saturation component and the luminance component of the input image data Correction image data by multiplying the calculation means, correction parameter calculation means for calculating a correction parameter based on the calculated reflectance component and the saturation gain, and the calculated correction parameter and the input image data And multiplication means for generating.

ここで、前記補正パラメータ算出手段は、前記反射率成分と前記彩度ゲインとを乗じることで前記補正パラメータを算出することができる。   Here, the correction parameter calculation means can calculate the correction parameter by multiplying the reflectance component and the saturation gain.

いずれの態様においても、前記反射率成分算出処理手段は、前記入力画像データの各画素についてRGB成分毎に反射率成分を算出し、前記補正パラメータ算出手段は、前記入力画像データの各画素についてRGB成分毎に補正パラメータを算出することができる。   In any aspect, the reflectance component calculation processing means calculates a reflectance component for each RGB component for each pixel of the input image data, and the correction parameter calculation means for RGB for each pixel of the input image data. A correction parameter can be calculated for each component.

また、前記フィルタリング手段は、前記入力画像データの輝度成分に対して平滑化フィルタを施すことで前記照明光成分を抽出することができる。   The filtering means can extract the illumination light component by applying a smoothing filter to the luminance component of the input image data.

上記課題を解決するため、本発明の第3の態様である画像処理方法は、入力画像データの照明光成分を抽出するフィルタリングステップと、前記入力画像データを抽出された前記照明光成分で除算することにより入力画像データの反射率成分を算出する反射率成分算出ステップと、算出された前記反射率成分に基づいて補正パラメータを算出する補正パラメータ算出ステップと、算出された前記補正パラメータと前記入力画像データとを乗算することにより補正画像データを生成する乗算ステップとを含むことを特徴とする。   In order to solve the above-described problem, an image processing method according to a third aspect of the present invention includes a filtering step of extracting an illumination light component of input image data, and dividing the input image data by the extracted illumination light component. A reflectance component calculating step for calculating a reflectance component of the input image data, a correction parameter calculating step for calculating a correction parameter based on the calculated reflectance component, the calculated correction parameter, and the input image And a multiplication step of generating corrected image data by multiplying the data.

上記課題を解決するため、本発明の第4の態様である画像処理方法は、入力画像データの照明光成分を抽出するフィルタリングステップと、前記入力画像データを抽出された前記照明光成分で除算することにより入力画像データの反射率成分を算出する反射率成分算出ステップと、前記入力画像データの彩度成分と輝度成分との比と負の相関関係にある彩度ゲインを算出する彩度ゲイン算出ステップと、算出された前記反射率成分および前記彩度ゲインに基づいて補正パラメータを算出する補正パラメータ算出ステップと、算出された前記補正パラメータと前記入力画像データとを乗算することにより補正画像データを生成する乗算ステップとを含むことを特徴とする。   In order to solve the above-described problem, an image processing method according to a fourth aspect of the present invention includes a filtering step of extracting an illumination light component of input image data, and dividing the input image data by the extracted illumination light component. A reflectance component calculating step for calculating a reflectance component of the input image data, and a saturation gain calculation for calculating a saturation gain having a negative correlation with a ratio between the saturation component and the luminance component of the input image data. A correction parameter calculation step for calculating a correction parameter based on the calculated reflectance component and the saturation gain, and multiplying the calculated correction parameter by the input image data to obtain corrected image data. A multiplication step to be generated.

本発明によれば、補正後の画像が自然で違和感のないコントラスト補正を行なう画像処理装置および画像処理方法が提供される。   According to the present invention, there are provided an image processing apparatus and an image processing method for performing contrast correction in which a corrected image is natural and uncomfortable.

本実施形態に係る画像処理装置の構成を示すブロック図である。It is a block diagram which shows the structure of the image processing apparatus which concerns on this embodiment. 第1実施例におけるコントラスト補正部の構成示すブロック図である。It is a block diagram which shows the structure of the contrast correction | amendment part in 1st Example. 画像の輝度成分に対し、平均フィルタによってフィルタリングを行なった結果を示す図である。It is a figure which shows the result of having filtered with the average filter with respect to the luminance component of an image. 画像処理装置の第1実施例におけるコントラスト補正処理の手順について説明するフローチャートである。It is a flowchart explaining the procedure of the contrast correction process in 1st Example of an image processing apparatus. 原画像と本実施形態によるコントラスト補正後の画像とを示す図である。It is a figure which shows an original image and the image after the contrast correction by this embodiment. 第2実施例におけるコントラスト補正部の構成示すブロック図である。It is a block diagram which shows the structure of the contrast correction | amendment part in 2nd Example. 彩度ゲイン算出部の構成を示すブロック図である。It is a block diagram which shows the structure of a saturation gain calculation part. 画像処理装置の第2実施例におけるコントラスト補正処理の手順について説明するフローチャートである。It is a flowchart explaining the procedure of the contrast correction process in 2nd Example of an image processing apparatus. S字形状のトーンカーブを示す図である。It is a figure which shows a S-shaped tone curve. 原画像とS字形状のトーンカーブを用いた補正画像とを示す図である。It is a figure which shows the correction | amendment image using an original image and an S-shaped tone curve.

本発明の実施の形態について図面を参照して詳細に説明する。図1は、本実施形態に係る画像処理装置の構成を示すブロック図である。本図に示すように、画像処理装置100は、画像入力部110とコントラスト補正部120と画像出力部130とを備えている。   Embodiments of the present invention will be described in detail with reference to the drawings. FIG. 1 is a block diagram showing the configuration of the image processing apparatus according to this embodiment. As shown in the figure, the image processing apparatus 100 includes an image input unit 110, a contrast correction unit 120, and an image output unit 130.

画像入力部110は、補正前の画像が入力され、RGB成分毎の画像データである原画像I(Ir,Ig,Ib)をコントラスト補正部120に出力する。コントラスト補正部120は、原画像Iに対してコントラスト補正処理を行ない、補正後の画像データである補正画像O(Or,Og,Ob)を画像出力部130に出力する。画像出力部130は、補正後の画像を外部装置等に出力する。   The image input unit 110 receives an uncorrected image and outputs an original image I (Ir, Ig, Ib), which is image data for each RGB component, to the contrast correction unit 120. The contrast correction unit 120 performs a contrast correction process on the original image I, and outputs a corrected image O (Or, Og, Ob), which is corrected image data, to the image output unit 130. The image output unit 130 outputs the corrected image to an external device or the like.

画像処理装置100は、例えば、CPU、メモリ、インタフェース等を備えたPC等の汎用的な情報処理装置や、画像処理専用装置等を用いて構成することができる。また、デジタルスチールカメラ装置、デジタルビデオカメラ装置、監視カメラ装置等の映像機器の一部としてハードウェア的あるいはソフトウェア的に構成するようにしてもよい。   The image processing apparatus 100 can be configured using, for example, a general-purpose information processing apparatus such as a PC having a CPU, a memory, an interface, and the like, an image processing dedicated apparatus, and the like. Further, it may be configured in hardware or software as part of video equipment such as a digital still camera device, a digital video camera device, and a surveillance camera device.

ここで、本実施形態で行なうコントラスト補正について説明する。上述のように、従来から広く行なわれているトーンカーブを用いたコントラスト補正では、同じ値の画素であれば周囲の明るさに関わらず同じ値に補正される結果、補正結果が不自然で見栄えが悪化する場合がある。   Here, the contrast correction performed in the present embodiment will be described. As described above, in the conventional contrast correction using the tone curve, if the pixels have the same value, the correction result is unnatural and looks good as a result of correcting to the same value regardless of the surrounding brightness. May get worse.

この不自然さを防いで違和感のない補正画像を得るために、コントラスト補正を行なう際に、明るい領域の暗い部分はより暗く、暗い領域の明るい部分はより明るくなるようにして明るさの差を拡大することが考えられる。   In order to prevent this unnaturalness and obtain a corrected image with no sense of incongruity, when performing contrast correction, the dark part of the bright area becomes darker and the bright part of the dark area becomes brighter to reduce the difference in brightness. It is possible to expand.

この点に着目して、本実施形態では、注目画素の明るさと周囲の明るさとの関係を評価して注目画素の補正を行なうようにする。具体的には、
出力階調=補正パラメータ×入力階調
としたとき、注目画素が周囲の明るさよりも明るければ、補正パラメータ>1となるようにし、注目画素が周囲の明るさより暗ければ、補正パラメータ<1となるようにする。ここで、補正パラメータは、注目画素の階調を補正するためのパラメータであり、補正パラメータ>1であれば明るく補正され、補正パラメータ<1であれば暗く補正される。
Focusing on this point, in the present embodiment, the relationship between the brightness of the target pixel and the surrounding brightness is evaluated to correct the target pixel. In particular,
When output gradation = correction parameter × input gradation, if the pixel of interest is brighter than the surrounding brightness, the correction parameter is set to 1, and if the pixel of interest is darker than the ambient brightness, the correction parameter is set to <1. To be. Here, the correction parameter is a parameter for correcting the gradation of the target pixel, and is corrected brightly if the correction parameter> 1, and darkly corrected if the correction parameter <1.

本実施形態では、注目画素が周囲の明るさよりも明るければ1より大きくなり、注目画素が周囲の明るさより暗ければ1より小さくなる補正パラメータとして、Retinex理論(レチネックス理論)によって導かれる反射率成分Rから得られる値を用いるものとする。反射率成分Rは、原画像Iを照明光成分Lで割った値であり、R=I/Lとなる。   In the present embodiment, the reflectance component derived by the Retinex theory (Retinex theory) is used as a correction parameter that is larger than 1 if the pixel of interest is brighter than the surrounding brightness, and smaller than 1 if the pixel of interest is darker than the surrounding brightness. The value obtained from R shall be used. The reflectance component R is a value obtained by dividing the original image I by the illumination light component L, and R = I / L.

後述するように、照明光成分Lは、原画像Iの輝度成分Yを平滑化したものであるため、着目画素と周囲の明るさとの差がない場合には、I=L(∴R=1)となり、着目画素が周囲よりも明るい場合には、I>L(∴R>1)となり、着目画素が周囲よりも暗い場合には、I<L(∴R<1)となる。   As will be described later, the illumination light component L is obtained by smoothing the luminance component Y of the original image I. Therefore, when there is no difference between the pixel of interest and the surrounding brightness, I = L (∴R = 1) When the pixel of interest is brighter than the surroundings, I> L (∴R> 1), and when the pixel of interest is darker than the surroundings, I <L (∴R <1).

ここで、人の視覚は照明光を除去して外界を見る、明暗恒常性や色恒常性を備えているというレチネックス理論について簡単に説明する。レチネックス理論によると人間の視覚は各物体の反射率成分Rの比によって色を知覚する。反射率成分Rは、照明に依存しない被写体の画像成分である。これに対し、映像機器等に撮像された原画像Iは受光した物理的な光量によって各画素の値が決定されており、反射率成分Rと照明光成分Lとの積で表わされる。   Here, the Retinex theory that human vision has light / darkness constancy and color constancy that removes illumination light and looks at the outside world will be briefly described. According to Retinex theory, human vision perceives color by the ratio of the reflectance component R of each object. The reflectance component R is an image component of a subject that does not depend on illumination. On the other hand, the value of each pixel is determined by the received physical quantity of light in the original image I captured by a video device or the like, and is represented by the product of the reflectance component R and the illumination light component L.

したがって、原画像Iから照明光成分Lを分離して反射率成分Rを得ることによって、照明光成分Lに依存しない適切な画像を得ることができ、画像のコントラストの補正が可能になると考えられる。   Therefore, by separating the illumination light component L from the original image I and obtaining the reflectance component R, it is possible to obtain an appropriate image that does not depend on the illumination light component L, and to correct the contrast of the image. .

レチネックス理論を用いた代表的な画像処理アルゴリズムの一つにCenter/Surround Retinex(以下、C/S Retinex)がある。このアルゴリズムを[数1]、[数2]を用いて説明する。
[数1]はレチネックス理論を表した式である。Rは物体そのものの反射率、すなわちレチネックス理論において求める補正画像でありレチネックス出力と呼ぶ。Iは原画像であり、例えば、カメラなどの撮影画像などが考えられる。Lは照明光成分、すなわち、撮影時の環境光を表す。
One of the typical image processing algorithms using Retinex theory is Center / Surround Retinex (hereinafter, C / S Retinex). This algorithm will be described using [Equation 1] and [Equation 2].
[Equation 1] is an expression representing Retinex theory. R is the reflectance of the object itself, that is, a corrected image obtained in Retinex theory, and is called Retinex output. I is an original image, for example, a photographed image of a camera or the like. L represents an illumination light component, that is, ambient light at the time of photographing.

ここで、(x,y)は二次元画像の座標を表し、I(x,y)は座標(x,y)の画素値を示す。[数2]における添え字iは原画像Iの各色成分を表し、原画像IがRGB画像である場合、i=R,G,Bである。また、Aはゲイン定数である。   Here, (x, y) represents the coordinates of the two-dimensional image, and I (x, y) represents the pixel value of the coordinates (x, y). The subscript i in [Expression 2] represents each color component of the original image I. When the original image I is an RGB image, i = R, G, B. A is a gain constant.

C/S Retinexでは、レチネックス出力画像Rは、[数2]によって算出される。[数2]において照明光成分Lは、原画像Iを平滑化してぼかしたぼけ画像とし、原画像I(x,y)と周辺関数F(x,y)との畳み込み積分により求めることができる。周辺関数F(x,y)にはガウス関数などが用いられる。周辺関数をガウス関数とした場合の、F(x,y)を[数3]、[数4]に示す。
ここで、cはガウスフィルタFのスケールを表す定数とする。
In C / S Retinex, the Retinex output image R is calculated by [Equation 2]. In [Equation 2], the illumination light component L is obtained by smoothing the original image I into a blurred image and by convolution integration of the original image I i (x, y) and the peripheral function F (x, y). it can. A Gaussian function or the like is used as the peripheral function F (x, y). F (x, y) when the peripheral function is a Gaussian function is shown in [Equation 3] and [Equation 4].
Here, c is a constant representing the scale of the Gaussian filter F.

一般的なC/S Retinex[数2]において、[数1]の逆算から割り算を行なう、[数5]に示すLinear Retinex(以下、LR)というアルゴリズムが提案されている。
このアルゴリズム(LR)では、照明光成分Lは、輝度信号(Y成分)をぼかしたぼけ画像とし、Y(x,y)と周辺関数F(x,y)との畳み込み積分により求めることができる。照明光成分Lを、各色成分のぼけ画像でなく、Y成分、すなわち輝度信号のぼけ画像としていることで、補正後のR、G、Bのアンバランスを防いでいる。本実施形態では、[数5]で求めたY成分のぼけ画像を照明光成分Lと推定して用いるものとする。
In general C / S Retinex [Equation 2], an algorithm called Linear Retinex (hereinafter, LR) shown in [Equation 5] that performs division from the reverse calculation of [Equation 1] has been proposed.
In this algorithm (LR), the illumination light component L can be obtained by convolution integration of Y (x, y) and the peripheral function F (x, y) with the luminance signal (Y component) as a blurred image. . Since the illumination light component L is not a blurred image of each color component but a Y component, that is, a blurred image of a luminance signal, uncorrected R, G, and B are prevented from being corrected. In the present embodiment, the blur image of the Y component obtained by [Equation 5] is assumed to be used as the illumination light component L.

本実施形態のコントラスト補正部120では、このようなレチネックス理論を適用して、原画像Iのコントラスト補整処理を行なう。なお、レチネックス理論によって得られる反射率成分R自体が原画像Iのコントラストを改善した画像であるが、レチネックス処理後の値を出力階調範囲内(例えば8ビット階調であれば0〜255)に調整する際に必要なゲイン設定、クリップ設定が一般に複雑である。   The contrast correction unit 120 of the present embodiment performs the contrast correction processing of the original image I by applying such Retinex theory. Note that the reflectance component R itself obtained by the Retinex theory is an image in which the contrast of the original image I is improved, but the value after Retinex processing is within the output gradation range (for example, 0 to 255 for 8-bit gradation). In general, the gain setting and clip setting required for adjustment are complicated.

すなわち、クリップ、ゲインの値の選定は、原画像、フィルタサイズなどの条件によって異なり、設定値によっては、白飛び、黒潰れなどが起こる場合もある。また、白飛び、黒潰れを起こさない値であっても、画像全体が、本来の輝度と大幅に異なる輝度となり、グレー化することもある。   That is, the selection of the clip and gain values varies depending on conditions such as the original image and the filter size, and depending on the set value, whiteout or blackout may occur. Even if the value does not cause overexposure or blackout, the entire image has a luminance that is significantly different from the original luminance and may be grayed out.

また、R,G,B各成分のバランスも考慮しなくてはならない。特に、コントラスト強調を重視してゲイン設定を行なった場合、特定色成分を過強調してしまうことが起こり得る。静止画の処理の場合、適宜、値を入力して調整することも可能だが、動画の場合は、動的に値を制御する必要もある。   In addition, the balance of R, G, and B components must be taken into consideration. In particular, when gain setting is performed with emphasis on contrast enhancement, a specific color component may be overemphasized. In the case of still image processing, it is possible to input and adjust values as appropriate, but in the case of moving images, it is also necessary to dynamically control the values.

そこで、本実施形態では、レチネックス処理結果である反射率成分Rを補正画像とするのではなく、反射率成分Rを、
出力階調=補正パラメータ×入力階調
における補正パラメータの算出に用いることにより、補正後の画像が自然で違和感のないコントラスト補正を行なうようにする。
Therefore, in this embodiment, instead of using the reflectance component R, which is the Retinex processing result, as a corrected image, the reflectance component R is
By using it for calculation of the correction parameter of output gradation = correction parameter × input gradation, the corrected image is subjected to contrast correction that is natural and does not cause a sense of incongruity.

図2は、コントラスト補正部120の構成の第1実施例を示すブロック図である。本図に示すように、コントラスト補正部120は、画像抽出部121と、フィルタリング部122と、レチネックス処理部123と、補正パラメータ算出部124と、乗算部125とを備えている。   FIG. 2 is a block diagram showing a first embodiment of the configuration of the contrast correction unit 120. As shown in the figure, the contrast correction unit 120 includes an image extraction unit 121, a filtering unit 122, a Retinex processing unit 123, a correction parameter calculation unit 124, and a multiplication unit 125.

画像抽出部121は、RGBで表わされた原画像Iから輝度成分Yを抽出する。RGB形式から輝度成分Yの抽出は、例えば、[数6]にしたがって行なうことができる。
フィルタリング部122は、輝度成分Yをフィルタリングすることで照明光成分Lを生成する。フィルタリング部122が用いるフィルタは、例えば、平均フィルタ、[数3][数4]に示したガウスフィルタ等の画像を平滑化してぼかす効果を有するローパスフィルタとする。
The image extraction unit 121 extracts a luminance component Y from the original image I expressed in RGB. The extraction of the luminance component Y from the RGB format can be performed according to [Equation 6], for example.
The filtering unit 122 generates the illumination light component L by filtering the luminance component Y. The filter used by the filtering unit 122 is, for example, an average filter, a low-pass filter having an effect of smoothing and blurring an image such as the Gaussian filter shown in [Expression 3] and [Expression 4].

このフィルタのサイズ、すなわち、参照する周辺画素の数によって、ぼかしの効果が変化し、レチネックス処理効果も変化する。一例として、640×480[ピクセル]の画像の輝度成分に対し、平均フィルタによってフィルタリングを行なった結果を図3に示す。図3(a)はフィルタサイズを32×32[ピクセル]とし、図3(b)は64×64[ピクセル]としたものである。   The blurring effect changes and the Retinex processing effect also changes depending on the size of the filter, that is, the number of surrounding pixels to be referred to. As an example, FIG. 3 shows a result of filtering the luminance component of an image of 640 × 480 [pixels] using an average filter. FIG. 3A shows a filter size of 32 × 32 [pixels], and FIG. 3B shows 64 × 64 [pixels].

本図から分かるように、図3(b)に示したフィルタサイズが大きいフィルタリング結果の方が、ぼかしが強くなっている。フィルタFのスケール(フィルタの面積)は、[数3]の定数cの大きさによって周辺情報量が変化するため、処理効果が異なった画像が得られる。例えば、フィルタスケールが小さい(定数cが小さい)場合、参照される周辺情報量は少ないため、エッジ再現が良好であるが、局所的な情報を参照するため、補正にムラが生じ、全体としての色再現性に乏しくなる。また、フィルタスケールが大きい(定数cが大きい)場合、広範囲での周辺情報を参照するため、画像全体のコントラスト補正および色再現性は良好ではあるが、細部の明暗の再現性に乏しく、haloと呼ばれるエッジぼけなどが生じる。   As can be seen from this figure, the filtering result having a larger filter size shown in FIG. Since the scale of the filter F (area of the filter) changes the amount of peripheral information depending on the size of the constant c in [Equation 3], images with different processing effects can be obtained. For example, when the filter scale is small (the constant c is small), the peripheral information amount to be referred to is small, so that the edge reproduction is good. Color reproduction is poor. In addition, when the filter scale is large (constant c is large), the peripheral information in a wide range is referred to, so the contrast correction and color reproducibility of the entire image are good, but the reproducibility of light and dark details is poor. An edge blur is called.

そこで、複数の大きさの周辺関数Fの合成による補正を以下に示す。合成するフィルタリング画像の数をnとした周辺関数Fnを[数7]に示し、合成された周辺関数Fを[数8]に示す。
図3(c)に示した画像は、図3(a)、図3(b)に示したフィルタリング画像を同率で合成したものである。本実施形態ではn=2として2つの異なるスケールのフィルタリング画像から照明光成分Lを求めているが、単一のフィルタによるフィルタリングを行なった画像を照明光成分Lとしてもよい。
Accordingly, correction by combining peripheral functions F having a plurality of sizes is shown below. A peripheral function Fn where n is the number of filtering images to be combined is shown in [Expression 7], and a combined peripheral function F is shown in [Expression 8].
The image shown in FIG. 3C is a combination of the filtered images shown in FIGS. 3A and 3B at the same rate. In the present embodiment, the illumination light component L is obtained from filtered images of two different scales with n = 2, but an image subjected to filtering by a single filter may be used as the illumination light component L.

レチネックス処理部123は、レチネックス処理部R123r、レチネックス処理部G123g、レチネックス処理部B123bを含み、それぞれR成分、G成分、B成分について、原画像Iを照明光成分Lで除算してレチネックス処理結果である反射率成分R、すなわち、I/Lを得る。このように、レチネックス処理部123は、反射率成分算出処理部として機能する。この除算処理では、1画素毎に、RGBそれぞれについて、対応する照明光成分Lの値で除算を行なう。 The Retinex processing unit 123 includes a Retinex processing unit R123r, a Retinex processing unit G123g, and a Retinex processing unit B123b. For each of the R component, the G component, and the B component, the original image I is divided by the illumination light component L, and the Retinex processing result is obtained. A certain reflectance component R i , that is, I i / L is obtained. Thus, the Retinex processing unit 123 functions as a reflectance component calculation processing unit. In this division processing, division is performed for each RGB by the value of the corresponding illumination light component L for each pixel.

補正パラメータ算出部124は、補正パラメータ算出部R124r、補正パラメータ算出部G124g、補正パラメータ算出部B124bを含み、それぞれR成分、G成分、B成分について、レチネックス処理結果I/Lを用いて補正パラメータPを算出する。 The correction parameter calculation unit 124 includes a correction parameter calculation unit R124r, a correction parameter calculation unit G124g, and a correction parameter calculation unit B124b. For each of the R component, the G component, and the B component, the correction parameter is calculated using the Retinex processing result I i / L. Pi is calculated.

補正パラメータPは、例えば、[数9]にしたがってR成分、G成分、B成分毎に算出することができる。ここで、Kは定数であり、例えば、過補正を防ぐために、K=K=K=0.8とすることができる。
あるいは、[数10]に示すように、原画像を基準として補正の度合いを調整するために、補正画像と原画像とを係数K(0≦K≦1)を用いて合成して、より自然な補正画像を得るようにしてもよい。
乗算部125は、乗算部R125r、乗算部G125g、乗算部B125bを含み、それぞれR成分、G成分、B成分について、原画像Iと補正パラメータPとの乗算を行なうことで補正画像Oを生成し、画像出力部130に出力する。
Correction parameter P i, for example, it is possible to calculate an R component, G component, each component B according to Equation 9]. Here, K i is a constant, and for example, K R = K G = K B = 0.8 can be set to prevent overcorrection.
Alternatively, as shown in [Equation 10], in order to adjust the degree of correction using the original image as a reference, the corrected image and the original image are combined using a coefficient K i (0 ≦ K i ≦ 1), and A more natural corrected image may be obtained.
The multiplication unit 125 includes a multiplication unit R125r, a multiplication unit G125g, and a multiplication unit B125b. The corrected image O i is obtained by multiplying the R component, the G component, and the B component by the original image I i and the correction parameter P i , respectively. Is output to the image output unit 130.

次に、上記構成の画像処理装置100の第1実施例におけるコントラスト補正処理の手順について図4のフローチャートを参照して説明する。   Next, the procedure of contrast correction processing in the first embodiment of the image processing apparatus 100 having the above configuration will be described with reference to the flowchart of FIG.

まず、画像入力部110が外部装置等から補正前の画像を入力され、RGB成分毎の画像データである原画像I(Ir,Ig,Ib)をコントラスト補正部120に出力する(S101)。次いで、画像抽出部121が、RGB成分に基づいて輝度成分Yを抽出する(S102)。抽出された輝度成分Yを、フィルタリング部122においてフィルタFでフィルタリングすることにより、照明光成分Lが得られる(S103)。   First, the image input unit 110 receives an uncorrected image from an external device or the like, and outputs an original image I (Ir, Ig, Ib), which is image data for each RGB component, to the contrast correction unit 120 (S101). Next, the image extraction unit 121 extracts the luminance component Y based on the RGB components (S102). By filtering the extracted luminance component Y with the filter F in the filtering unit 122, an illumination light component L is obtained (S103).

そして、レチネックス処理部123が、原画像IのRGB各成分を照明光成分Lで除算するレチネックス処理を行なう(S104)。レチネックス処理結果I/Lが得られると、補正パラメータ算出部124が、[数9]あるいは[数10]にしたがって補正パラメータPを算出する(S105)。 Then, the Retinex processing unit 123 performs Retinex processing for dividing the RGB components of the original image I by the illumination light component L (S104). When the Retinex processing result I i / L is obtained, the correction parameter calculation unit 124 calculates the correction parameter P i according to [Equation 9] or [Equation 10] (S105).

次いで、乗算部125が補正パラメータPと原画像Iとを乗算することで補正画像Oを生成する(S106)。補正画像Oは、画像出力部130によって、補正後の画像として外部装置等に出力される(S107)。 Then, to generate a corrected image O i by multiplying unit 125 multiplies the correction parameter P i and the original image I i (S106). The corrected image O i is output to the external device or the like as a corrected image by the image output unit 130 (S107).

レチネックス処理で用いられる照明光成分Lは輝度成分Yをフィルタリングによりぼかした値であるため、周辺画素の値を平滑化した値である。本実施形態では、照明光成分Lと原画像Iとの関係に基づいて補正パラメータを定めているため、元の画素値に関わらず、周辺の明るさによって補正がなされることになる。このため、明るい領域の暗い部分はより暗く、暗い領域の明るい部分はより明るく補正されることになり、自然で違和感のないコントラスト補正結果を得ることができる。   Since the illumination light component L used in the Retinex process is a value obtained by blurring the luminance component Y by filtering, it is a value obtained by smoothing the values of surrounding pixels. In the present embodiment, since the correction parameter is determined based on the relationship between the illumination light component L and the original image I, the correction is performed based on the brightness of the surroundings regardless of the original pixel value. For this reason, the dark portion of the bright region is darker and the bright portion of the dark region is corrected brighter, and a natural and uncontrast contrast correction result can be obtained.

上記の手順でコントラスト補正された画像の例を図5に示す。ここで、図5(a)は、補正前の画像を示し、図5(b)は、コントラスト補正後の画像を示している。図10(b)に示した従来のコントラスト補正後の画像と比べて、図5(b)に示した画像は、明るい領域の暗い部分はより暗く、暗い領域の明るい部分はより明るく補正されており、また、明るい部分の階調変化が保たれており、自然で違和感のないコントラスト補正結果が得られている。   FIG. 5 shows an example of an image whose contrast has been corrected by the above procedure. Here, FIG. 5A shows an image before correction, and FIG. 5B shows an image after contrast correction. Compared with the conventional image after contrast correction shown in FIG. 10B, the image shown in FIG. 5B is corrected so that the dark part of the bright region is darker and the bright part of the dark region is corrected brighter. In addition, the gradation change in the bright part is maintained, and a natural and comfortable contrast correction result is obtained.

次に、コントラスト補正部120の構成の第2実施例について説明する。第1実施例では、自然で違和感のないコントラスト補正結果を得ることができるが、画像によっては、特定の色に対して過補正となる補正結果が得られる場合がある。これは、原画像IとしてRGB信号を用い、照明光成分Lが輝度信号Yに基づくことから発生すると考えられる。   Next, a second embodiment of the configuration of the contrast correction unit 120 will be described. In the first embodiment, a natural and comfortable contrast correction result can be obtained, but depending on the image, a correction result that is overcorrected for a specific color may be obtained. This is considered to occur because an RGB signal is used as the original image I and the illumination light component L is based on the luminance signal Y.

すなわち、上述のようにRGB信号から[数6]にしたがって輝度成分Yを得ることができる。ここで、原画像Iが白黒画像の場合は、
Y=R=G=B
となり、なおかつ平坦で一様な画像であれば、平滑化しても値が変わらないため、Y=Lであり、
R/L=G/L=B/L=1
となる。この場合、[数9]の補正パラメータは、定数Kとなる。簡単のため、定数Kを1とすると、補正パラメータは1となり、補正は行なわれないことになる。
That is, the luminance component Y can be obtained from the RGB signal according to [Equation 6] as described above. Here, when the original image I is a black and white image,
Y = R = G = B
If the image is flat and uniform, the value does not change even after smoothing, so Y = L,
R / L = G / L = B / L = 1
It becomes. In this case, the correction parameter of [Equation 9] is a constant K. For simplicity, if the constant K is 1, the correction parameter is 1, and no correction is performed.

これに対し、例えば、赤一色の平坦な画像の場合、
Y=0.30*R
となるため、
R/L=3.33
となり、平坦な画像にもかかわらず、補正パラメータは約3.3となり、過補正となる。
On the other hand, for example, in the case of a flat image of one red color,
Y = 0.30 * R
So that
R / L = 3.33
Even though the image is flat, the correction parameter is about 3.3, which is overcorrection.

そこで、第2実施例では、色の濃い部分は色を抑えるように処理を行なうことで過補正を防ぐようにする。   Therefore, in the second embodiment, overcorrection is prevented by performing processing so as to suppress the color in dark portions.

YCbCr色空間で用いられる色差成分Cr、Cbは、それぞれ、R−Y、G−Yに比例するため、輝度成分Yによって、見た目の色の濃さが変化し、色差信号が同じ値でも、暗くなるほど、色が濃く見えることになる。したがって、第2実施例では、見た目の色の濃さを表す彩度Sを考慮し、S/Yにより、輝度成分Yに関わらない色の濃さを基準として、色の濃い部分は色を抑えるよう処理を行なうものとする。   Since the color difference components Cr and Cb used in the YCbCr color space are proportional to R-Y and G-Y, respectively, the darkness of the apparent color changes depending on the luminance component Y, and even if the color difference signal has the same value, it is dark. I see, the color looks darker. Therefore, in the second embodiment, the saturation S representing the color density of the appearance is taken into consideration, and the color is suppressed in S / Y based on the color density that is not related to the luminance component Y. It is assumed that processing is performed.

図6は、コントラスト補正部の構成の第2実施例であるコントラスト補正部120aを示すブロック図である。第1実施例と同じ機能ブロックについては同じ符号を付し、説明を簡略化する。   FIG. 6 is a block diagram showing a contrast correction unit 120a which is a second embodiment of the configuration of the contrast correction unit. The same functional blocks as those in the first embodiment are denoted by the same reference numerals, and the description is simplified.

本図に示すようにコントラスト補正部120aは、画像抽出部121aと、フィルタリング部122と、レチネックス処理部123と、補正パラメータ算出部124aと、乗算部125と、彩度算出部126と、彩度ゲイン算出部127とを備えている。第1実施例であるコントラスト補正部120とは、画像抽出部121aと補正パラメータ算出部124aとが異なる。   As shown in the figure, the contrast correction unit 120a includes an image extraction unit 121a, a filtering unit 122, a Retinex processing unit 123, a correction parameter calculation unit 124a, a multiplication unit 125, a saturation calculation unit 126, and a saturation. A gain calculation unit 127. The image extraction unit 121a and the correction parameter calculation unit 124a are different from the contrast correction unit 120 according to the first embodiment.

画像抽出部121aは、RGBで表わされた原画像Iから輝度成分Y、色差成分Cr、Cbを抽出する。RGB形式から色差成分Cr、Cbの抽出は、例えば、[数11]にしたがって行なうことができる。
彩度算出部126は、色差成分Cr、Cbから彩度Sを算出する。彩度Sは色の鮮やかさを表し、彩度が最も高い色は鮮やかな純色となり、彩度が低くなるにつれてくすんだ色味のない色に変化となり、彩度0で無彩色となる。なお、彩度Sは、色差成分Cr、Cbに限られず、RGB値等から算出するようにしてもよい。
The image extraction unit 121a extracts the luminance component Y and the color difference components Cr and Cb from the original image I expressed in RGB. Extraction of the color difference components Cr and Cb from the RGB format can be performed according to [Equation 11], for example.
The saturation calculation unit 126 calculates the saturation S from the color difference components Cr and Cb. Saturation S represents the vividness of the color, and the color with the highest saturation becomes a vivid pure color. As the saturation decreases, the color changes to a dull color and becomes achromatic with zero saturation. The saturation S is not limited to the color difference components Cr and Cb, and may be calculated from RGB values or the like.

彩度ゲイン算出部127は、彩度Sおよび輝度成分Yに基づいて彩度ゲインGsを算出する。図7は、彩度ゲイン算出部127の構成を示すブロック図である。本図に示すように、彩度ゲイン算出部127は、色濃度算出部1271と、減算部1272と、彩度ゲイン制御部1273と、リミット処理部1274とを備えている。   The saturation gain calculation unit 127 calculates a saturation gain Gs based on the saturation S and the luminance component Y. FIG. 7 is a block diagram illustrating a configuration of the saturation gain calculation unit 127. As shown in the figure, the saturation gain calculation unit 127 includes a color density calculation unit 1271, a subtraction unit 1272, a saturation gain control unit 1273, and a limit processing unit 1274.

色濃度算出部1271は、彩度Sと輝度成分Yとから、S/Yを算出する。ここでは、S/Yを色の濃さとし、S/Yが大きいほど色が濃いものとする。減算部1272は、定数TからS/Yを減算して第1色濃度指標値S1を算出する。すなわち、S1=T−S/Yであり、第1色濃度指標値S1は、S/Yと負の相関関係となり、第1色濃度指標値S1は、色が濃いほど小さな値となる。したがって、色が濃いほど彩度ゲインGsが小さくなり、色が抑えられることになり、過補正を防ぐことができる。なお、定数Tは、S/Yの最大値をSmaxとした場合、T≦Smaxを満たす値とする。   The color density calculation unit 1271 calculates S / Y from the saturation S and the luminance component Y. Here, it is assumed that S / Y is the color density, and that the color is darker as S / Y is larger. The subtractor 1272 calculates the first color density index value S1 by subtracting S / Y from the constant T. That is, S1 = TS / Y, the first color density index value S1 has a negative correlation with S / Y, and the first color density index value S1 becomes smaller as the color is darker. Therefore, as the color is darker, the saturation gain Gs becomes smaller, the color is suppressed, and overcorrection can be prevented. The constant T is a value satisfying T ≦ Smax when the maximum value of S / Y is Smax.

彩度ゲイン制御部1273は、第1色濃度指標値S1の値を係数Satによって制御する。具体的には、
S2=S1*Sat
によって、第2色濃度指標値S2を算出する。係数Satは彩度ゲインGsの効果を制御する値であり、例えば、0〜1の範囲で10段階の値とすることができるが、さらに詳細に設定することも可能である。また、原画像Iの情報により、係数Satの値を動的に制御してもよい。
The saturation gain control unit 1273 controls the value of the first color density index value S1 by the coefficient Sat. In particular,
S2 = S1 * Sat
Thus, the second color density index value S2 is calculated. The coefficient Sat is a value that controls the effect of the saturation gain Gs. For example, the coefficient Sat can be set to 10 levels in the range of 0 to 1, but can also be set in more detail. Further, the value of the coefficient Sat may be dynamically controlled based on the information of the original image I.

リミット処理部1274は、彩度ゲイン制御部1273によって算出された第2色濃度指標値S2に対して、リミット値Lmtにより、リミット処理を行ない、その結果を彩度ゲインGsとして出力する。   The limit processing unit 1274 performs limit processing on the second color density index value S2 calculated by the saturation gain control unit 1273 using the limit value Lmt, and outputs the result as the saturation gain Gs.

図6の説明に戻って、補正パラメータ算出部124aは、補正パラメータ算出部R124ar、補正パラメータ算出部G124ag、補正パラメータ算出部B124abを含み、それぞれR成分、G成分、B成分について、レチネックス処理結果I/Lと、彩度ゲインGsを用いて補正パラメータPを算出する。 Returning to the description of FIG. 6, the correction parameter calculation unit 124a includes a correction parameter calculation unit R124ar, a correction parameter calculation unit G124ag, and a correction parameter calculation unit B124ab, and the Retinex processing result I for R component, G component, and B component, respectively. and i / L, and calculates a correction parameter P i using the saturation gain Gs.

補正パラメータPは、例えば、[数12]にしたがってR成分、G成分、B成分毎に算出することができる。
あるいは、[数13]に示すように、原画像を基準として補正の度合いを調整するために、補正画像と原画像とを彩度ゲインGs(0≦Gs≦1)を用いて合成して、より自然な補正画像を得るようにしてもよい。
補正パラメータPは、乗算部125において、RGB毎に、原画像Iと乗じられ、補正画像Oが生成される。
Correction parameter P i, for example, it is possible to calculate an R component, G component, each component B according to Equation 12].
Alternatively, as shown in [Equation 13], in order to adjust the degree of correction based on the original image, the corrected image and the original image are combined using a saturation gain Gs (0 ≦ Gs ≦ 1), A more natural corrected image may be obtained.
The correction parameter P i is multiplied by the original image I i for each RGB in the multiplication unit 125 to generate a corrected image O i .

このように、第2実施例では、原画像Iと乗算する補正パラメータPの算出に、彩度Sおよび輝度成分Yによって算出される色の濃さを反映させた値を用いることにより、コントラストのみだけではなく、カラーも強調され、かつ過補正のない補正画像を得ることが可能となる。   As described above, in the second embodiment, only the contrast is obtained by using the value reflecting the color density calculated by the saturation S and the luminance component Y in the calculation of the correction parameter P to be multiplied with the original image I. In addition to this, it is possible to obtain a corrected image in which color is emphasized and no overcorrection is performed.

次に、上記構成の画像処理装置100の第2実施例におけるコントラスト補正処理の手順について図8のフローチャートを参照して説明する。   Next, the procedure of contrast correction processing in the second embodiment of the image processing apparatus 100 having the above configuration will be described with reference to the flowchart of FIG.

まず、画像入力部110が、外部装置等から原画像を入力され、RGB成分毎の画像データである原画像I(Ir,Ig,Ib)をコントラスト補正部120aに出力する(S201)。次いで、画像抽出部121aが、RGB成分に基づいて輝度成分Y、色差成分Cr、Cbを抽出する(S202)。   First, the image input unit 110 receives an original image from an external device or the like, and outputs an original image I (Ir, Ig, Ib), which is image data for each RGB component, to the contrast correction unit 120a (S201). Next, the image extraction unit 121a extracts the luminance component Y and the color difference components Cr and Cb based on the RGB components (S202).

抽出された輝度成分Yを、フィルタリング部122においてフィルタFでフィルタリングすることにより、照明光成分Lが得られる(S203)。そして、レチネックス処理部123が、原画像IのRGB各成分を照明光成分Lで除算するレチネックス処理を行なう(S204)。   By filtering the extracted luminance component Y with the filter F in the filtering unit 122, an illumination light component L is obtained (S203). Then, the Retinex processing unit 123 performs Retinex processing for dividing the RGB components of the original image I by the illumination light component L (S204).

この処理とは別に、彩度算出部126が、色差成分Cr、Cbから彩度Sを算出する(S205)。そして、彩度ゲイン算出部127が、彩度Sと輝度成分Yとから彩度ゲインGsを算出する(S206)。   Separately from this processing, the saturation calculation unit 126 calculates the saturation S from the color difference components Cr and Cb (S205). Then, the saturation gain calculator 127 calculates the saturation gain Gs from the saturation S and the luminance component Y (S206).

レチネックス処理結果I/Lおよび彩度ゲインGsが得られると、補正パラメータ算出部124aが、[数12]あるいは[数13]にしたがって補正パラメータPを算出する(S207)。 When Retinex processing result I i / L and saturation gain Gs is obtained, the correction parameter calculating unit 124a calculates the correction parameter P i in accordance with Equation 12] or [Formula 13] (S207).

次いで、乗算部125が補正パラメータPと原画像Iとを乗算することで補正画像Oを生成する(S208)。補正画像Oは、画像出力部130によって、補正後の画像として外部装置等に出力される(S209)。 Then, to generate a corrected image O i by multiplying unit 125 multiplies the correction parameter P i and the original image I i (S208). The corrected image O i is output to the external device or the like as a corrected image by the image output unit 130 (S209).

第2実施例においても、レチネックス処理で用いられる照明光成分Lは輝度成分Yをフィルタリングによりぼかした値であるため、周辺画素の値を平滑化した値である。本実施形態では、照明光成分Lと原画像Iとの関係に基づいて補正パラメータを定めているため、元の画素値に関わらず、周辺の明るさによって補正がなされることになる。   Also in the second embodiment, since the illumination light component L used in the Retinex process is a value obtained by blurring the luminance component Y by filtering, it is a value obtained by smoothing the values of surrounding pixels. In the present embodiment, since the correction parameter is determined based on the relationship between the illumination light component L and the original image I, the correction is performed based on the brightness of the surroundings regardless of the original pixel value.

さらに、第2実施例では、原画像Iと乗算する補正パラメータPの算出に、彩度Sおよび輝度成分Yによって算出される色の濃さを反映させた値を用いている。これにより、明るい領域の暗い部分はより暗く、暗い領域の明るい部分はより明るく補正されることになり、自然で違和感のないコントラスト補正結果を得るとともに、カラーも強調され、かつ過補正のない補正画像を得ることができる。   Further, in the second embodiment, a value reflecting the color intensity calculated by the saturation S and the luminance component Y is used for calculating the correction parameter P to be multiplied with the original image I. As a result, the dark part of the bright area is darker and the bright part of the dark area is corrected more brightly, so that a natural and uncomfortable contrast correction result is obtained, the color is also emphasized, and there is no overcorrection. An image can be obtained.

100…画像処理装置
110…画像入力部
120、120a…コントラスト補正部
121、121a…画像抽出部
122…フィルタリング部
123…レチネックス処理部
124、124a…補正パラメータ算出部
125…乗算部
126…彩度算出部
127…彩度ゲイン算出部
130…画像出力部
1271…色濃度算出部
1272…減算部
1273…彩度ゲイン制御部
1274…リミット処理部
DESCRIPTION OF SYMBOLS 100 ... Image processing apparatus 110 ... Image input part 120, 120a ... Contrast correction part 121, 121a ... Image extraction part 122 ... Filtering part 123 ... Retinex processing part 124, 124a ... Correction parameter calculation part 125 ... Multiplication part 126 ... Saturation calculation Unit 127 ... saturation gain calculation unit 130 ... image output unit 1271 ... color density calculation unit 1272 ... subtraction unit 1273 ... saturation gain control unit 1274 ... limit processing unit

Claims (8)

入力画像データの照明光成分を抽出するフィルタリング手段と、
前記入力画像データを抽出された前記照明光成分で除算することにより入力画像データの反射率成分を算出する反射率成分算出処理手段と、
算出された前記反射率成分に基づいて補正パラメータを算出する補正パラメータ算出手段と、
算出された前記補正パラメータと前記入力画像データとを乗算することにより補正画像データを生成する乗算手段とを備えたことを特徴とする画像処理装置。
Filtering means for extracting the illumination light component of the input image data;
A reflectance component calculation processing means for calculating a reflectance component of the input image data by dividing the input image data by the extracted illumination light component;
Correction parameter calculation means for calculating a correction parameter based on the calculated reflectance component;
An image processing apparatus comprising: a multiplying unit configured to generate corrected image data by multiplying the calculated correction parameter and the input image data.
請求項1に記載の画像処理装置であって、
前記補正パラメータ算出手段は、前記反射率成分と定数とを乗じることで前記補正パラメータを算出することを特徴とする画像処理装置。
The image processing apparatus according to claim 1,
The image processing apparatus, wherein the correction parameter calculation means calculates the correction parameter by multiplying the reflectance component and a constant.
入力画像データの照明光成分を抽出するフィルタリング手段と、
前記入力画像データを抽出された前記照明光成分で除算することにより入力画像データの反射率成分を算出する反射率成分算出処理手段と、
前記入力画像データの彩度成分と輝度成分との比と負の相関関係にある彩度ゲインを算出する彩度ゲイン算出手段と、
算出された前記反射率成分および前記彩度ゲインに基づいて補正パラメータを算出する補正パラメータ算出手段と、
算出された前記補正パラメータと前記入力画像データとを乗算することにより補正画像データを生成する乗算手段とを備えたことを特徴とする画像処理装置。
Filtering means for extracting the illumination light component of the input image data;
A reflectance component calculation processing means for calculating a reflectance component of the input image data by dividing the input image data by the extracted illumination light component;
A saturation gain calculating means for calculating a saturation gain that is negatively correlated with the ratio between the saturation component and the luminance component of the input image data;
Correction parameter calculation means for calculating a correction parameter based on the calculated reflectance component and the saturation gain;
An image processing apparatus comprising: a multiplying unit configured to generate corrected image data by multiplying the calculated correction parameter and the input image data.
請求項3に記載の画像処理装置であって、
前記補正パラメータ算出手段は、前記反射率成分と前記彩度ゲインとを乗じることで前記補正パラメータを算出することを特徴とする画像処理装置。
The image processing apparatus according to claim 3,
The image processing apparatus, wherein the correction parameter calculation means calculates the correction parameter by multiplying the reflectance component and the saturation gain.
請求項1〜4のいずれか1項に記載の画像処理装置であって、
前記反射率成分算出処理手段は、前記入力画像データの各画素についてRGB成分毎に反射率成分を算出し、
前記補正パラメータ算出手段は、前記入力画像データの各画素についてRGB成分毎に補正パラメータを算出することを特徴とする画像処理装置。
The image processing apparatus according to any one of claims 1 to 4,
The reflectance component calculation processing means calculates a reflectance component for each RGB component for each pixel of the input image data,
The image processing apparatus, wherein the correction parameter calculation means calculates a correction parameter for each RGB component for each pixel of the input image data.
請求項1〜5のいずれか1項に記載の画像処理装置であって、
前記フィルタリング手段は、前記入力画像データの輝度成分に対して平滑化フィルタを施すことで前記照明光成分を抽出することを特徴とする画像処理装置。
An image processing apparatus according to any one of claims 1 to 5,
The image processing apparatus, wherein the filtering means extracts the illumination light component by applying a smoothing filter to a luminance component of the input image data.
入力画像データの照明光成分を抽出するフィルタリングステップと、
前記入力画像データを抽出された前記照明光成分で除算することにより入力画像データの反射率成分を算出する反射率成分算出ステップと、
算出された前記反射率成分に基づいて補正パラメータを算出する補正パラメータ算出ステップと、
算出された前記補正パラメータと前記入力画像データとを乗算することにより補正画像データを生成する乗算ステップとを含むことを特徴とする画像処理方法。
A filtering step for extracting the illumination light component of the input image data;
A reflectance component calculating step of calculating a reflectance component of the input image data by dividing the input image data by the extracted illumination light component;
A correction parameter calculating step for calculating a correction parameter based on the calculated reflectance component;
An image processing method comprising: a multiplication step of generating corrected image data by multiplying the calculated correction parameter and the input image data.
入力画像データの照明光成分を抽出するフィルタリングステップと、
前記入力画像データを抽出された前記照明光成分で除算することにより入力画像データの反射率成分を算出する反射率成分算出ステップと、
前記入力画像データの彩度成分と輝度成分との比と負の相関関係にある彩度ゲインを算出する彩度ゲイン算出ステップと、
算出された前記反射率成分および前記彩度ゲインに基づいて補正パラメータを算出する補正パラメータ算出ステップと、
算出された前記補正パラメータと前記入力画像データとを乗算することにより補正画像データを生成する乗算ステップとを含むことを特徴とする画像処理方法。
A filtering step for extracting the illumination light component of the input image data;
A reflectance component calculating step of calculating a reflectance component of the input image data by dividing the input image data by the extracted illumination light component;
A saturation gain calculating step for calculating a saturation gain that is negatively correlated with the ratio between the saturation component and the luminance component of the input image data;
A correction parameter calculating step for calculating a correction parameter based on the calculated reflectance component and the saturation gain;
An image processing method comprising: a multiplication step of generating corrected image data by multiplying the calculated correction parameter and the input image data.
JP2009235896A 2009-10-13 2009-10-13 Image processing apparatus and image processing method Active JP5392560B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009235896A JP5392560B2 (en) 2009-10-13 2009-10-13 Image processing apparatus and image processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009235896A JP5392560B2 (en) 2009-10-13 2009-10-13 Image processing apparatus and image processing method

Publications (2)

Publication Number Publication Date
JP2011086976A true JP2011086976A (en) 2011-04-28
JP5392560B2 JP5392560B2 (en) 2014-01-22

Family

ID=44079636

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009235896A Active JP5392560B2 (en) 2009-10-13 2009-10-13 Image processing apparatus and image processing method

Country Status (1)

Country Link
JP (1) JP5392560B2 (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101241347B1 (en) 2011-08-19 2013-03-11 전남대학교산학협력단 Device and method for correcting contrast of image using weighted value of luminance and Illumination mask
KR101389932B1 (en) 2011-11-29 2014-04-29 연세대학교 산학협력단 Apparatus and method for performing tone mapping for image
WO2014162533A1 (en) * 2013-04-03 2014-10-09 日立マクセル株式会社 Video display device
JP2015517167A (en) * 2013-04-19 2015-06-18 華為技術有限公司Huawei Technologies Co.,Ltd. Method and apparatus for enhancing color
JP2015192203A (en) * 2014-03-27 2015-11-02 日立マクセル株式会社 Video processing apparatus and projector using the same
JP2017037622A (en) * 2015-08-10 2017-02-16 富士ゼロックス株式会社 Image processing device and program
US10026152B2 (en) 2016-01-18 2018-07-17 Fuji Xerox Co., Ltd. Image processing apparatus for providing visibility of an image while maintaining color in a natural state
EP3588930A1 (en) 2018-06-29 2020-01-01 Canon Kabushiki Kaisha Image processing apparatus, image processing method, and program
US10848644B2 (en) 2018-06-29 2020-11-24 Canon Kabushiki Kaisha Image processing apparatus, image processing method, and non-transitory computer-readable storage medium
US11108999B2 (en) 2019-02-27 2021-08-31 Canon Kabushiki Kaisha Image processing apparatus, image processing method, and non-transitory computer-readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005039456A (en) * 2003-07-18 2005-02-10 Canon Inc Image processing method and apparatus
JP2006115444A (en) * 2004-09-17 2006-04-27 Nikon Corp Method, device, program for image processing, and electronic camera
JP2007174482A (en) * 2005-12-26 2007-07-05 Konica Minolta Holdings Inc Imaging apparatus, image processing method, and image processing program
JP2008118182A (en) * 2006-10-31 2008-05-22 Brother Ind Ltd Image processing program and image processing apparatus

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005039456A (en) * 2003-07-18 2005-02-10 Canon Inc Image processing method and apparatus
JP2006115444A (en) * 2004-09-17 2006-04-27 Nikon Corp Method, device, program for image processing, and electronic camera
JP2007174482A (en) * 2005-12-26 2007-07-05 Konica Minolta Holdings Inc Imaging apparatus, image processing method, and image processing program
JP2008118182A (en) * 2006-10-31 2008-05-22 Brother Ind Ltd Image processing program and image processing apparatus

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101241347B1 (en) 2011-08-19 2013-03-11 전남대학교산학협력단 Device and method for correcting contrast of image using weighted value of luminance and Illumination mask
KR101389932B1 (en) 2011-11-29 2014-04-29 연세대학교 산학협력단 Apparatus and method for performing tone mapping for image
WO2014162533A1 (en) * 2013-04-03 2014-10-09 日立マクセル株式会社 Video display device
US9565388B2 (en) 2013-04-03 2017-02-07 Hitachi Maxell, Ltd. Video display device
JP2015517167A (en) * 2013-04-19 2015-06-18 華為技術有限公司Huawei Technologies Co.,Ltd. Method and apparatus for enhancing color
JP2015192203A (en) * 2014-03-27 2015-11-02 日立マクセル株式会社 Video processing apparatus and projector using the same
JP2017037622A (en) * 2015-08-10 2017-02-16 富士ゼロックス株式会社 Image processing device and program
US10026152B2 (en) 2016-01-18 2018-07-17 Fuji Xerox Co., Ltd. Image processing apparatus for providing visibility of an image while maintaining color in a natural state
EP3588930A1 (en) 2018-06-29 2020-01-01 Canon Kabushiki Kaisha Image processing apparatus, image processing method, and program
US10848644B2 (en) 2018-06-29 2020-11-24 Canon Kabushiki Kaisha Image processing apparatus, image processing method, and non-transitory computer-readable storage medium
US11323576B2 (en) 2018-06-29 2022-05-03 Canon Kabushiki Kaisha Image processing apparatus, image processing method, and non-transitory computer-readable medium
US11108999B2 (en) 2019-02-27 2021-08-31 Canon Kabushiki Kaisha Image processing apparatus, image processing method, and non-transitory computer-readable storage medium

Also Published As

Publication number Publication date
JP5392560B2 (en) 2014-01-22

Similar Documents

Publication Publication Date Title
JP5392560B2 (en) Image processing apparatus and image processing method
JP5157753B2 (en) Image processing apparatus, image processing method, and image processing program
US8154628B2 (en) Image processing apparatus and imaging apparatus and method
KR101099401B1 (en) Image processing apparatus and computer-readable medium
JP4894595B2 (en) Image processing apparatus and method, and program
JP5901667B2 (en) Image processing apparatus and method, image processing program, and imaging apparatus
JP2010039758A (en) Image processor and image processing method
JP4111980B2 (en) Image processing apparatus and image processing method
WO2018159162A1 (en) Image processing device, control method therefor, and program
JP2006114005A (en) Gradation conversion apparatus, program, electronic camera, and method therefor
US8648937B2 (en) Image processing apparatus, image processing method, and camera module
KR101113483B1 (en) Apparatus for enhancing visibility of color image
JP2011228807A (en) Image processing program, image processing apparatus, and image processing method
JP5410378B2 (en) Video signal correction apparatus and video signal correction program
JP5365881B2 (en) Image processing apparatus and image processing method
JP5142833B2 (en) Image processing apparatus and image processing method
JP2006114006A (en) Gradation conversion apparatus, program, electronic camera, and method therefor
JP2011120299A (en) Gradation conversion apparatus, program, electronic camera, and method therefor
JP2015211320A (en) Image processing apparatus, control method thereof and program
JP5561389B2 (en) Image processing program, image processing apparatus, electronic camera, and image processing method
JP2008227959A (en) Image processing device, image processing method and image processing system
JP2002262130A (en) Image processor
CN116939374B (en) Lens shading correction method and device and electronic equipment
JP2009044628A (en) Image processing apparatus and image processing method
JP2005004582A (en) Image processing apparatus, image processing program, and electronic camera

Legal Events

Date Code Title Description
A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A712

Effective date: 20111012

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20120329

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20130214

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20130826

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: 20130919

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20131002

R150 Certificate of patent or registration of utility model

Ref document number: 5392560

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150