Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP4128536B2 - Pixel signal processing apparatus and method - Google Patents
[go: Go Back, main page]

JP4128536B2 - Pixel signal processing apparatus and method - Google Patents

Pixel signal processing apparatus and method Download PDF

Info

Publication number
JP4128536B2
JP4128536B2 JP2004000245A JP2004000245A JP4128536B2 JP 4128536 B2 JP4128536 B2 JP 4128536B2 JP 2004000245 A JP2004000245 A JP 2004000245A JP 2004000245 A JP2004000245 A JP 2004000245A JP 4128536 B2 JP4128536 B2 JP 4128536B2
Authority
JP
Japan
Prior art keywords
value
pixel
interpolation
color component
component
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.)
Expired - Fee Related
Application number
JP2004000245A
Other languages
Japanese (ja)
Other versions
JP2005197866A (en
Inventor
正太郎 守谷
淳子 牧田
博明 杉浦
孝一 山下
俊 伊藤
徹也 久野
成浩 的場
正司 田村
偉雄 藤田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric Corp
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 Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP2004000245A priority Critical patent/JP4128536B2/en
Publication of JP2005197866A publication Critical patent/JP2005197866A/en
Application granted granted Critical
Publication of JP4128536B2 publication Critical patent/JP4128536B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/40Scaling of whole images or parts thereof, e.g. expanding or contracting
    • G06T3/4015Image demosaicing, e.g. colour filter arrays [CFA] or Bayer patterns

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Image Processing (AREA)
  • Color Television Image Signal Generators (AREA)
  • Editing Of Facsimile Originals (AREA)
  • Facsimile Image Signal Circuits (AREA)
  • Color Image Communication Systems (AREA)

Description

本発明は、画素信号処理装置及び方法に関し、特に二次元平面上に配列され、各々が複数の互いに異なる色成分のいずれかを有する複数の画素の、それぞれの色成分の値を表す画素信号の組に基づいて、一つの色成分を有する注目画素の位置における他の色成分の値を表す画素信号を補間により生成する画素信号処理装置及び方法に関する。
このような画素信号処理装置は、例えば、各々が複数の色成分(分光感度特性)、例えば赤(R)、緑(G)、青(B)のうちのいずれか一つの色成分の画素信号を出力する複数種類の光電変換素子が2次元平面上に、例えばベイヤ型に配列された撮像素子をさらに備えるもので、カラー撮像装置の一部として用いられ、撮像素子から出力された画素信号のうちの、各画素位置において欠落している色成分の値を表す画素信号を補間するために用いられる。
The present invention relates to a pixel signal processing apparatus and method, and more particularly, to a pixel signal representing a value of each color component of a plurality of pixels arranged on a two-dimensional plane, each having one of a plurality of different color components. The present invention relates to a pixel signal processing apparatus and method for generating a pixel signal representing a value of another color component at a position of a target pixel having one color component by interpolation based on the set.
Such a pixel signal processing device is, for example, a pixel signal of any one of a plurality of color components (spectral sensitivity characteristics), for example, red (R), green (G), or blue (B). A plurality of types of photoelectric conversion elements that output an image sensor further include, for example, an image sensor that is arranged in a Bayer shape on a two-dimensional plane, and is used as a part of a color image pickup device to output pixel signals output from the image sensor. Of these, it is used to interpolate a pixel signal representing the value of a missing color component at each pixel position.

従来の、赤、緑、青の3原色の色フィルタがベイヤ型に配置された撮像素子を有する撮像装置では、例えば下記の特許文献1に示されるように、解像感を高めるために、色毎の局所的な出力信号の分布に基づいて各画素の出力信号を平均値で置き換え、これによって想定される既知色幾何学図形と不足色幾何学図形の線形相似性を仮定した補間方法を用いている。   In a conventional image pickup apparatus having an image pickup element in which color filters of three primary colors of red, green, and blue are arranged in a Bayer shape, for example, as shown in Patent Document 1 below, Based on the local output signal distribution for each pixel, the output signal of each pixel is replaced with an average value, and an interpolation method that assumes the linear similarity between the known color geometric figure and the insufficient color geometric figure is assumed. ing.

特開2001−197512号公報JP 2001-197512 A

この従来の方法は、解像感を高めるために、各色成分(例えば、ベイヤ型配列におけるR、G、B成分)の変化の様子に相似の関係があると仮定している。そのため、各色成分の変化の様子に相似の関係がない領域(例えばある色と別の色との境界など)での補間結果に偽色が発生するという問題があり、また注目画素の周囲の画素の色成分値の変化の仕方によって、補間方法が適切でなくなることがあると言う問題があった。   This conventional method assumes that there is a similar relationship in the state of change of each color component (for example, R, G, B components in a Bayer array) in order to enhance the resolution. For this reason, there is a problem that false colors are generated in the interpolation result in an area where there is no similarity in the state of change of each color component (for example, a boundary between one color and another color), and pixels around the target pixel There is a problem that the interpolation method may not be appropriate depending on how the color component value changes.

本発明は、各色成分の変化の様子に相似の関係がない領域においても補間結果に偽色が発生するのを抑制することができ、また注目画素の周囲の画素の色成分値の変化の仕方に拘らず常に最適の補間方法で補間を行うことができる画素信号処理装置及び方法を提供することを目的とする。   The present invention can suppress the occurrence of false color in the interpolation result even in a region where the state of change of each color component is not similar, and how to change the color component value of pixels around the pixel of interest It is an object of the present invention to provide a pixel signal processing apparatus and method that can always perform interpolation with an optimal interpolation method regardless of the above.

この発明の画素信号処理装置は、
二次元平面上に配列され、各々が第1乃至第Nの互いに異なる色成分のいずれかを有する複数の画素の、それぞれの色成分の値を表す画素信号の組に基づいて、第J(Jは1からNのうちのいずれか一つ)の色成分を有する注目画素の位置における第K(KはJを除く1からNのうちのいずれか一つ)の色成分の値を表す画素信号を補間により生成する画素信号処理装置において、
上記補間を第1の補間方法で行って第1の補間値を生成する第1の補間手段と、
上記補間を上記第1の補間方法とは異なる第2の補間方法で行って第2の補間値を生成する第2の補間手段と、
上記第1の補間手段で得られた第1の補間値と上記第2の補間手段で得られた第2の補間値を合成し、合成された補間値を表す画素信号を出力する合成手段と
を備え
上記第1の補間手段は、
上記注目画素及び上記注目画素の近傍の第Jの色成分を有する画素の上記第Jの色成分の値を表す画素信号と、上記注目画素の近傍の第Kの色成分を有する画素の上記第Kの色成分の値を表す画素信号をもとに、上記注目画素の近傍における第Jの色成分の値と第Kの色成分の値の関係を表す回帰式の定数を計算する回帰式計算手段と、
上記回帰式計算手段で計算した定数を含む、上記第Jの色成分の値と第Kの色成分の値の関係を表す回帰式を用いた補間演算、又は注目画素の周囲の画素の色成分の値の平均を求める補間演算を行なう補間演算回路とを備え、
上記第2の補間手段は、
画素の二次元平面上の配列を互いに直交するH軸及びV軸を含む二次元座標平面上に表し、色成分値を上記二次元平面に垂直なZ軸に表す三次元直交座標系において、
上記注目画素の周辺の複数の第Jの色成分を有する画素のそれぞれの位置における、それらの画素の第Jの色成分の値の平均値と、上記注目画素の位置における該注目画素の色成分の値とで作る第1の幾何学図形と、
上記注目画素の周辺の複数の第Kの色成分を有する画素のそれぞれの位置における、それらの画素の第Kの色成分の平均値と、上記第2の補間手段で補間により求められる上記注目画素の位置における第Kの色成分の値とで作る第2の幾何学図形とが互いに相似になるように、
上記注目画素の位置における第Kの色成分の値を定め、
上記回帰式計算手段は、上記第Jの色成分の値と上記第Kの色成分の値の相関係数kをも計算し、
上記合成手段は、上記相関係数kに基づいて上記第1の補間値と上記第2の補間値の合成割合を決める
ことを特徴とする。
The pixel signal processing apparatus of the present invention is
Based on a set of pixel signals representing the values of the respective color components of a plurality of pixels arranged on a two-dimensional plane, each having any of the first to Nth different color components, the J (J Is a pixel signal representing the value of the Kth color component (K is any one of 1 to N excluding J) at the position of the pixel of interest having one (1 to N) color component. In a pixel signal processing device that generates
First interpolation means for generating a first interpolation value by performing the above interpolation by a first interpolation method;
Second interpolation means for generating a second interpolation value by performing the interpolation by a second interpolation method different from the first interpolation method;
Synthesizing means for synthesizing the first interpolation value obtained by the first interpolation means and the second interpolation value obtained by the second interpolation means, and outputting a pixel signal representing the synthesized interpolation value; equipped with a,
The first interpolation means includes:
A pixel signal representing the value of the Jth color component of the pixel of interest and a pixel having the Jth color component in the vicinity of the pixel of interest, and the pixel of the pixel having the Kth color component in the vicinity of the pixel of interest. Regression equation calculation for calculating a constant of a regression equation representing the relationship between the value of the Jth color component and the value of the Kth color component in the vicinity of the pixel of interest based on the pixel signal representing the value of the K color component Means,
Interpolation calculation using a regression equation representing the relationship between the value of the Jth color component and the value of the Kth color component, including the constants calculated by the regression equation calculation means, or the color components of pixels around the pixel of interest An interpolation calculation circuit for performing an interpolation calculation to obtain an average of the values of
The second interpolation means includes:
In a three-dimensional orthogonal coordinate system in which an array of pixels on a two-dimensional plane is represented on a two-dimensional coordinate plane including an H axis and a V axis orthogonal to each other, and a color component value is represented on a Z axis perpendicular to the two-dimensional plane.
The average value of the values of the Jth color component of the pixels at the positions of the pixels having a plurality of Jth color components around the target pixel, and the color components of the target pixel at the position of the target pixel A first geometric figure created with the value of
The average value of the Kth color components of the pixels having a plurality of Kth color components around the target pixel and the target pixel obtained by interpolation by the second interpolation means The second geometric figure created by the value of the Kth color component at the position of is similar to each other,
Determining the value of the Kth color component at the position of the target pixel;
The regression equation calculating means also calculates a correlation coefficient k between the value of the Jth color component and the value of the Kth color component,
The synthesizing means determines a synthesis ratio of the first interpolation value and the second interpolation value based on the correlation coefficient k .

本発明によれば、偽色の発生を抑えることができ、また注目画素の周囲の画素の色成分値の変化の仕方に応じて最適の補間を行うことができると言う効果がある。   According to the present invention, it is possible to suppress the occurrence of false colors, and it is possible to perform optimum interpolation according to how the color component values of pixels around the pixel of interest change.

以下、図面を参照して本発明の実施の形態を説明する。以下に説明する実施の形態は、フルカラー画像撮像装置、例えばデジタルカメラの一部として用いるのに適したものであるが、本発明はこれに限定されない。   Embodiments of the present invention will be described below with reference to the drawings. The embodiment described below is suitable for use as a part of a full-color image capturing apparatus, for example, a digital camera, but the present invention is not limited to this.

実施の形態1.
図1はこの発明の実施の形態1の画素信号処理装置を備えたデジタルカメラなどの撮像装置の構成を示すブロック図である。
レンズ1から入射した光は固体撮像素子2に結像する。固体撮像素子2内には光電変換素子が二次元状に配列されており、各光電変換素子により各画素が構成されている。
Embodiment 1 FIG.
FIG. 1 is a block diagram showing the configuration of an imaging apparatus such as a digital camera provided with the pixel signal processing apparatus according to Embodiment 1 of the present invention.
Light incident from the lens 1 forms an image on the solid-state image sensor 2. Photoelectric conversion elements are two-dimensionally arranged in the solid-state imaging device 2, and each pixel is constituted by each photoelectric conversion element.

固体撮像素子2は入射光を光電変換し入射光量に応じたアナログ電気信号を各画素毎に出力する。各光電変換素子には赤(R)、緑(G)、青(B)いずれかのカラーフィルタが貼られている。
固体撮像素子2から出力されたアナログ電気信号はA/D変換器3で二進数デジタル値を有する画素信号に変換される。
補間処理回路4はA/D変換器3から送られてくる二進数デジタル値を有する画素信号に対して補間処理を行い、補間結果を出力する。
The solid-state imaging device 2 photoelectrically converts incident light and outputs an analog electric signal corresponding to the amount of incident light for each pixel. Each photoelectric conversion element has a red (R), green (G), or blue (B) color filter attached thereto.
The analog electric signal output from the solid-state imaging device 2 is converted into a pixel signal having a binary digital value by the A / D converter 3.
The interpolation processing circuit 4 performs an interpolation process on the pixel signal having a binary digital value sent from the A / D converter 3 and outputs an interpolation result.

図2は、固体撮像素子2内に二次元状に配列された光電変換素子に貼られたカラーフィルタの配列及び固体撮像素子2によって得られる画素信号の色成分を示す図である。   FIG. 2 is a diagram illustrating an arrangement of color filters attached to photoelectric conversion elements arranged two-dimensionally in the solid-state imaging device 2 and color components of pixel signals obtained by the solid-state imaging device 2.

図2において、縦、横はそれぞれ画像の垂直方向、水平方向に相当する。カラーフィルタの配列はベイヤ型配列となっており、撮像素子2の出力においては、各画素は、R成分値のみ与えられた画素(R画素)、G成分のみ与えられた画素(G画素)、B成分のみ与えられた画素(B画素)のいずれかである。言換えると、各画素位置に対しては一つの色成分値のみが得られ、他の色の成分値は撮像素子2の出力には得られない。   In FIG. 2, the vertical and horizontal directions correspond to the vertical and horizontal directions of the image, respectively. The arrangement of the color filters is a Bayer type array, and in the output of the image sensor 2, each pixel is a pixel given only an R component value (R pixel), a pixel given only a G component (G pixel), One of the pixels (B pixel) to which only the B component is given. In other words, only one color component value is obtained for each pixel position, and the component values of other colors are not obtained from the output of the image sensor 2.

固体撮像素子2によって得られたこの信号からフルカラーの画像を得るには、図3に示されるように、R画素、G画素、B画素の各位置に他の色(不足色)の成分が存在すると仮定した場合の成分値を補間により求めなければならない。図3で、小文字は補間により得られた成分値を表し、大文字は、撮像素子の出力から直接(補間することなく)得られる成分値を表す。   In order to obtain a full-color image from this signal obtained by the solid-state imaging device 2, as shown in FIG. 3, components of other colors (insufficient colors) exist at each position of the R pixel, the G pixel, and the B pixel. Then, the component value in the case of assuming that must be obtained by interpolation. In FIG. 3, lowercase letters represent component values obtained by interpolation, and uppercase letters represent component values obtained directly (without interpolation) from the output of the image sensor.

図1の補間処理回路4は、上記のような各画素位置における不足色の成分を、既知の色成分に基づいて補間するためのものである。
図4は補間処理回路4の内部構成を示すブロック図である。
この補間処理回路4は、フレームメモリ5と、読み出し制御回路6と、座標データ計算回路7と、補間演算回路11と、補間回路12と、定数計算回路9と、条件判定回路8と、合成回路13とを有する。
The interpolation processing circuit 4 in FIG. 1 is for interpolating the insufficient color component at each pixel position as described above based on a known color component.
FIG. 4 is a block diagram showing the internal configuration of the interpolation processing circuit 4.
The interpolation processing circuit 4 includes a frame memory 5, a read control circuit 6, a coordinate data calculation circuit 7, an interpolation calculation circuit 11, an interpolation circuit 12, a constant calculation circuit 9, a condition determination circuit 8, and a synthesis circuit. 13.

A/D変換器3から補間処理回路4に送られてきた二進数デジタル値を有する画素信号5INはフレームメモリ5に蓄積される。
フレームメモリ5に蓄積された信号の一部が、読み出し制御回路6の制御により、フレームメモリ5から出力される。
出力された画素信号は座標データ計算回路7、条件判定回路8、補間演算回路11、補間回路12に供給される。
A pixel signal 5IN having a binary digital value sent from the A / D converter 3 to the interpolation processing circuit 4 is stored in the frame memory 5.
A part of the signal accumulated in the frame memory 5 is output from the frame memory 5 under the control of the read control circuit 6.
The output pixel signal is supplied to the coordinate data calculation circuit 7, the condition determination circuit 8, the interpolation calculation circuit 11, and the interpolation circuit 12.

座標データ計算回路7は、フレームメモリ5から入力された画素信号をもとに、各々の画素が持つ色成分値または、各々の画素近傍の画素が持つ色成分値から算出した値のいずれかをx座標成分及びy座標成分とする二次元座標データを計算し、出力する。   Based on the pixel signal input from the frame memory 5, the coordinate data calculation circuit 7 calculates either a color component value possessed by each pixel or a value calculated from a color component value possessed by a pixel near each pixel. Calculate and output two-dimensional coordinate data as an x-coordinate component and a y-coordinate component.

座標データ計算回路7から出力される二次元座標データは定数計算回路9に供給される。定数計算回路9はこの二次元座標データを用いた回帰分析を行うことで、回帰式y=ax+bの傾きa及びy切片b、並びに相関係数kを求め、補間演算回路11と合成回路13に出力する。   The two-dimensional coordinate data output from the coordinate data calculation circuit 7 is supplied to the constant calculation circuit 9. The constant calculation circuit 9 performs a regression analysis using the two-dimensional coordinate data to obtain the slope a and y intercept b of the regression equation y = ax + b and the correlation coefficient k, and the interpolation calculation circuit 11 and the synthesis circuit 13 Output.

上記のうち、座標データ計算回路7と定数計算回路9とで、後述のように、注目画素及び注目画素の近傍の第1の色成分(R、G又はB)の値と、注目画素の近傍の(上記第1の分光感度特性とは異なる)第2の色成分(R、G又はB)の値をもとに、上記注目画素の近傍における、上記第1の色成分の値と第2の色成分の値の関係を表す回帰式を求める回帰式計算手段が構成されている。   Among the above, in the coordinate data calculation circuit 7 and the constant calculation circuit 9, as will be described later, the target pixel and the value of the first color component (R, G or B) in the vicinity of the target pixel and the vicinity of the target pixel Based on the value of the second color component (R, G, or B) (which differs from the first spectral sensitivity characteristic), the value of the first color component and the second value in the vicinity of the target pixel Regression formula calculating means for obtaining a regression formula representing the relationship between the values of the color components is configured.

補間演算回路11は、フレームメモリ5から送られる画素信号と定数計算回路9から送られてくる定数a、bを表す信号から不足色成分の補間演算を行ない、補間結果11OUTを合成回路13に出力する。
補間演算回路11は、フレームメモリ5から入力される画素信号と、条件判定回路8からの条件判定の結果を表す信号とに基づき、さらに回帰式決定手段で計算した回帰式の定数を含む、上記第1の色成分の値と第2の色成分の関係を表す回帰式を用いた補間演算により、又は注目画素の周囲の画素の平均を求める補間演算を行なうことにより、不足色成分の補間値を求める。
条件判定回路8は後述の条件判定を行う。
補間演算回路11で求められた補間値11OUTは、第1の補間値として合成回路13に供給される。
The interpolation calculation circuit 11 performs an interpolation calculation of insufficient color components from the pixel signal sent from the frame memory 5 and the signals representing the constants a and b sent from the constant calculation circuit 9 and outputs the interpolation result 11OUT to the synthesis circuit 13. To do.
The interpolation calculation circuit 11 further includes a regression equation constant calculated by the regression equation determination means based on the pixel signal input from the frame memory 5 and the signal representing the result of the condition determination from the condition determination circuit 8. The interpolation value of the insufficient color component by performing an interpolation operation using a regression equation representing the relationship between the value of the first color component and the second color component, or by performing an interpolation operation to obtain the average of pixels around the target pixel. Ask for.
The condition determination circuit 8 performs condition determination described later.
The interpolation value 11OUT obtained by the interpolation calculation circuit 11 is supplied to the synthesis circuit 13 as the first interpolation value.

座標データ計算回路7と条件判定回路8と、定数計算回路9と、補間演算回路11とで第1の補間回路31が構成される。   The coordinate data calculation circuit 7, the condition determination circuit 8, the constant calculation circuit 9, and the interpolation calculation circuit 11 constitute a first interpolation circuit 31.

一方、補間回路12は、第1の補間回路31とは異なる方法で補間を行い、その補間の結果として求められた補間値12OUTを第2の補間値として合成回路13に供給する。   On the other hand, the interpolation circuit 12 performs interpolation by a method different from that of the first interpolation circuit 31, and supplies the interpolation value 12OUT obtained as a result of the interpolation to the synthesis circuit 13 as a second interpolation value.

合成回路13は、定数計算回路9から送られてくる値にもとづき、補間演算回路11から供給される第1の補間値11OUTと、補間回路12から供給される第2の補間値12OUTとを重み付け加算し、その結果を、合成された補間値13OUTとして出力する。この合成された補間値はフレームメモリ5に記憶され、蓄積される。   The synthesizing circuit 13 weights the first interpolation value 11OUT supplied from the interpolation calculation circuit 11 and the second interpolation value 12OUT supplied from the interpolation circuit 12 based on the value sent from the constant calculation circuit 9. The result is added, and the result is output as a combined interpolation value 13OUT. The synthesized interpolation value is stored in the frame memory 5 and accumulated.

以上のような、フレームメモリ5に蓄積された画素信号の読み出しから、合成回路13の出力13OUTのフレ−ムメモリ5への書込みという一連の動作を、全画素に対する全不足色成分の補間が終了するまで(すなわち、一枚の静止画像に相当する画素信号がフレームメモリ5に蓄積されるまで)繰り返す。その処理が終了し、フレームメモリ5に一枚の静止画像に相当する信号が蓄積されると、読み出し制御回路6の制御により、フレームメモリ5から一枚の静止画像に相当する信号5OUTが読み出され、補間処理回路4の外部へ出力される。   The series of operations from reading out pixel signals accumulated in the frame memory 5 to writing the output 13OUT of the synthesis circuit 13 into the frame memory 5 as described above is completed for interpolation of all insufficient color components for all pixels. (That is, until a pixel signal corresponding to one still image is accumulated in the frame memory 5). When the processing is completed and a signal corresponding to one still image is accumulated in the frame memory 5, a signal 5 OUT corresponding to one still image is read from the frame memory 5 under the control of the read control circuit 6. And output to the outside of the interpolation processing circuit 4.

次に、補間処理回路4で行われる不足色成分の補間方法について述べる。不足色成分の補間には、
(P1) R画素及びB画素の位置におけるG成分値を求める処理、
(P2) G画素の位置におけるR成分値及びB成分値を求める処理、
(P3) R画素の位置におけるB成分値を求める処理、及び
(P4) B画素の位置におけるR成分値を求める処理
が含まれ、例えば上に記載の順で行われる。
Next, an interpolation method for the insufficient color component performed in the interpolation processing circuit 4 will be described. For interpolation of missing color components,
(P1) Processing for obtaining G component values at the positions of the R pixel and the B pixel;
(P2) Processing for obtaining the R component value and the B component value at the position of the G pixel,
(P3) includes processing for obtaining the B component value at the position of the R pixel, and (P4) processing for obtaining the R component value at the position of the B pixel, and is performed, for example, in the order described above.

最初に、R画素及びB画素の位置におけるG成分値の補間方法について説明する。まず、R画素の位置におけるG成分値の補間について説明する。   First, a G component value interpolation method at the positions of the R pixel and the B pixel will be described. First, the interpolation of the G component value at the position of the R pixel will be described.

補間演算回路11は、以下に詳述するように2つのモードのいずれかで補間を行う。即ち、原則として回帰分析による補間を行うが、以下に述べるようにある条件が満たされた場合は、即ち後述の[条件1]乃至[条件4]のいずれかが満たされた場合は、注目画素の周囲の画素に基づく線形補間を行う。   The interpolation calculation circuit 11 performs interpolation in one of two modes as will be described in detail below. That is, in principle, interpolation is performed by regression analysis, but when a certain condition is satisfied as described below, that is, when any of [Condition 1] to [Condition 4] described later is satisfied, the target pixel Perform linear interpolation based on the surrounding pixels.

最初に補間演算回路11が回帰分析による補間を行う場合の動作を説明する。
回帰分析による補間の場合には、補間処理対象画素位置(注目画素位置)及びその周辺の画素位置における上記R成分値と上記注目画素位置の周辺の画素位置におけるG成分値を受け取り、上記R成分値を説明変数、上記G成分値を目的変数として回帰分析を施し、上記R成分値とG成分値の関係を表す回帰式(回帰線を表す)を求め、上記注目画素位置におけるR成分値に対して上記回帰式に対応する変換式を用いることにより、上記注目画素位置における上記G成分値を求める。
First, the operation when the interpolation calculation circuit 11 performs interpolation by regression analysis will be described.
In the case of interpolation by regression analysis, the R component value at the interpolation target pixel position (target pixel position) and its surrounding pixel positions and the G component value at the pixel positions around the target pixel position are received, and the R component Regression analysis is performed using the value as an explanatory variable and the G component value as an objective variable to obtain a regression equation (representing a regression line) representing the relationship between the R component value and the G component value, and the R component value at the target pixel position is calculated. On the other hand, the G component value at the target pixel position is obtained by using a conversion equation corresponding to the regression equation.

一般に、xiを説明変数とし、yiを目的変数とするM個の二次元座標(xi,yi)、(i=1〜M)に対する回帰式y=ax+bの傾きa、y切片b及び相関係数kは下記の式(1)、(2)、(3)により求められる。   In general, the slope a, y intercept b, and correlation coefficient of regression equation y = ax + b with respect to M two-dimensional coordinates (xi, yi), (i = 1 to M), where xi is an explanatory variable and yi is an objective variable k is obtained by the following formulas (1), (2), and (3).

Figure 0004128536
Figure 0004128536

定数計算回路9では、補間演算回路11で使用する回帰式の傾きa及びy切片b、並びに及び回帰線の相関係数kを計算する。
相関係数kは、説明変数及び目的変数として用いられたX座標値とY座標値の相関の強さ、言換えると、求めた回帰式の、回帰式を計算するために使用した二次元座標データに対する妥当性を定量的に示す値である。相関係数kの絶対値は0から1の間の値をとり、回帰式を計算するために使用した二次元座標データ全てが求めた回帰式で表される回帰線上にのるとき、相関係数kの絶対値は1となり、相関係数kの絶対値が0に近づくほど、回帰式を求めるために利用した二次元座標データが、求めた回帰式で表される回帰線からずれたところにあることを意味する。すなわち、相関係数kの絶対値が1に近いほど、求めた回帰式の妥当性が高いことを意味する。
The constant calculation circuit 9 calculates the slope a and y intercept b of the regression equation used in the interpolation calculation circuit 11 and the correlation coefficient k of the regression line.
The correlation coefficient k is the strength of the correlation between the X coordinate value and the Y coordinate value used as the explanatory variable and the objective variable, in other words, the two-dimensional coordinate used to calculate the regression equation of the calculated regression equation. It is a value that quantitatively indicates the validity of the data. The absolute value of the correlation coefficient k takes a value between 0 and 1, and when the two-dimensional coordinate data used to calculate the regression equation all fall on the regression line represented by the obtained regression equation, the correlation The absolute value of the number k is 1, and the closer the absolute value of the correlation coefficient k is to 0, the two-dimensional coordinate data used to obtain the regression equation deviates from the regression line represented by the obtained regression equation. Means that That is, the closer the absolute value of the correlation coefficient k is to 1, the higher the validity of the calculated regression equation.

式(1)、(2)、(3)の計算に必要な説明変数xi、目的変数yiとしては、座標データ計算回路7で計算される二次元座標データが使われる。   Two-dimensional coordinate data calculated by the coordinate data calculation circuit 7 is used as the explanatory variable xi and the objective variable yi necessary for the calculations of the expressions (1), (2), and (3).

ここで、式(1)、(2)、(3)には除算が入っている。除算は除数が0に近い値をとる場合は、精度が低くなる。従って、式(1)、(2)、(3)における除数が0に近い値をとる場合に回帰式を利用した補間を行うと誤差が増加する。
式(1)、(2)の除数が0に近い値をとるのは、すべてのxiがある値xoに近い値をとる場合である。
また、式(3)の除数が0に近い値をとるのは、すべてのxiがある値xoに近い値をとる場合か、すべてのyiがある値yoに近い値をとる場合である。
従って、座標データ計算回路7から出力される二次元座標データ(xi,yi)、(i=1〜M)について、すべてのxiがある値xoに近い値である場合か、すべてのyiがある値yoに近い値である場合は、式(1)、(2)、(3)の演算を必要としない処理を行うことで、誤差の増加を防ぐことができる。
Here, the expressions (1), (2), and (3) include division. Division is less accurate when the divisor takes a value close to zero. Therefore, when the divisor in the equations (1), (2), and (3) takes a value close to 0, an error increases if interpolation using a regression equation is performed.
The divisors of equations (1) and (2) take values close to 0 when all xi take values close to a certain value xo.
In addition, the divisor in equation (3) takes a value close to 0 when all xi take a value close to a certain value xo or when all yi take a value close to a certain value yo.
Accordingly, for the two-dimensional coordinate data (xi, yi) and (i = 1 to M) output from the coordinate data calculation circuit 7, all xi are close to a certain value xo or all yi are present. When the value is close to the value yo, an increase in error can be prevented by performing processing that does not require the operations of the equations (1), (2), and (3).

なお、すべてのxiがある値xoに近い値であるかは、xiの最大値と最小値の差がある閾値より小さいかどうかで判断できる。同様に、すべてのyiがある値yoに近い値であるかは、yiの最大値と最小値の差がある閾値より小さいかどうかで判断できる。   Whether all xi are close to a certain value xo can be determined by whether or not the difference between the maximum value and the minimum value of xi is smaller than a certain threshold value. Similarly, whether all yi are close to a certain value yo can be determined by whether or not the difference between the maximum value and the minimum value of yi is smaller than a certain threshold value.

また、すべてのyiが同じ値をとる場合は、式(3)の除数が0になるので、式(3)の計算を行うことができない。
さらに、すべてのxiが同じ値をとる場合は、式(1)、(2)、(3)の除数が0になるので式(1)、(2)、(3)の計算を行うことができない。
従って、すべてのxi又はすべてのyiが同じ値となる場合は、式(1)、(2)、(3)の演算を必要としない処理を行うことで、演算不可能な事態を回避することができる。
If all yi have the same value, the divisor of equation (3) becomes 0, so the calculation of equation (3) cannot be performed.
Further, when all xi have the same value, the divisors of the equations (1), (2), and (3) are 0, so that the equations (1), (2), and (3) can be calculated. Can not.
Therefore, when all xi or all yi have the same value, avoiding the situation where computation is impossible by performing processing that does not require the computations of formulas (1), (2), and (3). Can do.

そこで、条件判定回路8は、座標データ計算回路7から出力される二次元座標データ(xi,yi)、(i=1〜M)について以下の条件1ないし4のいずれかが満たされるどうかの判定を行い、判定結果に応じて補間演算回路11及び定数計算回路9を制御する。即ち、以下の条件1ないし4のいずれかに該当する場合は、定数計算回路9が式(1)、(2)、(3)の計算を行わないように制御するとともに、補間演算回路11が定数計算回路9からの出力によることなく、フレームメモリ5からの出力に基づいて、注目画素の周囲の画素に基づく線形補間演算を行うように制御する。   Therefore, the condition determination circuit 8 determines whether any of the following conditions 1 to 4 is satisfied for the two-dimensional coordinate data (xi, yi) and (i = 1 to M) output from the coordinate data calculation circuit 7. And the interpolation calculation circuit 11 and the constant calculation circuit 9 are controlled according to the determination result. That is, when any of the following conditions 1 to 4 is satisfied, the constant calculation circuit 9 is controlled so as not to calculate the expressions (1), (2), and (3), and the interpolation calculation circuit 11 is Control is performed so that linear interpolation based on pixels around the target pixel is performed based on the output from the frame memory 5 without using the output from the constant calculation circuit 9.

[条件1] すべてのxiが同じ値xoである。
[条件2] すべてのyiが同じ値yoである。
[条件3] xiの最大値と最小値の差がある閾値未満である。
[条件4] yiの最大値と最小値の差がある閾値未満である。
[Condition 1] All xi are the same value xo.
[Condition 2] All yi are the same value yo.
[Condition 3] The difference between the maximum value and the minimum value of xi is less than a certain threshold.
[Condition 4] The difference between the maximum value and the minimum value of yi is less than a certain threshold.

[条件1]、[条件3]が満たされる場合は、二次元座標データ(xi,yi)、(i=1〜M)は、x=xoという直線で近似できる。
[条件2]、[条件4]が満たされる場合は二次元座標データ(xi,yi)、(i=1〜M)は、y=yoという直線で近似できる。
When [Condition 1] and [Condition 3] are satisfied, the two-dimensional coordinate data (xi, yi) and (i = 1 to M) can be approximated by a straight line x = xo.
When [Condition 2] and [Condition 4] are satisfied, the two-dimensional coordinate data (xi, yi) and (i = 1 to M) can be approximated by a straight line y = yo.

よって、[条件1]、[条件2]、[条件3]、[条件4]のいずれの場合も二次元座標データ(xi,yi)、(i=1〜M)は直線で精度よく近似できるので、相関係数は1としても差し支えない。
従って、定数計算回路9は、上記のような条件判定回路8の出力にしたがって、相関係数の値として1を出力し、また、回帰式の傾きa、y切片bの計算は行わない。条件判定回路8はまた、補間演算回路11に対し、回帰式を用いた補間の代わりに線形補間を行うように指示する。
Therefore, in any of [Condition 1], [Condition 2], [Condition 3], and [Condition 4], the two-dimensional coordinate data (xi, yi), (i = 1 to M) can be approximated by a straight line with high accuracy. Therefore, the correlation coefficient may be set to 1.
Accordingly, the constant calculation circuit 9 outputs 1 as the value of the correlation coefficient in accordance with the output of the condition determination circuit 8 as described above, and does not calculate the slopes a and y intercepts b of the regression equation. The condition determination circuit 8 also instructs the interpolation calculation circuit 11 to perform linear interpolation instead of interpolation using a regression equation.

以上のことを踏まえ、座標データ計算回路7、条件判定回路8、定数計算回路9、補間演算回路11の動作についてより詳細に説明する。   Based on the above, the operations of the coordinate data calculation circuit 7, the condition determination circuit 8, the constant calculation circuit 9, and the interpolation calculation circuit 11 will be described in more detail.

図5には、本実施の形態において、R画素の位置におけるG成分値を補間するために、フレームメモリ5から読み出される画素信号の画素位置が模式的に示されている。   FIG. 5 schematically shows the pixel position of the pixel signal read from the frame memory 5 in order to interpolate the G component value at the position of the R pixel in the present embodiment.

図示のように、読み出し制御回路6により、フレームメモリ5から座標データ計算回路7、補間演算回路11、補間回路12に対し、注目画素R44のR成分値R44及び注目画素R44の近傍の注目画素と同じ色の画素R24、R42、R46、R64のR成分値R24、R42、R46、R64、並びに注目画素R44近傍の、不足色(注目画素位置の補間により求めようとする色成分)のG画素G14、G23、G25、G32、G34、G36、G41、G43、G45、G47、G52、G54、G56、G63、G65、G74のG成分値G14、G23、G25、G32、G34、G36、G41、G43、G45、G47、G52、G54、G56、G63、G65、G74が出力される。
なお、上記のように、ある色成分を持つ画素とその画素の色成分値を同じ符号で表すことがある。
As shown in the figure, the read control circuit 6 sends the R component value R44 of the target pixel R44 and the target pixel near the target pixel R44 to the coordinate data calculation circuit 7, the interpolation calculation circuit 11, and the interpolation circuit 12 from the frame memory 5. G pixel G14 of an insufficient color (color component to be obtained by interpolation of the target pixel position) in the vicinity of the R component values R24, R42, R46, R64 of the pixels R24, R42, R46, R64 of the same color and the target pixel R44. , G23, G25, G32, G34, G36, G41, G43, G45, G47, G52, G54, G56, G63, G65, G74 G component values G14, G23, G25, G32, G34, G36, G41, G43, G45, G47, G52, G54, G56, G63, G65, and G74 are output.
Note that, as described above, a pixel having a certain color component and the color component value of the pixel may be represented by the same symbol.

これらの成分値を受けた座標データ計算回路7において、回帰式を求めるためのデータとして、各画素位置に対して、R成分値とG成分値を求め、それぞれをX座標値、Y座標値とし、それらを対にして二次元座標データを構成する。
例えば、下記の式に示すように、R画素R24のR成分値R24をX座標値x1とし、その周囲に位置するG画素のG成分値G14、G23、G25、G34の平均値を、R画素R24の位置に対応するY座標値y1とする二次元座標データ(x1,y1)を構成する。
おなじく下記の式で示すように、R画素R42のR成分値R42をX座標値x2とし、その周囲に位置するG画素のG成分値G32、G41、G43、G52の平均値をY座標値とする二次元座標データ(x2,y2)と、R画素R44のR成分値R44をX座標値x3とし、その周囲に位置するG画素のG成分値G34、G43、G45、G54の平均値をY座標値y3とする二次元座標データ(x3,y3)と、R画素R46のR成分値R46をX座標値x4とし、その周囲に位置するG画素のG成分値G36、G45、G47、G56の平均値をY座標値y4とする二次元座標データ(x4,y4)と、R画素R64のR成分値R64をX座標値x5とし、その周囲に位置するG画素とG成分値G54、G63、G65、G74の平均値をY座標値y5とする二次元座標データ(x5,y5)が定められる。
In the coordinate data calculation circuit 7 that has received these component values, R component values and G component values are obtained for each pixel position as data for obtaining a regression equation, and these are set as X coordinate values and Y coordinate values, respectively. These are paired to form two-dimensional coordinate data.
For example, as shown in the following equation, the R component value R24 of the R pixel R24 is set to the X coordinate value x1, and the average value of the G component values G14, G23, G25, and G34 of the G pixel located around the R pixel R24 is calculated as the R pixel. Two-dimensional coordinate data (x1, y1) having a Y coordinate value y1 corresponding to the position of R24 is configured.
Similarly, as shown by the following equation, the R component value R42 of the R pixel R42 is set as the X coordinate value x2, and the average value of the G component values G32, G41, G43, and G52 of the G pixel positioned around the R pixel R42 is set as the Y coordinate value. The two-dimensional coordinate data (x2, y2) to be performed and the R component value R44 of the R pixel R44 are set to the X coordinate value x3, and the average value of the G component values G34, G43, G45, and G54 of the G pixel located around the Y coordinate is Y The two-dimensional coordinate data (x3, y3) as the coordinate value y3 and the R component value R46 of the R pixel R46 are set as the X coordinate value x4, and the G component values G36, G45, G47, and G56 of the G pixel located in the vicinity thereof Two-dimensional coordinate data (x4, y4) having an average value as a Y-coordinate value y4, an R component value R64 of the R pixel R64 as an X coordinate value x5, and a G pixel and G component values G54, G63, Average of G65 and G74 A two-dimensional coordinate data and Y coordinate value y5 (x5, y5) is determined.

x1=R24
y1=(G14+G23+G25+G34)/4
x2=R42
y2=(G32+G41+G43+G52)/4
x3=R44
y3=(G34+G43+G45+G54)/4
x4=R46
y4=(G36+G45+G47+G56)/4
x5=R64
y5=(G54+G63+G65+G74)/4
x1 = R24
y1 = (G14 + G23 + G25 + G34) / 4
x2 = R42
y2 = (G32 + G41 + G43 + G52) / 4
x3 = R44
y3 = (G34 + G43 + G45 + G54) / 4
x4 = R46
y4 = (G36 + G45 + G47 + G56) / 4
x5 = R64
y5 = (G54 + G63 + G65 + G74) / 4

上記の式から分るように、上記の例では、X座標値xiとしては、撮像素子2から得られた各画素位置のR成分(既知色成分)の値(画素値)がそのまま用いられ、Y座標値yiとしては、各画素位置の周囲、例えば上方、左方、右方、下方に位置し隣接する画素のG成分(不足色成分)の平均が求められる。このように平均を求める処理はローパスフィルタリングの一種と見ることができる。   As can be seen from the above formula, in the above example, as the X coordinate value xi, the value (pixel value) of the R component (known color component) at each pixel position obtained from the image sensor 2 is used as it is. As the Y coordinate value yi, an average of G components (insufficient color components) of adjacent pixels located around each pixel position, for example, upper, left, right, and lower, is obtained. The process for obtaining the average can be regarded as a kind of low-pass filtering.

上記のように求められた二次元座標データ(xi,yi)、(i=1〜5)は、条件判定回路8及び定数計算回路9に出力される。   The two-dimensional coordinate data (xi, yi) and (i = 1 to 5) obtained as described above are output to the condition determination circuit 8 and the constant calculation circuit 9.

条件判定回路8は、座標データ計算回路7から出力された二次元座標データ(xi、yi)、(i=1〜5)について上記の[条件1]、[条件2]、[条件3]、[条件4]のいずれかが満たされるかどうかの判定を行う。
[条件1]、[条件2]、[条件3]、[条件4]のいずれかが満たされなかった場合には、定数計算回路9、補間演算回路11は、以下の処理を行う。
The condition determination circuit 8 performs the above [Condition 1], [Condition 2], [Condition 3] for the two-dimensional coordinate data (xi, yi) and (i = 1 to 5) output from the coordinate data calculation circuit 7. It is determined whether or not any of [Condition 4] is satisfied.
When any one of [Condition 1], [Condition 2], [Condition 3], and [Condition 4] is not satisfied, the constant calculation circuit 9 and the interpolation calculation circuit 11 perform the following processing.

まず定数計算回路9で、座標データ計算回路7から送られてくる二次元の座標データ(xi、yi)、(i=1〜5)を使い、式(1)、(2)、(3)に従って、回帰式の傾きa、y切片b、及び相関係数kを計算する。そして補間演算回路11に回帰式で表される回帰線の傾きa、y切片bの値を出力し、合成回路13に相関係数kの値を出力する。   First, the constant calculation circuit 9 uses the two-dimensional coordinate data (xi, yi) and (i = 1 to 5) sent from the coordinate data calculation circuit 7, and the equations (1), (2), (3) , The slope a, y intercept b, and correlation coefficient k of the regression equation are calculated. Then, the values of the slopes a and y intercepts b of the regression line expressed by the regression equation are output to the interpolation calculation circuit 11, and the value of the correlation coefficient k is output to the synthesis circuit 13.

補間演算回路11は、注目画素R44の位置におけるG成分値11OUTを、フレームメモリ5から送られてくる注目画素R44のR成分値R44と、定数計算回路9から送られてくる回帰線の傾きaとy切片bを用いた下記の式によって計算し、出力する。   The interpolation calculation circuit 11 uses the G component value 11OUT at the position of the target pixel R44, the R component value R44 of the target pixel R44 sent from the frame memory 5, and the slope a of the regression line sent from the constant calculation circuit 9. And the following equation using y-intercept b and output.

11OUT=a×R44+b   11OUT = a × R44 + b

座標データ計算回路7から出力される二次元座標データ(xi、yi)、(i=1〜5)について上記の[条件1]、[条件2]、[条件3]、[条件4]のいずれかが満たされると条件判定回路8が判定した場合は、定数計算回路9、補間演算回路11は以下の処理を行う。   Any of the above [Condition 1], [Condition 2], [Condition 3], and [Condition 4] for the two-dimensional coordinate data (xi, yi) and (i = 1 to 5) output from the coordinate data calculation circuit 7 If the condition determination circuit 8 determines that the above is satisfied, the constant calculation circuit 9 and the interpolation calculation circuit 11 perform the following processing.

即ち、定数計算回路9は相関係数の値として「1」を合成回路13に出力する。また補間演算回路11に対して、回帰式を使用しない補間処理、具体的には線形補間を行うよう指示を出す。   That is, the constant calculation circuit 9 outputs “1” as the value of the correlation coefficient to the synthesis circuit 13. Further, it instructs the interpolation calculation circuit 11 to perform interpolation processing that does not use a regression equation, specifically, linear interpolation.

この場合、補間演算回路11は、注目画素R44の位置におけるG成分値11OUTを、フレームメモリ5から送られてくる信号のうち、以下のような注目画素の近傍、例えば上方、左方、右方、下方に位置し隣接するG画素G34、G43、G45、G54におけるG成分値G34、G43、G45、G54を用いた下記の式による線形補間で計算し出力する。   In this case, the interpolation calculation circuit 11 uses the G component value 11OUT at the position of the target pixel R44 in the vicinity of the target pixel as described below among the signals sent from the frame memory 5, for example, upper, left, right The G component values G34, G43, G45, and G54 in the adjacent G pixels G34, G43, G45, and G54 located below are calculated and output by linear interpolation using the following equations.

11OUT=(G34+G43+G45+G54)/4   11OUT = (G34 + G43 + G45 + G54) / 4

一方、補間回路12は、注目画素R44の位置におけるG成分値12OUTを、フレームメモリ5から送られてくる信号のうち、注目画素R44の周囲の(例えば上方、左方、右方、下方に位置し隣接する)G画素G34、G43、G45、G54のG成分値G34、G43、G45、G54、並びに注目画素R44、及びその周囲の、例えば上方、左方、右方、下方に位置し他の一つの画素のみにより隔てられている(なお、このように「他の一つの画素のみにみより隔てられる」ことを「画素間距離が2画素である」と言うこともあり、「2画素分離れている」と言うこともある。異なる画素間距離の場合についても同様である。)R画素R24、R42、R64、R46のR成分値R44、R24、R42、R64、R46を用いた下記の式で計算し、出力する。   On the other hand, the interpolation circuit 12 sets the G component value 12OUT at the position of the target pixel R44 to positions around the target pixel R44 (for example, the upper, left, right, and lower positions) of the signal sent from the frame memory 5. And adjacent) G component values G34, G43, G45, G54 of the G pixels G34, G43, G45, G54, and the target pixel R44 and the surroundings, for example, above, to the left, to the right, and to the other Separated by only one pixel (in this way, “separated by only one other pixel” is sometimes referred to as “the distance between pixels is two pixels”, “ The same applies to the case of different pixel distances.) The lower values using R component values R44, R24, R42, R64, and R46 of R pixels R24, R42, R64, and R46. The calculated formula, and outputs.

Figure 0004128536
Figure 0004128536

図6は補間回路12により補間される、注目画素R44の位置におけるG成分値12OUTの定め方を説明する図である。図においてH−V平面は固体撮像素子2の撮像面に対応し、Z軸は各画素の各成分値を表す。R1、R2、R3、R4は画素R42、R64、R46、R24のR成分値を、それらの平均値で置き換えた点であり、R0は画素R44のR成分値R44を表した点である。
G1、G2、G3、G4は画素G43、G54、G45、G34のそれぞれの位置における、それぞれのG成分値を、それらの平均値で置き換えた点であり、G0は画素R44上に補間により求められるG成分値12OUTを表した点である。
FIG. 6 is a diagram for explaining how to determine the G component value 12OUT at the position of the target pixel R44 to be interpolated by the interpolation circuit 12. In the figure, the HV plane corresponds to the imaging surface of the solid-state imaging device 2, and the Z axis represents each component value of each pixel. R1, R2, R3, and R4 are points where the R component values of the pixels R42, R64, R46, and R24 are replaced with their average values, and R0 is a point that represents the R component value R44 of the pixel R44.
G1, G2, G3, and G4 are points where the respective G component values at the respective positions of the pixels G43, G54, G45, and G34 are replaced with their average values, and G0 is obtained by interpolation on the pixel R44. This is a point representing the G component value 12OUT.

上記の計算は、各色成分の変化の様子に相似の関係があることを仮定してなされるものであり、具体的には、四角錘R0R1R2R3R4と四角錘G0G1G2G3G4が相似になるように、12OUTの値を定めるものである。すなわち、注目画素R44における既知色成分Rに関して、注目画素R44のR成分値と注目画素R44の近傍のR成分を有する画素のR成分値の平均値でつくる既知色成分多面体(幾何学図形)と、注目画素R44上に補間される不足色成分Gに関して、補間により求められる値12OUTと注目画素R44の近傍のG成分(不足色成分)を有する画素のG成分値の平均値でつくる不足色成分多面体(幾何学図形)が相似になるように12OUTが定められる。   The above calculation is performed on the assumption that there is a similar relationship in the state of change of each color component. Specifically, the value of 12OUT is set so that the square weights R0R1R2R3R4 and the square weights G0G1G2G3G4 are similar. It stipulates. That is, with respect to the known color component R in the target pixel R44, a known color component polyhedron (geometrical figure) created by the average value of the R component value of the target pixel R44 and the R component value of the pixel having the R component in the vicinity of the target pixel R44; As for the insufficient color component G to be interpolated on the target pixel R44, the insufficient color component generated by the average value of the G component values of the pixel having the value 12OUT obtained by interpolation and the G component (insufficient color component) in the vicinity of the target pixel R44. 12OUT is determined so that the polyhedron (geometric figure) is similar.

言換えれば、注目画素R44の周辺の複数のR成分を有する画素(R42、R64、R46、R24)のR成分の値の平均値と、注目画素R44の位置におけるR成分の値との差と、上記平均値の計算に用いられた複数の画素(R42、R64、R46、R24)及び注目画素(R44)相互間の二次元平面上における距離との比と、注目画素R44の周辺の複数のG成分を有する画素(G43、G54、G45、G34)のG成分の値の平均値と、補間により求められる注目画素R44の位置におけるG成分の値G0=12OUTとの差と、上記平均値の計算に用いられた複数の画素(G43、G54、G45、G34)及び上記注目画素(R44)相互間の二次元平面上における距離との比が互いに同じになるように、注目画素の位置におけるG成分の値12OUTが定められる。   In other words, the difference between the average value of the R component values of the pixels (R42, R64, R46, R24) having a plurality of R components around the target pixel R44 and the R component value at the position of the target pixel R44; The ratio of the distance between the plurality of pixels (R42, R64, R46, R24) and the target pixel (R44) used for the calculation of the average value on the two-dimensional plane and the plurality of pixels around the target pixel R44. The difference between the average value of the G component values of the pixels having the G component (G43, G54, G45, G34) and the G component value G0 = 12OUT at the position of the target pixel R44 obtained by interpolation, and the average value The position of the target pixel is such that the ratio between the plurality of pixels (G43, G54, G45, G34) used for the calculation and the distance between the target pixel (R44) on the two-dimensional plane is the same. Value 12OUT of kicking the G component is determined.

合成回路13では、定数計算回路9で計算された相関係数kの絶対値に応じて、補間演算回路11から供給された補間値11OUTと補間回路12から供給された補間値12OUTを重み付け加算により合成し、合成された補間値13OUTを出力する。この重み付け加算は、相関係数kの絶対値が「1」に近ければ、12OUTより11OUTの占める割合が大きくなるように行われ、相関係数kの絶対値が「0」に近ければ、11OUTより12OUTの占める割合が大きくなるように行われる。   In the synthesis circuit 13, the interpolation value 11OUT supplied from the interpolation calculation circuit 11 and the interpolation value 12OUT supplied from the interpolation circuit 12 are weighted and added according to the absolute value of the correlation coefficient k calculated by the constant calculation circuit 9. The synthesized interpolation value 13OUT is output. This weighted addition is performed so that the proportion occupied by 11OUT is larger than 12OUT if the absolute value of the correlation coefficient k is close to “1”, and 11OUT if the absolute value of the correlation coefficient k is close to “0”. Further, the ratio of 12OUT is increased.

以上のようにして計算された補間値13OUTが、注目画素R44の位置における、合成されたG成分値としてフレームメモリ5に書き込まれる。   The interpolation value 13OUT calculated as described above is written in the frame memory 5 as a synthesized G component value at the position of the target pixel R44.

以上の補間処理がすべてのR画素の位置におけるG成分値に対して行われる。   The above interpolation processing is performed on the G component values at the positions of all R pixels.

以上はR画素の位置におけるG成分値を補間する方法であるが、B画素の位置におけるG成分値の補間もRとBが入れ替わる以外は同様に行われる。   The above is a method of interpolating the G component value at the position of the R pixel, but the interpolation of the G component value at the position of the B pixel is similarly performed except that R and B are interchanged.

次に、G画素の位置におけるR成分値及びB成分値の補間方法について説明する。G画素を中心にした場合、R、G、B各画素の配置は図7に見られるように、注目画素が奇数行にある場合(a)、偶数行にある場合(b)とで異なる。まず、奇数行におけるG画素の位置におけるR成分値及びB成分値の補間を説明する。   Next, an interpolation method for the R component value and the B component value at the position of the G pixel will be described. When the G pixel is centered, the arrangement of each of the R, G, and B pixels is different depending on whether the pixel of interest is in the odd row (a) or the even row (b), as shown in FIG. First, the interpolation of the R component value and the B component value at the position of the G pixel in the odd row will be described.

図8は奇数行におけるG画素の位置におけるR成分値及びB成分値を補間するために、フレームメモリ5から読み出される信号を示している。   FIG. 8 shows a signal read from the frame memory 5 in order to interpolate the R component value and the B component value at the position of the G pixel in the odd row.

最初に、奇数行のG画素の位置におけるR成分値の補間方法について説明する。図8に示すように、注目画素であるG画素を中心として、R成分を有する画素は横方向(左右方向)に位置しており、縦方向(上下方向)には存在しない。   First, an interpolation method of R component values at the positions of odd-numbered G pixels will be described. As shown in FIG. 8, the pixel having the R component centered on the target pixel G pixel is located in the horizontal direction (left-right direction) and does not exist in the vertical direction (up-down direction).

まず、注目画素G44のG成分値G44及び注目画素G44の周囲の、例えば左方及び右方に位置し、2画素分離れたG画素G42、G46のG成分値G42、G46及び注目画素G44の周囲の、例えば左方に位置し3画素分離れたR画素R41、左方に位置し隣接するR画素R43、右方に位置し隣接するR画素R45、右方に位置し3画素分離れたR画素R47のR成分値R41、R43、R45、R47が、読み出し制御回路6により、フレームメモリ5から読み出され、座標データ計算回路7、補間演算回路11、補間回路12に供給される。   First, the G component value G44 of the target pixel G44 and the G component values G42 and G46 of the G pixel G42 and G46 which are located around the target pixel G44, for example, on the left and right sides and separated by two pixels, and the target pixel G44. Surrounding, for example, an R pixel R41 that is located on the left and separated by 3 pixels, an R pixel R43 that is located on the left and adjacent, an R pixel R45 that is located on the right and adjacent, and a pixel located on the right and separated by 3 pixels The R component values R41, R43, R45, and R47 of the R pixel R47 are read from the frame memory 5 by the read control circuit 6 and supplied to the coordinate data calculation circuit 7, the interpolation calculation circuit 11, and the interpolation circuit 12.

座標データ計算回路7では、G成分値G42とR成分値R41、R43の平均値で作る二次元座標データ(x1,y1)と、G成分値G44とR成分値R43、R45の平均値で作る二次元座標データ(x2,y2)と、G成分値G46とR成分値R45、R47の平均値で作る二次元座標データ(x3,y3)の3つが下記の式で計算され、定数計算回路9に出力される。   In the coordinate data calculation circuit 7, two-dimensional coordinate data (x1, y1) created by the average value of the G component value G42 and the R component values R41 and R43, and the average value of the G component value G44 and the R component values R43 and R45 are created. Three of the two-dimensional coordinate data (x2, y2) and the two-dimensional coordinate data (x3, y3) created by the average value of the G component value G46 and the R component values R45, R47 are calculated by the following formula, and the constant calculation circuit 9 Is output.

x1=G42
y1=(R41+R43)/2
x2=G44
y2=(R43+R45)/2
x3=G46
y3=(R45+R47)/2
x1 = G42
y1 = (R41 + R43) / 2
x2 = G44
y2 = (R43 + R45) / 2
x3 = G46
y3 = (R45 + R47) / 2

上記の式から分るように、X座標値xiとしては、撮像素子2から得られた各画素位置のG成分(既知色成分)の値がそのまま用いられ、Y座標値yiとしては、各画素位置の周囲、例えば左方及び右方に位置し各画素に隣接する画素のR成分(不足色成分)の平均が求められる。   As can be seen from the above formula, as the X coordinate value xi, the value of the G component (known color component) at each pixel position obtained from the image sensor 2 is used as it is, and as the Y coordinate value yi, each pixel is An average of R components (insufficient color components) of pixels located around the position, for example, on the left and right sides and adjacent to each pixel is obtained.

座標データ計算回路7から出力される二次元座標データ(xi、yi)、(i=1〜3)が上記の[条件1]、[条件2]、[条件3]、[条件4]のいずれにも該当しないと条件判定回路8が判定した場合は以下の処理を行う。   The two-dimensional coordinate data (xi, yi) and (i = 1 to 3) output from the coordinate data calculation circuit 7 are any of the above [Condition 1], [Condition 2], [Condition 3], and [Condition 4]. If the condition determination circuit 8 determines that the above does not apply, the following processing is performed.

まず、定数計算回路9は、座標データ計算回路7から送られてくる二次元座標データ(xi、yi)、(i=1〜3)を使い、式(1)、(2)、(3)の計算を行い、その結果得られた回帰線の傾きaとy切片bの値を補間演算回路11に、相関係数kの値を合成回路13に出力する。   First, the constant calculation circuit 9 uses the two-dimensional coordinate data (xi, yi), (i = 1 to 3) sent from the coordinate data calculation circuit 7, and uses the equations (1), (2), (3). The values of the slope a and y intercept b of the regression line obtained as a result are output to the interpolation calculation circuit 11 and the value of the correlation coefficient k is output to the synthesis circuit 13.

補間演算回路11では、注目画素G44上のR成分値11OUTを、フレームメモリ5から出力される信号のうち、注目画素G44のG成分値G44と、定数計算回路9から送られてくる回帰線の傾きaとy切片bを用いた下記の式で計算し、出力する。   In the interpolation calculation circuit 11, the R component value 11 OUT on the target pixel G 44 is converted into the G component value G 44 of the target pixel G 44 among the signals output from the frame memory 5 and the regression line sent from the constant calculation circuit 9. Calculate and output the following equation using the slope a and the y-intercept b.

11OUT=a×G44+b   11OUT = a × G44 + b

座標データ計算回路7から出力される二次元座標データ(xi、yi)、(i=1〜3)が上記の[条件1]、[条件2]、[条件3]、[条件4]のいずれかに該当すると条件判定回路8が判定した場合は以下の処理を行う。   The two-dimensional coordinate data (xi, yi) and (i = 1 to 3) output from the coordinate data calculation circuit 7 are any of the above [Condition 1], [Condition 2], [Condition 3], and [Condition 4]. If the condition determination circuit 8 determines that this is the case, the following processing is performed.

定数計算回路9では、合成回路13に対して相関係数kとして「1」を出力し、また補間演算回路11に対して回帰式を使用せず、線形補間を行うよう指示を出す。   The constant calculation circuit 9 outputs “1” as the correlation coefficient k to the synthesis circuit 13 and instructs the interpolation calculation circuit 11 to perform linear interpolation without using the regression equation.

補間演算回路11では、注目画素G44の位置におけるR成分値11OUTを、フレームメモリ5から送られてくる信号のうち、注目画素の近傍のR画素R43、R45のR成分値R43、R45を用いた下記の式による線形補間で計算し、出力する。   In the interpolation calculation circuit 11, the R component value 11OUT at the position of the target pixel G44 is used as the R component values R43 and R45 of the R pixels R43 and R45 in the vicinity of the target pixel among the signals sent from the frame memory 5. Calculate and output by linear interpolation using the following formula.

11OUT=(R43+R45)/2   11OUT = (R43 + R45) / 2

一方、補間回路12では、注目画素G44の位置におけるR成分値12OUTを、フレームメモリ5から送られてくる信号のうち、画素R43、R45のR成分値R43、R45及び画素G44、G42、G46のG成分値G44、G42、G46を用いた下記の式で計算し、出力する。   On the other hand, the interpolation circuit 12 uses the R component value 12OUT at the position of the target pixel G44 as the R component values R43, R45 of the pixels R43, R45 and the pixels G44, G42, G46 among the signals sent from the frame memory 5. Calculation is performed by the following equation using the G component values G44, G42, and G46, and the result is output.

Figure 0004128536
Figure 0004128536

図9は補間回路12により補間される、注目画素G44の位置におけるR成分値12OUTの定め方を説明する図である。図においてH軸は固体撮像素子2の撮像面上の水平軸に対応し、Z軸は各画素の成分値を表す。G1、G2は画素G42、G46のG成分値をG成分値G42、G46の平均値で置き換えた点であり、G0は画素G44のG成分値G44を表した点である。
R1、R2は画素R43、R45のR成分値をそれらの平均値で置き換えた点であり、R0は画素G44上に補間されるR成分値12OUTを表した点である。
FIG. 9 is a diagram for explaining how to determine the R component value 12OUT at the position of the target pixel G44 to be interpolated by the interpolation circuit 12. In the figure, the H axis corresponds to the horizontal axis on the imaging surface of the solid-state imaging device 2, and the Z axis represents the component value of each pixel. G1 and G2 are points where the G component values of the pixels G42 and G46 are replaced with average values of the G component values G42 and G46, and G0 is a point representing the G component value G44 of the pixel G44.
R1 and R2 are points where the R component values of the pixels R43 and R45 are replaced by their average values, and R0 is a point representing the R component value 12OUT to be interpolated on the pixel G44.

上記の計算は、三角形G0G1G2と三角形R0R1R2が相似になるように、R0(=12OUT)の値を定めるものである。すなわち、注目画素G44における既知色成分Gに関して、注目画素G44のG成分値と注目画素G44の近傍のG成分を有する画素のG成分値の平均値でつくる既知色成分三角形(幾何学図形)と、注目画素G44上に補間される不足色成分Rに関して、補間により求められる値12OUTと注目画素G44の近傍のR成分(不足色成分)を有する画素のR成分値の平均値でつくる不足色成分三角形(幾何学図形)が相似になるように12OUTが定められる。   The above calculation determines the value of R0 (= 12OUT) so that the triangle G0G1G2 and the triangle R0R1R2 are similar. That is, with respect to the known color component G in the target pixel G44, a known color component triangle (geometrical figure) formed by the average value of the G component value of the target pixel G44 and the G component value of the pixel having the G component in the vicinity of the target pixel G44; As for the insufficient color component R to be interpolated on the target pixel G44, the insufficient color component formed by the average value of the R component values of the pixel having the value 12OUT obtained by interpolation and the R component (insufficient color component) in the vicinity of the target pixel G44. 12OUT is determined so that triangles (geometric figures) are similar.

言換えれば、注目画素G44の周辺の複数のG成分を有する画素(G42、G46)のG成分の値の平均値と、注目画素G44の位置におけるG成分の値との差と、上記平均値の計算に用いられた複数の画素(G42、G46)及び注目画素(G44)相互間の二次元平面上における距離との比と、注目画素G44の周辺の複数のR成分を有する画素(R43、R45)のR成分の値の平均値と、補間により求められる注目画素R44上のG成分の値R0=12OUTとの差と、上記平均値の計算に用いられた複数の画素(R43、R45)及び注目画素(G44)相互間の二次元平面上における距離との比が互いに同じになるように、注目画素の位置におけるR成分の値12OUTが定められる。   In other words, the difference between the average value of the G component values of the pixels (G42, G46) having a plurality of G components around the target pixel G44 and the value of the G component at the position of the target pixel G44, and the average value The ratio of the distance between the plurality of pixels (G42, G46) and the target pixel (G44) used in the calculation of the distance on the two-dimensional plane to the pixel having the plurality of R components around the target pixel G44 (R43, The difference between the average value of the R component values of R45) and the G component value R0 = 12OUT on the target pixel R44 obtained by interpolation, and a plurality of pixels (R43, R45) used for the calculation of the average value The value 12OUT of the R component at the position of the target pixel is determined so that the ratio of the distance between the target pixel (G44) and the distance on the two-dimensional plane is the same.

合成回路13では、定数計算回路9から供給された相関係数kの絶対値に応じて、補間演算回路11から供給された補間値11OUTと、補間回路12から供給された補間値12OUTとを重み付け加算により合成して、その結果を合成された補間値13OUTとして出力する。この重み付け加算は、相関係数kの絶対値が「1」に近ければ、12OUTより11OUTの占める割合が大きくなるように行われ、相関係数kの絶対値が「0」に近ければ、11OUTより12OUTの占める割合が大きくなるように行われる。   In the synthesis circuit 13, the interpolation value 11 OUT supplied from the interpolation calculation circuit 11 and the interpolation value 12 OUT supplied from the interpolation circuit 12 are weighted according to the absolute value of the correlation coefficient k supplied from the constant calculation circuit 9. The result is synthesized by addition, and the result is output as a synthesized interpolation value 13OUT. This weighted addition is performed so that the proportion occupied by 11OUT is larger than 12OUT if the absolute value of the correlation coefficient k is close to “1”, and 11OUT if the absolute value of the correlation coefficient k is close to “0”. Further, the ratio of 12OUT is increased.

以上のようにして求められた補間値13OUTが、注目画素の位置における、R成分値を表す補間値としてフレームメモリ5に書き込まれる。   The interpolation value 13OUT obtained as described above is written in the frame memory 5 as an interpolation value representing the R component value at the position of the target pixel.

以上の補間処理がすべての奇数行におけるG画素の位置におけるR成分値に対して行われる。   The above interpolation processing is performed on the R component values at the G pixel positions in all odd rows.

次に、奇数行におけるG画素の位置におけるB成分値の補間方法について説明する。図8に示すように、注目画素であるG画素を中心として、B成分を有する画素は縦方向(上下方向)に位置しており、横方向(左右方向)には存在しない。   Next, a method for interpolating the B component value at the position of the G pixel in the odd row will be described. As shown in FIG. 8, the pixel having the B component centered on the G pixel that is the target pixel is positioned in the vertical direction (vertical direction) and does not exist in the horizontal direction (horizontal direction).

まず、読み出し制御回路6により、フレームメモリ5から座標データ計算回路7、補間演算回路11、補間回路12に対し、注目画素G44のG成分値G44及び注目画素G44の周囲の、例えば上方及び下方に位置し、2画素分離れたG画素G24、G64のG成分値G24、G64及び注目画素G44の周囲の、例えば上方に位置し3画素分離れたB画素B14、上方に位置し隣接するB画素B34、下方に位置し隣接するB画素B54、下方に位置し3画素分離れたB画素B74のB成分値B14、B34、B54、B74が供給される。   First, the read control circuit 6 causes the frame data 5 to the coordinate data calculation circuit 7, the interpolation calculation circuit 11, and the interpolation circuit 12, for example, above and below the G component value G44 of the pixel of interest G44 and the surroundings of the pixel of interest G44. G pixel values G24 and G64 of G pixels G24 and G64 separated by two pixels and surrounding the target pixel G44, for example, an upper B pixel B14 separated by three pixels, and an upper adjacent B pixel The B component values B14, B34, B54, and B74 of the B pixel B54, the B pixel B54 located below and adjacent to the B pixel B74, and the B pixel B74 located below and separated by three pixels are supplied.

座標データ計算回路7では、下記の式で示すように、G成分値G24をX座標値x1とし、B成分値B14、B34の平均値をY座標値y1とする二次元座標データ(x1,y1)と、G成分値G44をX座標値x2とし、B成分値B34、B54の平均値をY座標値y2とする二次元座標データ(x2,y2)と、G成分値G46をX座標値x3とし、B成分値B54、B74の平均値をY座標値とする二次元座標データ(x3,y3)を定め、定数計算回路9に出力される。   In the coordinate data calculation circuit 7, two-dimensional coordinate data (x1, y1) in which the G component value G24 is set as the X coordinate value x1 and the average value of the B component values B14 and B34 is set as the Y coordinate value y1, as shown by the following equation. ), Two-dimensional coordinate data (x2, y2) in which the G component value G44 is the X coordinate value x2, the average value of the B component values B34 and B54 is the Y coordinate value y2, and the G component value G46 is the X coordinate value x3. And two-dimensional coordinate data (x3, y3) in which the average value of the B component values B54 and B74 is set as the Y coordinate value is determined and output to the constant calculation circuit 9.

