JP4334484B2 - Pixel signal processing apparatus and method - Google Patents

Pixel signal processing apparatus and method Download PDF

Info

Publication number
JP4334484B2
JP4334484B2 JP2005022708A JP2005022708A JP4334484B2 JP 4334484 B2 JP4334484 B2 JP 4334484B2 JP 2005022708 A JP2005022708 A JP 2005022708A JP 2005022708 A JP2005022708 A JP 2005022708A JP 4334484 B2 JP4334484 B2 JP 4334484B2
Authority
JP
Japan
Prior art keywords
signal
pixel
value
interpolation
spectral sensitivity
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2005022708A
Other languages
Japanese (ja)
Other versions
JP2006211466A (en
Inventor
淳子 牧田
徹也 久野
博明 杉浦
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP2005022708A priority Critical patent/JP4334484B2/en
Publication of JP2006211466A publication Critical patent/JP2006211466A/en
Application granted granted Critical
Publication of JP4334484B2 publication Critical patent/JP4334484B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、画素信号処理装置及び方法に関し、特に2次元平面上に配列された画素の各々が複数の色成分値のうちの少なくとも一つの色成分値を有していないとき、その画素が有していない色成分値を補間により生成することでカラー画像を得る画素信号処理装置及び方法に関するものである。   The present invention relates to a pixel signal processing apparatus and method, and in particular, when each of pixels arranged on a two-dimensional plane does not have at least one color component value among a plurality of color component values, the pixel is present. The present invention relates to a pixel signal processing apparatus and method for obtaining a color image by generating non-color component values by interpolation.

このような画素信号処理は、例えば、各々が複数の色成分値、例えば赤(R)、緑(G)、青(B)の3原色のうちのいずれか一つの色成分値を発生する複数種類の光電変換素子が2次元平面上に、例えばベイヤ型に配列された撮像素子をさらに備えるカラー撮像装置の一部として用いられ、撮像素子から出力された画素信号に基づき、各画素位置において欠落している色成分値(不足色成分値)を補間するために用いられる。   Such pixel signal processing is, for example, a plurality of color component values each generating a plurality of color component values, for example, any one of the three primary colors of red (R), green (G), and blue (B). A type of photoelectric conversion element is used as a part of a color imaging apparatus further including, for example, a Bayer-type imaging element on a two-dimensional plane, and is missing at each pixel position based on a pixel signal output from the imaging element It is used to interpolate the color component value (insufficient color component value).

従来の、赤、緑、青のカラーフィルタがベイヤ型に配置された撮像素子を有する撮像装置では、各々の画素につき、G、BまたはB、RまたはR、Gの色成分値が不足しており、例えば下記の特許文献1に示されるように、解像感を高めるために、色毎の局所的な画素信号の分布に基づいて各画素の画素信号を平均値で置き換え、これによって想定される既知色幾何学図形と不足色幾何学図形の線形相似比に基づく補間方法を用いている。   In a conventional imaging device having an imaging device in which red, green, and blue color filters are arranged in a Bayer shape, G, B or B, R or R, and G color component values are insufficient for each pixel. For example, as shown in Patent Document 1 below, the pixel signal of each pixel is replaced with an average value based on the local pixel signal distribution for each color in order to enhance the resolution, and this is assumed. An interpolation method based on the linear similarity ratio between known color geometric figures and missing color geometric figures is used.

特開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 positive correlation between color component values (for example, R, G, and B component values in a Bayer array) in a region near the interpolation target pixel. Therefore, interpolation is appropriately performed in areas where there is no positive correlation between color component values (for example, a boundary between one color and another color), for example, where there is no correlation, or where there is a negative correlation. There is a problem that interpolation error becomes large.

本発明は、補間処理対象画素の近傍の領域内での色成分値の変化の仕方に拘らず常に最適の補間方法で補間を行うことができる画素信号処理装置を提供することを目的とする。   SUMMARY OF THE INVENTION An object of the present invention is to provide a pixel signal processing apparatus that can always perform interpolation using an optimal interpolation method regardless of how color component values change in a region near an interpolation processing target pixel.

この発明は、
2次元平面上に配列され、各々が第1乃至第Nの分光感度特性のうちのいずれか1つを有する画素信号の組に基づき、第h(hは1からNのうちのいずれか一つ)の分光感度特性の画素信号が存在する補間対象画素位置における第k(kはhを除く1からNのうちのいずれか一つ)の分光感度特性の画素信号を生成する画素信号処理装置において、
上記補間対象画素位置の近傍の領域内の複数の画素位置における、上記第hの分光感度特性の画素信号の低周波数成分を生成するh信号低周波成分生成手段と、
上記補間対象画素位置の近傍の領域内の複数の画素位置における、上記第hの分光感度特性の画素信号の変化成分を生成するh信号変化成分生成手段と、
上記補間対象画素位置の近傍の領域内の複数の画素位置における、上記第kの分光感度特性の画素信号の低周波数成分を生成するk信号低周波成分生成手段と、
上記補間対象画素位置の近傍の領域内の複数の画素位置における、上記第kの分光感度特性の画素信号の変化成分を生成するk信号変化成分生成手段と、
上記補間対象画素位置の近傍の領域内の複数の画素位置における画素信号の彩度に基づいて彩度係数を算出する彩度係数算出手段と、
上記k信号変化成分生成手段によって得られた値と上記h信号変化成分生成手段によって得られた値の差と上記彩度係数とに基づいて定められる上記第kの信号と上記第hの信号との非相関値と、上記k信号低周波成分生成手段によって得られた値と上記h信号低周波成分生成手段によって得られた値の差と、上記補間対象画素位置における上記第hの画素信号とを加算して、補間対象画素位置における上記第kの画素信号を求める補間値演算手段と
を有する画素信号処理装置を提供する。
This invention
Based on a set of pixel signals arranged on a two-dimensional plane and each having any one of the first to Nth spectral sensitivity characteristics, the hth (h is any one of 1 to N) In the pixel signal processing device that generates the pixel signal of the kth (k is any one of 1 to N except h) spectral signal at the interpolation target pixel position where the pixel signal of the spectral sensitivity characteristic exists. ,
H signal low frequency component generating means for generating a low frequency component of the pixel signal of the h-th spectral sensitivity characteristic at a plurality of pixel positions in a region in the vicinity of the interpolation target pixel position;
H signal change component generation means for generating a change component of the pixel signal of the h-th spectral sensitivity characteristic at a plurality of pixel positions in a region in the vicinity of the interpolation target pixel position;
K-signal low-frequency component generating means for generating low-frequency components of the pixel signal of the k-th spectral sensitivity characteristic at a plurality of pixel positions in a region in the vicinity of the interpolation target pixel position;
K signal change component generation means for generating a change component of the pixel signal of the kth spectral sensitivity characteristic at a plurality of pixel positions in a region in the vicinity of the interpolation target pixel position;
A saturation coefficient calculation means for calculating a saturation coefficient based on the saturation of the pixel signal at a plurality of pixel positions in a region in the vicinity of the interpolation target pixel position;
The k-th signal and the h-th signal determined based on the difference between the value obtained by the k signal change component generation means and the value obtained by the h signal change component generation means and the saturation coefficient; , The difference between the value obtained by the k signal low frequency component generation means and the value obtained by the h signal low frequency component generation means, the h th pixel signal at the interpolation target pixel position, And an interpolation value calculating means for obtaining the k-th pixel signal at the interpolation target pixel position.

この発明によれば、補間対象の画素が色の境界付近にある場合など、色成分値相互間の相関関係が種々異なっていても、正確に補間を行うことができる。   According to the present invention, it is possible to accurately perform interpolation even if the correlation between the color component values is variously different, such as when the pixel to be interpolated is in the vicinity of the color boundary.

また、上記k信号変化成分生成手段によって得られた値と上記h信号変化成分生成手段によって得られた値の差と上記彩度係数に基づいて(例えば、上記の差に彩度係数を乗算することにより)、上記第kの信号と上記第hの信号との非相関値を算出し、このようにして求めた非相関値を用いて補間値を求めるので、彩度が低い場合にも高精度で補間を行うことができる。   Further, based on the difference between the value obtained by the k signal change component generation means and the value obtained by the h signal change component generation means and the saturation coefficient (for example, the difference is multiplied by the saturation coefficient). Therefore, the decorrelation value between the kth signal and the hth signal is calculated, and the interpolated value is obtained using the thus obtained decorrelation value. Interpolation can be performed with accuracy.

以下、図面を参照して本発明の実施の形態を説明する。以下に説明する実施の形態は、デジタルスチルカメラの一部として用いるのに適したものであるが、本発明はこれに限定されない。つまり本発明は、欠落(不足)している信号を補間により生成するものであり、デジタルスチルカメラのような撮像装置の他、プロジェクタなどの表示装置において解像度を変換する場合などにも適用できる。   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 digital still camera, but the present invention is not limited to this. That is, the present invention generates missing (insufficient) signals by interpolation, and can be applied to the case of converting the resolution in a display device such as a projector in addition to an imaging device such as a digital still camera.

実施の形態1.
図1はこの発明の実施の形態1の画素信号処理装置を備えた撮像装置の構成を表すブロック図である。
レンズ1から入射した光は、例えば固体撮像素子で構成される2次元イメージセンサ2の撮像面に結像する。イメージセンサ2は、2次元的に配列された複数の光電変換素子を有し、この複数の光電変換素子は、例えば図2に示すように、ベイヤ(Bayer)型に配置された、赤(R)、緑(G)、青(B)の3原色に対応する分光感度特性を有するカラーフィルタで覆われており、各光電変換素子からは、カラーフィルタの色に対応した色成分のアナログ信号が出力される。
また、本発明は、一般的に言えば、2次元平面上に配列され、各々が第1乃至第Nの分光感度特性のうちのいずれか1つを有する画素の画素信号の組に基づき、第h(hは1からNのうちのいずれか一つ)の分光感度特性の画素信号が存在する注目画素位置における第k(kはhを除く1からNのうちのいずれか一つ)の分光感度特性の画素信号を生成する画素信号処理装置及び方法に関するものであるが、以下の実施の形態では、Nが3であり、第1から第Nの分光感度特性を有する画素が、R、G、B画素の3種の画素である。
Embodiment 1 FIG.
FIG. 1 is a block diagram showing a configuration of an imaging apparatus provided with a pixel signal processing apparatus according to Embodiment 1 of the present invention.
The light incident from the lens 1 forms an image on the imaging surface of the two-dimensional image sensor 2 configured by, for example, a solid-state imaging device. The image sensor 2 includes a plurality of photoelectric conversion elements arranged two-dimensionally. The plurality of photoelectric conversion elements are arranged in a Bayer type, for example, as shown in FIG. ), Green (G), and blue (B) are covered with a color filter having spectral sensitivity characteristics corresponding to the three primary colors, and each photoelectric conversion element receives an analog signal of a color component corresponding to the color of the color filter. Is output.
Further, generally speaking, the present invention is based on a set of pixel signals of pixels arranged on a two-dimensional plane, each having any one of the first to Nth spectral sensitivity characteristics. Spectroscopy of k (k is any one of 1 to N excluding h) at the target pixel position where a pixel signal having spectral sensitivity characteristics of h (h is any one of 1 to N) exists. The present invention relates to a pixel signal processing apparatus and method for generating a pixel signal having sensitivity characteristics. In the following embodiment, N is 3, and pixels having first to Nth spectral sensitivity characteristics are R, G. , B pixels.

図2において、横、縦はそれぞれ撮像面の水平方向(H)、垂直方向(V)を表す。光電変換素子は画素を構成し、撮像面上で各光電変換素子が占める位置が画素位置に対応する。各画素は、撮像素子の撮像面上に2次元的に配列されているので、それらの位置は、HV座標面(またはHV面)上の座標値で表すことができる。図2はイメージセンサの一部のみ、即ち7行7列の範囲を示す。中心の画素の水平方向位置をi、垂直方向位置をj、従って座標値を(i,j)で表し、その周囲の画素の水平方向(行方向)の位置を、i−3,i−2、…i+3を、垂直方向(列方向)の位置を、j−3、j−2、…j+3で表している。尚、i、jはともに整数であり、水平方向に互いに隣接する画素は水平方向の座標値が「1」だけ異なり、垂直方向に互いに隣接する画素は垂直方向の座標値が「1」だけ異なる。
また以下の説明で、Rのカラーフィルタで覆われた光電変換素子に対応した画素をR画素、Gのカラーフィルタで覆われた光電変換素子に対応した画素をG画素、Bのカラーフィルタで覆われた光電変換素子に対応した画素をB画素と呼ぶ。
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 image pickup surface of the image pickup device, their position can be represented by a coordinate value on the HV coordinate plane (or HV plane). FIG. 2 shows only a part of the image sensor, that is, a range of 7 rows and 7 columns. The horizontal position of the center pixel is represented by i, the vertical position is represented by j, and the coordinate value is represented by (i, j). The horizontal position (row direction) of the surrounding pixels is represented by i-3, i-2. ,..., I + 3, the positions in the vertical direction (column direction) are represented by j-3, j-2,. Note that i and j are both integers. Pixels adjacent to each other in the horizontal direction differ by “1” in the horizontal direction, and pixels adjacent to each other in the vertical direction differ from each other by “1” in the vertical direction. .
In the following description, pixels corresponding to photoelectric conversion elements covered with R color filters are covered with R pixels, and pixels corresponding to photoelectric conversion elements covered with G color filters are covered with G pixels and B color filters. A pixel corresponding to the photoelectric conversion element is called a B pixel.

イメージセンサ2は入射光を光電変換し入射光量に応じたレベルのアナログ信号を画素ごとに出力する。このアナログ信号はA/D変換器3でデジタル信号に変換され、出力され、各画素の持つ色成分値(画素信号)として、フレームメモリ4に書き込まれる。この際、各信号は、各画素の、撮像面上での位置、従ってHV座標面上での位置に対応づけて書き込まれる。   The image sensor 2 photoelectrically converts incident light and outputs an analog signal having a level corresponding to the amount of incident light for each pixel. This analog signal is converted into a digital signal by the A / D converter 3 and outputted, and is written in the frame memory 4 as a color component value (pixel signal) possessed by each pixel. At this time, each signal is written in association with the position of each pixel on the imaging surface, and hence the position on the HV coordinate plane.

上記のように、各画素を構成する光電変換素子の各々は、フィルタにより覆われているので、赤、緑、青のいずれか1つの色の光を受光する。各光電変換素子で受光する光の色を「受光色」と、各画素について受光色以外の色を「不足色」ということがある。
各画素を構成する光電変換素子の各々からは、受光色に対応する一つの色成分値を表す信号しか得られない。即ち、R画素については、R成分値が既知である一方、G及びB成分値が未知であり、G画素については、G成分値が既知である一方、B及びR成分値が未知であり、B画素については、B成分値が既知である一方、R及びG成分値が未知である。各画素について、R、G、B全ての色成分値を持つことで、カラー画像を得ることができるので、フレームメモリ4に書き込まれている、各画素位置における未知の色成分値は不足色成分値とも言われる。本発明の画素信号処理は、各画素において未知である色成分値(不足色成分値)を補間により求めるものである。
As described above, since each of the photoelectric conversion elements constituting each pixel is covered with the filter, it receives light of any one color of red, green, and blue. The color of light received by each photoelectric conversion element may be referred to as “light reception color”, and the color other than the light reception color for each pixel may be referred to as “insufficient color”.
From each of the photoelectric conversion elements constituting each pixel, only a signal representing one color component value corresponding to the received light color can be obtained. That is, for the R pixel, the R component value is known, while the G and B component values are unknown, and for the G pixel, the G component value is known, while the B and R component values are unknown, For the B pixel, the B component value is known, while the R and G component values are unknown. Since each pixel has all the R, G, and B color component values, a color image can be obtained. Therefore, an unknown color component value written in the frame memory 4 at each pixel position is an insufficient color component. Also called value. In the pixel signal processing of the present invention, a color component value (insufficient color component value) that is unknown in each pixel is obtained by interpolation.

フレームメモリ4に記憶された画素信号は、デマルチプレクサ5でR、G、B信号ごとに2次元メモリ6r、6g、6bに分配され、記憶される。即ちR信号が2次元メモリ6rに、G信号が2次元メモリ6gに、B信号が2次元メモリ6bにそれぞれ記憶される。   The pixel signals stored in the frame memory 4 are distributed and stored in the two-dimensional memories 6r, 6g, and 6b for each of the R, G, and B signals by the demultiplexer 5. That is, the R signal is stored in the two-dimensional memory 6r, the G signal is stored in the two-dimensional memory 6g, and the B signal is stored in the two-dimensional memory 6b.

図3、図4、図5はそれぞれ、イメージセンサ2の撮像面上における、R画素、G画素、B画素の配置を色毎に別々に示す。2次元メモリ6r、6g、6bの各々においても、各画素の信号(色成分値)は、撮像面上での位置、従ってHV座標面上での位置に対応付けて書き込まれる。従って、図3、図4、図5は、デマルチプレクサ5から分配され、記憶された画素信号の、HV座標面上での位置を表すものでもある。   3, 4, and 5 respectively show the arrangement of R pixels, G pixels, and B pixels on the imaging surface of the image sensor 2 for each color. Also in each of the two-dimensional memories 6r, 6g, and 6b, the signal (color component value) of each pixel is written in association with the position on the imaging surface, that is, the position on the HV coordinate plane. Therefore, FIGS. 3, 4 and 5 also represent the positions on the HV coordinate plane of the pixel signals distributed from the demultiplexer 5 and stored.

なお、フレームメモリ4はイメージセンサ2が2行に1行ずつ読み出しを行ういわゆるインターレース読み出し方式のものであり、1枚(フレーム)の画素信号がすべて揃うために2度の(2フィールドの)読み出しを行わなければならない場合に必要である。図2に示した画素配列における画素を上から順次1行ずつ読み出すいわゆるプログレッシブ読み出し方式のイメージセンサ2の場合には、イメージセンサ2から送られてきた画素の信号をそのままでデマルチプレクサ5で振り分けていけばよいため、フレームメモリ2が無くても同様の動作を実現することができる。   Note that the frame memory 4 is of a so-called interlaced readout method in which the image sensor 2 reads out one row at a time in two rows. Since all the pixel signals of one sheet (frame) are prepared, the reading is performed twice (two fields). This is necessary if you have to In the case of the so-called progressive readout type image sensor 2 that reads out the pixels in the pixel array shown in FIG. 2 one row at a time from the top, the pixel signal sent from the image sensor 2 is distributed by the demultiplexer 5 as it is. Therefore, the same operation can be realized without the frame memory 2.

ローパスフィルタ8r、8g、8bはそれぞれメモリ6r、6g、6bに対応して設けられたものであり、メモリ6r、6g、6bから読み出された画素信号に対して各色成分の低周波数成分を出力する。即ち、ローパスフィルタ8r、8g、8bの各々は、各画素について、その画素位置の近傍の領域(当該画素位置を含む領域)内の複数の画素位置における、各色の画素信号の低周波数成分を算出する。その算出方法については後に詳しく述べる。図6、図7、図8にローパスフィルタ8r、8g、8bの出力例を示す。   The low-pass filters 8r, 8g, and 8b are provided corresponding to the memories 6r, 6g, and 6b, respectively, and output low-frequency components of each color component with respect to the pixel signals read from the memories 6r, 6g, and 6b. To do. That is, each of the low-pass filters 8r, 8g, and 8b calculates, for each pixel, the low-frequency component of the pixel signal of each color at a plurality of pixel positions in an area near the pixel position (area including the pixel position). To do. The calculation method will be described in detail later. 6, 7 and 8 show output examples of the low-pass filters 8r, 8g and 8b.

同様にハイパスフィルタ7r、7g,7bもそれぞれメモリ6r、6g、6bに対応して設けられたものであり、メモリ6r、6g、6bから読み出された画素信号に対して各色成分の高周波数成分を出力する。即ち、ハイパスフィルタ7r、7g、7bの各々は、各画素について、その画素位置の近傍の領域内の複数の画素位置における、各色の画素信号の高周波成分乃至「変化成分」を算出する。その算出方法については後に詳しく述べる。図9、図10、図11にハイパスフィルタ7r、7g、7bの出力例を示す。   Similarly, the high-pass filters 7r, 7g, and 7b are also provided corresponding to the memories 6r, 6g, and 6b, respectively, and the high-frequency components of the respective color components with respect to the pixel signals read from the memories 6r, 6g, and 6b. Is output. That is, each of the high-pass filters 7r, 7g, and 7b calculates, for each pixel, the high-frequency component or “change component” of the pixel signal of each color at a plurality of pixel positions in a region near the pixel position. The calculation method will be described in detail later. 9, 10 and 11 show output examples of the high-pass filters 7r, 7g and 7b.

図6、図7、図8、図9、図10、図11に示されるように、ローパスフィルタ8r、8g、8bの出力(RLPF,GLPF、BLPF)、及びハイパスフィルタ7r、7g、7bの出力(RHPF、GHPF、BHPF)はすべての画素について求められる。   As shown in FIGS. 6, 7, 8, 9, 10, and 11, the outputs of the low-pass filters 8r, 8g, and 8b (RLPF, GLPF, and BLPF), and the outputs of the high-pass filters 7r, 7g, and 7b. (RHPF, GHPF, BHPF) is obtained for all pixels.

彩度係数算出手段9は、2次元メモリ6r、6g、6bから読み出された画素信号から彩度係数βを算出する。   The saturation coefficient calculation means 9 calculates a saturation coefficient β from the pixel signals read from the two-dimensional memories 6r, 6g, 6b.

非相関値算出手段12は、ハイパスフィルタ7r、7g、7bの出力及び彩度係数算出手段9の出力とに基づいて、各画素について非相関値を求める。
非相関値算出手段12は、例えば図12に示すように、選択手段23k、23hと、差計算手段25と、係数乗算手段27と、制御手段30aとを有する。
The decorrelation value calculation means 12 obtains a decorrelation value for each pixel based on the outputs of the high-pass filters 7r, 7g, 7b and the output of the saturation coefficient calculation means 9.
As shown in FIG. 12, for example, the non-correlation value calculation means 12 includes selection means 23k and 23h, a difference calculation means 25, a coefficient multiplication means 27, and a control means 30a.

演算手段10は、2次元メモリ6r、6g、6bから読み出された画素信号と、ローパスフィルタ8r、8g、8bの出力と、非相関値算出手段12の出力とに基づいて、各画素について低周波数成分の差を求め、さらに、補間値を求める。
演算手段10は、例えば図13に示すように、選択手段24k、24h、21と、差計算手段26と、係数乗算手段28と、加算手段29と、制御手段30bとを有する。
The calculation means 10 is low for each pixel based on the pixel signals read from the two-dimensional memories 6r, 6g, 6b, the outputs of the low-pass filters 8r, 8g, 8b, and the output of the decorrelation value calculation means 12. A frequency component difference is obtained, and an interpolation value is obtained.
As shown in FIG. 13, for example, the calculation means 10 includes selection means 24k, 24h, 21, difference calculation means 26, coefficient multiplication means 28, addition means 29, and control means 30b.

選択手段21は、2次元メモリ6r、6g、6bのうちの一つを選択し、選択された2次元メモリ6r、6g、6bから読み出された画素信号を加算手段29に供給する。
選択手段23kは、ハイパスフィルタ7r、7g、7bの出力RHPF、GHPF、BHPFを受け、これらのうちの1つを選択して出力する。選択手段23hは、ハイパスフィルタ7r、7g、7bの出力RHPF、GHPF、BHPFを受け、これらのうちの他の1つを選択して出力する。
選択手段24kは、ローパスフィルタ8r、8g、8bの出力RLPF、GLPF、BLPFを受け、これらのうちの1つを選択して出力する。選択手段24hは、ローパスフィルタ8r、8g、8bの出力RLPF、GLPF、BLPFを受け、これらのうちの他の1つを選択して出力する。
The selection unit 21 selects one of the two-dimensional memories 6r, 6g, and 6b and supplies the pixel signal read from the selected two-dimensional memories 6r, 6g, and 6b to the addition unit 29.
The selection unit 23k receives the outputs RHPF, GHPF, and BHPF of the high pass filters 7r, 7g, and 7b, and selects and outputs one of them. The selection unit 23h receives the outputs RHPF, GHPF, and BHPF of the high-pass filters 7r, 7g, and 7b, and selects and outputs the other one of them.
The selection unit 24k receives the outputs RLPF, GLPF, and BLPF of the low-pass filters 8r, 8g, and 8b, and selects and outputs one of them. The selection unit 24h receives the outputs RLPF, GLPF, BLPF of the low-pass filters 8r, 8g, 8b, and selects and outputs the other one of them.

