JP2005217478A - Pixel signal processing method and apparatus - Google Patents

Pixel signal processing method and apparatus Download PDF

Info

Publication number
JP2005217478A
JP2005217478A JP2004018248A JP2004018248A JP2005217478A JP 2005217478 A JP2005217478 A JP 2005217478A JP 2004018248 A JP2004018248 A JP 2004018248A JP 2004018248 A JP2004018248 A JP 2004018248A JP 2005217478 A JP2005217478 A JP 2005217478A
Authority
JP
Japan
Prior art keywords
pixel
color component
interpolation
value
target pixel
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2004018248A
Other languages
Japanese (ja)
Other versions
JP4128538B2 (en
Inventor
Shotaro Moriya
正太郎 守谷
Junko Makita
淳子 牧田
Hiroaki Sugiura
博明 杉浦
Koichi Yamashita
孝一 山下
Takashi Ito
俊 伊藤
Tetsuya Kuno
徹也 久野
Narihiro Matoba
成浩 的場
Masaji Tamura
正司 田村
Hideo Fujita
偉雄 藤田
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 JP2004018248A priority Critical patent/JP4128538B2/en
Publication of JP2005217478A publication Critical patent/JP2005217478A/en
Application granted granted Critical
Publication of JP4128538B2 publication Critical patent/JP4128538B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Color Television Image Signal Generators (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a pixel signal processing method and apparatus capable of suppressing production of a false color in an interpolation result even in a region having no similarity relation in a behavior of changes in color components and obtaining an optimum interpolation result independently of a way of the changes in the color component values in regions in the vicinity of a target pixel in the case of producing deficient color components of a plurality of pixels arranged in a way of e.g., the Bayer arrangement through interpolation. <P>SOLUTION: The apparatus and method carries out the interpolation by first and second interpolation methods different from each other to produce first and second interpolation values, and selects and outputs either of the first and second interpolation values depending on whether or not pixel signals are monotonously changed (increased or decreased). The discrimination of the behavior of the change and the first and second interpolation may be carried out on the basis of a J-th color component value of the target pixel and a color component value of a pixel existing in a direction providing a strong correlation among pixels in the regions in the vicinity of the target pixel. <P>COPYRIGHT: (C)2005,JPO&NCIPI

Description

本発明は、画素信号処理装置及び画素信号処理方法に関し、特に2次元平面上に配列され、各々が複数の色成分値のうちのいずれか1つを有する画素信号の組に基づき、上記複数の色成分値のうちの一つの色成分値を有する画素信号が存在する注目画素位置(補間処理対象画素)における他の色成分値を生成する画素信号処理方法及び装置に関する。   The present invention relates to a pixel signal processing device and a pixel signal processing method, and in particular, based on a set of pixel signals arranged on a two-dimensional plane, each having any one of a plurality of color component values. The present invention relates to a pixel signal processing method and apparatus for generating another color component value at a target pixel position (interpolation target pixel) where a pixel signal having one of the color component values exists.

このような画素信号処理は、例えば、各々が複数の色成分(分光感度特性)、例えば赤(R)、緑(G)、青(B)のうちのいずれか一つの色成分値を発生する複数種類の光電変換素子が2次元平面上に、例えばベイヤ型に配列された撮像素子をさらに備えるもので、カラー撮像装置の一部として用いられ、撮像素子から出力された画素信号のうちの、各画素位置において欠落している色成分値(不足色成分値)を補間するために用いられる。   Such pixel signal processing, for example, generates one color component value of each of a plurality of color components (spectral sensitivity characteristics), for example, red (R), green (G), and blue (B). A plurality of types of photoelectric conversion elements are further provided with, for example, an image sensor arranged in a Bayer shape on a two-dimensional plane, and are used as a part of a color image pickup device, and among pixel signals output from the image sensor, It is used to interpolate missing color component values (insufficient color component values) 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 based on the linear similarity ratio between the known color geometric figure and the insufficient color geometric figure is assumed. Yes.

特開2001−197512公報(段落0048〜0049、図7)JP 2001-197512 A (paragraphs 0048 to 0049, FIG. 7)

この従来の方法は、注目画素の近傍の領域内において、それぞれの色成分(例えば、ベイヤ型配列における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 a region near the pixel of interest. For this reason, there is a problem that a false color is generated in an interpolation result in an area where the color component change state is not similar (for example, a boundary between one color and another color), and an area in the vicinity of the target pixel. There is a problem that the interpolation method may not be appropriate depending on how the color component values change.

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

本発明は、
2次元平面上に配列され、各々が第1乃至第N(Nは2以上の整数)の互いに異なる色成分のいずれかを有する複数の画素の、それぞれの色成分値を表す画素信号の組に基づいて、第J(Jは1からNのうちのいずれか一つ)の色成分値を有する注目画素の位置における第K(KはJを除く1からNのうちのいずれか一つ)の色成分値を表す画素信号を補間により生成する画素信号処理方法において、
注目画素の近傍の領域内に位置し、注目画素と同じ色成分を有する画素及び注目画素の色成分値の変化の態様を判別するステップと、
上記変化の態様を判別するステップでの判別結果に応じて、
上記補間を第1の補間方法で行って第1の補間値を生成する第1の補間演算ステップ又は上記補間を上記第1の補間方法とは異なる第2の補間方法で行って第2の補間値を生成する第2の補間演算ステップのいずれか一方を実行する補間演算ステップと
を備え、
上記第1の補間演算ステップ及び第2の補間演算ステップは、上記注目画素の上記第Jの色成分値と、上記注目画素の近傍の領域内に位置する画素の色成分値とに基づいて上記補間を行うことを特徴とする
画素信号処理方法を提供する。
The present invention
A set of pixel signals representing respective color component values of a plurality of pixels arranged on a two-dimensional plane and each having any of first to Nth (N is an integer of 2 or more) different color components. Based on the Kth (K is any one of 1 to N excluding J) at the position of the pixel of interest having the Jth (J is any one of 1 to N) color component value. In a pixel signal processing method for generating a pixel signal representing a color component value by interpolation,
Determining a mode of a change in a color component value of a pixel that is located in a region near the target pixel and has the same color component as the target pixel and the target pixel;
According to the determination result in the step of determining the mode of change,
The first interpolation calculation step for generating the first interpolation value by performing the interpolation by the first interpolation method or the second interpolation by performing the interpolation by a second interpolation method different from the first interpolation method. An interpolation calculation step for executing any one of the second interpolation calculation steps for generating a value,
The first interpolation calculation step and the second interpolation calculation step are based on the J-th color component value of the pixel of interest and the color component value of a pixel located in a region near the pixel of interest. Provided is a pixel signal processing method characterized by performing interpolation.

本発明によれば、偽色の発生を抑えることができ、また注目画素の近傍の領域内での画素の色成分値の変化の仕方に応じて最適の補間を行うことができると言う効果がある。   According to the present invention, the occurrence of false colors can be suppressed, and the optimum interpolation can be performed according to how the color component value of the pixel changes in the area near the target pixel. is there.

以下、図面を参照して本発明の実施の形態を説明する。以下に説明する実施の形態は、フルカラー画像撮像装置、例えばデジタルスチルカメラの一部として用いるのに適したものであるが、本発明はこれに限定されない。   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 still camera, but the present invention is not limited to this.

実施の形態1.
図1は、この発明の実施の形態1の画素信号処理装置を備えた撮像装置の構成を示すブロック図である。レンズ1から入射した光は、2次元撮像素子2に結像する。2次元撮像素子2は、2次元的に配列された複数の光電変換素子を有し、この複数の光電変換素子は、例えば図2に示すように、ベイヤ(Bayer)型に配置された、赤(R)、緑(G)、青(B)の3原色に対応する分光感度特性を有する色フィルタで覆われており、各光電変換素子からは、色フィルタの色に対応した色成分のアナログ信号が出力される。
Embodiment 1 FIG.
FIG. 1 is a block diagram showing a configuration of an image pickup apparatus including the pixel signal processing apparatus according to Embodiment 1 of the present invention. Light incident from the lens 1 forms an image on the two-dimensional image sensor 2. The two-dimensional imaging device 2 has a plurality of photoelectric conversion elements arranged two-dimensionally, and the plurality of photoelectric conversion elements are arranged in a Bayer type, for example, as shown in FIG. Covered with color filters having spectral sensitivity characteristics corresponding to the three primary colors (R), green (G), and blue (B), and from each photoelectric conversion element, an analog of a color component corresponding to the color of the color filter A signal is output.

図2において、横、縦はそれぞれ撮像面の水平方向(H)、垂直方向(V)を表す。光電変換素子は画素を構成し、撮像面上で各光電変換素子が占める位置が画素位置に対応する。各画素は、撮像素子の撮像面上に2次元的に配列されているので、それらの位置は、HV座標面上の座標値で表すことができる。   In FIG. 2, horizontal and vertical represent the horizontal direction (H) and vertical direction (V) of the imaging surface, respectively. The photoelectric conversion element constitutes a pixel, and the position occupied by each photoelectric conversion element on the imaging surface corresponds to the pixel position. Since each pixel is two-dimensionally arranged on the imaging surface of the imaging device, their position can be represented by a coordinate value on the HV coordinate plane.

2次元撮像素子2は入射光を光電変換し入射光量に応じたレベルのアナログ画素信号を画素ごとに出力する。このアナログ画素信号はA/D変換器3でデジタル画素信号に変換され、出力され、補間処理回路4内のフレームメモリ11に記憶される。この際、各画素の信号は、各画素の、撮像面上での位置、従ってHV座標面上での位置に対応付けて記憶される。   The two-dimensional image sensor 2 photoelectrically converts incident light and outputs an analog pixel signal at a level corresponding to the amount of incident light for each pixel. The analog pixel signal is converted into a digital pixel signal by the A / D converter 3, output, and stored in the frame memory 11 in the interpolation processing circuit 4. At this time, the signal of each pixel is stored in association with the position of each pixel on the imaging surface, and hence the position on the HV coordinate plane.

上記のようにしてフレームメモリ11に記憶された画素信号は、撮像素子2から出力された信号の値を表すので、「撮像素子の出力信号」、或いは単に「出力信号」と呼ばれ、後述のように周囲の画素の平均を求めることにより得られる画素信号や補間により得られる画素信号と区別される。   Since the pixel signal stored in the frame memory 11 as described above represents the value of the signal output from the image sensor 2, it is called an “output signal of the image sensor” or simply “output signal”, which will be described later. Thus, it is distinguished from a pixel signal obtained by obtaining an average of surrounding pixels and a pixel signal obtained by interpolation.

上記のように各画素を構成する光電変換素子の各々からは、R、G、Bのいずれかの一つの成分値を表す信号しか得られない。即ち、フレームメモリ11に記録される、各画素位置の出力信号は、R成分値のみを有する画素(R画素)、G成分のみを有する画素(G画素)、B成分のみを有する画素(B画素)のいずれかである。言換えると、各画素位置には一つの色の画素信号のみが既知であり、他の色の画素信号は未知である。本発明の補間処理は、この各画素位置において未知である色(不足色)の色成分値を補間により求めるものである。   As described above, only signals representing one component value of R, G, and B can be obtained from each of the photoelectric conversion elements constituting each pixel. That is, the output signal at each pixel position recorded in the frame memory 11 includes a pixel having only an R component value (R pixel), a pixel having only a G component (G pixel), and a pixel having only a B component (B pixel). ) In other words, only one color pixel signal is known at each pixel position, and the other color pixel signals are unknown. In the interpolation processing of the present invention, the color component value of an unknown color (insufficient color) at each pixel position is obtained by interpolation.

なお、本実施の形態では、各画素位置の画素信号が、R、G、Bのいずれかの色成分を有するものであるが、本発明は一般的には、各画素位置の画素信号が、第1乃至第N(Nは2以上の整数)の色成分値のいずれかを有する場合に適用可能である。   In the present embodiment, the pixel signal at each pixel position has a color component of any one of R, G, and B. In general, according to the present invention, the pixel signal at each pixel position is The present invention is applicable when any of the first to Nth (N is an integer of 2 or more) color component values is used.

合成回路5において補間処理回路4から入力される補間結果OUT4と、A/D変換器3から入力される固体撮像素子2で得られた信号OUT3を合成することでフルカラー画像を得る。   The synthesis circuit 5 combines the interpolation result OUT4 input from the interpolation processing circuit 4 and the signal OUT3 obtained from the solid-state imaging device 2 input from the A / D converter 3 to obtain a full color image.

図3は、この実施の形態1で用いられる補間処理回路4の構成を示す。
図示のように、補間処理回路4は、フレームメモリ11と、読出し制御回路16と、プロセッサ35と、メモリ36とを有する。プロセッサ35は、図2に示されるベイヤ配列型の画像データの各画素に対する不足色成分値の補間処理のため、図4、図5、図6のフローチャートに示すように動作する。プロセッサ35で計算された不足色成分値(補間値)はメモリ36に書き込まれる。
FIG. 3 shows the configuration of the interpolation processing circuit 4 used in the first embodiment.
As illustrated, the interpolation processing circuit 4 includes a frame memory 11, a read control circuit 16, a processor 35, and a memory 36. The processor 35 operates as shown in the flowcharts of FIGS. 4, 5, and 6 for interpolation processing of insufficient color component values for each pixel of the Bayer array type image data shown in FIG. 2. The insufficient color component value (interpolation value) calculated by the processor 35 is written in the memory 36.

以下、補間処理回路4で行われる不足色成分の補間処理について説明する。不足色成分の補間には、
(P1) R画素及びB画素の位置におけるG成分値を求める処理、
(P2) G画素の位置におけるR成分値及びB成分値を求める処理、
(P3) R画素の位置におけるB成分値を求める処理、及び
(P4) B画素の位置におけるR成分値を求める処理
が含まれ、例えば上に記載の順で行われる。
Hereinafter, the interpolation processing of the insufficient color component performed by 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成分値の補間について図4及び図7を参照して説明する。図4はR画素の位置におけるG成分値の補間の際のプロセッサ35の動作を示すフローチャート、図7はR画素の位置におけるG成分値の補間を行う際に利用される画素とその色成分値を示す。図7におけるR画素R44が注目画素(補間処理対象画素)になる。   First, the G component value interpolation process 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. FIG. 4 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. 7 is a pixel used when performing 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. 7 becomes the target pixel (interpolation target pixel).

ステップST11にて、図7に示された、注目画素R44の近傍の領域内に位置する複数の画素の色成分値がフレームメモリ4から読み出される。即ち注目画素R44と、注目画素R44に対し垂直方向に整列したR画素R42、R46、注目画素R44に対し水平方向に整列したR画素R24、R64のR成分値R44、R42、R46、R24、R64と、注目画素R44に対し垂直方向にG画素G41、G43、G45、G47と、注目画素R44に対し水平方向に整列したG画素G14、G34、G54、G74のG成分値G41、G43、G45、G47、G14、G34、G54、G74が読み出される。
なお、上記のように、ある色成分を有する画素とその画素の色成分値を同じ符号で表すことがある。
In step ST11, the color component values of a plurality of pixels located in the region near the target pixel R44 shown in FIG. That is, the R component values R44, R42, R46, R24, R64 of the target pixel R44, the R pixels R42, R46 aligned in the vertical direction with respect to the target pixel R44, and the R pixels R24, R64 aligned in the horizontal direction with respect to the target pixel R44. G components G41, G43, G45, G47 in the vertical direction with respect to the target pixel R44, and G component values G41, G43, G45, G74 aligned in the horizontal direction with respect to the target pixel R44. G47, G14, G34, G54, and G74 are read out.
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.

次に、ステップST12で注目画素を中心に水平方向及び垂直方向のいずれに相関が強いかが判別される。この判別のため、ステップST11で読み出された画素信号(色成分値)の一部を用いて、以下の値dV、dHが計算される。
dV=|G34−G54|
dH=|G43−G45|
Next, in step ST12, 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 a part of the pixel signal (color component value) read in step ST11.
dV = | G34-G54 |
dH = | G43-G45 |

ここで、dVは、注目画素を中心とした垂直方向の画素の色成分値、即ち注目画素に対し垂直方向に整列し、注目画素に隣接する2つの画素の色成分値の差の絶対値を表し、dHは、注目画素を中心とした水平方向の画素の色成分値、即ち注目画素に対し水平方向に整列し、注目画素に隣接する2つの画素の色成分値の差の絶対値を表す。
例えば細かい横縞の画像のように画像中に水平方向の相関が強い場合はdH<dVとなり、細かい縦縞の画像のように垂直方向の相関が強い場合はdV<dHとなる。
Here, dV is the color component value of the pixel in the vertical direction centered on the target pixel, that is, the absolute value of the difference between the color component values of two pixels aligned in the vertical direction with respect to the target pixel and adjacent to the target pixel. DH represents the color component value of the pixel in the horizontal direction around the target pixel, that is, the absolute value of the difference between the color component values of two pixels that are aligned in the horizontal direction with respect to the target pixel and are adjacent to the target pixel. .
For example, dH <dV when the horizontal correlation is strong in the image like a fine horizontal stripe image, and dV <dH when the vertical correlation is strong like a fine vertical stripe image.

このdV、dHの大小関係に応じて、ステップST13a以下の処理もしくはステップST13b以下の処理が行われる。即ち、dH<dVのときは(水平方向の相関が強いと判断されたときは)ステップST13a以下の処理が、それ以外のときは(垂直方向の相関が強いと判断されたときは)ステップST13b以下の処理が行われる。なお、dH、dVを求める式は上記の式に限定されない。   Depending on the magnitude relationship between dV and dH, the process after step ST13a or the process after step ST13b is performed. That is, when dH <dV (when it is determined that the correlation in the horizontal direction is strong), the processing after step ST13a is performed, and otherwise (when it is determined that the correlation in the vertical direction is strong), step ST13b The following processing is performed. Note that the equations for obtaining dH and dV are not limited to the above equations.

ステップST13a以下の処理について述べる。
ステップST13aでは、注目画素の近傍の領域内に位置し、注目画素を中心として水平方向(上記相関判別ステップST12で相関が強いと判定された方向)に整列し、注目画素と同じ色成分を有する画素及び注目画素の色成分値の変化の態様を判定する。即ち、画素位置との関係で、画素の色成分値が単調に変化(増加又は減少)しているかどうかを判定する。
これは例えば以下のようにして行われる。即ち、注目画素R44、及び注目画素R44に対して水平方向(相関が強いと判定された方向)に整列し、注目画素に近接し(例えば2画素分離れた位置の)、注目画素を中心として互いに反対側に位置する画素R24、R64のR成分値R44、R24、R64の大小関係が調べられる。即ち、R成分値R24、R44、R64が以下の条件1、2のいずれかを満たすかどうかの判定が行われる。
The processing after step ST13a will be described.
In step ST13a, the pixel is located in a region in the vicinity of the target pixel, aligned in the horizontal direction (the direction determined to have a strong correlation in the correlation determination step ST12) with the target pixel as the center, and has the same color component as the target pixel. A change mode of the color component value of the pixel and the target pixel is determined. That is, it is determined whether or not the color component value of the pixel changes monotonously (increases or decreases) in relation to the pixel position.
This is performed, for example, as follows. That is, the pixel of interest R44 and the pixel of interest R44 are aligned in the horizontal direction (the direction in which the correlation is determined to be strong), close to the pixel of interest (for example, at a position separated by two pixels), and centered on the pixel of interest. The magnitude relationship between the R component values R44, R24, R64 of the pixels R24, R64 located on the opposite sides is examined. That is, it is determined whether or not the R component values R24, R44, and R64 satisfy one of the following conditions 1 and 2.

条件1:R24<R44かつR64<R44
条件2:R24>R44かつR64>R44
Condition 1: R24 <R44 and R64 <R44
Condition 2: R24> R44 and R64> R44

条件1が満たされるときは、色成分値が、上に凸に変化しており、条件2が満たされるときは色成分値が下に凸に変化しており、条件1、2のいずれも満たされないときは、色成分値が単調に変化していると言える。   When condition 1 is satisfied, the color component value changes upwardly, and when condition 2 is satisfied, the color component value changes downwardly, and both conditions 1 and 2 are satisfied. If not, it can be said that the color component value changes monotonously.

ステップST13aにおける判定の結果に応じて、ステップST14aもしくはステップST15a以下の処理のどちらか一方が行われる。即ち、条件1、2のいずれかが満たされるときは、ステップST14aの処理が、そうでないときはステップST15a以下の処理が行われる。   Depending on the result of the determination in step ST13a, either step ST14a or step ST15a and subsequent processing is performed. That is, when either of the conditions 1 and 2 is satisfied, the process of step ST14a is performed, and otherwise, the process of step ST15a and the subsequent processes is performed.

ステップST14aは、相似関係を仮定した補間演算であり、以下の式(2)で注目画素R44のG成分値G44を計算する。   Step ST14a is an interpolation operation assuming a similar relationship, and calculates the G component value G44 of the pixel of interest R44 by the following equation (2).

Figure 2005217478
Figure 2005217478

ステップST15aでは、以下に示される二つの2次元データを計算する。これらの2次元データの各々は、注目画素に対して水平方向(相関が強いと判定された方向)に整列し、注目画素に近接し(例えば2画素分離れた位置の)、注目画素を中心として互いに反対側に位置する画素の位置に対して求められた、上記注目画素位置における既知の色成分をx成分(xi)とし、不足色(未知)の色成分をy成分(yi)(ただし、i=1、2)とするものである。   In step ST15a, the following two two-dimensional data are calculated. Each of these two-dimensional data is aligned with the target pixel in the horizontal direction (direction determined to have a strong correlation), close to the target pixel (for example, at a position separated by two pixels), and centered on the target pixel. The known color component at the target pixel position obtained with respect to the positions of the pixels located on the opposite sides of each other as x component (xi) and the insufficient color (unknown) color component as y component (yi) , I = 1, 2).

Figure 2005217478
Figure 2005217478

上記の式から分るように、x成分xiとしては、撮像素子2から得られた各画素位置のR成分がそのまま用いられ、y成分yiとしては、各画素位置の周囲の、例えば水平方向の両側において隣接する画素のG成分の平均が用いられている。   As can be seen from the above equation, as the x component xi, the R component at each pixel position obtained from the image sensor 2 is used as it is, and as the y component yi, for example, in the horizontal direction around each pixel position. The average of the G components of adjacent pixels on both sides is used.

ステップST16aでは、上記のx成分x1とx2の差の絶対値がある閾値以下かどうかを調べる。x1とx2の差の絶対値が上記閾値以下のときはステップST18aの処理を、それ以外のときはステップST17aの処理を行う。   In step ST16a, it is checked whether or not the absolute value of the difference between the x components x1 and x2 is equal to or smaller than a certain threshold value. When the absolute value of the difference between x1 and x2 is equal to or smaller than the threshold value, the process of step ST18a is performed, and otherwise, the process of step ST17a is performed.

ステップST17aは、単調変化を仮定した補間演算であり、以下の式(3)で注目画素R44に対するG成分値G44を計算する。   Step ST17a is an interpolation operation that assumes a monotonous change, and calculates the G component value G44 for the pixel of interest R44 by the following equation (3).

Figure 2005217478
Figure 2005217478

ステップST18aでは線形補間を用いて注目画素R44に対するG成分値G44を計算する。即ち、注目画素R44に対するG成分値G44は、注目画素に隣接する画素の色成分値を用いて、以下の式で与えられる。
G44=(G34+G54)/2
In step ST18a, the G component value G44 for the target pixel R44 is calculated using linear interpolation. That is, the G component value G44 for the target pixel R44 is given by the following equation using the color component value of the pixel adjacent to the target pixel.
G44 = (G34 + G54) / 2

ステップST13b以下の処理について述べる。
ステップST13bでは、注目画素の近傍の領域内に位置し、注目画素を中心として垂直方向(上記相関判別ステップST12で相関が強いと判定された方向)に整列し、注目画素と同じ色成分を有する画素、及び注目画素の色成分値が、画素位置との関係で、単調に変化しているかどうかの判定が行われる。
そのため、例えばR画素R42、R44、R46のR成分値R42、R44、R46の大小関係が調べられる。そして、その結果によりステップST14bもしくはステップST15b以下の処理のどちらか一方が行われる。即ち、R成分値R42、R44、R46が以下の条件1、2のいずれかを満たすときはステップST14bの処理が、そうでないときはステップST15b以下の処理が行われる。
The processing after step ST13b will be described.
In step ST13b, the pixel is located in a region in the vicinity of the target pixel, aligned in the vertical direction (the direction in which the correlation is determined to be strong in the correlation determination step ST12) with the target pixel as the center, and has the same color component as the target pixel. It is determined whether the color component values of the pixel and the pixel of interest are changing monotonously in relation to the pixel position.
Therefore, for example, the magnitude relationship between the R component values R42, R44, and R46 of the R pixels R42, R44, and R46 is examined. Then, depending on the result, either step ST14b or step ST15b and subsequent processing is performed. That is, when the R component values R42, R44, and R46 satisfy one of the following conditions 1 and 2, the process of step ST14b is performed, and otherwise, the process of step ST15b and the subsequent processes is performed.

条件1:R42<R44かつR46<R44
条件2:R42>R44かつR46>R44
Condition 1: R42 <R44 and R46 <R44
Condition 2: R42> R44 and R46> R44

ステップST14bは、相似関係を仮定した補間演算であり、以下の式で注目画素R44のG成分値G44を計算する。   Step ST14b is an interpolation operation that assumes a similar relationship, and calculates the G component value G44 of the pixel of interest R44 by the following equation.

Figure 2005217478
Figure 2005217478

ステップST15bでは、以下に示される二つの2次元データを計算する。これらの2次元データの各々は、注目画素に対して垂直方向(相関が強いと判定された方向)に整列し、注目画素に近接し(例えば2画素分離れた位置の)、注目画素を中心として互いに反対側に位置する画素の位置に対して求められた、上記注目画素位置における既知の色成分をx成分(xi)とし、不足色(未知)の色成分をy成分(yi)(ただし、i=1、2)とするものである。   In step ST15b, the following two two-dimensional data are calculated. Each of these two-dimensional data is aligned in the vertical direction (the direction determined to have a strong correlation) with respect to the target pixel, close to the target pixel (for example, at a position separated by two pixels), and centered on the target pixel. The known color component at the target pixel position obtained with respect to the positions of the pixels located on the opposite sides of each other as x component (xi) and the insufficient color (unknown) color component as y component (yi) , I = 1, 2).

