JP2008042392A - Image processor and method - Google Patents

Image processor and method Download PDF

Info

Publication number
JP2008042392A
JP2008042392A JP2006212097A JP2006212097A JP2008042392A JP 2008042392 A JP2008042392 A JP 2008042392A JP 2006212097 A JP2006212097 A JP 2006212097A JP 2006212097 A JP2006212097 A JP 2006212097A JP 2008042392 A JP2008042392 A JP 2008042392A
Authority
JP
Japan
Prior art keywords
conversion coefficient
luminance
value
saturation
pixel
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2006212097A
Other languages
Japanese (ja)
Inventor
Kazunori Sumitani
一徳 隅谷
Manabu Yada
学 矢田
Taro Hizume
太郎 樋爪
Koichi Hoshino
功一 星野
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co 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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP2006212097A priority Critical patent/JP2008042392A/en
Publication of JP2008042392A publication Critical patent/JP2008042392A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Image Processing (AREA)
  • Facsimile Image Signal Circuits (AREA)
  • Color Image Communication Systems (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide an image processor capable of suppressing the unnatural raise of color saturation due to nonlinear transformation, while preserving a hue, and reducing false coloring. <P>SOLUTION: An image signal input part 101 inputs the pixel signals of three RGB primary colors. A representative value calculating part 102 calculates the maximum level representative value X, which expresses the maximum level of the pixel signals included in a representative value calculation range, as a value representing the pixel signals in the representative value calculation range near the pixel to be noted. A transformation coefficient calculating part 103 calculates a luminance transformation coefficient kY and a color saturation transformation coefficient kC to be used for nonlinear transformation processing in response to a luminance transformation coefficient characteristic and a color saturation transformation coefficient characteristic, which are different in coefficient change corresponding to the maximum level representative value. A signal level transforming part 104 performs the nonlinear transformation processing of the pixel signals, so as to respectively transform the luminance and color saturation in response to the luminance transformation coefficient kY and the hue transformation coefficient kC, and transform the luminance and color saturation by individual change ratios without accompanying hue change. <P>COPYRIGHT: (C)2008,JPO&INPIT

Description

本発明は、R,G,B原色画像信号処理に関し、特に、信号レベルの非線形変換処理に関する。   The present invention relates to R, G, B primary color image signal processing, and more particularly, to signal level nonlinear conversion processing.

従来周知のように、カメラ信号処理では、一般的にガンマ処理と呼ばれる画像信号の非線形変換処理が行われる。ガンマ処理は、受像機の信号に対する映像レベルの非線形性を、撮像側で予め補償しておくためのものである。さらに、ガンマ処理の目的はこれだけに留まらず、例えばガンマの非線形変換特性をS字状にして、特定の階調を圧縮したり伸張したりすることで、ノイズ感の低減や階調感の向上を図ることができる。   As is well known in the art, in camera signal processing, non-linear conversion processing of an image signal generally called gamma processing is performed. The gamma processing is for compensating in advance on the imaging side for non-linearity of the video level with respect to the signal of the receiver. Furthermore, the purpose of gamma processing is not limited to this. For example, the nonlinear conversion characteristics of gamma are made S-shaped to compress or expand a specific gradation, thereby reducing noise and improving gradation. Can be achieved.

R,G,Bの3原色を使用する原色信号処理では、R,G,B信号それぞれの信号に対して非線形信号処理を行うと、R,G,B信号の比率が変わってしまい色相の変化を起こしてしまう。そこで、従来の非線形処理では、注目画素付近のR,G,B信号から代表値Xを算出し、代表値Xに対する非線形変換値Gamma(X)を求め、さらにGamma(X)を代表値Xで割ったものを非線形変換係数として、この非線形変換係数をR,G,B信号それぞれに積算する。つまり、非線形変換処理は、以下の(式1)のように表すことができる。
Gamma(R)= R × Gamma(X)/X
Gamma(G)= G × Gamma(X)/X
Gamma(B)= B × Gamma(X)/X (式1)
In primary color signal processing using the three primary colors R, G, and B, if nonlinear signal processing is performed on each of the R, G, and B signals, the ratio of the R, G, and B signals changes, and the hue changes. Will be caused. Therefore, in the conventional nonlinear processing, the representative value X is calculated from the R, G, and B signals near the target pixel, the nonlinear conversion value Gamma (X) for the representative value X is obtained, and further, Gamma (X) is represented by the representative value X. The divided one is used as a non-linear conversion coefficient, and this non-linear conversion coefficient is added to each of the R, G, and B signals. That is, the non-linear transformation process can be expressed as (Equation 1) below.
Gamma (R) = R × Gamma (X) / X
Gamma (G) = G × Gamma (X) / X
Gamma (B) = B x Gamma (X) / X (Formula 1)

このようにして、R,G,Bの信号比率を保つことができ、色相の変化を伴わずに非線形変換処理を行うことができる。   In this way, the signal ratio of R, G, and B can be maintained, and nonlinear conversion processing can be performed without a change in hue.

ただし、上記の処理では、RGBの何れかの画素信号が変換前の信号よりも大きくなって所定の上限値を超えてしまったときに、その信号にのみ上限クリップがかかり、R,G,B信号の比率が狂ってしまい、色相が変化する可能性がある。色相変化を回避する技術としては、例えば、下記の技術が知られている。   However, in the above processing, when any pixel signal of RGB is larger than the signal before conversion and exceeds a predetermined upper limit value, the upper limit clip is applied only to that signal, and R, G, B There is a possibility that the hue of the signal may change due to the signal ratio being out of order. As techniques for avoiding hue changes, for example, the following techniques are known.

特許文献1の画像処理装置は、第1段階の処理にて、輝度を代表値Xとして、前述の(式1)の処理を行い、さらに、その後段の第2段階の処理にて、下記の(式2)で示される処理を行う。
Ro = Wi + Kc ×(Ri − Wi)
Go = Wi + Kc ×(Gi − Wi)
Bo = Wi + Kc ×(Bi − Wi) (式2)
Wi:輝度信号
Kc:彩度を変換する係数
The image processing apparatus of Patent Document 1 performs the above-described process (Equation 1) with the luminance as the representative value X in the first stage process, and further performs the following process in the second stage process. The process shown by (Formula 2) is performed.
Ro = Wi + Kc x (Ri-Wi)
Go = Wi + Kc x (Gi-Wi)
Bo = Wi + Kc x (Bi-Wi) (Formula 2)
Wi: Luminance signal
Kc: Coefficient to convert saturation

上記の(式2)では、色差信号のみをKc倍することで、輝度および色相に変化なく彩度のみをKc倍している。従来技術は、これら2つの処理を組み合わせており、第1段階で輝度Wのレベルに対して圧縮を行い、第2段階で最も高いレベルの信号が規格に収まるまで彩度を絞るように構成されている。
特開平9−331539号公報
In the above (Expression 2), only the color difference signal is multiplied by Kc, so that only the saturation is multiplied by Kc without any change in luminance and hue. The prior art combines these two processes, and is configured to compress the luminance W level in the first stage and reduce the saturation until the highest level signal falls within the standard in the second stage. ing.
JP-A-9-331539

しかしながら、従来の非線形処理においては、以下の問題がある。既に説明したように、非線形処理では、特定の階調を伸張することで階調感を改善するために、Gamma(X)の傾きを大きくすることが有効である。しかし、従来技術でこの処理を行うと、特定の階調部分でR,G,B信号それぞれに大きな非線形変換係数が掛けられることになり、その階調部分の彩度が強調されすぎるという問題が生じる得る。このような彩度強調の問題は、(式2)で示した特許文献1の従来技術においても考慮されていない。   However, the conventional nonlinear processing has the following problems. As already described, in the nonlinear processing, it is effective to increase the gradient of Gamma (X) in order to improve the gradation feeling by extending a specific gradation. However, when this processing is performed with the conventional technology, a large nonlinear conversion coefficient is applied to each of the R, G, and B signals in a specific gradation portion, and there is a problem that the saturation of the gradation portion is excessively emphasized. Can occur. Such a problem of saturation enhancement is not taken into consideration in the prior art of Patent Document 1 shown in (Expression 2).

また、(式2)で示した従来技術のように代表値として輝度値を用いる構成では、以下の問題が生じ得る。電子カメラとしては3板カメラと単板カメラが知られている。3板カメラのように同一光学中心の画素にR,G,B3色の信号が存在する場合には、R,G,B信号から生成した輝度信号を代表値として非線形変換係数を求めても問題は生じない。しかし、単板カメラでは、各々の光学中心の画素にR,G,Bのいずれかの信号しか存在せず、隣接する複数の画素のR,G,B信号から輝度を生成することになる。その場合、画像の信号レベル変動の激しい部分では、隣接する画素間の輝度差が激しく、そのため、輝度を基に非線形変換係数を算出すると、R,G,B信号それぞれにかけられる非線形変換係数の差が大きくなり、その結果、R,G,Bの信号比が崩れ、偽着色が発生するという問題が存在する。   Further, in the configuration using the luminance value as the representative value as in the conventional technique shown in (Expression 2), the following problem may occur. As the electronic camera, a three-plate camera and a single-plate camera are known. If there are R, G, B three color signals in the same optical center pixel as in the case of a three-plate camera, it is not possible to obtain a nonlinear conversion coefficient using the luminance signal generated from the R, G, B signal as a representative value. Does not occur. However, in a single-plate camera, only one of R, G, and B signals exists in each pixel at the optical center, and luminance is generated from R, G, and B signals of a plurality of adjacent pixels. In that case, the luminance difference between adjacent pixels is significant in the portion where the signal level fluctuation of the image is severe, so when calculating the nonlinear transformation coefficient based on the luminance, the difference in the nonlinear transformation coefficient applied to each of the R, G, B signals. As a result, there is a problem that the signal ratio of R, G, B collapses and false coloring occurs.

本発明は、従来の問題を解決するためになされたもので、その目的は、色相を保存しつつ、非線形変換特性の傾きを大きくした部分での不自然な彩度上昇を抑えることができ、さらに、画像の信号レベル変動の激しい部分の偽着色を低減することができる画像処理装置を提供することにある。   The present invention has been made in order to solve the conventional problems, the purpose of which can suppress an unnatural saturation increase in a portion where the slope of the nonlinear conversion characteristic is increased while preserving the hue, It is another object of the present invention to provide an image processing apparatus capable of reducing false coloring of a portion where the signal level fluctuation of the image is severe.

本発明の画像処理装置は、RGB3原色の画素信号を入力する画像信号入力手段と、注目画素付近の代表値算出範囲の画素信号を代表する値として、前記代表値算出範囲に含まれる画素信号の最大レベルを表す最大レベル代表値を算出する代表値算出手段と、前記最大レベル代表値に応じた係数変化が異なる輝度変換係数特性と彩度変換係数特性に従って、非線形変換処理に使用する輝度変換係数と彩度変換係数を算出する変換係数算出手段と、前記輝度変換係数と前記彩度変換係数に応じて輝度と彩度がそれぞれ変換されるように画素信号の非線形変換処理を行う信号レベル変換手段とを備えている。   The image processing apparatus according to the present invention includes an image signal input unit that inputs pixel signals of RGB three primary colors and a pixel signal included in the representative value calculation range as a value representative of the pixel signal in the representative value calculation range near the target pixel. Luminance conversion coefficient used for non-linear conversion processing in accordance with luminance conversion coefficient characteristics and chroma conversion coefficient characteristics with different coefficient changes according to the maximum level representative value, representative value calculating means for calculating a maximum level representative value representing the maximum level Conversion coefficient calculation means for calculating the saturation conversion coefficient, and signal level conversion means for performing non-linear conversion processing of the pixel signal so that luminance and saturation are respectively converted according to the luminance conversion coefficient and the saturation conversion coefficient And.

この構成により、輝度変換係数と彩度変換係数に異なる特性が与えられ、異なる特性に従った輝度変換係数と彩度変換係数に応じて輝度と彩度がそれぞれ変換されるように画素信号の非線形変換処理が行われる。これにより、色相の変化を伴わずに輝度と彩度を別々の変化率で変換でき、彩度の変化率を独立して制御でき、非線形変換特性の傾きを大きくした部分での不自然な彩度上昇を抑えられる。また、注目画素付近の代表値算出範囲の画素信号を代表する値として、代表値算出範囲に含まれる画素信号の最大レベルを表す最大レベル代表値を算出し、この最大レベル代表値から輝度変換係数と彩度変換係数を求めるので、画像の信号レベル変動の激しい部分の偽着色を低減することができる。   With this configuration, the luminance conversion coefficient and the saturation conversion coefficient are given different characteristics, and the luminance and saturation are converted according to the luminance conversion coefficient and the saturation conversion coefficient according to the different characteristics, respectively. Conversion processing is performed. As a result, brightness and saturation can be converted at different rates without hue change, the rate of change in saturation can be controlled independently, and the unnatural color at the part where the slope of the nonlinear conversion characteristics is increased. Increase in the degree can be suppressed. In addition, a maximum level representative value representing the maximum level of the pixel signal included in the representative value calculation range is calculated as a value representing the pixel signal in the representative value calculation range near the target pixel, and the luminance conversion coefficient is calculated from the maximum level representative value. Since the saturation conversion coefficient is obtained, it is possible to reduce the false coloring of the portion where the signal level fluctuation is large.

また、本発明の画像処理装置において、前記輝度変換係数特性と前記彩度変換係数特性では、前記最大レベル代表値の低域側での前記輝度変換係数特性の傾き増大による立ち上がりと比較して前記彩度変換係数の立ち上がりが縮小して設定されている。   Further, in the image processing apparatus of the present invention, the luminance conversion coefficient characteristic and the saturation conversion coefficient characteristic are compared with a rise due to an increase in the inclination of the luminance conversion coefficient characteristic on the low frequency side of the maximum level representative value. The rise of the saturation conversion coefficient is set to be reduced.

この構成により、最大レベル代表値の低域側にて、輝度変換係数特性の立ち上がりと比較して彩度変換係数が小さく立ち上がる。最大レベル代表値の低域部分は、画像の暗い部分に相当し、非線形変換特性の傾きを大きくすることが効果的であり、いわゆる黒つぶれを回避し、階調感を改善できる領域である。この領域にて、上記のように立ち上がり量を異ならせることにより、輝度変換係数特性の傾きを大きくしつつも、彩度変換係数の傾きが大きくなり過ぎるのを防ぎ、不自然な彩度上昇を抑えることができる。   With this configuration, the saturation conversion coefficient rises smaller than the rise of the luminance conversion coefficient characteristic on the low frequency side of the maximum level representative value. The low-frequency part of the maximum level representative value corresponds to a dark part of the image, and it is effective to increase the slope of the nonlinear conversion characteristic, avoiding so-called blackening and improving the gradation. In this area, by varying the amount of rise as described above, the slope of the luminance conversion coefficient characteristic is increased, but the slope of the saturation conversion coefficient is prevented from becoming too large, and unnatural saturation rises. Can be suppressed.

また、本発明の画像処理装置において、前記代表値算出手段は、前記代表値算出範囲内に互いにずらして設定された複数の最大値選出範囲からそれぞれ得られる複数の最大画素値の平均を求めて、前記最大レベル代表値とする。   In the image processing apparatus according to the aspect of the invention, the representative value calculation unit may obtain an average of a plurality of maximum pixel values respectively obtained from a plurality of maximum value selection ranges set so as to be shifted from each other within the representative value calculation range. , The maximum level representative value.

この構成により、代表値算出範囲に含まれるRGB信号の最大レベルを表す最大レベル代表値を適切に算出し、これにより、画像の信号レベル変動の激しい部分の偽着色を低減することができる。   With this configuration, it is possible to appropriately calculate the maximum level representative value representing the maximum level of the RGB signal included in the representative value calculation range, thereby reducing the false coloring of the portion where the signal level fluctuation of the image is severe.

また、本発明の画像処理装置において、前記信号レベル変換手段は、非線形変換後のRGB各々の画素信号を、輝度値を前記輝度変換係数で変換した変換輝度と、画素値と輝度値の色差を前記彩度変換係数で変換した変換色差との和にする非線形変換処理を行う。   In the image processing apparatus of the present invention, the signal level conversion unit may calculate a converted luminance obtained by converting a luminance value of each RGB pixel signal after nonlinear conversion using the luminance conversion coefficient, and a color difference between the pixel value and the luminance value. Non-linear conversion processing is performed to make the sum with the converted color difference converted by the saturation conversion coefficient.

この構成により、色相の変化を伴わずに輝度と彩度を独立した別々の変化率で変換する非線形変換を行って、彩度を適切に調整でき、非線形変換特性の傾きを大きくした部分での不自然な彩度上昇を抑えられる。   With this configuration, it is possible to adjust the saturation appropriately by performing non-linear conversion that converts brightness and saturation at different independent rates without changing the hue, and at the part where the slope of the non-linear conversion characteristic is increased Unnatural saturation rise can be suppressed.

また、本発明の画像処理装置は、注目画素付近の最大値検出範囲から最大画素値を求めるとともに、注目画素付近の輝度値算出範囲の画素信号から輝度値を算出する最大値輝度値算出手段と、前記最大画素値、前記輝度値および前記輝度変換係数から、非線形変換後の信号値が所定の上限信号値以下になる上限彩度変換係数を求め、前記上限彩度変換係数以下へと前記彩度変換係数を補正する彩度変換係数補正手段とを備えている。   Further, the image processing apparatus of the present invention obtains a maximum pixel value from a maximum value detection range near the target pixel, and calculates a maximum value luminance value calculation unit that calculates a luminance value from a pixel signal in a luminance value calculation range near the target pixel. Then, an upper limit saturation conversion coefficient at which the signal value after nonlinear conversion becomes equal to or less than a predetermined upper limit signal value is obtained from the maximum pixel value, the luminance value, and the luminance conversion coefficient, and the saturation is reduced below the upper limit saturation conversion coefficient. Saturation conversion coefficient correction means for correcting the degree conversion coefficient.

この構成により、非線形変換後の信号値が所定の上限信号値以下になる上限彩度変換係数を求め、上限彩度変換係数以下へと彩度変換係数を補正する。したがって、変換後の信号レベルを所定の上限値以下に抑えつつ、色相変化を伴わずに、非線形変換特性の傾きを大きくした部分での不自然な彩度上昇を抑え、さらに、画像の信号レベル変動の激しい部分の偽着色を低減することができる。   With this configuration, an upper limit saturation conversion coefficient at which the signal value after nonlinear conversion becomes equal to or lower than a predetermined upper limit signal value is obtained, and the saturation conversion coefficient is corrected to be equal to or lower than the upper limit saturation conversion coefficient. Therefore, while suppressing the signal level after conversion to a predetermined upper limit value or less, without causing a hue change, suppressing an unnatural saturation increase in a portion where the slope of the nonlinear conversion characteristic is increased, and further, the signal level of the image It is possible to reduce false coloration in a portion where fluctuation is severe.

また、本発明の別の態様は画像処理方法であり、RGB3原色の画素信号を入力する画像信号入力ステップと、注目画素付近の代表値算出範囲の画素信号を代表する値として、前記代表値算出範囲に含まれる画素信号の最大レベルを表す最大レベル代表値を算出する代表値算出ステップと、前記最大レベル代表値に応じた係数変化が異なる輝度変換係数特性と彩度変換係数特性に従って、非線形変換処理に使用する輝度変換係数と彩度変換係数を算出する変換係数算出ステップと、前記輝度変換係数と前記彩度変換係数に応じて輝度と彩度がそれぞれ変換されるように画素信号の非線形変換処理を行う信号レベル変換ステップとを有する。この態様によっても上述した本発明の利点が得られる。   According to another aspect of the present invention, there is provided an image processing method, wherein the representative value calculation is performed by using an image signal input step of inputting RGB three primary color pixel signals and a value representative of a pixel signal in a representative value calculation range near the target pixel. A representative value calculating step for calculating a maximum level representative value representing the maximum level of the pixel signal included in the range, and a non-linear conversion according to a luminance conversion coefficient characteristic and a saturation conversion coefficient characteristic with different coefficient changes according to the maximum level representative value A conversion coefficient calculating step for calculating a luminance conversion coefficient and a saturation conversion coefficient used for processing, and a non-linear conversion of the pixel signal so that luminance and saturation are respectively converted according to the luminance conversion coefficient and the saturation conversion coefficient A signal level conversion step for performing processing. This aspect also provides the above-described advantages of the present invention.

本発明の画像処理方法は、注目画素付近の最大値検出範囲から最大画素値を求めるとともに、注目画素付近の輝度値算出範囲の画素信号から輝度値を算出する最大値輝度値算出ステップと、前記最大画素値、前記輝度値および前記輝度変換係数から、非線形変換後の信号値が所定の上限信号値以下になる上限彩度変換係数を求め、前記上限彩度変換係数以下へと前記彩度変換係数を補正する彩度変換係数補正ステップとを有する。この方法によっても上述した本発明の利点が得られる。   The image processing method of the present invention obtains a maximum pixel value from a maximum value detection range near a target pixel, and calculates a maximum value luminance value calculation step for calculating a luminance value from a pixel signal in a luminance value calculation range near the target pixel; From the maximum pixel value, the luminance value, and the luminance conversion coefficient, an upper limit saturation conversion coefficient that causes a signal value after nonlinear conversion to be equal to or lower than a predetermined upper limit signal value is obtained, and the saturation conversion is performed to be equal to or lower than the upper limit saturation conversion coefficient. A saturation conversion coefficient correction step for correcting the coefficient. This method also provides the advantages of the present invention described above.

また、本発明の別の態様は画像処理プログラムであり、RGB3原色の画素信号を入力する画像信号入力ステップと、注目画素付近の代表値算出範囲の画素信号を代表する値として、前記代表値算出範囲に含まれる画素信号の最大レベルを表す最大レベル代表値を算出する代表値算出ステップと、前記最大レベル代表値に応じた係数変化が異なる輝度変換係数特性と彩度変換係数特性に従って、非線形変換処理に使用する輝度変換係数と彩度変換係数を算出する変換係数算出ステップと、前記輝度変換係数と前記彩度変換係数に応じて輝度と彩度がそれぞれ変換されるように画素信号の非線形変換処理を行う信号レベル変換ステップとをコンピュータに実行させる。この態様によっても上述した本発明の利点が得られる。   According to another aspect of the present invention, there is provided an image processing program, wherein the representative value calculation is performed using an image signal input step for inputting pixel signals of RGB three primary colors and a pixel signal in a representative value calculation range near the target pixel. A representative value calculating step for calculating a maximum level representative value representing the maximum level of the pixel signal included in the range, and a non-linear conversion according to a luminance conversion coefficient characteristic and a saturation conversion coefficient characteristic with different coefficient changes according to the maximum level representative value A conversion coefficient calculating step for calculating a luminance conversion coefficient and a saturation conversion coefficient used for processing, and a non-linear conversion of the pixel signal so that luminance and saturation are respectively converted according to the luminance conversion coefficient and the saturation conversion coefficient And causing a computer to execute a signal level conversion step for processing. This aspect also provides the above-described advantages of the present invention.

本発明は、上述のように最大レベル代表値から求めた輝度変換係数と彩度変換係数を用いて非線形変換処理を行うことにより、色相を保存しつつ、非線形変換特性の傾きを大きくした部分での不自然な彩度上昇を抑えることができ、さらに、画像の信号レベル変動の激しい部分の偽着色を低減することができるという効果を有する画像処理装置を提供することができる。   In the present invention, the nonlinear conversion process is performed using the luminance conversion coefficient and the saturation conversion coefficient obtained from the maximum level representative value as described above, thereby maintaining the hue and increasing the slope of the nonlinear conversion characteristic. It is possible to provide an image processing apparatus that can suppress an unnatural increase in color saturation, and can reduce false coloring in a portion where the signal level fluctuation of the image is severe.

以下、本発明の実施の形態に係る画像処理装置について、図面を用いて説明する。   Hereinafter, an image processing apparatus according to an embodiment of the present invention will be described with reference to the drawings.

本発明の第1の実施の形態に係る画像処理装置を図1に示す。この画像処理装置は、例えば、デジタルカメラおよびビデオカメラ等の撮像装置に備えられる。図1において、画像処理装置は、画像信号入力部101と、注目画素付近のR,G,B信号から代表値を算出する代表値算出部102と、代表値から非線形変換処理に使用する輝度変換係および彩度変換係数を算出する変換係数算出部103と、輝度変換係数および彩度変換係数を基にR,G,B信号を非線形変換する信号レベル変換部104とを備える。   An image processing apparatus according to the first embodiment of the present invention is shown in FIG. The image processing apparatus is provided in an imaging apparatus such as a digital camera and a video camera. In FIG. 1, an image processing apparatus includes an image signal input unit 101, a representative value calculation unit 102 that calculates a representative value from R, G, and B signals in the vicinity of a target pixel, and a luminance conversion that is used for nonlinear conversion processing from the representative value. A conversion coefficient calculation unit 103 that calculates the coefficient and the saturation conversion coefficient, and a signal level conversion unit 104 that nonlinearly converts the R, G, and B signals based on the luminance conversion coefficient and the saturation conversion coefficient.

図1の各部の構成は、回路によって実現されてもよく、プログラムによってソフトウエア的に実現されてもよい。後者の場合、図1の各要素を実現するプログラムが記憶されており、演算装置によって実行される。   The configuration of each unit in FIG. 1 may be realized by a circuit or may be realized by software by a program. In the latter case, a program for realizing each element in FIG. 1 is stored and executed by the arithmetic unit.

画像信号入力部101は、R,G,B,3原色の画素信号を入力する構成である。画像信号入力部101は、被写体の光学像を電気信号に変換する撮像素子を備えてよい。本実施の形態では、撮像素子が単板カメラタイプであり、モザイク状に色フィルタが配置されており、各画素にはR,G,Bのいずれかの信号が存在する。画像信号入力部101は、ラインメモリを用いて、注目画素付近のR,G,B信号を同期させて入力する。   The image signal input unit 101 is configured to input pixel signals of R, G, B, and three primary colors. The image signal input unit 101 may include an image sensor that converts an optical image of a subject into an electrical signal. In the present embodiment, the image sensor is a single-plate camera type, color filters are arranged in a mosaic pattern, and each pixel has one of R, G, and B signals. The image signal input unit 101 inputs R, G, and B signals near the target pixel in synchronization using a line memory.

なお、本発明の範囲で、画像信号入力部101は上記構成に限定されない。画像信号入力部101は、過去に撮影されて記録された画像データを入力する構成でもよい。   Note that the image signal input unit 101 is not limited to the above configuration within the scope of the present invention. The image signal input unit 101 may be configured to input image data captured and recorded in the past.

代表値算出部102は、注目画素付近のR,G,B信号から、非線形処理の変換係数を決める代表値を算出する構成である。代表値算出部102は、注目画素付近に設定された所定の代表値算出範囲の画素信号を代表する値を算出する。そして、本実施の形態では、代表値算出部102が、代表値として、代表値算出範囲に含まれる画素信号の最大レベルを表す値を算出するように構成されている。この代表値を、本実施の形態では、「最大レベル代表値」と呼ぶ。また、以下の説明では、最大レベル代表値を表す記号としてXを用いる。   The representative value calculation unit 102 is configured to calculate a representative value that determines a conversion coefficient for nonlinear processing from R, G, and B signals near the target pixel. The representative value calculation unit 102 calculates a value representing a pixel signal in a predetermined representative value calculation range set near the target pixel. In this embodiment, the representative value calculation unit 102 is configured to calculate a value representing the maximum level of the pixel signal included in the representative value calculation range as the representative value. This representative value is referred to as a “maximum level representative value” in the present embodiment. In the following description, X is used as a symbol representing the maximum level representative value.

図2は、代表値算出処理を示している。図2の例において、代表値算出範囲201は、注目画素202と上下左右斜めの画素からなる3×3画素の範囲であり、すなわち、注目画素を中心とした9個の画素の範囲である。代表値算出範囲内には、4つの最大値選出範囲203〜206が互いにずらして設定されている。各々の最大値選出範囲203〜206は、注目画素202を含む2×2画素の範囲である。4つの最大値選出範囲203〜206では、注目画素が右下、左下、左上、右上にそれぞれ位置する。代表値算出処理では、各々の最大値選出範囲203〜206から最大画素値(4つの画素値の最大値)が選出される。これにより4つの最大値が選出される。そして、4つの最大値の平均が、最大レベル代表値Xとして算出される。   FIG. 2 shows a representative value calculation process. In the example of FIG. 2, the representative value calculation range 201 is a 3 × 3 pixel range composed of the pixel of interest 202 and vertically and horizontally slanted pixels, that is, a range of nine pixels centered on the pixel of interest. Within the representative value calculation range, four maximum value selection ranges 203 to 206 are set so as to be shifted from each other. Each of the maximum value selection ranges 203 to 206 is a 2 × 2 pixel range including the target pixel 202. In the four maximum value selection ranges 203 to 206, the target pixel is located at the lower right, lower left, upper left, and upper right, respectively. In the representative value calculation process, the maximum pixel value (maximum value of four pixel values) is selected from each of the maximum value selection ranges 203 to 206. As a result, four maximum values are selected. Then, the average of the four maximum values is calculated as the maximum level representative value X.

このようにして、本実施の形態では、代表値算出部102は、代表値算出範囲201内に互いにずらして設定された複数の最大値選出範囲203〜206からそれぞれ得られる複数の最大画素値の平均を求めて、最大レベル代表値Xとするように構成されている。算出された最大レベル代表値Xは、変換係数算出部103に供給される。   In this way, in the present embodiment, the representative value calculation unit 102 has a plurality of maximum pixel values respectively obtained from the plurality of maximum value selection ranges 203 to 206 set in the representative value calculation range 201 so as to be shifted from each other. The average is obtained and the maximum level representative value X is obtained. The calculated maximum level representative value X is supplied to the conversion coefficient calculation unit 103.

なお、代表値算出処理は上記に限定されない。例えば、代表値算出処理は、単純に、代表値算出範囲の9つの画素値の最大値を求める処理でもよい。   The representative value calculation process is not limited to the above. For example, the representative value calculation process may simply be a process for obtaining the maximum value of nine pixel values in the representative value calculation range.

変換係数算出部103は、輝度変換係数算出部105と彩度変換係数算出部106で構成されており、輝度変換係数算出部105および彩度変換係数算出部106がそれぞれ輝度変換係数および彩度変換係数を算出する。以下、輝度変換係数をkY、彩度変換係数をkCと表記する。   The conversion coefficient calculation unit 103 includes a luminance conversion coefficient calculation unit 105 and a saturation conversion coefficient calculation unit 106. The luminance conversion coefficient calculation unit 105 and the saturation conversion coefficient calculation unit 106 are respectively a luminance conversion coefficient and a saturation conversion. Calculate the coefficient. Hereinafter, the luminance conversion coefficient is expressed as kY, and the saturation conversion coefficient is expressed as kC.

輝度変換係数算出部105は、下記のように、代表値算出部102で算出された最大レベル代表値から輝度変換係数kYを算出する。   The luminance conversion coefficient calculation unit 105 calculates the luminance conversion coefficient kY from the maximum level representative value calculated by the representative value calculation unit 102 as described below.

図3は、輝度に関する非線形変換のX−Gamma(X) 特性の例である。横軸は最大レベル代表値Xであり、縦軸は変換後の値Gamma(X)である。   FIG. 3 is an example of the X-Gamma (X) characteristic of the nonlinear transformation related to luminance. The horizontal axis is the maximum level representative value X, and the vertical axis is the converted value Gamma (X).

図4は、図3のようにX−Gamma(X) 特性が設定された場合の、輝度変換係数特性である。図4において、横軸は、最大レベル代表値Xであり、縦軸は輝度変換係数kYである。輝度変換係数kYは、Gamma(X) / Xであり、すなわち、Gamma(X)を最大レベル代表値Xで割った値である。   FIG. 4 is a luminance conversion coefficient characteristic when the X-Gamma (X) characteristic is set as shown in FIG. In FIG. 4, the horizontal axis represents the maximum level representative value X, and the vertical axis represents the luminance conversion coefficient kY. The luminance conversion coefficient kY is Gamma (X) / X, that is, a value obtained by dividing Gamma (X) by the maximum level representative value X.

図4に示されるように、輝度変換係数特性においては、全体としては、最大レベル代表値Xが大きくなる程、輝度変換係数kYが小さくなっている。最大レベル代表値Xの高域側(画像が明るい領域)では、輝度変換係数特性の傾きが小さく、輝度変換係数kYはなだらかに変化する。これに対して、最大レベル代表値Xの低域側(画像が暗い領域)では、輝度変換係数特性の傾きが大きく、特性曲線が立ち上がり、輝度変換係数kYが大きく変化する。この立上り領域は、画像が暗い領域であり、非線形特性の傾きを大きくすることで階調感を効果的に改善できる領域である。したがって、図4の特性により画質を改善できる。   As shown in FIG. 4, in the luminance conversion coefficient characteristic, as a whole, the luminance conversion coefficient kY decreases as the maximum level representative value X increases. On the high frequency side of the maximum level representative value X (region where the image is bright), the gradient of the luminance conversion coefficient characteristic is small, and the luminance conversion coefficient kY changes gently. On the other hand, on the low frequency side (region where the image is dark) of the maximum level representative value X, the gradient of the luminance conversion coefficient characteristic is large, the characteristic curve rises, and the luminance conversion coefficient kY changes greatly. This rising area is an area where the image is dark, and the gradation can be effectively improved by increasing the slope of the nonlinear characteristic. Therefore, the image quality can be improved by the characteristics shown in FIG.

輝度変換係数算出部105は、最大レベル代表値Xに応じて設定された図4の輝度変換係数特性に従って輝度変換係数を算出する。図4に相当する最大レベル代表値Xと輝度変換係数kYのテーブルがROM等に記憶されていてよい。輝度変換係数算出部105は、代表値算出部102で算出された最大レベル代表値Xを取得し、そして、最大レベル代表値Xに対応する輝度変換係数kYをテーブルから求めてよい。   The luminance conversion coefficient calculation unit 105 calculates the luminance conversion coefficient in accordance with the luminance conversion coefficient characteristic of FIG. 4 set according to the maximum level representative value X. A table of maximum level representative value X and luminance conversion coefficient kY corresponding to FIG. 4 may be stored in a ROM or the like. The luminance conversion coefficient calculation unit 105 may acquire the maximum level representative value X calculated by the representative value calculation unit 102, and obtain the luminance conversion coefficient kY corresponding to the maximum level representative value X from the table.

また、例えば、図4の輝度変換係数特性ライン上の複数の代表点の値が記憶されていてよい。代表点間の値は、補間処理によって算出されてよい。   Further, for example, values of a plurality of representative points on the luminance conversion coefficient characteristic line in FIG. 4 may be stored. The value between the representative points may be calculated by interpolation processing.

輝度変換係数算出部105は、上述のようにして求めた輝度変換係数kYを、信号レベル変換部104へと供給する。   The luminance conversion coefficient calculation unit 105 supplies the luminance conversion coefficient kY obtained as described above to the signal level conversion unit 104.

次に、彩度変換係数算出部106による彩度変換係数kCの算出処理について説明する。図5は、彩度変換係数特性を輝度変換係数特性と共に示している。図4と同様、図5においても、横軸は最大レベル代表値Xであり、縦軸は変換係数である。彩度変換係数特性と輝度変換係数特性は以下に説明するように異なって設定されている。   Next, the saturation conversion coefficient kC calculation process by the saturation conversion coefficient calculation unit 106 will be described. FIG. 5 shows the saturation conversion coefficient characteristics together with the luminance conversion coefficient characteristics. As in FIG. 4, also in FIG. 5, the horizontal axis is the maximum level representative value X, and the vertical axis is the conversion coefficient. The saturation conversion coefficient characteristic and the luminance conversion coefficient characteristic are set differently as described below.

彩度変換係数特性も、輝度変換係数特性と同様、全体としては、最大レベル代表値Xが大きくなる程、彩度変換係数kCが小さくなっている。また、輝度変換係数特性と同様、最大レベル代表値Xの高域側(画像が明るい領域)では、彩度変換係数特性の傾きが小さい。輝度変換係数特性との相違点としては、最大レベル代表値Xの低域側(画像が暗い領域)において、輝度変換係数特性の立ち上がりと比較して前記彩度変換係数の立ち上がりが縮小して設定されており、これにより、輝度変換係数特性の傾きと比較して彩度変換係数の傾きが小さく設定されている。   Similar to the luminance conversion coefficient characteristic, the saturation conversion coefficient characteristic as a whole has a smaller saturation conversion coefficient kC as the maximum level representative value X increases. Similarly to the luminance conversion coefficient characteristic, the slope of the saturation conversion coefficient characteristic is small on the high frequency side (region where the image is bright) of the maximum level representative value X. The difference from the luminance conversion coefficient characteristic is that the rise of the saturation conversion coefficient is reduced compared to the rise of the luminance conversion coefficient characteristic on the low-frequency side (the dark image area) of the maximum level representative value X. Thus, the slope of the saturation conversion coefficient is set smaller than the slope of the luminance conversion coefficient characteristic.

このように、輝度変換係数特性と彩度変換係数特性を比較すると、最大レベル代表値Xが低い側の輝度変換係数特性が持ち上がる領域において、彩度変換係数特性は、輝度変換係数特性に合わせて持ち上がるが、輝度変換係数特性と比べて抑えられたある程度のレベルで持ち上がる。   In this way, when comparing the luminance conversion coefficient characteristic and the saturation conversion coefficient characteristic, in the region where the luminance conversion coefficient characteristic on the side where the maximum level representative value X is lower, the saturation conversion coefficient characteristic is matched to the luminance conversion coefficient characteristic. Although it is lifted, it is lifted at a certain level that is suppressed compared to the luminance conversion coefficient characteristics.

彩度変換係数算出部106は、図5の彩度変換係数特性に従って彩度変換係数kCを算出する。図5に相当する最大レベル代表値Xと彩度変換係数kCのテーブルがROM等に記憶されていてよい。彩度変換係数算出部106は、代表値算出部102で算出された最大レベル代表値Xを取得し、そして、最大レベル代表値Xに対応する彩度変換係数kCをテーブルから求めてよい。   The saturation conversion coefficient calculation unit 106 calculates the saturation conversion coefficient kC according to the saturation conversion coefficient characteristic of FIG. A table of maximum level representative value X and saturation conversion coefficient kC corresponding to FIG. 5 may be stored in a ROM or the like. The saturation conversion coefficient calculation unit 106 may acquire the maximum level representative value X calculated by the representative value calculation unit 102, and obtain the saturation conversion coefficient kC corresponding to the maximum level representative value X from the table.

また、例えば、図5の彩度変換係数特性ライン上の複数の代表点の値が記憶されていてよい。代表点間の値は、補間処理によって算出されてよい。   Further, for example, values of a plurality of representative points on the saturation conversion coefficient characteristic line of FIG. 5 may be stored. The value between the representative points may be calculated by interpolation processing.

上記の処理では、彩度変換係数特性が輝度変換係数特性と別に記憶されており、彩度変換係数kCを輝度変換係数kYとは全く独立に代表値から求められる。別の例では、以下に説明するように、輝度変換係数kYから彩度変換係数kCが算出されてよい。彩度変換係数算出部106は例えば下記の(式3)によって輝度変換係数kYから彩度変換係数kCを算出する。この算出処理も、図5の彩度変換係数特性に従って彩度変換係数kCを求める処理に該当する。
kC =( n×kY + m ) / (n+m) (式3)
In the above processing, the saturation conversion coefficient characteristic is stored separately from the luminance conversion coefficient characteristic, and the saturation conversion coefficient kC is obtained from the representative value completely independently of the luminance conversion coefficient kY. In another example, as described below, the saturation conversion coefficient kC may be calculated from the luminance conversion coefficient kY. The saturation conversion coefficient calculation unit 106 calculates the saturation conversion coefficient kC from the luminance conversion coefficient kY by, for example, the following (Equation 3). This calculation process also corresponds to the process of obtaining the saturation conversion coefficient kC according to the saturation conversion coefficient characteristic of FIG.
kC = (n × kY + m) / (n + m) (Formula 3)

ここで、n=1、m=0であれば、kY=kC となり、輝度変換係数kYと彩度変換係数kCは等しくなる。また、n=0、m=1であれば、彩度変換係数kCは常に1となり、彩度は変化しない。n、mは、図5のような両特性の関係が得られるように設定される。n=1、m=3程度に設定すると、輝度変換係数kYと彩度変換係数kCの関係が図5のようになり、輝度が持ち上がる部分は彩度もそれに合わせてある程度持ち上がる。   Here, if n = 1 and m = 0, kY = kC, and the luminance conversion coefficient kY and the saturation conversion coefficient kC are equal. If n = 0 and m = 1, the saturation conversion coefficient kC is always 1 and the saturation does not change. n and m are set so as to obtain the relationship between the two characteristics as shown in FIG. When n = 1 and m = 3 are set, the relationship between the luminance conversion coefficient kY and the saturation conversion coefficient kC is as shown in FIG. 5, and the portion where the luminance increases increases the saturation accordingly.

また、上記の処理では、輝度変換係数kYから彩度変換係数kCが算出されるが、その前に輝度変換係数kCが最大レベル代表値Xから算出されている。したがって、この場合も、彩度変換係数算出部106は、最大レベル代表値Xから彩度変換係数kCを算出しているといえる。   In the above processing, the saturation conversion coefficient kC is calculated from the luminance conversion coefficient kY, but before that, the luminance conversion coefficient kC is calculated from the maximum level representative value X. Therefore, in this case, it can be said that the saturation conversion coefficient calculation unit 106 calculates the saturation conversion coefficient kC from the maximum level representative value X.

彩度変換係数算出部106は、上述のようにして求めた彩度変換係数kCを、信号レベル変換部104へと供給する。   The saturation conversion coefficient calculation unit 106 supplies the saturation conversion coefficient kC obtained as described above to the signal level conversion unit 104.

信号レベル変換部104は、輝度変換係数算出部105および彩度変換係数算出部106から供給される輝度変換係数kYと彩度変換係数kCを基にRGBの画素信号の非線形変換を行う。信号レベル変換部104は、以下に説明するように、輝度変換係数と前記彩度変換係数に応じて輝度と彩度がそれぞれ変換されるように画素信号の非線形変換処理を行い、これにより、色相の変化を伴わずに輝度と彩度を別々の変化率で変換する。   The signal level conversion unit 104 performs nonlinear conversion of the RGB pixel signal based on the luminance conversion coefficient kY and the saturation conversion coefficient kC supplied from the luminance conversion coefficient calculation unit 105 and the saturation conversion coefficient calculation unit 106. As described below, the signal level conversion unit 104 performs non-linear conversion processing of the pixel signal so that the luminance and the saturation are respectively converted according to the luminance conversion coefficient and the saturation conversion coefficient, and thereby the hue is converted. The brightness and saturation are converted at different rate of change without any change.

信号レベル変換部104は、具体的には、下記の(式4)で表される処理を行う。
Gamma(R) =(0.3kY+0.7kC)×R+(kY−kC)×0.6G+(kY−kC)×0.1B
Gamma(G) =(kY―kC)×0.3R+(0.6kY+0.4kC)×G+(kY−kC)×0.1B
Gamma(B) =(kY−kC)×0.3R+(kY−kC)×0.6G+(0.1kY+0.9kC)×B (式4)
Gamma(R)、Gamma(G)、Gamma(B)は、それぞれ、変換後のR,G,Bの値である。
Specifically, the signal level conversion unit 104 performs processing represented by the following (Equation 4).
Gamma (R) = (0.3kY + 0.7kC) × R + (kY−kC) × 0.6G + (kY−kC) × 0.1B
Gamma (G) = (kY−kC) × 0.3R + (0.6kY + 0.4kC) × G + (kY−kC) × 0.1B
Gamma (B) = (kY−kC) × 0.3R + (kY−kC) × 0.6G + (0.1kY + 0.9kC) × B (Formula 4)
Gamma (R), Gamma (G), and Gamma (B) are values of R, G, and B after conversion, respectively.

ここで、Gamma(R)は以下のように変形できる。
Gamma(R) =(0.3kY+0.7kC)×R+ (kY−kC)×0.6G+(kY−kC)×0.1B
= kC×R+(kY−kC)×(0.3R+0.6G+0.1B)
= kC×R+(kY−kC)×Y
= kY×Y + kC(R−Y)
同様に、Gamma(G)、Gamma(B)も以下のように変形できる。
Gamma(G) =kY×Y + kC(G−Y)
Gamma(B) =kY×Y + kC(B−Y)
Here, Gamma (R) can be modified as follows.
Gamma (R) = (0.3kY + 0.7kC) × R + (kY−kC) × 0.6G + (kY−kC) × 0.1B
= kC × R + (kY−kC) × (0.3R + 0.6G + 0.1B)
= kC × R + (kY−kC) × Y
= kY × Y + kC (R−Y)
Similarly, Gamma (G) and Gamma (B) can be modified as follows.
Gamma (G) = kY × Y + kC (G−Y)
Gamma (B) = kY × Y + kC (B−Y)

すなわち、変換後の画素値は、変換輝度と変換色差の和になるといえる。変換輝度は、輝度値Yを輝度変換係数kYで変換した値であり、具体的には積である。また、変換色差は、画素値R,G,Bと輝度値Yの差を彩度変換係数kCで変換した値であり、具体的には積である。   That is, it can be said that the pixel value after conversion is the sum of the converted luminance and the converted color difference. The converted luminance is a value obtained by converting the luminance value Y with the luminance conversion coefficient kY, and is specifically a product. The converted color difference is a value obtained by converting the difference between the pixel values R, G, and B and the luminance value Y with the saturation conversion coefficient kC, and is specifically a product.

上記より、変換後の値は、明らかに、輝度をkY倍、色差をkC倍した値となる。したがって、(式4)の非線形変換処理により、色相の変化を伴わずに、輝度と彩度を独立した別々の変化率(倍率)で変換することができる。   From the above, the converted value is clearly a value obtained by multiplying the luminance by kY and the color difference by kC. Therefore, by the nonlinear conversion process of (Equation 4), the luminance and the saturation can be converted at different independent change rates (magnifications) without changing the hue.

なお、本実施の形態において、独立した変化率とは、上述のように、輝度と色差が異なる変換係数で変換されることを意味している。この点に関して説明を補足すると、(式3)に示されるように、彩度変換係数kCは輝度変換係数kYから算出されてよく、この場合は2つの変換係数kY、kCは連動する。しかし、2つの変換係数kY、kCが連動したとしても、それら2つの変換係数kY、kCは、図5の異なる特性に従った異なる係数であり、これら異なる係数が(式4)の非線形変換に使われる。したがって、この係数連動制御の場合でも、輝度と彩度は独立した変化率で変換されるといえる。   In the present embodiment, the independent change rate means that conversion is performed with conversion coefficients having different luminance and color difference as described above. To supplement the explanation regarding this point, as shown in (Equation 3), the saturation conversion coefficient kC may be calculated from the luminance conversion coefficient kY. In this case, the two conversion coefficients kY and kC are linked. However, even if the two conversion coefficients kY and kC are linked, the two conversion coefficients kY and kC are different coefficients according to the different characteristics of FIG. 5, and these different coefficients are used in the nonlinear conversion of (Equation 4). used. Therefore, even in the case of this coefficient interlocking control, it can be said that the luminance and the saturation are converted at an independent rate of change.

このような輝度と彩度の独立した変換率の実現は、以下の点で有利である。輝度と彩度の変化率は、図5に示す輝度変換係数特性と彩度変換係数特性に応じた値になる。図5において、輝度変換係数特性は、最大レベル代表値Xの低域側で大きく立ち上がっている。最大レベル代表値Xの低域部分は、画像の暗い部分に相当する。したがって、図5の輝度変換係数特性によれば、画像が暗い領域において輝度変換率の傾きが大きくなり、いわゆる黒つぶれを回避でき、階調感を効果的に改善できる。   The realization of such independent conversion ratios of luminance and saturation is advantageous in the following points. The rate of change in luminance and saturation is a value corresponding to the luminance conversion coefficient characteristic and the saturation conversion coefficient characteristic shown in FIG. In FIG. 5, the luminance conversion coefficient characteristic rises greatly on the low frequency side of the maximum level representative value X. The low frequency portion of the maximum level representative value X corresponds to the dark portion of the image. Therefore, according to the luminance conversion coefficient characteristic of FIG. 5, the gradient of the luminance conversion rate becomes large in a dark image area, so-called blackout can be avoided, and the gradation feeling can be effectively improved.

しかし、輝度と同じ変換係数を彩度にもかけると、暗い部分が不自然に鮮やかになりすぎたり、色ノイズ成分が強調されてしまう可能性がある。本実施の形態ではこの点を考慮して図5のように彩度変換係数特性が設定されており、彩度変換係数特性は、最大レベル代表値Xの低域側で輝度変換係数特性に合わせて持ち上がるが、輝度変換係数特性と比較して立ち上がり量が小さく、特性の傾きも小さい。したがって、輝度変換率が大きい部分で、彩度変換率が大きくなりすぎるのを回避し、彩度が強調され過ぎるのを回避できる。   However, if the same conversion coefficient as the luminance is applied to the saturation, the dark part may become unnaturally vivid or the color noise component may be emphasized. In this embodiment, in consideration of this point, the saturation conversion coefficient characteristic is set as shown in FIG. 5, and the saturation conversion coefficient characteristic is matched with the luminance conversion coefficient characteristic on the low frequency side of the maximum level representative value X. However, the rise amount is small and the slope of the characteristic is small compared to the luminance conversion coefficient characteristic. Therefore, it is possible to avoid the saturation conversion rate from becoming too large at the portion where the luminance conversion rate is large, and to avoid the saturation being emphasized too much.

図6は、本実施の形態の画像処理装置の動作を示すフローチャートであり、本実施の形態の画像処理方法に相当する。図6の画像処理方法は、代表値算出ステップ(S601)、輝度変換係数算出ステップ(S602)、彩度変換係数算出ステップ(S603)、信号レベル変換処理ステップ(S604)を有する。   FIG. 6 is a flowchart showing the operation of the image processing apparatus according to the present embodiment, and corresponds to the image processing method according to the present embodiment. The image processing method of FIG. 6 includes a representative value calculation step (S601), a luminance conversion coefficient calculation step (S602), a saturation conversion coefficient calculation step (S603), and a signal level conversion processing step (S604).

代表値算出ステップ(S601)では、R,G,B信号から代表値を求める。ここでは、単板カメラにおける原色ベイヤ配列のRGB信号から代表値が算出される。このとき、図2を用いて説明したように、着目画素を含み上下左右に位置する4つの2×2画素領域の各々から最大値が選ばれ、4つの最大値が平均されて、最大レベル代表値Xが算出される。   In the representative value calculating step (S601), a representative value is obtained from the R, G, B signals. Here, the representative value is calculated from the RGB signal of the primary color Bayer array in the single panel camera. At this time, as described with reference to FIG. 2, the maximum value is selected from each of the four 2 × 2 pixel regions including the target pixel and located on the top, bottom, left, and right, and the four maximum values are averaged to obtain the maximum level representative. The value X is calculated.

輝度変換係数算出ステップ(S602)および彩度変換係数算出ステップ(S603)では、図2〜図5を用いて説明したようにして、最大レベル代表値Xから輝度変換係数kYと彩度変換係数kCが算出される。彩度変換係数kCは彩度変換係数特性のテーブルから求めてもよく、あるいは、(式3)によって輝度変換係数kYから算出されてもよい。   In the luminance conversion coefficient calculation step (S602) and the saturation conversion coefficient calculation step (S603), as described with reference to FIGS. 2 to 5, the luminance conversion coefficient kY and the saturation conversion coefficient kC from the maximum level representative value X. Is calculated. The saturation conversion coefficient kC may be obtained from a table of saturation conversion coefficient characteristics, or may be calculated from the luminance conversion coefficient kY by (Equation 3).

信号レベル変換処理ステップ(S604)では、(式4)の計算式により、非線形変換処理を行う。単板カメラのように、各画素がR,G,Bいずれかの信号しか持たない場合は、(式4)の3つの変換式のうちで、該当画素信号の色に対応した変換式のみを実行すればよい。   In the signal level conversion processing step (S604), non-linear conversion processing is performed by the calculation formula of (Formula 4). When each pixel has only one of R, G, and B signals as in a single-panel camera, only the conversion formula corresponding to the color of the corresponding pixel signal is selected from the three conversion formulas in (Formula 4). Just do it.

以上に本発明の第1の実施の形態に係る画像処理装置について説明した。本実施の形態によれば、図5および(式4)を用いて説明したように、輝度変換係数kYと彩度変換係数kCに異なる特性が与えられ、そのような異なる特性に従った輝度変換係数kYと彩度変換係数kCに応じて輝度と彩度がそれぞれ変換されるように画素信号の非線形変換処理が行われる。これにより、色相の変化を伴わずに輝度と彩度を別々の変化率で変換でき、彩度の変化率を独立して制御でき、非線形変換特性の傾きを大きくした部分での不自然な彩度上昇を抑えられる。   The image processing apparatus according to the first embodiment of the present invention has been described above. According to the present embodiment, as described with reference to FIG. 5 and (Equation 4), different characteristics are given to the luminance conversion coefficient kY and the saturation conversion coefficient kC, and the luminance conversion according to such different characteristics. Non-linear conversion processing of the pixel signal is performed so that the luminance and the saturation are respectively converted according to the coefficient kY and the saturation conversion coefficient kC. As a result, brightness and saturation can be converted at different rates without hue change, the rate of change in saturation can be controlled independently, and the unnatural color at the part where the slope of the nonlinear conversion characteristics is increased. Increase in the degree can be suppressed.

また、本実施の形態によれば、注目画素付近の代表値算出範囲の画素信号を代表する値として、代表値算出範囲に含まれる画素信号の最大レベルを表す最大レベル代表値Xが算出される。そして、この最大レベル代表値Xから輝度変換係数kYと彩度変換係数kCが求められる。これにより、画像の信号レベル変動の激しい部分の偽着色を低減することができる。   Further, according to the present embodiment, the maximum level representative value X representing the maximum level of the pixel signal included in the representative value calculation range is calculated as a value representing the pixel signal in the representative value calculation range near the target pixel. . Then, the luminance conversion coefficient kY and the saturation conversion coefficient kC are obtained from the maximum level representative value X. As a result, it is possible to reduce false coloration in a portion where the signal level of the image varies greatly.

この点に関し、従来技術では、輝度が代表値として用いられていた。この場合、画像の信号レベル変動の激しい部分では、隣接する画素間の差が激しくなり、代表値も大きく異なる。このような代表値を基に非線形変換係数を算出すると、R,G,B信号それぞれにかけられる非線形変換係数の差が大きくなり、その結果、R,G,Bの信号比が崩れ、偽着色が発生する可能性あがる。本実施の形態は、上記のような最大レベル代表値Xを用いるので、偽着色を低減することができる。   In this regard, in the prior art, luminance is used as a representative value. In this case, in the portion where the signal level fluctuation of the image is severe, the difference between adjacent pixels becomes severe, and the representative value is also greatly different. When the nonlinear transformation coefficient is calculated based on such representative values, the difference between the nonlinear transformation coefficients applied to each of the R, G, and B signals becomes large. As a result, the signal ratio of R, G, and B collapses, and false coloring occurs. It can happen. Since the present embodiment uses the maximum level representative value X as described above, false coloring can be reduced.

以上より、本実施の形態によれば、色相を保存しつつ、非線形変換特性の傾きを大きくした部分での不自然な彩度上昇を抑えることができ、さらに、画像の信号レベル変動の激しい部分の偽着色を低減することができ、これらによって高画質な画像を得ることができる。   As described above, according to the present embodiment, it is possible to suppress an unnatural saturation increase at a portion where the slope of the nonlinear conversion characteristic is increased while preserving the hue, and further, a portion where the signal level fluctuation of the image is severe. The false coloring can be reduced, and these can provide a high-quality image.

また、本実施の形態によれば、輝度変換係数特性と彩度変換係数特性では、最大レベル代表値Xの低域側での輝度変換係数特性の傾き増大による立ち上がりと比較して彩度変換係数の立ち上がりが縮小して設定されている。これにより、最大レベル代表値Xの低域側にて、輝度変換係数特性の立ち上がりと比較して彩度変換係数が小さく立ち上がる。最大レベル代表値Xの低域部分は、画像の暗い部分に相当し、非線形変換特性の傾きを大きくすることが効果的であり、いわゆる黒つぶれを回避し、階調感を改善できる領域である。この領域にて、上記のように立ち上がり量を異ならせることにより、輝度変換係数特性の傾きを大きくしつつも、彩度変換係数の傾きが大きくなり過ぎるのを防ぎ、不自然な彩度上昇を抑えることができる。   Further, according to the present embodiment, in the luminance conversion coefficient characteristic and the saturation conversion coefficient characteristic, the saturation conversion coefficient is compared with the rise due to the increase in the inclination of the luminance conversion coefficient characteristic on the low frequency side of the maximum level representative value X. The rising edge is set to be reduced. As a result, the saturation conversion coefficient rises smaller on the lower side of the maximum level representative value X than the rise of the luminance conversion coefficient characteristic. The low-frequency part of the maximum level representative value X corresponds to the dark part of the image, and it is effective to increase the slope of the nonlinear conversion characteristics, avoiding so-called black crushing and improving the tone of gradation. . In this area, by varying the amount of rise as described above, the slope of the luminance conversion coefficient characteristic is increased, but the slope of the saturation conversion coefficient is prevented from becoming too large, and unnatural saturation rises. Can be suppressed.

また、本実施の形態によれば、代表値算出部102は、代表値算出範囲内に互いにずらして設定された複数の最大値選出範囲からそれぞれ得られる複数の最大画素値の平均を求めるように構成されている。これにより、代表値算出範囲に含まれるRGB信号の最大レベルを表す最大レベル代表値Xを適切に算出し、画像の信号レベル変動の激しい部分の偽着色を低減することができる。   Further, according to the present embodiment, the representative value calculation unit 102 obtains an average of a plurality of maximum pixel values respectively obtained from a plurality of maximum value selection ranges set so as to be shifted from each other within the representative value calculation range. It is configured. Thereby, the maximum level representative value X representing the maximum level of the RGB signal included in the representative value calculation range can be appropriately calculated, and false coloring of a portion where the signal level fluctuation of the image is severe can be reduced.

また、本実施の形態によれば、信号レベル変換部104は、(式4)とその変形式に示されたように、非線形変換後のRGB各々の画素信号を、輝度値を前記輝度変換係数で変換した変換輝度と、画素値と輝度値の色差を前記彩度変換係数で変換した変換色差との和にするように構成されている。これにより、色相の変化を伴わずに輝度と彩度を独立した別々の変化率で変換する非線形変換を行って、彩度を適切に調整でき、非線形変換特性の傾きを大きくした部分での不自然な彩度上昇を抑えられる。   Further, according to the present embodiment, the signal level conversion unit 104, as shown in (Expression 4) and its modified expression, each RGB pixel signal after nonlinear conversion, the luminance value as the luminance conversion coefficient, And the sum of the converted luminance converted by the saturation conversion coefficient and the color difference between the pixel value and the luminance value. This makes it possible to perform non-linear conversion that converts luminance and saturation at different independent rates without changing the hue, so that the saturation can be adjusted appropriately, and the non-uniformity in the portion where the slope of the non-linear conversion characteristic is increased. Reduces natural saturation.

次に、本発明の第2の実施の形態に係る画像処理装置について説明する。   Next, an image processing apparatus according to the second embodiment of the present invention will be described.

図7は、本実施の形態に係る画像処理装置を示している。図7の画像処理装置は、図1の画像処理装置の構成に加えて、最大値輝度値算出部701と彩度変換係数補正部702を有しており、この点で第2の実施の形態は第1の実施の形態と異なっている。その他の構成は第1の実施の形態と同様である。以下、第1の実施の形態との共通部分の説明を省略し、第1の実施の形態と相違する部分について説明する。   FIG. 7 shows an image processing apparatus according to this embodiment. The image processing apparatus in FIG. 7 includes a maximum value luminance value calculation unit 701 and a saturation conversion coefficient correction unit 702 in addition to the configuration of the image processing apparatus in FIG. 1, and in this respect, the second embodiment. Is different from the first embodiment. Other configurations are the same as those of the first embodiment. Hereinafter, description of parts common to the first embodiment will be omitted, and parts different from the first embodiment will be described.

最大値輝度値算出部701は、注目画素付近の最大値検出範囲から最大画素値を求める。最大値検出範囲は、例えば、注目画素202と上下左右斜めの画素の範囲であり、すなわち、注目画素を中心とした9画素(3×3画素)の範囲である。最大画素値は、最大値検出範囲の9画素のR,G,B信号のうちで信号レベルが最大の信号である。   The maximum value luminance value calculation unit 701 obtains the maximum pixel value from the maximum value detection range near the target pixel. The maximum value detection range is, for example, a range of a pixel of interest 202 and pixels that are diagonally up, down, left, and right, that is, a range of 9 pixels (3 × 3 pixels) centering on the pixel of interest. The maximum pixel value is a signal having the maximum signal level among the R, G, and B signals of 9 pixels in the maximum value detection range.

また、最大値輝度値算出部701は、注目画素付近の輝度値算出範囲の画素信号から輝度値を算出する。本実施の形態の例では、輝度値算出範囲が最大値検出範囲と同じく、注目画素を含む3×3画素の範囲に設定されている。最大値輝度値算出部701は、輝度値算出範囲のR,G,B信号を3:6:1の比で加算して、輝度値の算出を行う。   The maximum value luminance value calculation unit 701 calculates a luminance value from the pixel signal in the luminance value calculation range near the target pixel. In the example of the present embodiment, the luminance value calculation range is set to a 3 × 3 pixel range including the target pixel, like the maximum value detection range. The maximum value luminance value calculation unit 701 calculates the luminance value by adding the R, G, B signals in the luminance value calculation range in a ratio of 3: 6: 1.

なお、上記の最大画素値は、9つの画素値の最大値である。これに対して、第1の実施の形態で変換係数の決定の基礎になった最大レベル代表値Xは、4つの2×2画素領域から得られた4つの最大値の平均である。したがって、最大画素値は前述の最大レベル代表値とは異なっている。   The maximum pixel value is the maximum value of nine pixel values. On the other hand, the maximum level representative value X that is the basis for determining the conversion coefficient in the first embodiment is an average of four maximum values obtained from four 2 × 2 pixel regions. Therefore, the maximum pixel value is different from the maximum level representative value described above.

ただし、第1の実施の形態で説明したように、最大レベル代表値が、単純に注目画素付近の画素値の最大値でもよい。この場合、最大レベル代表値が上記の最大画素値と一致する。そこで、1つの構成が、最大レベル代表値と最大画素値の算出に兼用されてよい。   However, as described in the first embodiment, the maximum level representative value may simply be the maximum value of the pixel values near the target pixel. In this case, the maximum level representative value matches the maximum pixel value. Therefore, one configuration may be used for calculating the maximum level representative value and the maximum pixel value.

彩度変換係数補正部702には、最大値輝度値算出部701から上記の最大画素値と輝度値が供給される。また、彩度変換係数補正部702には、変換係数算出部104の彩度変換係数算出部106から彩度変換係数kCが供給される。さらに、彩度変換係数補正部702には、輝度変換係数算出部105で算出された輝度変換係数kYが供給される。彩度変換係数補正部702は、最大画素値、輝度値および輝度変換係数kYを用いて、以下のようにして、彩度変換係数kCを補正する。   The maximum pixel value and the luminance value are supplied from the maximum luminance value calculation unit 701 to the saturation conversion coefficient correction unit 702. Further, the saturation conversion coefficient correction unit 702 is supplied with the saturation conversion coefficient kC from the saturation conversion coefficient calculation unit 106 of the conversion coefficient calculation unit 104. Further, the luminance conversion coefficient kY calculated by the luminance conversion coefficient calculation unit 105 is supplied to the saturation conversion coefficient correction unit 702. The saturation conversion coefficient correction unit 702 corrects the saturation conversion coefficient kC as follows using the maximum pixel value, the luminance value, and the luminance conversion coefficient kY.

彩度変換係数補正部702は、最大画素値、輝度値および輝度変換係数kCから、非線形変換後の信号値が所定の上限信号値以下になる上限彩度変換係数を求める。所定の上限信号値は、RGB画素値の許容される上限値である。そして、彩度変換係数補正部702は、上限彩度変換係数以下になるように彩度変換係数kCを補正する。ここでは、彩度変換係数算出部106で算出された彩度変換係数kCが上限彩度変換係数と比較され、上限彩度変換係数への上限クリップ処理が行われる。   The saturation conversion coefficient correction unit 702 obtains an upper limit saturation conversion coefficient that causes the signal value after nonlinear conversion to be equal to or less than a predetermined upper limit signal value from the maximum pixel value, the luminance value, and the luminance conversion coefficient kC. The predetermined upper limit signal value is an allowable upper limit value of the RGB pixel value. Then, the saturation conversion coefficient correction unit 702 corrects the saturation conversion coefficient kC so as to be equal to or less than the upper limit saturation conversion coefficient. Here, the saturation conversion coefficient kC calculated by the saturation conversion coefficient calculation unit 106 is compared with the upper limit saturation conversion coefficient, and the upper limit clipping process to the upper limit saturation conversion coefficient is performed.

上限彩度変換係数は以下のようにして算出される。この処理では、上限信号値に対応する彩度変換係数が、最大画素値、輝度値および輝度変換係数kYを用いて逆算により求められる。   The upper limit saturation conversion coefficient is calculated as follows. In this process, the saturation conversion coefficient corresponding to the upper limit signal value is obtained by back calculation using the maximum pixel value, the luminance value, and the luminance conversion coefficient kY.

まず、最大値輝度値算出部701で求めた最大画素値が、R信号であったとする。この場合、非線形変換後のR信号を上限信号値以下にしようとすると、彩度変換係数が以下の式で表される。   First, it is assumed that the maximum pixel value obtained by the maximum value luminance value calculation unit 701 is an R signal. In this case, when the R signal after nonlinear conversion is to be made lower than the upper limit signal value, the saturation conversion coefficient is expressed by the following equation.

上限信号値≧Gamma(R)
=(0.3kY+0.7kC)×R+(kY−kC)×0.6G+(kY−kC)×0.1B
≧ kY×Y+kC×(R−Y)
kC ≦(上限信号値−kY×Y)/(R−Y)
Upper limit signal value ≥ Gamma (R)
= (0.3kY + 0.7kC) × R + (kY−kC) × 0.6G + (kY−kC) × 0.1B
≧ kY × Y + kC × (R−Y)
kC ≤ (Upper limit signal value-kY x Y) / (R-Y)

最大画素値がG、B信号であった場合も、同様にして、非線形変換後の信号を上限信号値以下にしようとすると、彩度変換係数が以下の式で表される。
kC ≦(上限信号値−kY×Y)/(G−Y)
kC ≦(上限信号値−kY×Y)/(B−Y)
Similarly, when the maximum pixel value is the G and B signals, the saturation conversion coefficient is expressed by the following equation if the signal after nonlinear conversion is tried to be equal to or lower than the upper limit signal value.
kC ≤ (Upper limit signal value-kY x Y) / (G-Y)
kC ≤ (Upper limit signal value-kY x Y) / (B-Y)

結局、上限彩度変換係数は以下の(式5)で表される。
上限彩度変換係数=(上限信号値−kY×輝度値)/(最大画素値−輝度値) (式5)
After all, the upper limit saturation conversion coefficient is expressed by the following (formula 5).
Upper limit saturation conversion coefficient = (upper limit signal value−kY × luminance value) / (maximum pixel value−luminance value) (Formula 5)

彩度変換係数補正部702は、(式5)により上限彩度変換係数を算出し、上限彩度変換係数にて彩度変換係数kCをクリップする補正処理を行う。補正後の彩度変換係数kCが信号レベル変換部104に供給され、非線形処理に使用される。これにより、変換後の信号を上限信号値以下に抑えることができる。   The saturation conversion coefficient correction unit 702 calculates the upper limit saturation conversion coefficient by (Equation 5), and performs correction processing to clip the saturation conversion coefficient kC with the upper limit saturation conversion coefficient. The corrected saturation conversion coefficient kC is supplied to the signal level conversion unit 104 and used for nonlinear processing. Thereby, the signal after conversion can be suppressed below the upper limit signal value.

図8は、本実施の形態の画像処理装置の動作を示すフローチャートであり、本実施の形態の画像処理方法に相当する。図8の画像処理方法において、代表値算出ステップ(S801)、輝度変換係数算出ステップ(S804)、彩度変換係数算出ステップ(S805)、信号レベル変換処理ステップ(S809)は、図6の代表値算出ステップ(S601)、輝度変換係数算出ステップ(S602)、彩度変換係数算出ステップ(S603)、信号レベル変換処理ステップ(S604)と同様である。図8では、輝度値算出ステップ(S802)、最大値算出ステップ(S803)、上限彩度変換係数算出ステップ(S806)、彩度変換係数比較ステップ(S807)、彩度変換係数クリップ処理ステップ(S808)が追加されている。   FIG. 8 is a flowchart showing the operation of the image processing apparatus according to the present embodiment, and corresponds to the image processing method according to the present embodiment. In the image processing method of FIG. 8, the representative value calculation step (S801), the luminance conversion coefficient calculation step (S804), the saturation conversion coefficient calculation step (S805), and the signal level conversion processing step (S809) are the representative values of FIG. This is the same as the calculation step (S601), the luminance conversion coefficient calculation step (S602), the saturation conversion coefficient calculation step (S603), and the signal level conversion processing step (S604). In FIG. 8, a luminance value calculation step (S802), a maximum value calculation step (S803), an upper limit saturation conversion coefficient calculation step (S806), a saturation conversion coefficient comparison step (S807), and a saturation conversion coefficient clip processing step (S808). ) Has been added.