選択手段23k、23hによる選択は制御手段30aにより制御される。選択手段21、24k、24hによる選択は制御手段30bにより制御される。制御手段30aと制御手段30bとは同一のユニットにより構成されていても良い。言い換えると共通の制御手段(たとえばプログラムされたコンピュータによって構成される)によって構成されていても良い。
補間対象画素がR、G、Bのうちの第hの色の色成分値を有し、補間対象画素の第kの色の色成分値を補間により求めるときは、選択手段21が第hの色の色成分値を記憶している2次元メモリを選択し、補間対象画素の第hの色の色成分値(例えばh(i,j)で表される)を読み出し、選択手段23kが第kの色のハイパスフィルタの出力kHPFを選択し、選択手段23hが、第hの色のハイパスフィルタの出力hHPFを選択し、選択手段24kが第kの色のローパスフィルタの出力kLPFを選択し、選択手段24hが、第hの色のローパスフィルタの出力hLPFを選択する。
Selection by the selection means 23k and 23h is controlled by the control means 30a. Selection by the selection means 21, 24k, 24h is controlled by the control means 30b. The control means 30a and the control means 30b may be configured by the same unit. In other words, it may be constituted by a common control means (for example, constituted by a programmed computer).
When the interpolation target pixel has a color component value of the h-th color of R, G, and B, and the color component value of the k-th color of the interpolation target pixel is obtained by interpolation, the selection unit 21 selects the h-th color. The two-dimensional memory storing the color component values of the color is selected, and the color component value of the h-th color (for example, represented by h (i, j)) of the interpolation target pixel is read. The k-color high-pass filter output kHPF is selected, the selection means 23h selects the h-th color high-pass filter output hHPF, the selection means 24k selects the k-th color low-pass filter output kLPF, The selection unit 24h selects the output hLPF of the h-th color low-pass filter.

差計算手段25は、第kのHPF信号kHPFと、第hのHPF信号hHPFとの差、(前者から後者を引いたもの)(kHPF−hHPF)を求める。この差(kHPF−hHPF)は、「高周波成分の差」或いは「変化成分の差」とも呼ばれる。
差計算手段26は、第kのLPF信号kLPFと、第hのLPF信号hLPFとの差、(前者から後者を引いたもの)(kLPF−hLPF)を求める。この差(kLPF−hLPF)は、「低周波成分の差」とも呼ばれ。また「相関値」と呼ばれることもある。
LPF8r、8g、8bと、選択手段24hとで、補間対象画素位置の近傍の領域内の複数の画素位置における、第hの分光感度特性の画素信号の低周波数成分を抽出乃至生成するh信号低周波成分生成手段が構成され、LPF8r、8g、8bと、選択手段24kとで、補間対象画素位置の近傍の領域内の複数の画素位置における、第kの分光感度特性の画素信号の低周波数成分を抽出乃至生成するk信号低周波成分生成手段が構成されている。そしてこれらのh信号低周波成分生成手段及びk信号低周波成分生成手段と、差計算手段26とで、補間対象画素位置の近傍の領域内の複数の画素位置における、第kの分光感度特性の画素信号の低周波数成分と、補間対象画素位置の近傍の領域内の複数の画素位置における、第hの分光感度特性の画素信号の低周波数成分との差を算出する差算出手段が構成されている。
The difference calculation means 25 calculates a difference between the kth HPF signal kHPF and the hth HPF signal hHPF (the former minus the latter) (kHPF−hHPF). This difference (kHPF−hHPF) is also referred to as “high frequency component difference” or “change component difference”.
The difference calculating means 26 obtains the difference between the kth LPF signal kLPF and the hth LPF signal hLPF (the former minus the latter) (kLPF−hLPF). This difference (kLPF−hLPF) is also referred to as “low frequency component difference”. It may also be called “correlation value”.
The LPF 8r, 8g, 8b and the selecting unit 24h extract or generate a low frequency component of the pixel signal having the h-th spectral sensitivity characteristic at a plurality of pixel positions in the vicinity of the interpolation target pixel position. A low-frequency component of the pixel signal of the k-th spectral sensitivity characteristic at a plurality of pixel positions in the vicinity of the interpolation target pixel position by the LPF 8r, 8g, 8b and the selection unit 24k. K signal low-frequency component generating means for extracting or generating the signal is configured. Then, the h signal low frequency component generating means, the k signal low frequency component generating means, and the difference calculating means 26 are used for the kth spectral sensitivity characteristics at a plurality of pixel positions in the vicinity of the interpolation target pixel position. Difference calculating means for calculating the difference between the low frequency component of the pixel signal and the low frequency component of the pixel signal having the h-th spectral sensitivity characteristic at a plurality of pixel positions in a region near the interpolation target pixel position is configured. Yes.

係数乗算手段27は、差計算手段25の出力(kHPF−hHPF)と彩度係数算出手段9の出力を受け、差計算手段25の出力(kHPF−hHPF)に彩度係数算出手段9から出力される彩度係数βと所定の定数qを掛けて、積βq(kHPF−hHPF)を非相関値として出力する。係数乗算手段27の出力が、非相関値算出手段12の出力として用いられる。
係数乗算手段28は、差計算手段26の出力(kLPF−hLPF)に所定の定数rを掛けて、積r(kLPF−hLPF)を出力する。
加算手段29は、選択手段21から出力される画素値hと、非相関値算出手段12から出力される非相関値βq(kHPF−hHPF)と、係数乗算手段28から出力される値r(kLPF−hLPF)とを加算して、その和
h+βq(kHPF−hHPF)+r(kLPF−hLPF)
を出力する。
加算手段29の出力が、補間対象画素の第kの色の色成分値(補間値)として用いられる。
The coefficient multiplier 27 receives the output of the difference calculator 25 (kHPF−hHPF) and the output of the saturation coefficient calculator 9, and is output from the saturation coefficient calculator 9 to the output of the difference calculator 25 (kHPF−hHPF). The product βq (kHPF−hHPF) is output as a decorrelation value by multiplying the saturation coefficient β by a predetermined constant q. The output of the coefficient multiplication unit 27 is used as the output of the decorrelation value calculation unit 12.
The coefficient multiplying unit 28 multiplies the output (kLPF-hLPF) of the difference calculating unit 26 by a predetermined constant r and outputs a product r (kLPF-hLPF).
The adding unit 29 outputs the pixel value h output from the selecting unit 21, the uncorrelated value βq output from the uncorrelated value calculating unit 12 (kHPF−hHPF), and the value r (kLPF output from the coefficient multiplying unit 28. -HLPF) and the sum h + βq (kHPF-hHPF) + r (kLPF-hLPF)
Is output.
The output of the adding means 29 is used as the color component value (interpolation value) of the kth color of the interpolation target pixel.

上記のうち、ハイパスフィルタ7r、7g、7bと、選択手段23hとで、補間対象画素位置の近傍の領域内の複数の画素位置における、第hの分光感度特性の画素信号の変化成分(高周波成分)を抽出乃至生成するh信号変化成分生成手段が構成され、ハイパスフィルタ7r、7g、7bと、選択手段23kとで、補間対象画素位置の近傍の領域内の複数の画素位置における、第kの分光感度特性の画素信号の変化成分(高周波成分)を抽出乃至生成するk信号変化成分生成手段が構成されている。   Among the above, the high-pass filters 7r, 7g, and 7b and the selection unit 23h change the change component (high-frequency component) of the h-th spectral sensitivity characteristic pixel signal at a plurality of pixel positions in the vicinity of the interpolation target pixel position. ) Is extracted or generated, and the high-pass filters 7r, 7g, and 7b and the selection unit 23k are used to generate the k-th change component at a plurality of pixel positions in the vicinity of the interpolation target pixel position. A k signal change component generating means for extracting or generating a change component (high frequency component) of the pixel signal of the spectral sensitivity characteristic is configured.

また、図12に示される差計算手段25及び係数乗算手段27と、図13に示される選択手段21、差計算手段26、係数乗算手段28及び加算手段29とにより、k信号変化成分生成手段によって得られた値とh信号変化成分生成手段によって得られた値の差(kHPF−hHPF)と彩度係数βとに基づいて定められる第kの信号と第hの信号との非相関値(βq(kHPF−hHPF)と、k信号低周波成分生成手段によって得られた値(kLPF)とh信号低周波成分生成手段によって得られた値(hLPF)の差(kLPF−hLPF)と、補間対象画素位置における第hの画素信号(h)とを加算して、補間対象画素位置における上記第kの画素信号を求める補間値演算手段が構成されている。   Further, the difference calculation means 25 and coefficient multiplication means 27 shown in FIG. 12 and the selection means 21, difference calculation means 26, coefficient multiplication means 28 and addition means 29 shown in FIG. The decorrelation value (βq) between the k-th signal and the h-th signal determined based on the difference between the obtained value and the value obtained by the h signal change component generation means (kHPF−hHPF) and the saturation coefficient β. (KHPF−hHPF), the difference (kLPF−hLPF) between the value (kLPF) obtained by the k signal low frequency component generation means and the value (hLPF) obtained by the h signal low frequency component generation means, and the interpolation target pixel Interpolation value calculation means for obtaining the kth pixel signal at the interpolation target pixel position by adding the hth pixel signal (h) at the position is configured.

図示の例の補間値算出手段は、補間対象画素の位置における一つの色(第hの色)の画素信号を選択する選択手段21と、低周波成分の差(kLPF−hLPF)を求める差計算手段26とを含み、選択手段21で選択した補間対象画素の位置における一つの色(第hの色)の画素信号と、差計算手段25の出力として得られる非相関値βq(kHPF−hHPF)と、差計算手段26で求めた低周波成分の差(kLPF−hLPF)に第1の所定の係数(r)を係数乗算手段28で掛けたものとを加算手段29で加算することにより、補間対象画素位置における他の色(第kの色)の画素信号を求める。
非相関値βq(kHPF−hHPF)は、上記の例では、差計算手段25で求めた高周波成分の差(kHPF−hHPF)に彩度係数算出手段9で求めた彩度係数βと第2の所定の係数(q)を掛けることにより得られたものである。
The interpolation value calculation means in the example shown in the figure is a selection means 21 for selecting a pixel signal of one color (hth color) at the position of the interpolation target pixel, and difference calculation for obtaining a difference (kLPF-hLPF) between low frequency components. And a pixel signal of one color (hth color) at the position of the interpolation target pixel selected by the selection unit 21 and a decorrelation value βq (kHPF−hHPF) obtained as an output of the difference calculation unit 25. And the addition unit 29 adds the difference between the low frequency components (kLPF−hLPF) obtained by the difference calculation unit 26 and the first predetermined coefficient (r) multiplied by the coefficient multiplication unit 28. A pixel signal of another color (kth color) at the target pixel position is obtained.
In the above example, the non-correlation value βq (kHPF−hHPF) is calculated by adding the saturation coefficient β calculated by the saturation coefficient calculation unit 9 to the difference between the high frequency components calculated by the difference calculation unit 25 (kHPF−hHPF) and the second coefficient It is obtained by multiplying by a predetermined coefficient (q).

補間値算出手段で算出された補間値は例えば第kの色の画素信号のための2次元メモリ(6r、6g、6bのいずれか)に記憶され、或いは出力端子11から出力される。   The interpolation value calculated by the interpolation value calculation means is stored in, for example, a two-dimensional memory (any one of 6r, 6g, 6b) for the pixel signal of the kth color, or is output from the output terminal 11.

以下、上記した補間方法についてさらに詳しく説明する。   Hereinafter, the above interpolation method will be described in more detail.

上記の様に、図4は、HV座標面上におけるG信号の配列を示したものである。
図に記載されているG信号は元々イメージセンサ2上にGの色フィルタが配置されているため、その色フィルタを介して得られる信号であり、空白の箇所は他のR,Bの色フィルタが配置されているため、Gの色信号が欠落した場所である。この欠落した場所におけるG信号を補間する必要がある。
補間のための従来の方法として、周辺の画素の平均値を用いる平均補間方法(バイリニア補間)があるが、信号の変化の大きい箇所では精度の高い補間が期待できない。
As described above, FIG. 4 shows an arrangement of G signals on the HV coordinate plane.
The G signal shown in the figure is a signal obtained through the G color filter originally disposed on the image sensor 2, and is a signal obtained through the color filter, and blank portions are other R and B color filters. Are arranged, the G color signal is missing. It is necessary to interpolate the G signal at this missing location.
As a conventional method for interpolation, there is an average interpolation method (bilinear interpolation) using an average value of surrounding pixels, but high-precision interpolation cannot be expected at a portion where a signal change is large.

そこで、本実施の形態では、補間処理対象画素の近傍の領域内での色成分値の変化の様子に相似の関係がない領域においても正確に補間を行うことができ、また補間処理対象画素の近傍の領域内での色成分値の変化の仕方に拘らず常に最適の補間方法で補間を行うものであり、上記した演算手段10における補間演算は、以下の式(1)により表される。   Therefore, in the present embodiment, it is possible to accurately perform interpolation even in an area where there is no similarity in the color component value change in the area near the interpolation target pixel. Interpolation is always performed by the optimum interpolation method regardless of how the color component values change in the nearby region, and the interpolation calculation in the calculation means 10 is expressed by the following equation (1).

k(i,j)
=h(i,j)+βq{kHPF(i,j)−hHPF(i,j)}
+r{kLPF(i,j)−hLPF(i,j)}
…(1)
k (i, j)
= H (i, j) + βq {kHPF (i, j) -hHPF (i, j)}
+ R {kLPF (i, j) -hLPF (i, j)}
... (1)

式(1)において、k(i,j)はイメージセンサ2上の座標(i,j)において、欠落した色信号であり、補間される色信号である。h(i,j)は(i,j)の位置に予め存在する(値が既知の)色信号である。kHPF,hHPFは、それぞれ(i,j)の位置とその周辺の画素位置におけるk信号及びh信号から所定の演算により算出されたHPF値である。kLPF,hLPFは、それぞれ(i,j)の位置とその周辺の画素位置におけるk信号及びh信号から別の所定の演算により算出されたLPF値である。
ここでHPF値とは、既知の画素信号(イメージセンサ出力)から推測される真値の空間高周波成分であり、LPF値とは、既知の画素信号(イメージセンサ出力)から推測される真値の空間低周波成分である。ここで言う真値は、イメージセンサの画素間隔が無限小であり、光電変換誤差がないときに得られるであろう空間的に連続した画素信号の値を意味する。
q及びrは予め定めた定数である。
In equation (1), k (i, j) is a color signal that is missing at coordinates (i, j) on the image sensor 2 and is a color signal to be interpolated. h (i, j) is a color signal (having a known value) that exists in advance at the position (i, j). kHPF and hHPF are HPF values calculated by a predetermined calculation from the k signal and the h signal at the position (i, j) and the surrounding pixel positions, respectively. kLPF and hLPF are LPF values calculated by another predetermined calculation from the k signal and h signal at the position (i, j) and the surrounding pixel positions, respectively.
Here, the HPF value is a true spatial high-frequency component estimated from a known pixel signal (image sensor output), and the LPF value is a true value estimated from a known pixel signal (image sensor output). It is a spatial low frequency component. The true value here refers to a value of a spatially continuous pixel signal that will be obtained when the pixel interval of the image sensor is infinitesimal and there is no photoelectric conversion error.
q and r are predetermined constants.

βは、(i,j)の位置とその周辺の画素位置における信号の彩度(クロマ)に基づいて彩度係数算出手段9により定められる係数で、彩度が高い場合にはβの値は大きくなり、彩度が低い場合にはβの値は小さくなるように設定する。そのため、彩度が低い場合には、{kHPF(i,j)−hHPF(i,j)}に基いて定められる非相関値を抑制する作用が働く。無彩色部分では異なる色の間の相関が強くなる傾向があるため、無彩色部分で非相関値を抑制することにより、補間精度が向上する。
このようにβの値を変えることで無彩色部分も有彩色部分も同一の補間処理を行えるため、複数の処理を切り替えながら補間を行う場合と比較して回路規模を減らすことができる。また、すべての画素に対して同一の処理を行うので、全体的に自然な補間結果が得られる。これに対し、複数の異なる処理を切替えながら補間を行うと、補間結果が連続的につながらず、偽色の原因となる場合がある。
β is a coefficient determined by the saturation coefficient calculation means 9 based on the saturation (chroma) of the signal at the position (i, j) and the surrounding pixel positions. When the saturation is high, the value of β is When the value increases and the saturation is low, the value of β is set to be small. Therefore, when the saturation is low, the effect of suppressing the decorrelation value determined based on {kHPF (i, j) −hHPF (i, j)} works. Since the correlation between different colors tends to be strong in the achromatic color portion, the interpolation accuracy is improved by suppressing the non-correlation value in the achromatic color portion.
Thus, by changing the value of β, the same interpolation processing can be performed for both the achromatic color portion and the chromatic color portion, so that the circuit scale can be reduced as compared with the case where the interpolation is performed while switching a plurality of processing. Further, since the same processing is performed for all the pixels, an overall natural interpolation result can be obtained. On the other hand, if interpolation is performed while switching between a plurality of different processes, the interpolation results may not be continuously connected, which may cause false colors.

βの値は、例えば、以下の式(2a)、(2b)のように設定してもよい。

c=|G’−R’|+|G’−B’| …(2a)

c≦Th1のときは、 β=f(c)=N×c/Th1
c>Th1のときは、 β=f(c)=N
…(2b)
The value of β may be set as in the following formulas (2a) and (2b), for example.

c = | G′−R ′ | + | G′−B ′ | (2a)

When c ≦ Th1, β = f (c) = N × c / Th1
When c> Th1, β = f (c) = N
... (2b)

式(2a)においてR’、G’、B’はそれぞれ、(i,j)の位置におけるR、G、Bの画素信号を表す。この画素信号としては、各画素位置の受光色の画素信号については、2次元メモリ6r、6g、6bから出力される、その画素位置の画素信号R、G、Bをそのまま用い、各画素位置の不足色の画素信号については、その画素位置の近傍の領域内の画素信号に基いて、平均、置き換えなどにより求めた値を有する画素信号を用いても良く、またローパスフィルタ8r、8g、8bと同様のローパスフィルタによって生成された画素信号を用いても良い。ローパスフィルタを用いる場合には、ローパスフィルタ8r、8g、8bを、画素信号生成手段9r、9g、9bに兼用することができる。
cは彩度を表している。彩度が低い場合には各色成分が同じような値となるため、各色成分間の差が小さくなり、逆に、彩度が高い場合には、各色成分間のばらつきが大きくなる傾向がある。よって、例えば上記の式(2a)のように、G成分に対するR、B成分の差を彩度としてもよい。
In Expression (2a), R ′, G ′, and B ′ represent R, G, and B pixel signals at the position (i, j), respectively. As this pixel signal, the pixel signal R, G, B of the pixel position output from the two-dimensional memory 6r, 6g, 6b is used as it is for the light-receiving color pixel signal at each pixel position. For the pixel signal of the insufficient color, a pixel signal having a value obtained by averaging, replacement, or the like based on the pixel signal in the area near the pixel position may be used, and the low-pass filters 8r, 8g, 8b You may use the pixel signal produced | generated by the same low pass filter. When the low-pass filter is used, the low-pass filters 8r, 8g, and 8b can also be used as the pixel signal generating units 9r, 9g, and 9b.
c represents saturation. When the saturation is low, the color components have the same value, so the difference between the color components is small. Conversely, when the saturation is high, the variation between the color components tends to increase. Therefore, for example, as in the above equation (2a), the difference between the R and B components with respect to the G component may be used as the saturation.

なお、彩度cを式(2a)により求める代りに、下記の式(2c)又は(2d)により求めても良い。
c=|Gm−Rm|+|Gm−Bm| …(2c)
c=|Rm−Zm|+|Gm−Zm|+|Bm−Zm| …(2d)
上記の式(2c)、(2d)において、Rm、Gm、Bmは、それぞれ(i,j)の位置におけるR、G、Bの画素信号の平均値であり、Zmは(i,j)の位置におけるすべての画素の画素信号の平均値である。
Note that the saturation c may be obtained by the following equation (2c) or (2d) instead of the equation (2a).
c = | Gm−Rm | + | Gm−Bm | (2c)
c = | Rm−Zm | + | Gm−Zm | + | Bm−Zm | (2d)
In the above formulas (2c) and (2d), Rm, Gm, and Bm are average values of R, G, and B pixel signals at the position (i, j), respectively, and Zm is (i, j) It is the average value of the pixel signals of all the pixels at the position.

彩度係数βは、関数f(c)に従い、彩度cから算出する。式(2b)をグラフで示すと図14の様になる。彩度cが一定値、即ち第1の閾値Th1以下の場合はその値の大きさに応じて彩度係数βを変化させるが、第1の閾値Th1を超えたら彩度係数βはNに固定する。第1の閾値Th1、彩度係数の上限Nは、それぞれのシステムや装置等に応じて適宜設定すればよいが、Nの値は例えば1.0とし、彩度係数は0.0〜1.0の間で変化させても良い。   The saturation coefficient β is calculated from the saturation c according to the function f (c). Expression (2b) is shown as a graph in FIG. When the saturation c is a constant value, that is, the first threshold Th1 or less, the saturation coefficient β is changed according to the magnitude of the value. However, when the saturation c exceeds the first threshold Th1, the saturation coefficient β is fixed to N. To do. The first threshold Th1 and the upper limit N of the saturation coefficient may be appropriately set according to each system, apparatus, etc., but the value of N is, for example, 1.0, and the saturation coefficient is 0.0-1. You may change between 0.

また、彩度cが第2の閾値Th2を下回る場合に非相関値を「0」にすることで得られる効果が大きいシステムや装置等においては、図15で示す様に、第2の閾値Th2以下において、彩度係数βの値を「0」にし、第1の閾値Th3(図14の第1の閾値Th1に対応するが異なる符号で示されている)以上では、彩度係数βの値を上限値Nにし、第1の閾値Th3と第2の閾値Th2の間では、彩度係数βの値を直線的に増加させるようにしても良い。また、このとき、Th2=Th3であっても良い。   Further, in a system or apparatus that has a large effect obtained by setting the decorrelation value to “0” when the saturation c is lower than the second threshold Th2, as shown in FIG. 15, the second threshold Th2 is used. In the following, the value of the saturation coefficient β is set to “0”, and the value of the saturation coefficient β is equal to or greater than the first threshold Th3 (corresponding to the first threshold Th1 in FIG. 14 but indicated by a different sign). May be set to the upper limit value N, and the value of the saturation coefficient β may be increased linearly between the first threshold value Th3 and the second threshold value Th2. At this time, Th2 = Th3 may be satisfied.

図14では彩度cの値が0のときだけβの値を0としているのに対し、図15では、彩度cがTh2に達するまでβを0としている。このTh2の値により、非相関値を完全に抑制する範囲を決めている。例えば全体的に彩度の低い画像を撮像する場合や解像感を重視する場合にはTh2の値を大きくし、非相関値を抑制する範囲を広く取る。そうすることで、彩度cが0でなくてもβが0になるため、無彩色の場合に強い相関方法が広く適用され、画質の改善を図ることができる。
また、たとえモノクロ画像であっても、画像にムラがあったり欠落している画素がある状況では、彩度cが丁度0になるとは限らない。そういった場合にも、閾値Th2未満のときに、βを0とすることにより、閾値Th2未満の範囲を無彩色として扱うことにより、画質を高めることができる。
In FIG. 14, the value of β is set to 0 only when the value of saturation c is 0, whereas in FIG. 15, β is set to 0 until saturation c reaches Th2. The range for completely suppressing the decorrelation value is determined by the value of Th2. For example, when capturing an image with low saturation as a whole or when emphasizing the resolution, the value of Th2 is increased, and a range in which the decorrelation value is suppressed is widened. By doing so, since β becomes 0 even when the saturation c is not 0, a strong correlation method is widely applied in the case of an achromatic color, and the image quality can be improved.
Further, even if the image is a monochrome image, the saturation c is not always 0 in a situation where there are pixels that are uneven or missing in the image. Even in such a case, when β is 0 when it is less than the threshold Th2, the image quality can be improved by treating the range less than the threshold Th2 as an achromatic color.

また、彩度係数βは、ルックアップテーブル方式により設定しても良い。ルックアップテーブル方式にすることで、彩度cに対して彩度係数βが複雑に変化する特性を得ることが出来る。   Further, the saturation coefficient β may be set by a look-up table method. By using the look-up table method, it is possible to obtain a characteristic in which the saturation coefficient β changes in a complex manner with respect to the saturation c.

さらにまた、彩度cは、R信号、G信号及びB信号をY、Cr、Cbに変換した後、Cr、Cbを用いて算出しても良い。このとき、Y、Cr、Cbは、例えば、式(3)の様に近似的に求めても良い。   Furthermore, the saturation c may be calculated using Cr, Cb after converting the R signal, G signal, and B signal into Y, Cr, Cb. At this time, Y, Cr, and Cb may be obtained approximately, for example, as in Expression (3).

Y=(RAve+GAve+BAve)/3
Cr=|Y−RAve|
Cb=|Y−BAve|
c=Cr+Cb
…(3)
Y = (Rave + GAve + Bave) / 3
Cr = | Y-Rave |
Cb = | Y-Bave |
c = Cr + Cb
... (3)

彩度係数算出手段9の一例を図16に示す。図示の彩度係数算出手段9は、式(2a)、(2b)によって彩度係数βを求めるものであり、画素信号生成手段9r、9g、9bと、彩度計算手段9dと、彩度係数生成手段9eとを有する。
画素信号生成手段9rは、2次元メモリ6rから読み出された画素信号に基いて、各画素位置の画素信号R’を生成する。例えば、各画素位置においてRが受光色である場合、2次元メモリ6rから出力される、その画素位置の画素信号Rをそのまま画素信号R’として出力し、各画素位置においてRが不足色である場合、その画素位置の近傍の領域内の画素信号に基いて、平均、置き換えなどにより求めた値を有する画素信号を用いても良い。平均を用いる場合、例えば各画素位置からの水平、垂直方向の画素間距離が「1」である領域内の、同色の画素信号を有する画素の、画素信号の単純平均を求めてよい。ここで、「画素間距離」は、一つの画素と他の画素の水平方向、又は垂直方向の座標値の差を意味する。置き換えの場合には、水平方向又は垂直方向に座標値が「1」だけ異なる画素位置の画素信号の値を用いる。
画素信号生成手段9g、9bは画素信号生成手段9rと同様に構成されており、画素信号生成部9gは、2次元メモリ6gから読み出された画素信号に基いて、各画素位置の画素信号G’を生成し、画素信号生成部9bは、2次元メモリ6bから読み出された画素信号に基いて、各画素位置の画素信号B’を生成する。
An example of the saturation coefficient calculating means 9 is shown in FIG. The saturation coefficient calculation means 9 shown in the figure is for obtaining the saturation coefficient β by the equations (2a) and (2b). The pixel signal generation means 9r, 9g, 9b, the saturation calculation means 9d, and the saturation coefficient Generating means 9e.
The pixel signal generation unit 9r generates a pixel signal R ′ at each pixel position based on the pixel signal read from the two-dimensional memory 6r. For example, when R is a light receiving color at each pixel position, the pixel signal R of the pixel position output from the two-dimensional memory 6r is output as it is as the pixel signal R ′, and R is an insufficient color at each pixel position. In this case, a pixel signal having a value obtained by averaging, replacement, or the like based on a pixel signal in a region near the pixel position may be used. When using the average, for example, a simple average of pixel signals of pixels having the same color pixel signal in a region where the distance between the pixels in the horizontal and vertical directions from each pixel position is “1” may be obtained. Here, “distance between pixels” means a difference in coordinate values between one pixel and another pixel in the horizontal direction or the vertical direction. In the case of replacement, the value of a pixel signal at a pixel position whose coordinate value differs by “1” in the horizontal direction or the vertical direction is used.
The pixel signal generation units 9g and 9b are configured in the same manner as the pixel signal generation unit 9r. The pixel signal generation unit 9g is based on the pixel signal read from the two-dimensional memory 6g, and the pixel signal G at each pixel position. ', And the pixel signal generator 9b generates a pixel signal B' at each pixel position based on the pixel signal read from the two-dimensional memory 6b.

彩度計算手段9dは、画素信号生成手段9r、9g、9bから出力される画素信号R’、G’、B’を用いて、例えば上記の式(2a)の計算を行って、彩度cを求める。彩度計算手段9dは、例えばG’とR’の差の絶対値を求める手段と、G’とB’の差の絶対値を求める手段と、これらの手段で求められた絶対値の和を求める手段とで構成することができる。
彩度係数生成手段9eは、彩度計算手段9dで計算された彩度cを用いて、例えば式(2b)の関係を有する彩度係数βを出力する。彩度係数生成手段9eは例えばルックアップテーブルにより構成することができる。
The saturation calculation unit 9d calculates, for example, the above equation (2a) using the pixel signals R ′, G ′, and B ′ output from the pixel signal generation units 9r, 9g, and 9b, and the saturation c Ask for. The saturation calculation means 9d is, for example, a means for obtaining the absolute value of the difference between G ′ and R ′, a means for obtaining the absolute value of the difference between G ′ and B ′, and the sum of the absolute values obtained by these means. And means for obtaining.
The saturation coefficient generation unit 9e outputs the saturation coefficient β having the relationship of, for example, the equation (2b) using the saturation c calculated by the saturation calculation unit 9d. The saturation coefficient generation means 9e can be configured by a lookup table, for example.

式(1)に示した算出式の意味について図17〜図20を参照して説明する。これらの図には、各画素における色信号レベルとイメージセンサ2上の各画素の位置が示されている。また、これらの図では、説明を簡単にするため、イメージセンサ2の1行だけを記載し、一次元方向だけに演算を限定して示す。上部に記載したのは各色フィルタの配列であり、hはh画素、kはk画素、各画素の括弧( )内は画素位置を示す座標である。また、曲線aはk信号の真値であり、曲線bはh信号の真値である。曲線a、b上において、黒丸印(●)で示した箇所は、イメージセンサ2から得られたk信号及びh信号の画素信号値である。曲線c、dはそれぞれk信号、h信号のLPF値であり、曲線e,fはそれぞれk信号、h信号のHPF値である。これら図を参照して、画素位置(i,j)におけるk信号の画素補間を行う方法を具体的に述べる。
図17は、k信号とh信号との間に正の相関がある場合を示し、図18及び図19は、k信号とh信号との間に相関がない場合を示し、図20は、k信号とh信号との間に負の相関がある場合を示す。
The meaning of the calculation formula shown in Formula (1) will be described with reference to FIGS. In these drawings, the color signal level in each pixel and the position of each pixel on the image sensor 2 are shown. In these drawings, for the sake of simplicity, only one line of the image sensor 2 is described, and the calculation is limited to one-dimensional direction. Described above is the arrangement of each color filter, where h is an h pixel, k is a k pixel, and parentheses () of each pixel are coordinates indicating the pixel position. Curve a is the true value of the k signal, and curve b is the true value of the h signal. On the curves a and b, black circles (●) indicate pixel signal values of the k signal and h signal obtained from the image sensor 2. Curves c and d are the LPF values of the k and h signals, respectively, and curves e and f are the HPF values of the k and h signals, respectively. With reference to these drawings, a method for performing pixel interpolation of the k signal at the pixel position (i, j) will be specifically described.
FIG. 17 shows a case where there is a positive correlation between the k signal and the h signal, FIG. 18 and FIG. 19 show a case where there is no correlation between the k signal and the h signal, and FIG. The case where there is a negative correlation between the signal and the h signal is shown.

最初に図17を参照してk信号とh信号との間に正の相関がある場合について説明する。画素位置(i,j)における曲線cとdの差が低周波数成分の差(kLPF−hLPF)に比例する値r(kLPF−hLPF)となる。また、画素位置(i,j)における曲線eとfの差が高周波成分の差(kHPF−hHPF)となる。曲線eとfで示されるHPF値はk信号とh信号の変化が同様の場合、同じ値となるため重なって描写されており、高周波成分の差(kHPF−hHPF)は“0”である。
従来技術によるバイリニア方法では、画素位置(i−1,j)と(i+1,j)におけるk信号を用いてその平均値を画素位置(i,j)におけるk信号とする。バイリニア方法によって補間された信号レベルを、図17において、白三角印(△)で示したが、求められるべき真値との間に補間誤差が生じている。
本実施の形態による補間方法では、画素位置(i,j)において既知の値h(i,j)に高周波成分の差(kHPF−hHPF)に係数β、qを乗算(係数β、qをともに乗算)したものと低周波数成分の差(kLPF−hLPF)に係数rを乗算したものとを加算するが、図17に示すようにk信号とh信号との間に相関がある場合、高周波成分の差は略“0”であり、結局、画素位置(i,j)において既知の値h(i,j)に、低周波数成分の差(kLPF−hLPF)に係数rを乗じた後加算したものが、補間信号k(i,j)となる。この補間信号k(i,j)を図17に白丸印(○)にて示す。真値に対して精度良く画素補間が実現できていることが分かる。このように、本実施の形態により、色信号間の相関が大きい場合にも精度良く画素補間を行うことができる。
First, the case where there is a positive correlation between the k signal and the h signal will be described with reference to FIG. The difference between the curves c and d at the pixel position (i, j) is a value r (kLPF-hLPF) proportional to the difference between the low frequency components (kLPF-hLPF). Further, the difference between the curves e and f at the pixel position (i, j) is the difference between the high frequency components (kHPF−hHPF). The HPF values shown by the curves e and f are the same value when the changes of the k signal and the h signal are the same, so that they are overlapped and the high frequency component difference (kHPF−hHPF) is “0”.
In the bilinear method according to the prior art, the k signal at the pixel position (i−1, j) and (i + 1, j) is used, and the average value is set as the k signal at the pixel position (i, j). The signal level interpolated by the bilinear method is indicated by white triangles (Δ) in FIG. 17, but an interpolation error has occurred with the true value to be obtained.
In the interpolation method according to the present embodiment, the known value h (i, j) at the pixel position (i, j) is multiplied by the high-frequency component difference (kHPF−hHPF) by the coefficients β and q (both the coefficients β and q are combined). Multiplication) and the difference between the low frequency components (kLPF−hLPF) multiplied by the coefficient r are added, and when there is a correlation between the k signal and the h signal as shown in FIG. The difference is substantially “0”. After all, the known value h (i, j) at the pixel position (i, j) is added after the low frequency component difference (kLPF−hLPF) is multiplied by the coefficient r. That is the interpolation signal k (i, j). This interpolation signal k (i, j) is indicated by white circles (◯) in FIG. It can be seen that pixel interpolation is realized with high accuracy for the true value. Thus, according to the present embodiment, pixel interpolation can be performed with high accuracy even when the correlation between color signals is large.