Figure 2005217478
Figure 2005217478

ステップST16bでは、上記のx成分x1とx2の差の絶対値がある閾値以下かどうかを調べる。x1とx2の差の絶対値が上記閾値以下のときはステップST18bの処理を、それ以外のときはステップST17bの処理を行う。   In step ST16b, it is checked whether or not the absolute value of the difference between the x components x1 and x2 is equal to or smaller than a certain threshold value. When the absolute value of the difference between x1 and x2 is equal to or smaller than the threshold value, the process of step ST18b is performed, and otherwise, the process of step ST17b is performed.

ステップST17bは、単調変化を仮定した補間演算であり、以下の式で注目画素R44に対するG成分値G44を計算する。   Step ST17b is an interpolation operation that assumes a monotonous change, and calculates a G component value G44 for the pixel of interest R44 using the following equation.

Figure 2005217478
Figure 2005217478

ステップST18bでは線形補間を用いて注目画素R44に対するG成分値G44を計算する。即ち、注目画素R44に対するG成分値G44は、注目画素に隣接する画素の色成分値を用いて、以下の式で与えられる。
G44=(G43+G45)/2
In step ST18b, the G component value G44 for the target pixel R44 is calculated using linear interpolation. That is, the G component value G44 for the target pixel R44 is given by the following equation using the color component value of the pixel adjacent to the target pixel.
G44 = (G43 + G45) / 2

上記したステップST14a、ST17a、ST18a、ST14b、ST17b、ST18bのいずれかにより補間された不足色成分値(補間値)がステップST19で、注目画素R44の位置における、補間により求められたG成分値としてメモリ36に、画素位置に対応付けて、書込まれる。
以上の補間処理がすべてのR画素の位置におけるG成分値に対して行われる。
The deficient color component value (interpolated value) interpolated in any of the above-described steps ST14a, ST17a, ST18a, ST14b, ST17b, ST18b is the G component value obtained by interpolation at the position of the target pixel R44 in step ST19. It is written in the memory 36 in association with the pixel position.
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 the interpolation processing of 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各画素の配置は図8に示されるように、注目画素が奇数行にある場合(a)と、偶数行にある場合(b)とで異なり、RとBが入れ替わった配置となっている。まず、奇数行におけるG画素の位置におけるR成分値及びB成分値の補間を、図5及び図9を参照して説明する。
Next, the R component value and B component value interpolation processing at the G pixel position will be described.
In the Bayer array, when the G pixel is centered, the arrangement of the R, G, and B pixels is as shown in FIG. 8 when the pixel of interest is in an odd row (a) and in an even row ( Unlike b), the arrangement is such that R and B are interchanged. 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.

図5はG画素の位置におけるR成分値の補間の際のプロセッサ35の動作を示すフローチャート、図9は奇数行のG画素の位置におけるR成分値及びB成分値の補間を行う際に利用される画素とその色成分値を示す。   FIG. 5 is a flowchart showing the operation of the processor 35 at the time of interpolation of the R component value at the G pixel position, and FIG. 9 is used when the R component value and the B component value are interpolated at the odd row G pixel positions. Pixel and its color component value.

図9において、G画素G44が注目画素になるが、注目画素G44の垂直方向にはR画素が存在せず、水平方向にはB画素が存在しない。従って、奇数行のG画素の位置におけるR成分値の補間に用い得るのは水平方向の画素のみであり、B成分値の補間に用い得るのは垂直方向の画素のみである。従って補間処理のために参照する方向は自ずと一方向に限られるので、図4のステップST12のような相関判別は行わない。   In FIG. 9, the G pixel G44 is the target pixel, but no R pixel exists in the vertical direction of the target pixel G44, and no B pixel exists in the horizontal direction. Therefore, only pixels in the horizontal direction can be used for interpolation of the R component values at the positions of the G pixels in the odd rows, and only pixels in the vertical direction can be used for interpolation of the B component values. Accordingly, the direction to be referred to for the interpolation processing is naturally limited to one direction, and thus the correlation determination as in step ST12 in FIG. 4 is not performed.

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

ステップST21にて、図9に示された、注目画素G44の近傍の領域内に位置する複数の画素の色成分値がフレームメモリ4から読み出される。即ち、注目画素G44と、注目画素G44に対し、水平方向に整列したG画素G24、G64のG成分値G44、G24、G64と、注目画素に対して水平方向に整列したR画素R14、R34、R54、R74のR成分値R14、R34、R54、R74が読み出される。   In step ST21, the color component values of a plurality of pixels located in the region in the vicinity of the target pixel G44 shown in FIG. That is, the target pixel G44, the G component values G44, G24, G64 of the G pixels G24, G64 aligned in the horizontal direction with respect to the target pixel G44, and the R pixels R14, R34, aligned in the horizontal direction with respect to the target pixel. The R component values R14, R34, R54, and R74 of R54 and R74 are read out.

次にステップST22で、注目画素の近傍の領域内に位置し、注目画素を中心として水平方向(R画素が存在する方向)に整列し、注目画素と同じ色成分を有する画素、及び注目画素の色成分値が、画素位置との関係で、単調に変化しているかどうかを判定する。
そのため、例えばG画素G24、G44、G64のG成分値G24、G44、G64の大小関係が調べられる。そして、その結果によりステップST23もしくはステップST24以下の処理のどちらか一方が行われる。即ち、G成分値G24、G44、G64が以下の条件1、2のいずれかを満たすときはステップST23の処理が、そうでないときはステップST24以下の処理が行われる。
Next, in step ST22, a pixel that is located in a region near the target pixel, is aligned in the horizontal direction (the direction in which the R pixel exists) around the target pixel, and has the same color component as the target pixel, and It is determined whether or not the color component value changes monotonously in relation to the pixel position.
Therefore, for example, the magnitude relationship between the G component values G24, G44, and G64 of the G pixels G24, G44, and G64 is examined. Then, depending on the result, either step ST23 or step ST24 and subsequent processes are performed. That is, when the G component values G24, G44, and G64 satisfy any one of the following conditions 1 and 2, the process of step ST23 is performed, and otherwise, the process of step ST24 and the subsequent processes is performed.

条件1:G24<G44かつG64<G44
条件2:G24>G44かつG64>G44
Condition 1: G24 <G44 and G64 <G44
Condition 2: G24> G44 and G64> G44

ステップST23は、相似関係を仮定した補間演算であり、以下の式で注目画素G44のR成分値R44を計算する。   Step ST23 is an interpolation operation assuming a similar relationship, and calculates the R component value R44 of the pixel of interest G44 by the following equation.

Figure 2005217478
Figure 2005217478

ステップST24では、以下に示される二つの2次元データを計算する。これらの2次元データの各々は、注目画素に対して水平方向(R画素が存在する方向)に整列し、注目画素に近接し(例えば2画素分離れた位置の)、注目画素を中心として互いに反対側に位置する画素の位置に対して求められた、上記注目画素位置における既知の色成分をx成分(xi)とし、不足色(未知)の色成分をy成分(yi)(ただし、i=1、2)とするものである。   In step ST24, the following two two-dimensional data are calculated. Each of these two-dimensional data is aligned in the horizontal direction (the direction in which the R pixel exists) with respect to the target pixel, is close to the target pixel (for example, at a position separated by two pixels), and is centered on the target pixel. The known color component at the target pixel position obtained with respect to the position of the pixel located on the opposite side is the x component (xi), and the insufficient color (unknown) color component is the y component (yi) (where i = 1, 2).

Figure 2005217478
Figure 2005217478

上記の式から分るように、x成分xiとしては、撮像素子2から得られた各画素位置のG成分がそのまま用いられ、y成分yiとしては、各画素位置の周囲の、例えば水平方向の両側において隣接する画素のR成分の平均が用いられている。   As can be seen from the above formula, as the x component xi, the G component at each pixel position obtained from the image sensor 2 is used as it is, and as the y component yi, for example, in the horizontal direction around each pixel position. The average of the R components of adjacent pixels on both sides is used.

ステップST25では、上記のx成分x1とx2の差の絶対値がある閾値以下かどうかを調べ、x1とx2の差の絶対値が上記閾値以下のときは、次にステップST27の処理を、それ以外のときは、次にステップST26の処理を行う。   In step ST25, it is checked whether the absolute value of the difference between the x components x1 and x2 is equal to or smaller than a threshold value. If the absolute value of the difference between x1 and x2 is equal to or smaller than the threshold value, the process of step ST27 is performed next. Otherwise, the process of step ST26 is performed next.

ステップST26は、単調変化を仮定した補間演算であり、以下の式で注目画素G44のR成分値R44を計算する。   Step ST26 is an interpolation operation assuming a monotonous change, and the R component value R44 of the pixel of interest G44 is calculated by the following equation.

Figure 2005217478
Figure 2005217478

ステップST27では線形補間を用いて注目画素G44に対するR成分値R44を計算する。即ち、注目画素G44に対するR成分値R44は、注目画素に隣接する画素の色成分値を用いて、以下の式で与えられる。
R44=(R34+R54)/2
In step ST27, an R component value R44 for the target pixel G44 is calculated using linear interpolation. That is, the R component value R44 for the target pixel G44 is given by the following equation using the color component value of the pixel adjacent to the target pixel.
R44 = (R34 + R54) / 2

上記したステップST23、ST26、ST27のいずれかにより補間された不足色成分値(補間値)がステップST28で、注目画素G44の位置における、補間により求められたR成分値としてメモリ36に、画素位置に対応付けて、書込まれる。   The insufficient color component value (interpolated value) interpolated in any of the above-described steps ST23, ST26, ST27 is stored in the memory 36 as the R component value obtained by interpolation at the position of the target pixel G44 in step ST28. Written in association with

以上の補間処理がすべての奇数行の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成分値の補間処理について説明する。図8(a)に示すように、注目画素であるG画素を中心として、B成分を有する画素は縦方向(上下方向)に位置しており、横方向(左右方向)には存在しない。   Next, the B component value interpolation process at the position of the odd-numbered G pixel will be described. As shown in FIG. 8A, the pixel having the B component is located in the vertical direction (vertical direction) around the G pixel as the target pixel, and does not exist in the horizontal direction (horizontal direction).

ステップST21にて、図9に示された、注目画素G44の近傍の領域内に位置する複数の画素の色成分値がフレームメモリ4から読み出される。即ち、注目画素G44と、注目画素G44に対し、垂直方向に整列したG画素G42、G46のG成分値G44、G42、G46と、注目画素に対して垂直方向に整列したB画素B41、B43、B45、B47のB成分値B41、B43、B45、B47が読み出される。   In step ST21, the color component values of a plurality of pixels located in the region in the vicinity of the target pixel G44 shown in FIG. That is, the target pixel G44, the G component values G44, G42, and G46 of the G pixels G42 and G46 aligned in the vertical direction with respect to the target pixel G44, and the B pixels B41, B43, B component values B41, B43, B45, and B47 of B45 and B47 are read out.

次にステップST22で、注目画素の近傍の領域内に位置し、注目画素を中心として垂直方向(B画素が存在する方向)に整列し、注目画素と同じ色成分を有する画素、及び注目画素の色成分値が、画素位置との関係で、単調に変化しているかどうかを判定する。
そのため、例えば、G画素G42、G44、G46のG成分値G42、G44、G46の大小関係が調べられる。そして、その結果によりステップST23もしくはステップST24以下の処理のどちらか一方が行われる。即ち、G成分値G42、G44、G46が以下の条件1、2のいずれかを満たすときはステップST23の処理が、そうでないときはステップST24以下の処理が行われる。
Next, in step ST22, a pixel that is located in a region near the target pixel, is aligned in the vertical direction (the direction in which the B pixel exists) around the target pixel, has the same color component as the target pixel, and It is determined whether or not the color component value changes monotonously in relation to the pixel position.
Therefore, for example, the magnitude relationship between the G component values G42, G44, and G46 of the G pixels G42, G44, and G46 is examined. Then, depending on the result, either step ST23 or step ST24 and subsequent processes are performed. That is, when the G component values G42, G44, and G46 satisfy any one of the following conditions 1 and 2, the process of step ST23 is performed, and otherwise, the process of step ST24 and the subsequent processes is performed.

条件1:G42<G44かつG46<G44
条件2:G42>G44かつG46>G44
Condition 1: G42 <G44 and G46 <G44
Condition 2: G42> G44 and G46> G44

ステップST23では以下の式で注目画素G44のB成分値B44を計算する。   In step ST23, the B component value B44 of the target pixel G44 is calculated by the following equation.