x1=G24
y1=(B14+B34)/2
x2=G44
y2=(B34+B54)/2
x3=G64
y3=(B54+B74)/2
x1 = G24
y1 = (B14 + B34) / 2
x2 = G44
y2 = (B34 + B54) / 2
x3 = G64
y3 = (B54 + B74) / 2

上記の式から分るように、X座標値xiとしては、撮像素子2から得られた各画素位置のG成分(既知色成分)の値がそのまま用いられ、Y座標値yiとしては、各画素位置の周囲、例えば上方及び下方に位置し各画素に隣接する画素のB成分(不足色成分)の平均が求められる。   As can be seen from the above formula, as the X coordinate value xi, the value of the G component (known color component) at each pixel position obtained from the image sensor 2 is used as it is, and as the Y coordinate value yi, each pixel is The average of B components (insufficient color components) of pixels located around the position, for example, above and below and adjacent to each pixel is obtained.

座標データ計算回路7から出力される二次元座標データ(xi,yi)、(i=1〜3)が上記の[条件1]、[条件2]、[条件3]、[条件4]のいずれにも該当しないと条件判定回路8が判定した場合は以下の処理を行う。   The two-dimensional coordinate data (xi, yi) and (i = 1 to 3) output from the coordinate data calculation circuit 7 are any of the above [Condition 1], [Condition 2], [Condition 3], and [Condition 4]. If the condition determination circuit 8 determines that the above does not apply, the following processing is performed.