輝度値算出ステップ(S802)および最大値算出ステップ(S803)では、上述したように、最大値輝度値算出部701により、注目画素付近の輝度値と最大画素値が算出される。   In the luminance value calculation step (S802) and the maximum value calculation step (S803), as described above, the maximum value luminance value calculation unit 701 calculates the luminance value and the maximum pixel value near the target pixel.

上限彩度値算出ステップ(S806)では、彩度変換係数補正部702により、上限彩度変換係数が算出される。上限彩度変換係数は、輝度値および最大画素値と、輝度変換係数算出ステップ(S804)で輝度変換係数算出部105により算出された輝度変換係数kYと、所定の上限信号値から、(式5)を用いて算出される。   In the upper limit saturation value calculation step (S806), the saturation conversion coefficient correction unit 702 calculates the upper limit saturation conversion coefficient. The upper limit saturation conversion coefficient is calculated from the luminance value and the maximum pixel value, the luminance conversion coefficient kY calculated by the luminance conversion coefficient calculation unit 105 in the luminance conversion coefficient calculation step (S804), and a predetermined upper limit signal value. ).

彩度変換係数比較ステップ(S807)では、彩度変換係数補正部702により、上限彩度変換係数が、彩度変換係数算出ステップ(S805)にて彩度変換係数算出部106により算出された彩度変換係数kCと比較される。彩度変換係数kCが上限彩度変換係数より大きければ(S807、No)、彩度変換係数クリップ処理ステップ(S808)にて上限クリップが行われる。そして、補正後の彩度変換係数kCが信号レベル変換処理ステップ(S809)で使われる。彩度変換係数kCが上限彩度変換係数以下であれば(S807、Yes)、彩度変換係数kCが、補正されことなく非線形処理に使われる。   In the saturation conversion coefficient comparison step (S807), the saturation conversion coefficient correction unit 702 calculates the upper limit saturation conversion coefficient by the saturation conversion coefficient calculation unit 106 in the saturation conversion coefficient calculation step (S805). Compared with degree conversion coefficient kC. If the saturation conversion coefficient kC is larger than the upper limit saturation conversion coefficient (S807, No), upper limit clipping is performed in the saturation conversion coefficient clip processing step (S808). Then, the corrected saturation conversion coefficient kC is used in the signal level conversion processing step (S809). If the saturation conversion coefficient kC is equal to or less than the upper limit saturation conversion coefficient (S807, Yes), the saturation conversion coefficient kC is used for nonlinear processing without being corrected.