Figure 2005217478
Figure 2005217478

ステップST24では、以下に示される二つの2次元データを計算する。これらの2次元データの各々は、注目画素に対して垂直方向(B画素が存在する方向)に整列し、注目画素に近接し(例えば2画素分離れた位置の)、注目画素を中心として互いに反対側に位置する画素の位置に対して求められた、上記注目画素位置における既知の色成分をx成分(xi)とし、不足色(未知)の色成分をy成分(yi)(ただし、i=1、2)とするものである。   In step ST24, the following two two-dimensional data are calculated. Each of these two-dimensional data is aligned in the vertical direction (the direction in which the B pixel exists) with respect to the target pixel, is close to the target pixel (for example, at a position separated by two pixels), and is centered on the target pixel. The known color component at the target pixel position obtained with respect to the position of the pixel located on the opposite side is the x component (xi), and the insufficient color (unknown) color component is the y component (yi) (where i = 1, 2).

Figure 2005217478
Figure 2005217478

ステップST25では、上記のx成分x1とx2の差の絶対値がある閾値以下かどうかを調べる。x1とx2の差の絶対値が上記閾値以下のときは、次にステップST27の処理を、それ以外のときは、次にステップST26の処理を行う。   In step ST25, it is checked whether or not the absolute value of the difference between the x components x1 and x2 is equal to or less than a threshold value. When the absolute value of the difference between x1 and x2 is equal to or smaller than the threshold value, the process of step ST27 is performed next, and otherwise, the process of step ST26 is performed.

ステップST26では以下の式で注目画素G44のB成分値B44を計算する。   In step ST26, the B component value B44 of the target pixel G44 is calculated by the following equation.

Figure 2005217478
Figure 2005217478

ステップST27では線形補間を用いて注目画素G44に対するB成分値B44を計算する。即ち、注目画素G44に対するB成分値B44は、注目画素に隣接する画素の色成分値を用いて、以下の式で与えられる。
B44=(B43+B45)/2
In step ST27, the B component value B44 for the target pixel G44 is calculated using linear interpolation. That is, the B component value B44 for the target pixel G44 is given by the following equation using the color component values of the pixels adjacent to the target pixel.
B44 = (B43 + B45) / 2

上記したステップST23、ST26、ST27のいずれかにより補間された不足色成分値(補間値)がステップST28で、注目画素G44の位置における、補間により求められたB成分値としてメモリ36に、画素位置に対応付けて、書込まれる。   The insufficient color component value (interpolation value) interpolated in any of the above-described steps ST23, ST26, ST27 is stored in the memory 36 as the B component value obtained by interpolation at the position of the target pixel G44 in step ST28. Written in association with

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

上記した奇数行のG画素の位置におけるR成分値の補間の説明と、奇数行のG画素の位置におけるB成分値の補間の説明とは、垂直方向(上下方向)と水平方向(左右方向)とが入れ替え変わっただけである。   The description of the interpolation of the R component value at the position of the G pixel in the odd row and the description of the interpolation of the B component value at the position of the G pixel in the odd row are the vertical direction (up and down direction) and the horizontal direction (left and right direction). Is just replaced.

以上は奇数行のG画素の位置における、R成分値及びB成分値の補間処理であるが、偶数行のG画素の位置におけるR成分値及びB成分値の補間も、奇数行の場合と同様に行われる。但し、「垂直方向」と「水平方向」を入れ替える。別の見方をすれば、偶数行におけるG画素の位置におけるR成分値及びB成分値の補間は、奇数行におけるG画素の位置におけるR成分値及びB成分値の補間と、RとBが入れ替わる以外は同様に行われる。   The above is the interpolation processing of the R component value and the B component value at the position of the G pixel in the odd row, but the interpolation of the R component value and the B component value at the position of the G pixel in the even row is the same as in the case of the odd row. To be done. 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成分値の補間処理について図6及び図10を参照して説明する。
図6はR画素の位置におけるB成分値の補間の際のプロセッサ35の動作を示すフローチャート、図10はR画素の位置におけるB成分値の補間を行う際に利用される画素とその色成分値を示す。図10におけるR画素R44が注目画素になる。
Next, the B component value interpolation processing at the position of the R pixel will be described with reference to FIGS.
FIG. 6 is a flowchart showing the operation of the processor 35 when interpolating the B component value at the R pixel position, and FIG. 10 shows the pixel and its color component value used when interpolating the B component value at the R pixel position. Indicates. The R pixel R44 in FIG. 10 is the target pixel.

ステップST31にて、図10に示された、注目画素R44の近傍の領域内に位置する複数の画素の色成分値がフレームメモリ4から読み出される。即ち注目画素R44と、注目画素に対し、右斜め上から左斜め下の方向(45度の方向)に整列したR画素R62、R26、左斜め上から右斜め下の方向(−45度の方向)に整列したR画素R22、R66、のR成分値R44、R62、R26、R22、R66と、注目画素に対し、右斜め上から左斜め下の方向(45度の方向)に整列したB画素B71、B53、B35、B17、左斜め上から右斜め下の方向(−45度の方向)に整列したB画素B11、B33、B55、B77のB成分値B71、B53、B35、B17、B11、B33、B55、B77、が読み出される。   In step ST31, the color component values of a plurality of pixels located in the region near the target pixel R44 shown in FIG. That is, the target pixel R44, R pixels R62 and R26 aligned in the direction from the upper right to the lower left (45 ° direction) with respect to the target pixel, the upper left to the lower right direction (−45 ° direction) ) R component values R44, R62, R26, R22, R66 of the R pixels R22, R66 aligned with ()) and the B pixel aligned with respect to the target pixel from the upper right to the lower left (45 degree direction). B71, B53, B35, B17, B component values B71, B53, B35, B17, B11 of B pixels B11, B33, B55, B77 aligned in the direction from the upper left to the lower right (the direction of −45 degrees), B33, B55, and B77 are read out.

次に、ステップST32で、注目画素を中心に45度の方向及び−45度の方向のいずれに相関が強いかが判別される。この判別のため、ステップST31で読み出された画素信号(色成分値)の一部を用いて、以下の値d(45)、d(−45)が計算される。
d(45)=|B53−B35|
d(−45)=|B55−B33|
Next, in step ST32, it is determined whether the correlation is strong in the direction of 45 degrees or the direction of -45 degrees around the target pixel. For this determination, the following values d (45) and d (−45) are calculated using a part of the pixel signal (color component value) read in step ST31.
d (45) = | B53−B35 |
d (−45) = | B55−B33 |

d(45)は注目画素を中心として水平方向となす角度が45度の方向(右上から左下への方向、即ち右上がりの方向)の直線上の画素の色成分値、即ち注目画素に対し45度の方向に整列し、注目画素に隣接する2つの画素の色成分値の差の絶対値を表し、d(−45)は注目画素を中心として水平方向となす角度が−45度の方向(左上から右下への方向、即ち左上がりの方向)の直線上の画素の色成分値、即ち注目画素に対し−45度の方向に整列し、注目画素に隣接する2つの画素の色成分値の差の絶対値を表す。   d (45) is the color component value of a pixel on a straight line in the direction of 45 degrees with respect to the pixel of interest in the horizontal direction (upper right to lower left, ie, upward to the right), that is, 45 with respect to the pixel of interest. The absolute value of the difference between the color component values of two pixels adjacent to the target pixel is aligned in the direction of degrees, and d (−45) is the direction in which the angle from the horizontal direction around the target pixel is −45 degrees ( The color component values of the pixels on the straight line in the direction from the upper left to the lower right, that is, the upward left direction), that is, the color component values of two pixels that are aligned in the direction of −45 degrees with respect to the target pixel Represents the absolute value of the difference.

ステップST12の処理同様、画像中に相関の強い方向の画素の色成分値を用いて計算した値の方が小さくなる。
このd(45)、d(−45)の大小関係に応じて、ステップST33a以下の処理もしくはステップST33b以下の処理が行われる。即ち、d(45)<d(−45)のときは(45度の方向に相関が強いときは)ステップST33a以下の処理が、それ以外のときは(−45度の方向に相関が強いときは)ステップST33b以下の処理が行われる。なお、d(45)、d(−45)を求める式は上記のものに限定されない。
Similar to the processing in step ST12, the value calculated using the color component values of the pixels in the direction of strong correlation in the image is smaller.
Depending on the magnitude relationship between d (45) and d (−45), the process after step ST33a or the process after step ST33b is performed. That is, when d (45) <d (−45) (when the correlation is strong in the direction of 45 degrees), the processing after step ST33a is performed, and otherwise (when the correlation is strong in the direction of −45 degrees) Step ST33b and subsequent processes are performed. Note that the equations for obtaining d (45) and d (−45) are not limited to the above.

ステップST33a以下の処理について述べる。
ステップST33aでは、注目画素の近傍の領域内に位置し、注目画素を中心として45度の方向(上記相関判別ステップST32で相関が強いと判定された方向)に整列し、注目画素と同じ色成分を有する画素、及び注目画素の色成分値が、画素位置との関係で、単調に変化しているかどうかを判定する。
そのため、例えばR画素R62、R44、R26のR成分値R62、R44、R26の大小関係が調べられる。そして、その結果によりステップST34aもしくはステップST35a以下の処理が行われる。即ち、R62、R44、R26が以下の条件1、2のいずれかを満たすときはステップST34aの処理が、そうでないときはステップST35a以下の処理が行われる。
The processing after step ST33a will be described.
In step ST33a, the pixel is located in a region in the vicinity of the target pixel, aligned in a 45 degree direction (the direction in which the correlation is determined to be strong in the correlation determination step ST32) around the target pixel, and the same color component as the target pixel. It is determined whether or not the color component values of the pixel having the pixel and the target pixel change monotonously in relation to the pixel position.
Therefore, for example, the magnitude relationship between the R component values R62, R44, and R26 of the R pixels R62, R44, and R26 is examined. And the process below step ST34a or step ST35a is performed by the result. That is, when R62, R44, and R26 satisfy one of the following conditions 1 and 2, the process of step ST34a is performed, and otherwise, the process of step ST35a and the subsequent processes is performed.

条件1:R62<R44かつR26<R44
条件2:R62>R44かつR26>R44
Condition 1: R62 <R44 and R26 <R44
Condition 2: R62> R44 and R26> R44

ステップST34aは、相似関係を仮定した補間演算であり、以下の式で注目画素R44のB成分値B44を計算する。   Step ST34a is an interpolation operation assuming a similar relationship, and calculates the B component value B44 of the target pixel R44 by the following equation.

Figure 2005217478
Figure 2005217478

ステップST35aでは、以下に示される二つの2次元データを計算する。これらの2次元データの各々は、注目画素に対して45度の方向(相関が強いと判定された方向)に整列し、注目画素に近接し(例えば45度の方向に2画素分離れた位置(水平方向及び垂直方向に2画素分離れた位置)の)、注目画素を中心として互いに反対側に位置する画素の位置に対して求められた、上記注目画素位置における既知の色成分をx成分(xi)とし、不足色(未知)の色成分をy成分(yi)(ただし、i=1、2)とするものである。   In step ST35a, the following two two-dimensional data are calculated. Each of these two-dimensional data is aligned in a direction of 45 degrees with respect to the target pixel (direction determined to have a strong correlation), and is close to the target pixel (for example, a position separated by two pixels in the direction of 45 degrees) The known color component at the target pixel position (x component) obtained for the position of the pixel located on the opposite side with respect to the target pixel (position separated by two pixels in the horizontal and vertical directions) (Xi) and the color component of the insufficient color (unknown) as the y component (yi) (where i = 1, 2).

Figure 2005217478
Figure 2005217478

上記の式から分るように、x成分xiとしては、撮像素子2から得られた各画素位置のR成分がそのまま用いられ、y成分yiとしては、各画素位置の周囲の、例えば45度の方向の両側において隣接する画素のB成分の平均が用いられている。   As can be seen from the above formula, as the x component xi, the R component at each pixel position obtained from the image sensor 2 is used as it is, and as the y component yi, for example, 45 degrees around each pixel position. The average of the B components of adjacent pixels on both sides of the direction is used.

ステップST36aでは、上記のx成分x1とx2の差の絶対値がある閾値以下かどうかを調べる。x1とx2の差の絶対値が上記閾値以下のときはステップST38aの処理を、それ以外のときはステップST37aの処理を行う。   In step ST36a, it is checked whether or not the absolute value of the difference between the x components x1 and x2 is equal to or smaller than a certain threshold value. When the absolute value of the difference between x1 and x2 is equal to or smaller than the threshold value, the process of step ST38a is performed. Otherwise, the process of step ST37a is performed.

ステップST37aは、単調変化を仮定した補間演算であり、以下の式で注目画素R44に対するB成分値B44を計算する。   Step ST37a is an interpolation operation that assumes a monotonous change, and calculates a B component value B44 for the pixel of interest R44 using the following equation.

Figure 2005217478
Figure 2005217478

ステップST38aでは線形補間を用いて注目画素R44に対するB成分値B44を計算する。即ち、注目画素B44に対するB成分値B44は、注目画素に隣接する画素の色成分値を用いて、以下の式で与えられる。
B44=(B53+B35)/2
In step ST38a, the B component value B44 for the target pixel R44 is calculated using linear interpolation. That is, the B component value B44 for the target pixel B44 is given by the following equation using the color component values of the pixels adjacent to the target pixel.
B44 = (B53 + B35) / 2

次にステップ33b以下の処理について述べる。
まず、ステップST33bでは、ステップ33aと同様に、注目画素の近傍の領域内に位置し、注目画素を中心として−45度の方向(上記相関判別ステップST32で相関が強いと判定された方向)に整列し、注目画素と同じ色成分を有する画素、及び注目画素の色成分値が、画素位置との関係で、単調に変化しているかどうかの判定が行われる。
そのため、例えばR画素R22、R44、R66のR成分値R22、R44、R66の大小関係が調べられる。そして、その結果によりステップST34bもしくはステップST35b以下の処理のどちらか一方が行われる。即ち、R成分値R22、R44、R66が以下の条件1、2のいずれかを満たすときはステップST34bの処理が、そうでないときはステップST35b以下の処理が行われる。
Next, the processing after step 33b will be described.
First, in step ST33b, as in step 33a, it is located in the region in the vicinity of the target pixel, and is in the direction of −45 degrees around the target pixel (the direction in which the correlation is determined to be strong in the correlation determination step ST32). It is determined whether the pixels that are aligned and have the same color component as the target pixel, and the color component value of the target pixel change monotonously in relation to the pixel position.
Therefore, for example, the magnitude relationship between the R component values R22, R44, and R66 of the R pixels R22, R44, and R66 is examined. Then, depending on the result, either step ST34b or processing after step ST35b is performed. That is, when the R component values R22, R44, and R66 satisfy one of the following conditions 1 and 2, the process of step ST34b is performed, and otherwise, the process of step ST35b and the subsequent processes is performed.

条件1:R22<R44かつR66<R44
条件2:R22>R44かつR66>R44
Condition 1: R22 <R44 and R66 <R44
Condition 2: R22> R44 and R66> R44

ステップST34bは、相似関係を仮定した補間演算であり、以下の式で注目画素R44のB成分値B44を計算する。   Step ST34b is an interpolation operation that assumes a similar relationship, and calculates the B component value B44 of the pixel of interest R44 by the following equation.

Figure 2005217478
Figure 2005217478

ステップST35bでは、以下に示される二つの2次元データを計算する。これらの2次元データの各々は、注目画素に対して−45度の方向(相関が強いと判定された方向)に整列し、注目画素に近接し(例えば−45度の方向に2画素分離れた位置の)、注目画素を中心として互いに反対側に位置する画素の位置に対して求められた、上記注目画素位置における既知の色成分をx成分(xi)とし、不足色(未知)の色成分をy成分(yi)(ただし、i=1、2)とするものである。   In step ST35b, the following two two-dimensional data are calculated. Each of these two-dimensional data is aligned in the direction of −45 degrees with respect to the target pixel (the direction in which the correlation is determined to be strong) and close to the target pixel (for example, two pixels are separated in the direction of −45 degrees). The color of the deficient color (unknown) is defined as the x component (xi), which is the known color component at the target pixel position, which is obtained with respect to the position of the pixel located on the opposite side of the target pixel. The component is the y component (yi) (where i = 1, 2).

Figure 2005217478
Figure 2005217478

ステップST36bでは、上記のx成分x1とx2の差の絶対値がある閾値以下かどうかを調べる。x1とx2の差の絶対値が上記閾値以下のときはステップST38bの処理を、それ以外のときはステップST37bの処理を行う。   In step ST36b, it is checked whether or not the absolute value of the difference between the x components x1 and x2 is equal to or less than a certain threshold value. When the absolute value of the difference between x1 and x2 is equal to or smaller than the threshold value, the process of step ST38b is performed, and otherwise, the process of step ST37b is performed.

ステップST37bは、単調変化を仮定した補間演算であり、以下の式で注目画素R44に対するB成分値B44を計算する。   Step ST37b is an interpolation operation that assumes a monotonous change, and calculates a B component value B44 for the pixel of interest R44 using the following equation.

Figure 2005217478
Figure 2005217478

ステップST38bでは線形補間を用いて注目画素R44に対するB成分値B44を計算する。即ち、注目画素R44に対するB成分値B44は、注目画素に隣接する画素の色成分値を用いて、以下の式で与えられる。
B44=(B33+B55)/2
In step ST38b, a B component value B44 for the target pixel R44 is calculated using linear interpolation. That is, the B component value B44 for the target pixel R44 is given by the following equation using the color component values of the pixels adjacent to the target pixel.
B44 = (B33 + B55) / 2

上記したステップST34a、ST37a、ST38a、ST34b、ST37b、ST38bのいずれかにより補間された不足色成分値(補間値)がステップST39で、注目画素R44の位置における、補間により求められたB成分値としてメモリ36に、画素位置に対応付けて、書込まれる。   The deficient color component value (interpolated value) interpolated in any of the above steps ST34a, ST37a, ST38a, ST34b, ST37b, ST38b is the B component value obtained by interpolation at the position of the target pixel R44 in step ST39. It is written in the memory 36 in association with the pixel position.

以上の補間処理がすべての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 the process 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各画素に対する不足色成分値がすべて計算され、全画素に対する全不足色成分値がメモリ36に書込まれたことになる。   As described above, all the insufficient color component values for the R, G, and B pixels are calculated, and all the insufficient color component values for all the pixels are written in the memory 36.

全画素に対する全不足色成分値がメモリ36に書込まれると、次に、メモリ36内部の内容が、補間処理回路4外部へ、補間結果OUT4として出力される。補間結果OUT4と、A/D変換器3から入力される固体撮像素子2で得られた信号OUT3とが、合成回路5で合成されることにより、すべての画素についてR、G、B各色の色成分が揃った画像信号(フルカラー画像)が出力されることになる。   When all the insufficient color component values for all the pixels are written in the memory 36, the contents in the memory 36 are output to the outside of the interpolation processing circuit 4 as the interpolation result OUT4. The interpolation result OUT4 and the signal OUT3 obtained by the solid-state imaging device 2 inputted from the A / D converter 3 are synthesized by the synthesis circuit 5, so that the colors of the R, G, and B colors for all the pixels are obtained. An image signal (full color image) having the same components is output.