まず、定数計算回路9は、座標データ計算回路7から送られてくる二次元座標データ(xi,yi)、(i=1〜3)を使い、式(1)、(2)、(3)の計算を行い、その結果得られた回帰線の傾きaとy切片bの値を補間演算回路11に、相関係数kの値を合成回路13に出力する。   First, the constant calculation circuit 9 uses the two-dimensional coordinate data (xi, yi) and (i = 1 to 3) sent from the coordinate data calculation circuit 7, and uses equations (1), (2), and (3). The values of the slope a and y intercept b of the regression line obtained as a result are output to the interpolation calculation circuit 11 and the value of the correlation coefficient k is output to the synthesis circuit 13.

補間演算回路11では、注目画素G44上のB成分値11OUTを、フレームメモリ5から出力される信号のうち、注目画素G44のG成分値G44と、定数計算回路9から送られてくる回帰線の傾きaとy切片bを用いた下記の式で計算し、出力する。   In the interpolation calculation circuit 11, the B component value 11 OUT on the target pixel G 44 is converted into the G component value G 44 of the target pixel G 44 among the signals output from the frame memory 5 and the regression line sent from the constant calculation circuit 9. Calculate and output the following equation using the slope a and the y-intercept b.

11OUT=a×G44+b   11OUT = a × G44 + b

座標データ計算回路7から出力される二次元座標データ(xi,yi)、(i=1〜3)が上記の[条件1]、[条件2]、[条件3]、[条件4]のいずれかに該当すると条件判定回路8が判定した場合は以下の処理を行う。   The two-dimensional coordinate data (xi, yi) and (i = 1 to 3) output from the coordinate data calculation circuit 7 are any of the above [Condition 1], [Condition 2], [Condition 3], and [Condition 4]. If the condition determination circuit 8 determines that this is the case, the following processing is performed.

定数計算回路9では、合成回路13に対して、相関係数kの値として「1」を出力し、また、補間演算回路11に対して
回帰式を使用せず、線形補間を行うよう指示を出す。
The constant calculation circuit 9 outputs “1” as the value of the correlation coefficient k to the synthesis circuit 13 and instructs the interpolation calculation circuit 11 to perform linear interpolation without using a regression equation. put out.

補間演算回路11では、注目画素G44の位置におけるB成分値11OUTを、フレームメモリ5から送られてくる信号のうち、注目画素の近傍のB画素B34、B54のB成分値B34、B54を用いた下記の式による線形補間で計算し、出力する。   In the interpolation calculation circuit 11, the B component value 11OUT at the position of the target pixel G44 is used as the B component values B34 and B54 of the B pixels B34 and B54 in the vicinity of the target pixel among the signals sent from the frame memory 5. Calculate and output by linear interpolation using the following formula.

11OUT=(B34+B54)/2   11OUT = (B34 + B54) / 2

一方、補間回路12では、注目画素G44の位置におけるB成分値12OUTを、フレームメモリ5から送られてくる信号のうち、画素B34、B54のB成分値B34、B54及び画素G44、G24、G64のG成分値G44、G24、G64を用いた下記の式で計算し、出力する。   On the other hand, in the interpolation circuit 12, the B component value 12OUT at the position of the pixel of interest G44 is converted into the B component values B34 and B54 of the pixels B34 and B54 and the pixels G44, G24 and G64 among the signals sent from the frame memory 5. Calculation is performed by the following equation using the G component values G44, G24, and G64, and output.

Figure 0004128536
Figure 0004128536

図10は補間回路12により補間される、注目画素G44の位置におけるB成分値B0(12OUT)の定め方を説明する図である。図においてV軸は固体撮像素子2の撮像面の垂直軸に対応し、Z軸は各画素の成分値を表す。G1、G2は画素G24、G64のG成分値をG成分値G24、G64の平均値で置き換えた点であり、G0は画素G44のG成分値G44を表した点である。
B1、B2は画素B34、B54のR成分値をそれらの平均値で置き換えた点であり、B0は画素G44上に補間されるR成分値12OUTを表した点である。
FIG. 10 is a diagram for explaining how to determine the B component value B0 (12OUT) at the position of the target pixel G44 to be interpolated by the interpolation circuit 12. In the figure, the V axis corresponds to the vertical axis of the imaging surface of the solid-state imaging device 2, and the Z axis represents the component value of each pixel. G1 and G2 are points where the G component values of the pixels G24 and G64 are replaced with average values of the G component values G24 and G64, and G0 is a point representing the G component value G44 of the pixel G44.
B1 and B2 are points where the R component values of the pixels B34 and B54 are replaced by their average values, and B0 is a point representing the R component value 12OUT to be interpolated on the pixel G44.

上記の計算は、三角形G0G1G2と三角形B0B1B2が相似になるように、12OUTの値を定めるものである。すなわち、注目画素G44における既知色成分Gに関して、注目画素G44のG成分値と注目画素G44の近傍のG成分を有する画素のG成分値の平均値でつくる既知色成分三角形(幾何学図形)と、注目画素G44上に補間される不足色成分Bに関して、補間により求められる値12OUTと注目画素G44の近傍のR成分を有する画素のR成分値の平均値でつくる不足色成分三角形(幾何学図形)が相似になるように12OUTが定められる。   The above calculation determines the value of 12OUT so that the triangle G0G1G2 and the triangle B0B1B2 are similar. That is, with respect to the known color component G in the target pixel G44, a known color component triangle (geometrical figure) formed by the average value of the G component value of the target pixel G44 and the G component value of the pixel having the G component in the vicinity of the target pixel G44; For the insufficient color component B to be interpolated on the target pixel G44, a short color component triangle (geometrical figure) formed by the average value of the value 12OUT obtained by interpolation and the R component value of the R component in the vicinity of the target pixel G44 ) Is determined so that 12OUT is similar.

言換えれば、注目画素G44の周辺の複数のG成分を有する画素(G24、G64)のG成分の値の平均値と、注目画素G44の位置におけるG成分の値との差と、上記平均値の計算に用いられた複数の画素(G24、G64)及び注目画素(G44)相互間の二次元平面上における距離との比と、注目画素G44の周辺の複数のB成分を有する画素(B34、B54)のB成分の値の平均値と、補間により求められる注目画素B44上のG成分の値12OUTとの差と、上記平均値の計算に用いられた複数の画素(B34、B54)及び注目画素(G44)相互間の二次元平面上における距離との比が互いに同じになるように、注目画素の位置におけるB成分の値12OUTが定められる。   In other words, the difference between the average value of the G component values of the pixels (G24, G64) having a plurality of G components around the target pixel G44 and the value of the G component at the position of the target pixel G44, and the average value The ratio of the distance between the plurality of pixels (G24, G64) and the target pixel (G44) used in the calculation of the distance on the two-dimensional plane and the pixels (B34, B, The difference between the average value of the B component values of B54) and the G component value 12OUT on the target pixel B44 obtained by interpolation, the plurality of pixels (B34, B54) used for the calculation of the average value, and the target The B component value 12OUT at the position of the target pixel is determined so that the ratio of the distance between the pixels (G44) on the two-dimensional plane is the same.

合成回路13では、定数計算回路9から供給された相関係数kの絶対値に応じて、補間演算回路11から供給された補間値11OUTと、補間回路12から供給された補間値12OUTとを重み付け加算により合成して、その結果を合成された補間値13OUTとして出力する。この重み付け加算は、相関係数kの絶対値が「1」に近ければ、12OUTより11OUTの占める割合が大きくなるように行われ、相関係数kの絶対値が「0」に近ければ、11OUTより12OUTの占める割合が大きくなるように行われる。   In the synthesis circuit 13, the interpolation value 11 OUT supplied from the interpolation calculation circuit 11 and the interpolation value 12 OUT supplied from the interpolation circuit 12 are weighted according to the absolute value of the correlation coefficient k supplied from the constant calculation circuit 9. The result is synthesized by addition, and the result is output as a synthesized interpolation value 13OUT. This weighted addition is performed so that the proportion occupied by 11OUT is larger than 12OUT if the absolute value of the correlation coefficient k is close to “1”, and 11OUT if the absolute value of the correlation coefficient k is close to “0”. Further, the ratio of 12OUT is increased.

以上のようにして求められた補間値13OUTが、注目画素の位置における、B成分値を表す補間値としてフレームメモリ5に書き込まれる。   The interpolation value 13OUT obtained as described above is written in the frame memory 5 as an interpolation value representing the B component value at the position of the target pixel.

以上の補間処理がすべての奇数行におけるG画素の位置におけるB成分値に対して行われる。   The above interpolation processing is performed on the B component values at the G pixel positions in all odd rows.

上記した奇数行におけるG画素の位置におけるR成分値の補間の説明と、奇数行におけるG画素の位置におけるB成分値の補間の説明とは、垂直方向(上下方向)と水平方向(左右方向)とが入れ替え変わっただけである。
以上は奇数行におけるG画素の位置におけるR成分値及びB成分値の補間方法であるが、
偶数行におけるG画素の位置におけるR成分値及びB成分値の補間も、奇数行の場合と同様に行われる。但し、「垂直方向」と「水平方向」を入れ替える。別の見方をすれば、偶数行におけるG画素の位置におけるR成分値及びB成分値の補間は、奇数行におけるG画素の位置におけるR成分値及びB成分値の補間と、RとBが入れ替わる以外は同様に行われる。
The explanation of the interpolation of the R component value at the G pixel position in the odd row and the explanation of the interpolation of the B component value at the G pixel position in the odd row are the vertical direction (up and down direction) and the horizontal direction (left and right direction). Is just replaced.
The above is the interpolation method of the R component value and the B component value at the position of the G pixel in the odd row.
Interpolation of the R component value and the B component value at the position of the G pixel in the even row is performed in the same manner as in the odd row. However, “vertical direction” and “horizontal direction” are interchanged. From another point of view, the interpolation of the R component value and the B component value at the position of the G pixel in the even row replaces the interpolation between the R component value and the B component value at the position of the G pixel in the odd row, and R and B. The other operations are the same.

次にR画素の位置におけるB成分値の補間方法について述べる。なお、「R画素」は、撮像素子2の出力においては、R成分のみを有する画素を意味する。(「G画素」、「B画素」も同様である。)しかし、この「R画素」は、それ以前の補間により求められたG成分を有するもので、このG成分値が、以下に述べるR画素の位置におけるB成分値の補間に利用される。   Next, an interpolation method for the B component value at the position of the R pixel will be described. The “R pixel” means a pixel having only an R component in the output of the image sensor 2. (The same applies to “G pixel” and “B pixel”.) However, this “R pixel” has a G component obtained by previous interpolation, and this G component value is an R value described below. This is used for interpolation of the B component value at the pixel position.

図11はG成分を有するR画素の位置におけるB成分値を補間するために、フレームメモリ5から読み出される信号を示している。図11に符号g44、g33、g35、g53、g55で示すように、注目画素であるR画素R44の位置のみならずその周囲にもG成分を有する画素が存在する。小文字gはG成分値がそれ以前の補間により生成されたものであることを示す。座標データ計算回路7において、下記の式で示すように、画素B33のG成分値g33をX座標値x1とし、B成分値B33をY座標値y1とする二次元座標データ(x1,y1)、画素B35のG成分値g35をX座標値x2とし、B成分値B35をY座標値y2とする二次元座標データ(x2,y2)、画素B53のG成分値g53をX座標値x3とし、B成分値B53をY座標値y3とする二次元座標データ(x3,y3)、画素B55のG成分値g55をX座標値x4とし、B成分値B55をY座標値y4とする二次元座標データ(x4,y4)を定めて、出力する。   FIG. 11 shows a signal read from the frame memory 5 in order to interpolate the B component value at the position of the R pixel having the G component. As indicated by reference numerals g44, g33, g35, g53, and g55 in FIG. 11, there are pixels having the G component not only at the position of the R pixel R44 that is the target pixel but also around it. The lowercase letter g indicates that the G component value was generated by previous interpolation. In the coordinate data calculation circuit 7, as shown by the following equation, two-dimensional coordinate data (x1, y1) in which the G component value g33 of the pixel B33 is set to the X coordinate value x1 and the B component value B33 is set to the Y coordinate value y1; Two-dimensional coordinate data (x2, y2) in which the G component value g35 of the pixel B35 is the X coordinate value x2, the B component value B35 is the Y coordinate value y2, and the G component value g53 of the pixel B53 is the X coordinate value x3. Two-dimensional coordinate data (x3, y3) in which the component value B53 is the Y coordinate value y3, two-dimensional coordinate data in which the G component value g55 of the pixel B55 is the X coordinate value x4, and the B component value B55 is the Y coordinate value y4 ( x4, y4) are determined and output.

x1=g33
y1=B33
x2=g35
y2=B35
x3=g53
y3=B53
x4=g55
y4=B55
x1 = g33
y1 = B33
x2 = g35
y2 = B35
x3 = g53
y3 = B53
x4 = g55
y4 = B55

上記の式から分るように、X座標値xi(i=1〜4)としては、以前の補間により生成された各画素位置のG成分(既知色成分)の値がそのまま用いられ、Y座標値yiとしては、撮像素子2から得られた各画素位置のB成分(不足色成分)の値がそのまま用いられる。   As can be seen from the above formula, as the X coordinate value xi (i = 1 to 4), the value of the G component (known color component) of each pixel position generated by the previous interpolation is used as it is, and the Y coordinate is used. As the value yi, the value of the B component (insufficient color component) at each pixel position obtained from the image sensor 2 is used as it is.

座標データ計算回路7から出力される二次元座標データ(xi,yi)、(i=1〜4)が上記の[条件1]、[条件2]、[条件3]、[条件4]のいずれにも該当しないと条件判定回路8が判定した場合は以下の処理を行う。   The two-dimensional coordinate data (xi, yi) and (i = 1 to 4) output from the coordinate data calculation circuit 7 are any of the above [Condition 1], [Condition 2], [Condition 3], and [Condition 4]. If the condition determination circuit 8 determines that the above does not apply, the following processing is performed.

まず、定数計算回路9は、座標データ計算回路7から送られてくる二次元座標データ(xi、yi)、(i=1〜4)を使い、式(1)、(2)、(3)の計算を行い、その結果得られた回帰線の傾きa、y切片bの値を補間演算回路11に、相関係数kの値を合成回路13に出力する。   First, the constant calculation circuit 9 uses the two-dimensional coordinate data (xi, yi), (i = 1 to 4) sent from the coordinate data calculation circuit 7, and uses the equations (1), (2), (3). And the values of the slope a and y intercept b of the regression line obtained as a result are output to the interpolation operation circuit 11 and the value of the correlation coefficient k is output to the synthesis circuit 13.

補間演算回路11では、注目画素R44上のB成分値11OUTを、フレームメモリ5から出力される信号のうち、注目画素R44上のG成分値g44と、定数計算回路9から送られてくる回帰線の傾きaとy切片bを用いた下記の式で計算し、出力する。   In the interpolation calculation circuit 11, the B component value 11 OUT on the target pixel R 44, the G component value g 44 on the target pixel R 44 among the signals output from the frame memory 5, and the regression line sent from the constant calculation circuit 9. Is calculated by the following formula using the slope a and the y-intercept b and output.

11OUT=a×g44+b   11OUT = a × g44 + b

座標データ計算回路7から出力される二次元座標データ(xi,yi)、(i=1〜4)が上記の[条件1]、[条件2]、[条件3]、[条件4]のいずれかに該当すると条件判定回路8が判定した場合は以下の処理を行う。   The two-dimensional coordinate data (xi, yi) and (i = 1 to 4) output from the coordinate data calculation circuit 7 are any of the above [Condition 1], [Condition 2], [Condition 3], and [Condition 4]. If the condition determination circuit 8 determines that this is the case, the following processing is performed.

定数計算回路9では、合成回路13に対して相関係数kとして「1」を出力し、また補間演算回路11に対して回帰式を使用せず、線形補間を行うよう指示を出す。   The constant calculation circuit 9 outputs “1” as the correlation coefficient k to the synthesis circuit 13 and instructs the interpolation calculation circuit 11 to perform linear interpolation without using the regression equation.

補間演算回路11では、注目画素R44の位置におけるB成分値11OUTを、フレームメモリ5から送られてくる信号のうち、注目画素の近傍のB画素B33、B35、B53、B55のB成分値B33、B35、B53、B55を用いた下記の式による線形補間で計算し、出力する。   In the interpolation calculation circuit 11, the B component value 11OUT at the position of the target pixel R44 is used as the B component value B33 of the B pixels B33, B35, B53, and B55 in the vicinity of the target pixel among the signals sent from the frame memory 5. Calculation is performed by linear interpolation according to the following equation using B35, B53, and B55, and output.

11OUT=(B33+B35+B53+B55)/4   11OUT = (B33 + B35 + B53 + B55) / 4

一方、補間回路12では、注目画素R44の位置におけるB成分値12OUTを、フレームメモリ5から送られてくる信号のうち、画素B33、B35、B53、B55におけるB成分値B33、B35、B53、B55及び画素R44、R33、R35、R53、R55におけるG成分値g44、g33、g35、g53、g55を用いた下記の式で計算し、出力する。   On the other hand, the interpolation circuit 12 uses the B component value 12OUT at the position of the target pixel R44 as the B component value B33, B35, B53, B55 in the pixels B33, B35, B53, B55 among the signals sent from the frame memory 5. And the G component values g44, g33, g35, g53, and g55 in the pixels R44, R33, R35, R53, and R55 are calculated by the following formula and output.

Figure 0004128536
Figure 0004128536

図12は補間回路12により補間される、注目画素R44の位置におけるB成分値12OUTの定め方を説明する図である。図においてH−V平面は固体撮像素子2の撮像面に対応し、Z軸は各画素の成分値を表す。g1、g2、g3、g4は画素B53、B55、B35、B33のG成分値g53、g55、g35、g33を、それらの平均値で置き換えた点であり、g0は画素R44のG成分値g44を表した点である。
B1、B2、B3、B4は画素B53、B55、B35、B33のB成分値を、そらの平均値で置き換えた点であり、B0は画素R44上に補間されるB成分値12OUTを表した点である。
FIG. 12 is a diagram for explaining how to determine the B component value 12OUT at the position of the target pixel R44 to be interpolated by the interpolation circuit 12. In the figure, the HV plane corresponds to the imaging surface of the solid-state imaging device 2, and the Z axis represents the component value of each pixel. g1, g2, g3, and g4 are points where the G component values g53, g55, g35, and g33 of the pixels B53, B55, B35, and B33 are replaced with their average values, and g0 is the G component value g44 of the pixel R44. It is the point that expressed.
B1, B2, B3, and B4 are points where the B component values of the pixels B53, B55, B35, and B33 are replaced with their average values, and B0 is a point that represents the B component value 12OUT interpolated on the pixel R44. It is.

上記の計算は、四角錘g0g1g2g3g4と四角錘B0B1B2B3B4が相似になるように、12OUTの値を定めるものである。すなわち、注目画素R44における既知色成分Gに関して、注目画素R44のG成分値と注目画素R44の近傍のG成分を有する画素のG成分値の平均値でつくる既知色成分多面体(幾何学図形)と、注目画素R44上に補間される不足色成分Bに関して、補間により求められる値12OUTと注目画素R44の近傍のB成分を有する画素のB成分値の平均値でつくる不足色成分多面体(幾何学図形)が相似になるように12OUTが定められる。   In the above calculation, the value of 12OUT is determined so that the square weights g0g1g2g3g4 and the square weights B0B1B2B3B4 are similar. That is, with respect to the known color component G in the target pixel R44, a known color component polyhedron (geometrical figure) created by the average value of the G component value of the target pixel R44 and the G component value of the pixel having the G component in the vicinity of the target pixel R44; For the insufficient color component B to be interpolated on the target pixel R44, the insufficient color component polyhedron (geometrical figure) formed by the average value of the value 12OUT obtained by interpolation and the B component value of the B component in the vicinity of the target pixel R44 ) Is determined so that 12OUT is similar.

言換えれば、注目画素R44の周辺の複数のG成分を有する画素(B53、B55、B35、B33)のG成分の値(g53、g55、g35、g33)の平均値と、注目画素R44の位置におけるG成分の値(g44)との差と、上記平均値の計算に用いられた複数の画素(B53、B55、B35、B33)及び注目画素(R44)相互間の二次元平面上における距離との比と、注目画素R44の周辺の複数のB成分を有する画素(B53、B55、B35、B33)のB成分の値(B53、B55、B35、B33)の平均値と、補間により求められる注目画素R44の位置におけるB成分の値12OUTとの差と、上記平均値の計算に用いられた複数の画素(B53、B55、B35、B33)及び上記注目画素(R44)相互間の二次元平面上における距離との比が互いに同じになるように、注目画素の位置におけるB成分の値12OUTが定められる。   In other words, the average value of the G component values (g53, g55, g35, g33) of the pixels (B53, B55, B35, B33) having a plurality of G components around the target pixel R44 and the position of the target pixel R44 And the distance between the plurality of pixels (B53, B55, B35, B33) and the target pixel (R44) used for calculating the average value on the two-dimensional plane, And the average value of the B component values (B53, B55, B35, B33) of the pixels (B53, B55, B35, B33) having a plurality of B components around the target pixel R44, and the attention obtained by interpolation The difference between the B component value 12OUT at the position of the pixel R44 and the plurality of pixels (B53, B55, B35, B33) used for the calculation of the average value and the target pixel (R44) As the ratio of the distance on the dimension plane is identical to each other, the value 12OUT of the B component at the position of the pixel of interest is determined.

合成回路13では、定数計算回路9から供給された相関係数kの絶対値に応じて、補間演算回路11から供給された補間値11OUTと、補間回路12から供給された補間値12OUTとを重み付け加算により合成して、その結果を合成された補間値13OUTとして出力する。この重み付け加算は、相関係数kの絶対値が「1」に近ければ、12OUTより11OUTの占める割合が大きくなるように行われ、相関係数の絶対値kが「0」に近ければ、11OUTより12OUTの占める割合が大きくなるように行われる。   In the synthesis circuit 13, the interpolation value 11 OUT supplied from the interpolation calculation circuit 11 and the interpolation value 12 OUT supplied from the interpolation circuit 12 are weighted according to the absolute value of the correlation coefficient k supplied from the constant calculation circuit 9. The result is synthesized by addition, and the result is output as a synthesized interpolation value 13OUT. This weighted addition is performed such that if the absolute value of the correlation coefficient k is close to “1”, the proportion occupied by 11OUT is larger than 12OUT. If the absolute value k of the correlation coefficient is close to “0”, 11OUT is used. Further, the ratio of 12OUT is increased.

以上のようにして求められた補間値13OUTが、注目画素の位置における、B成分値を表す補間値としてフレームメモリ5に書き込まれる。   The interpolation value 13OUT obtained as described above is written in the frame memory 5 as an interpolation value representing the B component value at the position of the target pixel.

以上の補間処理がすべてのR画素の位置におけるB成分値に対して行われる。   The above interpolation processing is performed on the B component values at the positions of all R pixels.

以上はR画素の位置におけるB成分値を補間する方法であるが、B画素の位置におけるR成分値の補間も、RとBが入れ替わる以外は同様に行われる。   The above is a method of interpolating the B component value at the position of the R pixel, but the interpolation of the R component value at the position of the B pixel is similarly performed except that R and B are interchanged.

以上により、補間処理が終了し、全画素に対して全不足色成分値が与えられ、R、G、B各色の成分値が揃い、フレームメモリ5に一枚の静止画像に相当する信号が蓄積されたことになる。フレームメモリ5に一枚の静止画像に相当する信号が蓄積されると、読み出し制御回路6はフレームメモリ5から一枚の静止画像に相当する信号5OUTを読み出し、補間処理回路4の外部へ出する。   As described above, the interpolation processing is completed, all insufficient color component values are given to all pixels, the component values of R, G, and B colors are aligned, and a signal corresponding to one still image is accumulated in the frame memory 5. It will be done. When a signal corresponding to one still image is accumulated in the frame memory 5, the read control circuit 6 reads a signal 5 OUT corresponding to one still image from the frame memory 5 and outputs it to the outside of the interpolation processing circuit 4. .

上述のように補間処理回路4では、補間演算回路11と補間回路12で別の補間処理を行い、その結果を重み付け加算する。   As described above, in the interpolation processing circuit 4, the interpolation calculation circuit 11 and the interpolation circuit 12 perform different interpolation processes, and the results are weighted and added.

上述の補間による効果は以下の通りである。
補間演算回路11で行う処理は、色信号は局所的にはある色から別の色に変化するという性質に基いた補間処理である。そしてこのある色から別の色への変化を回帰式により求め、求めた回帰式で表される回帰線上に不足色成分値を求めることで、色信号は局所的にはある色から別の色に変化するという性質を利用した補間処理を行っている。
The effects of the interpolation described above are as follows.
The process performed by the interpolation calculation circuit 11 is an interpolation process based on the property that the color signal locally changes from one color to another. Then, the change from one color to another color is obtained by a regression equation, and the color signal is locally changed from one color to another color by obtaining the missing color component value on the regression line represented by the obtained regression equation. Interpolation using the property of changing to.

この方式はある色から別の色になめらかに変化する領域での補間に優れている。このような色の変化は低周波で起こるので、補間演算回路11で行う処理は、特に低周波領域での色の補間に優れている。   This method is excellent for interpolation in a region where the color smoothly changes from one color to another. Since such a color change occurs at a low frequency, the processing performed by the interpolation calculation circuit 11 is particularly excellent for color interpolation in a low frequency region.

また、補間回路12で行う処理は、例えば、R画素におけるG成分値の補間の場合、局所領域におけるR画素の平均値及び注目しているR画素の値で作る幾何学図形と、局所領域におけるG画素の平均値及び補間演算の結果生成されるG成分値で作る幾何学図形が相似形になるように行っている。   Further, the processing performed by the interpolation circuit 12 is, for example, in the case of interpolation of the G component value in the R pixel, the geometric figure formed by the average value of the R pixel in the local region and the value of the R pixel of interest, and the local region The geometric figure formed by the average value of the G pixels and the G component value generated as a result of the interpolation operation is made to be similar.

このように補間画素値を求めることで、R信号とG信号の局所的な色の平均値に対する増減が一致する。ひいてはR、G各色の信号レベルの増減が一致すると言える。   Thus, by calculating | requiring an interpolation pixel value, the increase / decrease with respect to the average value of the local color of R signal and G signal corresponds. As a result, it can be said that the increase and decrease of the signal level of each color of R and G coincide.

説明の一例としてR画素の位置におけるG成分値の補間を取り上げたが、他の補間の場合も同様のことが言える。   As an example of the description, the interpolation of the G component value at the position of the R pixel is taken up, but the same can be said for other interpolations.

すなわち、局所領域において、R、G、B各色の信号レベルの増減が一致するよう補間処理が行われ、特に高周波領域での色の補間に優れている。   That is, interpolation processing is performed in the local region so that the increase and decrease of the signal level of each color of R, G, and B coincides, and the color interpolation is particularly excellent in the high frequency region.

相関係数は、求めた回帰式の、回帰式を求めるために使用した二次元座標データに対する妥当性を定量的に示す統計量である。回帰式を求めるために使用した二次元座標データが全て求めた回帰式で表される回帰線上にのるとき、相関係数の絶対値は「1」となり、相関係数の絶対値が0に近づくほど、回帰式を求めるために利用した座標データが、求めた回帰式で表される回帰線からよりずれたところにある。   The correlation coefficient is a statistic that quantitatively indicates the validity of the obtained regression equation with respect to the two-dimensional coordinate data used for obtaining the regression equation. When the two-dimensional coordinate data used to obtain the regression equation is on the regression line represented by the obtained regression equation, the absolute value of the correlation coefficient is “1”, and the absolute value of the correlation coefficient is 0. The closer it is, the more the coordinate data used to obtain the regression equation is at a point that is more deviated from the regression line represented by the obtained regression equation.

したがって相関係数が大きいといことは、補間演算回路11で計算した補間画素値が適当であるということであり、相関係数が小さいということは、補間演算回路11で計算した補間画素値が不適当であるということである。   Therefore, the fact that the correlation coefficient is large means that the interpolation pixel value calculated by the interpolation calculation circuit 11 is appropriate, and that the correlation coefficient is small means that the interpolation pixel value calculated by the interpolation calculation circuit 11 is invalid. That is appropriate.

したがって、相関係数の絶対値が大きい場合は補間演算回路11で計算した補間画素値が大きくなるよう重み付け加算し、逆に相関係数の絶対値が小さい場合は補間回路12で計算した補間画素値が大きくなるよう重み付け加算すれば、状況に応じて、より適した補間画素値を計算することができる。   Therefore, when the absolute value of the correlation coefficient is large, weighted addition is performed so that the interpolation pixel value calculated by the interpolation calculation circuit 11 is large. Conversely, when the absolute value of the correlation coefficient is small, the interpolation pixel calculated by the interpolation circuit 12 is used. If weighted addition is performed so as to increase the value, a more suitable interpolation pixel value can be calculated according to the situation.