次に色信号間に相関が無い場合について説明する。図18と図19に各画素における色信号レベルとイメージセンサ2上の各画素の位置を示す。図18及び図19に示した信号ではk信号は一定であり、k信号とh信号の変化に相関が無い。   Next, a case where there is no correlation between color signals will be described. 18 and 19 show the color signal level in each pixel and the position of each pixel on the image sensor 2. In the signals shown in FIGS. 18 and 19, the k signal is constant, and there is no correlation between changes in the k signal and the h signal.

まず、図18を参照して説明する。図18の例では、k信号に変化が無いため曲線eで示されるk信号のHPF値kHPFは“0”である。上記特許文献1(特開2001−197512号公報)に開示された方法による色の相関変化だけを用いた補間は、h(i,j)の信号に(kLPF−hLPF)に比例した値を加算することに相当する。
この場合、画素補間された信号レベルは、図18において、白四角印(□)で示す信号レベルとなる。白四角印に示す信号レベルはk信号の真値から離れた位置の値となるため補間誤差が生じていることが分かる。これは、画素位置(i,j)における補間対象のk信号は、参照とするh信号との間に相関が無いためである。
一方、本実施の形態による画素補間方法では、画素位置(i,j)におけるh信号h(i,j)に(kLPF−hLPF)に係数rを掛けたものを加算し、さらに(kHPF−hHPF)に係数β、qを掛けたものを加算する。kHPFは“0”であるため、画素位置(i,j)における(kHPF−hHPF)は負の値となる。よって、本実施の形態による補間方法では補間された信号レベルは白丸印(○)の位置となり、k信号の真値に対して精度高く補間される。本実施の形態ではk信号とh信号との信号変化にどれだけ相関が無いかは、(kHPF−hHPF)の値として求められることとなる。(kHPF−hHPF)に基いて定められた値、具体的には(kHPF−hHPF)に係数β、qを掛けたものを「非相関値」と呼ぶのはこのためである。一方、低周波数成分の差(kLPF−hLPF)は、相関の度合いを表し、相関の度合いが高いほど一定の値により近くなる。よって、(kLPF−hLPF)に係数rを掛けたものと(kHPF−hHPF)に係数β、qを掛けたものとがh(i,j)に加算されることにより信号間に相関が無い場合でも精度高く画素補間を行うことができる。
First, a description will be given with reference to FIG. In the example of FIG. 18, since there is no change in the k signal, the HPF value kHPF of the k signal indicated by the curve e is “0”. Interpolation using only the color correlation change by the method disclosed in Patent Document 1 (Japanese Patent Laid-Open No. 2001-197512) adds a value proportional to (kLPF-hLPF) to the signal of h (i, j). It corresponds to doing.
In this case, the pixel-interpolated signal level is a signal level indicated by a white square mark (□) in FIG. Since the signal level indicated by the white square mark is a value at a position away from the true value of the k signal, it can be seen that an interpolation error has occurred. This is because the k signal to be interpolated at the pixel position (i, j) has no correlation with the reference h signal.
On the other hand, in the pixel interpolation method according to the present embodiment, h signal h (i, j) at pixel position (i, j) is added to (kLPF-hLPF) multiplied by coefficient r, and (kHPF-hHPF) is further added. ) Multiplied by coefficients β and q. Since kHPF is “0”, (kHPF−hHPF) at the pixel position (i, j) is a negative value. Therefore, in the interpolation method according to the present embodiment, the interpolated signal level is the position of the white circle (o), and is interpolated with high accuracy with respect to the true value of the k signal. In the present embodiment, how much the signal change between the k signal and the h signal is not correlated is determined as a value of (kHPF−hHPF). For this reason, a value determined based on (kHPF−hHPF), specifically, a value obtained by multiplying (kHPF−hHPF) by coefficients β and q is called “non-correlated value”. On the other hand, the difference between the low frequency components (kLPF−hLPF) represents the degree of correlation, and the closer the degree of correlation, the closer to a certain value. Therefore, when (kLPF−hLPF) multiplied by coefficient r and (kHPF−hHPF) multiplied by coefficients β and q are added to h (i, j), there is no correlation between signals. However, pixel interpolation can be performed with high accuracy.

図19には図18とは逆にk信号が変化して、h信号に変化が無い、2つの色信号間に相関が無い別の例を示す。上記特許文献1(特開2001−197512号公報)に開示された方法による色の相関変化だけを用いた補間は、h(i,j)の信号に(kLPF−hLPF)の信号レベルを加算することに相当する。
この場合、画素補間された信号レベルを図19において白四角印(□)で示す信号レベルとなる。白四角印に示す信号レベルはk信号の真値から離れた位置の値となるため補間誤差が生じていることが分かる。
一方、本実施の形態による画素補間方法では、画素位置(i,j)におけるh信号h(i,j)に(kLPF−hLPF)に係数rを掛けたものを加算し、さらに(kHPF−hHPF)に係数β、qを掛けたものを加算する。hHPFは“0”であるため、画素位置(i,j)における(kHPF−hHPF)は正の値となる。よって、本実施の形態による補間方法では補間された信号レベルは白丸印(○)の位置となり、k信号の真値に対して精度高く補間される。本実施の形態では、(kLPF−hLPF)に係数rを掛けたものと(kHPF−hHPF)に係数β、qを掛けたものがh(i,j)に加算されることにより図19に示す信号間に相関が無い場合においても精度高く画素補間を行うことができる。
In contrast to FIG. 18, FIG. 19 shows another example in which the k signal changes and the h signal does not change and there is no correlation between the two color signals. Interpolation using only the color correlation change by the method disclosed in Patent Document 1 (Japanese Patent Laid-Open No. 2001-197512) adds the signal level of (kLPF-hLPF) to the signal of h (i, j). It corresponds to that.
In this case, the pixel-interpolated signal level is a signal level indicated by a white square mark (□) in FIG. Since the signal level indicated by the white square mark is a value at a position away from the true value of the k signal, it can be seen that an interpolation error has occurred.
On the other hand, in the pixel interpolation method according to the present embodiment, h signal h (i, j) at pixel position (i, j) is added to (kLPF-hLPF) multiplied by coefficient r, and (kHPF-hHPF) is further added. ) Multiplied by coefficients β and q. Since hHPF is “0”, (kHPF−hHPF) at the pixel position (i, j) is a positive value. Therefore, in the interpolation method according to the present embodiment, the interpolated signal level is the position of the white circle (o), and is interpolated with high accuracy with respect to the true value of the k signal. In the present embodiment, (kLPF−hLPF) multiplied by coefficient r and (kHPF−hHPF) multiplied by coefficients β and q are added to h (i, j) as shown in FIG. Even when there is no correlation between signals, pixel interpolation can be performed with high accuracy.

図18及び図19では色信号間に相関が無い場合について説明したが、次に色信号間に負の相関がある場合について説明する。図20にk信号とh信号との間に負の相関がある場合を示す。画素位置(i,j)における、曲線aと鎖線cの差Δ(a−c)と、曲線dと曲線bの差Δ(d−b)の和が、高周波成分の差(kHPF−hHPF)に比例する非相関値βq(kHPF−hHPF)に等しい。バイリニア補間方法による画素補間は白三角印(△)で示す信号レベルであり図17と同様に真値に対して補間誤差が生じている。また、負の相関関係である場合、上記特許文献1(特開2001−197512号公報)に開示された方法による色の相関変化だけを用いた画素補間では白四角印(□)で示すようにさらに補間誤差が拡大する。本実施の形態による補間方法では白丸印(○)で示すように精度高く画素補間が実現できている。
以上のように、色信号間に正の相関がある場合、相関が無い場合、負の相関となっている場合のいずれにおいても精度の高い画素補間を行うことができる。
18 and 19, the case where there is no correlation between the color signals has been described. Next, the case where there is a negative correlation between the color signals will be described. FIG. 20 shows a case where there is a negative correlation between the k signal and the h signal. The sum of the difference Δ (ac) between the curve a and the chain line c and the difference Δ (db) between the curve d and the curve b at the pixel position (i, j) is the difference between the high frequency components (kHPF−hHPF). Is equal to a non-correlation value βq (kHPF−hHPF) proportional to. Pixel interpolation by the bilinear interpolation method has a signal level indicated by a white triangle mark (Δ), and an interpolation error occurs with respect to a true value as in FIG. Further, in the case of a negative correlation, as indicated by a white square mark (□) in pixel interpolation using only a color correlation change by the method disclosed in Patent Document 1 (Japanese Patent Laid-Open No. 2001-197512). Furthermore, the interpolation error increases. In the interpolation method according to the present embodiment, pixel interpolation can be realized with high accuracy as indicated by white circles (◯).
As described above, highly accurate pixel interpolation can be performed in any case where there is a positive correlation between color signals, no correlation, or a negative correlation.

画素補間の演算処理について以下に具体的に説明する。図21に彩度係数算出手段9、非相関値算出手段12、演算手段10における補間値算出のための処理の手順をフローチャートで示す。フローチャートに記載するように、補間値の算出は、以下の6つの処理を含む。
ステップS1;R画素位置におけるG信号(GonR)を求めるための処理。
ステップS2;B画素位置におけるG信号(GonB)を求めるための処理。
ステップS3;G画素位置におけるR信号(RonG)を求めるための処理。
ステップS4;G画素位置におけるB信号(BonG)を求めるための処理。
ステップS5;B画素位置におけるR信号(RonB)を求めるための処理。
ステップS6;R画素位置におけるB信号(BonR)を求めるための処理。
これら6つの処理は、
「h色(h=R、G、又はB)の画素信号が存在する画素位置におけるk色(k=R、G、又はB、但しhはkとは異なる)の画素信号を求めるための処理」
と一般化して言うことができる。これらの6つの処理の各々は画面上(1フレーム内)のすべての画素位置について行われる。
The pixel interpolation calculation process will be specifically described below. FIG. 21 is a flowchart showing a procedure of processing for calculating an interpolation value in the saturation coefficient calculation means 9, the decorrelation value calculation means 12, and the calculation means 10. As described in the flowchart, the calculation of the interpolation value includes the following six processes.
Step S1: Processing for obtaining a G signal (GonR) at the R pixel position.
Step S2: A process for obtaining a G signal (GonB) at the B pixel position.
Step S3: Processing for obtaining an R signal (RonG) at the G pixel position.
Step S4: Processing for obtaining a B signal (BonG) at the G pixel position.
Step S5: Processing for obtaining the R signal (RonB) at the B pixel position.
Step S6: Processing for obtaining the B signal (BonR) at the R pixel position.
These six processes are
“Process for obtaining a pixel signal of k color (k = R, G, or B, where h is different from k) at a pixel position where a pixel signal of h color (h = R, G, or B) exists "
It can be said in general. Each of these six processes is performed for all pixel positions on the screen (within one frame).

ステップS1乃至S6の処理は、例えば、図示しない制御手段(図12の制御手段30a、図13の制御手段30bはその一部として構成することもできる)により、彩度係数算出手段9、非相関値算出手段12、演算手段10を順次動作させることにより、実行される。   The processing of steps S1 to S6 is performed by, for example, the saturation coefficient calculating unit 9 and the non-correlation by a control unit (not shown) (the control unit 30a in FIG. 12 and the control unit 30b in FIG. This is executed by sequentially operating the value calculation means 12 and the calculation means 10.

上記の6つの処理がすべて終わったときに、1画面上のすべての画素位置のすべての画素における不足した色の画素信号が揃う。   When all of the above six processes are completed, pixel signals of insufficient colors are gathered at all pixels at all pixel positions on one screen.

まず、ステップS1の演算処理について説明する。図4において、G信号が予め存在しない(値が未知の)画素の座標(i,j)に着目する。座標(i,j)のG信号のLPF値GLPFは、例えば次式(4)にて算出される。   First, the calculation process of step S1 will be described. In FIG. 4, attention is focused on the coordinates (i, j) of a pixel in which the G signal does not exist in advance (value is unknown). The LPF value GLPF of the G signal at coordinates (i, j) is calculated by the following equation (4), for example.

GLPF(i,j)=[{G(i−3,j)+G(i−1,j)+G(i+1,j)+G(i+3,j)}/4
+{G(i,j−3)+G(i,j−1)+G(i,j+1)+G(i,j+3)}/4]/2
…(4)
GLPF (i, j) = [{G (i−3, j) + G (i−1, j) + G (i + 1, j) + G (i + 3, j)} / 4
+ {G (i, j-3) + G (i, j-1) + G (i, j + 1) + G (i, j + 3)} / 4] / 2
... (4)

各信号の括弧( )内は画素の座標を意味している。   The parentheses () in each signal mean the pixel coordinates.

G信号が予め存在している画素位置(i+1,j)のG信号のLPF値GLPFは、次式(5)にて算出される。   The LPF value GLPF of the G signal at the pixel position (i + 1, j) where the G signal exists in advance is calculated by the following equation (5).

GLPF(i+1,j)=[{G(i−3,j)/8+G(i−1,j)/4+G(i+1,j)/4+G(i+3,j)/4+G(i+5,j)/8}
+{G(i+1,j−4)/8+G(i+1,j−2)/4+G(i+1,j)/4+G(i+1,j+2)/4+G(i+1,j+4)/8}]/2
…(5)
GLPF (i + 1, j) = [{G (i-3, j) / 8 + G (i-1, j) / 4 + G (i + 1, j) / 4 + G (i + 3, j) / 4 + G (i + 5, j) / 8}
+ {G (i + 1, j-4) / 8 + G (i + 1, j-2) / 4 + G (i + 1, j) / 4 + G (i + 1, j + 2) / 4 + G (i + 1, j + 4) / 8}] / 2
... (5)

G画素の配列はいずれも同じ画素間隔の繰り返しであるため、上記式(4)及び式(5)にてG信号のLPF値を算出することができる。G信号のLPF値の演算は図1のLPF8gによって算出され、演算手段10に入力される。   Since the arrangement of G pixels is a repetition of the same pixel interval, the LPF value of the G signal can be calculated by the above equations (4) and (5). The LPF value of the G signal is calculated by the LPF 8g shown in FIG.

また、G信号が予め存在しない画素位置(i,j)のG信号のHPF値GHPFは、次式(6)にて算出される。   Further, the HPF value GHPF of the G signal at the pixel position (i, j) where the G signal does not exist in advance is calculated by the following equation (6).

GHPF(i,j)=[{−G(i−3,j)+G(i−1,j)+G(i+1,j)−G(i+3,j)}+{−G(i,j−3)+G(i,j−1)+G(i,j+1)−G(i,j+3)}]/2
…(6)
GHPF (i, j) = [{− G (i−3, j) + G (i−1, j) + G (i + 1, j) −G (i + 3, j)} + {− G (i, j−3) ) + G (i, j-1) + G (i, j + 1) -G (i, j + 3)}] / 2
... (6)