以下、ステップST17a、ST17b、ST26、ST37a、ST37bで行われる補間処理(以下「単調変化を仮定した補間処理」と呼ぶ)の特徴、ステップST14a、ST14b、ST23,ST34a、ST34bで行われる、「相似関係を仮定した補間処理」の特徴、及びこれらの選択のためにステップST13a、ST13b、ST22、ST33a、ST33bで行われる色成分値の変化の態様についての判定について述べる。
最初に変化の態様についての判定について述べる。
Hereinafter, characteristics of the interpolation processing (hereinafter referred to as “interpolation processing assuming monotonic change”) performed in steps ST17a, ST17b, ST26, ST37a, and ST37b, and “similarity” performed in steps ST14a, ST14b, ST23, ST34a, and ST34b. The characteristics of the “interpolation process assuming the relationship” and the determination of the color component value change mode performed in steps ST13a, ST13b, ST22, ST33a, and ST33b to select them will be described.
First, the determination regarding the mode of change will be described.

例えば、ステップ13aのように、R成分値の変化の態様について判定を行う場合、変化の態様を、図11(a)乃至(d)に分類することができる。   For example, in the case where determination is made regarding the mode of change of the R component value as in step 13a, the mode of change can be classified into FIGS. 11 (a) to 11 (d).

図11(a)乃至(d)において、横軸をR画素の位置、縦軸を各画素のR成分値に対応させた座標平面上に、R画素R24、R44、R64間でのR成分値の、画素位置に対する、変化のパターンを、グラフで表している。   11A to 11D, the R component values between the R pixels R24, R44, and R64 on the coordinate plane in which the horizontal axis corresponds to the position of the R pixel and the vertical axis corresponds to the R component value of each pixel. The change pattern with respect to the pixel position is represented by a graph.

高周波成分を多く含んだ画像は図11(a)または(b)に示されるように上に凸か下に凸であり、図11(a)の場合には条件1が満たされ、図11(b)の場合には、条件2が満たされる。一方、低周波成分を多く含んだ画像において色信号は図11(c)に示されるように単調増加、又は図11(d)に示されるように単調減少であり、このとき、条件1、条件2がともに満たされない。以下に詳しく説明するように、図11(a)、(b)の場合には、相似関係を仮定した補間処理が優れておおり、図11(c)、(d)の場合には、単調変化を仮定した補間処理が優れている。
そこで、図11(a)、(b)の場合、即ち、条件1、条件2のいずれかが満たされるときは、ステップST14aによる相似関係を仮定した補間処理を行い、図11(c)、(d)の場合、即ち条件1、条件2のいずれも満たされないときは、ステップST15a以下の処理、特に単調変化を仮定した補間処理(ST17a)を行うこととしている。但し、変化分が極めて小さい場合には、単調変化を仮定した補間処理(ST17a)の代わりに線形補間(ST18a)を行っている。
これにより、変化の態様に応じて最適な補間処理を選択して実行することができる。
As shown in FIG. 11A or 11B, an image containing a lot of high-frequency components is convex upward or convex downward. In the case of FIG. 11A, Condition 1 is satisfied, and FIG. In the case of b), condition 2 is satisfied. On the other hand, in an image containing a lot of low frequency components, the color signal is monotonically increasing as shown in FIG. 11C or monotonically decreasing as shown in FIG. Both 2 are not satisfied. As will be described in detail below, in the cases of FIGS. 11 (a) and 11 (b), the interpolation process assuming a similar relationship is excellent, and in the cases of FIGS. 11 (c) and 11 (d), monotonicity is performed. Interpolation processing assuming changes is excellent.
Therefore, in the case of FIGS. 11A and 11B, that is, when either condition 1 or condition 2 is satisfied, interpolation processing assuming a similarity relationship in step ST14a is performed, and FIGS. In the case of d), that is, when neither condition 1 nor condition 2 is satisfied, the process after step ST15a, in particular, the interpolation process (ST17a) assuming a monotonic change is performed. However, when the amount of change is extremely small, linear interpolation (ST18a) is performed instead of interpolation processing (ST17a) assuming monotonous change.
Thereby, the optimal interpolation process can be selected and executed according to the mode of change.

ステップST13b、ST22、ST33a、ST33bの動作もステップ13aの動作と同様である。   The operations in steps ST13b, ST22, ST33a, and ST33b are the same as those in step 13a.

以下、ステップST17a、ST17b、ST26、ST37a、ST37bで行われる単調変化を仮定した補間処理の特徴について詳しく説明する。   Hereinafter, features of the interpolation processing assuming monotonic changes performed in steps ST17a, ST17b, ST26, ST37a, and ST37b will be described in detail.

注目画素の近傍の領域において、注目画素位置において既知の色成分値が図11(c)、(d)に示すように単調に変化している場合、不足色の色成分値も同様に単調に変化していることが多い。即ち、既知色と同じ方向に単調に変化(既知色とともに増加、又は既知色とともに減少)しているか、逆方向に単調に変化(既知色の増加に対して不足色が減少、又は既知色の減少に対して不足色が増加)していることが多い。
前者は、例えば次第に明るさが変化している場合であり、後者は、例えば一つの色から別の色になめらかに切り替わっている場合である。
In the region near the target pixel, when the known color component value at the target pixel position changes monotonously as shown in FIGS. 11C and 11D, the color component value of the insufficient color also monotonously. Often changed. That is, it changes monotonously in the same direction as the known color (increases with the known color or decreases with the known color), or changes monotonously in the opposite direction (the insufficient color decreases with respect to the increase in the known color, or the known color In many cases, the deficient color increases).
The former is, for example, a case where the brightness is gradually changing, and the latter is, for example, a case where the color is smoothly switched from one color to another.

その場合、色の変化分相互間には、近似的に、図12(a)又は(b)に示すような関係があるものと仮定することができる。図12(a)、(b)で、H軸は撮像素子2の撮像面上の水平軸に対応し、Z軸は各画素の色成分値を表す。そして、x0、x1、x2は、注目画素及びそれに近接する画素における、既知色(注目画素において色成分値が既知の色)の色成分値を示し、これらを結ぶ実線がその変化を示す。y1、y2は、注目画素に近接する画素における、不足色(注目画素において色成分値が未知の色)の色成分値である。y0は、注目画素における、上記不足色色成分値の補間値である。図12(a)は、既知色の色成分値と不足色の色成分値が同じ方向に変化している場合を示し、図12(b)は、既知色の色成分値と不足色の色成分値が逆の方向に変化している場合を示す。
単調変化を仮定した補間処理では、上記のように、既知色の色成分値と不足色の色成分値が同じように且つ同じ向きに単調に変化するか、同じように且つ逆向きに単調に変化すると仮定し、以下の関係が満たされるように、注目画素位置における、不足色の色成分値y0を定める。
(y0−y1)/(x0−x1)=(y1−y2)/(x1−x2)
この式を変形すると、
In that case, it can be assumed that there is a relationship as shown in FIG. 12A or 12B approximately between the color changes. 12A and 12B, the H axis corresponds to the horizontal axis on the imaging surface of the imaging device 2, and the Z axis represents the color component value of each pixel. X0, x1, and x2 indicate color component values of known colors (colors having known color component values in the target pixel) in the target pixel and pixels adjacent thereto, and a solid line connecting these indicates the change. y1 and y2 are color component values of an insufficient color (a color component value is unknown in the target pixel) in a pixel close to the target pixel. y0 is an interpolation value of the insufficient color component value in the target pixel. 12A shows a case where the color component value of the known color and the color component value of the insufficient color change in the same direction, and FIG. 12B shows the color component value of the known color and the color of the insufficient color. The case where the component value is changing in the opposite direction is shown.
In the interpolation process assuming monotonous change, as described above, the color component value of the known color and the color component value of the insufficient color change monotonously in the same direction and in the same direction, or monotonously in the same direction and in the opposite direction. The color component value y0 of the insufficient color at the target pixel position is determined so that the following relationship is satisfied.
(Y0-y1) / (x0-x1) = (y1-y2) / (x1-x2)
If this equation is transformed,

Figure 2005217478
Figure 2005217478

となる。即ち上記の式によって注目画素における不足色の色成分値y0を求めることとする。
x0、y0は上記のように、注目画素位置における既知色の色成分値、不足色の色成分値であり、例えば、注目画素R44におけるG成分値を求める場合(式(3)の場合)、R44がx0となり、G44がy0となる。
It becomes. That is, the color component value y0 of the insufficient color at the target pixel is obtained by the above formula.
As described above, x0 and y0 are the color component value of the known color and the color component value of the insufficient color at the target pixel position. For example, when obtaining the G component value at the target pixel R44 (in the case of Expression (3)), R44 becomes x0 and G44 becomes y0.

単調変化を仮定した補間処理の概念はまた以下のようにも説明できる。
即ち、図13に示す、既知色の色成分値をx成分、不足色の色成分値y成分とする2次元平面内で、(x1,y1)、(x2,y2)を通る直線の傾きは、
(y1−y2)/(x1−x2)
であり、xのx1からx0への変化に伴うyの増分Δy(=y0−y1)は、
Δy0={(y1−y2)/(x1−x2)}×(x0−x1)
であり、またこの直線は(x1,y1)を通るので、Δy0にy1を加算した値が、y0となる。即ち、y0を与える式は、上記の式(1)の通りとなる。このように、単調変化を仮定した補間処理は、xy座標面内において、(x1,y1)、(x2,y2)を通る直線上に補間値があるとの推測に基づく補間であり、「直線にのせる補間」と呼ぶこともできる。
The concept of interpolation processing assuming monotonic changes can also be explained as follows.
That is, the slope of the straight line passing through (x1, y1) and (x2, y2) in the two-dimensional plane shown in FIG. 13 where the color component value of the known color is the x component and the color component value y component of the insufficient color is ,
(Y1-y2) / (x1-x2)
And y increment Δy (= y0−y1) accompanying the change of x from x1 to x0 is
Δy0 = {(y1−y2) / (x1−x2)} × (x0−x1)
Since this straight line passes through (x1, y1), a value obtained by adding y1 to Δy0 is y0. That is, the equation that gives y0 is as shown in equation (1) above. As described above, the interpolation processing assuming monotonic change is interpolation based on the assumption that there is an interpolation value on a straight line passing through (x1, y1) and (x2, y2) in the xy coordinate plane. It can also be called “interpolation on the top”.

単調変化を仮定した補間処理は、画像中において、上記のように、明るさが次第に変化する場合や、ある色から別の色になめらかに切り替わる場合に適したものであり、言換えれば、低周波成分を多く含む画像領域における補間処理に優れている。   Interpolation processing assuming monotonic change is suitable for cases where the brightness gradually changes in the image as described above, or when the color is smoothly switched from one color to another. It is excellent for interpolation processing in an image area containing a lot of frequency components.

単調変化を仮定した補間処理で用いる式(1)の計算には除算が入っている。一般に除算は除数(上記の式の(x1−x2))がゼロになるときは計算を行うことが出来ない。また、除数がゼロに近い値のときは計算の精度が悪くなり、それが誤差の増大につながる。したがってx1とx2の差の絶対値がゼロかゼロに近い値のときは、式(1)を用いず、異なる補間処理を用いるのが望ましい。そこで、上記の実施の形態では、ステップST16a、ST16b、ST25、ST36a、ST36bで、x1とx2の差の絶対値がある閾値以下かどうかを調べ、上記閾値以下のときは、式(1)による補間以外の補間、例えば線形補間を行うようにしている。   The calculation of equation (1) used in the interpolation process assuming a monotonic change includes division. In general, division cannot be performed when the divisor ((x1-x2) in the above equation) becomes zero. In addition, when the divisor is a value close to zero, the accuracy of the calculation deteriorates, which leads to an increase in error. Therefore, when the absolute value of the difference between x1 and x2 is zero or a value close to zero, it is desirable to use a different interpolation process without using Equation (1). Therefore, in the above embodiment, in steps ST16a, ST16b, ST25, ST36a, ST36b, it is checked whether or not the absolute value of the difference between x1 and x2 is less than a certain threshold value. Interpolation other than interpolation, for example, linear interpolation is performed.

x1とx2の差の絶対値が上記閾値以下であるときは、色の変化がほとんどない場合と推定できるので、線形補間などの単純な補間でも十分満足できる結果が得られると考えられる。また、線形補間は演算が簡単であるので、その点でも好都合である。   When the absolute value of the difference between x1 and x2 is less than or equal to the above threshold value, it can be estimated that there is almost no color change, and it is considered that a sufficiently satisfactory result can be obtained even with simple interpolation such as linear interpolation. In addition, linear interpolation is convenient because it is easy to calculate.

次に、ステップST14a、ST14b、ST23、ST34a、ST34bで行われる、相似関係を仮定した補間処理について図14を用いて説明する。相似関係を仮定した補間処理は、2つの色成分値の変化の様子が互いに相似の関係を有することを仮定したものである。   Next, an interpolation process performed in steps ST14a, ST14b, ST23, ST34a, and ST34b assuming a similarity relationship will be described with reference to FIG. Interpolation processing assuming a similar relationship assumes that changes in two color component values have a similar relationship with each other.

図14はステップ14aの補間処理により補間される、注目画素R44の位置におけるG成分値の定め方を説明する図である。図においてH軸は撮像素子2の撮像面上の水平軸に対応し、Z軸は各画素の成分値を表す。R1、R2は画素R24、R64のR成分値をR成分値R24、R64の平均値で置き換えた点であり、R0は画素R44のR成分値R44を表した点である。
G1、G2は画素G34、G54のG成分値をそれらの平均値で置き換えた点であり、G0は画素R44上に補間されるG成分値を表した点である。
FIG. 14 is a diagram for explaining how to determine the G component value at the position of the target pixel R44, which is interpolated by the interpolation processing in step 14a. In the figure, the H axis corresponds to the horizontal axis on the imaging surface of the image sensor 2, and the Z axis represents the component value of each pixel. R1 and R2 are points in which the R component values of the pixels R24 and R64 are replaced with average values of the R component values R24 and R64, and R0 is a point that represents the R component value R44 of the pixel R44.
G1 and G2 are points where the G component values of the pixels G34 and G54 are replaced by their average values, and G0 is a point representing the G component value interpolated on the pixel R44.

ステップST14aなどで行われる式(2)の計算は、三角形R0R1R2と三角形G0G1G2が相似になるように、G0の値を定めるものである。即ち、注目画素R44における既知色成分R0に関して、注目画素R44のR成分値と注目画素R44の周辺のR成分を有する画素のR成分値の平均値でつくる既知色成分三角形(幾何学図形)と、注目画素R44上に補間される不足色成分G0に関して、補間により求められる値G0と注目画素R44の周辺のG成分(不足色成分)を有する画素のG成分値の平均値でつくる不足色成分三角形(幾何学図形)が相似になるようにG0が定められる。   In the calculation of equation (2) performed in step ST14a and the like, the value of G0 is determined so that the triangle R0R1R2 and the triangle G0G1G2 are similar. That is, with respect to the known color component R0 in the target pixel R44, a known color component triangle (geometrical figure) formed 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 around the target pixel R44, As for the insufficient color component G0 to be interpolated on the target pixel R44, the insufficient color component formed by the average value of the G component values of the pixel having the value G0 obtained by interpolation and the G component (insufficient color component) around the target pixel R44. G0 is determined so that the triangles (geometric figures) are similar.

言換えれば、注目画素R44の周辺の2つのR成分を有する画素(R24、G64)のR成分の値の平均値と、注目画素R44の位置におけるR成分の値との差と、上記平均値の計算に用いられた2つの画素(R24、R64)及び注目画素(R44)相互間のH軸上の距離(2次元平面(HV平面)上における距離)との比と、注目画素R44の周辺の2つのG成分を有する画素(G34、G54)のG成分の値の平均値と、補間により求められる注目画素R44上のG成分の値G0との差と、上記平均値の計算に用いられた2つの画素(G34、G54)及び注目画素(R44)相互間の2次元平面上における距離との比が互いに等しくなるように、注目画素の位置におけるG成分の値G0が定められる。   In other words, the difference between the average value of the R component values of the pixels (R24, G64) having two R components around the target pixel R44 and the value of the R component at the position of the target pixel R44, and the above average value The ratio of the distance on the H axis between the two pixels (R24, R64) and the target pixel (R44) used in the calculation of (the distance on the two-dimensional plane (HV plane)) and the periphery of the target pixel R44 The difference between the average value of the G component values of the pixels having the two G components (G34, G54) and the G component value G0 on the target pixel R44 obtained by interpolation is used to calculate the average value. The value G0 of the G component at the position of the target pixel is determined so that the ratio of the distance between the two pixels (G34, G54) and the target pixel (R44) on the two-dimensional plane is equal to each other.

図14において、またL1は既知色の色成分値(例えばR成分値)の変化を表す曲線であり、L2は不足色の色成分値(例えばG成分値)の変化を表す曲線であり、●で示される点は、例えば撮像素子2の出力として与えられた画素信号の色成分値、○で示される点が補間処理により与えられる画素信号の色成分値を表している。
図14から、二つの色の色成分値が同じように変化する場合には、相似関係を仮定した補間処理により満足できる結果が得られることが分る。
In FIG. 14, L1 is a curve representing a change in the color component value (for example, R component value) of the known color, L2 is a curve representing a change in the color component value (for example, the G component value) of the insufficient color, A point indicated by, for example, represents a color component value of a pixel signal given as an output of the image sensor 2, and a point indicated by ◯ represents a color component value of a pixel signal given by interpolation processing.
From FIG. 14, it can be seen that when the color component values of the two colors change in the same way, a satisfactory result can be obtained by the interpolation process assuming a similar relationship.

即ち、相似関係を仮定した補間処理では、局所領域において、R、G、B各色の色成分値の増減が一致するよう補間処理が行われる。従って相似関係を仮定した補間処理は、局所領域で色成分の増減が激しい領域、特に高周波成分を多く含む画像での補間処理に優れている。   In other words, in the interpolation process assuming the similarity relationship, the interpolation process is performed so that the increase / decrease in the color component values of the R, G, and B colors match in the local region. Therefore, the interpolation process assuming a similarity relationship is excellent in an interpolation process in a region where the increase / decrease of the color component is large in the local region, particularly an image containing a lot of high frequency components.

説明の例として、ステップST14aで行われる補間処理を取り上げたが、ステップST14b、ST23、ST34a、ST34bで行われる補間処理についても同様のことが言える。   As an example of the description, the interpolation processing performed in step ST14a has been taken up, but the same can be said for the interpolation processing performed in steps ST14b, ST23, ST34a, and ST34b.