以下、図13、図14、図15、図16を用いてG画素の位置におけるR成分値を補間する場合を例に、この補間処理の効果について具体的に説明する。   Hereinafter, the effect of this interpolation processing will be described in detail by taking, as an example, the case of interpolating the R component value at the G pixel position with reference to FIGS. 13, 14, 15, and 16.

図13、図14において、横軸は画素がGRGR…と並ぶ方向(例えば奇数行)での各画素の位置を表し、縦軸は画素値を表し、■はR画素の画素値を表し、横に書かれた数字が画素値を表し、◆はG画素の画素値を表し、横に書かれた数字が画素値を表し、実線で表される曲線は、R成分及びG成分の信号変化曲線を表し、△は補間演算回路11における不足色成分の補間結果を表し、横に書かれた数字が補間される値を表し、○は補間回路12における不足色成分値の補間結果を表し、横に書かれた数字が補間される値を示す。   13 and 14, the horizontal axis represents the position of each pixel in the direction in which the pixels are aligned with GRGR... (For example, odd rows), the vertical axis represents the pixel value, ■ represents the pixel value of the R pixel, The number written on the left side represents the pixel value, the ◆ represents the pixel value of the G pixel, the number written on the side represents the pixel value, and the solid line represents the signal change curve of the R component and the G component. △ represents the interpolation result of the insufficient color component in the interpolation calculation circuit 11 and represents the value to which the number written horizontally is interpolated, ○ represents the interpolation result of the insufficient color component value in the interpolation circuit 12 and horizontal The number written in indicates the value to be interpolated.

図15は図13に示されたデータで回帰線を引いた結果である。また、図16は図14に示されたデータで回帰線を引いた結果である。図15、図16において、図中に示された式が回帰線であり、kが相関係数である。   FIG. 15 shows the result of drawing a regression line with the data shown in FIG. FIG. 16 shows the result of drawing a regression line with the data shown in FIG. In FIGS. 15 and 16, the equation shown in the figure is a regression line, and k is a correlation coefficient.

図13に示されるように色がある色から別の色になだらかに変化していく場合は、相関係数の絶対値が「1」に近い値をとっているが、図14に示されるように高周波成分が目立つ場合は相関係数の絶対値が図13の場合と比べ、「1」から遠い値をとっていることがわかる。   When the color gradually changes from one color to another as shown in FIG. 13, the absolute value of the correlation coefficient is close to “1”, but as shown in FIG. When the high frequency component is conspicuous, it can be seen that the absolute value of the correlation coefficient is a value far from “1” as compared with the case of FIG.

また、図13のようになだらかに色が変化する場合は、補間演算回路11で補間した不足色成分値が実線で書かれた曲線に近い値をとっているが、図14のように高周波成分が目立つ場合は、補間回路12で補間した不足色成分値が実線で書かれた曲線に近い値をとっている。   Further, when the color changes smoothly as shown in FIG. 13, the insufficient color component value interpolated by the interpolation calculation circuit 11 takes a value close to a curve written by a solid line, but the high frequency component as shown in FIG. Is conspicuous, the deficient color component value interpolated by the interpolation circuit 12 takes a value close to a curve written by a solid line.

従って、相関係数の絶対値が大きい場合は補間演算回路11で計算した不足色成分値が大きくなるよう重み付け加算し、逆に相関係数の絶対値が小さい場合は補間回路12で計算した不足色成分値が大きくなるよう重み付け加算すれば、状況に応じて、より適した不足色成分値を計算することができる。   Therefore, when the absolute value of the correlation coefficient is large, weighting addition is performed so that the insufficient color component value calculated by the interpolation calculation circuit 11 is large. Conversely, when the absolute value of the correlation coefficient is small, the shortage calculated by the interpolation circuit 12 is used. If weighted addition is performed so as to increase the color component value, a more suitable insufficient color component value can be calculated according to the situation.

なお、合成回路13では、補間演算回路11からの補間値11OUTと補間回路12からの補間値12OUTのいずれか一方を選択するようにしてもよい。例えば、閾値を設定し、定数計算回路13で計算された相関係数kの絶対値がこの閾値より大きければ、補間演算回路11からの補間値11OUTを出力し、定数計算回路9で計算された相関係数kの絶対値がこの閾値以下であれば、補間回路12からの補間値12OUTを出力するといった方法が考えられる。なお、いずれか一方を選択する動作は、合成割合を0と1のいずれかに切換えることに相当する。   Note that the synthesis circuit 13 may select one of the interpolation value 11OUT from the interpolation calculation circuit 11 and the interpolation value 12OUT from the interpolation circuit 12. For example, when a threshold value is set and the absolute value of the correlation coefficient k calculated by the constant calculation circuit 13 is larger than this threshold value, the interpolation value 11OUT from the interpolation calculation circuit 11 is output and calculated by the constant calculation circuit 9 If the absolute value of the correlation coefficient k is less than or equal to this threshold value, a method of outputting the interpolation value 12OUT from the interpolation circuit 12 can be considered. Note that the operation of selecting one of them corresponds to switching the composition ratio to either 0 or 1.

また、フルカラー画像撮像装置の構成は図1以外に様々なものが考えられる。たとえば、撮像画像を保存するための記憶媒体を搭載したり、画像圧縮処理を行う回路を組み合わせるなどである。   Various configurations of the full-color image capturing apparatus other than FIG. 1 are conceivable. For example, a storage medium for storing a captured image is mounted, or a circuit that performs image compression processing is combined.

実施の形態2.
この発明の実施の形態2の画素信号処理装置を備えたデジタルカメラなどの撮像装置の全体的構成は図1に示すごとくであり、実施の形態1と同じである。但し、以下に詳しく述べるように、補間処理回路4の構成が異なる。
Embodiment 2. FIG.
The overall configuration of an imaging apparatus such as a digital camera provided with the pixel signal processing apparatus according to the second embodiment of the present invention is as shown in FIG. 1 and is the same as that of the first embodiment. However, as described in detail below, the configuration of the interpolation processing circuit 4 is different.

即ち、実施の形態2の補間処理回路4は、注目画素を中心にして、垂直、水平2方向のうち、どちらの方向に相関が強いか判断し、相関の強い方向に応じて異なる補間処理を行う。   That is, the interpolation processing circuit 4 according to the second embodiment determines which direction is strong in the vertical and horizontal directions around the target pixel, and performs different interpolation processing depending on the direction with strong correlation. Do.

この実施の形態の補間処理回路4は、図17に示すように、フレームメモリ5と、読み出し制御回路6と、相関判別回路24と、座標データ計算回路7と、条件判定回路8と、定数計算回路9と、補間演算回路11と、補間回路12と、合成回路13とを有する。   As shown in FIG. 17, the interpolation processing circuit 4 of this embodiment includes a frame memory 5, a read control circuit 6, a correlation determination circuit 24, a coordinate data calculation circuit 7, a condition determination circuit 8, and a constant calculation. The circuit 9 includes an interpolation calculation circuit 11, an interpolation circuit 12, and a synthesis circuit 13.

フレームメモリ5には、実施の形態1と同様、信号5INが蓄積される。
フレームメモリ5に蓄積された信号の一部が、読み出し制御回路6の制御により、座標データ計算回路7、条件判定回路8、相関判別回路24、補間演算回路11、補間回路12に供給される。
The frame memory 5 stores the signal 5IN as in the first embodiment.
A part of the signal stored in the frame memory 5 is supplied to the coordinate data calculation circuit 7, the condition determination circuit 8, the correlation determination circuit 24, the interpolation calculation circuit 11, and the interpolation circuit 12 under the control of the read control circuit 6.

相関判別回路24は、フレームメモリ5から供給された信号をもとに注目画素を中心にして、画像が垂直方向及び水平方向のいずれの方向に強い相関性を有するのかを判別し、その判別結果を表す相関方向判別信号を、座標データ計算回路7、補間演算回路11、補間回路12に出力する。
例えば、細かい縦縞の画像のように、垂直方向の変化が少なく、水平方向の変化が多い場合には、垂直方向に相関が強いと判定され、細かい横縞の画像のように、水平方向の変化が少なく、垂直方向の変化が多い場合には、水平方向に相関が強いと判定される。
The correlation discriminating circuit 24 discriminates whether the image has a strong correlation in the vertical direction or the horizontal direction around the target pixel based on the signal supplied from the frame memory 5, and the discrimination result Is output to the coordinate data calculation circuit 7, the interpolation calculation circuit 11, and the interpolation circuit 12.
For example, when there is little change in the vertical direction and there are many changes in the horizontal direction like a fine vertical stripe image, it is determined that the correlation is strong in the vertical direction, and there is no change in the horizontal direction like a fine horizontal stripe image. If there are few and there are many changes in the vertical direction, it is determined that the correlation is strong in the horizontal direction.

座標データ計算回路7は、相関判別回路24での相関判別結果及びフレームメモリ5から入力される信号に基づき後述の計算をして二次元座標データを求め、定数計算回路9に出力する。
定数計算回路9は、座標データ計算回路7から送られる二次元座標データを使って所定の演算をし、回帰線の傾きa、y切片b、及び相関係数kを補間演算回路11と合成回路13に出力する。
補間演算回路11は、フレームメモリ5から送られてくる信号と相関判別回路24から送られる相関方向判別信号と定数計算回路9から送られてくる信号(定数a、b)を基に不足色成分を補間し、補間結果を第1の補間値11OUTとして、合成回路13に出力する。
The coordinate data calculation circuit 7 obtains two-dimensional coordinate data by performing later-described calculation based on the correlation determination result in the correlation determination circuit 24 and a signal input from the frame memory 5, and outputs it to the constant calculation circuit 9.
The constant calculation circuit 9 performs a predetermined calculation using the two-dimensional coordinate data sent from the coordinate data calculation circuit 7 and calculates the regression line slope a, y intercept b, and correlation coefficient k with the interpolation calculation circuit 11 and the synthesis circuit. 13 is output.
The interpolation calculation circuit 11 is based on the signal sent from the frame memory 5, the correlation direction judgment signal sent from the correlation judgment circuit 24, and the signals (constants a and b) sent from the constant calculation circuit 9 (insufficient color components). , And the interpolation result is output to the synthesis circuit 13 as the first interpolation value 11OUT.

補間回路12は、相関判別回路24からの相関方向判別信号及びフレームメモリ5から入力される信号に基づき不足色成分を補間し、補間結果を第2の補間値12OUTとして、合成回路13に出力する。
合成回路13は、定数計算回路9から送られてくる相関係数kにもとづき、補間演算回路11から出力される第1の補間値11OUTと補間回路12から出力される第2の補間値12OUTとを重み付け加算により合成し、合成された補間値13OUTを出力する。フレームメモリ5は、合成回路13から出力される合成された補間値13OUTを蓄積する。
The interpolation circuit 12 interpolates the insufficient color component based on the correlation direction determination signal from the correlation determination circuit 24 and the signal input from the frame memory 5, and outputs the interpolation result to the synthesis circuit 13 as the second interpolation value 12OUT. .
The synthesizing circuit 13 is based on the correlation coefficient k sent from the constant calculation circuit 9 and the first interpolation value 11OUT output from the interpolation calculation circuit 11 and the second interpolation value 12OUT output from the interpolation circuit 12. Are combined by weighted addition, and the combined interpolation value 13OUT is output. The frame memory 5 stores the combined interpolation value 13OUT output from the combining circuit 13.

以上のような、フレームメモリ5に蓄積された信号の読み出しから、合成回路13の出力13OUTのフレームメモリ5への書込みという一連の動作を、全画素に対する全不足色成分の補間が終了するまで(すなわち、一枚の静止画像に相当する信号がフレームメモリ5に蓄積されるまで)繰り返す。その処理が終了し、フレームメモリ5に一枚の静止画像に相当する信号が蓄積されると、読み出し制御回路6の制御により、フレームメモリ5から一枚の静止画像に相当する信号5OUTが読み出され、補間処理回路4の外部へ出力される。   A series of operations from reading the signal accumulated in the frame memory 5 to writing the output 13OUT of the synthesis circuit 13 to the frame memory 5 as described above until the interpolation of all the insufficient color components for all the pixels is completed ( That is, it repeats until a signal corresponding to one still image is accumulated in the frame memory 5). When the processing is completed and a signal corresponding to one still image is accumulated in the frame memory 5, a signal 5 OUT corresponding to one still image is read from the frame memory 5 under the control of the read control circuit 6. And output to the outside of the interpolation processing circuit 4.

次に補間処理回路4で行われる不足色成分の補間方法について述べる。不足色成分の補間には、
(P1) R画素及びB画素の位置におけるG成分値を求める処理、
(P2) G画素の位置におけるR成分値及びB成分値を求める処理、
(P3) R画素の位置におけるB成分値を求める処理、及び
(P4) B画素の位置におけるR成分値を求める処理
が含まれ、例えば上に記載の順で行われる。
Next, an interpolation method for insufficient color components performed in the interpolation processing circuit 4 will be described. For interpolation of missing color components,
(P1) Processing for obtaining G component values at the positions of the R pixel and the B pixel;
(P2) Processing for obtaining the R component value and the B component value at the position of the G pixel,
(P3) includes processing for obtaining the B component value at the position of the R pixel, and (P4) processing for obtaining the R component value at the position of the B pixel, and is performed, for example, in the order described above.

最初に、R画素及びB画素の位置におけるG成分値の補間方法について説明する。まず、R画素の位置におけるG成分値の補間について説明する。   First, a G component value interpolation method at the positions of the R pixel and the B pixel will be described. First, the interpolation of the G component value at the position of the R pixel will be described.

補間演算回路11は、以下に詳述するように2つのモードのいずれかで補間を行う。即ち、原則として回帰分析による補間を行うが、以下に述べるようにある条件が満たされた場合は、周囲の画素に基づく線形補間を行う。   The interpolation calculation circuit 11 performs interpolation in one of two modes as will be described in detail below. That is, in principle, interpolation by regression analysis is performed, but when a certain condition is satisfied as described below, linear interpolation based on surrounding pixels is performed.

回帰分析による補間の場合には、注目画素位置及びその周辺の画素位置における上記第R成分値と上記注目画素位置の周辺の画素位置におけるG成分値を受け取り、上記R成分値を説明変数、上記G成分値を目的変数として回帰分析を施し、上記R成分値とG成分値の関係を表す回帰式を算出し、上記注目画素位置におけるR成分値に対して上記回帰式に対応する変換式を用いることにより、上記注目画素位置における上記G成分値を求める。   In the case of interpolation by regression analysis, the R component value at the target pixel position and its surrounding pixel positions and the G component value at the pixel positions around the target pixel position are received, and the R component value is used as an explanatory variable, Regression analysis is performed using the G component value as an objective variable, a regression equation representing the relationship between the R component value and the G component value is calculated, and a conversion equation corresponding to the regression equation is calculated for the R component value at the target pixel position. By using this, the G component value at the target pixel position is obtained.

図18には、本実施の形態において、R画素の位置におけるG成分値を補間するために、フレームメモリ5から読み出される画素信号の画素位置及びその成分値が模式的に示されている。   FIG. 18 schematically shows the pixel position of the pixel signal read from the frame memory 5 and its component value in order to interpolate the G component value at the position of the R pixel in the present embodiment.

図示のように、読み出し制御回路6により、注目画素R44のR成分値R44と、注目画素R44の近傍にあり、注目画素R44に垂直方向に並び、注目画素と同じ色の画素R24、R64のR成分値R24、R64及び注目画素R44の近傍にあり、注目画素R44に垂直方向に並び、不足色(補間により求めようとする色成分)の画素G14、G34、G54、G74のG成分値G14、G34、G54、G74と、注目画素R44の近傍にあり、注目画素に水平方向に並び、注目画素と同じ色の画素R42、R46のR成分値R42、R46及び注目画素R44の近傍にあり、注目画素に水平方向に並び、不足色の画素G41、G43、G45、G47のG成分値G41、G43、G45、G47がフレームメモリ5から出力され、相関判別回路24、座標データ計算回路7、補間演算回路11、補間回路12に供給される。   As illustrated, the read control circuit 6 causes the R component value R44 of the target pixel R44 and the R of the pixels R24 and R64 of the same color as the target pixel to be in the vicinity of the target pixel R44, aligned in the vertical direction of the target pixel R44. G component values G14 of the pixels G14, G34, G54, and G74 that are in the vicinity of the component values R24 and R64 and the pixel of interest R44, are arranged in the vertical direction of the pixel of interest R44, and are insufficient colors (color components to be obtained by interpolation), G34, G54, G74, in the vicinity of the target pixel R44, aligned in the horizontal direction with the target pixel, in the vicinity of the R component values R42, R46 of the pixels R42, R46 of the same color as the target pixel, and the target pixel R44. The G component values G41, G43, G45, and G47 of the pixels G41, G43, G45, and G47 of the insufficiently colored pixels arranged in the horizontal direction are output from the frame memory 5, Discrimination circuit 24, the coordinate data calculating circuit 7, interpolation calculation circuit 11, is supplied to the interpolation circuit 12.

相関判別回路24はフレームメモリ5から供給された信号のうち、注目画素の近傍の画素、例えば隣接する画素であって、注目画素に垂直方向に並んだ画素G34、G54、及び注目画素に水平方向に並んだ画素G43、G45のG成分値G34、G54、G43、G45を用いて、下記の式により値dV、dHを計算する。これらの値は近傍の画素相互間の成分値の差を示すものである。   Of the signals supplied from the frame memory 5, the correlation determination circuit 24 is a pixel in the vicinity of the target pixel, for example, an adjacent pixel and is aligned in the vertical direction with respect to the target pixel, and the horizontal direction to the target pixel. Using the G component values G34, G54, G43, and G45 of the pixels G43 and G45 arranged in the same manner, values dV and dH are calculated by the following equations. These values indicate differences in component values between neighboring pixels.

dV=|G34−G54|
dH=|G43−G45|
dV = | G34-G54 |
dH = | G43-G45 |

垂直方向の相関が強い場合はdV<dHとなり水平方向の相関が強い場合はdV>dHとなるので、dV<dHなら垂直方向の相関が強いと判別し、それ以外の場合は水平方向の相関が強いと判別し、相関判別結果を表す相関方向判別信号を座標データ計算回路7、補間演算回路11、補間回路12に出力する。   If the vertical correlation is strong, dV <dH, and if the horizontal correlation is strong, dV> dH. If dV <dH, it is determined that the vertical correlation is strong. Otherwise, the horizontal correlation is determined. Is output to the coordinate data calculation circuit 7, the interpolation calculation circuit 11, and the interpolation circuit 12.

座標データ計算回路7は相関判別回路24から供給された相関方向判別信号に応じて、以下の様に動作する。   The coordinate data calculation circuit 7 operates as follows according to the correlation direction determination signal supplied from the correlation determination circuit 24.

相関判別回路24における相関方向判別信号が、垂直方向の相関が強いという判別結果を示すものである場合は、座標データ計算回路7は注目画素R44のR成分値R44と、注目画素R44の近傍にあって注目画素R44と垂直方向に並んでいる、注目画素と同じ色の画素R24、R64のR成分値R24、R64と、同じく注目画素R44の近傍にあって注目画素R44と垂直方向に並んでいる、不足色の画素G14、G34、G54、G74のG成分値G14、G34、G54、G74から、下記の式で示される二次元座標データ(xi,yi)、(i=1〜3)を定めて、定数計算回路9に出力する。   When the correlation direction determination signal in the correlation determination circuit 24 indicates a determination result that the correlation in the vertical direction is strong, the coordinate data calculation circuit 7 has an R component value R44 of the target pixel R44 and a vicinity of the target pixel R44. The R component values R24 and R64 of the pixels R24 and R64 of the same color as the target pixel, which are aligned in the vertical direction with the target pixel R44, are also in the vicinity of the target pixel R44 and are aligned in the vertical direction with the target pixel R44. From the G component values G14, G34, G54, and G74 of the insufficiently colored pixels G14, G34, G54, and G74, two-dimensional coordinate data (xi, yi) and (i = 1 to 3) represented by the following formulas are obtained. It is determined and output to the constant calculation circuit 9.

x1=R24
y1=(G14+G34)/2
x2=R44
y2=(G34+G54)/2
x3=R64
y3=(G54+G74)/2
x1 = R24
y1 = (G14 + G34) / 2
x2 = R44
y2 = (G34 + G54) / 2
x3 = R64
y3 = (G54 + G74) / 2

上記の式から分るように、上記の例では、X座標値xiとしては、撮像素子2から得られた各画素位置のR成分(既知色成分)の値がそのまま用いられ、Y座標値yiとしては、各画素位置の周囲、例えば上方及び下方に位置する画素のG成分(不足色成分)の平均が求められる。   As can be seen from the above equation, in the above example, as the X coordinate value xi, the value of the R component (known color component) at each pixel position obtained from the image sensor 2 is used as it is, and the Y coordinate value yi. For example, an average of G components (insufficient color components) of pixels located around each pixel position, for example, above and below is obtained.

一方、相関判別回路24からの相関方向判別信号が、水平方向の相関が強いという判別結果を示すものである場合は、座標データ計算回路7は注目画素R44のR成分値R44と、注目画素R44の近傍にあって注目画素R44と水平方向に並んでいる、注目画素と同じ色の画素R42、R46のR成分値R42、R46と、同じく注目画素の近傍にあって、注目画素R44と水平方向に並んでいる、不足色の画素G41、G43、G45、G47のG成分値G41、G43、G45、G47から、下記の式で示される二次元座標データ(xi,yi),(i=1〜3)を定めて、定数計算回路9に出力する。   On the other hand, when the correlation direction determination signal from the correlation determination circuit 24 indicates the determination result that the correlation in the horizontal direction is strong, the coordinate data calculation circuit 7 determines the R component value R44 of the target pixel R44 and the target pixel R44. R component values R42 and R46 of pixels R42 and R46 of the same color as the target pixel, which are adjacent to the target pixel R44, and are adjacent to the target pixel R44 in the horizontal direction. The two-dimensional coordinate data (xi, yi), (i = 1 to 1) represented by the following equation from the G component values G41, G43, G45, G47 of the insufficiently colored pixels G41, G43, G45, G47 3) is determined and output to the constant calculation circuit 9.

x1=R42
y1=(G41+G43)/2
x2=R44
y2=(G43+G45)/2
x3=R46
y3=(G45+G47)/2
x1 = R42
y1 = (G41 + G43) / 2
x2 = R44
y2 = (G43 + G45) / 2
x3 = R46
y3 = (G45 + G47) / 2

上記の式から分るように、上記の例では、X座標値xiとしては、撮像素子2から得られた各画素位置のR成分(既知色成分)の値がそのまま用いられ、Y座標値yiとしては、各画素位置の周囲、例えば左方及び右方に位置する画素のG成分(不足色成分)の平均が求められる。   As can be seen from the above equation, in the above example, as the X coordinate value xi, the value of the R component (known color component) at each pixel position obtained from the image sensor 2 is used as it is, and the Y coordinate value yi. For example, an average of G components (insufficient color components) of pixels located around each pixel position, for example, the left side and the right side is obtained.

定数計算回路9は、供給された二次元座標データ(xi,yi),(i=1〜3)を使い、実施の形態1で説明した上記の式(1)、(2)、(3)の計算をし、その結果得られた回帰線の傾きa、y切片bの値を補間演算回路11に、相関係数kを合成回路13に出力する。   The constant calculation circuit 9 uses the supplied two-dimensional coordinate data (xi, yi), (i = 1 to 3) and uses the above equations (1), (2), (3) described in the first embodiment. The values of the slopes a and y intercepts b of the regression line obtained as a result are output to the interpolation operation circuit 11 and the correlation coefficient k is output to the synthesis circuit 13.

補間演算回路11は、注目画素R44の位置におけるG成分値11OUTを、フレームメモリ5から送られてくる信号のうち、注目画素R44のR成分値R44と、定数計算回路9から送られてくる回帰線の傾きaとy切片bを用いた下記の式により計算し、出力する。   The interpolation calculation circuit 11 uses the G component value 11OUT at the position of the target pixel R44 as the R component value R44 of the target pixel R44 among the signals sent from the frame memory 5 and the regression sent from the constant calculation circuit 9. The calculation is performed according to the following equation using the line inclination a and the y-intercept b and output.

11OUT=a×R44+b   11OUT = a × R44 + b

ただし、実施の形態1と同様に、二次元座標データ(xi,yi),(i=1〜3)が、実施の形態1で説明した上記の[条件1]、[条件2]、[条件3]、[条件4]のいずれかに該当すると条件判定回路8が判定した場合は、定数計算回路9、補間演算回路11の動作は以下の通りである。   However, as in the first embodiment, the two-dimensional coordinate data (xi, yi), (i = 1 to 3) are converted into the above [Condition 1], [Condition 2], [Condition] described in the first embodiment. 3] and [Condition 4], when the condition determination circuit 8 determines that the condition is satisfied, the operations of the constant calculation circuit 9 and the interpolation calculation circuit 11 are as follows.

定数計算回路9では、合成回路13に対して、相関係数kの値として「1」を出力し、また、補間演算回路11に対して
回帰式を使用せず、線形補間を行うよう指示を出す。
The constant calculation circuit 9 outputs “1” as the value of the correlation coefficient k to the synthesis circuit 13 and instructs the interpolation calculation circuit 11 to perform linear interpolation without using a regression equation. put out.

補間演算回路11では、注目画素R44の位置におけるG成分値11OUTを、フレームメモリ5から送られてくる信号の一部(注目画素R44の近傍の画素の信号)を用いた下記の式による線形補間で計算し、出力する。   In the interpolation calculation circuit 11, linear interpolation according to the following equation using the G component value 11 OUT at the position of the target pixel R 44 as a part of the signal sent from the frame memory 5 (the signal of the pixel in the vicinity of the target pixel R 44). To calculate and output.

垂直方向の相関が強いとき
11OUT=(G34+G54)/2
水平方向の相関が強いとき
11OUT=(G43+G45)/2
11OUT = (G34 + G54) / 2 when the vertical correlation is strong
11OUT = (G43 + G45) / 2 when the horizontal correlation is strong

一方、補間回路12では、相関判別回路24から供給された判別結果に応じて、注目画素R44の位置におけるG成分値12OUTを、以下の様に計算し出力する。まず、相関判別回路24からの相関方向判別信号が、垂直方向の相関が強いという判別結果を示すものである場合は、補間回路12は、注目画素R44のR成分値R44及び注目画素R44の近傍の、垂直方向に並んだ画素R24、R64のR成分値R24、R64及び注目画素R44の近傍の垂直方向に並んだ画素G34、G54のG成分値G34、G54を用いた下記の式で、注目画素R44の位置におけるG成分値12OUTを計算し、出力する。   On the other hand, the interpolation circuit 12 calculates and outputs the G component value 12OUT at the position of the target pixel R44 as follows according to the determination result supplied from the correlation determination circuit 24. First, when the correlation direction determination signal from the correlation determination circuit 24 indicates a determination result that the correlation in the vertical direction is strong, the interpolation circuit 12 determines that the R component value R44 of the target pixel R44 and the vicinity of the target pixel R44. The following equation using the R component values R24 and R64 of the pixels R24 and R64 aligned in the vertical direction and the G component values G34 and G54 of the pixels G34 and G54 aligned in the vertical direction in the vicinity of the target pixel R44 The G component value 12OUT at the position of the pixel R44 is calculated and output.

Figure 0004128536
Figure 0004128536

一方、相関判別回路24からの相関方向判別信号が、水平方向の相関が強いという判別結果を示すものである場合は、補間回路12は、注目画素R44のR成分値R44及び注目画素R44の近傍の水平方向に並んだ画素R42、R46のR成分値R42、R46及び注目画素R44近傍の水平方向に並んだ画素G43、G45のG成分値G43、G45を用いた下記の式で、注目画素R44の位置におけるG成分値12OUTを計算し、出力する。   On the other hand, when the correlation direction determination signal from the correlation determination circuit 24 indicates the determination result that the correlation in the horizontal direction is strong, the interpolation circuit 12 determines that the R component value R44 of the target pixel R44 and the vicinity of the target pixel R44. The target pixel R44 is expressed by the following equation using the R component values R42 and R46 of the pixels R42 and R46 arranged in the horizontal direction and the G component values G43 and G45 of the pixels G43 and G45 arranged in the horizontal direction near the target pixel R44. The G component value 12OUT at the position is calculated and output.

Figure 0004128536
Figure 0004128536

上記のような補間回路12による補間は、各色成分の変化の様子に相似の関係があることを仮定して行われるものであり、図9や図10を参照して説明したのと同様の考え方で補間値が定められる。   The interpolation by the interpolation circuit 12 as described above is performed on the assumption that there is a similar relationship in the state of change of each color component, and the same idea as described with reference to FIGS. 9 and 10. The interpolation value is determined by.

合成回路13では、定数計算回路9から供給された相関係数kの絶対値に応じて、補間演算回路11から供給された補間値11OUTと、補間回路12から供給された補間値12OUTとを重み付け加算により合成して、その結果を合成された補間値13OUTとして出力する。この重み付け加算は、相関係数kの絶対値が「1」に近ければ、12OUTより11OUTの占める割合が大きくなるよう行われ、相関係数kの絶対値が「0」に近ければ、11OUTより12OUTの占める割合が大きくなるよう行われる。   In the synthesis circuit 13, the interpolation value 11 OUT supplied from the interpolation calculation circuit 11 and the interpolation value 12 OUT supplied from the interpolation circuit 12 are weighted according to the absolute value of the correlation coefficient k supplied from the constant calculation circuit 9. The result is synthesized by addition, and the result is output as a synthesized interpolation value 13OUT. This weighted addition is performed so that the proportion of 11OUT is larger than 12OUT if the absolute value of the correlation coefficient k is close to "1", and from 11OUT if the absolute value of the correlation coefficient k is close to "0". This is done so that the proportion occupied by 12OUT increases.

以上のようにして計算された補間値13OUTが、注目画素R44の位置におけるG成分値としてフレームメモリ5に書込まれる。   The interpolation value 13OUT calculated as described above is written in the frame memory 5 as the G component value at the position of the target pixel R44.

以上の補間処理がすべてのR画素の位置におけるG成分値に対して行われる。   The above interpolation processing is performed on the G component values at the positions of all R pixels.

以上はR画素の位置におけるG成分値を補間する方法であるが、B画素の位置におけるG成分値の補間もRとBが入れ替わる以外は同様に行われる。   The above is a method of interpolating the G component value at the position of the R pixel, but the interpolation of the G component value at the position of the B pixel is similarly performed except that R and B are interchanged.

次に、G画素の位置におけるR成分値及びB成分値の補間方法について説明する。G画素を中心にした場合、R、G、B各画素の配置は図7に見られるように、注目画素が奇数行にある場合(a)と、偶数行にある場合(b)とで異なる。まず、奇数行におけるG画素の位置におけるR成分値及びB成分値の補間を説明する。   Next, an interpolation method for the R component value and the B component value at the position of the G pixel will be described. When the G pixel is the center, the arrangement of the R, G, and B pixels is different between the case where the pixel of interest is in the odd row (a) and the case where the pixel of interest is in the even row (b), as shown in FIG. . First, the interpolation of the R component value and the B component value at the position of the G pixel in the odd row will be described.

最初に、奇数行におけるG画素の位置におけるR成分値及びB成分値の補間を図8を参照して説明する。図8に示すように、注目画素であるG画素を中心として、R成分を有する画素は水平向(左右方向)に位置しており、垂直方向(上下方向)には存在しない。   First, interpolation of the R component value and the B component value at the position of the G pixel in the odd-numbered row will be described with reference to FIG. As shown in FIG. 8, the pixel having the R component centered on the target pixel G pixel is located in the horizontal direction (left-right direction) and does not exist in the vertical direction (up-down direction).

まず、注目画素G44のG成分値G44と、注目画素G44の近傍にあり、注目画素G44と垂直方向に並び、注目画素と同じ色の画素G24、G64のG成分値G24、G64及び注目画素の近傍にあり、注目画素G44と垂直方向に並び、不足色の画素B14、B34、B54、B74のB成分値B14、B34、B54、B74と、注目画素G44の近傍にあり、注目画素と水平方向に並び注目画素G44と同じ色の画素G42、G46のG成分値G42、G46及び注目画素G44の近傍にあり、注目画素とに水平方向に並び不足色の画素R41、R43、R45、R47のR成分値R41、R43、R45、R47が、読み出し制御回路6により、フレームメモリから出力され、相関判別回路24、座標データ計算回路7、補間演算回路11、補間回路12に供給される。   First, the G component value G44 of the target pixel G44 and the G component values G24 and G64 of the pixels G24 and G64 that are in the vicinity of the target pixel G44, are aligned in the vertical direction with the target pixel G44, and have the same color as the target pixel. Near the target pixel G44, aligned in the vertical direction, in the vicinity of the B pixel values B14, B34, B54, and B74 of the pixels B14, B34, B54, and B74 of insufficient colors and the target pixel G44. R of pixel colors R41, R43, R45, and R47 of pixels R41, R43, R45, and R47 that are in the vicinity of the G component values G42 and G46 of the pixels G42 and G46 of the same color as the pixel of interest G44 and in the vicinity of the pixel of interest G44. The component values R41, R43, R45, and R47 are output from the frame memory by the read control circuit 6, and the correlation determination circuit 24, the coordinate data calculation circuit 7, and the interpolation performance are output. Circuit 11, is supplied to the interpolation circuit 12.