以上に本発明の第2の実施の形態に係る画像処理装置について説明した。本実施の形態によれば、注目画素付近の最大画素値と輝度値が算出される。そして、最大画素値、輝度値および輝度変換係数kYから、非線形変換後の信号値が所定の上限信号値以下になる上限彩度変換係数が求められる。そして、上限彩度変換係数以下へと彩度変換係数kCが補正される。したがって、変換後の信号レベルを所定の上限値以下に抑えつつ、色相変化を伴わずに、非線形変換特性の傾きを大きくした部分での不自然な彩度上昇を抑え、さらに、画像の信号レベル変動の激しい部分の偽着色を低減することができる。   The image processing apparatus according to the second embodiment of the present invention has been described above. According to the present embodiment, the maximum pixel value and luminance value near the target pixel are calculated. Then, from the maximum pixel value, the luminance value, and the luminance conversion coefficient kY, an upper limit saturation conversion coefficient that makes the signal value after nonlinear conversion equal to or less than a predetermined upper limit signal value is obtained. Then, the saturation conversion coefficient kC is corrected to be equal to or lower than the upper limit saturation conversion coefficient. Therefore, while suppressing the signal level after conversion to a predetermined upper limit value or less, without causing a hue change, suppressing an unnatural saturation increase in a portion where the slope of the nonlinear conversion characteristic is increased, and further, the signal level of the image It is possible to reduce false coloration in a portion where fluctuation is severe.

以上に本発明の好適な実施の形態を説明した。しかし、本発明は上述の実施の形態に限定されず、当業者が本発明の範囲内で上述の実施の形態を変形可能なことはもちろんである。   The preferred embodiments of the present invention have been described above. However, the present invention is not limited to the above-described embodiments, and it goes without saying that those skilled in the art can modify the above-described embodiments within the scope of the present invention.

以上のように、本発明にかかる画像処理装置は、色相を保存しつつ、非線形変換による不自然な彩度上昇を抑えることができ、さらに、偽着色を低減することができるという効果を有し、撮像装置用の画像処理装置等として有用である。   As described above, the image processing apparatus according to the present invention has an effect that it is possible to suppress unnatural saturation increase due to non-linear transformation while preserving the hue, and to further reduce false coloring. It is useful as an image processing device for an imaging device.

本発明の第1の実施の形態における画像処理装置のブロック図1 is a block diagram of an image processing apparatus according to a first embodiment of the present invention. 最大レベル代表値の算出処理を示す図Diagram showing maximum level representative value calculation processing 非線形変換における輝度変換特性の例を示す図The figure which shows the example of the luminance conversion characteristic in non-linear conversion 輝度変換特性を入力信号で割った非線形変換係数特性である輝度変換係数特性を示す図The figure which shows the luminance conversion coefficient characteristic which is the nonlinear conversion coefficient characteristic which divided the luminance conversion characteristic by the input signal 彩度変換係数特性を輝度変換係数特性と共に示す図Diagram showing saturation conversion coefficient characteristics together with luminance conversion coefficient characteristics 第1の実施の形態における画像処理装置の動作を示すフロー図FIG. 3 is a flowchart showing the operation of the image processing apparatus according to the first embodiment. 本発明の第2の実施の形態における画像処理装置のブロック図The block diagram of the image processing apparatus in the 2nd Embodiment of this invention 第2の実施の形態における画像処理装置の動作を示すフロー図FIG. 9 is a flowchart showing the operation of the image processing apparatus according to the second embodiment.

符号の説明Explanation of symbols

101 画像信号入力部
102 代表値算出部
103 変換係数算出部
104 信号レベル変換部
105 輝度変換係数算出部
106 彩度変換係数算出部
701 最大値輝度値算出部
702 彩度変換係数補正部
DESCRIPTION OF SYMBOLS 101 Image signal input part 102 Representative value calculation part 103 Conversion coefficient calculation part 104 Signal level conversion part 105 Luminance conversion coefficient calculation part 106 Saturation conversion coefficient calculation part 701 Maximum value luminance value calculation part 702 Saturation conversion coefficient correction part

Claims (8)

RGB3原色の画素信号を入力する画像信号入力手段と、
注目画素付近の代表値算出範囲の画素信号を代表する値として、前記代表値算出範囲に含まれる画素信号の最大レベルを表す最大レベル代表値を算出する代表値算出手段と、
前記最大レベル代表値に応じた係数変化が異なる輝度変換係数特性と彩度変換係数特性に従って、非線形変換処理に使用する輝度変換係数と彩度変換係数を算出する変換係数算出手段と、
前記輝度変換係数と前記彩度変換係数に応じて輝度と彩度がそれぞれ変換されるように画素信号の非線形変換処理を行う信号レベル変換手段と、
を備えたことを特徴とする画像処理装置。
Image signal input means for inputting pixel signals of RGB three primary colors;
Representative value calculating means for calculating a maximum level representative value representing a maximum level of a pixel signal included in the representative value calculation range as a value representing a pixel signal in a representative value calculation range near the target pixel;
Conversion coefficient calculation means for calculating a luminance conversion coefficient and a saturation conversion coefficient used for nonlinear conversion processing according to a luminance conversion coefficient characteristic and a saturation conversion coefficient characteristic that differ in coefficient change according to the maximum level representative value;
Signal level conversion means for performing non-linear conversion processing of pixel signals so that luminance and saturation are respectively converted according to the luminance conversion coefficient and the saturation conversion coefficient;
An image processing apparatus comprising:
前記輝度変換係数特性と前記彩度変換係数特性では、前記最大レベル代表値の低域側での前記輝度変換係数特性の傾き増大による立ち上がりと比較して前記彩度変換係数の立ち上がりが縮小して設定されていることを特徴とする請求項1に記載の画像処理装置。   In the luminance conversion coefficient characteristic and the saturation conversion coefficient characteristic, the rising edge of the saturation conversion coefficient is reduced compared to the rising edge due to an increase in the inclination of the luminance conversion coefficient characteristic on the low frequency side of the maximum level representative value. The image processing apparatus according to claim 1, wherein the image processing apparatus is set. 前記代表値算出手段は、前記代表値算出範囲内に互いにずらして設定された複数の最大値選出範囲からそれぞれ得られる複数の最大画素値の平均を求めて、前記最大レベル代表値とすることを特徴とする請求項1または2に記載の画像処理装置。   The representative value calculating means obtains an average of a plurality of maximum pixel values respectively obtained from a plurality of maximum value selection ranges set to be shifted from each other within the representative value calculation range, and sets the average as the maximum level representative value. The image processing apparatus according to claim 1, wherein the image processing apparatus is an image processing apparatus. 前記信号レベル変換手段は、非線形変換後のRGB各々の画素信号を、輝度値を前記輝度変換係数で変換した変換輝度と、画素値と輝度値の色差を前記彩度変換係数で変換した変換色差との和にする非線形変換処理を行うことを特徴とする請求項1ないし3のいずれかに記載の画像処理装置。   The signal level conversion means includes a converted luminance obtained by converting a luminance value of each RGB pixel signal after nonlinear conversion using the luminance conversion coefficient, and a converted color difference obtained by converting a color difference between the pixel value and the luminance value using the saturation conversion coefficient. The image processing apparatus according to claim 1, wherein non-linear transformation processing is performed to make the sum of 注目画素付近の最大値検出範囲から最大画素値を求めるとともに、注目画素付近の輝度値算出範囲の画素信号から輝度値を算出する最大値輝度値算出手段と、
前記最大画素値、前記輝度値および前記輝度変換係数から、非線形変換後の信号値が所定の上限信号値以下になる上限彩度変換係数を求め、前記上限彩度変換係数以下へと前記彩度変換係数を補正する彩度変換係数補正手段と、
を備えたことを特徴とする請求項1ないし4のいずれかに記載の画像処理装置。
A maximum value luminance value calculating means for calculating a luminance value from a pixel signal in a luminance value calculation range near the target pixel and obtaining a maximum pixel value from a maximum value detection range near the target pixel;
From the maximum pixel value, the luminance value, and the luminance conversion coefficient, an upper limit saturation conversion coefficient that causes a signal value after nonlinear conversion to be equal to or less than a predetermined upper limit signal value is obtained, and the saturation is reduced to the upper limit saturation conversion coefficient or less. A saturation conversion coefficient correction means for correcting the conversion coefficient;
The image processing apparatus according to claim 1, further comprising:
RGB3原色の画素信号を入力する画像信号入力ステップと、
注目画素付近の代表値算出範囲の画素信号を代表する値として、前記代表値算出範囲に含まれる画素信号の最大レベルを表す最大レベル代表値を算出する代表値算出ステップと、
前記最大レベル代表値に応じた係数変化が異なる輝度変換係数特性と彩度変換係数特性に従って、非線形変換処理に使用する輝度変換係数と彩度変換係数を算出する変換係数算出ステップと、
前記輝度変換係数と前記彩度変換係数に応じて輝度と彩度がそれぞれ変換されるように画素信号の非線形変換処理を行う信号レベル変換ステップと、
を有することを特徴とする画像処理方法。
An image signal input step for inputting pixel signals of RGB three primary colors;
A representative value calculating step for calculating a maximum level representative value representing the maximum level of the pixel signal included in the representative value calculation range as a value representing a pixel signal in the representative value calculation range near the target pixel;
A conversion coefficient calculation step for calculating a luminance conversion coefficient and a saturation conversion coefficient used for the nonlinear conversion processing according to a luminance conversion coefficient characteristic and a saturation conversion coefficient characteristic that vary in coefficient according to the maximum level representative value;
A signal level conversion step for performing nonlinear conversion processing of a pixel signal so that luminance and saturation are respectively converted according to the luminance conversion coefficient and the saturation conversion coefficient;
An image processing method comprising:
注目画素付近の最大値検出範囲から最大画素値を求めるとともに、注目画素付近の輝度値算出範囲の画素信号から輝度値を算出する最大値輝度値算出ステップと、
前記最大画素値、前記輝度値および前記輝度変換係数から、非線形変換後の信号値が所定の上限信号値以下になる上限彩度変換係数を求め、前記上限彩度変換係数以下へと前記彩度変換係数を補正する彩度変換係数補正ステップと、
を有することを特徴とする請求項6に記載の画像処理方法。
A maximum value luminance value calculating step for calculating a luminance value from a pixel signal in a luminance value calculation range near the target pixel, and obtaining a maximum pixel value from the maximum value detection range near the target pixel;
From the maximum pixel value, the luminance value, and the luminance conversion coefficient, an upper limit saturation conversion coefficient that causes a signal value after nonlinear conversion to be equal to or less than a predetermined upper limit signal value is obtained, and the saturation is reduced to the upper limit saturation conversion coefficient or less. A saturation conversion coefficient correction step for correcting the conversion coefficient;
The image processing method according to claim 6, further comprising:
RGB3原色の画素信号を入力する画像信号入力ステップと、
注目画素付近の代表値算出範囲の画素信号を代表する値として、前記代表値算出範囲に含まれる画素信号の最大レベルを表す最大レベル代表値を算出する代表値算出ステップと、
前記最大レベル代表値に応じた係数変化が異なる輝度変換係数特性と彩度変換係数特性に従って、非線形変換処理に使用する輝度変換係数と彩度変換係数を算出する変換係数算出ステップと、
前記輝度変換係数と前記彩度変換係数に応じて輝度と彩度がそれぞれ変換されるように画素信号の非線形変換処理を行う信号レベル変換ステップと、
をコンピュータに実行させることを特徴とする画像処理プログラム。
An image signal input step for inputting pixel signals of RGB three primary colors;
A representative value calculating step for calculating a maximum level representative value representing the maximum level of the pixel signal included in the representative value calculation range as a value representing a pixel signal in the representative value calculation range near the target pixel;
A conversion coefficient calculation step for calculating a luminance conversion coefficient and a saturation conversion coefficient used for the nonlinear conversion processing according to a luminance conversion coefficient characteristic and a saturation conversion coefficient characteristic that vary in coefficient according to the maximum level representative value;
A signal level conversion step for performing nonlinear conversion processing of a pixel signal so that luminance and saturation are respectively converted according to the luminance conversion coefficient and the saturation conversion coefficient;
An image processing program for causing a computer to execute.
JP2006212097A 2006-08-03 2006-08-03 Image processor and method Pending JP2008042392A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006212097A JP2008042392A (en) 2006-08-03 2006-08-03 Image processor and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006212097A JP2008042392A (en) 2006-08-03 2006-08-03 Image processor and method