単調変化を仮定した補間処理(但し、変化が極めて小さい場合にはこれに代えて線形補間)及び相似関係を仮定した補間処理を状況に応じて選択して実行させることにより補間の結果が良好(高精度)になることを図15及び図16を参照して、具体的な数値例について説明する。
図15及び図16において、横軸は画素がGRGRと並ぶ方向(例えば奇数行)での各画素の位置を表し、縦軸は各画素の色成分値を表し、■はG画素の色成分値を表し、◆はR画素の色成分値を表し、○は単調変化を仮定した補間処理による結果を表し、△は相似関係を仮定した補間処理による結果を表し、各数値は各々の色成分値を表す。
Interpolation processing assuming monotonic change (however, if the change is extremely small, linear interpolation is used instead) and interpolation processing assuming similarity is selected and executed according to the situation, and the result of interpolation is good ( Specific numerical examples will be described with reference to FIGS. 15 and 16.
15 and 16, 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 color component value of each pixel, and ■ represents the color component value of the G pixel. ♦ represents the color component value of the R pixel, ○ represents the result of the interpolation processing assuming monotonic change, Δ represents the result of the interpolation processing assuming similarity, and each numerical value represents each color component value Represents.

上記の説明において、図15のように色成分値が緩やかに変化する場合には、単調変化を仮定した補間処理の結果が、図16のように色成分値が短い周期で変化する場合には相似関係を仮定した補間処理の結果がより良好であることが分る。変化の態様に応じて補間処理を選択することで、変化の態様に拘らず常に良好な補間結果が得られることが分る。   In the above description, when the color component value changes slowly as shown in FIG. 15, the result of the interpolation process assuming monotonic change is when the color component value changes in a short cycle as shown in FIG. It can be seen that the result of the interpolation process assuming a similar relationship is better. It can be seen that a good interpolation result can always be obtained regardless of the mode of change by selecting the interpolation process according to the mode of change.

本実施の形態ではさらに、ステップST12、ST32により、注目画素を通り、互いに直交する2本の直線上に存在する画素が有する色成分値を使い、画像中の相関の強い方向を判別し、補間処理に使う画素及び色成分値を、注目画素を中心に、相関が強いと判定された方向に存在するものに絞っているため、高精度の補間処理を行うことができる。   In this embodiment, further, in steps ST12 and ST32, the color component values of pixels existing on two straight lines that pass through the pixel of interest and are orthogonal to each other are used to determine the direction of strong correlation in the image, and interpolation is performed. Since the pixels and color component values used for processing are narrowed down to those existing in the direction in which it is determined that the correlation is strong centering on the pixel of interest, highly accurate interpolation processing can be performed.

実施の形態2.
次に、実施の形態1で説明した補間処理をハードウエアで実現した例を説明する。
この実施の形態2で用いられる補間処理回路4の構成は図17に示すごとくであり、図3と同様のフレームメモリ11と、読み出し制御回路16、メモリ36のほか、図3のプロセッサ35の代わりに、相関判別回路12、第1の補間演算回路13、第2の補間演算回路14、及び選択回路15を備えている。
Embodiment 2. FIG.
Next, an example in which the interpolation processing described in the first embodiment is realized by hardware will be described.
The configuration of the interpolation processing circuit 4 used in the second embodiment is as shown in FIG. 17. In addition to the frame memory 11, the read control circuit 16, and the memory 36 similar to those in FIG. 3, the processor 35 in FIG. In addition, a correlation determination circuit 12, a first interpolation calculation circuit 13, a second interpolation calculation circuit 14, and a selection circuit 15 are provided.

相関判別回路12が、図4のステップST12、図6のステップS32と同等の機能を持ち、選択回路15が、図4のステップ13a、13b、図5のステップST22、図6のステップST33a、ST33bと同等の機能を持ち、補間演算回路13は、相似関係を仮定した補間を行うものであって、図4のステップST14a、ST14b、図5のステップST23、図6のステップST34a、ST34bと同等の機能を持ち、補間演算回路14は、単調変化を仮定した補間又は線形補間を行うものであって、図4のステップST15a、ST16a、ST17a、ST18a、ST15b、ST16b、ST17b、ST18b、図5のステップST24、ST25、ST26、ST27、図6のステップST35a、ST36a、ST37a、ST38a、ST35b、ST36b、ST37b、ST38bと同等の機能を持つ。   The correlation discriminating circuit 12 has the same function as step ST12 in FIG. 4 and step S32 in FIG. 6, and the selection circuit 15 is in steps 13a and 13b in FIG. 4, step ST22 in FIG. 5, and steps ST33a and ST33b in FIG. The interpolation calculation circuit 13 performs interpolation assuming a similar relationship, and is equivalent to steps ST14a and ST14b in FIG. 4, step ST23 in FIG. 5, and steps ST34a and ST34b in FIG. The interpolation calculation circuit 14 has a function and performs interpolation or linear interpolation assuming a monotonic change, and steps ST15a, ST16a, ST17a, ST18a, ST15b, ST16b, ST17b, ST18b of FIG. 4 and steps of FIG. ST24, ST25, ST26, ST27, steps ST35a, ST36a in FIG. With T37a, ST38a, ST35b, ST36b, ST37b, the same function as ST38b.

図17に示す補間処理回路4も、図1の撮像装置の一部を成すものとして利用し得るものである。   The interpolation processing circuit 4 shown in FIG. 17 can also be used as a part of the imaging apparatus shown in FIG.

フレームメモリ11に蓄積された信号の一部が読み出し制御回路16により出力され(OUT11)、相関判別回路12、補間演算回路13、補間演算回路14及び選択回路15に入力される。
相関判別回路12は、フレームメモリ11からの出力OUT11をもとに画像における相関の強い方向を判別し、その判別結果は、補間演算回路13、補間演算回路14及び選択回路15に供給される。
A part of the signal stored in the frame memory 11 is output by the read control circuit 16 (OUT11) and input to the correlation determination circuit 12, the interpolation calculation circuit 13, the interpolation calculation circuit 14, and the selection circuit 15.
The correlation determination circuit 12 determines the direction of strong correlation in the image based on the output OUT11 from the frame memory 11, and the determination result is supplied to the interpolation calculation circuit 13, the interpolation calculation circuit 14, and the selection circuit 15.

補間演算回路13は、フレームメモリ11からの出力OUT11、及び相関判別回路12の判別結果に基づいて後述の補間(相似関係を仮定した補間)を行って、補間結果OUT13を出力する。
補間演算回路14は、フレームメモリ11からの出力OUT11、相関判別回路12の判別結果に基づき、後述の補間(単調変化を仮定した補間又は線形補間)を行って補間結果OUT14を出力する。
The interpolation calculation circuit 13 performs the later-described interpolation (interpolation assuming a similar relationship) based on the output OUT11 from the frame memory 11 and the determination result of the correlation determination circuit 12, and outputs the interpolation result OUT13.
Based on the output OUT11 from the frame memory 11 and the determination result of the correlation determination circuit 12, the interpolation calculation circuit 14 performs the later-described interpolation (interpolation assuming a monotonic change or linear interpolation) and outputs an interpolation result OUT14.

選択回路15は、フレームメモリ11からの出力OUT11、及び相関判別回路12の判別結果に基づいて、注目画素の近傍の領域内に位置し、注目画素を中心として、上記相関判別手段12で相関が強いと判定された方向に整列し、注目画素と同じ色成分を有する画素及び注目画素の色成分値の変化の態様を判定する。即ち、画素位置との関係で、画素の色成分値が単調に変化しているかどうかを判定する。そして、単調に変化しているかどうかの判定結果に基づいて、補間結果OUT13及びOUT14のいずれかを選択し、選択結果を選択された補間信号OUT15として出力する。即ち、単調に変化していると判定したときは、OUT14を選択し、そうでないときはOUT13を選択する。   Based on the output OUT11 from the frame memory 11 and the discrimination result of the correlation discriminating circuit 12, the selection circuit 15 is located in a region in the vicinity of the pixel of interest, and the correlation discriminating unit 12 correlates around the pixel of interest. The pixel is aligned in the direction determined to be strong and has the same color component as the target pixel, and the change mode of the color component value of the target pixel is determined. That is, it is determined whether or not the color component value of the pixel changes monotonously in relation to the pixel position. Then, based on the determination result as to whether or not the change is monotonous, one of the interpolation results OUT13 and OUT14 is selected, and the selection result is output as the selected interpolation signal OUT15. That is, when it is determined that the change is monotonous, OUT14 is selected. Otherwise, OUT13 is selected.

選択回路15の出力OUT15は、メモリ36に書込まれる。   The output OUT15 of the selection circuit 15 is written in the memory 36.

次に実施の形態2の補間処理回路4において行われる不足色成分値の補間処理について述べる。R画素についてはG成分値、B成分値が、G画素についてはB成分値、R成分値が、B画素についてはR成分値、G成分値が不足色成分値となる。これらの不足色成分値の補間処理について順に説明する。   Next, the interpolation process of the insufficient color component value performed in the interpolation processing circuit 4 of the second embodiment will be described. For the R pixel, the G component value and the B component value become the B component value and the R component value for the G pixel, and for the B pixel, the R component value and the G component value become the insufficient color component value. Interpolation processing of these insufficient color component values will be described in order.

まず、R画素の位置におけるG成分値の補間処理について説明する。   First, the G component value interpolation process at the position of the R pixel will be described.

フレームメモリ11から図7に示された各画素の色成分値が読み出され、OUT11として出力される。即ち注目画素R44と、注目画素R44に対し垂直方向に整列したR画素R42、R46、注目画素R44に対し水平方向に整列したR画素R24、R64のR成分値R44、R42、R46、R24、R64と、注目画素R44に対し垂直方向にG画素G41、G43、G45、G47と、注目画素R44に対し水平方向に整列したG画素G14、G34、G54、G74のG成分値G41、G43、G45、G47、G14、G34、G54、G74が読み出される。   The color component value of each pixel shown in FIG. 7 is read from the frame memory 11 and output as OUT11. That is, the R component values R44, R42, R46, R24, R64 of the target pixel R44, the R pixels R42, R46 aligned in the vertical direction with respect to the target pixel R44, and the R pixels R24, R64 aligned in the horizontal direction with respect to the target pixel R44. G components G41, G43, G45, G47 in the vertical direction with respect to the target pixel R44, and G component values G41, G43, G45, G74 aligned in the horizontal direction with respect to the target pixel R44. G47, G14, G34, G54, and G74 are read out.

相関判別回路12は、注目画素を中心に水平方向及び垂直方向のいずれに相関が強いかの判別を行う。この判別のため、上記のようにして読み出された画素信号(色成分値)の一部を用いて、以下の値dV、dHを計算し、その大小関係を調べる。   The correlation determination circuit 12 determines 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 a part of the pixel signal (color component value) read out as described above, and the magnitude relationship is examined.

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

ここで、dVは、注目画素に対し垂直方向に整列し、注目画素に隣接する2つの画素の色成分値の差の絶対値を表し、dHは、注目画素に対し水平方向に整列し、注目画素に隣接する2つの画素の色成分値の差の絶対値を表す。
dH<dVであるときは、水平方向の相関が強いと判断し、そうでないときは、垂直方向の相関が強いと判断する。
このdV、dHの大小関係により、補間演算回路13、補間演算回路14、選択回路15の動作が変わる。
まず、dH<dVであるときの補間演算回路13、補間演算回路14、選択回路15の動作について述べる。
Here, dV is aligned in the vertical direction with respect to the target pixel and represents the absolute value of the difference between the color component values of two pixels adjacent to the target pixel, and dH is aligned in the horizontal direction with respect to the target pixel. This represents the absolute value of the difference between the color component values of two pixels adjacent to the pixel.
When dH <dV, it is determined that the horizontal correlation is strong. Otherwise, it is determined that the vertical correlation is strong.
The operations of the interpolation calculation circuit 13, the interpolation calculation circuit 14, and the selection circuit 15 change depending on the magnitude relationship between dV and dH.
First, operations of the interpolation calculation circuit 13, the interpolation calculation circuit 14, and the selection circuit 15 when dH <dV are described.

補間演算回路13では以下の式で注目画素R44のG成分値OUT13を計算し、出力する。   The interpolation calculation circuit 13 calculates and outputs the G component value OUT13 of the target pixel R44 by the following equation.

Figure 2005217478
Figure 2005217478

補間演算回路14では以下の式で注目画素R44のG成分値OUT14を計算する。   The interpolation calculation circuit 14 calculates the G component value OUT14 of the target pixel R44 by the following equation.

Figure 2005217478
Figure 2005217478

但し、   However,

Figure 2005217478
Figure 2005217478

であり、x1、y1、x2、y2は補間演算回路14内で演算される。   X1, y1, x2, and y2 are calculated in the interpolation calculation circuit 14.

補間演算回路14はさらに、x1とx2の差の絶対値がある閾値以下かどうかの判定を行い、該閾値以下のときは線形補間を用いて注目画素R44に対するG成分値OUT14を計算し出力する。即ち、注目画素R44に対するG成分値OUT14を、注目画素に隣接する画素の色成分値を用いて、以下の式で計算して出力する。
OUT14=(G34+G54)/2
The interpolation calculation circuit 14 further determines whether or not the absolute value of the difference between x1 and x2 is equal to or smaller than a threshold value. When the absolute value is equal to or smaller than the threshold value, the G component value OUT14 for the target pixel R44 is calculated and output using linear interpolation. . That is, the G component value OUT14 for the target pixel R44 is calculated and output using the color component value of the pixel adjacent to the target pixel according to the following formula.
OUT14 = (G34 + G54) / 2

選択回路15は、注目画素の近傍の領域内に位置し、注目画素を中心として、上記相関判別手段12で相関が強いと判定された方向に整列し、注目画素と同じ色成分を有する画素、及び注目画素の色成分値の変化の態様を判定する。即ち、画素位置との関係で、画素の色成分値が単調に変化しているかどうかを判定する。これは例えば以下のようにして行われる。即ち、例えばR画素R24、R44、R64のR成分値R24、R44、R64の大小関係を調べる。即ち、R成分値R24、R44、R64が以下の条件1、2のいずれかを満たすかどうかの判定を行う。   The selection circuit 15 is located in a region in the vicinity of the target pixel, is aligned in the direction in which the correlation determination unit 12 determines that the correlation is strong, and has the same color component as the target pixel. And a mode of change in the color component value of the target pixel is determined. That is, it is determined whether or not the color component value of the pixel changes monotonously in relation to the pixel position. This is performed, for example, as follows. That is, for example, the magnitude relationship between the R component values R24, R44, and R64 of the R pixels R24, R44, and R64 is examined. That is, it is determined whether or not the R component values R24, R44, and R64 satisfy one of the following conditions 1 and 2.

条件1:R24<R44かつR64<R44
条件2:R24>R44かつR64>R44
Condition 1: R24 <R44 and R64 <R44
Condition 2: R24> R44 and R64> R44

条件1、2のいずれかが満たされるときは、補間演算回路13からの補間信号OUT13を選択し、そうでないときは、補間演算回路14からの補間信号OUT14を選択する。選択された補間信号がOUT15として出力される。   When either of the conditions 1 and 2 is satisfied, the interpolation signal OUT13 from the interpolation calculation circuit 13 is selected. Otherwise, the interpolation signal OUT14 from the interpolation calculation circuit 14 is selected. The selected interpolation signal is output as OUT15.

以上が、dH<dVであるときの補間演算回路13、補間演算回路14、選択回路15の動作である。次に、dH<dVでないときの補間演算回路13、補間演算回路14、選択回路15の動作について述べる。   The above is the operation of the interpolation calculation circuit 13, the interpolation calculation circuit 14, and the selection circuit 15 when dH <dV. Next, operations of the interpolation calculation circuit 13, the interpolation calculation circuit 14, and the selection circuit 15 when dH <dV are not described.

補間演算回路13では以下の式で注目画素R44のG成分値OUT13を計算し出力する。   The interpolation calculation circuit 13 calculates and outputs the G component value OUT13 of the target pixel R44 by the following equation.

Figure 2005217478
Figure 2005217478

補間演算回路14では以下の式で注目画素R44のG成分値OUT14を計算し出力する。   The interpolation calculation circuit 14 calculates and outputs the G component value OUT14 of the target pixel R44 by the following equation.

Figure 2005217478
Figure 2005217478

但し、 However,

Figure 2005217478
Figure 2005217478

であり、x1、y1、x2、y2は補間演算回路14内で演算される。   X1, y1, x2, and y2 are calculated in the interpolation calculation circuit 14.

補間演算回路14はさらに、x1とx2の差の絶対値がある閾値以下かどうかの判定を行い、該閾値以下のときは線形補間を用いて注目画素R44に対するG成分値OUT14を計算し出力する。即ち、注目画素R44に対するG成分値OUT14を、注目画素に隣接する画素の色成分値を用いて、以下の式で計算して出力する。   The interpolation calculation circuit 14 further determines whether or not the absolute value of the difference between x1 and x2 is equal to or smaller than a threshold value. When the absolute value is equal to or smaller than the threshold value, the G component value OUT14 for the target pixel R44 is calculated and output using linear interpolation. . That is, the G component value OUT14 for the target pixel R44 is calculated and output using the color component value of the pixel adjacent to the target pixel according to the following formula.

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

選択回路15は、注目画素の近傍の領域内に位置し、注目画素を中心として、上記相関判別手段12で相関が強いと判定された方向に整列し、注目画素と同じ色成分を有する画素、及び注目画素の色成分値が、画素位置との関係で、単調に変化しているかどうかを判定する。そのため、例えば、R画素R42、R44、R46のR成分値R42、R44、R46の大小関係を調べる。そして、その結果によりOUT13もしくはOUT14のどちらか一方をOUT15として出力する。即ち、R成分値R42、R44、R46が以下の条件1、2のいずれかを満たすときはOUT13を、そうでないときはOUT14を出力する。   The selection circuit 15 is located in a region in the vicinity of the target pixel, is aligned in a direction in which the correlation determination unit 12 determines that the correlation is strong with the target pixel as a center, and has the same color component as the target pixel. In addition, it is determined whether the color component value of the target pixel changes monotonously in relation to the pixel position. Therefore, for example, the magnitude relationship between the R component values R42, R44, and R46 of the R pixels R42, R44, and R46 is examined. Then, according to the result, either OUT13 or OUT14 is output as OUT15. That is, OUT13 is output when the R component values R42, R44, and R46 satisfy either of the following conditions 1 and 2, and OUT14 is output otherwise.

条件1:R42<R44かつR46<R44
条件2:R42>R44かつR46>R44
Condition 1: R42 <R44 and R46 <R44
Condition 2: R42> R44 and R46> R44

以上はR画素の位置におけるG成分値の補間処理であるが、B画素の位置におけるG成分値の補間もRとBが入れ替わる以外は同様に行われる。   The above is the interpolation processing of 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, the R component value and B component value interpolation processing at the G pixel position will be described.

ベイヤ配列においては、G画素を中心にした場合、R、G、B各画素の配置は図8に示されるように、注目画素が奇数行にある場合(a)と、偶数行にある場合(b)とで異なり、RとBが入れ替わった配置となっている。まず、奇数行のG画素の位置におけるR成分値、B成分値の補間を、図9を参照して説明する。   In the Bayer array, when the G pixel is centered, the arrangement of the R, G, and B pixels is as shown in FIG. 8 when the pixel of interest is in an odd row (a) and in an even row ( Unlike b), the arrangement is such that R and B are interchanged. First, interpolation of R component values and B component values at the positions of G pixels in odd rows will be described with reference to FIG.

図9に示された、注目画素G44の近傍の領域内に位置する複数の画素の色成分値がフレームメモリ4から読み出され、OUT11として出力される。即ち、注目画素G44と、注目画素G44に対し、水平及び垂直方向に整列したG画素G24、G64、G42、G46のG成分値G44、G24、G64、G42,G46と、注目画素に対して水平方向に整列したR画素R14、R34、R54、R74のR成分値R14、R34、R54、R74と、注目画素に対して垂直方向に整列したB画素B41、B43、B45、B47のB成分値B41、B43、B45、B47が読み出される。   The color component values of a plurality of pixels located in the area in the vicinity of the target pixel G44 shown in FIG. 9 are read from the frame memory 4 and output as OUT11. That is, the target pixel G44, the G component values G44, G24, G64, G42, and G46 of the G pixels G24, G64, G42, and G46 aligned in the horizontal and vertical directions with respect to the target pixel G44, and the horizontal with respect to the target pixel R component values R14, R34, R54, R74 of R pixels R14, R34, R54, R74 aligned in the direction, and B component values B41 of B pixels B41, B43, B45, B47 aligned in the vertical direction with respect to the target pixel , B43, B45, B47 are read out.

図9において、G画素G44が注目画素になるが、注目画素G44の垂直方向にはR画素が存在せず、水平方向にはB画素が存在しない。従って、奇数行のG画素の位置におけるR成分値の補間に用い得るのは水平方向の画素のみであり、B成分値の補間に用い得るのは垂直方向の画素のみである。従って補間処理のために参照する方向は自ずと一方向に限られるので、相関判別回路12は相関判別を行わない。   In FIG. 9, the G pixel G44 is the target pixel, but no R pixel exists in the vertical direction of the target pixel G44, and no B pixel exists in the horizontal direction. Therefore, only pixels in the horizontal direction can be used for interpolation of the R component values at the positions of the G pixels in the odd rows, and only pixels in the vertical direction can be used for interpolation of the B component values. Therefore, the direction to be referred for the interpolation process is naturally limited to one direction, and the correlation determination circuit 12 does not perform the correlation determination.

最初に奇数行のG画素におけるR成分値の補間処理について述べる。   First, the interpolation process of the R component value in the G pixels in the odd rows will be described.

補間演算回路13は以下の式で注目画素G44のR成分値OUT13を計算し、出力する。   The interpolation calculation circuit 13 calculates and outputs the R component value OUT13 of the target pixel G44 by the following equation.

Figure 2005217478
Figure 2005217478

補間演算回路14では以下の式で注目画素G44のR成分値OUT14を計算する。   The interpolation calculation circuit 14 calculates the R component value OUT14 of the target pixel G44 by the following equation.

Figure 2005217478
Figure 2005217478

但し、 However,

Figure 2005217478
Figure 2005217478

であり、x1、y1、x2、y2は補間演算回路14内で演算される。   X1, y1, x2, and y2 are calculated in the interpolation calculation circuit 14.

補間演算回路14はさらに、x1とx2の差の絶対値がある閾値以下かどうかの判定を行い、該閾値以下のときは線形補間を用いて注目画素R44に対するG成分値OUT14を計算し出力する。即ち、注目画素G44に対するR成分値OUT14を、注目画素に隣接する画素の色成分値を用いて、以下の式で計算して出力する。
OUT14=(R34+R54)/2
The interpolation calculation circuit 14 further determines whether or not the absolute value of the difference between x1 and x2 is equal to or smaller than a threshold value. When the absolute value is equal to or smaller than the threshold value, the G component value OUT14 for the target pixel R44 is calculated and output using linear interpolation. . That is, the R component value OUT14 for the target pixel G44 is calculated and output using the color component value of the pixel adjacent to the target pixel according to the following equation.
OUT14 = (R34 + R54) / 2

選択回路15では、注目画素の近傍の領域内に位置し、注目画素を中心として、水平方向(R画素が存在する方向)に整列し、注目画素と同じ色成分を有する画素、及び注目画素の色成分値が、画素位置との関係で、単調に変化しているかどうかを判定する。そのため、例えばG画素G24、G44、G64のG成分値G24、G44、G64の大小関係を調べる。そして、その結果によりOUT13もしくはOUT14のどちらか一方をOUT15として出力する。即ち、G成分値G24、G44、G64が以下の条件1、2のいずれかを満たすときはOUT13を、そうでないときはOUT14を選択して出力する。   The selection circuit 15 is located in a region near the target pixel, is aligned in the horizontal direction (the direction in which the R pixel exists) around the target pixel, and has the same color component as the target pixel, and the target pixel It is determined whether or not the color component value changes monotonously in relation to the pixel position. Therefore, for example, the magnitude relationship between the G component values G24, G44, and G64 of the G pixels G24, G44, and G64 is examined. Then, according to the result, either OUT13 or OUT14 is output as OUT15. That is, when the G component values G24, G44, and G64 satisfy one of the following conditions 1 and 2, OUT13 is selected, and when not, OUT14 is selected and output.

条件1:G24<G44かつG64<G44
条件2:G24>G44かつG64>G44
Condition 1: G24 <G44 and G64 <G44
Condition 2: G24> G44 and G64> G44

以上が奇数行のG画素の位置におけるR成分値の補間処理である。
次に奇数行のG画素の位置におけるB成分値の補間処理について説明する。
The above is the interpolation processing of the R component value at the position of the odd-numbered G pixel.
Next, the B component value interpolation process at the position of the odd-numbered G pixel will be described.

補間演算回路13では以下の式で注目画素G44のB成分値OUT13を計算し、出力する。   The interpolation calculation circuit 13 calculates and outputs the B component value OUT13 of the target pixel G44 using the following equation.

Figure 2005217478
Figure 2005217478

補間演算回路14では以下の式で注目画素G44のB成分値OUT14を計算する。   The interpolation calculation circuit 14 calculates the B component value OUT14 of the target pixel G44 by the following equation.

Figure 2005217478
Figure 2005217478

但し、 However,

Figure 2005217478
Figure 2005217478

であり、x1、y1、x2、y2は補間演算回路14内で演算される。   X1, y1, x2, and y2 are calculated in the interpolation calculation circuit 14.

補間演算回路14はさらに、x1とx2の差の絶対値がある閾値以下かどうかの判定を行い、該閾値以下のときは線形補間を用いて注目画素G44に対するB成分値OUT14を計算し出力する。即ち、注目画素G44に対するB成分値OUT14を、注目画素に隣接する画素の色成分値を用いて、以下の式で計算して出力する。   The interpolation calculation circuit 14 further determines whether or not the absolute value of the difference between x1 and x2 is equal to or smaller than a threshold value. When the absolute value is equal to or smaller than the threshold value, the B component value OUT14 for the target pixel G44 is calculated and output using linear interpolation. . That is, the B component value OUT14 for the target pixel G44 is calculated and output by the following formula using the color component value of the pixel adjacent to the target pixel.

OUT14=(B43+B45)/2   OUT14 = (B43 + B45) / 2

選択回路15では、注目画素の近傍の領域内に位置し、注目画素を中心として、垂直方向(B画素が存在する方向)に整列し、注目画素と同じ色成分を有する画素、及び注目画素の色成分値が、画素位置との関係で、単調に変化しているかどうかを判定する。そのため、例えばG画素G42、G44、G46のG成分値G42、G44、G46の大小関係を調べる。そして、その結果によりOUT13もしくはOUT14のどちらか一方をOUT15として出力する。即ち、G成分値G42、G44、G46が以下の条件1、2のいずれかを満たすときはOUT13を、そうでないときはOUT14を選択して出力する。   The selection circuit 15 is located in a region near the target pixel, is aligned in the vertical direction (the direction in which the B pixel exists) around the target pixel, and has the same color component as the target pixel, and the target pixel It is determined whether or not the color component value changes monotonously in relation to the pixel position. Therefore, for example, the magnitude relationship between the G component values G42, G44, and G46 of the G pixels G42, G44, and G46 is examined. Then, according to the result, either OUT13 or OUT14 is output as OUT15. That is, when the G component values G42, G44, and G46 satisfy either of the following conditions 1 and 2, OUT13 is selected and when it is not, OUT14 is selected and output.

条件1:G42<G44かつG46<G44
条件2:G42>G44かつG46>G44
Condition 1: G42 <G44 and G46 <G44
Condition 2: G42> G44 and G46> G44

以上の補間処理がすべての奇数行のすべてのG画素の位置におけるB成分値に対して行われる。
以上が奇数行のG画素の位置におけるB成分値の補間処理である。
以上は奇数行のG画素の位置におけるR成分値、B成分値の補間処理であるが、偶数行のG画素の位置におけるR成分値、B成分値の補間処理もRとBが入れ替わる以外は同様に行われる。
The above interpolation processing is performed for the B component values at the positions of all G pixels in all odd rows.
The above is the interpolation processing of the B component value at the position of the G pixel in the odd row.
The above is the interpolation processing of the R component value and the B component value at the position of the G pixel in the odd row, but the interpolation processing of the R component value and the B component value at the position of the G pixel in the even row is that R and B are interchanged. The same is done.

次にR画素の位置におけるB成分値の補間処理について図10を参照して説明する。
図10に示された、注目画素R44の近傍の領域内に位置する複数の画素の色成分値がフレームメモリ4から読み出され、OUT11として出力される。即ち注目画素R44と、注目画素に対し、右斜め上から左斜め下の方向(45度の方向)に整列したR画素R62、R26、左斜め上から右斜め下の方向(−45度の方向)に整列したR画素R22、R66、のR成分値R44、R62、R26、R22、R66と、注目画素に対し、右斜め上から左斜め下の方向(45度の方向)に整列したB画素B71、B53、B35、B17、左斜め上から右斜め下の方向(−45度の方向)に整列したB画素B11、B33、B55、B77のB成分値B71、B53、B35、B17、B11、B33、B55、B77、が読み出される。
Next, the B component value interpolation processing at the position of the R pixel will be described with reference to FIG.
The color component values of a plurality of pixels located in the region in the vicinity of the target pixel R44 shown in FIG. 10 are read from the frame memory 4 and output as OUT11. That is, the target pixel R44, R pixels R62 and R26 aligned in the direction from the upper right to the lower left (45 ° direction) with respect to the target pixel, the upper left to the lower right direction (−45 ° direction) ) R component values R44, R62, R26, R22, R66 of the R pixels R22, R66 aligned with ()) and the B pixel aligned with respect to the target pixel from the upper right to the lower left (45 degree direction). B71, B53, B35, B17, B component values B71, B53, B35, B17, B11 of B pixels B11, B33, B55, B77 aligned in the direction from the upper left to the lower right (the direction of −45 degrees), B33, B55, and B77 are read out.