図8から分るように、注目画素G44に対して垂直方向にはR成分値に関する情報がなく、水平方向に関してはB成分値に関する情報がないことがわかる。すなわち、G画素の位置におけるR成分値及びB成分値の補間に際しては、垂直方向、水平方向いずれの方向に相関が強いかにかかわらず、垂直方向、水平方向いずれか一方の色信号を用いた補間しか行うことができない。したがってG画素の位置におけるR成分値及びB成分値の補間の際、相関判別回路24は相関方向判別を行わない。   As can be seen from FIG. 8, there is no information regarding the R component value in the vertical direction with respect to the target pixel G44, and there is no information regarding the B component value in the horizontal direction. That is, when interpolating the R component value and the B component value at the G pixel position, the color signal in either the vertical direction or the horizontal direction is used regardless of whether the correlation is strong in the vertical direction or the horizontal direction. Only interpolation can be performed. Accordingly, when interpolating the R component value and the B component value at the position of the G pixel, the correlation determination circuit 24 does not perform the correlation direction determination.

また、フレームメモリ5から出力されるデータは、実施の形態1においてG画素の位置におけるR成分値及びB成分値の補間の際にフレームメモリ5から出力されるデータと同じであり、G画素の位置におけるR成分値及びB成分値の補間における座標データ計算回路7、定数計算回路9、補間演算回路11、補間回路12、及び合成回路13の動作は、実施の形態1における動作と同じである。従って、その詳細の説明は省略する。
なおまた、実施の形態1と同様、条件1乃至条件4のいずれかが満たされた場合は、回帰分析に基づく補間の代わりに、周囲の画素に基づく線形補間を行う。
The data output from the frame memory 5 is the same as the data output from the frame memory 5 when the R component value and the B component value at the G pixel position are interpolated in the first embodiment. The operations of the coordinate data calculation circuit 7, the constant calculation circuit 9, the interpolation calculation circuit 11, the interpolation circuit 12, and the synthesis circuit 13 in the interpolation of the R component value and the B component value at the position are the same as those in the first embodiment. . Therefore, detailed description thereof is omitted.
As in the first embodiment, when any one of the conditions 1 to 4 is satisfied, linear interpolation based on surrounding pixels is performed instead of interpolation based on regression analysis.

以上、奇数行におけるG画素の位置におけるR成分値及びB成分値の補間を説明したが、偶数行におけるG画素の位置におけるR成分値及びB成分値の補間も同様に行われる。但し、奇数行のG画素の位置における補間に関する説明のうち、「R」と「B」を入れ替え、又は「垂直方向」と「水平方向」を入れ替える必要がある。これは、図7から分るように、注目画素Gに対して垂直方向にはR成分値があって、B成分値がなく、水平方向に関してはB成分値があってR成分値がないからである。   In the above, the interpolation of the R component value and the B component value at the position of the G pixel in the odd-numbered row has been described, but the interpolation of the R component value and the B component value at the position of the G pixel in the even-numbered row is similarly performed. However, among the descriptions regarding the interpolation at the positions of the odd-numbered G pixels, it is necessary to exchange “R” and “B” or “vertical direction” and “horizontal direction”. As can be seen from FIG. 7, this is because there is an R component value in the vertical direction with respect to the target pixel G, no B component value, and there is a B component value and no R component value in the horizontal direction. It is.

次にR画素の位置におけるB成分値の補間について述べる。なおR画素は、それ以前の補間により求められたG成分を有し、このG成分値が、以下に述べるR画素の位置におけるB成分値の補間に利用される。   Next, interpolation of the B component value at the position of the R pixel will be described. The R pixel has a G component obtained by the previous interpolation, and this G component value is used for interpolation of the B component value at the position of the R pixel described below.

図19はG成分を有するR画素の位置におけるB成分値を補間するために、フレームメモリ5から読み出される信号を示している。図示のように、注目画素であるR画素R44の位置のみならずその周囲にもG成分を有する画素が存在する。図19には、R画素の位置におけるB成分値の補間の際にフレームメモリ5から読み出されて、座標データ計算回路7、相関判別回路24、補間演算回路11、及び補間回路12に供給される画素信号の画素位置が模式的に示されている。   FIG. 19 shows a signal read from the frame memory 5 in order to interpolate the B component value at the position of the R pixel having the G component. As shown in the figure, there are pixels having the G component not only at the position of the R pixel R44 which is the target pixel but also around it. In FIG. 19, the B component value at the position of the R pixel is read from the frame memory 5 at the time of interpolation, and is supplied to the coordinate data calculation circuit 7, the correlation determination circuit 24, the interpolation calculation circuit 11, and the interpolation circuit 12. The pixel position of the pixel signal is schematically shown.

まず、読み出し制御回路6により、注目画素R44の位置におけるG成分値g44(小文字のgは、G成分値がそれ以前の補間により生成されたものであることを示す)と、注目画素R44の近傍にあり、注目画素R44と垂直方向に並び、注目画素R44と同じくG成分を有する画素G14、G34、G54、G74のG成分値G14、G34、G54、G74と、注目画素の近傍にあり、注目画素と垂直方向に並んだ、不足色の画素のB成分値b14、b34、b54、b74と、注目画素R44の近傍にあり、注目画素と水平方向に並び、注目画素R44と同じくG成分を有する画素G41、G43、G45、G47のG成分値G41、G43、G45、G47と、注目画素の近傍にあり、注目画素と水平方向に並んだ、不足色の画素のB成分値b41、b43、b45、b47が、フレームメモリ5から出力され、相関判別回路24、座標データ計算回路7、補間演算回路11、補間回路12に供給される。   First, the readout control circuit 6 causes the G component value g44 at the position of the target pixel R44 (lower case g indicates that the G component value was generated by previous interpolation) and the vicinity of the target pixel R44. G components values G14, G34, G54, and G74 of pixels G14, G34, G54, and G74 that are aligned in the vertical direction with the pixel of interest R44 and have the same G component as the pixel of interest R44, and in the vicinity of the pixel of interest The B component values b14, b34, b54, and b74 of the insufficiently colored pixels aligned in the vertical direction with the pixel are in the vicinity of the target pixel R44, are aligned in the horizontal direction with the target pixel, and have the same G component as the target pixel R44. G component values G41, G43, G45, and G47 of the pixels G41, G43, G45, and G47, and pixels of insufficient color that are in the vicinity of the target pixel and are aligned with the target pixel in the horizontal direction B component values b41, b43, b45, b47 is output from the frame memory 5, the correlation determination circuit 24, the coordinate data calculating circuit 7, interpolation calculation circuit 11, is supplied to the interpolation circuit 12.

相関判別回路24は、フレームメモリ5から供給された信号のうち、画素G34、G43、G45、G54のG成分値G34、G43、G45、G54を使って、R画素及びB画素の位置におけるG成分値の補間と同様に、画像が垂直方向及び水平方向のいずれの方向に強い相関性を有するかを判別し、その判別結果を示す相関方向判別信号を、座標データ計算回路7、補間演算回路11、補間回路12に出力する。   The correlation determination circuit 24 uses the G component values G34, G43, G45, and G54 of the pixels G34, G43, G45, and G54 among the signals supplied from the frame memory 5, and uses the G component at the positions of the R pixel and the B pixel. Similar to the value interpolation, it is determined whether the image has a strong correlation in the vertical direction or the horizontal direction, and a correlation direction determination signal indicating the determination result is used as the coordinate data calculation circuit 7 and the interpolation calculation circuit 11. To the interpolation circuit 12.

座標データ計算回路7は相関判別回路24から供給された相関方向判別信号に応じて、以下の様に動作する。   The coordinate data calculation circuit 7 operates as follows according to the correlation direction determination signal supplied from the correlation determination circuit 24.

相関判別回路24からの相関方向判別信号が、垂直方向の相関が強いという判別結果を示すものである場合は、座標データ計算回路7は、注目画素R44の近傍にあって注目画素R44と垂直方向に並んでいる画素G14のG成分値G14及びB成分値b14、画素G34のG成分値G34及びB成分値b34、画素G54のG成分値G54及びB成分値b54、画素G74のG成分値G74及びB成分値b74から、下記の式で示される二次元座標データ(xi,yi),(i=1〜4)を定めて、定数計算回路9に出力する。   When the correlation direction determination signal from the correlation determination circuit 24 indicates a determination result that the correlation in the vertical direction is strong, the coordinate data calculation circuit 7 is in the vicinity of the target pixel R44 and in the vertical direction. G component value G14 and B component value b14 of pixel G14, G component value G34 and B component value b34 of pixel G34, G component value G54 and B component value b54 of pixel G54, G component value G74 of pixel G74 And the two-dimensional coordinate data (xi, yi) and (i = 1 to 4) represented by the following formula are determined from the B component value b74 and output to the constant calculation circuit 9.

x1=G14
y1=b14
x2=G34
y2=b34
x3=G54
y3=b54
x4=G74
y4=b74
x1 = G14
y1 = b14
x2 = G34
y2 = b34
x3 = G54
y3 = b54
x4 = G74
y4 = b74

上記の式から分るように、X座標値xiとしては、撮像素子2から得られた各画素位置のG成分がそのまま用いられ、Y座標値yiとしては、以前の補間により求められた各画素位置のB成分がそのまま用いられる。   As can be seen from the above formula, as the X coordinate value xi, the G component at each pixel position obtained from the image sensor 2 is used as it is, and as the Y coordinate value yi, each pixel obtained by previous interpolation is used. The B component at the position is used as it is.

一方、相関判別回路24からの相関方向判別信号が、水平方向の相関が強いという判別結果を示すものである場合は、座標データ計算回路7は注目画素R44の近傍にあり、注目画素と水平方向に並んでいる画素G41のG成分値G41及びB成分値b41、画素G43のG成分値G43及びB成分値b43、画素G45のG成分値G45及びB成分値b45、画素G47のG成分値G47及びB成分値b47から、下記の式で示される二次元座標データ(xi,yi),(i=1〜4)を定めて、定数計算回路9に出力する。   On the other hand, when the correlation direction determination signal from the correlation determination circuit 24 indicates a determination result that the correlation in the horizontal direction is strong, the coordinate data calculation circuit 7 is in the vicinity of the target pixel R44, and the target pixel and the horizontal direction G component value G41 and B component value b41 of pixel G41, G component value G43 and B component value b43 of pixel G43, G component value G45 and B component value b45 of pixel G45, and G component value G47 of pixel G47. And the two-dimensional coordinate data (xi, yi) and (i = 1 to 4) represented by the following formula are determined from the B component value b47 and output to the constant calculation circuit 9.

x1=G41
y1=b41
x2=G43
y2=b43
x3=G45
y3=b45
x4=G47
y4=b47
x1 = G41
y1 = b41
x2 = G43
y2 = b43
x3 = G45
y3 = b45
x4 = G47
y4 = b47

上記の式から分るように、X座標値xiとしては、撮像素子2から得られた各画素位置のG成分がそのまま用いられ、Y座標値yiとしては、以前の補間により求められた各画素位置のB成分がそのまま用いられる。   As can be seen from the above formula, as the X coordinate value xi, the G component at each pixel position obtained from the image sensor 2 is used as it is, and as the Y coordinate value yi, each pixel obtained by previous interpolation is used. The B component at the position is used as it is.

定数計算回路9は、供給された二次元座標データ(xi,yi),(i=1〜4)を使い、上記の式(1)、(2)、(3)の計算をし、その結果得られた、回帰線の傾きa、y切片bの値を補間演算回路11に、相関係数kを合成回路13に出力する。   The constant calculation circuit 9 uses the supplied two-dimensional coordinate data (xi, yi), (i = 1 to 4) to calculate the above equations (1), (2), (3), and the result The obtained values of the slope a and y intercept b of the regression line are output to the interpolation calculation circuit 11 and the correlation coefficient k is output to the synthesis circuit 13.

補間演算回路11は、注目画素R44の位置におけるB成分値11OUTを、フレームメモリ5から送られてくる信号のうち、注目画素R44のG成分値g44と、定数計算回路9から送られてくる回帰線の傾きa、y切片bを用いた下記の式により計算し、出力する。   The interpolation calculation circuit 11 uses the B component value 11OUT at the position of the pixel of interest R44 as the G component value g44 of the pixel of interest R44 among the signals sent from the frame memory 5 and the regression sent from the constant calculation circuit 9. The calculation is performed according to the following equation using the line inclination a and y intercept b, and output.

11OUT=a×g44+b   11OUT = a × g44 + b

ただし、実施の形態1と同様に、二次元座標データ(xi,yi),(i=1〜4)が、上記の[条件1]、[条件2]、[条件3]、[条件4]のいずれかに該当すると条件判定回路8が判定した場合は、補間演算回路11、定数計算回路9の動作は以下の通りである。   However, as in the first embodiment, the two-dimensional coordinate data (xi, yi), (i = 1 to 4) are converted into the above [Condition 1], [Condition 2], [Condition 3], and [Condition 4]. When the condition determination circuit 8 determines that any of the above conditions is satisfied, the operations of the interpolation calculation circuit 11 and the constant calculation circuit 9 are as follows.

定数計算回路9では、合成回路13に対して、相関係数kとして「1」を出力し、また、補間演算回路11に対して
回帰式を使用せず、線形補間を行うよう指示を出す。
The constant calculation circuit 9 outputs “1” as the correlation coefficient k to the synthesis circuit 13 and instructs the interpolation calculation circuit 11 to perform linear interpolation without using a regression equation.

補間演算回路11では、注目画素R44の位置におけるB成分値11OUTを、フレームメモリ5から送られてくる信号の一部(注目画素R44の近傍の画素の信号)を用いた下記の式による線形補間で計算し、出力する。   In the interpolation calculation circuit 11, linear interpolation according to the following equation using the B component value 11 OUT at the position of the target pixel R 44 as a part of the signal sent from the frame memory 5 (the signal of the pixel in the vicinity of the target pixel R 44). To calculate and output.

垂直方向の相関が強いとき
11OUT=(b34+b54)/2
水平方向の相関が強いとき
11OUT=(b43+b45)/2
11OUT = (b34 + b54) / 2 when the correlation in the vertical direction is strong
11OUT = (b43 + b45) / 2 when the horizontal correlation is strong

一方、補間回路12では、相関判別回路24から供給された判別結果に応じて、注目画素R44の位置におけるG成分値12OUTを、以下の様に計算し出力する。まず、相関判別回路24からの相関方向判別信号が、垂直方向の相関が強いという判別結果を示すものである場合は、補間回路12は、注目画素R44のG成分値g44及び注目画素R44の近傍の、垂直方向に並んだ画素G34、G54のG成分値G34、G54及び注目画素R44の近傍の垂直方向に並んだ画素B34、B54のB成分値b34、b54を用いた下記の式で、注目画素R44の位置におけるB成分値12OUTを計算し、出力する。   On the other hand, the interpolation circuit 12 calculates and outputs the G component value 12OUT at the position of the target pixel R44 as follows according to the determination result supplied from the correlation determination circuit 24. First, when the correlation direction determination signal from the correlation determination circuit 24 indicates a determination result that the correlation in the vertical direction is strong, the interpolation circuit 12 determines that the G component value g44 of the target pixel R44 and the vicinity of the target pixel R44. The following formula using the G component values G34 and G54 of the pixels G34 and G54 arranged in the vertical direction and the B component values b34 and b54 of the pixels B34 and B54 arranged in the vertical direction near the target pixel R44 The B component value 12OUT at the position of the pixel R44 is calculated and output.

Figure 0004128536
Figure 0004128536

一方、相関判別回路24からの相関方向判別信号が、水平方向の相関が強いという判別結果を示すものである場合は、補間回路12は、注目画素R44のG成分値g44及び注目画素R44の近傍の水平方向に並んだ画素G43、G45のG成分値G43、G45及びB成分値b43、b45を用いた下記の式で、注目画素R44の位置におけるB成分値12OUTを計算し、出力する。   On the other hand, when the correlation direction determination signal from the correlation determination circuit 24 indicates the determination result that the correlation in the horizontal direction is strong, the interpolation circuit 12 determines that the G component value g44 of the target pixel R44 and the vicinity of the target pixel R44. The B component value 12OUT at the position of the target pixel R44 is calculated and output by the following equation using the G component values G43 and G45 and the B component values b43 and b45 of the pixels G43 and G45 arranged in the horizontal direction.

Figure 0004128536
Figure 0004128536

合成回路13では、定数計算回路9から供給された相関係数kの絶対値に応じて、補間演算回路11から供給された補間値11OUTと、補間回路12から供給された補間値12OUTとを重み付け加算により合成して、その結果を合成された補間値13OUTとして出力する。この重み付け加算は、相関係数kの絶対値が「1」に近ければ、12OUTより11OUTの占める割合が大きくなるよう行われ、相関係数kの絶対値が「0」に近ければ、11OUTより12OUTの占める割合が大きくなるよう行われる。   In the synthesis circuit 13, the interpolation value 11 OUT supplied from the interpolation calculation circuit 11 and the interpolation value 12 OUT supplied from the interpolation circuit 12 are weighted according to the absolute value of the correlation coefficient k supplied from the constant calculation circuit 9. The result is synthesized by addition, and the result is output as a synthesized interpolation value 13OUT. This weighted addition is performed so that the proportion of 11OUT is larger than 12OUT if the absolute value of the correlation coefficient k is close to "1", and from 11OUT if the absolute value of the correlation coefficient k is close to "0". This is done so that the proportion occupied by 12OUT increases.

以上のようにして計算された補間値13OUTが、注目画素R44の位置におけるB成分値としてフレームメモリ5に書込まれる。   The interpolation value 13OUT calculated as described above is written in the frame memory 5 as the B component value at the position of the target pixel R44.

以上の補間処理が全てのR画素の位置におけるB成分値に対して行われる。   The above interpolation processing is performed on the B component values at the positions of all R pixels.

以上はR画素の位置におけるB成分値を補間する方法であるが、B画素の位置におけるR成分値の補間もRとBが入れ替わる以外は同様に行われる。   The above is a method of interpolating the B component value at the position of the R pixel, but the interpolation of the R component value at the position of the B pixel is similarly performed except that R and B are interchanged.

以上により、補間処理が終了し、全画素に対して全不足色成分値が与えられ、R、G、B各色の成分値が揃い、フレームメモリ5に一枚の静止画像に相当する信号が蓄積されたことになる。フレームメモリ5に一枚の静止画像に相当する信号が蓄積されると、読み出し制御回路6はフレームメモリ5から一枚の静止画像に相当する信号5OUTを読み出し、補間処理回路4の外部へ出力する。   As described above, the interpolation processing is completed, all insufficient color component values are given to all pixels, the component values of R, G, and B colors are aligned, and a signal corresponding to one still image is accumulated in the frame memory 5. It will be done. When a signal corresponding to one still image is accumulated in the frame memory 5, the read control circuit 6 reads a signal 5 OUT corresponding to one still image from the frame memory 5 and outputs it to the outside of the interpolation processing circuit 4. .

上述の補間による効果は以下の通りである。
まず、補間演算回路11で行う補間は、実施の形態1において、補間演算回路11で行われる補間と同じであり、補間回路12で行われる補間は、実施の形態1において、補間回路12で行われる補間と同じであり、定数計算回路9で計算される値は実施の形態1において定数計算回路9で計算される値と同じであり、また、合成回路13における動作は実施の形態1における合成回路13と同等である。従って、本実施の形態においても、実施の形態1と同等の効果がある。
The effects of the interpolation described above are as follows.
First, the interpolation performed by the interpolation calculation circuit 11 is the same as the interpolation performed by the interpolation calculation circuit 11 in the first embodiment, and the interpolation performed by the interpolation circuit 12 is performed by the interpolation circuit 12 in the first embodiment. The value calculated by the constant calculation circuit 9 is the same as the value calculated by the constant calculation circuit 9 in the first embodiment, and the operation in the synthesis circuit 13 is the synthesis in the first embodiment. It is equivalent to the circuit 13. Therefore, this embodiment has the same effect as that of the first embodiment.

加えて、実施の形態2においては、相関判別回路24にて相関判別を行い、補間処理に用いる信号を画像において相関の強い方向のものに限っている。すなわち、相関の強い信号を用いた補間を行うので、実施の形態1に比べ、より精度のよい補間処理を行うことができる。   In addition, in the second embodiment, the correlation determination circuit 24 performs correlation determination, and the signals used for the interpolation processing are limited to those having a strong correlation in the image. That is, since interpolation is performed using a signal having a strong correlation, interpolation processing with higher accuracy can be performed as compared with the first embodiment.

なお、合成回路13では、補間演算回路11からの補間値11OUTと補間回路12からの補間値12OUTのいずれか一方を選択するようにしてもよい。例えば、閾値を設定し、定数計算回路9で計算された相関係数kの絶対値がこの閾値より大きければ、補間演算回路11からの補間値11OUTを出力し、定数計算回路9で計算された相関係数kの絶対値がこの閾値以下であれば、補間回路12からの補間値12OUTを出力するといった方法が考えられる。
なお、いずれか一方を選択する動作は、重み付け係数を「0」と「1」に設定することに相当する。
Note that the synthesis circuit 13 may select one of the interpolation value 11OUT from the interpolation calculation circuit 11 and the interpolation value 12OUT from the interpolation circuit 12. For example, if a threshold value is set and the absolute value of the correlation coefficient k calculated by the constant calculation circuit 9 is larger than this threshold value, the interpolation value 11OUT from the interpolation calculation circuit 11 is output and calculated by the constant calculation circuit 9 If the absolute value of the correlation coefficient k is less than or equal to this threshold value, a method of outputting the interpolation value 12OUT from the interpolation circuit 12 is conceivable.
Note that the operation of selecting one of them corresponds to setting the weighting coefficient to “0” or “1”.

また、フルカラー画像撮像装置の構成は図1以外に様々なものが考えられる。たとえば、撮像画像を保存するための記憶媒体を搭載したり、画像圧縮処理を行う回路を組み合わせるなどである。   Various configurations of the full-color image capturing apparatus other than FIG. 1 are conceivable. For example, a storage medium for storing a captured image is mounted, or a circuit that performs image compression processing is combined.

実施の形態3.
次に、実施の形態2で説明した補間処理に相当する機能をソフトウエアで実現した例を説明する。
この実施の形態3で用いられる補間処理回路34の構成は図20に示すごとくであり、図17の補間処理回路4の構成要素のうち、相関判別回路24、座標データ計算回路7、定数計算回路9、補間演算回路11、補間回路12、及び合成回路13の代わりにプロセッサ35を有する。このプロセッサ35は、図21、図22、図23のフローチャートに示すように動作する。
Embodiment 3 FIG.
Next, an example in which a function corresponding to the interpolation processing described in the second embodiment is realized by software will be described.
The configuration of the interpolation processing circuit 34 used in the third embodiment is as shown in FIG. 20. Among the components of the interpolation processing circuit 4 in FIG. 17, the correlation determination circuit 24, the coordinate data calculation circuit 7, and the constant calculation circuit. 9. A processor 35 is provided instead of the interpolation calculation circuit 11, the interpolation circuit 12, and the synthesis circuit 13. The processor 35 operates as shown in the flowcharts of FIGS.

対象となる画素群は、実施の形態1と同じく図2に示すように配列されたものである。補間処理回路34で行われる補間には、
(P1) R画素及びB画素の位置におけるG成分値を求める処理、
(P2) G画素の位置におけるR成分値及びB成分値を求める処理、
(P3) R画素の位置におけるB成分値を求める処理、及び
(P4) B画素の位置におけるR成分値を求める処理
が含まれ、例えば上に記載の順で行われる。
The target pixel group is arranged as shown in FIG. 2 as in the first embodiment. The interpolation performed by the interpolation processing circuit 34 includes:
(P1) Processing for obtaining G component values at the positions of the R pixel and the B pixel;
(P2) Processing for obtaining the R component value and the B component value at the position of the G pixel,
(P3) includes processing for obtaining the B component value at the position of the R pixel, and (P4) processing for obtaining the R component value at the position of the B pixel, and is performed, for example, in the order described above.

最初に、R画素及びB画素の位置におけるG成分値の補間方法について説明する。まず、R画素の位置におけるG成分値の補間について図21及び図18を参照して説明する。   First, a G component value interpolation method at the positions of the R pixel and the B pixel will be described. First, interpolation of the G component value at the position of the R pixel will be described with reference to FIGS. 21 and 18.

図21はR画素の位置におけるG成分値の補間の際のプロセッサ35の動作を示すフローチャート、図18はR画素の位置におけるG成分値の補間を行う際に利用される画素とその色成分値を示す。図18におけるR画素R44が注目画素になる。   FIG. 21 is a flowchart showing the operation of the processor 35 at the time of interpolation of the G component value at the position of the R pixel, and FIG. 18 is a pixel used at the time of interpolation of the G component value at the position of the R pixel and its color component value. Indicates. The R pixel R44 in FIG. 18 becomes the target pixel.

まず、図21のステップST21で注目画素を中心に水平方向及び垂直方向のいずれに相関が強いかが判別される。この判別のため、注目画素R44の近傍のG画素、例えば注目画素と水平方向、垂直方向に並び注目画素に隣接するG画素のG成分値G34、G43、G45、G54を用いて、以下の値dV、dHが計算される。   First, in step ST21 in FIG. 21, it is determined whether the correlation is strong in the horizontal direction or the vertical direction around the target pixel. For this determination, using the G component values G34, G43, G45, and G54 of the G pixel in the vicinity of the target pixel R44, for example, the G pixel that is aligned with the target pixel in the horizontal and vertical directions and is adjacent to the target pixel, dV and dH are calculated.

dV=|G34−G54|
dH=|G43−G45|
dV = | G34-G54 |
dH = | G43-G45 |

垂直方向の相関が強い場合はdV<dHとなり水平方向の相関が強い場合はdV>dHとなるので、dV<dHなら垂直方向の相関が強いと判別され、それ以外の場合は水平方向の相関が強いと判別され、判別結果に応じて次に行われる処理が選択される。   When the correlation in the vertical direction is strong, dV <dH and when the correlation in the horizontal direction is strong, dV> dH. Therefore, if dV <dH, it is determined that the correlation in the vertical direction is strong. Otherwise, the correlation in the horizontal direction is determined. Is determined to be strong, and a process to be performed next is selected according to the determination result.

まず、垂直方向の相関が強い場合の処理について説明する。   First, processing when the correlation in the vertical direction is strong will be described.

ステップST22Aで、注目画素R44のR成分値R44と、注目画素R44の近傍にあって注目画素R44に垂直方向に並んでいる注目画素と同じ色の画素R24、R64のR成分値R24、R64と、同じく注目画素R44の近傍にあって注目画素R44に垂直方向に並んでいる、不足色の画素G14、G34、G54、G74のG成分値G14、G34、G54、G74から、下記の式で示される二次元座標データ(xi,yi),(i=1〜3)が定められる。   In step ST22A, the R component value R44 of the target pixel R44 and the R component values R24 and R64 of the pixels R24 and R64 of the same color as the target pixel that are adjacent to the target pixel R44 and are aligned in the vertical direction are From the G component values G14, G34, G54, and G74 of the insufficiently colored pixels G14, G34, G54, and G74 that are also in the vicinity of the target pixel R44 and aligned in the vertical direction, Two-dimensional coordinate data (xi, yi), (i = 1 to 3) are determined.

x1=R24
y1=(G14+G34)/2
x2=R44
y2=(G34+G54)/2
x3=R64
y3=(G54+G74)/2
x1 = R24
y1 = (G14 + G34) / 2
x2 = R44
y2 = (G34 + G54) / 2
x3 = R64
y3 = (G54 + G74) / 2

上記の式から分るように、X座標値xiとしては、撮像素子2から得られた各画素位置のR成分がそのまま用いられ、Y座標値yiとしては、各画素位置の周囲の、例えば上方及び下方の画素のG成分の平均が求められる。   As can be seen from the above formula, as the X coordinate value xi, the R component of each pixel position obtained from the image sensor 2 is used as it is, and as the Y coordinate value yi, for example, an upper part around each pixel position. And the average of the G component of the lower pixel is obtained.

次にステップST23Aで、二次元座標データ(xi,yi),(i=1〜3)が、上記の[条件1]、[条件2]、[条件3]、[条件4]のいずれかに該当するかがチェックされる。二次元座標データ(xi,yi),(i=1〜3)が[条件1]、[条件2]、[条件3]、[条件4]のいずれにも該当しない場合は、次にステップST24A1、ST25A1、ST26A1の処理が行われ、いずれかに該当する場合は、次にステップST25A2、ST26A2の処理が行われる。   Next, in step ST23A, the two-dimensional coordinate data (xi, yi), (i = 1 to 3) is set to any one of [Condition 1], [Condition 2], [Condition 3], and [Condition 4]. It is checked whether it is applicable. If the two-dimensional coordinate data (xi, yi), (i = 1 to 3) does not correspond to any of [Condition 1], [Condition 2], [Condition 3], and [Condition 4], then step ST24A1 , ST25A1 and ST26A1 are performed, and if any of them is satisfied, the processes of steps ST25A2 and ST26A2 are performed.

次に、ステップST24A1、ST25A1、ST26A1の処理について述べる。   Next, processing in steps ST24A1, ST25A1, and ST26A1 will be described.

ステップST24A1では、二次元座標データ(xi,yi),(i=1〜3)を使い、上記の式(1)、(2)の計算が行われ、定数a、b(回帰線の傾きa、y切片bの値)が求められる。   In step ST24A1, using the two-dimensional coordinate data (xi, yi), (i = 1 to 3), the above formulas (1) and (2) are calculated, and constants a and b (regression line slope a , The value of y intercept b).

そして、ステップST25A1で、定数a、bと注目画素R44のR成分値R44を用いた下記の式で注目画素R44の位置におけるG成分値OUT1が求められる。   In step ST25A1, the G component value OUT1 at the position of the target pixel R44 is obtained by the following equation using the constants a and b and the R component value R44 of the target pixel R44.

OUT1=a×R44+b   OUT1 = a × R44 + b

ステップST26A1では、二次元座標データ(xi,yi),(i=1〜3)を使い、上記の式(3)の計算が行われ、相関係数kが求められる。   In step ST26A1, using the two-dimensional coordinate data (xi, yi), (i = 1 to 3), the above equation (3) is calculated, and the correlation coefficient k is obtained.

次に、ステップST25A2、ST26A2の処理について述べる。   Next, processing in steps ST25A2 and ST26A2 will be described.

ステップST25A2では、注目画素R44の位置におけるG成分値OUT1が、注目画素の近傍の画素を用いた下記の式による線形補間で求められる。   In step ST25A2, the G component value OUT1 at the position of the target pixel R44 is obtained by linear interpolation using the following formula using pixels in the vicinity of the target pixel.

OUT1=(G34+G54)/2   OUT1 = (G34 + G54) / 2

次に、ステップST26A2で相関係数の値が「1」に決められる。   Next, in step ST26A2, the value of the correlation coefficient is determined to be “1”.

ステップST23Aでの判定結果に応じてステップST24A1、ST25A1、ST26A1又はステップST25A2、ST26A2の処理が行われた後、ステップST27Aで下記の計算式により、注目画素R44の位置におけるG成分値OUT2が求められる。   After the processing of step ST24A1, ST25A1, ST26A1, or step ST25A2, ST26A2 is performed according to the determination result in step ST23A, the G component value OUT2 at the position of the target pixel R44 is obtained by the following calculation formula in step ST27A. .

Figure 0004128536
Figure 0004128536

ステップST27Aにおける計算は、相似関係を仮定した補間であり、実施の形態2において補間回路12で行った補間処理に相当する。
一方、ステップST24A1乃至ST26A1、ST25A2、ST25A2の処理が、実施の形態2において補間演算回路11などで行った補間処理に相当する。
The calculation in step ST27A is interpolation assuming a similar relationship, and corresponds to the interpolation processing performed by the interpolation circuit 12 in the second embodiment.
On the other hand, the processing of steps ST24A1 to ST26A1, ST25A2, and ST25A2 corresponds to the interpolation processing performed by the interpolation arithmetic circuit 11 or the like in the second embodiment.