G信号が予め存在している画素位置(i+1,j)のG信号のHPF値GHPFは、次式(7)にて算出される。   The HPF value GHPF of the G signal at the pixel position (i + 1, j) where the G signal is present in advance is calculated by the following equation (7).

GHPF(i+1,j)=[{−G(i−3,j)/4−G(i−1,j)+2.5G(i+1,j)−G(i+3,j)−G(i+5,j)/4}+{−G(i+1,j−4)/4−G(i+1,j−2)+2.5G(i+1,j)−G(i+1,j+2)−G(i+1,j+4)/4}]/2
…(7)
GHPF (i + 1, j) = [{− G (i−3, j) / 4−G (i−1, j) + 2.5G (i + 1, j) −G (i + 3, j) −G (i + 5, j) ) / 4} + {− G (i + 1, j−4) / 4−G (i + 1, j−2) + 2.5G (i + 1, j) −G (i + 1, j + 2) −G (i + 1, j + 4) / 4 }] / 2
... (7)

G画素の配列はいずれも同じ画素間隔の繰り返しであるため、上記式(6)及び式(7)にてG信号のHPF値を算出することができる。G信号のHPF値の演算は図1のHPF7gによって算出され、非相関値算出手段12に入力される。   Since the arrangement of the G pixels is a repetition of the same pixel interval, the HPF value of the G signal can be calculated by the above equations (6) and (7). The calculation of the HPF value of the G signal is calculated by the HPF 7 g in FIG. 1 and input to the decorrelation value calculation means 12.

R信号のLPF値、HPF値は次式によって算出される。まずどの画素にもR信号が存在しないj行目においては、上下の行から値を算出する。画素の座標(i,j)のR信号のLPF値RLPFは、次式(8)にて算出される。   The LPF value and HPF value of the R signal are calculated by the following equations. First, in the j-th row where no R signal exists in any pixel, values are calculated from the upper and lower rows. The LPF value RLPF of the R signal at the pixel coordinates (i, j) is calculated by the following equation (8).

RLPF(i,j)=[[{R(i−3,j−1)+R(i−3,j+1)}/2+{R(i−1,j−1)+R(i−1,j+1)}/2+{R(i+1,j−1)+R(i+1,j+1)}/2+{R(i+3,j−1)+R(i+3,j+1)}/2]/4
+[{R(i−1,j−3)+R(i+1,j−3)}/2+{R(i−1,j−1)+R(i+1,j−1)}/2+{R(i−1,j+1)+R(i+1,j+1)}/2+{R(i−1,j+3)+R(i+1,j+3)}/2]/4]/2
…(8)
RLPF (i, j) = [[{R (i-3, j-1) + R (i-3, j + 1)} / 2+ {R (i-1, j-1) + R (i-1, j + 1) } / 2 + {R (i + 1, j-1) + R (i + 1, j + 1)} / 2+ {R (i + 3, j-1) + R (i + 3, j + 1)} / 2] / 4
+ [{R (i-1, j-3) + R (i + 1, j-3)} / 2+ {R (i-1, j-1) + R (i + 1, j-1)} / 2+ {R (i −1, j + 1) + R (i + 1, j + 1)} / 2+ {R (i−1, j + 3) + R (i + 1, j + 3)} / 2] / 4] / 2
(8)

座標(i+1,j)のR信号のLPF値RLPFは、次式(9)にて算出される。   The LPF value RLPF of the R signal at the coordinates (i + 1, j) is calculated by the following equation (9).

RLPF(i+1,j)=[[{R(i−1,j−1)+R(i−1,j+1)}/2+{R(i+1,j−1)+R(i+1,j+1)}/2+{R(i+3,j−1)+R(i+3,j+1)}/2]/3
+{R(i+1,j−3)+R(i+1,j−1)+R(i+1,j+1)+R(i+1,j+3)}/4]/2
…(9)
RLPF (i + 1, j) = [[{R (i-1, j-1) + R (i-1, j + 1)} / 2+ {R (i + 1, j-1) + R (i + 1, j + 1)} / 2+ { R (i + 3, j-1) + R (i + 3, j + 1)} / 2] / 3
+ {R (i + 1, j-3) + R (i + 1, j-1) + R (i + 1, j + 1) + R (i + 1, j + 3)} / 4] / 2
... (9)

一方、R信号が予め存在する行、例えばj+1行の画素位置(i,j+1)のR信号のLPF値RLPFは、次式(10)にて算出される。   On the other hand, the LPF value RLPF of the R signal at the pixel position (i, j + 1) in the row where the R signal exists in advance, for example, j + 1 row, is calculated by the following equation (10).

RLPF(i,j+1)=[{R(i−3,j+1)+R(i−1,j+1)+R(i+1,j+1)+R(i+3,j+1)}/4
+[{R(i−1,j−1)+R(i+1,j−1)}/2+{R(i−1,j+1)+R(i+1,j+1)}/2+{R(i−1,j+3)+R(i+1,j+3)}/2]/3]/2
…(10)
RLPF (i, j + 1) = [{R (i-3, j + 1) + R (i-1, j + 1) + R (i + 1, j + 1) + R (i + 3, j + 1)} / 4
+ [{R (i-1, j-1) + R (i + 1, j-1)} / 2+ {R (i-1, j + 1) + R (i + 1, j + 1)} / 2+ {R (i-1, j + 3) ) + R (i + 1, j + 3)} / 2] / 3] / 2
(10)

さらに、R信号が予め存在する行、例えばj−1行の画素位置(i+1,j+1)のR信号のLPF値RLPFは、次式(11)にて算出される。   Furthermore, the LPF value RLPF of the R signal at the pixel position (i + 1, j + 1) in the row where the R signal exists in advance, for example, j−1 row, is calculated by the following equation (11).

RLPF(i+1,j+1)=[R(i−3,j+1)/8+R(i−1,j+1)/4+R(i+1,j+1)/4+R(i+3,j+1)/4+R(i+5,j+1)/8 +R(i+1,j−3)/8+R(i+1,j−1)/4+R(i+1,j+1)/4+R(i+1,j+3)/4+R(i+1,j+5)/8]/2
…(11)
RLPF (i + 1, j + 1) = [R (i−3, j + 1) / 8 + R (i−1, j + 1) / 4 + R (i + 1, j + 1) / 4 + R (i + 3, j + 1) / 4 + R (i + 5, j + 1) / 8 + R ( i + 1, j-3) / 8 + R (i + 1, j-1) / 4 + R (i + 1, j + 1) / 4 + R (i + 1, j + 3) / 4 + R (i + 1, j + 5) / 8] / 2
... (11)

R画素の配列は(i,j)、(i+1,j)、(i,j+1)、(i+1,j+1)の繰り返しであるため、上記式(8)から式(11)にてR信号のLPF値を算出することができる。R信号のLPF値の演算は図1のLPF8rによって算出され、演算手段10に入力される。   Since the array of R pixels is a repetition of (i, j), (i + 1, j), (i, j + 1), (i + 1, j + 1), the LPF of the R signal is expressed by the above equations (8) to (11). A value can be calculated. The LPF value of the R signal is calculated by the LPF 8r shown in FIG.

また、座標(i,j)におけるR信号のHPF値RHPFは、次式(12)にて算出される。   Further, the HPF value RHPF of the R signal at the coordinates (i, j) is calculated by the following equation (12).

RHPF(i,j)=[−{R(i−3,j−1)+R(i−3,j+1)}/2+{R(i−1,j−1)+R(i−1,j+1)}/2+{R(i+1,j−1)+R(i+1,j+1)}/2−{R(i+3,j−1)+R(i+3,j+1)}/2
−{R(i−1,j−3)+R(i+1,j−3)}/2+{R(i−1,j−1)+R(i+1,j−1)}/2+{R(i−1,j+1)+R(i+1,j+1)}/2−{R(i−1,j+3)+R(i+1,j+3)}/2]/2
…(12)
RHPF (i, j) = [− {R (i−3, j−1) + R (i−3, j + 1)} / 2+ {R (i−1, j−1) + R (i−1, j + 1) } / 2 + {R (i + 1, j-1) + R (i + 1, j + 1)} / 2- {R (i + 3, j-1) + R (i + 3, j + 1)} / 2
− {R (i−1, j−3) + R (i + 1, j−3)} / 2+ {R (i−1, j−1) + R (i + 1, j−1)} / 2+ {R (i− 1, j + 1) + R (i + 1, j + 1)} / 2- {R (i-1, j + 3) + R (i + 1, j + 3)} / 2] / 2
(12)

座標(i+1,j)におけるR信号のHPF値RHPFは、次式(13)にて算出される。   The HPF value RHPF of the R signal at the coordinates (i + 1, j) is calculated by the following equation (13).

RHPF(i+1,j)=[[−{R(i−3,j−1)+R(i−3,j+1)}/2/4−{R(i−1,j−1)+R(i−1,j+1)}/2+2.5{R(i+1,j−1)+R(i+1,j+1)}/2−{R(i+3,j−1)+R(i+3,j+1)}/2−{R(i+5,j−1)+R(i+5,j+1)}/2/4]
+[−R(i+1,j−3)+R(i+1,j−1)+R(i+1,j+1)−R(i+1,j+3)]]/2
…(13)
RHPF (i + 1, j) = [[-{R (i-3, j-1) + R (i-3, j + 1)} / 2/4 {R (i-1, j-1) + R (i- 1, j + 1)} / 2 + 2.5 {R (i + 1, j-1) + R (i + 1, j + 1)} / 2- {R (i + 3, j-1) + R (i + 3, j + 1)} / 2- {R ( i + 5, j-1) + R (i + 5, j + 1)} / 2/4]
+ [-R (i + 1, j-3) + R (i + 1, j-1) + R (i + 1, j + 1) -R (i + 1, j + 3)]] / 2
... (13)

一方、R信号が予め存在する行、例えばj+1行の画素位置(i,j+1)のR信号のHPF値RHPFは、次式(14)にて算出される。   On the other hand, the HPF value RHPF of the R signal at the pixel position (i, j + 1) in the row where the R signal exists in advance, for example, j + 1 row, is calculated by the following equation (14).

RHPF(i,j+1)=[{−R(i−3,j+1)+R(i−1,j+1)+R(i+1,j+1)−R(i+3,j+1)}
+[−{R(i−1,j−3)+R(i+1,j−3)}/2/4−{R(i−1,j−1)+R(i+1,j−1)}/2+2.5{R(i−1,j+1)+R(i+1,j+1)}/2−{R(i−1,j+3)+R(i+1,j+3)}/2−{R(i−1,j+5)+R(i+1,j+5)}/2/4]]/2
…(14)
RHPF (i, j + 1) = [{− R (i−3, j + 1) + R (i−1, j + 1) + R (i + 1, j + 1) −R (i + 3, j + 1)}
+ [-{R (i-1, j-3) + R (i + 1, j-3)} / 2/4 {R (i-1, j-1) + R (i + 1, j-1)} / 2 + 2 .5 {R (i-1, j + 1) + R (i + 1, j + 1)} / 2- {R (i-1, j + 3) + R (i + 1, j + 3)} / 2- {R (i-1, j + 5) + R (I + 1, j + 5)} / 2/4]] / 2
... (14)

さらに、R信号が予め存在する行、例えばj−1行の画素位置(i+1,j+1)のR信号のHPF値RHPFは、次式(15)にて算出される。   Further, the HPF value RHPF of the R signal at the pixel position (i + 1, j + 1) in the row where the R signal exists in advance, for example, j−1 row is calculated by the following equation (15).

RHPF(i+1,j+1)=[{−R(i−3,j+1)/4−R(i−1,j+1)+2.5R(i+1,j+1)−R(i+3,j+1)−R(i+5,j+1)/4}
+{−R(i+1,j−3)/4−R(i+1,j−1)+2.5R(i+1,j+1)−R(i+1,j+3)−R(i+1,j+5)/4}]/2
…(15)
RHPF (i + 1, j + 1) = [{− R (i−3, j + 1) / 4−R (i−1, j + 1) + 2.5R (i + 1, j + 1) −R (i + 3, j + 1) −R (i + 5, j + 1) ) / 4}
+ {-R (i + 1, j-3) / 4-R (i + 1, j-1) + 2.5R (i + 1, j + 1) -R (i + 1, j + 3) -R (i + 1, j + 5) / 4}] / 2
... (15)

R画素の配列は(i,j)、(i+1,j)、(i,j+1)、(i+1,j+1)の繰り返しであるため、上記式(12)から式(15)にてR信号のHPF値も算出することができる。R信号のHPF値の演算は図1のHPF7rによって算出され、非相関値算出手段12に入力される。   Since the array of R pixels is a repetition of (i, j), (i + 1, j), (i, j + 1), (i + 1, j + 1), the HPF of the R signal is obtained from the above equations (12) to (15). A value can also be calculated. The calculation of the HPF value of the R signal is calculated by the HPF 7r shown in FIG.

最後に、B信号のLPF値、HPF値であるが、B画素の配列はR画素の配列と座標値が異なるだけであり、同様の配列をしている。よって、式(8)から式(15)に示したR信号のLPF、HPFの算出式と同様に、その座標を変えるだけで算出することができるためその詳細式は省略する。B信号のLPF値の演算は図1のLPF8bによって算出され、演算手段10に入力される。また、B信号のHPF値の演算は図1のHPF7bによって算出され、非相関値算出手段12に入力される。   Finally, regarding the LPF value and HPF value of the B signal, the arrangement of the B pixels is the same as the arrangement of the R pixels, except for the coordinate values. Therefore, similar to the formulas for calculating the LPF and HPF of the R signal shown in formulas (8) to (15), the detailed formulas are omitted because they can be calculated simply by changing their coordinates. The LPF value of the B signal is calculated by the LPF 8b shown in FIG. The calculation of the HPF value of the B signal is calculated by the HPF 7 b in FIG. 1 and input to the decorrelation value calculation means 12.

以上示したLPF及びHPFの算出式は式(1)に用いるための値を算出する式であるが、一例に過ぎず、例えば、LPF値の演算式及びHPF値の演算式において用いる画素数や係数は画像の大きさや解像度に応じて他の値を適切に設けても良い。   The formulas for calculating the LPF and HPF shown above are formulas for calculating values for use in the formula (1), but are merely examples. For example, the number of pixels used in the formula for calculating the LPF value and the formula for calculating the HPF value As the coefficient, other values may be appropriately provided according to the size and resolution of the image.

次に、彩度係数βを算出するための彩度cの算出方法について説明する。図2において、R信号が存在する画素の座標(i−1,j−1)に着目する。画素位置(i−1,j−1)における彩度cは、例えば次式(16)にて算出される。   Next, a method for calculating the saturation c for calculating the saturation coefficient β will be described. In FIG. 2, attention is focused on the coordinates (i-1, j-1) of the pixel where the R signal exists. The saturation c at the pixel position (i−1, j−1) is calculated by the following equation (16), for example.

R’=R(i−1,j−1)
G’=(G(i−1,j−2)+G(i−2,j−1)+G(i,j−1)+G(i−1,j))/4
B’=(B(i−2,j−2)+B(i,j−2)+B(i−2,j)+B(i,j))/4
c=|G’−R’|+|G’−B’|
…(16)
R ′ = R (i−1, j−1)
G ′ = (G (i−1, j−2) + G (i−2, j−1) + G (i, j−1) + G (i−1, j)) / 4
B ′ = (B (i−2, j−2) + B (i, j−2) + B (i−2, j) + B (i, j)) / 4
c = | G′−R ′ | + | G′−B ′ |
... (16)

B信号が存在している画素位置(i,j)における彩度cは、例えば次式(17)にて算出される。   The saturation c at the pixel position (i, j) where the B signal exists is calculated by the following equation (17), for example.

R’=(R(i−1,j−1)+R(i+1,j−1)+R(i−1,j+1)+R(i+1,j+1))/4
G’=(G(i,j−1)+G(i−1,j)+G(i+1,j)+G(i,j+1))/4
B’=B(i,j)
c=|G’−R’|+|G’−B’|
…(17)
R ′ = (R (i−1, j−1) + R (i + 1, j−1) + R (i−1, j + 1) + R (i + 1, j + 1)) / 4
G ′ = (G (i, j−1) + G (i−1, j) + G (i + 1, j) + G (i, j + 1)) / 4
B ′ = B (i, j)
c = | G′−R ′ | + | G′−B ′ |
... (17)

R信号とG信号が交互に並ぶ行にあり、G信号が存在している画素位置(i,j−1)における彩度cは、例えば次式(18)にて算出される。   The saturation c at the pixel position (i, j−1) where the R signal and the G signal are alternately arranged and where the G signal exists is calculated by the following equation (18), for example.

R’=(R(i−1,j−1)+R(i+1,j−1))/2
G’=(G(i−1,j−2)/4+G(i+1,j−2)/4+G(i,j−1)+G(i−1,j)/4+G(i+1,j)/4)/2
B’=(B(i,j−2)+B(i,j))/2
c=|G’−R’|+|G’−B’|
…(18)
R ′ = (R (i−1, j−1) + R (i + 1, j−1)) / 2
G ′ = (G (i−1, j−2) / 4 + G (i + 1, j−2) / 4 + G (i, j−1) + G (i−1, j) / 4 + G (i + 1, j) / 4) / 2
B ′ = (B (i, j−2) + B (i, j)) / 2
c = | G′−R ′ | + | G′−B ′ |
... (18)

B信号とG信号が交互に並ぶ行にあり、G信号が存在している画素位置(i−1,j)における彩度cは、例えば次式(19)にて算出される。   The saturation c at the pixel position (i−1, j) where the B signal and the G signal are alternately arranged and where the G signal exists is calculated by the following equation (19), for example.

R’=(R(i−1,j−1)+R(i―1,j+1))/2
G’=(G(i−2,j−1)/4+G(i,j−1)/4+G(i−1,j)+G(i−2,j+1)/4+G(i,j+1)/4)/2
B’=(B(i−2,j)+B(i,j))/2
c=|G’−R’|+|G’−B’|
…(19)
R ′ = (R (i−1, j−1) + R (i−1, j + 1)) / 2
G ′ = (G (i−2, j−1) / 4 + G (i, j−1) / 4 + G (i−1, j) + G (i−2, j + 1) / 4 + G (i, j + 1) / 4) / 2
B ′ = (B (i−2, j) + B (i, j)) / 2
c = | G′−R ′ | + | G′−B ′ |
... (19)

各画素の配列はいずれも同じ画素間隔の繰り返しであるため、上記式(16)から式(19)にて全画素位置における彩度cを算出することができる。彩度cが求まったら、例えば式(2b)に基づいて彩度係数βを算出する。このようにして図1の彩度係数算出手段9によって算出された彩度係数βは、非相関値算出手段12に入力される。   Since the arrangement of each pixel is repeated at the same pixel interval, the saturation c at all pixel positions can be calculated by the above equations (16) to (19). When the saturation c is obtained, the saturation coefficient β is calculated based on, for example, the equation (2b). Thus, the saturation coefficient β calculated by the saturation coefficient calculation means 9 of FIG. 1 is input to the decorrelation value calculation means 12.

以上の彩度cの算出式は一例に過ぎず、用いる画素数や係数は画像の大きさや解像度に応じて他の値を適切に設けても良い。また、予め存在している画素信号のみ用いて彩度cを算出したが、補間により算出された画素信号を用いて算出しても良い。   The above equation for calculating the saturation c is merely an example, and the number of pixels and coefficients used may be appropriately set according to the size and resolution of the image. Further, the saturation c is calculated using only pixel signals that exist in advance, but may be calculated using pixel signals calculated by interpolation.

上述した式(4)から式(19)により、R,G,B信号の画像全ての画素位置に対するLPF値、HPF値及び彩度係数βが求められる。ステップS1ではR画素の位置における欠落したG信号を算出する。R画素の位置におけるG信号は式(1)に従い次式(20)にて算出される。R画素は(i+n,j+m)(n,mは奇数)の位置に存在するため、これに伴い式(1)とは座標値が異なるものとなる。   The LPF value, the HPF value, and the saturation coefficient β for all the pixel positions of the R, G, and B signal images are obtained by the above-described equations (4) to (19). In step S1, the missing G signal at the position of the R pixel is calculated. The G signal at the position of the R pixel is calculated by the following equation (20) according to the equation (1). Since the R pixel exists at a position of (i + n, j + m) (n and m are odd numbers), the coordinate value is different from the equation (1).

G(i+n,j+m)={R(i+n,j+m)+βq(GHPF(i+n,j+m)−RHPF(i+n,j+m))}+r(GLPF(i+n,j+m)−RLPF(i+n,j+m))
…(20)
G (i + n, j + m) = {R (i + n, j + m) + βq (GHPF (i + n, j + m) −RHPF (i + n, j + m))} + r (GLPF (i + n, j + m) −RLPF (i + n, j + m))
... (20)

式(20)にて示したGHPF,GLPF,RHPF,RLPF,βは上述した式(4)から式(19)にて算出したHPF値,LPF値及び彩度係数βである。定数q、rは画像が最適に補間されるように予め定めておけばよい。例えば、q=0.25、r=1で良好に画素補間を行うことができるが、この値に限定されるものではない。図22は、式(20)による補間の結果得られたG信号grをそれぞれ対応するR画素位置に2次元的に示す。   GHPF, GLPF, RHPF, RLPF, and β shown in equation (20) are the HPF value, LPF value, and saturation coefficient β calculated in equations (4) to (19). The constants q and r may be determined in advance so that the image is optimally interpolated. For example, pixel interpolation can be performed satisfactorily with q = 0.25 and r = 1, but is not limited to this value. FIG. 22 two-dimensionally shows the G signal gr obtained as a result of interpolation according to Expression (20) at the corresponding R pixel position.

次に、ステップS2の演算処理に移る。ステップS2はB画素の位置において欠落したG信号を補間する。B画素の位置におけるG信号は式(1)に従い次式(21)にて算出される。B画素は(i+s,j+t)(s,tは偶数)の位置に存在するため、これに伴い式(1)とは座標値が異なるものとなる。   Next, the processing proceeds to step S2. Step S2 interpolates the missing G signal at the B pixel position. The G signal at the position of the B pixel is calculated by the following equation (21) according to the equation (1). Since the B pixel exists at the position (i + s, j + t) (where s and t are even numbers), the coordinate value differs from that of the equation (1).