相関判別回路12は、注目画素を中心に右上がりの方向(45度の方向)及び左上がりの方向(−45度の方向)のいずれに相関が強いかの判別を行う。この判別のため、上記のようにして読み出された画素信号(色成分値)の一部を用いて、以下の値d(45)、d(−45)を計算し、その大小関係を調べる。   The correlation discriminating circuit 12 discriminates whether the correlation is strong in the upward direction (45 degrees direction) or the upward direction (−45 degrees direction) with respect to the target pixel. For this determination, the following values d (45) and d (−45) are calculated using a part of the pixel signal (color component value) read out as described above, and the magnitude relationship is examined. .

d(45)=|B53−B35|
d(−45)=|B55−B33|
d (45) = | B53−B35 |
d (−45) = | B55−B33 |

d(45)は注目画素を中心として、水平方向となす角度が45度の方向(右上から左下への方向、即ち右上がりの方向)に整列し、注目画素に隣接する2つの画素の色成分値の差の絶対値を表し、d(−45)は注目画素を中心として、水平方向となす角度が−45度の方向(左上から右下への方向、即ち左上がりの方向)に整列し、注目画素に隣接する2つの画素の色成分値の差の絶対値を表す。
d(45)<d(−45)であるときは、右上がりの方向の相関が強いと判断し、そうでないときは、左上がりの方向の相関が強いと判断する。
このd(45)、d(−45)の大小関係により、補間演算回路13、補間演算回路14、選択回路15の動作が変わる。まず、d(45)<d(−45)であるときの補間演算回路13、補間演算回路14、選択回路15の動作について述べる。
d (45) is a color component of two pixels that are aligned in a direction whose angle to the horizontal direction is 45 degrees centering on the pixel of interest (the direction from the upper right to the lower left, that is, the direction of rising to the right) and adjacent to the pixel of interest. This represents the absolute value of the difference between the values, and d (−45) is aligned in a direction where the angle with the horizontal direction is −45 degrees with respect to the pixel of interest (the direction from the upper left to the lower right, that is, the upward direction to the left). Represents the absolute value of the difference between the color component values of two pixels adjacent to the target pixel.
When d (45) <d (−45), it is determined that the correlation in the upward direction is strong, and otherwise, it is determined that the correlation in the upward direction is strong.
The operations of the interpolation calculation circuit 13, the interpolation calculation circuit 14, and the selection circuit 15 change depending on the magnitude relationship between d (45) and d (−45). First, operations of the interpolation operation circuit 13, the interpolation operation circuit 14, and the selection circuit 15 when d (45) <d (−45) are described.

補間演算回路13では以下の式で注目画素R44のG成分値OUT13を計算し、出力する。   The interpolation calculation circuit 13 calculates and outputs the G component value OUT13 of the target pixel R44 by the following equation.

Figure 2005217478
Figure 2005217478

補間演算回路14では以下の式で注目画素R44のG成分値OUT14を計算する。   The interpolation calculation circuit 14 calculates the G component value OUT14 of the target pixel R44 by the following equation.

Figure 2005217478
Figure 2005217478

但し、 However,

Figure 2005217478
Figure 2005217478

であり、x1、y1、x2、y2は補間演算回路14内で演算される。   X1, y1, x2, and y2 are calculated in the interpolation calculation circuit 14.

補間演算回路14はさらに、x1とx2の差の絶対値がある閾値以下かどうかの判定を行い、該閾値以下のときは線形補間を用いて注目画素G44に対するR成分値OUT14を計算し出力する。即ち、注目画素G44に対するR成分値OUT14を、注目画素に隣接する画素の色成分値を用いて、以下の式で計算して出力する。
OUT14=(B53+B35)/2
The interpolation calculation circuit 14 further determines whether or not the absolute value of the difference between x1 and x2 is less than or equal to a threshold value. When the absolute value is less than or equal to the threshold value, the R component value OUT14 for the pixel of interest G44 is calculated and output using linear interpolation. . That is, the R component value OUT14 for the target pixel G44 is calculated and output using the color component value of the pixel adjacent to the target pixel according to the following equation.
OUT14 = (B53 + B35) / 2

選択回路15は、注目画素の近傍の領域内に位置し、注目画素を中心として、上記相関判別手段12で相関が強いと判定された方向に整列し、注目画素と同じ色成分を有する画素及び注目画素の色成分値が、画素位置との関係で、単調に変化しているかどうかを判定する。そのため、例えばR画素R62、R44、R26のR成分値R62、R44、R26の大小関係を調べる。そして、その結果によりOUT13もしくはOUT14のどちらか一方をOUT15として出力する。即ち、R62、R44、R26が以下の条件1、2のいずれかを満たすときはOUT13を、そうでないときはOUT14を出力する。   The selection circuit 15 is located in a region in the vicinity of the target pixel, is aligned in the direction in which the correlation determination unit 12 determines that the correlation is strong with the target pixel as a center, and has a pixel having the same color component as the target pixel. It is determined whether the color component value of the target pixel changes monotonously in relation to the pixel position. Therefore, for example, the magnitude relationship between the R component values R62, R44, and R26 of the R pixels R62, R44, and R26 is examined. Depending on the result, either OUT13 or OUT14 is output as OUT15. That is, OUT13 is output when R62, R44, and R26 satisfy one of the following conditions 1 and 2, and OUT14 is output otherwise.

条件1:R62<R44かつR26<R44
条件2:R62>R44かつR26>R44
Condition 1: R62 <R44 and R26 <R44
Condition 2: R62> R44 and R26> R44

以上がd(45)<d(−45)のときの動作である。次に、d(45)<d(−45)以外のときの動作について述べる。   The above is the operation when d (45) <d (−45). Next, the operation when d (45) <d (−45) is not described.

補間演算回路13では以下の式で注目画素R44のB成分値OUT13を計算し、出力する。   The interpolation calculation circuit 13 calculates and outputs the B component value OUT13 of the target pixel R44 by the following equation.

Figure 2005217478
Figure 2005217478

補間演算回路14では以下の式で注目画素R44のB成分値OUT14を計算する。   The interpolation calculation circuit 14 calculates the B component value OUT14 of the target pixel R44 by the following equation.

Figure 2005217478
Figure 2005217478

但し、 However,

Figure 2005217478
Figure 2005217478

であり、x1、y1、x2、y2は補間演算回路14内で演算される。   X1, y1, x2, and y2 are calculated in the interpolation calculation circuit 14.

補間演算回路14はさらに、x1とx2の差の絶対値がある閾値以下かどうかの判定を行い、該閾値以下のときは線形補間を用いて注目画素R44に対するB成分値OUT14を計算し出力する。即ち、注目画素R44に対するB成分値OUT14を、注目画素に隣接する画素の色成分値を用いて、以下の式で計算して出力する。
OUT14=(B33+B55)/2
The interpolation calculation circuit 14 further determines whether or not the absolute value of the difference between x1 and x2 is equal to or smaller than a threshold value. When the absolute value is equal to or smaller than the threshold value, the B component value OUT14 for the target pixel R44 is calculated and output using linear interpolation. . That is, the B component value OUT14 for the target pixel R44 is calculated and output using the color component value of the pixel adjacent to the target pixel according to the following formula.
OUT14 = (B33 + B55) / 2

選択回路15は、注目画素の近傍の領域内に位置し、注目画素を中心として、上記相関判別手段12で相関が強いと判定された方向に整列し、注目画素と同じ色成分を有する画素、及び注目画素の色成分値が、画素位置との関係で、単調に変化しているかどうかを判定する。そのため、例えばR画素R22、R44、R66のR成分値R22、R44、R66の大小関係を調べる。そして、その結果によりOUT13もしくはOUT14のどちらか一方をOUT15として出力する。即ち、R22、R44、R66が以下の条件1、2のいずれかを満たすときはOUT13を、そうでないときはOUT14を出力する。   The selection circuit 15 is located in a region in the vicinity of the target pixel, is aligned in a direction in which the correlation determination unit 12 determines that the correlation is strong with the target pixel as a center, and has the same color component as the target pixel. In addition, it is determined whether the color component value of the target pixel changes monotonously in relation to the pixel position. Therefore, for example, the magnitude relationship between the R component values R22, R44, and R66 of the R pixels R22, R44, and R66 is examined. Then, according to the result, either OUT13 or OUT14 is output as OUT15. That is, OUT13 is output when R22, R44, and R66 satisfy one of the following conditions 1 and 2, and OUT14 is output otherwise.

条件1:R22<R44かつR66<R44
条件2:R22>R44かつR66>R44
Condition 1: R22 <R44 and R66 <R44
Condition 2: R22> R44 and R66> R44

以上の補間処理がすべてのR画素の位置におけるB成分値に対して行われる。
以上がR画素の位置におけるB成分値の補間処理である。
B画素の位置におけるR成分値の補間処理はRとBが入れ替わる以外はR画素の位置におけるB成分値の補間処理と同様に行われる。
The above interpolation processing is performed on the B component values at the positions of all R pixels.
The above is the interpolation processing of the B component value at the position of the R pixel.
The R component value interpolation process at the B pixel position is performed in the same manner as the B component value interpolation process at the R pixel position, except that R and B are interchanged.

以上により、補間処理が終了し、全画素に対する全不足色成分値がメモリ36に書込まれたことになる。次に、メモリ36の内容が、補間処理回路4外部へ、補間結果OUT4として出力される。この補間結果OUT4が、A/D変換器3から入力される固体撮像素子2で得られた信号OUT3と合成回路5で合成されることにより、すべての画素についてR、G、B各色の色成分が揃った画像信号(フルカラー画像)が出力されることになる。   Thus, the interpolation process is completed, and all insufficient color component values for all pixels are written in the memory 36. Next, the contents of the memory 36 are output to the outside of the interpolation processing circuit 4 as an interpolation result OUT4. The interpolation result OUT4 is combined with the signal OUT3 obtained by the solid-state imaging device 2 input from the A / D converter 3 by the combining circuit 5, so that the color components of the R, G, and B colors for all the pixels are obtained. Thus, an image signal (full color image) having a uniform number is output.