以上はステップST21において垂直方向の相関が強いと判定された場合の処理である。以下にステップST21において水平方向の相関が強いと判定された場合の処理を述べる。   The above is the processing when it is determined in step ST21 that the correlation in the vertical direction is strong. The processing when it is determined in step ST21 that the horizontal correlation is strong will be described.

ステップST22Bで、注目画素R44のR成分値R44と、注目画素の近傍にあり、該注目画素と水平方向に並んでいる、注目画素と同じ色の画素R42、R46のR成分値R42、R46と、同じく注目画素の近傍にあって、注目画素と水平方向に並んでいる、不足色の画素G41、G43、G45、G47のG成分値G41、G43、G45、G47から、下記の式で示される二次元座標データ(xi,yi),(i=1〜3)が定められる。   In step ST22B, the R component value R44 of the target pixel R44 and the R component values R42 and R46 of the pixels R42 and R46 of the same color as the target pixel that are in the vicinity of the target pixel and are aligned in the horizontal direction with the target pixel From the G component values G41, G43, G45, and G47 of the insufficiently colored pixels G41, G43, G45, and G47 that are also in the vicinity of the target pixel and are aligned in the horizontal direction, the following expression is used. Two-dimensional coordinate data (xi, yi), (i = 1 to 3) are determined.

x1=R42
y1=(G41+G43)/2
x2=R44
y2=(G43+G45)/2
x3=R46
y3=(G45+G47)/2
x1 = R42
y1 = (G41 + G43) / 2
x2 = R44
y2 = (G43 + G45) / 2
x3 = R46
y3 = (G45 + G47) / 2

上記の式から分るように、X座標値xiとしては、撮像素子2から得られた各画素位置のR成分がそのまま用いられ、Y座標値yiとしては、各画素位置の周囲の、例えば上方及び下方の画素のG成分の平均が求められる。   As can be seen from the above formula, as the X coordinate value xi, the R component of each pixel position obtained from the image sensor 2 is used as it is, and as the Y coordinate value yi, for example, an upper part around each pixel position. And the average of the G component of the lower pixel is obtained.

次にステップST23Bで、二次元座標データ(xi,yi),(i=1〜3)が、上記の[条件1]、[条件2]、[条件3]、[条件4]のいずれかに該当するかどうかチェックされる。二次元座標データ(xi,yi),(i=1〜3)が[条件1]、[条件2]、[条件3]、[条件4]のいずれにも該当しない場合は、次にステップST24B1、ST25B1、ST26B1の処理を行い、いずれかに該当する場合は、次にステップST25B2、ST26B2の処理が行われる。   Next, in step ST23B, the two-dimensional coordinate data (xi, yi), (i = 1 to 3) is set to any one of [Condition 1], [Condition 2], [Condition 3], and [Condition 4]. It is checked whether it is applicable. If the two-dimensional coordinate data (xi, yi), (i = 1 to 3) does not correspond to any of [Condition 1], [Condition 2], [Condition 3] and [Condition 4], then step ST24B1 , ST25B1 and ST26B1 are performed, and if any of them is satisfied, the processes of steps ST25B2 and ST26B2 are performed next.

次に、ステップST24B1、ST25B1、ST26B1の処理について述べる。   Next, processing in steps ST24B1, ST25B1, and ST26B1 will be described.

ステップST24B1では、二次元座標データ(xi,yi),(i=1〜3)を使い、上記の式(1)、(2)の計算が行われ定数a、b(回帰線の傾きa、y切片bの値)が求められる。   In step ST24B1, using the two-dimensional coordinate data (xi, yi), (i = 1 to 3), the above equations (1) and (2) are calculated, and constants a and b (regression line slope a, value of y intercept b) is obtained.

そして、ステップST25B1で、定数a、bと注目画素R44のR画素値R44を用いた下記の式で注目画素R44の位置におけるG成分値OUT1が求められる。   In step ST25B1, the G component value OUT1 at the position of the target pixel R44 is obtained by the following equation using the constants a and b and the R pixel value R44 of the target pixel R44.

OUT1=a×R44+b   OUT1 = a × R44 + b

ステップST26B1では、二次元座標データ(xi,yi),(i=1〜3)を使い、上記の式(3)の計算が行われ、相関係数kが求められる。   In step ST26B1, the above equation (3) is calculated using the two-dimensional coordinate data (xi, yi), (i = 1 to 3), and the correlation coefficient k is obtained.

次に、ステップST25B2、ST26B2の処理について述べる。   Next, processing in steps ST25B2 and ST26B2 will be described.

ステップST25B2では、注目画素R44の位置におけるG成分値OUT1が、注目画素の近傍の画素を用いた下記の式による線形補間で求められる。   In step ST25B2, the G component value OUT1 at the position of the target pixel R44 is obtained by linear interpolation using the following formula using pixels near the target pixel.

OUT1=(G43+G45)/2   OUT1 = (G43 + G45) / 2

次に、ステップST26B2で相関係数の値が「1」に決められる。   Next, in step ST26B2, the value of the correlation coefficient is determined to be “1”.

ステップST23Bでの判定結果に応じてステップST24B1、ST25B1、ST26B1又はステップST25B2、ST26B2の処理が行われた後、ステップST27Bで下記の計算式により、注目画素R44の位置におけるG成分値OUT2が求められる。   After the processing of step ST24B1, ST25B1, ST26B1 or step ST25B2, ST26B2 is performed according to the determination result in step ST23B, the G component value OUT2 at the position of the target pixel R44 is obtained by the following calculation formula in step ST27B. .

Figure 0004128536
Figure 0004128536

ステップST27Bにおける計算は、相似関係を仮定した補間であり、実施の形態2において補間回路12で行った補間処理に相当する。
一方、ステップST24B1乃至ST26B1、ST25B2、ST26B2の処理が、実施の形態2において補間演算回路11などで行った補間処理に相当する。
The calculation in step ST27B is interpolation assuming a similar relationship, and corresponds to the interpolation processing performed by the interpolation circuit 12 in the second embodiment.
On the other hand, the processing of steps ST24B1 to ST26B1, ST25B2, and ST26B2 corresponds to the interpolation processing performed by the interpolation arithmetic circuit 11 or the like in the second embodiment.

以上の処理の後、ステップST28で、相関係数kの値に応じて、OUT1とOUT2の重み付け加算による合成が行われる。
合成は、相関係数kの絶対値が「1」に近ければ、OUT1の値の占める割合が大きくなるように、相関係数kの絶対値が「0」に近ければOUT2の値の占める割合が大きくなるように行われる。
After the above processing, in step ST28, synthesis by weighted addition of OUT1 and OUT2 is performed according to the value of the correlation coefficient k.
The composition is such that if the absolute value of the correlation coefficient k is close to “1”, the proportion of the value of OUT1 increases. If the absolute value of the correlation coefficient k is close to “0”, the proportion of the value of OUT2 Is done to increase.

以上により補間された不足色成分値(補間値)OUTがステップST29で、注目画素R44の位置における、合成されたG成分値としてフレームメモリ5に書込まれる。   In step ST29, the insufficient color component value (interpolation value) OUT interpolated as described above is written in the frame memory 5 as the synthesized G component value at the position of the target pixel R44.

以上の補間処理がすべてのR画素の位置におけるG成分値に対して行われる。   The above interpolation processing is performed on the G component values at the positions of all R pixels.

以上はR画素の位置におけるG成分値を補間する方法であるが、B画素の位置におけるG成分値の補間もRとBが入れ替わる以外は同様に行われる。   The above is a method of interpolating the G component value at the position of the R pixel, but the interpolation of the G component value at the position of the B pixel is similarly performed except that R and B are interchanged.

次に、G画素の位置におけるR成分値及びB成分値を補間する方法を述べる。   Next, a method for interpolating the R component value and the B component value at the position of the G pixel will be described.

G画素を中心にした場合、R、G、B各画素の配置は図7に見られるように、注目画素が奇数行にある場合(a)と、偶数行にある場合(b)とで異なる。まず、奇数行におけるG画素の位置におけるR成分値及びB成分値の補間を、図22及び図8を参照して説明する。   When the G pixel is the center, the arrangement of the R, G, and B pixels is different between the case where the pixel of interest is in the odd row (a) and the case where the pixel of interest is in the even row (b), as shown in FIG. . First, the interpolation of the R component value and the B component value at the position of the G pixel in the odd row will be described with reference to FIGS.

図22はG画素の位置におけるR成分値及びB成分値の補間の際のプロセッサ35の動作を示すフローチャートである。図8におけるG画素G44が注目画素になる。   FIG. 22 is a flowchart showing the operation of the processor 35 at the time of interpolation of the R component value and the B component value at the position of the G pixel. The G pixel G44 in FIG.

最初に奇数行のG画素の位置におけるR成分値の補間について述べる。   First, the interpolation of R component values at the positions of odd-numbered G pixels will be described.

まず、ステップST31にて、注目画素G44のG成分値及び注目画素G44近傍のG画素G42、G44、G46のG成分値G42、G44、G46及びR画素R41、R43、R45、R47のR成分値R41、R43、R45、R47を用いて下記の式により二次元座標データ(xi,yi)、(i=1〜3)が定められる。   First, in step ST31, the G component value of the target pixel G44 and the G component values G42, G44, and G46 of the G pixels G42, G44, and G46 in the vicinity of the target pixel G44 and the R component values of the R pixels R41, R43, R45, and R47. Two-dimensional coordinate data (xi, yi) and (i = 1 to 3) are determined by the following formula using R41, R43, R45, and R47.

x1=G42
y1=(R41+R43)/2
x2=G44
y2=(R43+R45)/2
x3=G46
y3=(R45+R47)/2
x1 = G42
y1 = (R41 + R43) / 2
x2 = G44
y2 = (R43 + R45) / 2
x3 = G46
y3 = (R45 + R47) / 2

上記の式から分るように、X座標値xiとしては、撮像素子2から得られた各画素位置のG成分がそのまま用いられ、Y座標値yiとしては、各画素位置の周囲の、例えば左方及び右方の画素のR成分の平均が求められる。   As can be seen from the above formula, as the X coordinate value xi, the G component of each pixel position obtained from the image sensor 2 is used as it is, and as the Y coordinate value yi, for example, the left around each pixel position An average of the R components of the right and right pixels is obtained.

次にステップST32にて、二次元座標データ(xi,yi),(i=1〜3)が[条件1]、[条件2]、[条件3]、[条件4]のいずれかに該当するかチェックされる。二次元座標データ(xi,yi),(i=1〜3)が[条件1]、[条件2]、[条件3]、[条件4]のいずれにも該当しない場合は、ステップST33A、ST34A、ST35Aの処理が行われ、いずれかに該当する場合はステップST34B、ST35Bの処理が行われる。   Next, in step ST32, the two-dimensional coordinate data (xi, yi), (i = 1 to 3) corresponds to any of [Condition 1], [Condition 2], [Condition 3], and [Condition 4]. Is checked. If the two-dimensional coordinate data (xi, yi), (i = 1 to 3) does not correspond to any of [Condition 1], [Condition 2], [Condition 3], and [Condition 4], steps ST33A and ST34A The process of ST35A is performed, and in the case of any of these, the processes of steps ST34B and ST35B are performed.

次に、ステップST33A、ST34A、ST35Aの処理について述べる。   Next, the processing of steps ST33A, ST34A, ST35A will be described.

ステップST33Aでは、二次元座標データ(xi,yi),(i=1〜3)を使い、上記の式(1)、(2)の計算が行われ、定数a、b(回帰線の傾きa、y切片bの値)が求められる。   In step ST33A, using the two-dimensional coordinate data (xi, yi), (i = 1 to 3), the above formulas (1) and (2) are calculated, and constants a and b (regression line slope a , The value of y intercept b).

そして、ステップST34Aで、定数a、bと注目画素G44のG成分値G44を用いた下記の式で注目画素G44の位置におけるR成分値OUT1が求められる。   In step ST34A, the R component value OUT1 at the position of the target pixel G44 is obtained by the following equation using the constants a and b and the G component value G44 of the target pixel G44.

OUT1=a×G44+b   OUT1 = a × G44 + b

ステップST35Aでは、二次元座標データ(xi,yi),(i=1〜3)を使い、上記の式(3)の計算が行われ、相関係数kが求められる。   In step ST35A, using the two-dimensional coordinate data (xi, yi), (i = 1 to 3), the above equation (3) is calculated to obtain the correlation coefficient k.

次に、ステップST34B、ST35Bの処理について述べる。   Next, processing in steps ST34B and ST35B will be described.

ステップST34Bでは、注目画素G44の位置におけるR成分値OUT1が、注目画素の近傍の画素を用いた下記の式による線形補間で求められる。   In step ST34B, the R component value OUT1 at the position of the target pixel G44 is obtained by linear interpolation according to the following equation using pixels in the vicinity of the target pixel.

OUT1=(R43+R45)/2 OUT1 = (R43 + R45) / 2

次に、ステップST35Bでは、相関係数kの値が「1」に決められる。   Next, in step ST35B, the value of correlation coefficient k is determined to be “1”.

ステップST32での判定結果に応じて、ステップST33A、ST34A、ST35A又はステップST34B、ST35Bの処理が行われた後、ステップST36で下記の計算式により、注目画素G44におけるR成分値OUT2が求められる。   After the processing of steps ST33A, ST34A, ST35A or steps ST34B, ST35B is performed according to the determination result in step ST32, the R component value OUT2 in the target pixel G44 is obtained by the following calculation formula in step ST36.

Figure 0004128536
Figure 0004128536

ステップST36における計算は、相似関係を仮定した補間であり、実施の形態2において補間回路12で行った補間処理に相当する。
一方、ステップST33A乃至ST35A、ST34B、ST35Bの処理が、実施の形態2において補間演算回路11等で行った補間処理に相当する。
The calculation in step ST36 is an interpolation assuming a similar relationship, and corresponds to the interpolation processing performed by the interpolation circuit 12 in the second embodiment.
On the other hand, the processing of steps ST33A to ST35A, ST34B, ST35B corresponds to the interpolation processing performed by the interpolation arithmetic circuit 11 or the like in the second embodiment.

以上の処理の後、ステップST37で、相関係数kの値に応じて、OUT1とOUT2の重み付け加算により合成が行われる。合成は、相関係数kの絶対値が「1」に近ければ、OUT1の値の占める割合が大きくなるように、相関係数kの絶対値が「0」に近ければOUT2の値の占める割合が大きくなるように行われる。   After the above processing, in step ST37, synthesis is performed by weighted addition of OUT1 and OUT2 according to the value of the correlation coefficient k. The composition is such that if the absolute value of the correlation coefficient k is close to “1”, the proportion of the value of OUT1 increases. If the absolute value of the correlation coefficient k is close to “0”, the proportion of the value of OUT2 Is done to increase.

以上により補間された不足色成分値(補間値)OUTがステップST38で、注目画素G44の位置における、合成されたR成分値としてフレームメモリ5に書込まれる。   In step ST38, the insufficient color component value (interpolation value) OUT interpolated as described above is written in the frame memory 5 as the synthesized R component value at the position of the target pixel G44.

以上の補間処理がすべての奇数行のG画素の位置におけるR成分値に対して行われる。   The above interpolation processing is performed on the R component values at the positions of all the odd-numbered G pixels.

次に、奇数行におけるG画素の位置におけるB成分値の補間について説明する。   Next, the interpolation of the B component value at the position of the G pixel in the odd row will be described.

まず、ステップST31にて、注目画素G44のG成分値及び注目画素G44の近傍のG画素G24、G44、G64のG成分値G24、G44、G64及びB画素B14、B34、B54、B74のB成分値B14、B34、B54、B74を用いて、下記の式により二次元座標データ(xi,yi)、(i=1〜3)が定められる。   First, in step ST31, the G component value of the target pixel G44 and the G component values G24, G44, and G64 of the G pixels G24, G44, and G64 near the target pixel G44 and the B components of the B pixels B14, B34, B54, and B74 Using the values B14, B34, B54, and B74, two-dimensional coordinate data (xi, yi) and (i = 1 to 3) are determined by the following formula.

x1=G24
y1=(B14+B34)/2
x2=G44
y2=(B34+B54)/2
x3=G64
y3=(B54+B74)/2
x1 = G24
y1 = (B14 + B34) / 2
x2 = G44
y2 = (B34 + B54) / 2
x3 = G64
y3 = (B54 + B74) / 2

上記の式から分るように、X座標値xiとしては、撮像素子2から得られたその画素位置のG成分がそのまま用いられ、Y座標値yiとしては、各画素位置の上方及び下方の画素のB成分の平均が求められる。   As can be seen from the above formula, as the X coordinate value xi, the G component at the pixel position obtained from the image sensor 2 is used as it is, and as the Y coordinate value yi, the pixels above and below each pixel position are used. The average of the B component is obtained.

次にステップST32にて、二次元座標データ(xi,yi),(i=1〜3)が[条件1]、[条件2]、[条件3]、[条件4]のいずれかに該当するかチェックされる。二次元座標データ(xi,yi),(i=1〜3)が[条件1]、[条件2]、[条件3]、[条件4]のいずれにも該当しない場合は、ステップST33A、ST34A、ST35Aの処理が行われ、いずれかに該当する場合はステップST34B、ST35Bの処理が行われる。   Next, in step ST32, the two-dimensional coordinate data (xi, yi), (i = 1 to 3) corresponds to any of [Condition 1], [Condition 2], [Condition 3], and [Condition 4]. Is checked. If the two-dimensional coordinate data (xi, yi), (i = 1 to 3) does not correspond to any of [Condition 1], [Condition 2], [Condition 3], and [Condition 4], steps ST33A and ST34A The process of ST35A is performed, and in the case of any of these, the processes of steps ST34B and ST35B are performed.

次に、ステップST33A、ST34A、ST35Aの処理について述べる。   Next, the processing of steps ST33A, ST34A, ST35A will be described.

ステップST33Aでは、二次元座標データ(xi,yi),(i=1〜3)を使い、上記の式(1)、(2)の計算が行われ、定数a、b(回帰線の傾きa、y切片bの値)が求められる。   In step ST33A, using the two-dimensional coordinate data (xi, yi), (i = 1 to 3), the above formulas (1) and (2) are calculated, and constants a and b (regression line slope a , The value of y intercept b).

そして、ステップST34Aで、定数a、bと注目画素G44のG成分値G44を用いた下記の式で注目画素G44の位置におけるB成分値OUT1が求められる。   In step ST34A, the B component value OUT1 at the position of the target pixel G44 is obtained by the following equation using the constants a and b and the G component value G44 of the target pixel G44.

OUT1=a×G44+b   OUT1 = a × G44 + b

ステップST35Aでは、二次元座標データ(xi,yi),(i=1〜3)を使い、上記の式(3)の計算が行われ、相関係数kが求められる。   In step ST35A, using the two-dimensional coordinate data (xi, yi), (i = 1 to 3), the above equation (3) is calculated to obtain the correlation coefficient k.

次に、ステップST34B、ST35Bの処理について述べる。   Next, processing in steps ST34B and ST35B will be described.

ステップST34Bでは、注目画素G44の位置におけるB成分値OUT1が、注目画素の近傍の画素を用いた下記の式による線形補間で求められる。   In step ST34B, the B component value OUT1 at the position of the target pixel G44 is obtained by linear interpolation according to the following equation using pixels near the target pixel.

OUT1=(B34+B54)/2   OUT1 = (B34 + B54) / 2

次に、ステップST35Bでは、相関係数kの値が「1」に決められる。   Next, in step ST35B, the value of correlation coefficient k is determined to be “1”.

ステップST32での判定結果に応じて、ステップST33A、ST34A、ST35A又はステップST34B、ST35Bの処理が行われた後、ステップST36で下記の計算式により、注目画素G44におけるB成分値OUT2が求められる。   After the processing of steps ST33A, ST34A, ST35A or steps ST34B, ST35B is performed according to the determination result at step ST32, the B component value OUT2 at the target pixel G44 is obtained by the following calculation formula at step ST36.

Figure 0004128536
Figure 0004128536

ステップST36における計算は、相似関係を仮定した補間であり、実施の形態2において補間回路12で行った補間処理に相当する。
一方、ステップST33A乃至ST35A、ST34B、ST35Bの処理が、実施の形態2において補間演算回路11などで行った補間処理に相当する。
The calculation in step ST36 is an interpolation assuming a similar relationship, and corresponds to the interpolation processing performed by the interpolation circuit 12 in the second embodiment.
On the other hand, the processing of steps ST33A to ST35A, ST34B, ST35B corresponds to the interpolation processing performed by the interpolation calculation circuit 11 or the like in the second embodiment.

以上の処理の後、ステップST37で、相関係数kの値に応じて、OUT1とOUT2の重み付け加算による合成が行われる。合成は、相関係数kの絶対値が「1」に近ければ、OUT1の値の占める割合が大きくなるように、相関係数kの絶対値が「0」に近ければOUT2の値の占める割合が大きくなるように行われる。   After the above processing, in step ST37, combining by weighted addition of OUT1 and OUT2 is performed according to the value of the correlation coefficient k. The composition is such that if the absolute value of the correlation coefficient k is close to “1”, the proportion of the value of OUT1 increases. If the absolute value of the correlation coefficient k is close to “0”, the proportion of the value of OUT2 Is done to increase.

以上により補間された不足色成分値(補間値)OUTがステップST38で、注目画素G44の位置における、合成されたB成分値としてフレームメモリ5に書込まれる。   In step ST38, the insufficient color component value (interpolation value) OUT interpolated as described above is written in the frame memory 5 as the synthesized B component value at the position of the target pixel G44.

以上の補間処理が全ての奇数行のG画素の位置におけるB成分値に対して行われる。   The above interpolation processing is performed on the B component values at the positions of all odd-numbered G pixels.

以上、奇数行におけるG画素の位置におけるR成分値及びB成分値の補間を説明したが、偶数行におけるG画素の位置におけるR成分値及びB成分値の補間も同様に行われる。但し、奇数行のG画素の位置における補間に関する説明のうち、「R」と「B」を入れ替え、又は「垂直方向」と「水平方向」を入れ替える必要がある。これは、図7から分るように、注目画素Gに対して垂直方向にはR成分値があって、B成分値がなく、水平方向に関してはB成分値があってR成分値がないからである。   In the above, the interpolation of the R component value and the B component value at the position of the G pixel in the odd-numbered row has been described, but the interpolation of the R component value and the B component value at the position of the G pixel in the even-numbered row is similarly performed. However, among the descriptions regarding the interpolation at the positions of the odd-numbered G pixels, it is necessary to exchange “R” and “B” or “vertical direction” and “horizontal direction”. As can be seen from FIG. 7, this is because there is an R component value in the vertical direction with respect to the target pixel G, no B component value, and there is a B component value and no R component value in the horizontal direction. It is.

次にR画素の位置におけるB成分値の補間方法を図23及び図19を参照して説明する。   Next, a method of interpolating the B component value at the R pixel position will be described with reference to FIGS.

図23はR画素の位置におけるB成分値の補間の際のプロセッサ35の動作を示すフローチャートである。図19におけるR画素R44が注目画素になる。なおR画素は、それ以前の補間により求められたG成分を有し、このG成分値が、以下に述べるR画素の位置におけるB成分値の補間に利用される   FIG. 23 is a flowchart showing the operation of the processor 35 at the time of interpolation of the B component value at the position of the R pixel. The R pixel R44 in FIG. 19 becomes the target pixel. The R pixel has a G component obtained by previous interpolation, and this G component value is used for interpolation of the B component value at the position of the R pixel described below.

まず図23のステップST41で、注目画素を中心に水平方向及び垂直方向のいずれに相関が強いかが判別される。この判別のため、注目画素R44の近傍のG画素、例えば注目画素に隣接するG画素のG成分値G34、G43、G45、G54を用いて、以下の値dV、dHが計算される。   First, in step ST41 in FIG. 23, it is determined whether the correlation is strong in the horizontal direction or the vertical direction around the target pixel. For this determination, the following values dV and dH are calculated using G component values G34, G43, G45, and G54 of G pixels near the target pixel R44, for example, G pixels adjacent to the target pixel.

dV=|G34−G54|
dH=|G43−G45|
dV = | G34-G54 |
dH = | G43-G45 |

垂直方向の相関が強い場合はdV<dHとなり水平方向の相関が強い場合はdV>dHとなるので、dV<dHなら垂直方向の相関が強いと判別され、それ以外の場合は水平方向の相関が強いと判別され、判別結果に応じて次に行われる処理が選択される。   When the correlation in the vertical direction is strong, dV <dH and when the correlation in the horizontal direction is strong, dV> dH. Therefore, if dV <dH, it is determined that the correlation in the vertical direction is strong. Otherwise, the correlation in the horizontal direction is determined. Is determined to be strong, and a process to be performed next is selected according to the determination result.

まず、垂直方向の相関が強い場合の処理について説明する。   First, processing when the correlation in the vertical direction is strong will be described.

ステップST42Aで、注目画素R44の近傍にあって注目画素R44に垂直方向に並んでいる、注目画素と同じ色成分を有する画素G14のG成分値G14及びB成分値b14、画素G34のG成分値G34及びB成分値b34、G54のG成分値G54及びB成分値b54、G74のG成分値G74及びB成分値b74から下記の式で示される二次元座標データ(xi,yi),(i=1〜4)が定められる。   In step ST42A, the G component value G14 and the B component value b14 of the pixel G14 that are in the vicinity of the target pixel R44 and are arranged in the vertical direction of the target pixel R44 and have the same color component as the target pixel, and the G component value of the pixel G34 G34 and B component values b34, G54 G component values G54 and B component values b54, G74 G component values G74 and B component values b74, and two-dimensional coordinate data (xi, yi), (i = 1-4) are defined.

x1=G14
y1=b14
x2=G34
y2=b34
x3=G54
y3=b54
x4=G74
y4=b74
x1 = G14
y1 = b14
x2 = G34
y2 = b34
x3 = G54
y3 = b54
x4 = G74
y4 = b74

上記の式から分るように、X座標値xiとしては、撮像素子2から得られた各画素位置のG成分がそのまま用いられ、Y座標値yiとしては、以前の補間により求められた各画素位置のB成分がそのまま用いられる。   As can be seen from the above formula, as the X coordinate value xi, the G component at each pixel position obtained from the image sensor 2 is used as it is, and as the Y coordinate value yi, each pixel obtained by previous interpolation is used. The B component at the position is used as it is.

次に、ステップST43Aで、二次元座標データ(xi,yi),(i=1〜4)が[条件1]、[条件2]、[条件3]、[条件4]のいずれかに該当するかがチェックされる。二次元座標データ(xi,yi),(i=1〜4)が[条件1]、[条件2]、[条件3]、[条件4]のいずれにも該当しない場合は、ステップST44A1、ST45A1、ST46A1の処理が行われ、いずれかに該当する場合はステップST45A2、ST46A2の処理が行われる。   Next, in step ST43A, the two-dimensional coordinate data (xi, yi), (i = 1 to 4) corresponds to any of [Condition 1], [Condition 2], [Condition 3], and [Condition 4]. Is checked. If the two-dimensional coordinate data (xi, yi), (i = 1 to 4) does not correspond to any of [Condition 1], [Condition 2], [Condition 3], and [Condition 4], steps ST44A1 and ST45A1 , ST46A1 is performed, and in any case, the processes of steps ST45A2 and ST46A2 are performed.

次に、ステップST44A1、ST45A1、ST46A1の処理について述べる。   Next, processing in steps ST44A1, ST45A1, and ST46A1 will be described.

ステップST44A1では、二次元座標データ(xi,yi),(i=1〜4)を使い、上記の式(1)、(2)の計算が行われ、定数a、b(回帰線の傾きa、y切片bの値)が求められる。   In step ST44A1, using the two-dimensional coordinate data (xi, yi), (i = 1 to 4), the above formulas (1) and (2) are calculated, and constants a and b (regression line slope a , The value of y intercept b).

そしてステップST45A1で、定数a、bと注目画素R44のG成分値g44を用いた下記の式により、注目画素R44の位置におけるB成分値OUT1が求められる。   In step ST45A1, the B component value OUT1 at the position of the target pixel R44 is obtained by the following formula using the constants a and b and the G component value g44 of the target pixel R44.

OUT1=a×g44+b   OUT1 = a × g44 + b

ステップST46A1では、二次元座標データ(xi,yi),(i=1〜4)を使い、上記の式(3)の計算が行われ、相関係数kが求められる。   In step ST46A1, using the two-dimensional coordinate data (xi, yi), (i = 1 to 4), the calculation of the above equation (3) is performed to obtain the correlation coefficient k.

次に、ステップST45A2、ST46A2の処理について述べる。   Next, processing in steps ST45A2 and ST46A2 will be described.

ステップST45A2では、注目画素R44の位置におけるB成分値OUT1が、注目画素の近傍の画素を用いた下記の式による線形補間で求められる。   In step ST45A2, the B component value OUT1 at the position of the target pixel R44 is obtained by linear interpolation using the following formula using pixels in the vicinity of the target pixel.

OUT1=(b34+b54)/2   OUT1 = (b34 + b54) / 2

次に、ステップST46A2で相関係数の値が「1」と決められる。   Next, in step ST46A2, the value of the correlation coefficient is determined to be “1”.

ステップST43Aでの判定結果に応じてステップST44A1、ST45A1、ST46A1又はステップST45A2、ST46A2の処理が行われた後、ステップST47Aで下記の計算式により、注目画素R44の位置におけるB成分値OUT2が計算される。   After the processing of step ST44A1, ST45A1, ST46A1 or step ST45A2, ST46A2 is performed according to the determination result in step ST43A, the B component value OUT2 at the position of the target pixel R44 is calculated by the following calculation formula in step ST47A. The

Figure 0004128536
Figure 0004128536

ステップST47Aにおける計算は、相似関係を仮定した補間であり、実施の形態2において補間回路12で行った補間処理に相当する。一方、ステップST44A1乃至ST46A1、ST45A2、ST46A2の処理が、実施の形態2において補間演算回路11などで行った補間処理に相当する。   The calculation in step ST47A is an interpolation assuming a similar relationship, and corresponds to the interpolation process performed by the interpolation circuit 12 in the second embodiment. On the other hand, the processing of steps ST44A1 to ST46A1, ST45A2, and ST46A2 corresponds to the interpolation processing performed by the interpolation arithmetic circuit 11 or the like in the second embodiment.

以上はステップST41にて垂直方向の相関が強いと判定された場合の処理である。以下にステップST41において水平方向の相関が強いと判定された場合の処理を述べる。   The above is the processing when it is determined in step ST41 that the correlation in the vertical direction is strong. The processing when it is determined in step ST41 that the horizontal correlation is strong will be described.

ステップST42Bで、注目画素の近傍にあり、該注目画素と水平方向に並んでいる、注目画素と同じ色成分を有する画素G41のG成分値G41及びB成分値b41、画素G43のG成分値G43及びB成分値b43、画素G45のG成分値G45及びB成分値b45、画素G47のG成分値G47及びB成分値b47から、下記の式で示される二次元座標データ(xi,yi),(i=1〜4)が定められる。   In step ST42B, the G component value G41 and the B component value b41 of the pixel G41 that are in the vicinity of the target pixel and are arranged in the horizontal direction with the target pixel and that have the same color component as the target pixel, and the G component value G43 of the pixel G43. And B component value b43, G component value G45 and B component value b45 of pixel G45, G component value G47 and B component value b47 of pixel G47, two-dimensional coordinate data (xi, yi), ( i = 1 to 4) is determined.

x1=G41
y1=b41
x2=G43
y2=b43
x3=G45
y3=b45
x4=G47
y4=b47
x1 = G41
y1 = b41
x2 = G43
y2 = b43
x3 = G45
y3 = b45
x4 = G47
y4 = b47

上記の式から分るように、X座標値xiとしては、撮像素子2から得られた各画素位置のG成分がそのまま用いられ、Y座標値yiとしては、以前の補間により求められた各画素位置の画素のB成分がそのまま用いられる。   As can be seen from the above formula, as the X coordinate value xi, the G component at each pixel position obtained from the image sensor 2 is used as it is, and as the Y coordinate value yi, each pixel obtained by previous interpolation is used. The B component of the pixel at the position is used as it is.

次にステップST43Bで、二次元座標データ(xi,yi),(i=1〜4)が、上記の[条件1]、[条件2]、[条件3]、[条件4]のいずれかに該当するかどうかチェックされる。二次元座標データ(xi,yi),(i=1〜4)が[条件1]、[条件2]、[条件3]、[条件4]のいずれにも該当しない場合は、次にステップST44B1、ST45B1、ST46B1の処理が行われ、いずれかに該当する場合は、次にステップST45B2、ST46B2の処理が行われる。   Next, in step ST43B, the two-dimensional coordinate data (xi, yi), (i = 1 to 4) is set to any one of [Condition 1], [Condition 2], [Condition 3], and [Condition 4]. It is checked whether it is applicable. If the two-dimensional coordinate data (xi, yi), (i = 1 to 4) does not correspond to any of [Condition 1], [Condition 2], [Condition 3], and [Condition 4], then step ST44B1 , ST45B1 and ST46B1 are performed, and if any of them is satisfied, the processes of steps ST45B2 and ST46B2 are performed.