G(i+s,j+t)={B(i+s,j+t)+βq(GHPF(i+s,j+t)−BHPF(i+s,j+t))}+r(GLPF(i+s,j+t)−BLPF(i+s,j+t))
…(21)
G (i + s, j + t) = {B (i + s, j + t) + βq (GHPF (i + s, j + t) −BHPF (i + s, j + t))} + r (GLPF (i + s, j + t) −BLPF (i + s, j + t))
... (21)

図23は、式(21)による補間の結果得られたG信号gbをそれぞれ対応するB画素位置に2次元的に示す。図23には、式(20)による補間の結果grも示されている。
式(20)による、R画素位置のG信号の補間、及び式(21)による、B画素位置におけるG信号の補間により、全画素位置におけるG信号が得られる。
FIG. 23 two-dimensionally shows the G signal gb obtained as a result of the interpolation by the equation (21) at the corresponding B pixel position. FIG. 23 also shows the result gr of the interpolation by equation (20).
The G signal at all pixel positions is obtained by the interpolation of the G signal at the R pixel position according to Expression (20) and the interpolation of the G signal at the B pixel position according to Expression (21).

次に、ステップS3の演算処理に移る。ステップS3はG画素の位置において欠落したR信号を補間する。G画素の位置におけるR信号は式(1)に従い次式(22)、式(23)にて算出される。G画素は(i+s,j+m)(sは偶数、mは奇数)の位置と(i+n,j+t)(nは奇数、tは偶数)とに存在するため、これに伴い式(1)とは座標値が異なるものとなる。   Next, the processing proceeds to step S3. Step S3 interpolates the missing R signal at the G pixel position. The R signal at the position of the G pixel is calculated by the following equations (22) and (23) according to equation (1). Since the G pixel exists at the position (i + s, j + m) (s is an even number, m is an odd number) and (i + n, j + t) (n is an odd number, t is an even number), the equation (1) is coordinated accordingly. The value will be different.

R(i+s,j+m)={G(i+s,j+m)+βq(RHPF(i+s,j+m)−GHPF(i+s,j+m))}+r(RLPF(i+s,j+m)−GLPF(i+s,j+m))
…(22)
R (i + s, j + m) = {G (i + s, j + m) + βq (RHPF (i + s, j + m) −GHPF (i + s, j + m))} + r (RLPF (i + s, j + m) −GLPF (i + s, j + m))
... (22)

R(i+n,j+t)={G(i+n,j+t)+βq(RHPF(i+n,j+t)−GHPF(i+n,j+t))}+r(RLPF(i+n,j+t)−GLPF(i+n,j+t))
…(23)
R (i + n, j + t) = {G (i + n, j + t) + βq (RHPF (i + n, j + t) −GHPF (i + n, j + t))} + r (RLPF (i + n, j + t) −GLPF (i + n, j + t))
... (23)

図24は、式(22)及び式(23)による補間の結果得られたR信号rgをそれぞれ対応するG画素位置に2次元的に示す。
なお、式(22)及び式(23)においてもRLPF,RHPF,GLPF,GHPF,βは上述した式(4)から式(19)に示したLPF値,HPF値及び彩度係数βであるが、GLPF及びGHPFについては、ステップS1及びステップS2で算出した補間値gr、gbを用いて新たに算出してもよい。その場合、図1に示すように、演算手段10にて算出した補間値gr、gbを一度2次元メモリ6gへ出力し、一時的に記憶保持した後、再度HPF7g、LPF8gにて算出することとなる。
FIG. 24 two-dimensionally shows the R signal rg obtained as a result of interpolation according to the equations (22) and (23) at the corresponding G pixel positions.
In the equations (22) and (23), RLPF, RHPF, GLPF, GHPF, and β are the LPF value, HPF value, and saturation coefficient β shown in the equations (4) to (19). , GLPF and GHPF may be newly calculated using the interpolation values gr and gb calculated in step S1 and step S2. In this case, as shown in FIG. 1, the interpolation values gr and gb calculated by the calculation means 10 are once output to the two-dimensional memory 6g, temporarily stored and held, and then calculated again by the HPF 7g and LPF 8g. Become.

次に、ステップS4の演算処理に移る。ステップS4はG画素の位置において欠落したB信号を補間する。G画素の位置におけるB信号は式(1)に従い次式(24)、式(25)にて算出される。G画素は(i+s,j+m)(sは偶数、mは奇数)の位置と(i+n,j+t)(nは奇数、tは偶数)とに存在するため、これに伴い式(1)とは座標値が異なるものとなる。   Next, the processing proceeds to step S4. Step S4 interpolates the missing B signal at the position of the G pixel. The B signal at the position of the G pixel is calculated by the following equations (24) and (25) according to equation (1). Since the G pixel exists at the position (i + s, j + m) (s is an even number, m is an odd number) and (i + n, j + t) (n is an odd number, t is an even number), the equation (1) is coordinated accordingly. The value will be different.

B(i+s,j+m)={G(i+s,j+m)+βq(BHPF(i+s,j+m)−GHPF(i+s,j+m))}+r(BLPF(i+s,j+m)−GLPF(i+s,j+m))
…(24)
B (i + s, j + m) = {G (i + s, j + m) + βq (BHPF (i + s, j + m) −GHPF (i + s, j + m))} + r (BLPF (i + s, j + m) −GLPF (i + s, j + m))
... (24)

B(i+n,j+t)={G(i+n,j+t)+βq(BHPF(i+n,j+t)−GHPF(i+n,j+t))}+r(BLPF(i+n,j+t)−GLPF(i+n,j+t))
…(25)
B (i + n, j + t) = {G (i + n, j + t) + βq (BHPF (i + n, j + t) −GHPF (i + n, j + t))} + r (BLPF (i + n, j + t) −GLPF (i + n, j + t))
... (25)

図25は、式(24)及び式(25)による補間の結果得られたB信号bgをそれぞれ対応するG画素位置に2次元的に示す。
なお、本式(24)及び式(25)においてもBLPF,BHPF,GLPF,GHPF,βは上述したLPF値,HPF値及び彩度係数βであるが、GLPF及びGHPFについては、ステップS1及びステップS2で算出した補間値gr、gbを用いて新たに算出してもよい。
FIG. 25 two-dimensionally shows the B signal bg obtained as a result of interpolation according to the equations (24) and (25) at the corresponding G pixel positions.
In this equation (24) and equation (25), BLPF, BHPF, GLPF, GHPF, and β are the above-mentioned LPF value, HPF value, and saturation coefficient β, but for GLPF and GHPF, step S1 and step A new calculation may be performed using the interpolation values gr and gb calculated in S2.

次に、ステップS5の演算処理に移る。ステップS5はB画素の位置において欠落したR信号を補間する。B画素の位置におけるR信号は式(1)に従い次式(26)にて算出される。B画素は(i+s,j+t)(s,tは偶数)の位置に存在するため、これに伴い式(1)とは座標値が異なるものとなる。   Next, the processing proceeds to step S5. Step S5 interpolates the missing R signal at the B pixel position. The R signal at the position of the B pixel is calculated by the following equation (26) according to the equation (1). Since the B pixel exists at the position (i + s, j + t) (where s and t are even numbers), the coordinate value differs from that of the equation (1).

R(i+s,j+t)={G(i+s,j+t)+βq(RHPF(i+s,j+t)−GHPF(i+s,j+t))}+r(RLPF(i+s,j+t)−GLPF(i+s,j+t))
…(26)
R (i + s, j + t) = {G (i + s, j + t) + βq (RHPF (i + s, j + t) −GHPF (i + s, j + t))} + r (RLPF (i + s, j + t) −GLPF (i + s, j + t))
... (26)

図26は、式(26)による補間の結果得られたR信号rbをそれぞれ対応するB画素位置に2次元的に示す。図26にはまた、式(22)及び式(23)による補間の結果得られたR信号rgをそれぞれ対応するG画素位置に示されている。式(22)及び式(23)による補間と、式(26)による補間の結果、すべての画素のR信号が揃う。
なお、式(26)においてもRLPF,RHPF,GLPF,GHPF,βは上述したLPF値,HPF値及び彩度係数βであるが、GLPF及びGHPFについては、ステップS1及びステップS2で算出した補間値gr、gbを用いて新たに算出してもよい。また、RLPF、RHPFも、ステップS3にて算出した補間値rgを用いて新たに算出してよい。
FIG. 26 two-dimensionally shows the R signal rb obtained as a result of the interpolation by the equation (26) at the corresponding B pixel position. FIG. 26 also shows the R signal rg obtained as a result of the interpolation according to the equations (22) and (23) at the corresponding G pixel positions. As a result of the interpolation according to the equations (22) and (23) and the interpolation according to the equation (26), R signals of all the pixels are obtained.
In Equation (26), RLPF, RHPF, GLPF, GHPF, and β are the above-described LPF value, HPF value, and saturation coefficient β. For GLPF and GHPF, the interpolation values calculated in steps S1 and S2 are used. You may newly calculate using gr and gb. Also, RLPF and RHPF may be newly calculated using the interpolation value rg calculated in step S3.

次に、ステップS6の演算処理に移る。ステップS6はR画素の位置において欠落したB信号を補間する。R画素の位置におけるB信号は式(1)に従い次式(27)にて算出される。R画素は(i+n,j+m)(n,mは奇数)の位置に存在するため、これに伴い式(1)とは座標値が異なるものとなる。   Next, the processing proceeds to step S6. Step S6 interpolates the missing B signal at the position of the R pixel. The B signal at the position of the R pixel is calculated by the following equation (27) according to the equation (1). Since the R pixel exists at a position of (i + n, j + m) (n and m are odd numbers), the coordinate value is different from the equation (1).

B(i+n,j+m)={G(i+n,j+m)+βq(BHPF(i+n,j+m)−GHPF(i+n,j+m))}+r(BLPF(i+n,j+m)−GLPF(i+n,j+m))
…(27)
B (i + n, j + m) = {G (i + n, j + m) + βq (BHPF (i + n, j + m) −GHPF (i + n, j + m))} + r (BLPF (i + n, j + m) −GLPF (i + n, j + m))
... (27)

図27は、式(27)による補間の結果得られたB信号brをそれぞれ対応するR画素位置に2次元的に示す。図27にはまた、式(24)及び式(25)による補間の結果得られたB信号bgがそれぞれ対応するG画素位置が示されている。式(24)及び式(25)による補間と、式(27)による補間の結果、すべての画素のB信号が揃う。
なお、式(27)においてもBLPF,BHPF,GLPF,GHPF,βは上述したLPF値,HPF値及び彩度係数βであるが、GLPF及びGHPFについては、ステップS1及びステップS2で算出した補間値gr、gbを用いて新たに算出してもよい。また、BLPF、BHPFも、ステップS4にて算出した補間値bgを用いて新たに算出してよい。
FIG. 27 two-dimensionally shows the B signal br obtained as a result of interpolation according to the equation (27) at the corresponding R pixel position. FIG. 27 also shows the G pixel positions corresponding to the B signals bg obtained as a result of interpolation according to equations (24) and (25). As a result of the interpolation by the equations (24) and (25) and the interpolation by the equation (27), the B signals of all the pixels are prepared.
In Expression (27), BLPF, BHPF, GLPF, GHPF, and β are the above-described LPF value, HPF value, and saturation coefficient β, but for GLPF and GHPF, the interpolation values calculated in step S1 and step S2 are used. You may newly calculate using gr and gb. Also, BLPF and BHPF may be newly calculated using the interpolation value bg calculated in step S4.

以上ステップS1からステップS6の演算により、各画素において欠落した色信号を補間し、全画素のR,G,B信号が得られる。   As described above, the color signal missing in each pixel is interpolated by the calculation from step S1 to step S6, and R, G, B signals of all the pixels are obtained.

上記の例で説明したハイパスフィルタ7r、7g、7b、ローパスフィルタ8r、8g、8b、彩度係数算出手段9、非相関値算出手段12及び演算手段10は、ソフトウェアにより、即ちプログラムされたコンピュータにより実現することもできる。その場合、ステップS1〜S6の処理は以下のようにして行われる。   The high-pass filters 7r, 7g, and 7b, the low-pass filters 8r, 8g, and 8b, the saturation coefficient calculation unit 9, the decorrelation value calculation unit 12, and the calculation unit 10 described in the above example are performed by software, that is, by a programmed computer. It can also be realized. In that case, the process of step S1-S6 is performed as follows.

図28はステップS1の手順を示すフローチャートである。ステップS1ではR画素の位置における欠落したG信号を算出するので、R信号が予め存在する画素を注目画素として選択する(ステップS10)。
選択した注目画素位置におけるG色のLPF値とR色のLPF値を算出し(ステップS11、S12)、その差に所定の定数rを乗じた値を低周波成分の差とする(ステップS13)。
FIG. 28 is a flowchart showing the procedure of step S1. In step S1, since the missing G signal at the position of the R pixel is calculated, a pixel in which the R signal exists in advance is selected as the target pixel (step S10).
A G-color LPF value and an R-color LPF value at the selected target pixel position are calculated (steps S11 and S12), and a value obtained by multiplying the difference by a predetermined constant r is set as a low-frequency component difference (step S13). .

次に、選択した注目画素位置におけるG色のHPF値とR色のHPF値を算出する(ステップS14、S15)。更に、注目画素とその周辺の画素の信号を用いて彩度係数βを算出し(ステップS16)、彩度係数βと所定の定数qをR色とG色のHPF値の差に乗じて非相関値を算出する(ステップS17)。
そして、注目画素位置におけるR色信号に、低周波成分の差と非相関値を加算してG色信号を算出する(ステップS18)。得られたG色信号の値は2次元メモリ6gへ出力する(ステップS19)。以上の処理をR信号が予め存在する全ての画素について繰り返し実行する(ステップS20)。
ステップS2〜S6の処理も、ステップS1と同様である。即ち、ステップS2〜S6の各々の手順は、図28のフローチャートの「R」と「G」を、注目画素の色(h)と補間により求めたい色(k)に、置き換えたものとして示される。
Next, the G-color HPF value and the R-color HPF value at the selected target pixel position are calculated (steps S14 and S15). Further, the saturation coefficient β is calculated using signals of the pixel of interest and the surrounding pixels (step S16), and the difference between the HPF value of the R color and the G color is multiplied by the saturation coefficient β and a predetermined constant q. A correlation value is calculated (step S17).
Then, the G color signal is calculated by adding the difference between the low frequency components and the decorrelation value to the R color signal at the target pixel position (step S18). The obtained G color signal value is output to the two-dimensional memory 6g (step S19). The above processing is repeatedly executed for all pixels in which the R signal is present in advance (step S20).
The processing of steps S2 to S6 is the same as that of step S1. That is, each procedure of steps S2 to S6 is shown as replacing “R” and “G” in the flowchart of FIG. 28 with the color (h) of the pixel of interest and the color (k) to be obtained by interpolation. .

図28に示す各ステップと図1、図12、図13、図16に示す部材との対応関係は以下の通りである。即ち、ステップS10の処理は選択手段21及び制御手段(図12、図13の制御手段30a、30bはその一部をなすが、その全体は図示されていない)における処理に対応し、ステップS11の処理は、ローパスフィルタ8g及び選択手段24kにおける処理に対応し、ステップS12の処理は、ローパスフィルタ8r及び選択手段24hにおける処理に対応し、ステップS13の処理は、差計算手段26及び係数乗算手段28における処理に対応し、ステップS14の処理は、ハイパスフィルタ7g及び選択手段23kにおける処理に対応し、ステップS15の処理は、ハイパスフィルタ7r及び選択手段23hにおける処理に対応し、ステップS16の処理は、彩度係数算出手段9における処理に対応し、ステップS17の処理は、差計算手段25及び係数乗算手段27における処理に対応し、ステップS18の処理は、加算手段29における処理に対応し、ステップS19の処理は、演算手段10から2次元メモリ6r、6g、6bへのデータ転送、書き込みに対応する。
ステップS20及び各ステップにおける各手段の制御は、制御手段(図12、図13の制御手段30a、30bはその一部をなすが、その全体は図示されていない)によって行われる。
The correspondence between each step shown in FIG. 28 and the members shown in FIGS. 1, 12, 13, and 16 is as follows. That is, the processing in step S10 corresponds to the processing in the selection means 21 and the control means (the control means 30a and 30b in FIGS. 12 and 13 form part of them, but the whole is not shown). The processing corresponds to the processing in the low-pass filter 8g and the selection unit 24k, the processing in step S12 corresponds to the processing in the low-pass filter 8r and the selection unit 24h, and the processing in step S13 includes the difference calculation unit 26 and the coefficient multiplication unit 28. The processing in step S14 corresponds to the processing in the high-pass filter 7g and the selection means 23k, the processing in step S15 corresponds to the processing in the high-pass filter 7r and the selection means 23h, and the processing in step S16 is Corresponding to the processing in the saturation coefficient calculation means 9, the processing in step S17 is Corresponding to the processing in the calculating means 25 and the coefficient multiplying means 27, the processing in step S18 corresponds to the processing in the adding means 29, and the processing in step S19 is the data from the computing means 10 to the two-dimensional memories 6r, 6g, 6b. Supports transfer and writing.
Control of each means in step S20 and each step is performed by a control means (the control means 30a and 30b in FIGS. 12 and 13 form a part thereof, but the whole is not shown).

図29はステップS16の手順を示すフローチャートである。ステップS16では彩度係数βを算出する。初めに、注目画素とその周辺の画素の信号を用いて、各色信号の平均値を算出する(ステップS30)。G信号の平均値とR色の平均値の差の絶対値とG信号の平均値とB色の平均値の差の絶対値の和を求め、彩度cとする(ステップS31)。彩度cの値をしきい値Th1と比較し、彩度係数βを設定する(ステップS32、S33、S34)。   FIG. 29 is a flowchart showing the procedure of step S16. In step S16, the saturation coefficient β is calculated. First, the average value of each color signal is calculated using the signals of the target pixel and the surrounding pixels (step S30). The sum of the absolute value of the difference between the average value of the G signal and the average value of the R color and the absolute value of the difference between the average value of the G signal and the average value of the B color is obtained as saturation c (step S31). The value of the saturation c is compared with the threshold value Th1, and the saturation coefficient β is set (steps S32, S33, S34).

図29に示す処理は、彩度係数算出手段9によって行われる処理に対応するものであり、図29の各ステップと図16に示す部材との対応関係は以下の通りである。即ち、ステップS30の処理は、画素信号生成手段9r、9g、9bにおける処理に対応し、ステップS31の処理は、彩度計算手段9dにおける処理に対応し、ステップS32〜S34の処理は、彩度係数生成手段9eにおける処理に対応する。   The process shown in FIG. 29 corresponds to the process performed by the saturation coefficient calculation means 9, and the correspondence between the steps in FIG. 29 and the members shown in FIG. 16 is as follows. That is, the process in step S30 corresponds to the process in the pixel signal generation units 9r, 9g, and 9b, the process in step S31 corresponds to the process in the saturation calculation unit 9d, and the processes in steps S32 to S34 are performed in saturation. This corresponds to the processing in the coefficient generation means 9e.

実施の形態2.
次に実施の形態2の画像信号処理装置を説明する。実施の形態2の画像信号処理装置を備えた撮像装置の全体的構成は、図1に示すごとくであるが、演算手段10の構成が実施の形態1とは異なる。図30は、実施の形態2の演算手段の構成を示す。図30に示された演算手段は、概して図13の演算手段と同様であるが、差計算手段26の代わりに比計算手段32を備え、加算手段29の代わりに、加算手段33と乗算手段34の組合せを有する点で異なる。
Embodiment 2. FIG.
Next, an image signal processing apparatus according to the second embodiment will be described. The overall configuration of the imaging apparatus including the image signal processing apparatus according to the second embodiment is as shown in FIG. 1, but the configuration of the computing means 10 is different from that of the first embodiment. FIG. 30 shows the configuration of the computing means of the second embodiment. The calculation means shown in FIG. 30 is generally the same as the calculation means of FIG. 13, but includes a ratio calculation means 32 instead of the difference calculation means 26, and an addition means 33 and a multiplication means 34 instead of the addition means 29. It differs in having a combination of

比計算手段32は、選択手段24kの出力と選択手段24hの出力の比kLPF/hLPFを求める。   The ratio calculation means 32 obtains a ratio kLPF / hLPF between the output of the selection means 24k and the output of the selection means 24h.

係数乗算手段28は、比計算手段32の出力kLPF/hLPFに所定の係数rを掛け、その積r(kLPF/hLPF)を出力する。
加算手段33は、選択手段21から出力される画素値hと、非相関値算出手段12から出力される非相関値βq(kHPF−hHPF)とを加算して、その和
h+βq(kHPF−hHPF)
を出力する。
The coefficient multiplication means 28 multiplies the output kLPF / hLPF of the ratio calculation means 32 by a predetermined coefficient r and outputs the product r (kLPF / hLPF).
The adding unit 33 adds the pixel value h output from the selecting unit 21 and the uncorrelated value βq (kHPF−hHPF) output from the uncorrelated value calculating unit 12 and adds the sum h + βq (kHPF−hHPF).
Is output.

乗算手段34は、加算手段33の出力
h+βq(kHPF−hHPF)
と、係数乗算手段28の出力
r(kLPF/hLPF)
とを乗算し、その積
{h+βq(kHPF−hHPF)}×r(kLPF/hLPF)
を出力する。
乗算手段34の出力が、補間対象画素の第kの色の色成分値(補間値)として用いられる。
The multiplication unit 34 outputs the output h + βq of the addition unit 33 (kHPF−hHPF).
And the output r (kLPF / hLPF) of the coefficient multiplication means 28
And the product {h + βq (kHPF−hHPF)} × r (kLPF / hLPF)
Is output.
The output of the multiplication unit 34 is used as the color component value (interpolation value) of the kth color of the interpolation target pixel.

この実施の形態2でも、LPF8r、8g、8bと、選択手段24hとで、補間対象画素位置の近傍の領域内の複数の画素位置における、第hの分光感度特性の画素信号の低周波数成分を抽出乃至生成するh信号低周波成分生成手段が構成されて、LPF8r、8g、8bと、選択手段24kとで、補間対象画素位置の近傍の領域内の複数の画素位置における、第kの分光感度特性の画素信号の低周波数成分を抽出乃至生成するk信号低周波成分生成手段が構成されている。そして、これらのh信号低周波成分生成手段及びk信号低周波成分生成手段と、と比計算手段32とにより、第kの分光感度特性の画素信号の低周波数成分と、補間対象画素位置の近傍の領域内の複数の画素位置における、第hの分光感度特性の画素信号の低周波数成分との比を算出する比算出手段が構成されている。   Also in the second embodiment, the LPFs 8r, 8g, and 8b and the selection unit 24h are used to select the low frequency components of the pixel signal having the h-th spectral sensitivity characteristic at a plurality of pixel positions in the vicinity of the interpolation target pixel position. The h signal low frequency component generating means for extracting or generating is configured, and the LPFs 8r, 8g, 8b and the selecting means 24k, the kth spectral sensitivity at a plurality of pixel positions in the vicinity of the interpolation target pixel position. A k signal low frequency component generating means for extracting or generating a low frequency component of the characteristic pixel signal is configured. Then, the h signal low frequency component generation means and the k signal low frequency component generation means, and the ratio calculation means 32 allow the low frequency component of the pixel signal of the kth spectral sensitivity characteristic and the vicinity of the interpolation target pixel position. A ratio calculating unit is configured to calculate a ratio of the pixel signal having the h-th spectral sensitivity characteristic to a low frequency component at a plurality of pixel positions in the region.