Publications (1)

Publication Number Publication Date
JP2008042392A true JP2008042392A (en) 2008-02-21

Family

ID=39176951

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006212097A Pending JP2008042392A (en) 2006-08-03 2006-08-03 Image processor and method

Country Status (1)

Country Link
JP (1) JP2008042392A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011516911A (en) * 2008-03-13 2011-05-26 コーニンクレッカ フィリップス エレクトロニクス エヌ ヴィ Color image enhancement

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011516911A (en) * 2008-03-13 2011-05-26 コーニンクレッカ フィリップス エレクトロニクス エヌ ヴィ Color image enhancement

Similar Documents

Publication Publication Date Title
JP5195395B2 (en) Image processing apparatus, image processing method, image processing program, and recording medium
EP1858247B1 (en) Image correction circuit, image correction method and image display
US8508625B2 (en) Image processing apparatus
KR100975221B1 (en) Apparatus and method for improving sharpness
JP2007094742A (en) Image signal processor and image signal processing program
JP2006229925A (en) Dynamic image saturation enhancement apparatus
US8427560B2 (en) Image processing device
WO2010067488A1 (en) Color correction device and color correction method
US8648937B2 (en) Image processing apparatus, image processing method, and camera module
US10249031B2 (en) Image processing apparatus, image processing method, program, and non-transitory computer-readable storage medium
JP2004328564A (en) Color correcting apparatus, color correcting method, color correcting program, and digital camera using color correcting apparatus
JP4040171B2 (en) Signal processing device
JP5439210B2 (en) Image processing device
JPH11313336A (en) Signal processor and photographing signal processing method
US11922608B2 (en) Image processing circuit and associated image processing method
JP2004266757A (en) Image processing apparatus and method
JP2009130841A (en) Video signal processing apparatus and video signal processing method
KR100885880B1 (en) Device and Method of Realtime Image Processing
JP2008042392A (en) Image processor and method
US7012719B1 (en) Sign sensitive aperture correction system and method
US8995766B1 (en) Image processing method and image processing device
JP2006033212A (en) Video signal processing apparatus and television apparatus
JP2005529558A (en) Image processing
TWI255134B (en) System to suppress color noise
JP2006304149A (en) Color adjustment method and apparatus