次に、ステップST44B1、ST45B1、ST46B1での処理について述べる。   Next, processing in steps ST44B1, ST45B1, and ST46B1 will be described.

ステップST44B1では、二次元座標データ(xi,yi),(i=1〜4)を使い、上記の式(1)、(2)の計算が行われ、定数a、b(回帰線の傾きa、y切片bの値)が求められる。   In step ST44B1, using the two-dimensional coordinate data (xi, yi), (i = 1 to 4), the above formulas (1) and (2) are calculated, and constants a and b (regression line slope a , The value of y intercept b).

そしてステップST45B1で、定数a、bと注目画素R44のG成分値g44を用いた下記の式で注目画素R44の位置におけるB成分値OUT1が求められる。   In step ST45B1, the B component value OUT1 at the position of the target pixel R44 is obtained by the following equation using the constants a and b and the G component value g44 of the target pixel R44.

OUT1=a×g44+b   OUT1 = a × g44 + b

ステップST46B1では、二次元座標データ(xi,yi),(i=1〜4)を使い、上記の式(3)の計算が行われ、相関係数kが求められる。   In step ST46B1, using the two-dimensional coordinate data (xi, yi), (i = 1 to 4), the calculation of the above equation (3) is performed to obtain the correlation coefficient k.

次に、ステップST45B2、ST46B2での処理について述べる。   Next, processing in steps ST45B2 and ST46B2 will be described.

ステップST45B2では、注目画素の近傍の画素を用いた下記の式による線形補間で、注目画素R44の位置におけるB成分値OUT1が求められる。   In step ST45B2, the B component value OUT1 at the position of the target pixel R44 is obtained by linear interpolation using the following expression using pixels in the vicinity of the target pixel.

OUT1=(b43+b45)/2   OUT1 = (b43 + b45) / 2

次に、ステップST46B2で相関係数の値が「1」と決められる。   Next, in step ST46B2, the value of the correlation coefficient is determined to be “1”.

ステップST43Bでの判定結果によりステップST44B1、ST45B1、ST46B1又はステップST45B2、ST46B2の処理が行われた後、ステップST47Bでは下記の計算式により、注目画素R44の位置におけるB成分値OUT2が求められる。   After the processing of step ST44B1, ST45B1, ST46B1 or step ST45B2, ST46B2 is performed based on the determination result in step ST43B, in step ST47B, the B component value OUT2 at the position of the target pixel R44 is obtained by the following calculation formula.

Figure 0004128536
Figure 0004128536

ステップST47Bにおける計算は、相似関係を仮定した補間であり、実施の形態2において補間回路12で行った補間処理に相当する。一方、ステップST44B1乃至ST46B1、ST45B2、ST46B2の処理が、実施の形態2において補間演算回路11などで行った補間処理に相当する。   The calculation in step ST47B is interpolation assuming a similar relationship, and corresponds to the interpolation processing performed by the interpolation circuit 12 in the second embodiment. On the other hand, the processing of steps ST44B1 to ST46B1, ST45B2, and ST46B2 corresponds to the interpolation processing performed by the interpolation arithmetic circuit 11 or the like in the second embodiment.

以上の処理の後、ステップST48で、相関係数kの値に応じて、OUT1とOUT2の重み付け加算による合成が行われる。合成は、相関係数kの絶対値が「1」に近ければ、OUT1の値の占める割合が大きくなるように、相関係数の絶対値が0に近ければOUT2の値の占める割合が大きくなるように行われる。   After the above processing, in step ST48, synthesis by weighted addition of OUT1 and OUT2 is performed according to the value of the correlation coefficient k. In the synthesis, if the absolute value of the correlation coefficient k is close to “1”, the proportion of the value of OUT1 increases, and if the absolute value of the correlation coefficient is close to 0, the proportion of the value of OUT2 increases. To be done.

以上により補間された不足色成分値(補間値)OUTがステップST29で、注目画素R44の位置における、合成されたB成分値としてフレームメモリ5に書込まれる。   In step ST29, the insufficient color component value (interpolated value) OUT interpolated as described above is written in the frame memory 5 as the synthesized B component value at the position of the target pixel R44.

以上の補間処理がすべてのR画素の位置におけるB成分値に対して行われる。   The above interpolation processing is performed on the B component values at the positions of all R pixels.

以上はR画素の位置におけるB成分値を補間する方法であるが、B画素の位置におけるR成分値の補間もRとBが入れ替わる以外は同様に行われる。   The above is a method of interpolating the B component value at the position of the R pixel, but the interpolation of the R component value at the position of the B pixel is similarly performed except that R and B are interchanged.

以上により、補間処理が終了し、全画素に対して全不足色成分値が与えられ、R、G、B各色の成分値が揃い、フレームメモリ5に一枚のフルカラー静止画像に相当する信号が蓄積されたことになる。フレームメモリ5に一枚の静止画像に相当する信号が蓄積されると、読み出し制御回路6はフレームメモリ5から一枚の静止画像に相当する信号5OUTを読み出し、補間処理回路34の外部へ出力する。   As described above, the interpolation processing is completed, all insufficient color component values are given to all pixels, the component values of R, G, and B colors are aligned, and a signal corresponding to one full-color still image is received in the frame memory 5. Accumulated. When a signal corresponding to one still image is accumulated in the frame memory 5, the read control circuit 6 reads a signal 5 OUT corresponding to one still image from the frame memory 5 and outputs it to the outside of the interpolation processing circuit 34. .

上述した補間方法によれば、実施の形態2で説明した画素信号処理装置における補間処理回路4と同じ処理をソフトウエアで実現することができ、同じ効果を得ることができる。   According to the interpolation method described above, the same processing as the interpolation processing circuit 4 in the pixel signal processing apparatus described in the second embodiment can be realized by software, and the same effect can be obtained.

なお、ステップST28、ST37、ST48では相関係数を用いた重み付け加算でOUT1とOUT2を合成するとしたが、ある閾値を設定し、相関係数kの絶対値がこの閾値より大きい場合はOUT1を、そうでない場合はOUT2を選択するようにしてもよい。なお、このように、いずれか一方を選択する動作は、重み付け係数を0と1に設定することに相当する。   In steps ST28, ST37, and ST48, OUT1 and OUT2 are synthesized by weighted addition using the correlation coefficient. However, when a certain threshold is set and the absolute value of the correlation coefficient k is larger than this threshold, OUT1 is set. Otherwise, OUT2 may be selected. Note that the operation of selecting one of them corresponds to setting the weighting coefficient to 0 and 1.

なお、本発明をベイヤ配列型の撮像素子から得られる画像データの補間に適用する場合について説明したが、本発明はこれに限定されない。   Although the case where the present invention is applied to interpolation of image data obtained from a Bayer array type image sensor has been described, the present invention is not limited to this.

上記の実施の形態では、二次元撮像素子が、R、G、Bの3つの色の色フィルタがベイヤ型に配置されたものであるが、本発明は、一般的に言えば、各々が第1乃至第N(上記の実施の形態ではN=3)の分光感度特性のうちのいずれか1つの分光感度特性を有する第1乃至第N種類の光電変換素子が2次元平面上に配列された撮像素子を備える場合に適用可能である。また、補間のために用いられる画素信号(或いは色成分値)は、撮像素子2から得られた信号に限らず、補間により得られた画素信号(色成分値)を他の色の補間に用いても良い。したがって、一般化して言えば、本発明による画素信号処理装置は、二次元平面上に配列され、各々が第1乃至第Nの互いに異なる色成分のいずれかを有する複数の画素の、それぞれの色成分の値を表す画素信号の組に基づいて、第J(Jは1からNのうちのいずれか一つ)の色成分を有する注目画素の位置における第K(KはJを除く1からNのうちのいずれか一つ)の色成分の値を表す画素信号を補間により生成するものである。そして、第1の補間手段(31)としては、注目画素及び注目画素の近傍の第Jの色成分を有する画素の第Jの色成分の値を表す画素信号と、注目画素の近傍の第Kの色成分を有する画素の第Kの色成分の値を表す画素信号をもとに、注目画素の近傍における第Jの色成分の値と第Kの色成分の値の関係を表す回帰式の定数を計算する回帰式計算手段(7+9)と、回帰式計算手段で計算した定数を含む、第Jの色成分の値と第Kの色成分の値の関係を表す回帰式を用いた補間演算、又は注目画素の周囲の画素の色成分の値の平均を求める補間演算を行なう補間演算回路(11)とを備えたものを用いうる。   In the above-described embodiment, the two-dimensional image pickup device has three color filters of R, G, and B arranged in a Bayer shape. First to Nth types of photoelectric conversion elements having any one of the 1st to Nth (N = 3 in the above embodiment) spectral sensitivity characteristics are arranged on a two-dimensional plane. The present invention is applicable when an image sensor is provided. Further, the pixel signal (or color component value) used for interpolation is not limited to the signal obtained from the image sensor 2, and the pixel signal (color component value) obtained by interpolation is used for interpolation of other colors. May be. Therefore, in general terms, the pixel signal processing apparatus according to the present invention is arranged on a two-dimensional plane, and each color of a plurality of pixels each having any one of the first to Nth different color components. Based on the set of pixel signals representing the component values, the Kth (K is 1 to N excluding J) at the position of the pixel of interest having the Jth (J is one of 1 to N) color components. The pixel signal representing the value of any one of the color components is generated by interpolation. As the first interpolation means (31), the pixel signal indicating the value of the Jth color component of the pixel having the target pixel and the Jth color component in the vicinity of the target pixel, and the Kth in the vicinity of the target pixel. Based on the pixel signal representing the value of the Kth color component of the pixel having the color component, a regression equation representing the relationship between the value of the Jth color component and the value of the Kth color component in the vicinity of the target pixel Interpolation calculation using a regression equation that represents the relationship between the value of the Jth color component and the value of the Kth color component, including the regression equation calculation means (7 + 9) that calculates the constant and the constant calculated by the regression equation calculation means Alternatively, a circuit provided with an interpolation calculation circuit (11) for performing an interpolation calculation for obtaining an average of color component values of pixels around the target pixel can be used.

回帰式計算手段(7+9)は、注目画素及びその近傍のM個の画素の位置の各画素に対して、上記各画素の第Jの色成分の値に基づいて、又は上記各画素の近傍の第Jの色成分を有する画素の第Jの色成分の値に基づいてX座標値xiを求め、上記各画素の第Kの色成分の値に基づいて、又は上記各画素の近傍の第Kの色成分を有する画素の第Kの色成分の値に基づいてY座標値yiを求め、M個の画素に対してそれぞれ求められたX座標値(xi)及びY座標値yiで構成される、二次元座標データ(xi,yi)(i=1〜M)を出力する座標データ計算手段(7)と、座標データ計算手段から出力されたM個の二次元座標データ(xi,yi),(i=1〜M)に対して、X座標値を説明変数、Y座標値を目的変数として回帰分析を行なって回帰式y=ax+bの定数a、bを求める定数計算回路(9)とを備え、第1の補間手段(31)が、注目画素の第Jの色成分の値Xjと定数a及びbとを用い、下記の式
Yk=a×Xj+b
により、注目画素の位置における第Kの色成分の値Ykを求める補間演算回路11をさらに有する。
The regression equation calculation means (7 + 9) is configured to calculate, for each pixel at the position of the pixel of interest and M pixels in the vicinity thereof, based on the value of the Jth color component of each pixel or in the vicinity of each pixel. An X coordinate value xi is obtained based on the value of the Jth color component of the pixel having the Jth color component, and based on the value of the Kth color component of each pixel or in the vicinity of the Kth color of each pixel. Y coordinate value yi is obtained based on the value of the Kth color component of the pixel having the color components, and is composed of the X coordinate value (xi) and Y coordinate value yi obtained for each of the M pixels. , Coordinate data calculation means (7) for outputting two-dimensional coordinate data (xi, yi) (i = 1 to M), and M two-dimensional coordinate data (xi, yi) output from the coordinate data calculation means, Regression analysis is performed for (i = 1 to M) using the X coordinate value as the explanatory variable and the Y coordinate value as the objective variable. And a constant calculation circuit (9) for obtaining constants a and b of the regression equation y = ax + b, and the first interpolation means (31) uses the value Xj of the Jth color component of the pixel of interest and the constants a and b. And the following formula: Yk = a × Xj + b
Thus, an interpolation calculation circuit 11 for obtaining the value Yk of the Kth color component at the position of the target pixel is further provided.

一方、第2の補間手段(12)としては、画素の二次元平面上の配列を互いに直交するH軸及びV軸を含む二次元座標平面上に表し、色成分値を二次元平面に垂直なZ軸に表す三次元直交座標系において、注目画素の周辺の複数の第Jの色成分を有する画素のそれぞれの位置における、それらの画素の第Jの色成分の値の平均値と、注目画素の位置における該注目画素の色成分の値とで作る第1の幾何学図形と、注目画素の周辺の複数の第Kの色成分を有する画素のそれぞれの位置における、それらの画素の第Kの色成分の平均値と、第2の補間手段で補間により求められる注目画素の位置における第Kの色成分の値とで作る第2の幾何学図形とが互いに相似になるように、注目画素の位置における第Kの色成分の値を定めるものを用いうる。別の見方をすれば、この第2の補間手段は、注目画素の周辺の複数の第Jの色成分を有する画素の第Jの色成分の値の平均値と、注目画素の位置における第Jの色成分の値との差と、上記平均値の計算に用いられた複数の画素及び注目画素相互間の二次元平面上における距離との比と、注目画素の周辺の複数の第Kの色成分を有する画素の第Kの色成分の値の平均値と、第2の補間手段で補間により求められる注目画素の位置における第Kの色成分の値との差と、上記平均値の計算に用いられた複数の画素及び注目画素相互間の二次元平面上における距離との比が互いに同じになるように、注目画素の位置における第Kの色成分の値を定めるものである。   On the other hand, as the second interpolation means (12), the arrangement of the pixels on the two-dimensional plane is represented on a two-dimensional coordinate plane including the H axis and the V axis orthogonal to each other, and the color component value is perpendicular to the two-dimensional plane. In the three-dimensional orthogonal coordinate system represented on the Z axis, the average value of the values of the Jth color component of the pixels at the positions of the pixels having a plurality of Jth color components around the pixel of interest, and the pixel of interest A first geometrical figure formed by the value of the color component of the pixel of interest at the position of the pixel of interest, and the Kth of the pixels at the respective positions of the pixels having a plurality of Kth color components around the pixel of interest The second geometric figure formed by the average value of the color components and the value of the Kth color component at the position of the target pixel obtained by interpolation by the second interpolation means is similar to each other. What determines the value of the Kth color component at the position can be usedFrom another viewpoint, the second interpolation means calculates the average value of the values of the Jth color component of the pixels having a plurality of Jth color components around the pixel of interest and the Jth at the position of the pixel of interest. The ratio of the difference from the color component value to the distance between the plurality of pixels and the target pixel used for calculating the average value on the two-dimensional plane, and the plurality of Kth colors around the target pixel The difference between the average value of the Kth color component value of the pixel having the component and the value of the Kth color component at the position of the target pixel obtained by interpolation by the second interpolation means, and the calculation of the average value The value of the Kth color component at the position of the target pixel is determined so that the ratio between the plurality of used pixels and the distance between the target pixels on the two-dimensional plane is the same.

また、上記の実施の形態では、第1の補間演算回路が回帰分析による補間又は線形補間を行い、第2の補間回路が色成分値相互間の相似関係を仮定した補間を行っているが、本発明はこれに限定されず、第1の補間回路と第2の補間回路が異なる方法で補間を行うものであれば良い。
さらに、上記の実施の形態では、フレームメモリを用いているが、代わりに補間処理に必要なライン数の記憶が可能なラインメモリを用いても良い。
In the above-described embodiment, the first interpolation operation circuit performs interpolation by regression analysis or linear interpolation, and the second interpolation circuit performs interpolation assuming a similar relationship between color component values. The present invention is not limited to this, as long as the first interpolation circuit and the second interpolation circuit perform interpolation using different methods.
Furthermore, although the frame memory is used in the above embodiment, a line memory capable of storing the number of lines necessary for the interpolation process may be used instead.

この発明の実施の形態1の画素信号処理装置を示すブロック図である。1 is a block diagram illustrating a pixel signal processing device according to a first embodiment of the present invention. 画素のベイヤ型配列を示す図である。It is a figure which shows the Bayer type | mold arrangement | sequence of a pixel. 補間処理による不足色成分の生成を示す図である。It is a figure which shows the production | generation of the insufficient color component by an interpolation process. 図1の画素信号処理装置の補間処理回路4の構成を示すブロック図である。It is a block diagram which shows the structure of the interpolation process circuit 4 of the pixel signal processing apparatus of FIG. 実施の形態1の補間演算回路11によりR画素の位置のG画素の値を求めるための補間処理で用いられる画素を示す図である。6 is a diagram illustrating pixels used in an interpolation process for obtaining a value of a G pixel at a position of an R pixel by the interpolation calculation circuit 11 according to the first embodiment. FIG. 実施の形態1の補間回路12によりR画素の位置のG成分の値を求めるための補間処理の概念を示す図である。6 is a diagram illustrating a concept of an interpolation process for obtaining a value of a G component at a position of an R pixel by the interpolation circuit 12 according to the first embodiment. FIG. ベイヤ型配列における、G画素を中心とした場合の画素配置を示す図であり、(a)は奇数行のG画素を中心とした場合を示し、(b)は偶数行のG画素を中心とした場合を示す。It is a figure which shows the pixel arrangement | positioning centering on G pixel in a Bayer type | mold arrangement | sequence, (a) shows the case centering on the odd-numbered G pixel, (b) centering on the even-numbered G pixel. Shows the case. 実施の形態1の補間演算回路11によりG画素の位置のR画素及びB画素の値を求めるための補間処理で用いられる画素を示す図である。6 is a diagram illustrating pixels used in an interpolation process for obtaining values of R and B pixels at a G pixel position by the interpolation calculation circuit 11 according to the first embodiment. FIG. 実施の形態1の補間回路12によりG画素の位置のR成分の値を求めるための補間処理の概念を示す図である。6 is a diagram illustrating a concept of an interpolation process for obtaining an R component value at a position of a G pixel by the interpolation circuit 12 according to the first embodiment. FIG. 実施の形態1の補間回路12によりG画素の位置のB成分の値を求めるための補間処理の概念を示す図である。6 is a diagram illustrating a concept of an interpolation process for obtaining a value of a B component at a position of a G pixel by the interpolation circuit 12 according to the first embodiment. FIG. 実施の形態1の補間演算回路11によりR画素の位置のB画素の値を求めるための補間処理で用いられる画素を示す図である。4 is a diagram illustrating pixels used in an interpolation process for obtaining a value of a B pixel at a position of an R pixel by the interpolation calculation circuit 11 according to the first embodiment. FIG. 実施の形態1の補間回路12によりG成分を有する画素の位置におけるB成分の値を求めるための補間処理の概念を示す図である。6 is a diagram illustrating a concept of an interpolation process for obtaining a value of a B component at a position of a pixel having a G component by the interpolation circuit 12 according to the first embodiment. FIG. 実施の形態1の効果を説明するため、色色がある色から別の色になだらかに変化していく場合の、補間結果を示す図である。FIG. 6 is a diagram illustrating an interpolation result when a color is gradually changed from one color to another in order to explain the effect of the first embodiment. 実施の形態1の効果を説明するため、高周波成分が多く含まれる場合の、補間結果を示す図である。In order to demonstrate the effect of Embodiment 1, it is a figure which shows the interpolation result when many high frequency components are contained. 実施の形態1の効果を説明するため、図13の場合の回帰線とデータとの関係を示す図である。FIG. 14 is a diagram illustrating a relationship between a regression line and data in the case of FIG. 13 in order to explain the effect of the first embodiment. 実施の形態1の効果を説明するための、図14の場合の回帰線とデータとの関係を示す図である。It is a figure which shows the relationship between the regression line in the case of FIG. 14, and data for demonstrating the effect of Embodiment 1. FIG. 本発明の実施の形態2の補間処理回路4の構成を示すブロック図である。It is a block diagram which shows the structure of the interpolation processing circuit 4 of Embodiment 2 of this invention. 実施の形態2の補間演算回路11により、R画素の位置のG成分の値を求めるための補間処理で用いられる画素を示す図である。It is a figure which shows the pixel used by the interpolation process for calculating | requiring the value of the G component of the position of R pixel by the interpolation calculation circuit 11 of Embodiment 2. 実施の形態2の補間演算回路11により、R画素の位置のB成分の値を求めるための補間処理で用いられる画素を示す図である。It is a figure which shows the pixel used by the interpolation process for calculating | requiring the value of B component of the position of R pixel by the interpolation calculation circuit 11 of Embodiment 2. FIG. 本発明の実施の形態3の補間処理回路4の構成を示すブロック図である。It is a block diagram which shows the structure of the interpolation processing circuit 4 of Embodiment 3 of this invention. 実施の形態3で、R画素の位置のG画素の値を求めるための補間処理を示すフローチャートである。10 is a flowchart illustrating an interpolation process for obtaining a value of a G pixel at a position of an R pixel in the third embodiment. 実施の形態3で、G画素の位置のR画素及びB画素の値を求めるための補間処理を示すフローチャートである。10 is a flowchart illustrating an interpolation process for obtaining values of an R pixel and a B pixel at a G pixel position in the third embodiment. 実施の形態3で、R画素の位置のB画素の値を求めるための補間処理を示すフローチャートである。14 is a flowchart illustrating an interpolation process for obtaining a value of a B pixel at a position of an R pixel in the third embodiment.

符号の説明Explanation of symbols

5 フレームメモリ、 7 座標データ計算回路、 9 定数計算回路、 11 補間回路、 12 補間回路、 13 合成回路、 24 相関判別回路、 ST25A1 回帰線に基づいた補間を行うステップ、 ST25B1 回帰線に基づいた補間を行うステップ、 ST34A 回帰線に基づいた補間を行うステップ、 ST45A1 回帰線に基づいた補間を行うステップ、 ST45B1 回帰線に基づいた補間を行うステップ、 ST27A 色成分に相似関係を仮定した補間を行うステップ、 ST27B 色成分に相似関係を仮定した補間を行うステップ、 ST36 色成分に相似関係を仮定した補間を行うステップ、 ST47A 色成分に相似関係を仮定した補間を行うステップ、 ST47B 色成分に相似関係を仮定した補間を行うステップ、 ST28 二つの補間結果を合成するステップ、 ST37 二つの補間結果を合成するステップ、 ST48 二つの補間結果を合成するステップ、 ST29 補間結果を記憶するステップ、 ST38 補間結果を記憶するステップ、 ST49 補間結果を記憶するステップ、 ST22A 回帰線を計算するためのデータを計算するステップ、 ST22B 回帰線を計算するためのデータを計算するステップ、 ST31 回帰線を計算するためのデータを計算するステップ、 ST42A 回帰線を計算するためのデータを計算するステップ、 ST42B 回帰線を計算するためのデータを計算するステップ、 ST24A1 回帰線を計算するステップ、 ST24B1 回帰線を計算するステップ、 ST33A 回帰線を計算するステップ、 ST44A1 回帰線を計算するステップ、 ST44B1 回帰線を計算するステップ、 ST21 相関判別ステップ、 ST41 相関判別ステップ、 ST26A1 回帰線の相関係数を計算するステップ、 ST26B1 回帰線の相関係数を計算するステップ、 ST35A 回帰線の相関係数を計算するステップ、 ST46A1 回帰線の相関係数を計算するステップ、 ST46B1 回帰線の相関係数を計算するステップ、 ST23A 二次元座標データが条件1〜4いずれかにあてはまるか調べるステップ、 ST23B 二次元座標データが条件1〜4いずれかにあてはまるか調べるステップ、 ST32 二次元座標データが条件1〜4いずれかにあてはまるか調べるステップ、 ST43A 二次元座標データが条件1〜4いずれかにあてはまるか調べるステップ、 ST43B 二次元座標データが条件1〜4いずれかにあてはまるか調べるステップ。   5 frame memory, 7 coordinate data calculation circuit, 9 constant calculation circuit, 11 interpolation circuit, 12 interpolation circuit, 13 synthesis circuit, 24 correlation determination circuit, ST25A1 step of performing interpolation based on regression line, ST25B1 interpolation based on regression line ST34A Step of performing interpolation based on regression line, ST45A1 Step of performing interpolation based on regression line, ST45B1 Step of performing interpolation based on regression line, ST27A Step of performing interpolation assuming similarity relationship with color components ST27B Performing interpolation assuming similarity relationship to color components, ST36 Performing interpolation assuming similarity relationship to color components, ST47A Performing interpolation assuming similarity relationship to color components, ST47B Perform hypothetical interpolation Step ST28 Combining the two interpolation results ST37 Combining the two interpolation results ST48 Combining the two interpolation results ST29 Step for storing the interpolation results ST38 Step for storing the interpolation results ST49 Interpolation ST22A Step of storing results, ST22A Step of calculating data for calculating regression line, ST22B Step of calculating data for calculating regression line, ST31 Step of calculating data for calculating regression line, ST42A regression Calculating data for calculating a line, ST42B calculating data for calculating a regression line, ST24A1 calculating a regression line, ST24B1 calculating a regression line, ST33A calculating a regression line ST44A1 calculating regression line, ST44B1 calculating regression line, ST21 correlation determining step, ST41 correlation determining step, ST26A1 calculating correlation coefficient of regression line, ST26B1 calculating correlation coefficient of regression line ST35A step of calculating the correlation coefficient of the regression line, ST46A1 step of calculating the correlation coefficient of the regression line, ST46B1 step of calculating the correlation coefficient of the regression line, ST23A two-dimensional coordinate data is any one of the conditions 1 to 4 ST23B Step of checking whether the two-dimensional coordinate data applies to any of conditions 1 to 4, ST32 Step of checking whether the two-dimensional coordinate data applies to any of conditions 1 to 4, ST43A Two-dimensional coordinate data ST43B is a step of checking whether the two-dimensional coordinate data is applied to any of the conditions 1 to 4.

Claims (24)