また、上記のうち、ハイパスフィルタ7r、7g、7bと、選択手段23hとで、補間対象画素位置の近傍の領域内の複数の画素位置における、第hの分光感度特性の画素信号の変化成分(高周波成分)を抽出乃至生成するh信号変化成分生成手段が構成され、ハイパスフィルタ7r、7g、7bと、選択手段23kとで、補間対象画素位置の近傍の領域内の複数の画素位置における、第kの分光感度特性の画素信号の変化成分(高周波成分)を抽出乃至生成するk信号変化成分生成手段が構成されている。
また、図12に示される差計算手段25及び係数乗算手段27と、図30に示される選択手段21、比計算手段32、係数乗算手段28、加算手段33及び乗算手段34とにより、
k信号変化成分生成手段によって得られた値とh信号変化成分生成手段によって得られた値の差と、上記彩度係数とに基づいて定められる第kの信号と第hの信号との非相関値(βq(kHPF−hHPF)と、補間対象画素位置における第hの画素信号(h)との和に、k信号低周波成分生成手段によって得られた値とh信号低周波成分生成手段によって得られた値の比を乗じて、補間対象画素位置における第kの画素信号を求める補間値演算手段が構成されている。
図示の例の補間値算出手段は、補間対象画素の位置における一つの色(第hの色)の画素信号を選択する選択手段21と、低周波成分の比(kLPF/hLPF)を求める比計算手段32とを含み、選択手段21で選択した補間対象画素の位置における一つの色(第hの色)の画素信号と、差計算手段25の出力として得られる非相関値βq(kHPF−hHPF)と、比計算手段32で求めた低周波数成分の比(kLPF/hLPF)に第1の所定の係数(r)を掛けたものとを乗算することにより、補間対象画素位置における他の色(第kの色)の画素信号を求める。
非相関値βq(kHPF−hHPF)は、実施の形態1と同様、例えば、差計算手段25で求めた高周波成分の差(kHPF−hHPF)に彩度係数算出手段9で求めた彩度係数βと第2の所定の係数(q)を掛けることにより得られたものである。
Among the above, the high-pass filters 7r, 7g, and 7b and the selection unit 23h change the change component of the pixel signal of the h-th spectral sensitivity characteristic at a plurality of pixel positions in the vicinity of the interpolation target pixel position ( H signal change component generation means for extracting or generating (high frequency components) is configured, and the high-pass filters 7r, 7g, 7b and the selection means 23k are used for the first pixel position in a plurality of pixel positions in the vicinity of the interpolation target pixel position. A k signal change component generating means for extracting or generating a change component (high frequency component) of the pixel signal having the spectral sensitivity characteristic of k is configured.
Further, the difference calculation means 25 and coefficient multiplication means 27 shown in FIG. 12 and the selection means 21, ratio calculation means 32, coefficient multiplication means 28, addition means 33 and multiplication means 34 shown in FIG.
The decorrelation between the kth signal and the hth signal determined based on the difference between the value obtained by the k signal change component generation means and the value obtained by the h signal change component generation means and the saturation coefficient. The sum of the value (βq (kHPF−hHPF)) and the h-th pixel signal (h) at the pixel position to be interpolated is obtained by the value obtained by the k signal low frequency component generation means and the h signal low frequency component generation means. Interpolation value calculation means for obtaining the kth pixel signal at the interpolation target pixel position by multiplying the ratio of the obtained values is configured.
The interpolation value calculation means of the example shown in the figure is a selection means 21 for selecting a pixel signal of one color (hth color) at the position of the interpolation target pixel, and a ratio calculation for obtaining a low frequency component ratio (kLPF / hLPF). And a non-correlation value βq (kHPF−hHPF) obtained as an output of the difference calculation means 25 and a pixel signal of one color (h-th color) at the position of the interpolation target pixel selected by the selection means 21. By multiplying the ratio of the low frequency components (kLPF / hLPF) obtained by the ratio calculation means 32 by the first predetermined coefficient (r) to obtain another color (first color) at the interpolation target pixel position. k color) pixel signal is obtained.
The non-correlation value βq (kHPF−hHPF) is, for example, the saturation coefficient β obtained by the saturation coefficient calculation means 9 to the difference (kHPF−hHPF) of the high frequency component obtained by the difference calculation means 25 as in the first embodiment. And the second predetermined coefficient (q).

補間値算出手段で算出された補間値は例えば第kの色の画素信号のための2次元メモリ(6r、6g、6bのいずれか)に記憶され、或いは出力端子11から出力される。   The interpolation value calculated by the interpolation value calculation means is stored in, for example, a two-dimensional memory (any one of 6r, 6g, 6b) for the pixel signal of the kth color, or is output from the output terminal 11.

上記した演算手段10による補間演算は次式(28)で表される。   The interpolation calculation by the calculation means 10 is expressed by the following equation (28).

k(i,j)
=[h(i,j)+βq{kHPF(i,j)−hHPF(i,j)}]
×r{kLPF(i,j)/hLPF(i,j)}
…(28)
k (i, j)
= [H (i, j) + βq {kHPF (i, j) -hHPF (i, j)}]
Xr {kLPF (i, j) / hLPF (i, j)}
... (28)

式(28)において、式(1)と同様にk(i,j)はイメージセンサ2上の座標(i,j)において、欠落した色信号であり、補間される色信号である。h(i,j)は(i,j)の位置に予め存在する色信号である。kHPF,hHPFはk信号及びh信号の(i,j)の位置の周辺の画素から所定の演算により算出されたHPF値である。kLPF,hLPFはk信号及びh信号の(i,j)の位置の周辺の画素から別の所定の演算により算出されたLPF値である。q及びrは予め定めた定数である。βは、(i,j)の位置とその周辺の画素位置における信号の彩度に基づいて決まる係数で、彩度が高い場合にはβの値は大きくなり、彩度が低い場合にはβの値は小さくなるように設定する。   In equation (28), k (i, j) is a missing color signal at coordinates (i, j) on the image sensor 2 as in equation (1), and is a color signal to be interpolated. h (i, j) is a color signal existing in advance at the position (i, j). kHPF and hHPF are HPF values calculated by a predetermined calculation from pixels around the position of (i, j) of the k signal and h signal. kLPF and hLPF are LPF values calculated by another predetermined calculation from pixels around the (i, j) position of the k signal and h signal. q and r are predetermined constants. β is a coefficient determined based on the saturation of the signal at the position (i, j) and the surrounding pixel positions. When the saturation is high, the value of β increases, and when the saturation is low, β The value of is set to be small.

式(28)に示した算出式の意味について図31〜図34を参照して説明する。これらの図には、図17〜図20と同様に、各信号レベルとイメージセンサ2上の各画素の位置が示されている。また、説明を簡単にするため、イメージセンサ2の1行だけを記載し、一次元方向だけに演算を限定して示す。上部に記載したのは各色フィルタの配列であり、hはh画素、kはk画素、各画素の括弧( )内は画素位置を示す座標である。また、曲線aはk信号の真値であり、曲線bはh信号の真値である。曲線a、b上において、黒丸印(●)で示した箇所は、イメージセンサ2から出力されたk信号及びh信号の画素信号値である。曲線c、dはそれぞれk信号、h信号のLPF値であり、曲線e,fはそれぞれk信号、h信号のHPF値である。これら図を参照して、画素位置(i,j)におけるk信号の画素補間を行う方法を具体的に述べる。
図31は、k信号とh信号との間に正の相関がある場合を示し、図32及び図33は、k信号とh信号との間に相関がない場合を示し、図34は、k信号とh信号との間に負の相関がある場合を示す。
The meaning of the calculation formula shown in Formula (28) will be described with reference to FIGS. In these drawings, as in FIGS. 17 to 20, the signal levels and the positions of the pixels on the image sensor 2 are shown. For the sake of simplicity, only one line of the image sensor 2 is described, and the calculation is limited to one-dimensional direction. Described above is the arrangement of each color filter, where h is an h pixel, k is a k pixel, and parentheses () of each pixel are coordinates indicating the pixel position. Curve a is the true value of the k signal, and curve b is the true value of the h signal. On the curves a and b, the portions indicated by black circles (●) are the pixel signal values of the k signal and h signal output from the image sensor 2. Curves c and d are the LPF values of the k and h signals, respectively, and curves e and f are the HPF values of the k and h signals, respectively. With reference to these drawings, a method for performing pixel interpolation of the k signal at the pixel position (i, j) will be specifically described.
FIG. 31 shows a case where there is a positive correlation between the k signal and the h signal, FIG. 32 and FIG. 33 show a case where there is no correlation between the k signal and the h signal, and FIG. The case where there is a negative correlation between the signal and the h signal is shown.

最初に図31を参照してk信号とh信号との間に正の相関がある場合について説明する。曲線eとfで示されるHPF値、はk信号とh信号の変化が同様の場合、同じ値となるため重なって描写されている。
従来技術によるバイリニア方法では、画素位置(i−1,j)と(i+1,j)におけるk信号を用いてその平均値を画素位置(i,j)におけるk信号とする。バイリニア方法によって補間された信号レベルを、図31において白三角印(△)で示したが、求められるべき真値と補間誤差が生じている。
First, a case where there is a positive correlation between the k signal and the h signal will be described with reference to FIG. The HPF values indicated by the curves e and f are depicted as overlapping because they have the same value when the changes in the k and h signals are similar.
In the bilinear method according to the prior art, the k signal at the pixel position (i−1, j) and (i + 1, j) is used, and the average value is set as the k signal at the pixel position (i, j). The signal level interpolated by the bilinear method is indicated by white triangles (Δ) in FIG. 31, but a true value to be obtained and an interpolation error are generated.

一方、本実施の形態による補間方法では、画素位置(i,j)において既知の値h(i,j)に、高周波成分の差(kHPF−hHPF)を彩度係数βと係数qを乗じた後加算し、加算結果に、比kLPF/hLPFに係数rを乗じたものを乗算することにより得られた値が、補間信号k(i,j)となる。kLPF/hLPFは、LPF値の比を表すものであり、この比は、相関の程度を表し、相関の度合いが高いほど「1」により近くなる。   On the other hand, in the interpolation method according to the present embodiment, the known value h (i, j) at the pixel position (i, j) is multiplied by the high-frequency component difference (kHPF−hHPF) by the saturation coefficient β and the coefficient q. A value obtained by performing post-addition and multiplying the addition result by multiplying the ratio kLPF / hLPF by the coefficient r becomes an interpolation signal k (i, j). kLPF / hLPF represents the ratio of LPF values, and this ratio represents the degree of correlation. The higher the degree of correlation, the closer to “1”.

実施の形態1に関連して述べたように画像の局所的な領域では信号の変化には強い相関がある。よって、信号の緩やかな変化を示すLPF値とそれぞれの信号との間には次式(29)が成り立つ。   As described in connection with the first embodiment, there is a strong correlation between signal changes in a local region of an image. Therefore, the following equation (29) is established between the LPF value indicating a gradual change of the signal and each signal.

k(i,j):h(i,j)=kLPF(i,j):hLPF(i,j)
…(29)
k (i, j): h (i, j) = kLPF (i, j): hLPF (i, j)
... (29)

式(29)を変形すると、h画素のある(i,j)におけるk(i,j)の信号は次式(30)で表すことができる。   By transforming equation (29), the signal of k (i, j) at (i, j) with h pixels can be expressed by the following equation (30).

k(i,j)=h(i,j)×kLPF(i,j)/hLPF(i,j)
…(30)
k (i, j) = h (i, j) × kLPF (i, j) / hLPF (i, j)
... (30)

式(30)は画像の局所的な領域では信号の変化に強い相関を持つと仮定しており、画像のほとんどの領域では上記仮定が成り立つため、信号の変化に正の相関の高い領域では精度の高い画素補間を可能とする。しかし、実施の形態1と同様に画像のエッジなど相関がない領域や、負の相関を有する領域では画素補間誤差が発生する。   Equation (30) assumes that there is a strong correlation to signal changes in the local region of the image, and the above assumption is valid in most regions of the image. Therefore, accuracy is high in the region where the signal correlation has a high positive correlation. High pixel interpolation is possible. However, as in the first embodiment, a pixel interpolation error occurs in a region having no correlation such as an edge of an image or a region having a negative correlation.

図31では画素位置(i,j)における、曲線cとdとの比がkLPF/hLPFとなる。画素位置(i,j)における曲線eとfの差が(kHPF−hHPF)となる。本実施の形態による補間方法では、画素位置(i,j)において既知の値h(i,j)から(kHPF−hHPF)に彩度係数βと係数qを掛けたものを加算し、kLPF/hLPFに係数rを掛けたものを乗ずる。式(28)で示す本方法によって算出された補間信号k(i,j)を図31に白丸印(○)にて示す。真値に対して精度良く画素補間が実現できている。図31に示したように、k信号とh信号との信号の変化が同様である場合、(kHPF−hHPF)は“0”に近くなるため、LPFから求められる変化の信号間の比に比例した値を掛けることにより補間信号が算出されることになる。本方法により、色信号間の相関が大きい場合精度良く画素補間を行うことができる。   In FIG. 31, the ratio of the curves c and d at the pixel position (i, j) is kLPF / hLPF. The difference between the curves e and f at the pixel position (i, j) is (kHPF−hHPF). In the interpolation method according to the present embodiment, the value h (i, j) multiplied by (kHPF−hHPF) multiplied by the saturation coefficient β and the coefficient q at the pixel position (i, j) is added, and kLPF / Multiply hLPF multiplied by coefficient r. The interpolated signal k (i, j) calculated by the present method represented by Expression (28) is indicated by white circles (◯) in FIG. Pixel interpolation can be realized with high accuracy for true values. As shown in FIG. 31, when the change in signal between the k signal and the h signal is the same, (kHPF−hHPF) is close to “0”, and is proportional to the ratio between the change signals obtained from the LPF. The interpolation signal is calculated by multiplying the calculated value. By this method, pixel interpolation can be performed with high accuracy when the correlation between color signals is large.

次に色信号間に相関が無い場合について説明する。画像のエッジなどでは各色の間の相関が低くなるため式(30)では補間誤差が生じてしまう。そこで、エッジ部では相関が低くなることを考慮し、式(30)にHPFの信号差(kHPF−hHPF)を挿入し、上記式(28)の補間方法とすることで上記の問題を解決することができる。式(28)において、(kHPF(i,j)−hHPF(i,j))は画像エッジ部の信号成分の差であり、k信号とh信号の変化にエッジ部でも強い相関がある場合には、“0”となるため、式(28)でr=1であれば、式(30)と同じ式となる。各色の相関が無い場合には、(kHPF(i,j)−hHPF(i,j))が各色の信号の固有の値に関係するので、各色について高精度の画素補間を実現することができる。   Next, a case where there is no correlation between color signals will be described. Since the correlation between each color is low at the edge of the image, an interpolation error occurs in the equation (30). Therefore, considering the fact that the correlation is low at the edge portion, the above problem is solved by inserting the HPF signal difference (kHPF−hHPF) into the equation (30) and using the interpolation method of the above equation (28). be able to. In Expression (28), (kHPF (i, j) −hHPF (i, j)) is a difference between signal components in the image edge portion, and when there is a strong correlation in the edge portion between changes in the k signal and the h signal. Becomes “0”, so if r = 1 in the equation (28), the equation is the same as the equation (30). When there is no correlation between the colors, (kHPF (i, j) −hHPF (i, j)) is related to a specific value of the signal of each color, and therefore high-precision pixel interpolation can be realized for each color. .

図32及び図33に各信号レベルとイメージセンサ2上の各画素の位置を示す。図32及び図33に示した信号ではk信号とh信号の変化に相関が無い。   32 and 33 show the signal levels and the positions of the pixels on the image sensor 2. FIG. In the signals shown in FIGS. 32 and 33, there is no correlation between changes in the k signal and the h signal.

まず、図32を参照して説明する。図32の例では、k信号に変化が無いため曲線eで示されるk信号のHPF値kHPFは“0”である。
式(30)で示した色の相関変化だけを用いた補間を行う場合、画素位置(i,j)における補間対象のk信号は変化していないにもかかわらず、参照とするh信号が変化しているため、白四角印(□)で示す信号レベルに画素補間され、補間誤差が生じる。しかし、k信号とh信号との信号変化にどれだけ相関が無いかは、(kHPF−hHPF)の値として求められることとなる。よって、(kHPF−hHPF)の値に彩度係数βと係数qを掛けたものが、h(i,j)の値に加算され、加算結果に、r(kLPF/hLPF)が乗算される。図32の場合、kHPFは“0”であり、画素位置(i,j)における(kHPF−hHPF)は負の値になるため、h(i,j)の値はある値が差し引かれることとなる。本実施の形態による演算(式(30))の画素補間の信号レベルを白丸印(○)にて示す。真値と比べ精度高く補間できている。このように信号間に相関が無い場合でも精度高く画素補間を行うことができる。
First, a description will be given with reference to FIG. In the example of FIG. 32, since there is no change in the k signal, the HPF value kHPF of the k signal indicated by the curve e is “0”.
When interpolation is performed using only the color correlation change shown in Expression (30), the reference h signal changes even though the interpolation target k signal at the pixel position (i, j) has not changed. Therefore, pixel interpolation is performed to the signal level indicated by the white square mark (□), and an interpolation error occurs. However, how much the signal change between the k signal and the h signal is not correlated is obtained as a value of (kHPF−hHPF). Therefore, the value of (kHPF−hHPF) multiplied by the saturation coefficient β and the coefficient q is added to the value of h (i, j), and the addition result is multiplied by r (kLPF / hLPF). In the case of FIG. 32, kHPF is “0”, and (kHPF−hHPF) at the pixel position (i, j) is a negative value, so that a certain value is subtracted from the value of h (i, j). Become. The pixel interpolation signal level of the calculation according to the present embodiment (expression (30)) is indicated by white circles (◯). Interpolation can be performed with higher accuracy than the true value. Thus, even when there is no correlation between signals, pixel interpolation can be performed with high accuracy.

図33には図32とは逆にk信号が変化して、h信号に変化が無い、2つの色信号間に相関が無い別の例を示す。式(28)による色の相関変化だけを用いた補間を行う場合、h(i,j)の信号にkLPF/hLPFの信号レベル比に係数rを掛けたものが乗算されることになる。この場合、画素補間された信号レベルを図33において白四角印(□)で示す信号レベルとなる。白四角印に示す信号レベルはk信号の真値から離れた位置の値となるため補間誤差が生じていることが分かる。
一方、本実施の形態による画素補間方法では、画素位置(i,j)におけるh信号h(i,j)に(kLPF−hLPF)に彩度係数βと係数qを掛けたものが加算され、加算結果に、r(kLPF/hLPF)が乗算される。図33の場合、hHPFは“0”であり、画素位置(i,j)における(kHPF−hHPF)は正の値となる。本実施の形態による補間方法では補間された信号レベルは白丸印(○)の位置となり、k信号の真値に対して精度高く補間される。
In contrast to FIG. 32, FIG. 33 shows another example in which the k signal changes and the h signal does not change and there is no correlation between the two color signals. When interpolation is performed using only the color correlation change according to Expression (28), the signal of h (i, j) is multiplied by the signal level ratio of kLPF / hLPF multiplied by the coefficient r. In this case, the signal level after pixel interpolation is the signal level indicated by white square marks (□) in FIG. Since the signal level indicated by the white square mark is a value at a position away from the true value of the k signal, it can be seen that an interpolation error has occurred.
On the other hand, in the pixel interpolation method according to the present embodiment, the h signal h (i, j) at the pixel position (i, j) is multiplied by (kLPF−hLPF) multiplied by the saturation coefficient β and the coefficient q, The addition result is multiplied by r (kLPF / hLPF). In the case of FIG. 33, hHPF is “0”, and (kHPF−hHPF) at the pixel position (i, j) is a positive value. In the interpolation method according to the present embodiment, the interpolated signal level is the position of a white circle (o), and is interpolated with high accuracy with respect to the true value of the k signal.

図32及び図33では色信号間に相関が無い場合について説明したが、次に色信号間に負の相関がある場合について説明する。図34にk信号とh信号との間に負の相関がある場合を示す。バイリニア補間方法による画素補間は白三角印(△)で示す信号レベルであり図31と同様に真値に対して補間誤差が生じている。また、負の相関関係である場合、式(30)による色の相関変化だけを用いた画素補間では白四角印(□)で示すようにさらに補間誤差が拡大する。本実施の形態による補間方法では白丸印(○)で示すように精度高く画素補間が実現できている。
以上のように、色信号間に正の相関がある場合、相関が無い場合、負の相関となっている場合のいずれにおいても精度の高い画素補間を行うことができる。
32 and 33 describe the case where there is no correlation between the color signals. Next, the case where there is a negative correlation between the color signals will be described. FIG. 34 shows a case where there is a negative correlation between the k signal and the h signal. Pixel interpolation by the bilinear interpolation method has a signal level indicated by a white triangle mark (Δ), and an interpolation error occurs with respect to a true value as in FIG. If the correlation is negative, pixel interpolation using only the color correlation change according to equation (30) further increases the interpolation error as indicated by the white square mark (□). In the interpolation method according to the present embodiment, pixel interpolation can be realized with high accuracy as indicated by white circles (◯).
As described above, highly accurate pixel interpolation can be performed in any case where there is a positive correlation between color signals, no correlation, or a negative correlation.

画素補間の演算処理については実施の形態1と同様に、図21に示したフローチャートの手順にて行う。フローチャートに示した6つの処理がすべて終わったときに、1画面上のすべての画素位置のすべての画素における不足した色の画素信号が揃う。   The pixel interpolation calculation process is performed according to the procedure of the flowchart shown in FIG. 21 as in the first embodiment. When all of the six processes shown in the flowchart are finished, pixel signals of insufficient colors are prepared for all pixels at all pixel positions on one screen.

各手順における演算処理を具体的に説明する。まず、各色信号R,G,BのHPF、LPF値は実施の形態1と同様に式(4)から式(15)に示す演算にて求められる。   The arithmetic processing in each procedure will be specifically described. First, the HPF and LPF values of the color signals R, G, and B are obtained by the calculations shown in the equations (4) to (15) as in the first embodiment.

まず、ステップS1の演算処理について説明する。ステップS1ではR画素の位置における欠落したG信号を算出する。R画素の位置におけるG信号は式(28)に従い次式(31)にて算出される。R画素は(i+n,j+m)(n,mは奇数)の位置に存在するため、これに伴い式(28)とは座標値が異なるものとなる。   First, the calculation process of step S1 will be described. In step S1, the missing G signal at the position of the R pixel is calculated. The G signal at the position of the R pixel is calculated by the following equation (31) according to equation (28). Since the R pixel exists at a position of (i + n, j + m) (n and m are odd numbers), the coordinate value is different from the equation (28).

G(i+n,j+m)={R(i+n,j+m)+βq(GHPF(i+n,j+m)−RHPF(i+n,j+m))}×r(GLPF(i+n,j+m)/RLPF(i+n,j+m))
…(31)
G (i + n, j + m) = {R (i + n, j + m) + βq (GHPF (i + n, j + m) −RHPF (i + n, j + m))} × r (GLPF (i + n, j + m) / RLPF (i + n, j + m))
... (31)

定数q、rは画像が最適に補間されるように予め定めておけばよい。例えば、q=0.25、r=1でも良好に画素補間を行うことができる。図22は、式(31)による補間の結果grをそれぞれ対応するR画素位置に示す。   The constants q and r may be determined in advance so that the image is optimally interpolated. For example, pixel interpolation can be performed satisfactorily even when q = 0.25 and r = 1. FIG. 22 shows the result gr of the interpolation by equation (31) at the corresponding R pixel position.

次に、ステップS2の演算処理に移る。ステップS2はB画素の位置において欠落したG信号を補間する。B画素の位置におけるG信号は式(28)に従い次式(32)にて算出される。B画素は(i+s,j+t)(s,tは偶数)の位置に存在するため、これに伴い式(28)とは座標値が異なるものとなる。   Next, the processing proceeds to step S2. Step S2 interpolates the missing G signal at the B pixel position. The G signal at the position of the B pixel is calculated by the following equation (32) according to the equation (28). Since the B pixel exists at the position (i + s, j + t) (where s and t are even numbers), the coordinate value differs from that of the equation (28).

G(i+s,j+t)={B(i+s,j+t)+βq(GHPF(i+s,j+t)−BHPF(i+s,j+t))}×r(GLPF(i+s,j+t)/BLPF(i+s,j+t))
…(32)
G (i + s, j + t) = {B (i + s, j + t) + βq (GHPF (i + s, j + t) −BHPF (i + s, j + t))} × r (GLPF (i + s, j + t) / BLPF (i + s, j + t))
... (32)

図23は、式(32)による補間の結果gbをそれぞれ対応するB画素位置に示す。図23には、式(31)による補間の結果grも示されている。式(31)による、R画素位置のG信号の補間、及び式(32)による、B画素位置におけるG信号の補間により、全画素位置におけるG信号が得られる。   FIG. 23 shows the result gb of the interpolation according to the equation (32) at the corresponding B pixel position. FIG. 23 also shows the result gr of the interpolation by equation (31). The G signal at all pixel positions is obtained by the interpolation of the G signal at the R pixel position according to Expression (31) and the interpolation of the G signal at the B pixel position according to Expression (32).

次に、ステップS3の演算処理に移る。ステップS3はG画素の位置において欠落したR信号を補間する。G画素の位置におけるR信号は式(28)に従い次式(33)、式(34)にて算出される。G画素は(i+s,j+m)(sは偶数、mは奇数)の位置と(i+n,j+t)(nは奇数、tは偶数)とに存在するため、これに伴い式(28)とは座標値が異なるものとなる。   Next, the processing proceeds to step S3. Step S3 interpolates the missing R signal at the G pixel position. The R signal at the position of the G pixel is calculated by the following equations (33) and (34) according to equation (28). Since the G pixel exists at the position (i + s, j + m) (s is an even number, m is an odd number) and (i + n, j + t) (n is an odd number, t is an even number), the equation (28) is coordinated accordingly. The value will be different.

R(i+s,j+m)={G(i+s,j+m)+βq(RHPF(i+s,j+m)−GHPF(i+s,j+m))}×r(RLPF(i+s,j+m)/GLPF(i+s,j+m))
…(33)
R (i + s, j + m) = {G (i + s, j + m) + βq (RHPF (i + s, j + m) −GHPF (i + s, j + m))} × r (RLPF (i + s, j + m) / GLPF (i + s, j + m))
... (33)

R(i+n,j+t)={G(i+n,j+t)+βq(RHPF(i+n,j+t)−GHPF(i+n,j+t))}×r(RLPF(i+n,j+t)/GLPF(i+n,j+t))
…(34)
R (i + n, j + t) = {G (i + n, j + t) + βq (RHPF (i + n, j + t) −GHPF (i + n, j + t))} × r (RLPF (i + n, j + t) / GLPF (i + n, j + t))
... (34)

図24は、式(33)及び式(34)による補間の結果得られたR信号rgをそれぞれ対応するG画素位置に2次元的に示す。
なお、式(33)及び式(34)においてもRLPF,RHPF,GLPF,GHPF,βは上述したLPF、HPF及び彩度係数算出手段9の出力値であるが、GLPF及びGHPFについては、ステップS1及びステップS2で算出した補間値gr、gbを用いて新たに算出してもよい。
FIG. 24 two-dimensionally shows the R signal rg obtained as a result of interpolation according to equations (33) and (34) at the corresponding G pixel position.
In equations (33) and (34), RLPF, RHPF, GLPF, GHPF, and β are the output values of the LPF, HPF, and saturation coefficient calculating means 9 described above, but for GLPF and GHPF, step S1 In addition, a new calculation may be performed using the interpolation values gr and gb calculated in step S2.

次に、ステップS4の演算処理に移る。ステップS4はG画素の位置において欠落したB信号を補間する。G画素の位置におけるB信号は式(28)に従い次式(35)、式(36)にて算出される。G画素は(i+s,j+m)(sは偶数、mは奇数)の位置と(i+n,j+t)(nは奇数、tは偶数)とに存在するため、これに伴い式(28)とは座標値が異なるものとなる。   Next, the processing proceeds to step S4. Step S4 interpolates the missing B signal at the position of the G pixel. The B signal at the position of the G pixel is calculated by the following equations (35) and (36) according to equation (28). Since the G pixel exists at the position (i + s, j + m) (s is an even number, m is an odd number) and (i + n, j + t) (n is an odd number, t is an even number), the equation (28) is coordinated accordingly. The value will be different.

B(i+s,j+m)={G(i+s,j+m)+βq(BHPF(i+s,j+m)−GHPF(i+s,j+m))}×r(BLPF(i+s,j+m)/GLPF(i+s,j+m))
…(35)
B (i + s, j + m) = {G (i + s, j + m) + βq (BHPF (i + s, j + m) −GHPF (i + s, j + m))} × r (BLPF (i + s, j + m) / GLPF (i + s, j + m))
... (35)

B(i+n,j+t)={G(i+n,j+t)+βq(BHPF(i+n,j+t)−GHPF(i+n,j+t))}×r(BLPF(i+n,j+t)/GLPF(i+n,j+t))
…(36)
B (i + n, j + t) = {G (i + n, j + t) + βq (BHPF (i + n, j + t) −GHPF (i + n, j + t))} × r (BLPF (i + n, j + t) / GLPF (i + n, j + t))
... (36)

図25は、式(35)及び式(36)による補間の結果得られたB信号bgをそれぞれ対応するG画素位置に2次元的に示す。
なお、本式(35)及び式(36)においてもBLPF,BHPF,GLPF,GHPF,βは上述したLPF、HPF及び彩度係数算出手段9の出力値であるが、GLPF及びGHPFについては、ステップS1及びステップS2で算出した補間値gr、gbを用いて新たに算出してもよい。
FIG. 25 two-dimensionally shows the B signal bg obtained as a result of interpolation according to the equations (35) and (36) at the corresponding G pixel positions.
In this equation (35) and equation (36), BLPF, BHPF, GLPF, GHPF, and β are the output values of the LPF, HPF, and saturation coefficient calculating means 9 described above, but for GLPF and GHPF, the steps You may newly calculate using the interpolation values gr and gb calculated by S1 and step S2.

次に、ステップS5の演算処理に移る。ステップS5はB画素の位置において欠落したR信号を補間する。B画素の位置におけるR信号は式(28)に従い次式(37)にて算出される。B画素は(i+s,j+t)(s,tは偶数)の位置に存在するため、これに伴い式(28)とは座標値が異なるものとなる。   Next, the processing proceeds to step S5. Step S5 interpolates the missing R signal at the B pixel position. The R signal at the position of the B pixel is calculated by the following equation (37) according to equation (28). Since the B pixel exists at the position (i + s, j + t) (where s and t are even numbers), the coordinate value differs from that of the equation (28).

R(i+s,j+t)={G(i+s,j+t)+βq(RHPF(i+s,j+t)−GHPF(i+s,j+t))}×r(RLPF(i+s,j+t)/GLPF(i+s,j+t))
…(37)
R (i + s, j + t) = {G (i + s, j + t) + βq (RHPF (i + s, j + t) −GHPF (i + s, j + t))} × r (RLPF (i + s, j + t) / GLPF (i + s, j + t))
... (37)

図26は、式(37)による補間の結果得られたR信号rbをそれぞれ対応するB画素位置に2次元的に示す。図26にはまた、式(33)及び式(34)による補間の結果得られたR信号rgがそれぞれ対応するG画素位置に示されている。式(33)及び式(34)による補間と、式(37)による補間の結果、すべての画素のR信号が揃う。
なお、式(37)においてもRLPF,RHPF,GLPF,GHPF,βは上述したLPF、HPF及び彩度係数算出手段9の出力値であるが、GLPF及びGHPFについては、ステップS1及びステップS2で算出した補間値gr、gbを用いて新たに算出してもよい。また、RLPF、RHPFも、ステップS3にて算出した補間値rgを用いて新たに算出してよい。
FIG. 26 two-dimensionally shows the R signal rb obtained as a result of interpolation according to Expression (37) at the corresponding B pixel position. FIG. 26 also shows the R signal rg obtained as a result of interpolation according to the equations (33) and (34) at the corresponding G pixel positions. As a result of the interpolation by the equations (33) and (34) and the interpolation by the equation (37), the R signals of all the pixels are prepared.
In Equation (37), RLPF, RHPF, GLPF, GHPF, and β are the output values of the LPF, HPF, and saturation coefficient calculating means 9 described above, but GLPF and GHPF are calculated in steps S1 and S2. A new calculation may be performed using the interpolated values gr and gb. Also, RLPF and RHPF may be newly calculated using the interpolation value rg calculated in step S3.

次に、ステップS6の演算処理に移る。ステップS6はR画素の位置において欠落したB信号を補間する。R画素の位置におけるB信号は式(28)に従い次式(38)にて算出される。R画素は(i+n,j+m)(n,mは奇数)の位置に存在するため、これに伴い式(28)とは、座標値が異なるものとなる。   Next, the processing proceeds to step S6. Step S6 interpolates the missing B signal at the position of the R pixel. The B signal at the position of the R pixel is calculated by the following equation (38) according to equation (28). Since the R pixel exists at a position of (i + n, j + m) (n and m are odd numbers), the coordinate value is different from the equation (28).

B(i+n,j+m)={G(i+n,j+m)+βq(BHPF(i+n,j+m)−GHPF(i+n,j+m))}×r(BLPF(i+n,j+m)/GLPF(i+n,j+m))
…(38)
B (i + n, j + m) = {G (i + n, j + m) + βq (BHPF (i + n, j + m) −GHPF (i + n, j + m))} × r (BLPF (i + n, j + m) / GLPF (i + n, j + m))
... (38)

図27は、式(38)による補間の結果得られたB信号brをそれぞれ対応するR画素位置に2次元的に示す。図27にはまた、式(35)及び式(36)による補間の結果得られたB信号bgがそれぞれ対応するG画素位置に示されている。式(35)及び式(36)による補間と、式(38)による補間の結果、すべての画素のB信号が揃う。
なお、式(38)においてもBLPF,BHPF,GLPF,GHPF,βは上述したLPF、HPF及び彩度係数算出手段9の出力値であるが、GLPF及びGHPFについては、ステップS1及びステップS2で算出した補間値gr、gbを用いて新たに算出してもよい。また、BLPF、BHPFも、ステップS4にて算出した補間値bgを用いて新たに算出してよい。
FIG. 27 two-dimensionally shows the B signal br obtained as a result of interpolation according to the equation (38) at the corresponding R pixel position. FIG. 27 also shows the B signal bg obtained as a result of the interpolation according to the equations (35) and (36) at the corresponding G pixel position. As a result of the interpolation by the equations (35) and (36) and the interpolation by the equation (38), the B signals of all the pixels are prepared.
In Expression (38), BLPF, BHPF, GLPF, GHPF, and β are the output values of the LPF, HPF, and saturation coefficient calculating means 9 described above, but GLPF and GHPF are calculated in steps S1 and S2. A new calculation may be performed using the interpolated values gr and gb. Also, BLPF and BHPF may be newly calculated using the interpolation value bg calculated in step S4.

以上ステップS1からステップS6の演算により、各画素において欠落した色信号を補間し、全画素のR,G,B信号が得られる。   As described above, the color signal missing in each pixel is interpolated by the calculation from step S1 to step S6, and R, G, B signals of all the pixels are obtained.

上記の例で説明したハイパスフィルタ7r、7g、7b、ローパスフィルタ8r、8g、8b、彩度係数算出手段9、非相関値算出手段12及び演算手段10は、ソフトウェアにより、即ちプログラムされたコンピュータにより実現することもできる。その場合、ステップS1〜S6の処理は以下のようにして行われる。   The high-pass filters 7r, 7g, and 7b, the low-pass filters 8r, 8g, and 8b, the saturation coefficient calculation unit 9, the decorrelation value calculation unit 12, and the calculation unit 10 described in the above example are performed by software, that is, by a programmed computer. It can also be realized. In that case, the process of step S1-S6 is performed as follows.

図35はステップS1の手順を示すフローチャートである。ステップS1ではR画素の位置における欠落したG信号を算出するので、R信号が予め存在する画素を注目画素として選択する(ステップS40)。
選択した注目画素位置におけるG色のLPF値とR色のLPF値を算出し(ステップS41、S42)、その比に所定の定数rを乗じた値を低周波成分の比とする(ステップS43)。
次に、選択した注目画素位置におけるG色のHPF値とR色のHPF値を算出する(ステップS44、S45)。更に、注目画素とその周辺の画素の信号を用いて彩度係数βを算出し(ステップS46)、彩度係数βと所定の定数qをR色とG色のHPF値の差に乗じて非相関値を算出する(ステップS47)。
そして、注目画素位置におけるR色信号に非相関値を加算し、更に低周波成分の比を乗じてG色信号を算出する(ステップS48)。得られたG色信号の値は2次元メモリ6gへ出力する(ステップS49)。以上の処理をR信号が予め存在する全ての画素について繰り返し実行する(ステップS50)。
ステップS2〜S6の処理も、ステップS1と同様である。即ち、ステップS2〜S6の各々の手順は、図35のフローチャートの「R」と「G」を、注目画素の色(h)と補間により求めたい色(k)に、置き換えたものとして示される。
FIG. 35 is a flowchart showing the procedure of step S1. In step S1, since the missing G signal at the position of the R pixel is calculated, a pixel in which the R signal exists in advance is selected as the target pixel (step S40).
A G-color LPF value and an R-color LPF value at the selected target pixel position are calculated (steps S41 and S42), and a value obtained by multiplying the ratio by a predetermined constant r is used as the low-frequency component ratio (step S43). .
Next, the G-color HPF value and the R-color HPF value at the selected target pixel position are calculated (steps S44 and S45). Further, the saturation coefficient β is calculated using the signals of the pixel of interest and the surrounding pixels (step S46), and the saturation coefficient β and a predetermined constant q are multiplied by the difference between the HPF values of the R color and the G color to calculate A correlation value is calculated (step S47).
Then, a non-correlation value is added to the R color signal at the target pixel position, and the G color signal is calculated by multiplying the low frequency component ratio (step S48). The obtained G color signal value is output to the two-dimensional memory 6g (step S49). The above processing is repeatedly executed for all pixels in which the R signal is present in advance (step S50).
The processing of steps S2 to S6 is the same as that of step S1. That is, each procedure of steps S2 to S6 is shown as replacing “R” and “G” in the flowchart of FIG. 35 with the color (h) of the pixel of interest and the color (k) to be obtained by interpolation. .

図35に示す各ステップと図1、図12、図16、図30に示す部材との対応関係は以下の通りである。即ち、ステップS40の処理は、選択手段21及び制御手段(図12、図30の制御手段30a、30bはその一部をなすが、その全体は図示されていない)における処理に対応し、ステップS41の処理は、ローパスフィルタ8g及び選択手段24kにおける処理に対応し、ステップS42の処理は、ローパスフィルタ8r及び選択手段24hにおける処理に対応し、ステップS43の処理は、比計算手段32及び係数乗算手段28における処理に対応し、ステップS44の処理は、ハイパスフィルタ7g及び選択手段23kにおける処理に対応し、ステップS45の処理は、ハイパスフィルタ7r及び選択手段23hにおける処理に対応し、ステップS46の処理は、彩度係数算出手段9における処理に対応し、ステップS47の処理は、差計算手段25及び係数乗算手段27における処理に対応し、ステップS48の処理は、加算手段33及び乗算手段34における処理に対応し、ステップS49の処理は、演算手段10から2次元メモリ6r、6g、6bへのデータ転送、書き込みに対応する。
ステップS50及び各ステップにおける各手段の制御は、制御手段(図12、図30の制御手段30a、30bはその一部をなすが、その全体は図示されていない)によって行われる。
Correspondences between the steps shown in FIG. 35 and the members shown in FIGS. 1, 12, 16, and 30 are as follows. That is, the processing in step S40 corresponds to the processing in the selection means 21 and the control means (the control means 30a and 30b in FIGS. 12 and 30 form part of them, but the whole is not shown), and step S41. The processing in step S42 corresponds to the processing in the low-pass filter 8r and the selection unit 24h, and the processing in step S43 includes the ratio calculation unit 32 and the coefficient multiplication unit. 28 corresponds to the processing in the high-pass filter 7g and the selection means 23k, the processing in step S45 corresponds to the processing in the high-pass filter 7r and the selection means 23h, and the processing in step S46 is Corresponding to the processing in the saturation coefficient calculation means 9, the processing in step S47 is Corresponding to the processing in the difference calculating means 25 and the coefficient multiplying means 27, the processing in step S48 corresponds to the processing in the adding means 33 and the multiplying means 34, and the processing in step S49 is performed from the computing means 10 to the two-dimensional memories 6r, 6g. , 6b corresponds to data transfer and writing.
Control of each means in step S50 and each step is performed by a control means (the control means 30a and 30b in FIGS. 12 and 30 form a part thereof, but the whole is not shown).

図35のステップS46における処理は、図28のステップS16と同様、図29に示すように行い得る。   The process in step S46 of FIG. 35 can be performed as shown in FIG. 29 as in step S16 of FIG.

実施の形態1及び2において、各色の信号を生成する順序は図21に示した順序に限るものではなく、信号を生成する順序を入れ替えても差し支えない。例えば、ステップS1とステップS2、ステップS3とステップS4、ステップS5とステップS6は演算の順序を差し替えることができる。   In Embodiments 1 and 2, the order of generating the signals of each color is not limited to the order shown in FIG. 21, and the order of generating the signals may be changed. For example, step S1 and step S2, step S3 and step S4, step S5 and step S6 can be changed in order of calculation.

また、実施の形態1及び2において、LPF及びHPFを2次元のフィルタリングを行う演算式を記載したが、補間対象画素の周囲における出力信号の相関性の判定を行い、相関性の強いと判断された方向に並んだ画素の出力信号のみを用いてHPF及びLPFの出力値として用いても良い。   In Embodiments 1 and 2, the arithmetic expression for performing two-dimensional filtering on the LPF and HPF is described. However, the correlation of the output signal around the interpolation target pixel is determined, and the correlation is determined to be strong. Alternatively, the output values of the HPF and LPF may be used by using only the output signals of the pixels arranged in the same direction.

実施の形態1及び2で説明した方法で補間を行うと、各信号(R,G,B)間に相関があるときは、相関を利用した画素補間を行うことができ、画像のエッジ部分など相関が無い箇所においても、精度の高い画素補間を行うことができ、上記特許文献1(特開2001−197512号公報)に開示された方法が抱える、色の境界付近での黒ずみや白抜けなどの画像劣化が発生すると言う問題が著しく改善される。   When interpolation is performed by the method described in the first and second embodiments, when there is a correlation between each signal (R, G, B), pixel interpolation using the correlation can be performed, such as an edge portion of an image. Even in a portion where there is no correlation, pixel interpolation with high accuracy can be performed, and blackening and white spots in the vicinity of the color boundary, which the method disclosed in Patent Document 1 (Japanese Patent Laid-Open No. 2001-197512) has, are included. The problem that the image degradation occurs is remarkably improved.

この発明の実施の形態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. ベイヤ型に配置されたR、G、Bの3原色の色フィルタを示す説明図である。It is explanatory drawing which shows the color filter of three primary colors of R, G, and B arrange | positioned at a Bayer type. イメージセンサの撮像面上における、R画素の配置を示す図である。It is a figure which shows arrangement | positioning of R pixel on the imaging surface of an image sensor. イメージセンサの撮像面上における、G画素の配置を示す図である。It is a figure which shows arrangement | positioning of G pixel on the imaging surface of an image sensor. イメージセンサの撮像面上における、B画素の配置を示す図である。It is a figure which shows arrangement | positioning of B pixel on the imaging surface of an image sensor. R信号のLPF値を示す図である。It is a figure which shows the LPF value of R signal. G信号のLPF値を示す図である。It is a figure which shows the LPF value of G signal. B信号のLPF値を示す図である。It is a figure which shows the LPF value of B signal. R信号のHPF値を示す図である。It is a figure which shows the HPF value of R signal. G信号のHPF値を示す図である。It is a figure which shows the HPF value of G signal. B信号のHPF値を示す図である。It is a figure which shows the HPF value of B signal. 実施の形態1の非相関値算出手段の構成例を示すブロック図である。3 is a block diagram illustrating a configuration example of a decorrelation value calculation unit according to Embodiment 1. FIG. 実施の形態1の演算手段の構成例を示すブロック図である。FIG. 3 is a block diagram illustrating a configuration example of a calculation unit according to the first embodiment. 彩度cと彩度係数βの関係の一例を示す図である。It is a figure which shows an example of the relationship between saturation c and saturation coefficient (beta). 彩度cと彩度係数βの関係の一例を示す図である。It is a figure which shows an example of the relationship between saturation c and saturation coefficient (beta). 実施の形態1の彩度係数算出手段の構成例を示すブロック図である。3 is a block diagram illustrating a configuration example of a saturation coefficient calculation unit according to Embodiment 1. FIG. k信号とh信号の間に正の相関がある場合の、実施の形態1の画素補間の原理を模式的に示す説明図である。FIG. 3 is an explanatory diagram schematically illustrating the principle of pixel interpolation according to the first embodiment when there is a positive correlation between a k signal and an h signal. k信号とh信号の間に相関がない場合の、実施の形態1の画素補間の原理を模式的に示す説明図である。FIG. 3 is an explanatory diagram schematically illustrating the principle of pixel interpolation according to the first embodiment when there is no correlation between a k signal and an h signal. k信号とh信号の間に相関がない場合の、実施の形態1の画素補間の原理を模式的に示す説明図である。FIG. 3 is an explanatory diagram schematically illustrating the principle of pixel interpolation according to the first embodiment when there is no correlation between a k signal and an h signal. k信号とh信号の間に負の相関がある場合の、実施の形態1の画素補間の原理を模式的に示す説明図である。FIG. 4 is an explanatory diagram schematically illustrating the principle of pixel interpolation according to the first embodiment when there is a negative correlation between a k signal and an h signal. この発明の実施の形態1、2における補間手順を示すフローチャートである。It is a flowchart which shows the interpolation procedure in Embodiment 1, 2 of this invention. R画素位置における画素補間したG信号の配列を示す図である。It is a figure which shows the arrangement | sequence of G signal which carried out the pixel interpolation in R pixel position. B画素位置における画素補間したG信号の配列を示す図である。It is a figure which shows the arrangement | sequence of G signal which interpolated the pixel in a B pixel position. G画素位置における画素補間したR信号の配列を示す図である。It is a figure which shows the arrangement | sequence of the R signal which carried out the pixel interpolation in the G pixel position. G画素位置における画素補間したB信号の配列を示す図である。It is a figure which shows the arrangement | sequence of the B signal which carried out pixel interpolation in the G pixel position. B画素位置における画素補間したR信号の配列を示す図である。It is a figure which shows the arrangement | sequence of R signal which interpolated the pixel in a B pixel position. R画素位置における画素補間したB信号の配列を示す図である。It is a figure which shows the arrangement | sequence of the B signal which carried out the pixel interpolation in the R pixel position. この発明の実施の形態1において、R画素位置のG信号を補間する手順を示すフローチャートである。In Embodiment 1 of this invention, it is a flowchart which shows the procedure which interpolates G signal of R pixel position. この発明の実施の形態1、2において、彩度係数βを算出する手順を示すフローチャートである。5 is a flowchart showing a procedure for calculating a saturation coefficient β in the first and second embodiments of the present invention. 実施の形態2の演算手段の構成例を示すブロック図である。6 is a block diagram illustrating a configuration example of a calculation unit according to Embodiment 2. FIG. k信号とh信号の間に正の相関がある場合の、実施の形態2の画素補間の原理を模式的に示す説明図である。It is explanatory drawing which shows typically the principle of the pixel interpolation of Embodiment 2 when there exists a positive correlation between k signal and h signal. k信号とh信号の間に相関がない場合の、実施の形態2の画素補間の原理を模式的に示す説明図である。It is explanatory drawing which shows typically the principle of the pixel interpolation of Embodiment 2 when there is no correlation between k signal and h signal. k信号とh信号の間に相関がない場合の、実施の形態2の画素補間の原理を模式的に示す説明図である。It is explanatory drawing which shows typically the principle of the pixel interpolation of Embodiment 2 when there is no correlation between k signal and h signal. k信号とh信号の間に負の相関がある場合の、実施の形態2の画素補間の原理を模式的に示す説明図である。It is explanatory drawing which shows typically the principle of the pixel interpolation of Embodiment 2 when there exists a negative correlation between k signal and h signal. この発明の実施の形態2において、R画素位置のG信号を補間する手順を示すフローチャートである。In Embodiment 2 of this invention, it is a flowchart which shows the procedure which interpolates G signal of R pixel position.

符号の説明Explanation of symbols

1 レンズ、 2 イメージセンサ、 3 A/D変換器、 4 フレームメモリ、 5 デマルチプレクサ、 6r R信号用2次元メモリ、 6g G信号用2次元メモリ、 6b B信号用2次元メモリ、 7r R信号用HPF、 8r R信号用LPF、 7g G信号用HPF、 8g G信号用LPF、 7b B信号用HPF、 8b B信号用LPF、 9 彩度係数算出手段、 10 演算手段、 11 出力端子、 12 非相関値算出手段、 21、23h、23k、24h、24k 選択手段、 25、26 差計算手段、 27、28 係数乗算手段、 29 加算手段、 30 制御手段、 32 比計算手段、 33 加算手段、 34 乗算手段。
1 lens, 2 image sensor, 3 A / D converter, 4 frame memory, 5 demultiplexer, 2D memory for 6r R signal, 2D memory for 6g G signal, 2D memory for 6b B signal, 7r for R signal HPF, 8r R signal LPF, 7g G signal HPF, 8g G signal LPF, 7b B signal HPF, 8b B signal LPF, 9 saturation coefficient calculation means, 10 calculation means, 11 output terminal, 12 uncorrelated Value calculation means 21, 23h, 23k, 24h, 24k selection means, 25, 26 difference calculation means, 27, 28 coefficient multiplication means, 29 addition means, 30 control means, 32 ratio calculation means, 33 addition means, 34 multiplication means .

Claims (14)

2次元平面上に配列され、各々が第1乃至第Nの分光感度特性のうちのいずれか1つを有する画素信号の組に基づき、第h(hは1からNのうちのいずれか一つ)の分光感度特性の画素信号が存在する補間対象画素位置における第k(kはhを除く1からNのうちのいずれか一つ)の分光感度特性の画素信号を生成する画素信号処理装置において、
上記補間対象画素位置の近傍の領域内の複数の画素位置における、上記第hの分光感度特性の画素信号の低周波数成分を生成するh信号低周波成分生成手段と、
上記補間対象画素位置の近傍の領域内の複数の画素位置における、上記第hの分光感度特性の画素信号の変化成分を生成するh信号変化成分生成手段と、
上記補間対象画素位置の近傍の領域内の複数の画素位置における、上記第kの分光感度特性の画素信号の低周波数成分を生成するk信号低周波成分生成手段と、
上記補間対象画素位置の近傍の領域内の複数の画素位置における、上記第kの分光感度特性の画素信号の変化成分を生成するk信号変化成分生成手段と、
上記補間対象画素位置の近傍の領域内の複数の画素位置における画素信号の彩度に基づいて彩度係数を算出する彩度係数算出手段と、
上記k信号変化成分生成手段によって得られた値と上記h信号変化成分生成手段によって得られた値の差と上記彩度係数とに基づいて定められる上記第kの信号と上記第hの信号との非相関値と、上記k信号低周波成分生成手段によって得られた値と上記h信号低周波成分生成手段によって得られた値の差と、上記補間対象画素位置における上記第hの画素信号とを加算して、補間対象画素位置における上記第kの画素信号を求める補間値演算手段と
を有する画素信号処理装置。
Based on a set of pixel signals arranged on a two-dimensional plane and each having any one of the first to Nth spectral sensitivity characteristics, the hth (h is any one of 1 to N) In the pixel signal processing device that generates the pixel signal of the kth (k is any one of 1 to N except h) spectral signal at the interpolation target pixel position where the pixel signal of the spectral sensitivity characteristic exists. ,
H signal low frequency component generating means for generating a low frequency component of the pixel signal of the h-th spectral sensitivity characteristic at a plurality of pixel positions in a region in the vicinity of the interpolation target pixel position;
H signal change component generation means for generating a change component of the pixel signal of the h-th spectral sensitivity characteristic at a plurality of pixel positions in a region in the vicinity of the interpolation target pixel position;
K-signal low-frequency component generating means for generating low-frequency components of the pixel signal of the k-th spectral sensitivity characteristic at a plurality of pixel positions in a region in the vicinity of the interpolation target pixel position;
K signal change component generation means for generating a change component of the pixel signal of the kth spectral sensitivity characteristic at a plurality of pixel positions in a region in the vicinity of the interpolation target pixel position;
A saturation coefficient calculation means for calculating a saturation coefficient based on the saturation of the pixel signal at a plurality of pixel positions in a region in the vicinity of the interpolation target pixel position;
The k-th signal and the h-th signal determined based on the difference between the value obtained by the k signal change component generation means and the value obtained by the h signal change component generation means and the saturation coefficient; , The difference between the value obtained by the k signal low frequency component generation means and the value obtained by the h signal low frequency component generation means, the h th pixel signal at the interpolation target pixel position, And interpolated value calculation means for obtaining the k-th pixel signal at the interpolation target pixel position.
2次元平面上に配列され、各々が第1乃至第Nの分光感度特性のうちのいずれか1つを有する画素信号の組に基づき、第h(hは1からNのうちのいずれか一つ)の分光感度特性の画素信号が存在する補間対象画素位置における第k(kはhを除く1からNのうちのいずれか一つ)の分光感度特性の画素信号を生成する画素信号処理装置において、
上記補間対象画素位置の近傍の領域内の複数の画素位置における、上記第hの分光感度特性の画素信号の低周波数成分を生成するh信号低周波成分生成手段と、
上記補間対象画素位置の近傍の領域内の複数の画素位置における、上記第hの分光感度特性の画素信号の変化成分を生成するh信号変化成分生成手段と、
上記補間対象画素位置の近傍の領域内の複数の画素位置における、上記第kの分光感度特性の画素信号の低周波数成分を生成するk信号低周波成分生成手段と、
上記補間対象画素位置の近傍の領域内の複数の画素位置における、上記第kの分光感度特性の画素信号の変化成分を生成するk信号変化成分生成手段と、
上記補間対象画素位置の近傍の領域内の複数の画素位置における画素信号の彩度に基づいて彩度係数を算出する彩度係数算出手段と、
上記k信号変化成分生成手段によって得られた値と上記h信号変化成分生成手段によって得られた値の差と、上記彩度係数とに基づいて定められる上記第kの信号と上記第hの信号との非相関値と、上記補間対象画素位置における上記第hの画素信号との和に、上記k信号低周波成分生成手段によって得られた値と上記h信号低周波成分生成手段によって得られた値の比を乗じて、補間対象画素位置における上記第kの画素信号を求める補間値演算手段と
を有する画素信号処理装置。
Based on a set of pixel signals arranged on a two-dimensional plane and each having any one of the first to Nth spectral sensitivity characteristics, the hth (h is any one of 1 to N) In the pixel signal processing device that generates the pixel signal of the kth (k is any one of 1 to N except h) spectral signal at the interpolation target pixel position where the pixel signal of the spectral sensitivity characteristic exists. ,
H signal low frequency component generating means for generating a low frequency component of the pixel signal of the h-th spectral sensitivity characteristic at a plurality of pixel positions in a region in the vicinity of the interpolation target pixel position;
H signal change component generation means for generating a change component of the pixel signal of the h-th spectral sensitivity characteristic at a plurality of pixel positions in a region in the vicinity of the interpolation target pixel position;
K-signal low-frequency component generating means for generating low-frequency components of the pixel signal of the k-th spectral sensitivity characteristic at a plurality of pixel positions in a region in the vicinity of the interpolation target pixel position;
K signal change component generation means for generating a change component of the pixel signal of the kth spectral sensitivity characteristic at a plurality of pixel positions in a region in the vicinity of the interpolation target pixel position;
A saturation coefficient calculation means for calculating a saturation coefficient based on the saturation of the pixel signal at a plurality of pixel positions in a region in the vicinity of the interpolation target pixel position;
The kth signal and the hth signal determined based on the difference between the value obtained by the k signal change component generation means and the value obtained by the h signal change component generation means and the saturation coefficient. Obtained by the k signal low frequency component generation means and the h signal low frequency component generation means to the sum of the non-correlation value and the h th pixel signal at the interpolation target pixel position. An interpolation value calculating means for multiplying the ratio of the values to obtain the k-th pixel signal at the interpolation target pixel position.
上記補間値算出手段は、上記k信号変化成分生成手段によって得られた値と上記h信号変化成分生成手段によって得られた値の差に、上記彩度係数及び所定の係数を乗じた値を上記非相関値とすることを特徴とする請求項1又は2に記載の画素信号処理装置。   The interpolation value calculation means is a value obtained by multiplying the difference between the value obtained by the k signal change component generation means and the value obtained by the h signal change component generation means by the saturation coefficient and a predetermined coefficient. The pixel signal processing apparatus according to claim 1, wherein the pixel signal processing apparatus has an uncorrelated value. 上記彩度係数算出手段は、
上記補間対象画素位置の近傍の領域内の複数の画素位置における画素信号の彩度が高い場合には、彩度が低い場合よりも彩度係数を大きくすることを特徴とする請求項1及至3のいずれかに記載の画素信号処理装置。
The saturation coefficient calculation means is
4. The saturation coefficient is increased when the saturation of pixel signals at a plurality of pixel positions in a region in the vicinity of the interpolation target pixel position is higher than when the saturation is low. The pixel signal processing device according to any one of the above.
上記彩度係数算出手段は、
上記補間対象画素位置の近傍の領域内の複数の画素位置における画素信号から、第1及至第Nの分光感度特性毎にそれぞれの分光感度特性を有する画素の信号の平均値を算出し、異なる分光感度特性の画素信号の平均値の間の差の大きさから彩度を算出する
ことを特徴とする請求項1及至4のいずれかに記載の画素信号処理装置。
The saturation coefficient calculation means is
An average value of signals of pixels having respective spectral sensitivity characteristics is calculated for each of the first to Nth spectral sensitivity characteristics from pixel signals at a plurality of pixel positions in a region in the vicinity of the interpolation target pixel position, and different spectral values are obtained. The pixel signal processing apparatus according to any one of claims 1 to 4, wherein the saturation is calculated from a magnitude of a difference between average values of pixel signals of sensitivity characteristics.
上記彩度係数算出手段は、
上記補間対象画素位置の近傍の領域内の複数の画素位置における画素信号から、全画素の信号の平均値、及び第1及至第Nの分光感度特性毎にそれぞれの分光感度特性を有する画素の信号それぞれの平均値を算出し、全画素信号の平均値と、第1及至第Nの分光感度特性の各々の画素の信号の平均値との差の大きさから彩度を算出する
ことを特徴とする請求項1及至4のいずれかに記載の画素信号処理装置。
The saturation coefficient calculation means is
From pixel signals at a plurality of pixel positions in a region in the vicinity of the interpolation target pixel position, an average value of signals of all pixels, and signals of pixels having respective spectral sensitivity characteristics for each of the first to Nth spectral sensitivity characteristics Each of the average values is calculated, and the saturation is calculated from the magnitude of the difference between the average value of all the pixel signals and the average value of the signals of each pixel of the first to Nth spectral sensitivity characteristics. The pixel signal processing device according to claim 1.
上記第1から第Nの分光感度特性を有する画素がR、G、B画素の3種の画素であることを特徴とする請求項1及至6に記載の画素信号処理装置。   7. The pixel signal processing apparatus according to claim 1, wherein the pixels having the first to N-th spectral sensitivity characteristics are three types of R, G, and B pixels. 2次元平面上に配列され、各々が第1乃至第Nの分光感度特性のうちのいずれか1つを有する画素信号の組に基づき、第h(hは1からNのうちのいずれか一つ)の分光感度特性の画素信号が存在する補間対象画素位置における第k(kはhを除く1からNのうちのいずれか一つ)の分光感度特性の画素信号を生成する画素信号処理方法において、
上記補間対象画素位置の近傍の領域内の複数の画素位置における、上記第hの分光感度特性の画素信号の低周波数成分を生成するh信号低周波成分生成ステップと、
上記補間対象画素位置の近傍の領域内の複数の画素位置における、上記第hの分光感度特性の画素信号の変化成分を生成するh信号変化成分生成ステップと、
上記補間対象画素位置の近傍の領域内の複数の画素位置における、上記第kの分光感度特性の画素信号の低周波数成分を生成するk信号低周波成分生成ステップと、
上記補間対象画素位置の近傍の領域内の複数の画素位置における、上記第kの分光感度特性の画素信号の変化成分を生成するk信号変化成分生成ステップと、
上記補間対象画素位置の近傍の領域内の複数の画素位置における画素信号の彩度に基づいて彩度係数を算出する彩度係数算出ステップと、
上記k信号変化成分生成ステップによって得られた値と上記h信号変化成分生成ステップによって得られた値の差と上記彩度係数とに基づいて定められる上記第kの信号と上記第hの信号との非相関値と、上記k信号低周波成分生成ステップによって得られた値と上記h信号低周波成分生成ステップによって得られた値の差と、上記補間対象画素位置における上記第hの画素信号とを加算して、補間対象画素位置における上記第kの画素信号を求める補間値演算ステップと
を有する画素信号処理方法。
Based on a set of pixel signals arranged on a two-dimensional plane and each having any one of the first to Nth spectral sensitivity characteristics, the hth (h is any one of 1 to N) In the pixel signal processing method for generating a pixel signal of the kth spectral sensitivity characteristic (k is any one of 1 to N excluding h) at the pixel position to be interpolated where the pixel signal of the spectral sensitivity characteristic of ,
An h signal low frequency component generating step for generating a low frequency component of the pixel signal of the h-th spectral sensitivity characteristic at a plurality of pixel positions in a region in the vicinity of the interpolation target pixel position;
An h signal change component generation step for generating a change component of a pixel signal of the h-th spectral sensitivity characteristic at a plurality of pixel positions in a region in the vicinity of the interpolation target pixel position;
A k-signal low-frequency component generation step for generating a low-frequency component of the pixel signal of the k-th spectral sensitivity characteristic at a plurality of pixel positions in a region in the vicinity of the interpolation target pixel position;
A k signal change component generation step of generating a change component of a pixel signal of the kth spectral sensitivity characteristic at a plurality of pixel positions in a region in the vicinity of the interpolation target pixel position;
A saturation coefficient calculation step for calculating a saturation coefficient based on the saturation of pixel signals at a plurality of pixel positions in a region in the vicinity of the interpolation target pixel position;
The k-th signal and the h-th signal determined based on the difference between the value obtained by the k signal change component generation step and the value obtained by the h signal change component generation step and the saturation coefficient; , A difference between the value obtained by the k signal low frequency component generation step and the value obtained by the h signal low frequency component generation step, the h th pixel signal at the interpolation target pixel position, And an interpolation value calculating step for obtaining the k-th pixel signal at the interpolation target pixel position.
2次元平面上に配列され、各々が第1乃至第Nの分光感度特性のうちのいずれか1つを有する画素信号の組に基づき、第h(hは1からNのうちのいずれか一つ)の分光感度特性の画素信号が存在する補間対象画素位置における第k(kはhを除く1からNのうちのいずれか一つ)の分光感度特性の画素信号を生成する画素信号処理方法において、
上記補間対象画素位置の近傍の領域内の複数の画素位置における、上記第hの分光感度特性の画素信号の低周波数成分を生成するh信号低周波成分生成ステップと、
上記補間対象画素位置の近傍の領域内の複数の画素位置における、上記第hの分光感度特性の画素信号の変化成分を生成するh信号変化成分生成ステップと、
上記補間対象画素位置の近傍の領域内の複数の画素位置における、上記第kの分光感度特性の画素信号の低周波数成分を生成するk信号低周波成分生成ステップと、
上記補間対象画素位置の近傍の領域内の複数の画素位置における、上記第kの分光感度特性の画素信号の変化成分を生成するk信号変化成分生成ステップと、
上記補間対象画素位置の近傍の領域内の複数の画素位置における画素信号の彩度に基づいて彩度係数を算出する彩度係数算出ステップと、
上記k信号変化成分生成ステップによって得られた値と上記h信号変化成分生成ステップによって得られた値の差と、上記彩度係数とに基づいて定められる上記第kの信号と上記第hの信号との非相関値と、上記補間対象画素位置における上記第hの画素信号との和に、上記k信号低周波成分生成ステップによって得られた値と上記h信号低周波成分生成ステップによって得られた値の比を乗じて、補間対象画素位置における上記第kの画素信号を求める補間値演算ステップと
を有する画素信号処理方法。
Based on a set of pixel signals arranged on a two-dimensional plane and each having any one of the first to Nth spectral sensitivity characteristics, the hth (h is any one of 1 to N) In the pixel signal processing method for generating a pixel signal of the kth spectral sensitivity characteristic (k is any one of 1 to N excluding h) at the pixel position to be interpolated where the pixel signal of the spectral sensitivity characteristic of ,
An h signal low frequency component generating step for generating a low frequency component of the pixel signal of the h-th spectral sensitivity characteristic at a plurality of pixel positions in a region in the vicinity of the interpolation target pixel position;
An h signal change component generation step for generating a change component of a pixel signal of the h-th spectral sensitivity characteristic at a plurality of pixel positions in a region in the vicinity of the interpolation target pixel position;
A k-signal low-frequency component generation step for generating a low-frequency component of the pixel signal of the k-th spectral sensitivity characteristic at a plurality of pixel positions in a region in the vicinity of the interpolation target pixel position;
A k signal change component generation step of generating a change component of a pixel signal of the kth spectral sensitivity characteristic at a plurality of pixel positions in a region in the vicinity of the interpolation target pixel position;
A saturation coefficient calculation step for calculating a saturation coefficient based on the saturation of pixel signals at a plurality of pixel positions in a region in the vicinity of the interpolation target pixel position;
The kth signal and the hth signal determined based on the difference between the value obtained by the k signal change component generation step and the value obtained by the h signal change component generation step, and the saturation coefficient. Obtained by the k signal low frequency component generation step and the h signal low frequency component generation step to the sum of the non-correlation value and the h th pixel signal at the interpolation target pixel position. An interpolation value calculating step of multiplying a ratio of the values to obtain the k-th pixel signal at the interpolation target pixel position.
上記補間値算出ステップは、上記k信号変化成分生成ステップによって得られた値と上記h信号変化成分生成ステップによって得られた値の差に、上記彩度係数及び所定の係数を乗じた値を上記非相関値とすることを特徴とする請求項8又は9に記載の画素信号処理方法。   In the interpolation value calculating step, the difference between the value obtained in the k signal change component generation step and the value obtained in the h signal change component generation step is multiplied by the saturation coefficient and a predetermined coefficient. The pixel signal processing method according to claim 8 or 9, wherein a non-correlation value is used. 上記彩度係数算出ステップは、
上記補間対象画素位置の近傍の領域内の複数の画素位置における画素信号の彩度が高い場合には、彩度が低い場合よりも彩度係数を大きくすることを特徴とする請求項8及至10のいずれかに記載の画素信号処理方法。
The saturation coefficient calculation step includes
11. The saturation coefficient is increased when the saturation of pixel signals at a plurality of pixel positions in a region in the vicinity of the interpolation target pixel position is higher than when the saturation is low. The pixel signal processing method according to any one of the above.
上記彩度係数算出ステップは、
上記補間対象画素位置の近傍の領域内の複数の画素位置における画素信号から、第1及至第Nの分光感度特性毎にそれぞれの分光感度特性を有する画素の信号の平均値を算出し、異なる分光感度特性の画素信号の平均値の間の差の大きさから彩度を算出する
ことを特徴とする請求項8及至11のいずれかに記載の画素信号処理方法。
The saturation coefficient calculation step includes
An average value of signals of pixels having respective spectral sensitivity characteristics is calculated for each of the first to Nth spectral sensitivity characteristics from pixel signals at a plurality of pixel positions in a region in the vicinity of the interpolation target pixel position, and different spectral values are obtained. The pixel signal processing method according to any one of claims 8 to 11, wherein the saturation is calculated from a magnitude of a difference between average values of pixel signals of sensitivity characteristics.
上記彩度係数算出ステップは、
上記補間対象画素位置の近傍の領域内の複数の画素位置における画素信号から、全画素の信号の平均値、及び第1及至第Nの分光感度特性毎にそれぞれの分光感度特性を有する画素の信号それぞれの平均値を算出し、全画素信号の平均値と、第1及至第Nの分光感度特性の各々の画素の信号の平均値との差の大きさから彩度を算出する
ことを特徴とする請求項8及至11のいずれかに記載の画素信号処理方法。
The saturation coefficient calculation step includes
From pixel signals at a plurality of pixel positions in a region in the vicinity of the interpolation target pixel position, an average value of signals of all pixels, and signals of pixels having respective spectral sensitivity characteristics for each of the first to Nth spectral sensitivity characteristics Each of the average values is calculated, and the saturation is calculated from the magnitude of the difference between the average value of all the pixel signals and the average value of the signals of each pixel of the first to Nth spectral sensitivity characteristics. The pixel signal processing method according to any one of claims 8 to 11.
上記第1から第Nの分光感度特性を有する画素がR、G、B画素の3種の画素であることを特徴とする請求項8及至13に記載の画素信号処理方法。   14. The pixel signal processing method according to claim 8, wherein the pixels having the first to Nth spectral sensitivity characteristics are R, G, and B pixels.
JP2005022708A 2005-01-31 2005-01-31 Pixel signal processing apparatus and method Expired - Fee Related JP4334484B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005022708A JP4334484B2 (en) 2005-01-31 2005-01-31 Pixel signal processing apparatus and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005022708A JP4334484B2 (en) 2005-01-31 2005-01-31 Pixel signal processing apparatus and method

Publications (2)

Publication Number Publication Date
JP2006211466A JP2006211466A (en) 2006-08-10
JP4334484B2 true JP4334484B2 (en) 2009-09-30

Family

ID=36967803

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005022708A Expired - Fee Related JP4334484B2 (en) 2005-01-31 2005-01-31 Pixel signal processing apparatus and method

Country Status (1)

Country Link
JP (1) JP4334484B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5780786B2 (en) * 2011-03-15 2015-09-16 三菱電機株式会社 Imaging device

Also Published As

Publication number Publication date
JP2006211466A (en) 2006-08-10

Similar Documents

Publication Publication Date Title
KR100755601B1 (en) Pixel signal processor and pixel signal processing method
JP2004241991A (en) Imaging apparatus, image processor, and image processing program
US20050195299A1 (en) Preventing green non-uniformity in image sensors
KR20180118790A (en) Image processing apparatus, image processing method, recording medium, program and image capturing apparatus
KR100768619B1 (en) Pixel signal processing device and method
JP6282123B2 (en) Image processing apparatus, image processing method, and program
JP5353945B2 (en) Image processing apparatus, image processing program, and electronic camera
US6747698B2 (en) Image interpolating device
JP5786355B2 (en) Defocus amount detection device and electronic camera
JPWO2006059365A1 (en) Image processing device, non-imaging color signal calculation device, and image processing method
JP4334484B2 (en) Pixel signal processing apparatus and method
JP4962293B2 (en) Image processing apparatus, image processing method, and program
JP4334496B2 (en) Pixel signal processing apparatus and pixel signal processing method
JP5036524B2 (en) Image processing apparatus, image processing method, program, and imaging apparatus
JP4334488B2 (en) Pixel signal processing apparatus and method
JP3711402B2 (en) Imaging apparatus and color imaging signal processing method
JP4334150B2 (en) Image interpolation device
JP2003134523A (en) Image pickup apparatus and method
JP6976789B2 (en) Imaging device and imaging method
JP4486874B2 (en) Method of generating correction approximate straight line group information of multi-division readout CCD and method of manufacturing multi-division readout CCD correction processor
JP4334152B2 (en) Image interpolation device
JP4334151B2 (en) Image interpolation device
JP2023082340A (en) Image processing device and image processing method, imaging apparatus and program
JP4666786B2 (en) Image interpolation device
JP2000278703A (en) Image pickup device and method for processing color image pickup signal

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20070228

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20090611

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

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

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

Free format text: PAYMENT UNTIL: 20120703

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 4334484

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20120703

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20130703

Year of fee payment: 4

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees