JP2011023774A - Image processing apparatus and method - Google Patents
Image processing apparatus and method Download PDFInfo
- Publication number
- JP2011023774A JP2011023774A JP2007295619A JP2007295619A JP2011023774A JP 2011023774 A JP2011023774 A JP 2011023774A JP 2007295619 A JP2007295619 A JP 2007295619A JP 2007295619 A JP2007295619 A JP 2007295619A JP 2011023774 A JP2011023774 A JP 2011023774A
- Authority
- JP
- Japan
- Prior art keywords
- conversion coefficient
- luminance
- saturation
- value
- conversion
- 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
Links
- 238000012545 processing Methods 0.000 title claims abstract description 80
- 238000000034 method Methods 0.000 title description 28
- 238000006243 chemical reaction Methods 0.000 claims description 344
- 238000012937 correction Methods 0.000 claims description 9
- 238000003672 processing method Methods 0.000 claims description 3
- 230000009466 transformation Effects 0.000 abstract description 22
- 230000001131 transforming effect Effects 0.000 abstract description 4
- 238000010586 diagram Methods 0.000 description 7
- 238000003384 imaging method Methods 0.000 description 7
- 238000004040 coloring Methods 0.000 description 3
- 230000007423 decrease Effects 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 238000012935 Averaging Methods 0.000 description 1
- 239000003086 colorant Substances 0.000 description 1
- 238000007796 conventional method Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 235000021384 green leafy vegetables Nutrition 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N9/00—Details of colour television systems
- H04N9/64—Circuits for processing colour signals
- H04N9/68—Circuits for processing colour signals for controlling the amplitude of colour signals, e.g. automatic chroma control circuits
- H04N9/69—Circuits for processing colour signals for controlling the amplitude of colour signals, e.g. automatic chroma control circuits for modifying the colour signals by gamma correction
-
- G06T5/92—
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/90—Determination of colour characteristics
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N1/00—Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
- H04N1/40—Picture signal circuits
- H04N1/407—Control or modification of tonal gradation or of extreme levels, e.g. background level
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N1/00—Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
- H04N1/46—Colour picture communication systems
- H04N1/56—Processing of colour picture signals
- H04N1/60—Colour correction or control
- H04N1/6027—Correction or control of colour gradation or colour contrast
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N5/00—Details of television systems
- H04N5/14—Picture signal circuitry for video frequency region
- H04N5/20—Circuitry for controlling amplitude response
- H04N5/202—Gamma control
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Image Processing (AREA)
- Color Image Communication Systems (AREA)
- Picture Signal Circuits (AREA)
- Processing Of Color Television Signals (AREA)
- Facsimile Image Signal Circuits (AREA)
Abstract
Description
本発明は、画像信号に対して非線形変換処理を施す画像処理装置に関する。 The present invention relates to an image processing apparatus that performs nonlinear conversion processing on an image signal.
従来、デジタルカメラ等の撮像装置は、カメラ信号処理を行う画像処理装置を備えている。この種の画像処理装置は、画像信号の非線形変換処理を行うように構成されている。非線形変換処理は、一般には画像にガンマ処理を施すために行われる。ガンマ処理は、受像機の信号に対する映像レベルの非線形性を、撮像側で予め補償しておくためのものである。しかし、非線形変換処理の目的は、上記のガンマ処理だけに留まらない。例えば、ガンマの非線形変換特性がS字状に設定され、特定の階調が圧縮されたり伸張され、ノイズ感の低減や階調感の向上が図られる。 Conventionally, an imaging apparatus such as a digital camera includes an image processing apparatus that performs camera signal processing. This type of image processing apparatus is configured to perform nonlinear conversion processing of an image signal. The nonlinear conversion process is generally performed in order to perform gamma processing on an image. 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. However, the purpose of the nonlinear conversion process is not limited to the above gamma process. For example, the non-linear conversion characteristic of gamma is set in an S-shape, and a specific gradation is compressed or expanded to reduce noise and improve gradation.
R,G,Bの3原色を使用する原色信号に非線形変換処理を施す場合、R,G,B信号それぞれの信号に対して非線形信号処理を行うと、R,G,B信号の比率が変わってしまい、色相の変化が起きてしまう。 When nonlinear conversion processing is performed on primary color signals that use 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. The hue will change.
そこで、色相の変化を避けるために、注目画素付近の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)
Therefore, in order to avoid a change in hue, the representative value X is calculated from the R, G, and B signals in the vicinity of the target pixel, and a nonlinear conversion value Gamma (X) with respect to the representative value X is obtained. Further, a value obtained by dividing the nonlinear transformation value Gamma (X) by the representative value X is obtained as a nonlinear transformation coefficient. Then, the non-linear conversion coefficient is integrated with each of the R, G, and B signals. The nonlinear conversion process is expressed as (Equation 1).
Gamma (R) = R x Gamma (X) / X
Gamma (G) = G x Gamma (X) / X
Gamma (B) = B x Gamma (X) / X (Formula 1)
これにより、明らかにR,G,Bの信号比率が保たれた状態で、非線形変換処理が行われる。 As a result, the nonlinear conversion process is performed in a state where the signal ratios of R, G, and B are clearly maintained.
上記の非線形変換処理においては、代表値XとしてR,G,Bの最大値が用いられ、かつ、Gamma(X)の傾きが常に1以下であれば、下記の(式2)が成立する。
Gamma(R) ≦ R
Gamma(G) ≦ G
Gamma(R) ≦ B (式2)
In the above nonlinear conversion processing, if the maximum value of R, G, B is used as the representative value X and the gradient of Gamma (X) is always 1 or less, the following (Expression 2) is established.
Gamma (R) ≤ R
Gamma (G) ≤ G
Gamma (R) ≤ B (Formula 2)
すなわち、上記条件が満たされれば、非線形変換後の信号が元の信号より小さくなる。しかし、それ以外の場合には、非線形変換後の信号が元の信号よりも大きくなり得る。信号が非線形変換により大きくなって、所望の上限レベル以上になったとする。このとき、所望の上限レベル以上の信号のみに上限クリップをかけてしまうと、R,G,B信号の比率が狂ってしまい、このことが色相変化を招く。 That is, if the above condition is satisfied, the signal after nonlinear conversion becomes smaller than the original signal. However, in other cases, the signal after nonlinear transformation can be larger than the original signal. It is assumed that the signal becomes large due to nonlinear conversion and exceeds a desired upper limit level. At this time, if the upper limit clip is applied only to a signal having a desired upper limit level or more, the ratio of the R, G, and B signals is out of order, which causes a hue change.
このような事態を避けるため、従来、特許文献1では、以下のような技術が提案されている。
In order to avoid such a situation, the following technique is conventionally proposed in
この従来技術では、輝度が上限レベルをオーバーしている場合に、輝度変換演算が行われる。輝度変換演算は、輝度Wを代表値Xとして用いて、上述した式(1)の処理を行う。これにより、色相および彩度を変化させることなく、輝度のみが変換され、上限レベル以下になる。図8は、上記の輝度変換演算を実現する回路を示している。図において、Ri、Gi、Biは変換前の信号であり、Ro、Go、Boは変換後の信号である。R,G,Bの各チャネルは、変換前の信号に変換係数を乗算する乗算器を有している。 In this prior art, the luminance conversion calculation is performed when the luminance exceeds the upper limit level. In the luminance conversion calculation, the above-described processing of Expression (1) is performed using the luminance W as the representative value X. As a result, only the luminance is converted without changing the hue and saturation, and is below the upper limit level. FIG. 8 shows a circuit for realizing the luminance conversion calculation. In the figure, Ri, Gi, Bi are signals before conversion, and Ro, Go, Bo are signals after conversion. Each of the R, G, and B channels has a multiplier that multiplies the signal before conversion by a conversion coefficient.
R,G,B信号は、輝度Wの上下に分布している。すなわち、R,G,B信号の少なくとも1つのチャネルが輝度Wより大きく、少なくとも1つのチャネルが輝度Wより小さい。したがって、上記の輝度変換が行われても、R,G,B信号のうちの1つまたは2つのチャネルが、上限レベルをオーバーしている場合がある。そこで、特許文献1の従来技術は、輝度変換後に上限レベルをオーバーしている信号がある場合に、彩度変換演算として、下記の(式3)の処理を行う。
Ro = Wi + Kc × ( Ri−Wi )
Go = Wi + Kc × ( Gi−Wi )
Bo = Wi + Kc × ( Bi−Wi )
Wi:輝度信号
Kc:彩度変換係数 (式3)
The R, G, and B signals are distributed above and below the luminance W. That is, at least one channel of the R, G, and B signals is larger than the luminance W, and at least one channel is smaller than the luminance W. Therefore, even if the luminance conversion is performed, one or two channels of the R, G, and B signals may exceed the upper limit level. Therefore, in the conventional technique of
Ro = Wi + Kc x (Ri-Wi)
Go = Wi + Kc x (Gi-Wi)
Bo = Wi + Kc x (Bi-Wi)
Wi: Luminance signal
Kc: Saturation conversion coefficient (Formula 3)
この彩度変換演算は、色差信号をのみをKc倍することで、輝度および色相を変化させることなく彩度のみをKc倍する。この彩度変換は、R,G,Bのうちの最も高い信号が上限レベル以下になるように行われる。図9は、上記の輝度変換演算を実現する回路を示している。R,G,Bの各チャネルは、変換前の信号から輝度Wiを減算する減算器と、減算結果に輝度変換係数Kcを乗算する乗算器と、乗算結果に輝度信号Wiを加算する加算器とを有している。 In this saturation conversion calculation, only the color difference signal is multiplied by Kc, so that only the saturation is multiplied by Kc without changing the luminance and hue. This saturation conversion is performed so that the highest signal among R, G, and B is below the upper limit level. FIG. 9 shows a circuit for realizing the luminance conversion calculation. Each of the R, G, and B channels includes a subtracter that subtracts the luminance Wi from the signal before conversion, a multiplier that multiplies the subtraction result by the luminance conversion coefficient Kc, and an adder that adds the luminance signal Wi to the multiplication result. have.
このように、特許文献1の技術は、色相を変えることなく、輝度変換と彩度変換を独立して行える。このことを利用し、第1段階として、輝度変換によって輝度レベルを上限以下に抑える。そして、輝度変換後にまだ上限をオーバしているチャネル(R,G,B)がある場合、第2段階として、最も高いレベルのチャネルが上限以下に収まるように彩度が変換される。これらの2段階の処理を通じて、色相を変えることなく、全チャネルの信号が上限レベル以下になるように、非線形処理が行われる。
しかしながら、特許文献1に記載される従来の画像処理装置は、色相を変えることなく輝度と彩度を変換することにより、信号値が上限レベルをオーバーするような明るすぎる画像に対しては非線形変換を好適に行えるものの、比較的暗い画像の非線形変換を行う場合に画質を低下させることがあるという問題がある。この点について以下にてさらに説明する。
However, the conventional image processing apparatus described in
特許文献1の技術では、画像が明るすぎる場合に、まず、輝度変換により輝度が上限レベル以下に変換される。輝度変換を行ってもまだ信号値が上限レベルをオーバーしていれば、彩度変換が行われる。つまり、輝度変換後のR,G,Bの全信号が上限レベル以下であれば、彩度変換は行われない。
In the technique of
ここで、暗い画像の輝度を非線形変換によって増大する場合を考える。この場合、輝度変換後の画像において、R,G,B信号のいずれかが上限レベルをオーバーしていないことが多いと考えられる。上限レベルをオーバーする信号がなければ、特許文献1の技術では彩度変換は行われない。このように、特許文献1による非線形変換では、画像は明るくなるが彩度は変わらないといった現象が生じ得る。このような変換が行われると、画像の色が薄くなってしまい、画質が低下することがある。
Here, consider a case where the luminance of a dark image is increased by nonlinear transformation. In this case, it is considered that in the image after luminance conversion, one of the R, G, and B signals often does not exceed the upper limit level. If there is no signal exceeding the upper limit level, the technique of
本発明は、従来の問題を解決するためになされたものであり、その目的は、色相を変えることなく輝度と彩度を独立して非線形変換でき、かつ、比較的暗い画像の非線形変換を行う場合の画質を向上できる画像処理装置を提供することにある。 The present invention has been made to solve the conventional problems, and an object of the present invention is to perform non-linear conversion of luminance and saturation independently without changing the hue, and to perform non-linear conversion of a relatively dark image. An object of the present invention is to provide an image processing apparatus capable of improving the image quality in the case.
本発明の画像処理装置は、画像信号を入力する画像信号入力部と、前記画像信号における処理対象の画素である各々の注目画素の非線形変換処理に使用する輝度変換係数および彩度変換係数を算出する変換係数算出部と、前記輝度変換係数および前記彩度変換係数を基に前記注目画素の画素信号を非線形変換し、前記画像信号の色相を変えずに前記輝度変換係数および前記彩度変換係数に応じて輝度および彩度をそれぞれ変化させる信号レベル変換部とを備え、前記変換係数算出部は、前記彩度変換係数として、前記輝度変換係数に応じた値であって、前記輝度変換係数より小さい値を求めるように構成されている。 The image processing apparatus of the present invention calculates an image signal input unit that inputs an image signal, and a luminance conversion coefficient and a saturation conversion coefficient used for nonlinear conversion processing of each target pixel that is a pixel to be processed in the image signal. A conversion coefficient calculation unit that performs non-linear conversion on the pixel signal of the pixel of interest based on the luminance conversion coefficient and the saturation conversion coefficient, and the luminance conversion coefficient and the saturation conversion coefficient without changing the hue of the image signal A signal level conversion unit that changes luminance and saturation respectively according to the brightness conversion coefficient, the conversion coefficient calculation unit is a value corresponding to the luminance conversion coefficient as the saturation conversion coefficient, and from the luminance conversion coefficient It is configured to obtain a small value.
この構成により、彩度変換係数として、輝度変換係数に応じた値であって、輝度変換係数より小さい値が求められる。非線形変換では、これら輝度変換係数および彩度変換係数を用いて、色相を変えることなく、輝度と彩度が独立して変換される。したがって、本発明では、非線形変換処理を暗い画像に対して行う場合でも、輝度変換だけでなく彩度変換も行われる。これにより、彩度が変換されないために画質が低下するといった事態を回避できる。しかも、彩度変換係数が輝度変換係数より小さい値に設定されているので、輝度の増大に伴って彩度が適度に調整される。このようにして、色相を変えることなく輝度と彩度を独立して非線形変換でき、かつ、暗い画像の非線形変換を行う場合に画質を向上できる画像処理装置を提供することができる。 With this configuration, a value corresponding to the luminance conversion coefficient that is smaller than the luminance conversion coefficient is obtained as the saturation conversion coefficient. In the non-linear conversion, the luminance and the saturation are converted independently using the luminance conversion coefficient and the saturation conversion coefficient without changing the hue. Therefore, in the present invention, not only luminance conversion but also saturation conversion is performed even when nonlinear conversion processing is performed on a dark image. As a result, it is possible to avoid a situation in which the image quality deteriorates because the saturation is not converted. In addition, since the saturation conversion coefficient is set to a value smaller than the luminance conversion coefficient, the saturation is appropriately adjusted as the luminance increases. In this way, it is possible to provide an image processing apparatus that can perform non-linear conversion of luminance and saturation independently without changing the hue, and improve image quality when performing non-linear conversion of dark images.
また、本発明の画像処理装置は、前記注目画素の代表値を算出する代表値算出部を備え、前記変換係数算出部は、前記代表値から前記輝度変換係数および前記彩度変換係数を算出する。注目画素を含む所定の代表値算出範囲の画素値を代表する値が算出されてよい。この構成により、代表値を用いることで輝度変換係数および彩度変換係数を好適に算出できる。代表値は例えばR,G,B信号の最大値であり、また例えばR,G,B信号から算出される輝度値である。代表値は好ましくは下記の値である。 The image processing apparatus of the present invention further includes a representative value calculation unit that calculates a representative value of the target pixel, and the conversion coefficient calculation unit calculates the luminance conversion coefficient and the saturation conversion coefficient from the representative value. . A value representative of a pixel value in a predetermined representative value calculation range including the target pixel may be calculated. With this configuration, the luminance conversion coefficient and the saturation conversion coefficient can be suitably calculated by using the representative value. The representative value is, for example, the maximum value of the R, G, B signal, and is, for example, a luminance value calculated from the R, G, B signal. The representative values are preferably the following values.
また、本発明の画像処理装置では、複数の最大値特定範囲が互いにずれて設定されており、前記複数の最大値特定範囲の各々が前記注目画素を含んでおり、前記代表値算出部は、前記複数の最大値特定範囲からそれぞれ特定される複数の最大値の平均を算出して前記代表値とする。この構成により、注目画素を1つずつずらしていったときに、代表値が急に変化するのを防ぐことができる。代表値がなめらかに変化するので、非線形変換係数もなめらかに変化する。したがって変換後の画像における画素値の急変化を防ぐことができ、偽着色を抑えて、画質を向上できる。 In the image processing apparatus of the present invention, a plurality of maximum value specifying ranges are set so as to be shifted from each other, each of the plurality of maximum value specifying ranges includes the target pixel, and the representative value calculating unit includes: An average of a plurality of maximum values respectively specified from the plurality of maximum value specifying ranges is calculated as the representative value. With this configuration, it is possible to prevent the representative value from changing suddenly when the target pixel is shifted one by one. Since the representative value changes smoothly, the nonlinear conversion coefficient also changes smoothly. Therefore, it is possible to prevent a sudden change in the pixel value in the converted image, suppress false coloring, and improve the image quality.
本発明の画像処理装置は、前記注目画素の輝度値を算出する輝度値算出部と、前記輝度値算出部により算出される輝度値に基づいて、前記信号レベル変換部の処理において前記注目画素の画素値を所定の上限レベルにクリップするために前記彩度変換係数を補正する彩度変換係数補正部と、を備える。注目画素を含む所定の輝度値算出範囲の画素値から輝度値が算出されてよい。この構成により、信号レベルを所望の上限レベル以下に抑えつつ、暗い画像の非線形変換を行う場合に画質を向上することができる。 The image processing apparatus according to the present invention includes a luminance value calculation unit that calculates a luminance value of the pixel of interest, and the signal level conversion unit based on the luminance value calculated by the luminance value calculation unit. A saturation conversion coefficient correction unit that corrects the saturation conversion coefficient in order to clip the pixel value to a predetermined upper limit level. The luminance value may be calculated from the pixel value in a predetermined luminance value calculation range including the target pixel. With this configuration, it is possible to improve the image quality when nonlinear conversion of a dark image is performed while suppressing the signal level below a desired upper limit level.
また、本発明の画像処理方法は、画像信号を入力する画像信号入力ステップと、前記画像信号における処理対象の画素である各々の注目画素の非線形変換処理に使用する輝度変換係数および彩度変換係数を算出する変換係数算出ステップと、前記輝度変換係数および前記彩度変換係数を基に前記注目画素の画素信号を非線形変換し、前記画像信号の色相を変えずに前記輝度変換係数および前記彩度変換係数に応じて輝度および彩度をそれぞれ変化させる信号レベル変換ステップと、を有し、前記変換係数算出ステップは、前記彩度変換係数を、前記輝度変換係数に応じた値であって、前記輝度変換係数より小さい値とする。この方法によっても上述した本発明の利点が得られる。 The image processing method of the present invention includes an image signal input step for inputting an image signal, and a luminance conversion coefficient and a saturation conversion coefficient used for nonlinear conversion processing of each pixel of interest that is a pixel to be processed in the image signal. A conversion coefficient calculation step for calculating the luminance conversion coefficient, the saturation conversion coefficient and the saturation conversion coefficient, and a non-linear conversion of the pixel signal of the pixel of interest based on the luminance conversion coefficient and the saturation conversion coefficient, without changing the hue of the image signal A signal level conversion step for changing luminance and saturation according to the conversion coefficient, respectively, wherein the conversion coefficient calculation step sets the saturation conversion coefficient to a value according to the luminance conversion coefficient, The value is smaller than the luminance conversion coefficient. This method also provides the advantages of the present invention described above.
また、本発明の画像処理方法は、前記注目画素の輝度値を算出する輝度値算出ステップと、前記輝度値算出ステップにて算出される輝度値に基づいて、前記信号レベル変換ステップの処理において前記注目画素の画素値を所定の上限レベルにクリップするために前記彩度変換係数を補正する彩度変換係数補正ステップと、を有する。この方法によっても上述した本発明の利点が得られる。 In the image processing method of the present invention, the luminance value calculation step for calculating the luminance value of the target pixel, and the signal level conversion step based on the luminance value calculated in the luminance value calculation step. A saturation conversion coefficient correction step for correcting the saturation conversion coefficient in order to clip the pixel value of the target pixel to a predetermined upper limit level. This method also provides the advantages of the present invention described above.
上記のように、本発明は、彩度変換係数として、輝度変換係数に応じた値であって、輝度変換係数より小さい値を求め、これら輝度変換係数および彩度変換係数を用いて非線形変換を行う構成を設けることにより、色相を変えることなく輝度と彩度を独立して非線形変換でき、かつ、暗い画像の非線形変換を行う場合に画質を向上できるという効果を有する画像処理装置を提供することができる。 As described above, the present invention obtains a value corresponding to the luminance conversion coefficient that is smaller than the luminance conversion coefficient as the saturation conversion coefficient, and performs nonlinear conversion using these luminance conversion coefficient and saturation conversion coefficient. Provided is an image processing apparatus having an effect that by performing the non-linear conversion of luminance and saturation without changing the hue and improving the image quality when performing non-linear conversion of a dark image by providing a configuration to perform Can do.
以下、本発明の実施の形態に係る画像処理装置について、図面を用いて説明する。 Hereinafter, an image processing apparatus according to an embodiment of the present invention will be described with reference to the drawings.
本発明の第1の実施の形態に係る画像処理装置を図1に示す。画像処理装置1は、ビデオカメラ、デジタルカメラ等の撮像装置に備えられる。また、撮像装置は例えば監視カメラである。図1において、画像処理装置1は、画像信号を入力する画像信号入力部3と、画像信号における各注目画素の代表値を算出する代表値算出部5と、注目画素の非線形変換処理に使用する輝度変換係数および彩度変換係数を算出する変換係数算出部7と、輝度変換係数および彩度変換係数を基に注目画素の画素信号を非線形変換する信号レベル変換部9とを備える。変換係数算出部7は、輝度変換係数および彩度変換係数をそれぞれ算出する輝度変換係数算出部11および彩度変換係数算出部13を有する。
An image processing apparatus according to the first embodiment of the present invention is shown in FIG. The
画像信号入力部3は画像信号を入力する構成である。前述したように、本実施の形態では画像処理装置1が撮像装置に備えられる。この場合、画像信号が撮像素子で生成され、画像信号入力部3により入力される。画像信号としては、R,G,B3原色の画素信号が入力される。また、画像信号は、AD変換を経たデジタル信号である。
The image
本実施の形態の画像処理装置1は、いわゆる3板カメラに備えられてもよく、単板カメラに備えられてもよい。3板カメラの場合、3つの撮像素子がR,G,Bの各信号を生成する。そして、光学中心が同じR,G,B信号が並列に入力される。単板カメラの場合、R,G,Bの色フィルタが撮像素子にモザイク状に配置されて、1枚の撮像素子によりR,G,B信号が生成される。そして、画像信号入力部3は、ラインメモリ(図示せず)を用いて注目画素付近のR,G,B信号を同期させて入力する。
The
代表値算出部5は、画像信号入力部3により入力されたR,G,B3信号から代表値を求める。画像処理装置1では、各画素が、順次注目画素に設定され、注目画素の処理が行われる。そして、代表値の算出も注目画素ごとに行われる。
The representative
単板カメラの場合、代表値算出部5は、注目画素付近の複数の画素信号から、これら複数の画素信号を代表する代表値を算出してよい。この処理では、注目画素を含む代表値算出範囲が予め設定されており、代表値算出範囲に含まれる複数の画素信号から代表値が算出される。代表値算出範囲は、例えば、注目画素を中心とする3×3画素の領域である。代表値は、例えば、代表値算出範囲内のR,G,B信号の最大値である。また例えば、代表値は、代表値算出範囲のR,G,B信号から算出される輝度値である。
In the case of a single-panel camera, the representative
より好ましくは、代表値算出部5は、以下のようにして代表値を算出する。この処理では、互いにずれた所定の複数の最大値特定範囲が用いられる。各最大値特定範囲は、代表値算出範囲の一部であって、注目画素を含み、かつ、R,G,Bの全画素を含むように設定される。これら最大値特定範囲は、好ましくは、注目画素を中心に1周するように設けられる。より詳細には、後述する例のように、注目画素を上下左右の隅にそれぞれ含むように注目画素に対して異なる方向(左上、右上、左下、右下)に偏って複数の最大値特定範囲が設定されてよい。代表値算出部5は、これら複数の最大値特定範囲の各々からR,G,B信号の最大値を特定する。そして、代表値算出部5は、複数の最大値特定範囲からそれぞれ特定される複数の最大値の平均値を代表値とする。
More preferably, the representative
具体例として、代表値算出範囲が、注目画素を中心とする3×3画素の範囲であったとする。最大値特定範囲としては、2×2画素の範囲が適している。すなわち、4つの最大値特定範囲(2×2画素)が、それぞれ、注目画素を右下、左下、右上および左上に含むように設定される。これらの最大値特定範囲の各々から最大値が特定され、特定された複数の最大値の平均が求められる。 As a specific example, it is assumed that the representative value calculation range is a 3 × 3 pixel range centered on the target pixel. As the maximum value specifying range, a range of 2 × 2 pixels is suitable. That is, the four maximum value specifying ranges (2 × 2 pixels) are set so as to include the target pixel in the lower right, lower left, upper right, and upper left, respectively. A maximum value is specified from each of these maximum value specifying ranges, and an average of a plurality of specified maximum values is obtained.
このような代表値算出処理は、単板カメラなどで有利である。単板カメラのように光学中心の異なる複数個の信号からR,G,B信号を得る場合、R、G、Bの信号が順次配列されている。典型的な画素配列としては、原色ベイヤ配列が知られている。上記の処理によれば、各々の最大値特定範囲は、R,G,Bの各々を少なくとも1つ含む(ベイヤ配列においては、2×2画素には、赤が1つ、青が1つ、緑が2つ含まれる)。したがって、各最大値特定範囲の最大値は、必ず、隣接するR,G,B信号から選ばれた値になる。そして、これら複数の最大値の平均が求められる。このような処理が行われるので、一つの注目画素の代表値と、その隣の注目画素の代表値が、大きく異ならない。すなわち、本実施の形態によれば、注目画素を1つずつずらしていったときに、代表値が急に変化するのを防ぐことができる。これにより、代表値がなめらかに変化するので、非線形変換係数もなめらかに変化する。したがって後述する非線形変換後の画像における画素値の急変化を防ぐことができ、偽着色を抑えられる。 Such a representative value calculation process is advantageous for a single-panel camera or the like. When R, G, and B signals are obtained from a plurality of signals having different optical centers as in a single plate camera, the R, G, and B signals are sequentially arranged. A primary color Bayer array is known as a typical pixel array. According to the above processing, each maximum value specifying range includes at least one of each of R, G, and B (in a Bayer array, one red is one, one blue is a 2 × 2 pixel, 2 greens are included). Therefore, the maximum value of each maximum value specifying range is always a value selected from adjacent R, G, and B signals. And the average of these several maximum values is calculated | required. Since such processing is performed, the representative value of one target pixel and the representative value of the adjacent target pixel do not differ greatly. That is, according to the present embodiment, it is possible to prevent the representative value from changing suddenly when the target pixel is shifted one by one. Thereby, since the representative value changes smoothly, the non-linear conversion coefficient also changes smoothly. Accordingly, it is possible to prevent a sudden change in the pixel value in the image after nonlinear conversion described later, and to suppress false coloring.
一方、3板カメラのように各々の注目画素がR,G,Bの全部の信号を持っている場合、上記の代表値算出範囲および最大値特定範囲は用いられなくてよい。複数の最大値の平均処理も行われなくてよい。各注目画素のR,G,B信号から、最大値または輝度値等の適当な代表値が求められてよい。 On the other hand, when each pixel of interest has all signals of R, G, and B as in the case of a three-panel camera, the above-described representative value calculation range and maximum value specifying range may not be used. An averaging process of a plurality of maximum values may not be performed. An appropriate representative value such as a maximum value or a luminance value may be obtained from the R, G, and B signals of each pixel of interest.
変換係数算出部7において、輝度変換係数算出部11および彩度変換係数算出部13は、代表値から輝度変換係数および彩度変換係数を算出する。このうち、輝度変換係数算出部11は、代表値算出部5により算出された代表値から、注目画素の非線形変換処理に使用されるべき輝度変換係数を算出する。
In the conversion
図2は、非線形変換の X−Gamma(X) 特性の例を示している。Xは代表値であり、Gamma(X)は、変換値(変換後の値)である。この場合、代表値Xに対する輝度変換係数kYは、式4により得られる。
kY = Gamma(X)/X (式4)
FIG. 2 shows an example of the X-Gamma (X) characteristic of nonlinear transformation. X is a representative value, and Gamma (X) is a converted value (value after conversion). In this case, the luminance conversion coefficient kY for the representative value X is obtained by Equation 4.
kY = Gamma (X) / X (Formula 4)
図3は、代表値Xと輝度変換係数kYの関係を示している。この例では、代表値Xが小さい領域で輝度変換係数kYが大きい。したがって、図3の輝度変換係数kYを用いると、画像の暗い部分の輝度が持ち上げられることになる。 FIG. 3 shows the relationship between the representative value X and the luminance conversion coefficient kY. In this example, the luminance conversion coefficient kY is large in the region where the representative value X is small. Therefore, when the luminance conversion coefficient kY of FIG. 3 is used, the luminance of the dark part of the image is raised.
具体的な算出処理の構成としては、輝度変換係数算出部11は、図2の輝度変換係数特性から輝度変換係数kYを算出してよい。あるいは、図3に相当する輝度変換係数テーブルが、ROM等の記憶部に記憶されていてよい。このテーブルは、代表値Xと輝度変換係数kYとのテーブルである。そして、輝度変換係数算出部11は、この輝度変換係数テーブルから、代表値Xに対応する輝度変換係数kYを読み出す。
As a specific configuration of the calculation process, the luminance conversion
あるいは、画像処理装置1は、互いに離れた複数の代表値Xに対応する輝度変換係数kYだけを記憶していてよい。そして、記憶されていない代表値Xに対応する輝度変換係数kYは、記憶された値から補間処理によって求められてよい。
Alternatively, the
彩度変換係数算出部13は、代表値から彩度変換係数を算出する。本実施の形態では、彩度変換係数算出部13が、彩度変換係数として、輝度変換係数に応じた値であって、輝度変換係数より小さい値を求めるように構成されている。
The saturation conversion
具体的には、例えば、彩度変換係数算出部13は、下記の式5によって、輝度変換係数kYから彩度変換係数kCを算出する。
kC = ( n×kY + m )/( n+m ) (式5)
Specifically, for example, the saturation conversion
kC = (n × kY + m) / (n + m) (Formula 5)
ここで、n=1、m=0とすれば、kY=kCとなり、輝度の変換係数と彩度の変換係数は等しくなる。また、n=0,m=1であれば、kCは常に1となり、彩度は変化しない。n=1、m=3程度に設定すると、輝度変換係数kYと彩度変換係数kCの関係は、図4に示されるようになる。図4の係数設定に従って変換が行われると、輝度が持ち上がる部分では、輝度の増大に合わせて彩度もある程度持ち上がる。特に、画像が暗い部分で、輝度の持ち上がりに伴って彩度も適度に持ち上がる。これにより、輝度が高くなって明るくなったのに彩度が変わらないといった事態を回避でき、非線形変換で画像が不自然に薄くなるのを防ぐことができ、自然で良好な画像が得られる。 If n = 1 and m = 0, kY = kC, and the luminance conversion coefficient and the saturation conversion coefficient are equal. If n = 0 and m = 1, kC is always 1 and the saturation does not change. 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. When the conversion is performed according to the coefficient setting in FIG. 4, the saturation increases to some extent as the luminance increases in the portion where the luminance increases. In particular, in the dark part of the image, the saturation increases moderately as the luminance increases. Thereby, it is possible to avoid a situation in which the saturation does not change even though the brightness is increased and brightened, and it is possible to prevent the image from being unnaturally thinned by nonlinear conversion, and a natural and good image can be obtained.
上記の例では、輝度変換係数kYから彩度変換係数kCが算出された。しかし、彩度変換係数kCは、輝度変換係数kYとは全く独立に代表値から算出されてよい。たたし、この場合でも、計算結果において、彩度変換係数kCは、輝度変換係数kYに応じた値であって、輝度変換係数kYより小さい値でなければならない。 In the above example, the saturation conversion coefficient kC is calculated from the luminance conversion coefficient kY. However, the saturation conversion coefficient kC may be calculated from the representative value completely independently of the luminance conversion coefficient kY. However, even in this case, in the calculation result, the saturation conversion coefficient kC must be a value corresponding to the luminance conversion coefficient kY and smaller than the luminance conversion coefficient kY.
独立した処理の具体例としては、図2の輝度変換特性が輝度変換係数の算出に用いられるのと同様に、予め定められた彩度変換特性を用いて彩度変換係数を算出してよい。また、図4に相当する彩度変換係数テーブルが、ROM等の記憶部に記憶されていてよい。このテーブルは、代表値Xと彩度変換係数kCとのテーブルである。そして、彩度変換係数算出部13は、この彩度変換係数テーブルから、代表値Xに対応する彩度変換係数kCを読み出す。この彩度変換係数テーブルは、前述した輝度変換係数テーブルと一体化されてもよい(この場合でも、kY、kCをそれぞれ読み出すので、2つの係数算出処理は独立している)。
As a specific example of the independent processing, the saturation conversion coefficient may be calculated using a predetermined saturation conversion characteristic in the same manner as the luminance conversion characteristic of FIG. 2 is used for calculation of the luminance conversion coefficient. Further, a saturation conversion coefficient table corresponding to FIG. 4 may be stored in a storage unit such as a ROM. This table is a table of the representative value X and the saturation conversion coefficient kC. Then, the saturation conversion
また、輝度変換係数算出処理に関して説明したのと同様に、画像処理装置1は、互いに離れた複数の代表値Xに対応する彩度変換係数kCだけを記憶していてよい。そして、記憶されていない代表値Xに対応する彩度変換係数kCは、記憶された値から補間処理によって求められてよい。
Similarly to the description of the luminance conversion coefficient calculation process, the
信号レベル変換部9は、上記のようにして輝度変換係数算出部11および彩度変換係数算出部13により算出された輝度変換係数kYおよび彩度変換係数kCを基に、注目画素の信号(R,G,B信号)の非線形変換を行う。信号レベル変換部9は、輝度変換係数kYおよび彩度変換係数kCに応じて輝度および彩度をそれぞれ変化させる。この処理において、信号レベル変換部9は、色相を変えることなく(すなわち色相を一定にしたまま)、輝度変換係数に応じて輝度のみを変換し、かつ、彩度変換係数に応じて彩度のみを変換する。したがって、色相を変えずに、輝度と彩度が独立して変換される。
The signal level conversion unit 9 generates the signal (R) of the target pixel based on the luminance conversion coefficient kY and the saturation conversion coefficient kC calculated by the luminance conversion
具体的な処理としては、信号レベル変換部9は、下記の式6の計算を行うように構成されている。
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 (式6)
As a specific process, the signal level conversion unit 9 is configured to perform the calculation of the following Expression 6.
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 6)
ここで、輝度Yは式7で表される。
Y = 0.3R+0.6G+0.1B (式7)
Here, the luminance Y is expressed by
Y = 0.3R + 0.6G + 0.1B (Formula 7)
輝度Yを用いることにより、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) (式8)
By using the luminance Y, Gamma (R) is transformed 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 x R + (kY-kC) x Y
= KY x Y + kC x (R-Y) (Formula 8)
同様に、Gamma(G)、Gamma(B)も下記のように変形される。
Gamma(G) = kY×Y + kC×(G−Y)
Gamma(B) = kY×Y + kC×(B−Y) (式9)
Similarly, Gamma (G) and Gamma (B) are also modified as follows.
Gamma (G) = kY × Y + kC × (G−Y)
Gamma (B) = kY x Y + kC x (B−Y) (Formula 9)
これらの式8、式9では、明らかに、輝度がkY倍、色差がkC倍されている。すなわち、式7の非線形変換により、色相を変化させることなく、輝度と彩度の非線形変換を独立の倍率で行うことができる。
In these formulas 8 and 9, the luminance is obviously multiplied by kY and the color difference is multiplied by kC. In other words, the nonlinear conversion of
以上に、本実施の形態に係る画像処理装置1の構成を、各構成要素により行われる処理と共に説明した。次に、図5を参照し、上記の画像処理装置1の動作について説明する。
The configuration of the
図5に示されるように、画像信号入力部3により画像信号が入力されると、代表値算出部5が、画像信号における注目画素付近のR,G,B信号から代表値を算出する(S1)。既に詳細に説明したように、好ましい処理では、注目画素を含む左上、右上、左下、右下の4つの領域の各々において最大値が特定され、これにより得られる4つの最大値の平均が算出される。各領域は例えば2×2画素である。
As shown in FIG. 5, when an image signal is input by the image
次に、輝度変換係数算出部11が輝度変換係数kYを算出し(S3)、彩度変換係数算出部13が彩度変換係数kCを算出する(S5)。輝度変換係数kYは代表値から求められる(図3)。彩度変換係数kCとしては、図4に示すように、輝度変換係数kYに応じた値であって、輝度変換係数kYより小さい値が求められる。彩度変換係数kCは、輝度変換係数kYから計算されてもよく、あるいは、代表値から直接求められてもよい。前者の場合、彩度変換係数kCは、代表値から輝度変換係数kYを介して間接的に算出される。これら輝度変換係数算出ステップおよび彩度変換係数算出ステップは、本発明の変換係数算出ステップに相当する。
Next, the luminance conversion
次に、信号レベル変換部9が、輝度変換係数kYおよび彩度変換係数kCを用いて非線形変換処理を行う(S7)。ここでは、前述の(式6)の処理が行われる。単板カメラでは、各注目画素がR、G,Bのいずれかの信号しか持たない。このような場合は、信号レベル変換部9は、各注目画素の処理として、(式6)の3つの式のうちで、注目画素の画素信号の色に対応した変換式のみを実行する。この非線形変換処理により、輝度に輝度変換係数がかけられ、彩度に彩度変換係数がかけられる。したがって、色相を変えずに、輝度と彩度を独立の倍率で変換することができる。 Next, the signal level conversion unit 9 performs nonlinear conversion processing using the luminance conversion coefficient kY and the saturation conversion coefficient kC (S7). Here, the above-described processing of (Expression 6) is performed. In a single panel camera, each pixel of interest has only one of R, G, and B signals. In such a case, the signal level conversion unit 9 executes only the conversion formula corresponding to the color of the pixel signal of the target pixel among the three formulas of (Formula 6) as the processing of each target pixel. By this non-linear conversion process, the luminance conversion coefficient is applied to the luminance, and the saturation conversion coefficient is applied to the saturation. Therefore, luminance and saturation can be converted at independent magnifications without changing the hue.
ここで、図4に示したように、本実施の形態では、彩度変換係数kCが、輝度変換係数kYに応じた値であって、輝度変換係数kYより小さい値である。輝度変換係数kYの増減に伴って、彩度変換係数kCも増減する。したがって、輝度が変換されると、輝度の変換より小さいレベルで彩度も変換される。輝度が大きくなったのに彩度が変わらないといった事態を避けることができる。図4の例では、画像の暗い部分の輝度が大きく持ち上がる。このとき、画像の暗い部分の彩度も適度に持ち上がる。したがって、画像が明るくなったのに彩度が変わらないために色が薄くなる、といった事態を避けられ、画質を向上できる。 Here, as shown in FIG. 4, in the present embodiment, the saturation conversion coefficient kC is a value corresponding to the luminance conversion coefficient kY and smaller than the luminance conversion coefficient kY. As the luminance conversion coefficient kY increases / decreases, the saturation conversion coefficient kC also increases / decreases. Therefore, when the luminance is converted, the saturation is also converted at a level smaller than the luminance conversion. It is possible to avoid a situation in which the saturation does not change even though the luminance is increased. In the example of FIG. 4, the brightness of the dark part of the image is greatly increased. At this time, the saturation of the dark part of the image is also raised moderately. Therefore, it is possible to avoid the situation that the color becomes light because the saturation does not change even though the image becomes bright, and the image quality can be improved.
以上に、本発明の第1の実施の形態に係る画像処理装置1について説明した。本実施の形態によれば、彩度変換係数kCとして、輝度変換係数kYに応じた値であって、輝度変換係数kYより小さい値が求められる。非線形変換では、これら輝度変換係数kYおよび彩度変換係数kCを用いて、色相を変えることなく、輝度と彩度が独立して変換される。したがって、非線形変換処理を暗い画像に対して行う場合でも、輝度変換だけでなく彩度変換も行われる。これにより、彩度が変換されないために画質が低下するといった事態を回避できる。しかも、彩度変換係数kCが輝度変換係数kYより小さい値に設定されているので、輝度の増大に伴って彩度が適度に調整される。このようにして、色相を変えることなく輝度と彩度を独立して非線形変換でき、かつ、暗い画像の非線形変換を行う場合に画質を向上できる画像処理装置を提供することができる。
The
また、本実施の形態によれば、注目画素の代表値が算出され、そして、代表値から輝度変換係数および彩度変換係数が算出される。代表値を用いることで、輝度変換係数および彩度変換係数を好適に算出できる。 Further, according to the present embodiment, the representative value of the target pixel is calculated, and the luminance conversion coefficient and the saturation conversion coefficient are calculated from the representative value. By using the representative value, it is possible to suitably calculate the luminance conversion coefficient and the saturation conversion coefficient.
また、本実施の形態では、複数の最大値特定範囲が互いにずれて設定されており、複数の最大値特定範囲の各々が注目画素を含んでいる。そして、代表値は、複数の最大値特定範囲からそれぞれ特定される複数の最大値の平均である。このようにして代表値を算出することにより、注目画素を1つずつずらしていったときに、代表値が急に変化するのを防ぐことができる。代表値がなめらかに変化するので、非線形変換係数もなめらかに変化する。したがって変換後の画像における画素値の急変化を防ぐことができ、偽着色を抑えて、画質を向上できる。 In the present embodiment, the plurality of maximum value specifying ranges are set so as to be shifted from each other, and each of the plurality of maximum value specifying ranges includes a target pixel. The representative value is an average of a plurality of maximum values respectively specified from a plurality of maximum value specifying ranges. By calculating the representative value in this way, it is possible to prevent the representative value from changing suddenly when the target pixel is shifted one by one. Since the representative value changes smoothly, the nonlinear conversion coefficient also changes smoothly. Therefore, it is possible to prevent a sudden change in the pixel value in the converted image, suppress false coloring, and improve the image quality.
次に、本発明の第2の実施の形態に係る画像処理装置について説明する。図6は、本実施の形態の画像処理装置21を示している。以下では、第1の実施の形態と共通する事項の説明を省略し、第1の実施の形態との相違点を主として説明する。
Next, an image processing apparatus according to the second embodiment of the present invention will be described. FIG. 6 shows the
図6に示されるように、本実施の形態の画像処理装置21は、第1の実施の形態の画像処理装置1の構成に加えて、最大値輝度値算出部23および彩度変換係数補正部25を有している。
As shown in FIG. 6, in addition to the configuration of the
最大値輝度値算出部23は、注目画素の信号の最大値と輝度値を算出する。最大値算出処理においては、注目画素を含む最大値選択範囲に含まれるR,G,B信号から、信号レベルが最大の信号が選択される。また、輝度値算出処理においては、注目画素を含む輝度値算出範囲のR,G,B信号が、3:6:1の比率で加算される。最大値選択範囲および輝度値算出範囲は同じでよい。また、最大値選択範囲および輝度値算出範囲の一方または両方が、前述の代表値算出範囲と同じでよい。最大値選択範囲および輝度値算出範囲は、例えば、注目画素を含む3×3画素の範囲である。
The maximum value luminance
また、3板カメラのように各々の注目画素がR,G,Bの全部の信号を持っている場合、上記の最大値選択範囲および輝度値算出範囲は用いられなくてよい。各注目画素のR,G,B信号の最大値が選択され、各注目画素のR,G,B信号から輝度値が算出される。 Further, when each pixel of interest has all the signals of R, G, and B as in the case of a three-panel camera, the above-described maximum value selection range and luminance value calculation range need not be used. The maximum value of the R, G, and B signals of each pixel of interest is selected, and the luminance value is calculated from the R, G, and B signals of each pixel of interest.
彩度変換係数補正部25は、上記最大値および輝度値と、予め設定された所定の上限信号値とから、上限彩度変換係数を算出する。彩度変換係数補正部25は、彩度変換係数算出部13で算出される彩度変換係数kCを上限彩度変換係数と比較する。そして、彩度変換係数kCに対して、上限彩度変換係数への上限クリップ処理を行う。すなわち、彩度変換係数kCが上限彩度変換係数を超える場合に、彩度変換係数kCが上限彩度変換係数に補正される。これにより、彩度変換係数kCを用いた信号レベル変換部9の非線形変換処理においても、注目画素の画素値が上限レベルにクリップされることになる。
The saturation conversion
上限彩度変換係数は、変換後の画素値が所定の上限信号値(上限レベル)を超えることのないように求められる。上限彩度変換係数kCは、最大値輝度値算出部23により得られた最大値および輝度値と、輝度変換係数算出部11により算出された輝度変換係数kYと、予め設定された所定の上限信号値とから算出される。算出処理を以下に説明する。
The upper limit saturation conversion coefficient is obtained so that the pixel value after conversion does not exceed a predetermined upper limit signal value (upper limit level). The upper limit saturation conversion coefficient kC includes the maximum value and the luminance value obtained by the maximum value luminance
仮に、最大値輝度値算出部25で求めたR,G,B信号の最大値が、R信号であったとすると、下記の式10が成り立つ必要がある。
上限信号値 ≧ Gamma(R)
≧ (0.3kY+0.7kC)×R + (kY−kC)×0.6G + (kY−kC)×0.1B
≧ kY×Y + kC×(R−Y) (式10)
If the maximum value of the R, G, and B signals obtained by the maximum luminance
Upper limit signal value ≥ Gamma (R)
≧ (0.3kY + 0.7kC) × R + (kY−kC) × 0.6G + (kY−kC) × 0.1B
≧ kY × Y + kC × (R−Y) (Formula 10)
式10を変形すると、式11が得られる。
kC ≦ (上限信号値 − kY×Y)/(R−Y) (式11)
By transforming Equation 10,
kC ≦ (Upper limit signal value−kY × Y) / (R−Y) (Formula 11)
B、G信号についても同様に、下記の式(12)が得られる。
kC ≦ (上限信号値 − kY×Y)/(B−Y)
kC ≦ (上限信号値 − kY×Y)/(G−Y) (式12)
Similarly, the following equation (12) is obtained for the B and G signals.
kC ≤ (Upper limit signal value-kY x Y) / (B-Y)
kC ≦ (Upper limit signal value − kY × Y) / (G−Y) (Formula 12)
これらの式のkCが、上限彩度係数に相当する。結局、上限彩度係数は下記のように表される。
上限彩度変換係数 = (上限信号値−kY×輝度値)/(最大値−輝度値) (式13)
KC in these equations corresponds to the upper limit saturation coefficient. After all, the upper saturation coefficient is expressed as follows.
Upper limit saturation conversion coefficient = (Upper limit signal value−kY × luminance value) / (maximum value−luminance value) (Formula 13)
この上限彩度変換係数にて彩度変換係数kCをクリップすることで、非線形変換における画素値も上限信号値にクリップされる。したがって、色相変化を起こすことなく、輝度、彩度を独立した特性で非線形変換し、変換後の信号を所望の上限信号値以下に抑えることができる。 By clipping the saturation conversion coefficient kC with the upper limit saturation conversion coefficient, the pixel value in the nonlinear conversion is also clipped to the upper limit signal value. Therefore, it is possible to perform non-linear conversion of luminance and saturation with independent characteristics without causing a hue change, and to suppress the converted signal to a desired upper limit signal value or less.
図7は、本実施の形態に係る画像処理装置21の動作を示している。ここでも、第1の実施の形態との相違点を主として説明する。図7に示すように、本実施の形態では、代表値算出部5による代表値算出(S1)に加えて、最大値輝度値算出部23により輝度値および最大値が算出される(S11、S13)。また、輝度変換係数算出部11および彩度変換係数算出部13による輝度変換係数kYおよび彩度変換係数kCの算出(S3、S5)に加えて、彩度変換係数補正部25により上限彩度変換係数が算出される(S15)。そして、彩度変換係数補正部25は、彩度変換係数kCを上限彩度変換係数と比較し、彩度変換係数kCが上限彩度変換係数以下か否かを判定する(S17)。S17の判定がYesであれば、彩度変換係数kCがそのまま使用されて、信号レベル変換処理が信号レベル変換部9により行われる(S7)。S17の判定がNoであれば、彩度変換係数kCが上限彩度変換係数にクリップされる(S19)。そして、上限彩度変換係数を用いて、信号レベル変換処理が行われる(S7)。これにより、変換後の信号を所望の上限信号値以下に抑えることができる。
FIG. 7 shows the operation of the
以上に、本発明の第2の実施の形態に係る画像処理装置21について説明した。本実施の形態によれば、注目画素の輝度値が算出される。そして、輝度値に基づいて、信号レベル変換部の処理において注目画素の画素値を所定の上限レベルにクリップするために彩度変換係数が補正される。具体的には、変換後の信号が上限レベル以下になる上限彩度変換係数が算出され、彩度変換係数が上限彩度変換係数以下にクリップされる。これにより、信号レベルを所望の上限レベル以下に抑えることができる。したがって、色相変化を起こさずに、輝度と彩度を独立の倍率で非線形変換を行って、暗い画像の変換後の画質を向上でき、かつ、変換後の信号を所望の信号最大値以下に抑えることが出来る。
The
以上に本発明の好適な実施の形態を説明した。しかし、本発明は上述の実施の形態に限定されず、当業者が本発明の範囲内で上述の実施の形態を変形可能なことはもちろんである。 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 can perform nonlinear conversion of luminance and saturation independently without changing the hue, and can improve image quality when performing nonlinear conversion of a relatively dark image. And is useful as an image processing device for an imaging device.
1 画像処理装置
3 画像信号入力部
5 代表値算出部
7 変換係数算出部
9 信号レベル変換部
11 輝度変換係数算出部
13 彩度変換係数算出部
DESCRIPTION OF
Claims (6)
前記画像信号における処理対象の画素である各々の注目画素の非線形変換処理に使用する輝度変換係数および彩度変換係数を算出する変換係数算出部と、
前記輝度変換係数および前記彩度変換係数を基に前記注目画素の画素信号を非線形変換し、前記画像信号の色相を変えずに前記輝度変換係数および前記彩度変換係数に応じて輝度および彩度をそれぞれ変化させる信号レベル変換部とを備え、
前記変換係数算出部は、前記彩度変換係数として、前記輝度変換係数に応じた値であって、前記輝度変換係数より小さい値を求めるように構成されていることを特徴とする画像処理装置。 An image signal input unit for inputting an image signal;
A conversion coefficient calculation unit that calculates a luminance conversion coefficient and a saturation conversion coefficient used for nonlinear conversion processing of each target pixel that is a pixel to be processed in the image signal;
The pixel signal of the target pixel is nonlinearly converted based on the luminance conversion coefficient and the saturation conversion coefficient, and the luminance and the saturation are changed according to the luminance conversion coefficient and the saturation conversion coefficient without changing the hue of the image signal. And a signal level conversion unit for changing
The image processing apparatus, wherein the conversion coefficient calculation unit is configured to obtain a value corresponding to the luminance conversion coefficient that is smaller than the luminance conversion coefficient as the saturation conversion coefficient.
前記変換係数算出部は、前記代表値から前記輝度変換係数および前記彩度変換係数を算出することを特徴とする請求項1に記載の画像処理装置。 A representative value calculating unit for calculating a representative value of the target pixel;
The image processing apparatus according to claim 1, wherein the conversion coefficient calculation unit calculates the luminance conversion coefficient and the saturation conversion coefficient from the representative value.
前記輝度値算出部により算出される輝度値に基づいて、前記信号レベル変換部の処理において前記注目画素の画素値を所定の上限レベルにクリップするために前記彩度変換係数を補正する彩度変換係数補正部と、
を備えることを特徴とする請求項1乃至3のいずれかに記載の画像処理装置。 A luminance value calculation unit for calculating a luminance value of the target pixel;
Based on the brightness value calculated by the brightness value calculation unit, the saturation conversion for correcting the saturation conversion coefficient so as to clip the pixel value of the target pixel to a predetermined upper limit level in the processing of the signal level conversion unit A coefficient correction unit;
The image processing apparatus according to claim 1, further comprising:
前記画像信号における処理対象の画素である各々の注目画素の非線形変換処理に使用する輝度変換係数および彩度変換係数を算出する変換係数算出ステップと、
前記輝度変換係数および前記彩度変換係数を基に前記注目画素の画素信号を非線形変換し、前記画像信号の色相を変えずに前記輝度変換係数および前記彩度変換係数に応じて輝度および彩度をそれぞれ変化させる信号レベル変換ステップと、
を有し、前記変換係数算出ステップは、前記彩度変換係数を、前記輝度変換係数に応じた値であって、前記輝度変換係数より小さい値とすることを特徴とする画像処理方法。 An image signal input step for inputting an image signal;
A conversion coefficient calculating step for calculating a luminance conversion coefficient and a saturation conversion coefficient used for nonlinear conversion processing of each target pixel which is a pixel to be processed in the image signal;
The pixel signal of the target pixel is nonlinearly converted based on the luminance conversion coefficient and the saturation conversion coefficient, and the luminance and the saturation are changed according to the luminance conversion coefficient and the saturation conversion coefficient without changing the hue of the image signal. A signal level conversion step for changing
And the conversion coefficient calculation step sets the saturation conversion coefficient to a value corresponding to the luminance conversion coefficient and smaller than the luminance conversion coefficient.
前記輝度値算出ステップにて算出される輝度値に基づいて、前記信号レベル変換ステップの処理において前記注目画素の画素値を所定の上限レベルにクリップするために前記彩度変換係数を補正する彩度変換係数補正ステップと、
を有することを特徴とする請求項5に記載の画像処理方法。 A luminance value calculating step for calculating a luminance value of the target pixel;
Saturation for correcting the saturation conversion coefficient in order to clip the pixel value of the target pixel to a predetermined upper limit level in the processing of the signal level conversion step based on the luminance value calculated in the luminance value calculation step A conversion coefficient correction step;
The image processing method according to claim 5, further comprising:
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2007295619A JP2011023774A (en) | 2007-11-14 | 2007-11-14 | Image processing apparatus and method |
PCT/JP2008/002691 WO2009063586A1 (en) | 2007-11-14 | 2008-09-26 | Image processing device and method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2007295619A JP2011023774A (en) | 2007-11-14 | 2007-11-14 | Image processing apparatus and method |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2011023774A true JP2011023774A (en) | 2011-02-03 |
Family
ID=40638442
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2007295619A Pending JP2011023774A (en) | 2007-11-14 | 2007-11-14 | Image processing apparatus and method |
Country Status (2)
Country | Link |
---|---|
JP (1) | JP2011023774A (en) |
WO (1) | WO2009063586A1 (en) |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP3400506B2 (en) * | 1993-03-12 | 2003-04-28 | オリンパス光学工業株式会社 | Image processing device |
JP3509448B2 (en) * | 1996-04-12 | 2004-03-22 | ソニー株式会社 | Video camera device, video signal processing device, color video signal level compression method and gradation conversion method |
JP4844052B2 (en) * | 2005-08-30 | 2011-12-21 | ソニー株式会社 | VIDEO SIGNAL PROCESSING DEVICE, IMAGING DEVICE, VIDEO SIGNAL PROCESSING METHOD, AND PROGRAM |
-
2007
- 2007-11-14 JP JP2007295619A patent/JP2011023774A/en active Pending
-
2008
- 2008-09-26 WO PCT/JP2008/002691 patent/WO2009063586A1/en active Application Filing
Also Published As
Publication number | Publication date |
---|---|
WO2009063586A1 (en) | 2009-05-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8508625B2 (en) | Image processing apparatus | |
EP1566958A2 (en) | Image signal correction method and image signal correction apparatus | |
US8797427B2 (en) | Image processing apparatus | |
US20060245008A1 (en) | Image processing apparatus, image processing method, electronic camera, and scanner | |
JP2007094742A (en) | Image signal processor and image signal processing program | |
WO2010067488A1 (en) | Color correction device and color correction method | |
US8648937B2 (en) | Image processing apparatus, image processing method, and camera module | |
JP4404289B2 (en) | Video signal processing apparatus and method | |
JP2004328564A (en) | Color correcting apparatus, color correcting method, color correcting program, and digital camera using color correcting apparatus | |
US7206021B2 (en) | Hybrid pixel interpolating apparatus and hybrid pixel interpolating method | |
US7061528B1 (en) | Signal processing apparatus which suppresses a color signal according to luminance level | |
JP4040171B2 (en) | Signal processing device | |
US8553974B2 (en) | Method and circuit for correcting signals and image correcting method and circuit using the same | |
JP2008219289A (en) | Video correction device, video display device, imaging apparatus and video correction program | |
KR100885880B1 (en) | Device and Method of Realtime Image Processing | |
US20060092174A1 (en) | Color noise suppressing system | |
JP4305917B2 (en) | Video signal processing apparatus and television apparatus | |
JP2006148607A (en) | Image processing apparatus and image processing method | |
US7512266B2 (en) | Method and device for luminance correction | |
JP2011023774A (en) | Image processing apparatus and method | |
US20060050182A1 (en) | Method and device for adaptive color correction | |
JP2005051745A (en) | Color temperature correcting circuit | |
JP2006304149A (en) | Color adjustment method and apparatus | |
JP3992403B2 (en) | Image signal processing apparatus and image signal processing method | |
JP2008042392A (en) | Image processor and method |