なお、実施の形態1と同様、dH、dV、d(45)、d(−45)の計算式は本実施例に記載されたものに限定されない。   As in the first embodiment, the calculation formulas for dH, dV, d (45), and d (−45) are not limited to those described in this example.

また、実施の形態2におけるフルカラー画像撮像装置の構成は図1に記載のものに限られない。たとえばホワイトバランス処理を行う回路やガンマ補正を行う回路を追加してもよい。   Further, the configuration of the full-color image capturing apparatus according to the second embodiment is not limited to that illustrated in FIG. For example, a circuit that performs white balance processing or a circuit that performs gamma correction may be added.

実施の形態2における補間処理回路4の内部構成は図17に示されたのものに限られない。たとえばフレームメモリ11のかわりに補間処理に必要なライン数のラインメモリを用いた構成などが考えられる。   The internal configuration of the interpolation processing circuit 4 in the second embodiment is not limited to that shown in FIG. For example, a configuration using a line memory having the number of lines necessary for the interpolation processing instead of the frame memory 11 can be considered.

また、実施の形態1、2における補間処理の対象はベイヤ型配列に限られず、複数色の色成分の画素が規則的に配列されていればよい。   In addition, the target of the interpolation processing in the first and second embodiments is not limited to the Bayer type arrangement, and it is sufficient that pixels of a plurality of color components are regularly arranged.

この発明の実施の形態1の画素信号処理装置を備えた撮像装置の構成を示すブロック図である。It is a block diagram which shows the structure of the imaging device provided with the pixel signal processing apparatus of Embodiment 1 of this invention. ベイヤ型の画素配置を示す図である。It is a figure which shows a Bayer type pixel arrangement. 実施の形態1の補間処理回路の構成を示すブロック図である。2 is a block diagram illustrating a configuration of an interpolation processing circuit according to the first embodiment. FIG. 実施の形態1の補間処理を示すフローチャートである。3 is a flowchart illustrating interpolation processing according to the first embodiment. 実施の形態1の補間処理を示すフローチャートである。3 is a flowchart illustrating interpolation processing according to the first embodiment. 実施の形態1の補間処理を示すフローチャートである。3 is a flowchart illustrating interpolation processing according to the first embodiment. R画素の位置におけるG成分値の補間を行う際に利用される画素とその色成分値を示す図である。It is a figure which shows the pixel utilized when interpolating G component value in the position of R pixel, and its color component value. (a)及び(b)はそれぞれ、ベイヤ配列において、奇数行のG画素を中心にした場合の画素配置、及び偶数行のG画素を中心にした場合の画素配置を示す図である。(A) And (b) is a figure which shows the pixel arrangement | positioning when centering on the G pixel of an odd number row, and the pixel arrangement | positioning centering on the G pixel of an even number row, respectively, in a Bayer arrangement. 奇数行のG画素の位置におけるR成分値及びB成分値の補間を行う際に利用される画素とその色成分値を示す図である。It is a figure which shows the pixel utilized when interpolating R component value and B component value in the position of G pixel of an odd-numbered row, and its color component value. R画素の位置におけるB成分値の補間を行う際に利用される画素とその色成分値を示す図である。It is a figure which shows the pixel utilized when interpolating B component value in the position of R pixel, and its color component value. (a)乃至(d)は、横軸をR画素の位置、縦軸を各画素のR成分値に対応させた座標平面上に、R画素R24、R44、R64間でのR成分値の変化のパターンを示す図である。(A) to (d) show changes in R component values among R pixels R24, R44, and R64 on a coordinate plane in which the horizontal axis corresponds to the position of the R pixel and the vertical axis corresponds to the R component value of each pixel. FIG. 単調変化を仮定した補間処理の概念を説明する図である。It is a figure explaining the concept of the interpolation process supposing the monotone change. 単調変化を仮定した補間処理の概念を説明する図である。It is a figure explaining the concept of the interpolation process supposing the monotone change. 相似関係を仮定した補間処理の概念を説明するための図である。It is a figure for demonstrating the concept of the interpolation process supposing the similarity relationship. 色成分値がなだらかに変化する場合に、単調変化を仮定した補間処理により好ましい結果が得られることを説明するための図である。It is a figure for demonstrating that a preferable result is obtained by the interpolation process on which the monotone change was assumed when a color component value changes gently. 色成分値が短い周期で変化する場合に、相似関係を仮定した補間処理により好ましい結果が得られることを示す図である。It is a figure which shows that a preferable result is obtained by the interpolation process which assumed the similarity relationship when a color component value changes with a short period. 本発明の実施の形態2の補間処理回路4の構成を示すブロック図である。It is a block diagram which shows the structure of the interpolation processing circuit 4 of Embodiment 2 of this invention.

符号の説明Explanation of symbols

ST12 相関判別ステップ、 ST13a 変化の態様を判別するステップ、 ST13b 変化の態様を判別するステップ、 ST14a 相似関係を仮定した補間処理を行うステップ、 ST14b 相似関係を仮定した補間処理を行うステップ、 ST17a 単調変化を仮定した補間処理を行うステップ、 ST17b 単調変化を仮定した補間処理を行うステップ、 ST22 変化の態様を判別するステップ、 ST23 相似関係を仮定した補間処理を行うステップ、 ST26 単調変化を仮定した補間処理を行うステップ、 ST32 相関判別ステップ、 ST33a 変化の態様を判別するステップ、 ST33b 変化の態様を判別するステップ、 ST34a 相似関係を仮定した補間処理を行うステップ、 ST34b 相似関係を仮定した補間処理を行うステップ、 ST37a 単調変化を仮定した補間処理を行うステップ、 ST37b 単調変化を仮定した補間処理を行うステップ、 12 相関判別回路、 13 補間演算回路、 14 補間演算回路、 15 選択回路。   ST12 correlation determination step, ST13a step of determining the mode of change, ST13b step of determining the mode of change, ST14a step of performing an interpolation process assuming a similar relationship, ST14b step of performing an interpolation process assuming a similar relationship, ST17a monotonic change ST17b Step of performing interpolation processing assuming monotone change, ST22 Step of determining change mode, ST23 Step of performing interpolation processing assuming similar relationship, ST26 Interpolation processing assuming monotone change ST32 correlation determination step, ST33a step of determining the change mode, ST33b step of determining the mode of change, ST34a step of performing an interpolation process assuming the similarity relationship, ST34b similarity relationship ST37a Step of performing interpolation processing assuming monotone change, ST37b Step of performing interpolation processing assuming monotone change, 12 Correlation determining circuit, 13 Interpolation operation circuit, 14 Interpolation operation circuit, 15 selection circuit.

Claims (24)

2次元平面上に配列され、各々が第1乃至第N(Nは2以上の整数)の互いに異なる色成分のいずれかを有する複数の画素の、それぞれの色成分値を表す画素信号の組に基づいて、第J(Jは1からNのうちのいずれか一つ)の色成分値を有する注目画素の位置における第K(KはJを除く1からNのうちのいずれか一つ)の色成分値を表す画素信号を補間により生成する画素信号処理方法において、
注目画素の近傍の領域内に位置し、注目画素と同じ色成分を有する画素及び注目画素の色成分値の変化の態様を判別するステップと、
上記変化の態様を判別するステップでの判別結果に応じて、
上記補間を第1の補間方法で行って第1の補間値を生成する第1の補間演算ステップ又は上記補間を上記第1の補間方法とは異なる第2の補間方法で行って第2の補間値を生成する第2の補間演算ステップのいずれか一方を実行する補間演算ステップと
を備え、
上記第1の補間演算ステップ及び第2の補間演算ステップは、上記注目画素の上記第Jの色成分値と、上記注目画素の近傍の領域内に位置する画素の色成分値とに基づいて上記補間を行うことを特徴とする
画素信号処理方法。
A set of pixel signals representing respective color component values of a plurality of pixels arranged on a two-dimensional plane and each having any of first to Nth (N is an integer of 2 or more) different color components. Based on the Kth (K is any one of 1 to N excluding J) at the position of the pixel of interest having the Jth (J is any one of 1 to N) color component value. In a pixel signal processing method for generating a pixel signal representing a color component value by interpolation,
Determining a mode of a change in a color component value of a pixel that is located in a region near the target pixel and has the same color component as the target pixel and the target pixel;
According to the determination result in the step of determining the mode of change,
The first interpolation calculation step for generating the first interpolation value by performing the interpolation by the first interpolation method or the second interpolation by performing the interpolation by a second interpolation method different from the first interpolation method. An interpolation calculation step for executing any one of the second interpolation calculation steps for generating a value,
The first interpolation calculation step and the second interpolation calculation step are based on the J-th color component value of the pixel of interest and the color component value of a pixel located in a region near the pixel of interest. A pixel signal processing method characterized by performing interpolation.
注目画素の近傍の領域内に位置する画素信号の相関の強い方向を判別する相関判別ステップをさらに有し、
上記変化の態様を判別するステップは、注目画素の近傍の領域内に位置し、上記相関判別ステップで相関が強いと判定された方向に整列し、注目画素と同じ色成分を有する画素及び注目画素の色成分値の変化の態様を判別する
ことを特徴とする請求項1に記載の画素信号処理方法。
A correlation determination step for determining a direction in which the correlation between pixel signals located in a region in the vicinity of the target pixel is strong;
The step of determining the change mode is a pixel and a target pixel that are located in a region in the vicinity of the target pixel, are aligned in a direction in which the correlation is determined to be strong in the correlation determination step, and have the same color component as the target pixel The pixel signal processing method according to claim 1, wherein a mode of change of the color component value of the pixel is determined.
上記第1の補間演算ステップ及び第2の補間演算ステップは、上記注目画素の上記第Jの色成分値と、上記注目画素の近傍の領域内に位置し、上記相関判別ステップで相関が強いと判定された方向に整列する画素の色成分値とに基づいて上記補間を行うことを特徴とする請求項2に記載の画素信号処理方法。   The first interpolation calculation step and the second interpolation calculation step are located in a region near the pixel of interest and the J-th color component value of the pixel of interest, and are strongly correlated in the correlation determination step. The pixel signal processing method according to claim 2, wherein the interpolation is performed based on color component values of pixels aligned in the determined direction. 上記第2の補間演算ステップは、上記相関判別ステップで相関が強いと判定された方向に整列する画素のうち、上記第Jの色成分を有する画素の上記第Jの成分値をx成分とし、上記第Kの色成分を有する画素の上記第Kの成分値をもとに算出した値をy成分とする二つの2次元データ(x1,y1)、(x2,y2)、及び注目画素の上記第Jの色成分値x0を用いた以下の式(1)、
Figure 2005217478
で注目画素の位置における上記第Kの色成分値y0を計算することを特徴とする請求項3に記載の画素信号処理方法。
In the second interpolation calculation step, among the pixels aligned in the direction in which the correlation is determined to be strong in the correlation determination step, the J-th component value of the pixel having the J-th color component is an x component, Two two-dimensional data (x1, y1), (x2, y2) having a value calculated based on the Kth component value of the pixel having the Kth color component as the y component, and the above of the target pixel The following formula (1) using the J-th color component value x0:
Figure 2005217478
4. The pixel signal processing method according to claim 3, wherein the Kth color component value y0 at the position of the target pixel is calculated.
上記第2の補間演算ステップは、
上記二つの2次元データのx成分x1、x2の差の絶対値がある閾値以下のとき、上記注目画素の近傍の領域内に位置する画素の、注目画素と同じ色の色成分値を用いた線形補間を行い、
上記二つの2次元データのx成分x1、x2の差の絶対値が上記閾値を超えるとき、上記式(1)を用いた補間を行う
ことを特徴とする請求項4に記載の画素信号処理方法。
The second interpolation calculation step includes:
When the absolute value of the difference between the x components x1 and x2 of the two two-dimensional data is less than a certain threshold value, the color component value of the same color as the target pixel of the pixel located in the region near the target pixel is used. Perform linear interpolation,
The pixel signal processing method according to claim 4, wherein when the absolute value of the difference between the x components x1 and x2 of the two two-dimensional data exceeds the threshold value, interpolation using the equation (1) is performed. .
上記第1の補間演算ステップは、
画素の2次元平面上の配列を互いに直交するH軸及びV軸を含む2次元座標平面上に表し、色成分値を上記2次元平面に垂直なZ軸に表す三次元直交座標系において、
上記注目画素の周辺に位置し、上記相関判別ステップで相関が強いと判定された方向に整列した上記第Jの色成分を有する複数の画素のそれぞれの位置における、それらの画素の上記第Jの色成分の値の平均値と、上記注目画素の位置における該注目画素の色成分の値とで作る第1の多角形と、
上記注目画素の周辺に位置し、上記相関判別ステップで相関が強いと判定された方向に整列した上記第Kの色成分を有する複数の画素のそれぞれの位置における、それらの画素の上記第Kの色成分の平均値と、上記第2の補間演算ステップで補間により求められる上記注目画素の位置における上記第Kの色成分の値とで作る第2の多角形とが互いに相似になるように、
上記注目画素の位置における上記第Kの色成分の値を定めることを特徴とする請求項3に記載の画素信号処理方法。
The first interpolation calculation step includes:
In a three-dimensional orthogonal coordinate system in which an arrangement 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 Jth of the pixels at the respective positions of the plurality of pixels having the Jth color component that are located around the target pixel and aligned in the direction in which the correlation is determined to be strong in the correlation determination step. A first polygon formed by an average value of color component values and a value of the color component of the target pixel at the position of the target pixel;
The Kth of the pixels at the respective positions of the plurality of pixels having the Kth color component aligned in the direction in which the correlation is determined to be strong in the correlation determination step is located around the target pixel. The second polygon 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 in the second interpolation calculation step is similar to each other.
4. The pixel signal processing method according to claim 3, wherein a value of the Kth color component at the position of the target pixel is determined.
上記第1の補間演算ステップは、
上記注目画素の周辺に位置し、上記相関判別ステップで相関が強いと判定された方向に整列した上記第Jの色成分を有する複数の画素の上記第Jの色成分の値の平均値と、上記注目画素の位置における上記第Jの色成分の値との差と、上記平均値の計算に用いられた複数の画素及び上記注目画素相互間の上記2次元平面上における距離との比と、
上記注目画素の周辺に位置し、上記相関判別ステップで相関が強いと判定された方向に整列した上記第Kの色成分を有する複数の画素の上記第Kの色成分の値の平均値と、上記第2の補間演算ステップで補間により求められる上記注目画素の位置における上記第Kの色成分の値との差と、上記平均値の計算に用いられた複数の画素及び上記注目画素相互間の上記2次元平面上における距離との比が互いに同じになるように、
上記注目画素の位置における上記第Kの色成分の値を定めることを特徴とする請求項3に記載の画素信号処理方法。
The first interpolation calculation step includes:
An average value of the values of the J-th color component of a plurality of pixels having the J-th color component, which are positioned around the target pixel and aligned in the direction in which the correlation is determined to be strong in the correlation determination step; A ratio between a difference between the value of the J-th color component at the position of the target pixel and a distance on the two-dimensional plane between the plurality of pixels used for calculating the average value and the target pixel;
An average value of the values of the K-th color component of a plurality of pixels having the K-th color component, which are positioned around the target pixel and aligned in a direction in which the correlation is determined to be strong in the correlation determination step; The difference between the value of the Kth color component at the position of the target pixel obtained by interpolation in the second interpolation calculation step and the plurality of pixels used for the calculation of the average value and between the target pixels In order that the ratio to the distance on the two-dimensional plane is the same,
4. The pixel signal processing method according to claim 3, wherein a value of the Kth color component at the position of the target pixel is determined.
上記変化の態様を判別するステップは、注目画素の近傍の領域内に位置し、上記相関判別ステップで相関が強いと判定された方向に整列し、注目画素と同じ色の色成分を有する画素及び注目画素の色成分値が、それぞれの画素の位置との関係で、単調に変化しているかどうかの判定を行い、単調に変化していると判定したときは、上記第2の補間演算ステップの出力を、それ以外のときは、上記第1の補間演算ステップの出力を選択して出力することを特徴とする請求項3に記載の画素信号処理方法。   The step of determining the mode of change is a pixel that is located in a region in the vicinity of the target pixel, is aligned in a direction in which the correlation is determined to be strong in the correlation determination step, and has a color component of the same color as the target pixel It is determined whether or not the color component value of the pixel of interest is changing monotonously in relation to the position of each pixel. If it is determined that the color component value is changing monotonously, 4. The pixel signal processing method according to claim 3, wherein an output is selected and output in the first interpolation calculation step otherwise. 上記変化の態様を判別するステップは、注目画素の色成分値をx0で表し、上記相関判別ステップで相関が強いと判定された方向に整列し、注目画素と同じ色成分を有する2つの画素が有する色成分値をx1、x2で表したとき、x0、x1、x2が以下の条件1及び2、即ち、
条件1:x0>x1かつx0>x2
条件2:x0<x1かつx0<x2
のいずれも満たさないときに上記色成分値が単調に変化していると判定する
ことを特徴とする請求項8に記載の画素信号処理方法。
In the step of determining the change mode, the color component value of the target pixel is represented by x0, and the two pixels having the same color component as the target pixel are aligned in the direction in which the correlation is determined to be strong in the correlation determination step. When the color component values possessed by x1 and x2, x0, x1, and x2 are the following conditions 1 and 2, that is,
Condition 1: x0> x1 and x0> x2
Condition 2: x0 <x1 and x0 <x2
The pixel signal processing method according to claim 8, wherein it is determined that the color component value changes monotonously when none of the above is satisfied.
各々が第1乃至第Nの色成分のうちの一つを発生する第1乃至第N種類の光電変換素子が2次元平面上に配列された撮像素子の上記光電変換素子の各々から得られる信号を、上記画素信号の組の少なくとも一部として用いることを特徴とする請求項1に記載の画素信号処理方法。   A signal obtained from each of the photoelectric conversion elements of the imaging element in which the first to Nth types of photoelectric conversion elements each generating one of the first to Nth color components are arranged on a two-dimensional plane. The pixel signal processing method according to claim 1, wherein at least a part of the set of pixel signals is used. 2次元平面上に配列され、各々が第1乃至第N(Nは2以上の整数)の互いに異なる色成分のいずれかを有する複数の画素の、それぞれの色成分値を表す画素信号の組に基づいて、第J(Jは1からNのうちのいずれか一つ)の色成分値を有する注目画素の位置における第K(KはJを除く1からNのうちのいずれか一つ)の色成分値を表す画素信号を補間により生成する画素信号処理装置において、
上記補間を第1の補間方法で行って第1の補間値を生成する第1の補間演算手段と、
上記補間を上記第1の補間方法とは異なる第2の補間方法で行って第2の補間値を生成する第2の補間演算手段と、
注目画素の近傍の領域内に位置し、注目画素と同じ色成分を有する画素及び注目画素の色成分値の変化の態様に応じて、上記第1の補間値と上記第2の補間値のいずれかを、選択して出力する選択手段と
を備え、
上記第1の補間演算手段及び第2の補間演算手段は、上記注目画素の上記第Jの色成分値と、上記注目画素の近傍の領域内に位置する画素の色成分値とに基づいて上記補間を行うことを特徴とする
画素信号処理装置。
A set of pixel signals representing respective color component values of a plurality of pixels arranged on a two-dimensional plane and each having any of first to Nth (N is an integer of 2 or more) different color components. Based on the Kth (K is any one of 1 to N excluding J) at the position of the pixel of interest having the Jth (J is any one of 1 to N) color component value. In a pixel signal processing apparatus that generates a pixel signal representing a color component value by interpolation,
First interpolation calculation means for generating the first interpolation value by performing the interpolation by the first interpolation method;
Second interpolation calculation means for generating the second interpolation value by performing the interpolation by a second interpolation method different from the first interpolation method;
Any one of the first interpolation value and the second interpolation value is located in a region in the vicinity of the target pixel and has the same color component as the target pixel and the change of the color component value of the target pixel. And selecting means for selecting and outputting
The first interpolation calculation means and the second interpolation calculation means are based on the J-th color component value of the target pixel and the color component value of a pixel located in a region near the target pixel. A pixel signal processing apparatus characterized by performing interpolation.
注目画素の近傍の領域内に位置する画素信号の相関の強い方向を判別する相関判別手段と、
上記選択手段は、注目画素の近傍の領域内に位置し、上記相関判別手段で相関が強いと判定された方向に整列し、注目画素と同じ色成分を有する画素及び注目画素の色成分値の変化の態様に応じて、上記第1の補間値と上記第2の補間値のいずれかを、選択して出力することを特徴とする請求項11に記載の画素信号処理装置。
Correlation determining means for determining a direction of strong correlation of pixel signals located in a region in the vicinity of the target pixel;
The selection means is located in a region in the vicinity of the target pixel, aligned in the direction in which the correlation determination means determines that the correlation is strong, and has the same color component as the target pixel and the color component value of the target pixel. 12. The pixel signal processing apparatus according to claim 11, wherein one of the first interpolation value and the second interpolation value is selected and output in accordance with a change mode.
上記第1の補間演算手段及び第2の補間演算手段は、上記注目画素の上記第Jの色成分値と、上記注目画素の近傍の領域内に位置し、上記相関判別手段で相関が強いと判定された方向に整列する画素の色成分値とに基づいて上記補間を行うことを特徴とする請求項12に記載の画素信号処理装置。   The first interpolation calculation means and the second interpolation calculation means are located in a region in the vicinity of the target pixel and the J-th color component value of the target pixel, and the correlation determination unit has a strong correlation. 13. The pixel signal processing apparatus according to claim 12, wherein the interpolation is performed based on color component values of pixels aligned in the determined direction. 上記第2の補間演算手段は、上記相関判定手段で相関が強いと判定された方向に整列する画素のうち、上記第Jの色成分を有する画素の上記第Jの色成分値をx成分とし、上記第Kの色成分を有する画素の上記第Kの色成分値をもとに算出した値をy成分とする二つの2次元データ(x1,y1)、(x2,y2)、及び注目画素の上記第Jの色成分値x0を用いた以下の式(1)、
Figure 2005217478
で注目画素の位置における上記第Kの色成分値y0を計算することを特徴とする請求項13に記載の画素信号処理装置。
The second interpolation calculation means uses the J-th color component value of the pixel having the J-th color component as the x-component among the pixels aligned in the direction in which the correlation determination means determines that the correlation is strong. , Two two-dimensional data (x1, y1), (x2, y2) having the y component as a value calculated based on the Kth color component value of the pixel having the Kth color component, and the pixel of interest The following equation (1) using the above-mentioned J-th color component value x0:
Figure 2005217478
14. The pixel signal processing apparatus according to claim 13, wherein the Kth color component value y0 at the position of the target pixel is calculated.
上記第2の補間演算手段は、
上記二つの2次元データのx成分x1、x2の差の絶対値がある閾値以下のとき、上記注目画素の近傍の領域内に位置する画素の、注目画素と同じ色の色成分値を用いた線形補間を行い、
上記二つの2次元データのx成分x1、x2の差の絶対値が上記閾値を超えるとき、上記式(1)を用いた補間を行う
ことを特徴とする請求項14に記載の画素信号処理装置。
The second interpolation calculation means includes:
When the absolute value of the difference between the x components x1 and x2 of the two two-dimensional data is less than a certain threshold value, the color component value of the same color as the target pixel of the pixel located in the region near the target pixel is used. Perform linear interpolation,
The pixel signal processing device according to claim 14, wherein when the absolute value of the difference between the x components x1 and x2 of the two two-dimensional data exceeds the threshold value, interpolation using the equation (1) is performed. .
上記第1の補間演算手段は、
画素の2次元平面上の配列を互いに直交するH軸及びV軸を含む2次元座標平面上に表し、色成分値を上記2次元平面に垂直なZ軸に表す三次元直交座標系において、
上記注目画素の周辺に位置し、上記相関判別手段で相関が強いと判定された方向に整列し、上記第Jの色成分を有する複数の画素のそれぞれの位置における、それらの画素の上記第Jの色成分の値の平均値と、上記注目画素の位置における該注目画素の色成分の値とで作る第1の多角形と、
上記注目画素の周辺に位置し、上記相関判別手段で相関が強いと判定された方向に整列し、上記第Kの色成分を有する複数の画素のそれぞれの位置における、それらの画素の上記第Kの色成分の平均値と、上記第2の補間演算手段で補間により求められる上記注目画素の位置における上記第Kの色成分の値とで作る第2の多角形とが互いに相似になるように、
上記注目画素の位置における上記第Kの色成分の値を定めることを特徴とする請求項13に記載の画素信号処理装置。
The first interpolation calculation means includes:
In a three-dimensional orthogonal coordinate system in which an arrangement 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 Jth of the pixels at the respective positions of the plurality of pixels that are located around the pixel of interest and are aligned in the direction in which the correlation determination unit determines that the correlation is strong and have the Jth color component. A first polygon formed by an average value of color component values of the target pixel and a value of the color component of the target pixel at the position of the target pixel;
The Kth of the pixels at the respective positions of the plurality of pixels that are located around the pixel of interest and are aligned in the direction in which the correlation determination unit determines that the correlation is strong and have the Kth color component. The second polygon 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 calculation means are similar to each other. ,
14. The pixel signal processing apparatus according to claim 13, wherein a value of the Kth color component at the position of the target pixel is determined.
上記第1の補間演算手段は、
上記注目画素の周辺に位置し、上記相関判別手段で相関が強いと判定された方向に整列し、上記第Jの色成分を有する複数の画素の上記第Jの色成分の値の平均値と、上記注目画素の位置における上記第Jの色成分の値との差と、上記平均値の計算に用いられた複数の画素及び上記注目画素相互間の上記2次元平面上における距離との比と、
上記注目画素の周辺に位置し、上記相関判別手段で相関が強いと判定された方向に整列し、上記第Kの色成分を有する複数の画素の上記第Kの色成分の値の平均値と、上記第2の補間演算手段で補間により求められる上記注目画素の位置における上記第Kの色成分の値との差と、上記平均値の計算に用いられた複数の画素及び上記注目画素相互間の上記2次元平面上における距離との比が互いに同じになるように、
上記注目画素の位置における上記第Kの色成分の値を定めることを特徴とする請求項13に記載の画素信号処理装置。
The first interpolation calculation means includes:
An average value of the values of the J-th color component of a plurality of pixels located around the pixel of interest, aligned in a direction in which the correlation determination unit determines that the correlation is strong, and having the J-th color component; A ratio of a difference between the value of the J-th color component at the position of the target pixel and a distance on the two-dimensional plane between the plurality of pixels used for calculating the average value and the target pixel; ,
An average value of the values of the K-th color component of a plurality of pixels located around the pixel of interest, aligned in the direction in which the correlation determination unit determines that the correlation is strong, and having the K-th color component; The difference between the value of the K-th color component at the position of the target pixel obtained by interpolation by the second interpolation calculation means, and the plurality of pixels used for the calculation of the average value and between the target pixels So that their ratio to the distance on the two-dimensional plane is the same.
14. The pixel signal processing apparatus according to claim 13, wherein a value of the Kth color component at the position of the target pixel is determined.
上記選択手段は、注目画素の近傍の領域内に位置し、上記相関判別手段で相関が強いと判定された方向に整列し、注目画素と同じ色の色成分を有する画素及び注目画素の色成分値が、それぞれの画素の位置との関係で、単調に変化しているかどうかの判定を行い、単調に変化していると判定したときは、上記第2の補間演算手段の出力を、それ以外のときは、上記第1の補間演算手段の出力を選択して出力することを特徴とする請求13に記載の画素信号処理装置。   The selection unit is located in a region in the vicinity of the target pixel, is aligned in a direction in which the correlation determination unit determines that the correlation is strong, and has the same color component as the target pixel and the color component of the target pixel It is determined whether or not the value is changing monotonously in relation to the position of each pixel. If it is determined that the value is changing monotonously, the output of the second interpolation calculation means is the other than that The pixel signal processing apparatus according to claim 13, wherein the output of the first interpolation calculation means is selected and output at the time. 上記選択手段は、注目画素の色成分値をx0で表し、上記相関判定手段で相関が強いと判定された方向に整列し、注目画素と同じ色成分を有する2つの画素が有する色成分値をx1、x2で表したとき、x0、x1、x2が以下の条件1及び2、即ち、
条件1:x0>x1かつx0>x2
条件2:x0<x1かつx0<x2
のいずれも満たさないときに上記色成分値が単調に変化していると判定する
ことを特徴とする請求項18に記載の画素信号処理装置。
The selection means represents the color component value of the pixel of interest by x0, aligns the color component values of the two pixels having the same color component as the pixel of interest, aligned in the direction in which the correlation determination means determines that the correlation is strong. When represented by x1, x2, x0, x1, x2 are the following conditions 1 and 2, that is,
Condition 1: x0> x1 and x0> x2
Condition 2: x0 <x1 and x0 <x2
The pixel signal processing apparatus according to claim 18, wherein the pixel component value is determined to be monotonously changing when none of the above is satisfied.
各々が第1乃至第Nの色成分のうちの一つを発生する第1乃至第N種類の光電変換素子が2次元平面上に配列された撮像素子をさらに有し、上記光電変換素子の各々から得られる信号が上記画素信号の組の少なくとも一部として用いられることを特徴とする請求項11に記載の画素信号処理装置。   Each of the photoelectric conversion elements further includes an imaging element in which first to Nth types of photoelectric conversion elements each generating one of the first to Nth color components are arranged on a two-dimensional plane. The pixel signal processing apparatus according to claim 11, wherein a signal obtained from is used as at least part of the set of pixel signals. 2次元平面上に配列され、各々が第1乃至第N(Nは2以上の整数)の互いに異なる色成分のいずれかを有する複数の画素の、それぞれの色成分値を表す画素信号の組に基づいて、第J(Jは1からNのうちのいずれか一つ)の色成分を有する注目画素の位置における第K(KはJを除く1からNのうちのいずれか一つ)の色成分値を表す画素信号を補間により生成する画素信号処理方法において、
注目画素を中心に一つの方向に存在する画素のうち、
第Jの色成分の画素が有する色成分値をx成分、
第Kの色成分の画素が有する色成分値をもとに算出した値をy成分とする二個の二次元データ(x1,y1)、(x2,y2)および、注目画素の第Jの色成分値x0を用いた以下の式(1)、
Figure 2005217478
で注目画素の位置における第Kの色成分値y0を計算する補間ステップ(14)を備える
ことを特徴とする画素信号処理方法。
A set of pixel signals representing respective color component values of a plurality of pixels arranged on a two-dimensional plane and each having any of first to Nth (N is an integer of 2 or more) different color components. Based on this, the Kth color (K is any one of 1 to N excluding J) at the position of the pixel of interest having the Jth color component (J is any one of 1 to N). In a pixel signal processing method for generating a pixel signal representing a component value by interpolation,
Of the pixels that exist in one direction around the pixel of interest,
The color component value of the pixel of the Jth color component is the x component,
Two pieces of two-dimensional data (x1, y1), (x2, y2) having the value calculated based on the color component value of the pixel of the Kth color component as the y component, and the Jth color of the pixel of interest The following formula (1) using the component value x0,
Figure 2005217478
An interpolation step (14) for calculating a Kth color component value y0 at the position of the pixel of interest.
注目画素の近傍の領域内の画素信号の相関の強い方向を判別する相関判別ステップ(12)をさらに備え、
上記補間演算ステップは、上記注目画素の上記第Jの色成分値と、上記注目画素の近傍の領域内の画素のうち上記相関判別ステップで判別した相関の強い方向に存在する画素の色成分値とを基に上記補間を行うことを特徴とする請求項21に記載の画素信号処理方法。
A correlation determination step (12) for determining a direction of strong correlation of pixel signals in a region in the vicinity of the target pixel;
In the interpolation calculation step, the J-th color component value of the pixel of interest and the color component value of a pixel existing in the direction of strong correlation determined in the correlation determination step among the pixels in the vicinity of the pixel of interest The pixel signal processing method according to claim 21, wherein the interpolation is performed based on:
2次元平面上に配列され、各々が第1乃至第N(Nは2以上の整数)の互いに異なる色成分のいずれかを有する複数の画素の、それぞれの色成分値を表す画素信号の組に基づいて、第J(Jは1からNのうちのいずれか一つ)の色成分を有する注目画素の位置における第K(KはJを除く1からNのうちのいずれか一つ)の色成分値を表す画素信号を補間により生成する画素信号処理装置において、
注目画素を中心に一つの方向に存在する画素のうち、
第Jの色成分の画素が有する色成分値をx成分、
第Kの色成分の画素が有する色成分値をもとに算出した値をy成分とする二個の二次元データ(x1,y1)、(x2,y2)および、注目画素の第Jの色成分値x0を用いた以下の式(1)、
Figure 2005217478
で注目画素の位置における第Kの色成分値y0を計算する補間手段(14)を備える
ことを特徴とする画素信号処理装置。
A set of pixel signals representing respective color component values of a plurality of pixels arranged on a two-dimensional plane and each having any of first to Nth (N is an integer of 2 or more) different color components. Based on this, the Kth color (K is any one of 1 to N excluding J) at the position of the pixel of interest having the Jth color component (J is any one of 1 to N). In a pixel signal processing apparatus that generates a pixel signal representing a component value by interpolation,
Of the pixels that exist in one direction around the pixel of interest,
The color component value of the pixel of the Jth color component is the x component,
Two pieces of two-dimensional data (x1, y1), (x2, y2) having the value calculated based on the color component value of the pixel of the Kth color component as the y component, and the Jth color of the pixel of interest The following formula (1) using the component value x0,
Figure 2005217478
A pixel signal processing apparatus comprising: interpolation means (14) for calculating a Kth color component value y0 at the position of the target pixel.
注目画素の近傍の領域内の画素信号の相関の強い方向を判別する相関判別手段(12)をさらに備え、
上記補間演算手段は、上記注目画素の上記第Jの色成分値と、上記注目画素の近傍の領域内の画素のうち上記相関判別手段で判別した相関の強い方向に存在する画素の色成分値とを基に上記補間を行うことを特徴とする請求項23に記載の画素信号処理装置。
Correlation determining means (12) for determining the direction of strong correlation of pixel signals in the region in the vicinity of the target pixel,
The interpolation calculation means includes the J-th color component value of the pixel of interest and the color component value of a pixel existing in the direction of strong correlation determined by the correlation determination means among the pixels in the vicinity of the pixel of interest. 24. The pixel signal processing apparatus according to claim 23, wherein the interpolation is performed based on:
JP2004018248A 2004-01-27 2004-01-27 Pixel signal processing method and apparatus Expired - Fee Related JP4128538B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004018248A JP4128538B2 (en) 2004-01-27 2004-01-27 Pixel signal processing method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004018248A JP4128538B2 (en) 2004-01-27 2004-01-27 Pixel signal processing method and apparatus

Publications (2)

Publication Number Publication Date
JP2005217478A true JP2005217478A (en) 2005-08-11
JP4128538B2 JP4128538B2 (en) 2008-07-30

Family

ID=34902818

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004018248A Expired - Fee Related JP4128538B2 (en) 2004-01-27 2004-01-27 Pixel signal processing method and apparatus

Country Status (1)

Country Link
JP (1) JP4128538B2 (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2006059409A1 (en) * 2004-12-02 2006-06-08 Mitsubishi Denki Kabushiki Kaisha Pixel signal processing device and method
JP2007174089A (en) * 2005-12-20 2007-07-05 Mitsubishi Electric Corp Image processor
KR100978688B1 (en) 2007-07-23 2010-08-30 엔비디아 코포레이션 Techniques for reducing color artifacts in digital images
JP2010212761A (en) * 2009-03-06 2010-09-24 Toshiba Corp Image forming apparatus
US8773556B2 (en) 2009-08-18 2014-07-08 Sony Corporation Signal processing device, imaging device, and signal processing method for color interpolation
JP2014233021A (en) * 2013-05-30 2014-12-11 株式会社Jvcケンウッド Video signal processing device and method

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2006059409A1 (en) * 2004-12-02 2006-06-08 Mitsubishi Denki Kabushiki Kaisha Pixel signal processing device and method
US7643074B2 (en) 2004-12-02 2010-01-05 Mitsubishi Denki Kabushiki Kaisha Pixel signal processing apparatus and pixel signal processing method
JP2007174089A (en) * 2005-12-20 2007-07-05 Mitsubishi Electric Corp Image processor
KR100978688B1 (en) 2007-07-23 2010-08-30 엔비디아 코포레이션 Techniques for reducing color artifacts in digital images
JP2010212761A (en) * 2009-03-06 2010-09-24 Toshiba Corp Image forming apparatus
US8773556B2 (en) 2009-08-18 2014-07-08 Sony Corporation Signal processing device, imaging device, and signal processing method for color interpolation
JP2014233021A (en) * 2013-05-30 2014-12-11 株式会社Jvcケンウッド Video signal processing device and method

Also Published As

Publication number Publication date
JP4128538B2 (en) 2008-07-30

Similar Documents

Publication Publication Date Title
KR100755601B1 (en) Pixel signal processor and pixel signal processing method
JP5840008B2 (en) Image processing apparatus, image processing method, and program
CN110365961B (en) Image demosaicing device and method
KR20070080582A (en) Image processing apparatus and method, recording medium, and program
JP2008227996A (en) Image processor, camera device, image processing method and program
KR20190087017A (en) Image sensing device
KR100768619B1 (en) Pixel signal processing device and method
JP4128538B2 (en) Pixel signal processing method and apparatus
JP4148927B2 (en) Pixel signal processing method and apparatus
JP2008053875A (en) Image processor and method, program, and program storage medium
JP2016164709A (en) Image processing device, imaging apparatus, and image processing program
JP2009157449A (en) Image processing system, image processing method, and program for image processing
JP4128536B2 (en) Pixel signal processing apparatus and method
KR20220112211A (en) A method and system for upsampling of categorical maps
JP4487179B2 (en) Image processing apparatus and method, recording medium, and program
JP6105960B2 (en) Image processing apparatus, image processing method, and imaging apparatus
JP6435560B1 (en) Image processing apparatus, image processing method, program, and imaging apparatus
JP2011171991A (en) Image processing apparatus, electronic device, image processing method and image processing program
JP2011170488A (en) Image processing device, image processing method, image processing program, and electronic apparatus
JP2009212851A (en) Scanning line interpolator and its control method
JP2006295435A (en) Pixel signal processing apparatus and method
JP2012175289A (en) Image processing apparatus and method for controlling the same
JP2009017583A (en) Image processing device
JP2007097028A (en) Motion vector detecting method and motion vector detecting circuit
TWI494900B (en) Method of real time image tracking

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

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