二次元平面上に配列され、各々が第1乃至第Nの互いに異なる色成分のいずれかを有する複数の画素の、それぞれの色成分の値を表す画素信号の組に基づいて、第J(Jは1からNのうちのいずれか一つ)の色成分を有する注目画素の位置における第K(KはJを除く1からNのうちのいずれか一つ)の色成分の値を表す画素信号を補間により生成する画素信号処理装置において、
上記補間を第1の補間方法で行って第1の補間値を生成する第1の補間手段と、
上記補間を上記第1の補間方法とは異なる第2の補間方法で行って第2の補間値を生成する第2の補間手段と、
上記第1の補間手段で得られた第1の補間値と上記第2の補間手段で得られた第2の補間値を合成し、合成された補間値を表す画素信号を出力する合成手段とを備え
上記第1の補間手段は、
上記注目画素及び上記注目画素の近傍の第Jの色成分を有する画素の上記第Jの色成分の値を表す画素信号と、上記注目画素の近傍の第Kの色成分を有する画素の上記第Kの色成分の値を表す画素信号をもとに、上記注目画素の近傍における第Jの色成分の値と第Kの色成分の値の関係を表す回帰式の定数を計算する回帰式計算手段と、
上記回帰式計算手段で計算した定数を含む、上記第Jの色成分の値と第Kの色成分の値の関係を表す回帰式を用いた補間演算、又は注目画素の周囲の画素の色成分の値の平均を求める補間演算を行なう補間演算回路とを備え、
上記第2の補間手段は、
画素の二次元平面上の配列を互いに直交するH軸及びV軸を含む二次元座標平面上に表し、色成分値を上記二次元平面に垂直なZ軸に表す三次元直交座標系において、
上記注目画素の周辺の複数の第Jの色成分を有する画素のそれぞれの位置における、それらの画素の第Jの色成分の値の平均値と、上記注目画素の位置における該注目画素の色成分の値とで作る第1の幾何学図形と、
上記注目画素の周辺の複数の第Kの色成分を有する画素のそれぞれの位置における、それらの画素の第Kの色成分の平均値と、上記第2の補間手段で補間により求められる上記注目画素の位置における第Kの色成分の値とで作る第2の幾何学図形とが互いに相似になるように、
上記注目画素の位置における第Kの色成分の値を定め、
上記回帰式計算手段は、上記第Jの色成分の値と上記第Kの色成分の値の相関係数kをも計算し、
上記合成手段は、上記相関係数kに基づいて上記第1の補間値と上記第2の補間値の合成割合を決める
ことを特徴とする画素信号処理装置。
Based on a set of pixel signals representing the values of the respective color components of a plurality of pixels arranged on a two-dimensional plane, each having any of the first to Nth different color components, the J (J Is a pixel signal representing the value of the Kth color component (K is any one of 1 to N excluding J) at the position of the pixel of interest having one (1 to N) color component. In a pixel signal processing device that generates
First interpolation means for generating a first interpolation value by performing the above interpolation by a first interpolation method;
Second interpolation means for generating a second interpolation value by performing the interpolation by a second interpolation method different from the first interpolation method;
Synthesizing means for synthesizing the first interpolation value obtained by the first interpolation means and the second interpolation value obtained by the second interpolation means, and outputting a pixel signal representing the synthesized interpolation value; equipped with a,
The first interpolation means includes:
A pixel signal representing the value of the Jth color component of the pixel of interest and a pixel having the Jth color component in the vicinity of the pixel of interest, and the pixel of the pixel having the Kth color component in the vicinity of the pixel of interest. Regression equation calculation for calculating a constant of a regression equation representing the relationship between the value of the Jth color component and the value of the Kth color component in the vicinity of the pixel of interest based on the pixel signal representing the value of the K color component Means,
Interpolation calculation using a regression equation representing the relationship between the value of the Jth color component and the value of the Kth color component, including the constants calculated by the regression equation calculation means, or the color components of pixels around the pixel of interest An interpolation calculation circuit for performing an interpolation calculation to obtain an average of the values of
The second interpolation means includes:
In a three-dimensional orthogonal coordinate system in which an array of pixels on a two-dimensional plane is represented on a two-dimensional coordinate plane including an H axis and a V axis orthogonal to each other, and a color component value is represented on a Z axis perpendicular to the two-dimensional plane.
The average value of the values of the Jth color component of the pixels at the positions of the pixels having a plurality of Jth color components around the target pixel, and the color components of the target pixel at the position of the target pixel A first geometric figure created with the value of
The average value of the Kth color components of the pixels having a plurality of Kth color components around the target pixel and the target pixel obtained by interpolation by the second interpolation means The second geometric figure created by the value of the Kth color component at the position of is similar to each other,
Determining the value of the Kth color component at the position of the target pixel;
The regression equation calculating means also calculates a correlation coefficient k between the value of the Jth color component and the value of the Kth color component,
The pixel signal processing apparatus , wherein the synthesizing means determines a synthesis ratio of the first interpolation value and the second interpolation value based on the correlation coefficient k .
二次元平面上に配列され、各々が第1乃至第Nの互いに異なる色成分のいずれかを有する複数の画素の、それぞれの色成分の値を表す画素信号の組に基づいて、第J(Jは1からNのうちのいずれか一つ)の色成分を有する注目画素の位置における第K(KはJを除く1からNのうちのいずれか一つ)の色成分の値を表す画素信号を補間により生成する画素信号処理装置において、
上記補間を第1の補間方法で行って第1の補間値を生成する第1の補間手段と、
上記補間を上記第1の補間方法とは異なる第2の補間方法で行って第2の補間値を生成する第2の補間手段と、
上記第1の補間手段で得られた第1の補間値と上記第2の補間手段で得られた第2の補間値を合成し、合成された補間値を表す画素信号を出力する合成手段とを備え、
上記第1の補間手段は、
上記注目画素及び上記注目画素の近傍の第Jの色成分を有する画素の上記第Jの色成分の値を表す画素信号と、上記注目画素の近傍の第Kの色成分を有する画素の上記第Kの色成分の値を表す画素信号をもとに、上記注目画素の近傍における第Jの色成分の値と第Kの色成分の値の関係を表す回帰式の定数を計算する回帰式計算手段と、
上記回帰式計算手段で計算した定数を含む、上記第Jの色成分の値と第Kの色成分の値の関係を表す回帰式を用いた補間演算、又は注目画素の周囲の画素の色成分の値の平均を求める補間演算を行なう補間演算回路とを備え、
上記第2の補間手段は、
上記注目画素の周辺の複数の第Jの色成分を有する画素の第Jの色成分の値の平均値と、上記注目画素の位置における第Jの色成分の値との差と、上記平均値の計算に用いられた複数の画素及び上記注目画素相互間の上記二次元平面上における距離との比と、
上記注目画素の周辺の複数の第Kの色成分を有する画素の第Kの色成分の値の平均値と、上記第2の補間手段で補間により求められる上記注目画素の位置における第Kの色成分の値との差と、上記平均値の計算に用いられた複数の画素及び上記注目画素相互間の上記二次元平面上における距離との比が互いに同じになるように、
上記注目画素の位置における第Kの色成分の値を定め
上記回帰式計算手段は、上記第Jの色成分の値と上記第Kの色成分の値の相関係数kをも計算し、
上記合成手段は、上記相関係数kに基づいて上記第1の補間値と上記第2の補間値の合成割合を決める
ことを特徴とする画素信号処理装置。
Based on a set of pixel signals representing the values of the respective color components of a plurality of pixels arranged on a two-dimensional plane, each having any of the first to Nth different color components, the J (J Is a pixel signal representing the value of the Kth color component (K is any one of 1 to N excluding J) at the position of the pixel of interest having one (1 to N) color component. In a pixel signal processing device that generates
First interpolation means for generating a first interpolation value by performing the above interpolation by a first interpolation method;
Second interpolation means for generating a second interpolation value by performing the interpolation by a second interpolation method different from the first interpolation method;
Synthesizing means for synthesizing the first interpolation value obtained by the first interpolation means and the second interpolation value obtained by the second interpolation means, and outputting a pixel signal representing the synthesized interpolation value; With
The first interpolation means includes:
A pixel signal representing the value of the Jth color component of the pixel of interest and a pixel having the Jth color component in the vicinity of the pixel of interest, and the pixel of the pixel having the Kth color component in the vicinity of the pixel of interest. Regression equation calculation for calculating a constant of a regression equation representing the relationship between the value of the Jth color component and the value of the Kth color component in the vicinity of the pixel of interest based on the pixel signal representing the value of the K color component Means,
Interpolation calculation using a regression equation representing the relationship between the value of the Jth color component and the value of the Kth color component, including the constants calculated by the regression equation calculation means, or the color components of pixels around the pixel of interest An interpolation calculation circuit for performing an interpolation calculation to obtain an average of the values of
The second interpolation means includes:
The difference between the average value of the Jth color component value of a pixel having a plurality of Jth color components around the pixel of interest and the value of the Jth color component at the position of the pixel of interest, and the average value A ratio between the plurality of pixels used for the calculation of the pixel and the distance between the target pixels on the two-dimensional plane;
The average value of the Kth color component values of the pixels having a plurality of Kth color components around the pixel of interest and the Kth color at the position of the pixel of interest obtained by interpolation by the second interpolation means. The ratio between the difference between the component values and the distance between the plurality of pixels used in the calculation of the average value and the pixel of interest on the two-dimensional plane is the same.
Determining the value of the Kth color component at the position of the target pixel ;
The regression equation calculating means also calculates a correlation coefficient k between the value of the Jth color component and the value of the Kth color component,
The synthesis means determines a synthesis ratio of the first interpolation value and the second interpolation value based on the correlation coefficient k.
A pixel signal processing apparatus.
各々が第1乃至第Nの色成分のうちの一つを有する第1乃至第N種類の光電変換素子が二次元平面上に配列された撮像素子をさらに有し、上記光電変換素子の各々から得られる信号が上記画素信号の組の少なくとも一部として用いられることを特徴とする請求項1又は2に記載の画素信号処理装置。 Each of the photoelectric conversion elements further includes an imaging element in which first to Nth types of photoelectric conversion elements each having one of the first to Nth color components are arranged on a two-dimensional plane. 3. The pixel signal processing apparatus according to claim 1, wherein the obtained signal is used as at least part of the set of pixel signals. 上記合成手段により出力された画素信号を記憶する記憶手段をさらに有し、上記記憶手段により記憶された画素信号が上記画素信号の組の少なくとも一部として用いられることを特徴とする請求項1乃至3のいずれかに記載の画素信号処理装置。 2. The apparatus according to claim 1 , further comprising storage means for storing the pixel signal output by the combining means, wherein the pixel signal stored by the storage means is used as at least part of the set of pixel signals. 4. The pixel signal processing device according to any one of 3 . 上記回帰式計算手段が、
上記注目画素及びその近傍のM個の画素の位置の各画素に対して、上記各画素の第Jの色成分の値に基づいて、又は上記各画素の近傍の第Jの色成分を有する画素の第Jの色成分の値に基づいてX座標値xiを求め、上記各画素の第Kの色成分の値に基づいて、又は上記各画素の近傍の第Kの色成分を有する画素の第Kの色成分の値に基づいてY座標値yiを求め、上記M個の画素に対してそれぞれ求められたX座標値(xi)及びY座標値yiで構成される、二次元座標データ(xi,yi)、(i=1〜M)を出力する座標データ計算手段と、
上記座標データ計算手段から出力されたM個の二次元座標データ(xi,yi)、(i=1〜M)に対して、X座標値を説明変数、Y座標値を目的変数として回帰分析を行なって回帰式y=ax+bの定数a、bを求める定数計算手段とを備え、
上記補間演算回路が、
上記注目画素の第Jの色成分の値Xjと上記定数a及びbとを用い、下記の式
Yk=a×Xj+b
により、注目画素の位置における第Kの色成分の値Ykを求める
ことを特徴とする請求項1又は2に記載の画素信号処理装置。
The regression equation calculation means is
A pixel having the Jth color component based on the value of the Jth color component of each pixel or the neighborhood of each pixel with respect to each pixel at the position of the target pixel and M pixels in the vicinity thereof X coordinate value xi is obtained based on the value of the Jth color component of the pixel, and based on the value of the Kth color component of each pixel or the number of pixels having the Kth color component in the vicinity of each pixel. Y coordinate value yi is obtained based on the value of the K color component, and two-dimensional coordinate data (xi) composed of the X coordinate value (xi) and Y coordinate value yi obtained for the M pixels. , Yi), coordinate data calculation means for outputting (i = 1 to M),
For M pieces of two-dimensional coordinate data (xi, yi) and (i = 1 to M) output from the coordinate data calculation means, regression analysis is performed using the X coordinate value as an explanatory variable and the Y coordinate value as an objective variable. And a constant calculation means for determining the constants a and b of the regression equation y = ax + b.
The interpolating circuit is
Using the value Xj of the J-th color component of the pixel of interest and the constants a and b, the following equation Yk = a × Xj + b
The pixel signal processing device according to claim 1, wherein the value Yk of the Kth color component at the position of the target pixel is obtained by the following.
上記定数計算手段は、
上記定数a、bを、上記二次元座標データ(xi,yi)、(i=1〜M)を使った下記の計算式(1)、(2)
Figure 0004128536
で求めることを特徴とする請求項5に記載の画素信号処理装置。
The constant calculation means is
The constants a and b are calculated by the following formulas (1) and (2) using the two-dimensional coordinate data (xi, yi) and (i = 1 to M).
Figure 0004128536
The pixel signal processing device according to claim 5, wherein the pixel signal processing device is obtained by:
上記定数計算手段は、
上記X座標値とY座標値の相関係数を上記第Jの色成分の値と上記第Kの色成分の値の相関係数kとして計算し、
上記合成手段は、上記相関係数kに基づいて上記第1の補間値と上記第2の補間値の合成割合を決める
ことを特徴とする請求項5又は6に記載の画素信号処理装置。
The constant calculation means is
The correlation coefficient of the X and Y coordinate values were calculated as the correlation coefficient k value of the color component value and the first K color component of the first J,
The pixel signal processing apparatus according to claim 5 or 6, wherein the synthesizing unit determines a synthesis ratio of the first interpolation value and the second interpolation value based on the correlation coefficient k.
上記定数計算手段は、
上記相関係数kを、上記二次元座標データ(xi,yi)、(i=1〜M)を使った下記の計算式(3)
Figure 0004128536
で求めることを特徴とする請求項7に記載の画素信号処理装置。
The constant calculation means is
The correlation coefficient k is calculated by the following formula (3) using the two-dimensional coordinate data (xi, yi), (i = 1 to M).
Figure 0004128536
The pixel signal processing device according to claim 7, wherein the pixel signal processing device is obtained by:
上記合成手段は、
上記相関係数の絶対値が1に近い場合は上記第1の補間値の割合が大きくなり、
上記相関係数の絶対値が0に近い場合は上記第2の補間値の割合が大きくなるように、
上記第1の補間値と上記第2の補間値を合成することを特徴とする
請求項7又は8に記載の画素信号処理装置。
The synthesis means is
When the absolute value of the correlation coefficient is close to 1, the ratio of the first interpolation value is increased.
When the absolute value of the correlation coefficient is close to 0, the ratio of the second interpolation value is increased.
The first interpolation value and the second interpolation value are synthesized.
The pixel signal processing device according to claim 7 or 8 .
上記第1の補間手段は、
上記二次元座標データ(xi,yi)、(i=1〜M)について、以下の条件1乃至4、即ち、
条件1:全てのxiが同じ値である、
条件2:全てのyiが同じ値である、
条件3:xiの最大値と最小値の差がある閾値以下である、
条件4:yiの最大値と最小値の差がある閾値以下である、
のいずれかが満たされるかどうかの判定を行う条件判定手段を有し、
上記補間演算回路は、上記条件判定手段が上記条件1乃至4のいずれかに当てはまると判断した場合は、注目画素の周囲の画素を用いた線形補間を行い、それ以外の場合は、上記のように回帰式を用いた補間を行い、
上記合成手段は、上記条件判定手段が上記条件1乃至4のいずれかが満たされると判断した場合は、上記合成された値の中で上記第1の補間値が占める割合が大きくなるように上記合成を行う
ことを特徴とする請求項5乃至9のいずれかに記載の画素信号処理装置。
The first interpolation means includes:
For the two-dimensional coordinate data (xi, yi), (i = 1 to M), the following conditions 1 to 4, that is,
Condition 1: all xi are the same value,
Condition 2: all yi are the same value,
Condition 3: The difference between the maximum value and the minimum value of xi is below a certain threshold value,
Condition 4: The difference between the maximum value and the minimum value of yi is a certain threshold value or less.
Having a condition determination means for determining whether or not any of the above is satisfied,
The interpolation calculation circuit performs linear interpolation using pixels around the pixel of interest when the condition determination unit determines that any of the conditions 1 to 4 is satisfied, and otherwise performs as described above. Interpolate using a regression equation
When the condition determining unit determines that any one of the conditions 1 to 4 is satisfied, the synthesizing unit increases the proportion of the first interpolation value in the synthesized value. The pixel signal processing device according to claim 5 , wherein synthesis is performed.
上記注目画素を中心に相関性の強い方向を検出する相関判別手段をさらに有し、
上記第1及び第2の補間手段は、
上記注目画素を中心に相関性の強い方向に存在する画素の色成分の値のみを上記補間に用いることを特徴とする請求項1乃至10のいずれかに記載の画素信号処理装置。
It further has a correlation determination means for detecting a direction having a strong correlation around the target pixel,
The first and second interpolation means are:
11. The pixel signal processing apparatus according to claim 1, wherein only the value of a color component of a pixel existing in a strongly correlated direction centering on the target pixel is used for the interpolation.
上記回帰式計算手段は、上記注目画素の近傍の第Kの色成分を有する画素の各々について、その周辺の画素の上記第Kの色成分の値をローパスフィルタリングした結果をも用いて上記回帰式の定数を計算することを特徴とする請求項1乃至11のいずれかに記載の画素信号処理装置。  The regression equation calculation means uses the regression equation for each pixel having the Kth color component in the vicinity of the target pixel, using the result of low-pass filtering the value of the Kth color component of the surrounding pixels. The pixel signal processing apparatus according to claim 1, wherein a constant is calculated. 二次元平面上に配列され、各々が第1乃至第Nの互いに異なる色成分のいずれかを有する複数の画素の、それぞれの色成分の値を表す画素信号の組に基づいて、第J(Jは1からNのうちのいずれか一つ)の色成分を有する注目画素の位置における第K(KはJを除く1からNのうちのいずれか一つ)の色成分の値を表す画素信号を補間により生成する画素信号処理方法において、
上記補間を第1の補間方法で行って第1の補間値を生成する第1の補間ステップと、
上記補間を上記第1の補間方法とは異なる第2の補間方法で行って第2の補間値を生成する第2の補間ステップと、
上記第1の補間ステップで得られた第1の補間値と上記第2の補間ステップで得られた第2の補間値を合成し、合成された補間値を表す画素信号を出力する合成ステップとを備え
上記第1の補間ステップは、
上記注目画素及び上記注目画素の近傍の第Jの色成分を有する画素の上記第Jの色成分の値を表す画素信号と、上記注目画素の近傍の第Kの色成分を有する画素の上記第Kの色成分の値を表す画素信号をもとに、上記注目画素の近傍における第Jの色成分の値と第Kの色成分の値の関係を表す回帰式の定数を計算する回帰式計算ステップと、
上記回帰式計算ステップで計算した定数を含む、上記第Jの色成分の値と第Kの色成分の値の関係を表す回帰式を用いた補間演算、又は注目画素の周囲の画素の色成分の値の平均を求める補間演算を行なう補間演算ステップとを備え、
上記第2の補間ステップは、
画素の二次元平面上の配列を互いに直交するH軸及びV軸を含む二次元座標平面上に表し、色成分値を上記二次元平面に垂直なZ軸に表す三次元直交座標系において、
上記注目画素の周辺の複数の第Jの色成分を有する画素のそれぞれの位置における、それらの画素の第Jの色成分の値の平均値と、上記注目画素の位置における該注目画素の色成分の値とで作る第1の幾何学図形と、
上記注目画素の周辺の複数の第Kの色成分を有する画素のそれぞれの位置における、それらの画素の第Kの色成分の平均値と、上記第2の補間ステップで補間により求められる上記注目画素の位置における第Kの色成分の値とで作る第2の幾何学図形とが互いに相似になるように、
上記注目画素の位置における第Kの色成分の値を定め、
上記回帰式計算ステップは、上記第Jの色成分の値と上記第Kの色成分の値の相関係数kをも計算し、
上記合成ステップは、上記相関係数kに基づいて上記第1の補間値と上記第2の補間値の合成割合を決める
ことを特徴とする画素信号処理方法。
Based on a set of pixel signals representing the values of the respective color components of a plurality of pixels arranged on a two-dimensional plane, each having any of the first to Nth different color components, the J (J Is a pixel signal representing the value of the Kth color component (K is any one of 1 to N excluding J) at the position of the pixel of interest having one (1 to N) color component. In the pixel signal processing method for generating by interpolation,
A first interpolation step for performing the interpolation by a first interpolation method to generate a first interpolation value;
A second interpolation step for generating a second interpolation value by performing the interpolation by a second interpolation method different from the first interpolation method;
A synthesis step of synthesizing the first interpolation value obtained in the first interpolation step and the second interpolation value obtained in the second interpolation step, and outputting a pixel signal representing the synthesized interpolation value; equipped with a,
The first interpolation step includes:
A pixel signal representing the value of the Jth color component of the pixel of interest and a pixel having the Jth color component in the vicinity of the pixel of interest, and the pixel of the pixel having the Kth color component in the vicinity of the pixel of interest. Regression equation calculation for calculating a constant of a regression equation representing the relationship between the value of the Jth color component and the value of the Kth color component in the vicinity of the pixel of interest based on the pixel signal representing the value of the K color component Steps,
Interpolation calculation using a regression equation representing the relationship between the value of the Jth color component and the value of the Kth color component, including the constants calculated in the regression equation calculation step, or color components of pixels around the pixel of interest An interpolation calculation step for performing an interpolation calculation to obtain an average of the values of
The second interpolation step includes
In a three-dimensional orthogonal coordinate system in which an array of pixels on a two-dimensional plane is represented on a two-dimensional coordinate plane including an H axis and a V axis orthogonal to each other, and a color component value is represented on a Z axis perpendicular to the two-dimensional plane.
The average value of the values of the Jth color component of the pixels at the positions of the pixels having a plurality of Jth color components around the target pixel, and the color components of the target pixel at the position of the target pixel A first geometric figure created with the value of
The average value of the K-th color component of each pixel having a plurality of K-th color components around the target pixel and the target pixel obtained by interpolation in the second interpolation step The second geometric figure created by the value of the Kth color component at the position of is similar to each other,
Determining the value of the Kth color component at the position of the target pixel;
The regression equation calculating step also calculates a correlation coefficient k between the value of the Jth color component and the value of the Kth color component,
The pixel signal processing method characterized in that the synthesis step determines a synthesis ratio of the first interpolation value and the second interpolation value based on the correlation coefficient k .
二次元平面上に配列され、各々が第1乃至第Nの互いに異なる色成分のいずれかを有する複数の画素の、それぞれの色成分の値を表す画素信号の組に基づいて、第J(Jは1からNのうちのいずれか一つ)の色成分を有する注目画素の位置における第K(KはJを除く1からNのうちのいずれか一つ)の色成分の値を表す画素信号を補間により生成する画素信号処理方法において、
上記補間を第1の補間方法で行って第1の補間値を生成する第1の補間ステップと、
上記補間を上記第1の補間方法とは異なる第2の補間方法で行って第2の補間値を生成する第2の補間ステップと、
上記第1の補間ステップで得られた第1の補間値と上記第2の補間ステップで得られた第2の補間値を合成し、合成された補間値を表す画素信号を出力する合成ステップとを備え、
上記第1の補間ステップは、
上記注目画素及び上記注目画素の近傍の第Jの色成分を有する画素の上記第Jの色成分の値を表す画素信号と、上記注目画素の近傍の第Kの色成分を有する画素の上記第Kの色成分の値を表す画素信号をもとに、上記注目画素の近傍における第Jの色成分の値と第Kの色成分の値の関係を表す回帰式の定数を計算する回帰式計算ステップと、
上記回帰式計算ステップで計算した定数を含む、上記第Jの色成分の値と第Kの色成分の値の関係を表す回帰式を用いた補間演算、又は注目画素の周囲の画素の色成分の値の平均を求める補間演算を行なう補間演算ステップとを備え、
上記第2の補間ステップは、
上記注目画素の周辺の複数の第Jの色成分を有する画素の第Jの色成分の値の平均値と、上記注目画素の位置における第Jの色成分の値との差と、上記平均値の計算に用いられた複数の画素及び上記注目画素相互間の上記二次元平面上における距離との比と、
上記注目画素の周辺の複数の第Kの色成分を有する画素の第Kの色成分の値の平均値と、上記第2の補間ステップで補間により求められる上記注目画素の位置における第Kの色成分の値との差と、上記平均値の計算に用いられた複数の画素及び上記注目画素相互間の上記二次元平面上における距離との比が互いに同じになるように、
上記注目画素の位置における第Kの色成分の値を定め、
上記回帰式計算ステップは、上記第Jの色成分の値と上記第Kの色成分の値の相関係数kをも計算し、
上記合成ステップは、上記相関係数kに基づいて上記第1の補間値と上記第2の補間値の合成割合を決める
ことを特徴とする画素信号処理方法。
Based on a set of pixel signals representing the values of the respective color components of a plurality of pixels arranged on a two-dimensional plane, each having any of the first to Nth different color components, the J (J Is a pixel signal representing the value of the Kth color component (K is any one of 1 to N excluding J) at the position of the pixel of interest having one (1 to N) color component. In the pixel signal processing method for generating by interpolation,
A first interpolation step for performing the interpolation by a first interpolation method to generate a first interpolation value;
A second interpolation step for generating a second interpolation value by performing the interpolation by a second interpolation method different from the first interpolation method;
A synthesis step of synthesizing the first interpolation value obtained in the first interpolation step and the second interpolation value obtained in the second interpolation step, and outputting a pixel signal representing the synthesized interpolation value; With
The first interpolation step includes:
A pixel signal representing the value of the Jth color component of the pixel of interest and a pixel having the Jth color component in the vicinity of the pixel of interest, and the pixel of the pixel having the Kth color component in the vicinity of the pixel of interest. Regression equation calculation for calculating a constant of a regression equation representing the relationship between the value of the Jth color component and the value of the Kth color component in the vicinity of the pixel of interest based on the pixel signal representing the value of the K color component Steps,
Interpolation operation using a regression equation representing the relationship between the value of the Jth color component and the value of the Kth color component, including the constants calculated in the regression equation calculation step, or color components of pixels around the pixel of interest An interpolation calculation step for performing an interpolation calculation to obtain an average of the values of
The second interpolation step includes
The difference between the average value of the Jth color component value of a pixel having a plurality of Jth color components around the pixel of interest and the value of the Jth color component at the position of the pixel of interest, and the average value A ratio between the plurality of pixels used for the calculation of the pixel and the distance between the target pixels on the two-dimensional plane;
The average value of the Kth color component values of pixels having a plurality of Kth color components around the target pixel and the Kth color at the position of the target pixel obtained by interpolation in the second interpolation step. The ratio between the difference between the component values and the distance between the plurality of pixels used in the calculation of the average value and the pixel of interest on the two-dimensional plane is the same.
Determining the value of the Kth color component at the position of the target pixel;
The regression equation calculating step also calculates a correlation coefficient k between the value of the Jth color component and the value of the Kth color component,
The synthesis step determines a synthesis ratio of the first interpolation value and the second interpolation value based on the correlation coefficient k.
And a pixel signal processing method.
各々が第1乃至第Nの色成分のうちの一つを有する第1乃至第N種類の光電変換素子が二次元平面上に配列された撮像素子の上記光電変換素子の各々から得られる信号を上記画素信号の組の少なくとも一部として用いることを特徴とする請求項13又は14に記載の画素信号処理方法。 A signal obtained from each of the photoelectric conversion elements of the imaging element in which first to N-th types of photoelectric conversion elements each having one of the first to N-th color components are arranged on a two-dimensional plane. 15. The pixel signal processing method according to claim 13, wherein the pixel signal processing method is used as at least part of the set of pixel signals. 上記合成ステップにより出力された画素信号を記憶する記憶ステップをさらに有し、上記記憶ステップにより記憶された画素信号を上記画素信号の組の少なくとも一部として用いることを特徴とする請求項13乃至15のいずれかに記載の画素信号処理方法。 16. The method according to claim 13 , further comprising a storing step of storing the pixel signal output by the combining step, wherein the pixel signal stored by the storing step is used as at least part of the set of the pixel signals. The pixel signal processing method according to any one of the above. 上記回帰式計算ステップが、
上記注目画素及びその近傍のM個の画素の位置の各画素に対して、上記各画素の第Jの色成分の値に基づいて、又は上記各画素の近傍の第Jの色成分を有する画素の第Jの色成分の値に基づいてX座標値xiを求め、上記各画素の第Kの色成分の値に基づいて、又は上記各画素の近傍の第Kの色成分を有する画素の第Kの色成分の値に基づいてY座標値yiを求め、上記M個の画素に対してそれぞれ求められたX座標値(xi)及びY座標値yiで構成される、二次元座標データ(xi,yi)、(i=1〜M)を出力する座標データ計算ステップと、
上記座標データ計算ステップから出力されたM個の二次元座標データ(xi,yi)、(i=1〜M)に対して、X座標値を説明変数、Y座標値を目的変数として回帰分析を行なって回帰式y=ax+bの定数a、bを求める定数計算ステップとを備え、
上記補間演算ステップが、
上記注目画素の第Jの色成分の値Xjと上記定数a及びbとを用い、下記の式
Yk=a×Xj+b
により、注目画素の位置における第Kの色成分の値Ykを求める
ことを特徴とする請求項13又は14に記載の画素信号処理方法。
The regression equation calculation step is
A pixel having the Jth color component based on the value of the Jth color component of each pixel or the neighborhood of each pixel with respect to each pixel at the position of the target pixel and M pixels in the vicinity thereof X coordinate value xi is obtained based on the value of the Jth color component of the pixel, and based on the value of the Kth color component of each pixel or the number of pixels having the Kth color component in the vicinity of each pixel. Y coordinate value yi is obtained based on the value of the K color component, and two-dimensional coordinate data (xi) composed of the X coordinate value (xi) and Y coordinate value yi obtained for the M pixels. , Yi), coordinate data calculation step for outputting (i = 1 to M),
For the M pieces of two-dimensional coordinate data (xi, yi) and (i = 1 to M) output from the coordinate data calculation step, regression analysis is performed using the X coordinate value as an explanatory variable and the Y coordinate value as an objective variable. And a constant calculation step for determining the constants a and b of the regression equation y = ax + b.
The interpolation calculation step is
Using the value Xj of the J-th color component of the pixel of interest and the constants a and b, the following equation Yk = a × Xj + b
The pixel signal processing method according to claim 13 or 14, wherein the value Yk of the Kth color component at the position of the pixel of interest is obtained by:
上記定数計算ステップは、
上記定数a、bを、上記二次元座標データ(xi,yi)、(i=1〜M)を使った下記の計算式(1)、(2)
Figure 0004128536
で求めることを特徴とする請求項17に記載の画素信号処理方法。
The above constant calculation step is
The constants a and b are calculated by the following formulas (1) and (2) using the two-dimensional coordinate data (xi, yi) and (i = 1 to M).
Figure 0004128536
The pixel signal processing method according to claim 17, wherein the pixel signal processing method is obtained by:
上記定数計算ステップは、
上記X座標値とY座標値の相関係数を上記第Jの色成分の値と上記第Kの色成分の値の相関係数kとして計算し、
上記合成ステップは、上記相関係数kに基づいて上記第1の補間値と上記第2の補間値の合成割合を決める
ことを特徴とする請求項17又は18に記載の画素信号処理方法。
The above constant calculation step is
Calculating a correlation coefficient between the X coordinate value and the Y coordinate value as a correlation coefficient k between the value of the Jth color component and the value of the Kth color component ;
The pixel signal processing method according to claim 17 or 18, wherein the synthesis step determines a synthesis ratio of the first interpolation value and the second interpolation value based on the correlation coefficient k.
上記定数計算ステップは、
上記相関係数kを、上記二次元座標データ(xi,yi)、(i=1〜M)を使った下記の計算式(3)
Figure 0004128536
で求めることを特徴とする請求項19に記載の画素信号処理方法。
The above constant calculation step is
The correlation coefficient k is calculated by the following formula (3) using the two-dimensional coordinate data (xi, yi), (i = 1 to M).
Figure 0004128536
The pixel signal processing method according to claim 19, wherein the pixel signal processing method is obtained by:
上記合成ステップは、
上記相関係数の絶対値が1に近い場合は上記第1の補間値の割合が大きくなり、
上記相関係数の絶対値が0に近い場合は上記第2の補間値の割合が大きくなるように、
上記第1の補間値と上記第2の補間値を合成することを特徴とする
請求項19又は20に記載の画素信号処理方法。
The synthesis step is
When the absolute value of the correlation coefficient is close to 1, the ratio of the first interpolation value is increased.
When the absolute value of the correlation coefficient is close to 0, the ratio of the second interpolation value is increased.
The first interpolation value and the second interpolation value are synthesized.
The pixel signal processing method according to claim 19 or 20 .
上記第1の補間ステップは、
上記二次元座標データ(xi,yi)、(i=1〜M)について、以下の条件1乃至4、即ち、
条件1:全てのxiが同じ値である、
条件2:全てのyiが同じ値である、
条件3:xiの最大値と最小値の差がある閾値以下である、
条件4:yiの最大値と最小値の差がある閾値以下である、
のいずれかが満たされるかどうかの判定を行う条件判定ステップを有し、
上記補間演算ステップは、上記条件判定ステップが上記条件1乃至4のいずれかに当てはまると判断した場合は、注目画素の周囲の画素を用いた線形補間を行い、それ以外の場合は、上記のように回帰式を用いた補間を行い、
上記合成ステップは、上記条件判定ステップが上記条件1乃至4のいずれかが満たされると判断した場合は、上記合成された値の中で上記第1の補間値が占める割合が大きくなるように上記合成を行う
ことを特徴とする請求項17乃至21のいずれかに記載の画素信号処理方法。
The first interpolation step includes:
For the two-dimensional coordinate data (xi, yi), (i = 1 to M), the following conditions 1 to 4, that is,
Condition 1: all xi are the same value,
Condition 2: all yi are the same value,
Condition 3: The difference between the maximum value and the minimum value of xi is below a certain threshold value,
Condition 4: The difference between the maximum value and the minimum value of yi is a certain threshold value or less.
A condition determination step for determining whether or not any of the above is satisfied,
The interpolation calculation step performs linear interpolation using pixels around the pixel of interest when it is determined that the condition determination step applies to any of the conditions 1 to 4, and otherwise, as described above. Interpolate using a regression equation
In the synthesis step, when the condition determination step determines that any one of the conditions 1 to 4 is satisfied, the ratio of the first interpolation value in the synthesized value is increased. The pixel signal processing method according to any one of claims 17 to 21 , wherein synthesis is performed.
上記注目画素を中心に相関性の強い方向を検出する相関判別ステップをさらに有し、
上記第1及び第2の補間ステップは、
上記注目画素を中心に相関性の強い方向に存在する画素の色成分の値のみを上記補間に用いることを特徴とする請求項13乃至22のいずれかに記載の画素信号処理方法。
A correlation determination step of detecting a direction having a strong correlation around the pixel of interest;
The first and second interpolation steps are:
23. The pixel signal processing method according to claim 13, wherein only the value of a color component of a pixel existing in a direction having a strong correlation around the target pixel is used for the interpolation.
上記回帰式計算ステップは、上記注目画素の近傍の第Kの色成分を有する画素の各々について、その周辺の画素の上記第Kの色成分の値をローパスフィルタリングした結果をも用いて上記回帰式の定数を計算することを特徴とする請求項13乃至23のいずれかに記載の画素信号処理方法。  The regression equation calculating step uses the result of low-pass filtering the value of the K-th color component of the surrounding pixels for each pixel having the K-th color component in the vicinity of the target pixel. The pixel signal processing method according to claim 13, wherein a constant is calculated.
JP2004000245A 2004-01-05 2004-01-05 Pixel signal processing apparatus and method Expired - Fee Related JP4128536B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004000245A JP4128536B2 (en) 2004-01-05 2004-01-05 Pixel signal processing apparatus and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004000245A JP4128536B2 (en) 2004-01-05 2004-01-05 Pixel signal processing apparatus and method

Publications (2)

Publication Number Publication Date
JP2005197866A JP2005197866A (en) 2005-07-21
JP4128536B2 true JP4128536B2 (en) 2008-07-30

Family

ID=34816146

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004000245A Expired - Fee Related JP4128536B2 (en) 2004-01-05 2004-01-05 Pixel signal processing apparatus and method

Country Status (1)

Country Link
JP (1) JP4128536B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4894594B2 (en) * 2007-04-05 2012-03-14 ソニー株式会社 Image processing device
US8724895B2 (en) 2007-07-23 2014-05-13 Nvidia Corporation Techniques for reducing color artifacts in digital images
JP5248368B2 (en) * 2009-03-06 2013-07-31 株式会社東芝 Image processing device
JP6665698B2 (en) * 2016-06-14 2020-03-13 セイコーエプソン株式会社 Image processing method

Also Published As

Publication number Publication date
JP2005197866A (en) 2005-07-21

Similar Documents

Publication Publication Date Title
JP2009065671A (en) Color interpolation method, color interpolation apparatus and computer program
JP2020043435A (en) Image processing apparatus, image processing method, and image processing program
US20090244333A1 (en) Image Processing Apparatus, Image Processing Method, And Program For Attaining Image Processing
JP3926363B2 (en) Pixel signal processing apparatus and pixel signal processing method
JP4104495B2 (en) Data processing apparatus, image processing apparatus, and camera
JP4982897B2 (en) Image processing device
JP4128536B2 (en) Pixel signal processing apparatus and method
JP5040519B2 (en) Image processing apparatus, image processing method, and program
JP4148927B2 (en) Pixel signal processing method and apparatus
CN103430552A (en) Imaging device and imaging program
JP5786355B2 (en) Defocus amount detection device and electronic camera
KR100768619B1 (en) Pixel signal processing device and method
JP4128538B2 (en) Pixel signal processing method and apparatus
JP4446818B2 (en) Pixel interpolation method
JP2010074826A (en) Imaging apparatus and image processing program
TWI282519B (en) Color interpolation method with directed weights
JPWO2005062626A1 (en) Pixel signal processing apparatus and pixel signal processing method
US11909942B2 (en) Parallax detecting apparatus, image capturing apparatus, parallax detecting method, and storage medium
JP2009182733A (en) Image data generation method, image data generation apparatus, and information code reading apparatus
JP2010104019A (en) Pixel interpolation method
KR100810155B1 (en) Image sensor for outputting Bayer images after widening the dynamic range
JP2000350223A (en) Pixel data processing device and pixel data processing method
JP4334496B2 (en) Pixel signal processing apparatus and pixel signal processing method
KR20090103669A (en) Image processing apparatus, image processing method, and program for attaining image processing
WO2025013656A1 (en) Imaging device

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20070419

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20070515

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070711

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20080513

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20080514

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110523

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110523

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120523

Year of fee payment: 4

LAPS Cancellation because of no payment of annual fees