JPH11150663A - Interpolation device and recording medium recording interpolation processing program - Google Patents

Interpolation device and recording medium recording interpolation processing program

Info

Publication number
JPH11150663A
JPH11150663A JP9315036A JP31503697A JPH11150663A JP H11150663 A JPH11150663 A JP H11150663A JP 9315036 A JP9315036 A JP 9315036A JP 31503697 A JP31503697 A JP 31503697A JP H11150663 A JPH11150663 A JP H11150663A
Authority
JP
Japan
Prior art keywords
average
interpolation
horizontal
vertical
inclination
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP9315036A
Other languages
Japanese (ja)
Inventor
Takeshi Utagawa
健 歌川
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.)
Nikon Corp
Original Assignee
Nikon 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 Nikon Corp filed Critical Nikon Corp
Priority to JP9315036A priority Critical patent/JPH11150663A/en
Publication of JPH11150663A publication Critical patent/JPH11150663A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

(57)【要約】 【課題】 本発明は、予め決められた色を出力する格子
点と該色を出力しない空格子点とが市松模様状に配され
た画像の補間を行う補間装置およびこのような画像の補
間処理プログラムを記録した記録媒体に関し、空格子点
の空間的な方向性を隣接する格子点の画素出力に基づい
て推定し、その空格子点の補間量を精度良く求めること
を目的とする。 【解決手段】 補間装置において、空格子点に対して水
平方向に隣接する2つの格子点の画素出力の差を示す横
傾斜HDと、空格子点に対して垂直方向に隣接する2つ
の格子点の画素出力の差を示す縦傾斜VDとを算出する
傾斜算出手段と、横傾斜HDと縦傾斜VDとを比較し、
任意の値Thについて、「HD>VD+Th」、「VD>H
D+Th」または「|HD−VD|≦Th」が成り立つ場合
に応じて、空格子点の補間量を決定する補間量決定手段
とを備えて構成される。
(57) Abstract: An object of the present invention is to provide an interpolation device for interpolating an image in which lattice points that output a predetermined color and empty lattice points that do not output the color are arranged in a checkered pattern. With respect to a recording medium on which such an image interpolation processing program is recorded, it is necessary to estimate the spatial directionality of a vacancy based on the pixel output of an adjacent lattice point, and to accurately obtain the interpolation amount of the vacancy. Aim. SOLUTION: In an interpolation device, a horizontal slope HD indicating a difference between pixel outputs of two grid points horizontally adjacent to an empty grid point, and two grid points vertically adjacent to the empty grid point. Comparing the horizontal slope HD and the vertical slope VD with the slope calculating means for calculating the vertical slope VD indicating the difference between the pixel outputs of
For an arbitrary value Th, “HD> VD + Th”, “VD> H
D + Th ”or“ | HD−VD | ≦ Th ”is satisfied, and an interpolation amount determining unit that determines an interpolation amount of a vacant point is configured.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、予め決められた色
を出力する格子点と該色を出力しない空格子点とが市松
模様状に配された画像の補間を行う補間装置およびこの
ような画像の補間処理プログラムを記録した記録媒体に
関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an interpolation device for interpolating an image in which lattice points for outputting a predetermined color and empty lattice points for not outputting the color are arranged in a checkered pattern, and to such an interpolation apparatus. The present invention relates to a recording medium on which an image interpolation processing program is recorded.

【0002】[0002]

【従来の技術】電子カメラには、カラー画像の画像信号
を生成する際、単一の撮像素子を用いるものがある。こ
のような撮像素子は、例えば図12(1)に示すよう
に、RGB(赤色・緑色・青色)の3色のカラーフィル
タがベイア配列されて構成される。ここで、緑色(G)
に着目すると、撮像素子は、図12(2)に示すように
緑色を出力する画素である格子点と、緑色を出力しない
画素である空格子点とが市松模様状に配されて構成され
ていると言える。
2. Description of the Related Art Some electronic cameras use a single image sensor to generate an image signal of a color image. As shown in FIG. 12A, for example, such an image sensor includes three color filters of RGB (red, green, and blue) arranged in a Bayer array. Where green (G)
Focusing on, as shown in FIG. 12 (2), the image sensor is configured by arranging lattice points that are pixels that output green and empty lattice points that are pixels that do not output green in a checkered pattern. It can be said that there is.

【0003】また、図13(1)に示すような緑色
(G)のみで構成される2つの撮像素子を画素ずらしし
た構成のカラーフィルタでは、図13(2)に示すよう
に、緑色を出力しない仮想的な空格子点と、緑色を出力
する格子点とが市松模様状に配されて構成されていると
言える。さらに、2板式のカラーフィルタには、一方の
撮像素子がGのみで構成され、他方の撮像素子は、「赤
色を出力する画素」と「青色を出力する画素」とが市松
模様状に配されて構成されるものがある。すなわち、赤
色に着目すると、青色を出力する画素が空格子点とな
り、青色に着目すると、赤色を出力する画素が空格子点
となる。
Further, in a color filter having a configuration in which two image pickup devices composed of only green (G) as shown in FIG. 13A are shifted by pixels, a green color is output as shown in FIG. It can be said that virtual vacant lattice points that do not exist and lattice points that output green color are arranged in a checkered pattern. Further, in the two-plate type color filter, one image sensor is composed of only G, and the other image sensor has “pixels that output red” and “pixels that output blue” arranged in a checkered pattern. Some are configured. That is, when attention is paid to red, pixels that output blue are vacancy points, and when attention is paid to blue, pixels that output red are vacancy points.

【0004】従来、このような撮像素子によって生成さ
れた画像信号に相当するカラー画像の補間を行う方法に
は、空格子点に隣接する格子点の画素出力の平均値を空
格子点の画素出力(補間量)とするものがあった。ま
た、米国特許第5,373,322号明細書(クラス34
8)には、空格子点の空間的な方向性を色傾斜(chromi
nance gradients)によって推定し、類似性の強い方向
に隣接する格子点の画素出力に基づいて補間量を算出す
る技術が開示されている。
Conventionally, a method of interpolating a color image corresponding to an image signal generated by such an image pickup device includes a method of calculating an average value of pixel outputs of lattice points adjacent to a vacant lattice point by calculating a pixel output of the vacant lattice point. (Interpolation amount). Also, US Pat. No. 5,373,322 (Class 34)
8) describes the spatial direction of vacancies by color gradient (chromi
There is disclosed a technique for estimating the amount of interpolation based on pixel outputs of grid points adjacent to each other in a direction of strong similarity by estimating the amount by interpolation.

【0005】図14は、米国特許第5,373,322号
明細書に開示された従来の補間を説明する図である。図
において、G11,G13,・・・,G66などは緑色
(G)の画素出力を示し、R12,R14,・・・,R
56などは赤色(R)の画素出力を示し、B21,B2
3,・・・,B67などは青色(B)の画素出力を示
す。
FIG. 14 is a diagram for explaining the conventional interpolation disclosed in US Pat. No. 5,373,322. In the drawing, G11, G13,..., G66, etc. indicate green (G) pixel outputs, and R12, R14,.
Reference numeral 56 denotes red (R) pixel output, and B21, B2
Reference numerals 3,..., B67, etc. indicate blue (B) pixel outputs.

【0006】上述した米国特許では、R34を出力する
画素の緑色の補間量G34を求める際、水平方向の色傾
斜に関する情報HDiffを HDiff = |((R32+R36)/2)−R34| によって求め、垂直方向の色傾斜に関する情報HDiff
を VDiff = |((R14+R54)/2)−R34| によって求める。
In the above-mentioned US patent, when calculating the green interpolation amount G34 of the pixel outputting R34, information HDiff relating to the color gradient in the horizontal direction is obtained by HDiff = | ((R32 + R36) / 2) -R34 | Information on color gradient in direction HDiff
VDiff = | ((R14 + R54) / 2) -R34 |

【0007】G34の算出方法は、このように求めたH
DiffとVDiffとの大小関係によって場合分けされる。
すなわち、HDiff<VDiffである場合(水平方向の類
似性が強い場合)、G34を G34 = (G33+G35)/2 によって求め、VDiff<HDiffである場合(垂直方向
の類似性が強い場合)、G34を G34 = (G24+G44)/2 によって求め、HDiff=VDiffである場合、G34を G34 = (G24+G44+G33+G35)/4 によって求める。
The method for calculating G34 is H
The cases are classified according to the magnitude relationship between Diff and VDiff.
That is, when HDiff <VDiff (when the similarity in the horizontal direction is strong), G34 is obtained by G34 = (G33 + G35) / 2, and when VDiff <HDiff (when the similarity in the vertical direction is strong), G34 is determined. G34 = (G24 + G44) / 2. If HDiff = VDiff, G34 is determined by G34 = (G24 + G44 + G33 + G35) / 4.

【0008】[0008]

【発明が解決しようとする課題】すなわち、このような
先行技術では、緑色の補間量を求める処理であるにもか
かわらず、緑色の色傾斜に関する情報を赤色の画素出力
に基づいて推定している。そのため、緑色の色傾斜と赤
色の色傾斜との関係が一定でない画像では、「緑色の画
素出力の類似性」と「赤色の画素出力の類似性」とが一
致せず、空格子点の空間的な方向性が誤って推定される
おそれがあった。
That is, in such prior art, information on the color inclination of green is estimated based on the output of the red pixel, even though the processing is for obtaining the amount of interpolation of green. . Therefore, in an image in which the relationship between the green color gradient and the red color gradient is not constant, the “similarity of the green pixel output” does not match the “similarity of the red pixel output”, and the space of the empty grid point There was a risk that the general direction was incorrectly estimated.

【0009】したがって、このように類似性の強い方向
が誤って推定された場合には、適切な補間量を求めるこ
とができず、最悪の場合には画像が破綻する可能性があ
った。そこで、請求項1〜請求項6に記載の発明は、空
格子点の空間的な方向性を隣接する格子点の画素出力に
基づいて推定し、その空格子点の補間量を精度良く求め
る補間装置を提供することを目的とする。
Therefore, when a direction having a strong similarity is erroneously estimated as described above, an appropriate interpolation amount cannot be obtained, and in the worst case, the image may be broken. Therefore, according to the present invention, the spatial direction of a vacancy is estimated based on the pixel output of an adjacent lattice point, and the interpolation amount of the vacancy is accurately obtained. It is intended to provide a device.

【0010】また、請求項7〜請求項9に記載の発明
は、空格子点の空間的な方向性を隣接する格子点の画素
出力に基づいて推定し、その空格子点の補間量を精度良
く求める補間処理プログラムを記録した記録媒体を提供
することを目的とする。
According to the present invention, the spatial directionality of a vacancy is estimated based on the pixel output of an adjacent lattice point, and the interpolation amount of the vacancy is accurately determined. It is an object of the present invention to provide a recording medium in which an interpolation processing program that is frequently obtained is recorded.

【0011】[0011]

【課題を解決するための手段】請求項1に記載の補間装
置は、予め決められた色を出力する格子点と該色を出力
しない空格子点とが市松模様状に配された画像の補間を
行い、該空格子点の画素出力となる補間量を求める補間
装置において、前記格子点および前記空格子点の位置を
「右方向を正とする横軸X」と「下方向を正とする縦軸
Y」とで構成される座標系で表し、該格子点の画素出力
をG(X,Y)で表す場合、該空格子点の座標を(k,
p)とすると、該空格子点に対して水平方向に隣接する
2つの格子点の画素出力の差を示す横傾斜HDと、該空
格子点に対して垂直方向に隣接する2つの格子点の画素
出力の差を示す縦傾斜VDとを HD = |G(k−1,p)−G(k+1,p)| VD = |G(k,p−1)−G(k,p+1)| によって算出する傾斜算出手段と、前記空格子点の補間
量をG'(k,p)とすると、傾斜算出手段によって算
出された横傾斜HDと縦傾斜VDとを比較し、任意の値
Thについて、「HD>VD+Th」が成り立つ場合、 G'(k,p) = {G(k,p−1)+G(k,p
+1)}/2 とし、「VD>HD+Th」が成り立つ場合、 G'(k,p) = {G(k−1,p)+G(k+
1,p)}/2 とし、「|HD−VD|≦Th」が成り立つ場合、 G'(k,p) = {G(k−1,p)+G(k+
1,p)+G(k,p−1)+G(k,p+1)}/4 とする補間量決定手段とを備えたことを特徴とする。
According to a first aspect of the present invention, there is provided an interpolation apparatus for interpolating an image in which lattice points for outputting a predetermined color and empty lattice points for not outputting the color are arranged in a checkered pattern. In the interpolating apparatus for calculating the interpolation amount that becomes the pixel output of the vacant grid point, the positions of the grid point and the vacant grid point are defined as “the horizontal axis X whose right direction is positive” and “the downward direction is positive. When the pixel output of the lattice point is represented by G (X, Y), the coordinates of the empty lattice point are represented by (k,
p), the horizontal slope HD indicating the difference between the pixel outputs of the two grid points horizontally adjacent to the vacant grid point, and the horizontal slope HD of the two grid points vertically adjacent to the vacant grid point. The vertical inclination VD indicating the difference between the pixel outputs is represented by HD = | G (k−1, p) −G (k + 1, p) | VD = | G (k, p−1) −G (k, p + 1) | Assuming that the inclination calculating means to calculate and the interpolation amount of the vacant point is G '(k, p), the horizontal inclination HD and the vertical inclination VD calculated by the inclination calculating means are compared with each other to obtain an arbitrary value.
For Th, when “HD> VD + Th” is satisfied, G ′ (k, p) = {G (k, p−1) + G (k, p
+1)} / 2, and when “VD> HD + Th” holds, G ′ (k, p) = {G (k−1, p) + G (k +
1, p)} / 2, and when “| HD−VD | ≦ Th” is satisfied, G ′ (k, p) = {G (k−1, p) + G (k +
(P) + G (k, p−1) + G (k, p + 1)} / 4.

【0012】請求項2に記載の補間装置は、請求項1に
記載の補間装置において、傾斜算出手段は、Thの値を予
め決められた一定の値とすることを特徴とする。請求項
3に記載の補間装置は、請求項1に記載の補間装置にお
いて、傾斜算出手段は、Thの値を空格子点に隣接する格
子点の画素出力に対応付けて決定することを特徴とす
る。
According to a second aspect of the present invention, in the interpolation apparatus of the first aspect, the inclination calculating means sets the value of Th to a predetermined constant value. According to a third aspect of the present invention, in the interpolation apparatus according to the first aspect, the slope calculating means determines the value of Th in association with the pixel output of a grid point adjacent to the empty grid point. I do.

【0013】請求項4に記載の補間装置は、請求項1に
記載の補間装置において、傾斜算出手段は、空格子点に
隣接する格子点の画素出力の最大値、空格子点に隣接す
る格子点の画素出力の平均値、空格子点に水平方向に隣
接する格子点の画素出力の平均値もしくは空格子点に垂
直方向に隣接する格子点の画素出力の平均値に基づきTh
の値を決定することを特徴とする。
According to a fourth aspect of the present invention, in the interpolation apparatus according to the first aspect, the inclination calculating means includes a maximum value of a pixel output of a grid point adjacent to the empty grid point, and a grid value adjacent to the empty grid point. Th based on the average value of the pixel outputs of the points, the average value of the pixel outputs of the grid points horizontally adjacent to the empty grid point, or the average of the pixel outputs of the grid points vertically adjacent to the empty grid point.
Is determined.

【0014】請求項5に記載の補間装置は、予め決めら
れた色を出力する格子点と該色を出力しない空格子点と
が市松模様状に配された画像の補間を行い、空格子点の
画素出力となる補間量を求める補間装置において、空格
子点に対して水平方向に隣接する2つの格子点の画素出
力の差を示す横傾斜と、空格子点に対して垂直方向に隣
接する2つの格子点の画素出力の差を示す縦傾斜とを算
出する傾斜算出手段と、空格子点に対して水平方向に隣
接する2つの格子点の画素出力の平均を示す横平均と、
空格子点に対して垂直方向に隣接する2つの格子点の画
素出力の平均を示す縦平均とを算出する平均算出手段
と、傾斜算出手段によって算出された横傾斜と縦傾斜と
を予め決められた条件に基づいて比較することによっ
て、これらの傾斜が一致しているとみなせるか否かを判
定する第一の判定手段と、平均算出手段によって算出さ
れた横平均と縦平均とを予め決められた条件に基づいて
比較することによって、これらの平均が一致していると
みなせるか否かを判定する第二の判定手段と、第一の判
定手段によって横傾斜と縦傾斜とが一致していないと判
定された場合、空格子点に対して傾斜の少ない方向に隣
接する2つの格子点の画素出力に基づいて空格子点の補
間量を決定する第一の補間量決定手段と、第一の判定手
段および第二の判定手段によって横傾斜と縦傾斜とが一
致し、かつ横平均と縦平均とが一致していると判定され
た場合、空格子点に隣接する4つの格子点の画素出力の
平均に相当する値を空格子点の補間量とする第二の補間
量決定手段と、第一の判定手段および第二の判定手段に
よって横傾斜と縦傾斜とが一致し、かつ横平均と縦平均
とが一致していないと判定された場合、空格子点に隣接
する格子点の画素出力とこれらの格子点の周囲に配され
た格子点の画素出力との類似性に基づいて、空格子点の
補間量を決定する第三の補間量決定手段とを備えたこと
を特徴とする。
According to a fifth aspect of the present invention, there is provided an interpolation apparatus for interpolating an image in which lattice points for outputting a predetermined color and empty lattice points for not outputting the color are arranged in a checkered pattern. In the interpolating apparatus for obtaining an interpolation amount that becomes a pixel output of a horizontal grid point, a horizontal slope indicating a difference between pixel outputs of two grid points horizontally adjacent to the empty grid point, and a vertical slope adjacent to the empty grid point in the vertical direction Inclination calculating means for calculating a vertical inclination indicating a difference between pixel outputs of two grid points, a horizontal average indicating an average of pixel outputs of two grid points horizontally adjacent to an empty grid point,
An average calculating means for calculating a vertical average indicating an average of pixel outputs of two grid points vertically adjacent to the empty grid point, and a horizontal inclination and a vertical inclination calculated by the inclination calculating means are predetermined. The first determination means for determining whether or not these inclinations can be considered to be the same by comparing based on the conditions obtained, and the horizontal average and the vertical average calculated by the average calculation means are determined in advance. The second determination means for determining whether or not these averages can be considered to be the same by comparing based on the conditions set forth above, and the horizontal inclination and the vertical inclination do not match by the first determination means. If it is determined, the first interpolation amount determining means for determining the interpolation amount of the empty grid point based on the pixel output of two grid points adjacent to the empty grid point in the direction of less inclination, Determination means and second determination means If it is determined that the horizontal inclination and the vertical inclination match and the horizontal average and the vertical average match, the value corresponding to the average of the pixel outputs of the four grid points adjacent to the empty grid point is determined to be empty. The horizontal slope and the vertical slope are matched by the second interpolation amount determining means as the interpolation amount of the child point, the first determination means and the second determination means, and the horizontal average and the vertical average do not match. Is determined, the interpolation amount of the empty grid point is determined based on the similarity between the pixel outputs of the grid points adjacent to the empty grid point and the pixel outputs of the grid points arranged around these grid points. And a third interpolation amount determining means.

【0015】請求項6に記載の補間装置は、予め決めら
れた色を出力する格子点と該色を出力しない空格子点と
が市松模様状に配された画像の補間を行い、空格子点の
画素出力となる補間量を求める補間装置において、空格
子点に対して水平方向に隣接する2つの格子点の画素出
力の差を示す横傾斜と、空格子点に対して垂直方向に隣
接する2つの格子点の画素出力の差を示す縦傾斜とを算
出する傾斜算出手段と、空格子点に対して水平方向に隣
接する2つの格子点の画素出力の平均を示す横平均と、
空格子点に対して垂直方向に隣接する2つの格子点の画
素出力の平均を示す縦平均とを算出する平均算出手段
と、平均算出手段によって算出された横平均と縦平均と
を予め決められた条件に基づいて比較することによっ
て、これらの平均が一致しているとみなせるか否かを判
定する判定手段と、判定手段によって横平均と縦平均と
が一致していないと判定された場合、傾斜算出手段によ
って算出された横傾斜および縦傾斜に対応する重み付け
を行って空格子点の補間量を算出する第一の補間量算出
手段と、判定手段によって横平均と縦平均とが一致して
いると判定された場合、空格子点に隣接する4つの格子
点の画素出力の平均に相当する値を空格子点の補間量と
する第二の補間量算出手段とを備えたことを特徴とす
る。
According to a sixth aspect of the present invention, there is provided an interpolation apparatus for interpolating an image in which lattice points for outputting a predetermined color and empty lattice points for not outputting the color are arranged in a checkered pattern. In the interpolating apparatus for obtaining an interpolation amount that becomes a pixel output of a horizontal grid point, a horizontal slope indicating a difference between pixel outputs of two grid points horizontally adjacent to the empty grid point, and a vertical slope adjacent to the empty grid point in the vertical direction Inclination calculating means for calculating a vertical inclination indicating a difference between pixel outputs of two grid points, a horizontal average indicating an average of pixel outputs of two grid points horizontally adjacent to an empty grid point,
An average calculating means for calculating a vertical average indicating an average of pixel outputs of two grid points vertically adjacent to the empty grid point, and a horizontal average and a vertical average calculated by the average calculating means are predetermined. By comparing based on the conditions that have been determined, the determination means to determine whether or not these averages can be considered to match, if the determination means determines that the horizontal average and the vertical average do not match, The first interpolation amount calculation means for performing weighting corresponding to the horizontal inclination and the vertical inclination calculated by the inclination calculation means to calculate the interpolation amount of the vacancy point, and the horizontal average and the vertical average match by the determination means. And a second interpolation amount calculating means for setting a value corresponding to an average of pixel outputs of four grid points adjacent to the vacancy point as an interpolation amount of the vacancy point when it is determined that I do.

【0016】すなわち、従来の技術では、横平均と縦平
均とが一致する場合、横傾斜および縦傾斜に対応する重
み付けによって空格子点の補間量を算出すると、画像の
滑らかさが損なわれる可能性があったが、請求項6に記
載の発明にかかわる補間装置では、第二の補間量算出手
段によって空格子点に隣接する4つの格子点の画素出力
の平均に相当する値を算出することができる。
That is, in the prior art, when the horizontal average and the vertical average match, if the interpolation amount of the vacancy is calculated by weighting corresponding to the horizontal inclination and the vertical inclination, the smoothness of the image may be impaired. However, in the interpolation device according to the sixth aspect of the present invention, the second interpolation amount calculating means may calculate a value corresponding to the average of the pixel outputs of four grid points adjacent to the empty grid point. it can.

【0017】請求項10に記載の補間処理プログラムを
記録した記録媒体は、予め決められた色を出力する格子
点と該色を出力しない空格子点とが市松模様状に配され
た画像の補間をコンピュータに実行させ、該空格子点の
画素出力となる補間量を求める補間処理プログラムを記
録した記録媒体であって、前記格子点および前記空格子
点の位置を「右方向を正とする横軸X」と「下方向を正
とする縦軸Y」とで構成される座標系で表し、該格子点
の画素出力をG(X,Y)で表す場合、該空格子点の座
標を(k,p)とすると、該空格子点に対して水平方向
に隣接する2つの格子点の画素出力の差を示す横傾斜H
Dと、該空格子点に対して垂直方向に隣接する2つの格
子点の画素出力の差を示す縦傾斜VDとを HD = |G(k−1,p)−G(k+1,p)| VD = |G(k,p−1)−G(k,p+1)| によって算出する傾斜算出手順と、前記空格子点の補間
量をG'(k,p)とすると、傾斜算出手順によって算
出された横傾斜HDと縦傾斜VDとを比較し、任意の値
Thについて、「HD>VD+Th」が成り立つ場合、 G'(k,p) = {G(k,p−1)+G(k,p
+1)}/2 とし、「VD>HD+Th」が成り立つ場合、 G'(k,p) = {G(k−1,p)+G(k+
1,p)}/2 とし、「|HD−VD|≦Th」が成り立つ場合、 G'(k,p) = {G(k−1,p)+G(k+
1,p)+G(k,p−1)+G(k,p+1)}/4 とする補間量決定手順とをコンピュータに実行させるた
めの補間処理プログラムを記録したことを特徴とする。
According to a tenth aspect of the present invention, there is provided a recording medium on which an interpolation processing program is recorded, wherein a lattice point for outputting a predetermined color and a vacant lattice point for not outputting the color are arranged in a checkerboard pattern. In a computer, and records an interpolation processing program for calculating an interpolation amount that becomes a pixel output of the empty grid point, wherein the positions of the grid points and the empty grid points are defined as “the right side is defined as a positive direction. When the pixel output of the lattice point is represented by G (X, Y), the coordinates of the vacant lattice point are represented by ((X, Y)). k, p), a horizontal slope H indicating a difference between pixel outputs of two grid points horizontally adjacent to the vacant grid point.
HD = | G (k−1, p) −G (k + 1, p) |, where D and the vertical slope VD indicating the difference between the pixel outputs of two grid points vertically adjacent to the vacant grid point. VD = | G (k, p−1) −G (k, p + 1) |, and the inclination calculation procedure is assuming that the interpolation amount of the vacancy is G ′ (k, p). The horizontal inclination HD and the vertical inclination VD are compared, and an arbitrary value is obtained.
For Th, when “HD> VD + Th” is satisfied, G ′ (k, p) = {G (k, p−1) + G (k, p
+1)} / 2, and when “VD> HD + Th” holds, G ′ (k, p) = {G (k−1, p) + G (k +
1, p)} / 2, and when “| HD−VD | ≦ Th” is satisfied, G ′ (k, p) = {G (k−1, p) + G (k +
(P) + G (k, p−1) + G (k, p + 1)} / 4. An interpolation processing program for causing a computer to execute an interpolation amount determination procedure is recorded.

【0018】請求項8に記載の補間処理プログラムを記
録した記録媒体は、予め決められた色を出力する格子点
と該色を出力しない空格子点とが市松模様状に配された
画像の補間をコンピュータに実行させ、該空格子点の画
素出力となる補間量を求める補間処理プログラムを記録
した記録媒体であって、前記空格子点に対して水平方向
に隣接する2つの格子点の画素出力の差を示す横傾斜
と、該空格子点に対して垂直方向に隣接する2つの格子
点の画素出力の差を示す縦傾斜とを算出する傾斜算出手
順と、前記空格子点に対して水平方向に隣接する2つの
格子点の画素出力の平均を示す横平均と、該空格子点に
対して垂直方向に隣接する2つの格子点の画素出力の平
均を示す縦平均とを算出する平均算出手順と、傾斜算出
手順によって算出された横傾斜と縦傾斜とを予め決めら
れた条件に基づいて比較することによって、これらの傾
斜が一致しているとみなせるか否かを判定する第一の判
定手順と、平均算出手順によって算出された横平均と縦
平均とを予め決められた条件に基づいて比較することに
よって、これらの平均が一致しているとみなせるか否か
を判定する第二の判定手順と、第一の判定手順によって
横傾斜と縦傾斜とが一致していないと判定された場合、
前記空格子点に対して傾斜の少ない方向に隣接する2つ
の格子点の画素出力に基づいて該空格子点の補間量を決
定する第一の補間量決定手順と、第一の判定手順および
第二の判定手順によって横傾斜と縦傾斜とが一致し、か
つ横平均と縦平均とが一致していると判定された場合、
前記空格子点に隣接する4つの格子点の画素出力の平均
に相当する値を該空格子点の補間量とする第二の補間量
決定手順と、第一の判定手順および第二の判定手順によ
って横傾斜と縦傾斜とが一致し、かつ横平均と縦平均と
が一致していないと判定された場合、前記空格子点に隣
接する格子点の画素出力とこれらの格子点の周囲に配さ
れた格子点の画素出力との類似性に基づいて、該空格子
点の補間量を決定する第三の補間量決定手順とをコンピ
ュータに実行させるための補間処理プログラムを記録し
たことを特徴とする。
According to another aspect of the present invention, there is provided a recording medium on which an interpolation processing program is recorded, wherein a grid point for outputting a predetermined color and an empty grid point for not outputting the color are arranged in a checkerboard pattern. Is executed by a computer, and an interpolation processing program for obtaining an interpolation amount that becomes a pixel output of the empty lattice point is recorded on the recording medium, wherein the pixel output of two lattice points horizontally adjacent to the empty lattice point is stored. A horizontal slope indicating the difference between the horizontal grid points and a vertical tilt indicating the difference between the pixel outputs of two grid points adjacent in the vertical direction to the empty grid point. Average calculation for calculating a horizontal average indicating an average of pixel outputs of two grid points adjacent in the direction and a vertical average indicating an average of pixel outputs of two grid points adjacent in the vertical direction to the empty grid point. Procedure and the slope calculation procedure. By comparing the horizontal slope and the vertical slope based on predetermined conditions, a first determination procedure for determining whether or not these slopes can be considered to be coincident, and an average calculation procedure are performed. By comparing the horizontal average and the vertical average based on a predetermined condition, a second determination procedure for determining whether or not these averages can be considered to match, and a first determination procedure If it is determined that the horizontal inclination does not match the vertical inclination,
A first interpolation amount determining step of determining an interpolation amount of the empty lattice point based on pixel outputs of two lattice points adjacent to the empty lattice point in a direction with a small inclination, a first determination step, and a If it is determined that the horizontal slope and the vertical slope match by the second determination procedure, and that the horizontal average and the vertical average match,
A second interpolation amount determination procedure, and a first determination procedure and a second determination procedure, in which a value corresponding to an average of pixel outputs of four grid points adjacent to the empty grid point is used as an interpolation quantity of the empty grid point. When it is determined that the horizontal tilt and the vertical tilt match and the horizontal average and the vertical average do not match, the pixel outputs of the grid points adjacent to the empty grid points and the pixel outputs around these grid points are determined. Based on the similarity with the pixel output of the grid point, based on the similarity, the third interpolation amount determination procedure for determining the interpolation amount of the empty grid point, and an interpolation processing program for causing a computer to execute, characterized by recording I do.

【0019】請求項9に記載の補間処理プログラムを記
録した記録媒体は、予め決められた色を出力する格子点
と該色を出力しない空格子点とが市松模様状に配された
画像の補間をコンピュータに実行させ、該空格子点の画
素出力となる補間量を求める補間処理プログラムを記録
した記録媒体であって、前記空格子点に対して水平方向
に隣接する2つの格子点の画素出力の差を示す横傾斜
と、該空格子点に対して垂直方向に隣接する2つの格子
点の画素出力の差を示す縦傾斜とを算出する傾斜算出手
順と、前記空格子点に対して水平方向に隣接する2つの
格子点の画素出力の平均を示す横平均と、該空格子点に
対して垂直方向に隣接する2つの格子点の画素出力の平
均を示す縦平均とを算出する平均算出手順と、平均算出
手順によって算出された横平均と縦平均とを予め決めら
れた条件に基づいて比較することによって、これらの平
均が一致しているとみなせるか否かを判定する判定手順
と、判定手順によって横平均と縦平均とが一致していな
いと判定された場合、傾斜算出手順によって算出された
横傾斜および縦傾斜に対応する重み付けを行って前記空
格子点の補間量を算出する第一の補間量算出手順と、判
定手順によって横平均と縦平均とが一致していると判定
された場合、前記空格子点に隣接する4つの格子点の画
素出力の平均に相当する値を該空格子点の補間量とする
第二の補間量算出手順とをコンピュータに実行させるた
めの補間処理プログラムを記録したことを特徴とする。
According to a ninth aspect of the present invention, there is provided a recording medium on which an interpolation processing program is recorded, wherein a lattice point for outputting a predetermined color and a vacant lattice point for not outputting the color are arranged in a checkerboard pattern. Is executed by a computer, and an interpolation processing program for obtaining an interpolation amount that becomes a pixel output of the empty lattice point is recorded on the recording medium, wherein the pixel output of two lattice points horizontally adjacent to the empty lattice point is stored. A horizontal slope indicating the difference between the horizontal grid points and a vertical tilt indicating the difference between the pixel outputs of two grid points adjacent in the vertical direction to the empty grid point. Average calculation for calculating a horizontal average indicating an average of pixel outputs of two grid points adjacent in the direction and a vertical average indicating an average of pixel outputs of two grid points adjacent in the vertical direction to the empty grid point. Procedure and the average calculation procedure By comparing the horizontal average and the vertical average based on a predetermined condition, a determination procedure for determining whether or not these averages can be considered to be the same, and the horizontal average and the vertical average are determined by the determination procedure. If it is determined that does not match, a first interpolation amount calculation procedure of calculating the interpolation amount of the vacant point by performing weighting corresponding to the horizontal inclination and the vertical inclination calculated by the inclination calculation procedure, the determination If it is determined by the procedure that the horizontal average and the vertical average match, a value corresponding to the average of the pixel outputs of the four grid points adjacent to the vacancy is used as the interpolation amount of the vacancy. An interpolation processing program for causing a computer to execute the second interpolation amount calculation procedure is recorded.

【0020】すなわち、従来の技術では、横平均と縦平
均とが一致する場合、横傾斜および縦傾斜に対応する重
み付けによって空格子点の補間量を算出すると、画像の
滑らかさが損なわれる可能性があったが、請求項9に記
載の発明にかかわる記録媒体に記録された補間処理プロ
グラムでは、第二の補間量算出手順によって空格子点に
隣接する4つの格子点の画素出力の平均に相当する値を
算出することができる。
That is, in the prior art, when the horizontal average and the vertical average match, if the interpolation amount of the vacancy is calculated by weighting corresponding to the horizontal inclination and the vertical inclination, the smoothness of the image may be impaired. However, according to the interpolation processing program recorded on the recording medium according to the ninth aspect of the present invention, the second interpolation amount calculation procedure corresponds to the average of the pixel outputs of four lattice points adjacent to the empty lattice point. Can be calculated.

【0021】[0021]

【発明の実施の形態】以下、図面に基づいて本発明の実
施形態について詳細を説明する。なお、請求項1ないし
請求項6に記載の発明に対応した実施形態については、
これらの発明にかかわる補間装置が適用された電子スチ
ルカメラを用いて説明を行う。
Embodiments of the present invention will be described below in detail with reference to the drawings. In addition, about the embodiment corresponding to the invention of Claim 1 thru | or Claim 6,
The description will be made using an electronic still camera to which the interpolation device according to the invention is applied.

【0022】(第一の実施形態)図1は、第一の実施形
態の機能ブロック図である。なお、本実施形態は、請求
項1および請求項2に記載の発明に対応した実施形態に
相当する。また、本実施形態および後述する各実施形態
では、緑色を出力する画素を格子点とし、赤色もしくは
青色を出力する画素を空格子点とする。すなわち、本実
施形態および後述する各実施形態における補間処理は、
これらの空格子点の緑色の画素出力に相当する補間量を
求める処理に相当する。
(First Embodiment) FIG. 1 is a functional block diagram of the first embodiment. This embodiment corresponds to an embodiment corresponding to the first and second aspects of the present invention. In the present embodiment and each of the embodiments described below, pixels that output green are grid points, and pixels that output red or blue are vacant points. That is, the interpolation processing in this embodiment and each embodiment described below
This corresponds to a process of obtaining an interpolation amount corresponding to a green pixel output of these empty lattice points.

【0023】図1において、制御部40の出力は、撮影
光学系41、OLPF (光学的低域通過フィルタ:Opti
cal Low Pass Filter)42、撮像素子43、A/D変換
部44、画像バッファメモリ45および信号処理部46
に接続される。信号処理部46は、補間処理部47を有
し、補間処理部47は、傾斜算出部48および補間量算
出部49で構成される。
In FIG. 1, the output of the control unit 40 is a photographing optical system 41 and an OLPF (optical low-pass filter: Optic).
cal Low Pass Filter) 42, image sensor 43, A / D converter 44, image buffer memory 45, and signal processor 46
Connected to. The signal processing unit 46 includes an interpolation processing unit 47, and the interpolation processing unit 47 includes a slope calculation unit 48 and an interpolation amount calculation unit 49.

【0024】撮影光学系41で取得された光学像は、O
LPF42によってフィルタリングされ、撮像素子43
に与えられる。なお、OLPF42を設けず、撮影光学
系41で取得された光学像が撮像素子43に直接与えら
れてもよい。撮像素子43の出力はA/D変換部44に
接続され、A/D変換部44の出力は画像バッファメモ
リ45に接続され、画像バッファメモリ45の出力は信
号処理部46に接続される。
The optical image acquired by the photographing optical system 41 is
Filtered by the LPF 42 and the image sensor 43
Given to. Note that the optical image acquired by the photographing optical system 41 may be directly provided to the image sensor 43 without providing the OLPF 42. The output of the image sensor 43 is connected to an A / D converter 44, the output of the A / D converter 44 is connected to an image buffer memory 45, and the output of the image buffer memory 45 is connected to a signal processor 46.

【0025】なお、本実施形態では、撮像素子43とし
て、図12(1)に示すように、RGBの3色のカラー
フィルタがベイア配列された構成の撮像素子を適用し、
画像バッファメモリ45は、これらの3色に対応する3
つの領域で構成される。ここで、画像バッファメモリ4
5内の緑色に対応する領域は、A/D変換部44によっ
て生成された緑色の画像データ(格子点の画素出力に相
当する)を格納する領域と、後述する補間処理によって
得られる緑色の画像データ(空格子点の補間量に相当す
る)を格納する領域とで構成される。
In this embodiment, as shown in FIG. 12A, an image sensor having a structure in which three color filters of RGB are arranged in a Bayer array is applied as the image sensor 43.
The image buffer memory 45 stores three colors corresponding to these three colors.
It consists of two areas. Here, the image buffer memory 4
The area corresponding to green in 5 is an area for storing green image data (corresponding to a pixel output of a grid point) generated by the A / D converter 44, and a green image obtained by interpolation processing described later. And an area for storing data (corresponding to the amount of interpolation of a vacancy).

【0026】なお、請求項1および請求項2の発明と本
実施形態との対応関係については、傾斜算出手段は傾斜
算出部48に対応し、補間量決定手段は補間量算出部4
9に対応する。図2は、第一の実施形態の動作フローチ
ャートである。図3は、第一の実施形態の補間処理の動
作フローチャートである。
As for the correspondence between the first and second aspects of the present invention and the present embodiment, the inclination calculating means corresponds to the inclination calculating section 48, and the interpolation amount determining means corresponds to the interpolation amount calculating section 4.
9 corresponds. FIG. 2 is an operation flowchart of the first embodiment. FIG. 3 is an operation flowchart of the interpolation processing of the first embodiment.

【0027】ここで、以降の説明を簡単化するために、
撮像素子43の各画素の位置は、「右方向を正とする横
軸X」と「下方向を正とする縦軸Y」とで構成される座
標系で表す。また、格子点の画素出力は、G(X,Y)
で表し、空格子点の補間量は、G'(X,Y)で表す。
Here, in order to simplify the following description,
The position of each pixel of the image sensor 43 is represented by a coordinate system composed of a "horizontal axis X having a positive right direction" and a "vertical axis Y having a downward positive direction". The pixel output of the grid point is G (X, Y)
, And the interpolation amount of the vacancy is represented by G ′ (X, Y).

【0028】図4は、このような格子点の画素出力と空
格子点の補間量とを示した図である。図において、X_m
axはX成分の最大値を示し、Y_maxはY成分の最大値を
示す。以下、図1ないし図4を参照して第一の実施形態
の動作を説明する。主電源が投入されている状態におい
て、撮像素子43では、撮影光学系41およびOLPF
42を介して与えられる光学像が光電変換面(図示され
ない)に結像され、光電変換によって信号電荷が生成さ
れる。また、撮像素子43は、このように生成された信
号電荷を走査して画像信号を生成し、A/D変換部44
に与える。
FIG. 4 is a diagram showing the pixel output of such a grid point and the interpolation amount of an empty grid point. In the figure, X_m
ax indicates the maximum value of the X component, and Y_max indicates the maximum value of the Y component. Hereinafter, the operation of the first embodiment will be described with reference to FIGS. When the main power supply is turned on, the imaging optical system 41 and the OLPF
An optical image provided via 42 is formed on a photoelectric conversion surface (not shown), and a signal charge is generated by the photoelectric conversion. Further, the image sensor 43 scans the signal charges thus generated to generate an image signal, and the A / D converter 44
Give to.

【0029】A/D変換部44は、このように与えられ
た画像信号をA/D変換して画像データを生成する(図
2S1)。なお、本実施形態および後述する各実施形態
において、画像データは、撮像素子43の各画素に対応
する画素出力に相当する。このように生成された画像デ
ータは、RGBの3色に分割され、各色に対応する画像
バッファメモリ45内の領域に格納される(図2S
2)。
The A / D conversion section 44 performs A / D conversion on the image signal given in this way to generate image data (S1 in FIG. 2). In this embodiment and each embodiment described later, the image data corresponds to a pixel output corresponding to each pixel of the image sensor 43. The image data generated in this manner is divided into three colors of RGB and stored in the areas in the image buffer memory 45 corresponding to each color (FIG. 2S).
2).

【0030】このような処理は、制御部40によるタイ
ミング制御に基づき繰り返し行われる。また、これらの
緑色の画像データ(格子点の画素出力/空格子点の補間
量)は、図4に示すように、上述した座標系で示される
座標に対応付けられて格納される。制御部40は、電子
スチルカメラの筐体に設けられたレリーズボタン(図示
されない)が押下されたか否かを判定する(図2S
3)。
Such processing is repeatedly performed based on the timing control by the control unit 40. Further, as shown in FIG. 4, the green image data (pixel output of grid points / interpolation amount of vacant grid points) is stored in association with the coordinates shown in the above-described coordinate system. The controller 40 determines whether or not a release button (not shown) provided on the housing of the electronic still camera has been pressed (FIG. 2S).
3).

【0031】制御部40は、このような判定によって、
レリーズボタンが押下されていないことを認識すると、
上述したタイミング制御によって画像データの生成(図
2S1)および格納(図2S2)の処理を繰り返し指示
する。また、制御部40は、レリーズボタンが押下され
たことを認識すると、信号処理部46内の補間処理部4
7に対して、後述するような補間処理の実行を指示する
(図2S4)。
The control unit 40 makes such a determination,
When it recognizes that the release button has not been pressed,
By the above-described timing control, generation (FIG. 2S1) and storage (FIG. 2S2) of image data are repeatedly instructed. When the control unit 40 recognizes that the release button has been pressed, the interpolation processing unit 4 in the signal processing unit 46 recognizes that the release button has been pressed.
7 is instructed to execute an interpolation process as described later (S4 in FIG. 2).

【0032】すなわち、本実施形態では、レリーズボタ
ンが押下された時点に画像バッファメモリ45に格納さ
れている画像データが補間処理の対象となる。なお、画
像表示を行うために、レリーズボタンが押下された時点
によらず、常時、補間処理を実行してもよい。また、レ
リーズ後にS1以降の処理を繰り返し行ってもよい。
That is, in the present embodiment, the image data stored in the image buffer memory 45 at the time when the release button is pressed is subjected to the interpolation processing. Note that, in order to display an image, the interpolation process may be performed at any time regardless of the time point when the release button is pressed. Further, after the release, the processing after S1 may be repeatedly performed.

【0033】このようにして補間処理が施された画像デ
ータは、画像バッファメモリ45に格納される(図2S
5)。以下、補間処理の動作を説明する。補間処理部4
7は、制御部40によって補間処理の実行が指示される
と、補間の対象となる空格子点を選択する(図3S
1)。
The image data thus interpolated is stored in the image buffer memory 45 (FIG. 2S
5). Hereinafter, the operation of the interpolation processing will be described. Interpolation processing unit 4
7 selects an empty lattice point to be interpolated when the control unit 40 instructs execution of the interpolation processing (FIG. 3S
1).

【0034】例えば、図4において、任意の座標(k,
p)について「k+p=奇数」が成り立つ場合、その座
標には、空格子点が対応付けられている。そのため、本
実施形態では、各画素に対応付けられた座標を(1,
1)から(X_max,Y_max)まで順次検索し、X成分と
Y成分との和が奇数である座標を空格子点とする。補間
処理部47は、上述したように補間の対象となる空格子
点を選択すると、傾斜算出部48および補間量算出部4
9を起動する。
For example, in FIG. 4, arbitrary coordinates (k,
When “k + p = odd number” holds for p), a vacancy is associated with the coordinates. Therefore, in the present embodiment, the coordinates associated with each pixel are (1,
1) to (X_max, Y_max) are sequentially searched, and coordinates at which the sum of the X component and the Y component is an odd number are defined as vacancy points. When the interpolation processing unit 47 selects the vacancy to be interpolated as described above, the inclination calculation unit 48 and the interpolation amount calculation unit 4
9 is started.

【0035】傾斜算出部48は、空格子点の座標(k,
p)について、水平方向に隣接する2つの格子点の画素
出力の差を示す横傾斜HDと、垂直方向に隣接する2つ
の格子点の画素出力の差を示す縦傾斜VDとを HD = |G(k−1,p)−G(k+1,p)| VD = |G(k,p−1)−G(k,p+1)| によって算出する(図3S2)。
The inclination calculator 48 calculates the coordinates (k,
For p), the horizontal slope HD indicating the difference between the pixel outputs of two horizontally adjacent grid points and the vertical slope VD indicating the difference between the pixel outputs of two vertically adjacent grid points are defined as HD = | G (K-1, p) -G (k + 1, p) | VD = | G (k, p-1) -G (k, p + 1) | (FIG. 3S2).

【0036】補間量算出部49は、横傾斜HDと縦傾斜
VDとを比較し、横傾斜HDと縦傾斜VDとの差が所定
値以下であるか否かを判定する(図3S3)。補間量算
出部49は、このような判定によって、横傾斜HDと縦
傾斜VDとの差が所定値以下であることを認識すると、
空格子点に隣接する4つの格子点の画素出力の平均値を
補間量とする(図3S4)。
The interpolation amount calculator 49 compares the horizontal slope HD with the vertical slope VD, and determines whether or not the difference between the horizontal slope HD and the vertical slope VD is equal to or less than a predetermined value (S3 in FIG. 3). When the interpolation amount calculating unit 49 recognizes that the difference between the horizontal inclination HD and the vertical inclination VD is equal to or smaller than a predetermined value,
The average value of the pixel outputs of the four grid points adjacent to the empty grid point is set as the interpolation amount (S4 in FIG. 3).

【0037】例えば、補間量算出部49は、任意の値Th
について、「|HD−VD|≦Th」が成り立つ場合、空
格子点の補間量G'(k,p)を G'(k,p) = {G(k−1,p)+G(k+
1,p)+G(k,p−1)+G(k,p+1)}/4 によって算出する。
For example, the interpolation amount calculator 49 calculates an arbitrary value Th
When | HD−VD | ≦ Th holds, the interpolation amount G ′ (k, p) of the vacancy is calculated as G ′ (k, p) = {G (k−1, p) + G (k +
(1, p) + G (k, p-1) + G (k, p + 1)} / 4.

【0038】また、補間量算出部49は、横傾斜HDと
縦傾斜VDとの差が所定値を上回ることを認識すると、
空格子点に対して傾斜が少ない方向に隣接する2つの格
子点の画素出力の平均値を補間量とする(図3S5)。
例えば、補間量算出部49は、上述したThについて、
「HD>VD+Th」が成り立つ場合、縦傾斜が少ないと
みなし、空格子点の補間量G'(k,p)を G'(k,p) = {G(k,p−1)+G(k,p
+1)}/2 によって算出し、「VD>HD+Th」が成り立つ場合、
横傾斜が少ないとみなし、空格子点の補間量G'(k,
p)を G'(k,p) = {G(k−1,p)+G(k+
1,p)}/2 によって算出する。
When the interpolation amount calculating unit 49 recognizes that the difference between the horizontal inclination HD and the vertical inclination VD exceeds a predetermined value,
The average value of the pixel outputs of two grid points adjacent to the vacant grid point in a direction with a small inclination is set as an interpolation amount (S5 in FIG. 3).
For example, the interpolation amount calculation unit 49 calculates
When “HD> VD + Th” is satisfied, it is considered that the vertical inclination is small, and the interpolation amount G ′ (k, p) of the vacancy is calculated as G ′ (k, p) = {G (k, p−1) + G (k , P
+1)} / 2, and when “VD> HD + Th” holds,
Assuming that the lateral inclination is small, the interpolation amount G '(k,
p) is given by G ′ (k, p) = {G (k−1, p) + G (k +
1, p)} / 2.

【0039】補間処理部47は、このようにして空格子
点の補間量が決定されると、全ての空格子点の補間処理
が完了したか否かを判定する(図3S6)。例えば、こ
のような判定は、上述したような各画素に対応付けられ
た座標を検索する過程で、任意の座標(k,p)につい
て、「k>X_max−3」および「p>Y_max−3」が成
り立つか否かを判定することに相当する。
When the interpolation amount of the vacancy is determined in this way, the interpolation processing unit 47 determines whether or not the interpolation processing of all the vacancy is completed (S6 in FIG. 3). For example, such a determination is made in the process of searching for the coordinates associated with each pixel as described above, and for any coordinates (k, p), “k> X_max-3” and “p> Y_max-3”. ”Is determined.

【0040】補間処理部47は、このような判定によっ
て、全ての空格子点の補間処理が完了したことを認識す
るまで、上述した処理(図3S1以降の処理)を繰り返
し行う。すなわち、本実施形態では、空格子点の空間的
な方向性を横傾斜および縦傾斜に基づいて推定するた
め、空格子点の緑色の画素出力の類似性を精度良く判定
することができる。
The interpolation processing unit 47 repeats the above-described processing (the processing after S1 in FIG. 3) until it recognizes that the interpolation processing for all vacancies has been completed. That is, in the present embodiment, since the spatial directionality of the vacancy is estimated based on the horizontal inclination and the vertical inclination, the similarity of the green pixel output of the vacancy can be accurately determined.

【0041】したがって、本実施形態によれば、空格子
点の補間量の信頼性を確実に向上することができる。 (第二の実施形態)図5は、第二の実施形態の機能ブロ
ック図である。なお、本実施形態は、請求項5に記載の
発明に対応した実施形態に相当する。
Therefore, according to the present embodiment, it is possible to reliably improve the reliability of the amount of interpolation of a vacancy. (Second Embodiment) FIG. 5 is a functional block diagram of the second embodiment. This embodiment corresponds to an embodiment corresponding to the invention described in claim 5.

【0042】図において、機能が図1に示す第一の実施
形態の機能ブロック図と同じものについては、同じ符号
を付与して示し、構成の説明については省略する。な
お、第二の実施形態と第一の実施形態との構成の相違点
は、図1に示す補間処理部47に代えて補間処理部52
が設けられ、その補間処理部52が傾斜算出部48、平
均算出部53および補間量算出部54で構成されている
点である。
In the figure, components having the same functions as those of the functional block diagram of the first embodiment shown in FIG. 1 are denoted by the same reference numerals, and the description of the configuration is omitted. The difference between the configuration of the second embodiment and the configuration of the first embodiment is that the interpolation processing unit 52 shown in FIG.
Is provided, and the interpolation processing unit 52 is composed of an inclination calculation unit 48, an average calculation unit 53, and an interpolation amount calculation unit 54.

【0043】また、請求項5の発明と本実施形態との対
応関係については、傾斜算出手段は傾斜算出部48に対
応し、平均算出手段は平均算出部53に対応し、第一の
判定手段は補間量算出部54の横傾斜および縦傾斜の比
較を行う機能に対応し、第二の判定手段は補間量算出部
54の横平均および縦平均の比較を行う機能に対応し、
第一の補間量決定手段、第二の補間量決定手段および第
三の補間量決定手段は、補間量算出部54の補間量を算
出する機能に対応する。
Further, regarding the correspondence between the invention of claim 5 and the present embodiment, the inclination calculating means corresponds to the inclination calculating section 48, the average calculating means corresponds to the average calculating section 53, and the first judging means. Corresponds to the function of comparing the horizontal inclination and the vertical inclination of the interpolation amount calculation unit 54, the second determination means corresponds to the function of comparing the horizontal average and the vertical average of the interpolation amount calculation unit 54,
The first interpolation amount determining unit, the second interpolation amount determining unit, and the third interpolation amount determining unit correspond to a function of the interpolation amount calculating unit 54 for calculating the interpolation amount.

【0044】図6は、第二の実施形態の補間処理の動作
フローチャートである。以下、図5および図6を参照し
て第二の実施形態の動作を説明する。なお、本実施形態
の特徴は補間処理の動作にあり、他の動作については、
第一の実施形態と同じであるため説明を省略する。
FIG. 6 is an operation flowchart of the interpolation processing of the second embodiment. Hereinafter, the operation of the second embodiment will be described with reference to FIGS. The feature of the present embodiment lies in the operation of the interpolation process, and the other operations are described in the following.
The description is omitted because it is the same as the first embodiment.

【0045】制御部40は、第一の実施形態と同様にし
てレリーズボタンが押下されたことを認識すると、信号
処理部46内の補間処理部52に対して、補間処理の実
行を指示する。補間処理部52は、このように指示され
ると、第一の実施形態と同様に、補間処理の対象となる
空格子点を選択し(図6S1)、傾斜算出部48、平均
算出部53および補間量算出部54を起動する。
When recognizing that the release button has been pressed in the same manner as in the first embodiment, the control unit 40 instructs the interpolation processing unit 52 in the signal processing unit 46 to execute interpolation processing. When instructed in this way, the interpolation processing unit 52 selects a vacancy to be subjected to the interpolation processing (S1 in FIG. 6), as in the first embodiment, and calculates the inclination calculation unit 48, the average calculation unit 53, The interpolation amount calculation unit 54 is started.

【0046】傾斜算出部48は、第一の実施形態と同様
に、空格子点の座標(k,p)について、横傾斜HDと
縦傾斜VDとを HD = |G(k−1,p)−G(k+1,p)| VD = |G(k,p−1)−G(k,p+1)| によって算出する(図6S2)。
In the same manner as in the first embodiment, the inclination calculating section 48 calculates the horizontal inclination HD and the vertical inclination VD for the coordinates (k, p) of the vacancy points by the following expression: HD = │G (k−1, p) -G (k + 1, p) | VD = | G (k, p-1) -G (k, p + 1) | (S2 in FIG. 6).

【0047】平均算出部53は、空格子点の座標(k,
p)について、水平方向に隣接する2つの格子点の画素
出力の平均を示す横平均HMと、垂直方向に隣接する2
つの格子点の画素出力の平均を示す縦平均VMとを HM = (G(k−1,p)+G(k+1,p))/
2 VM = (G(k,p−1)+G(k,p+1))/
2 によって算出する(図6S3)。
The average calculation unit 53 calculates the coordinates (k,
Regarding p), a horizontal average HM indicating an average of pixel outputs of two grid points adjacent in the horizontal direction and a horizontal average HM indicating two
HM = (G (k−1, p) + G (k + 1, p)) /
2 VM = (G (k, p-1) + G (k, p + 1)) /
2 (S3 in FIG. 6).

【0048】補間量算出部54は、横傾斜HDと縦傾斜
VDとを比較し、横傾斜HDと縦傾斜VDとの差が所定
値以下であるか否かを判定する(図6S4)。補間量算
出部54は、このような判定によって、横傾斜HDと縦
傾斜VDとの差が所定値を上回ることを認識すると(図
6S4のNO側)、第一の実施形態と同様に、空格子点
に対して傾斜が少ない方向に隣接する2つの格子点の画
素出力の平均値を補間量とする(図6S5)。
The interpolation amount calculation unit 54 compares the horizontal inclination HD with the vertical inclination VD, and determines whether or not the difference between the horizontal inclination HD and the vertical inclination VD is equal to or smaller than a predetermined value (S4 in FIG. 6). When the interpolation amount calculation unit 54 recognizes that the difference between the horizontal inclination HD and the vertical inclination VD exceeds a predetermined value (NO side in FIG. 6S4) by such a determination, the interpolation amount calculation unit 54 becomes empty as in the first embodiment. The average value of the pixel outputs of the two grid points adjacent to the child point in the direction with a small inclination is set as the interpolation amount (S5 in FIG. 6).

【0049】一方、補間量算出部54は、横傾斜HDと
縦傾斜VDとの差が所定値以下であることを認識すると
(図6S4のYES側)、横平均HMと縦平均VMとを
比較し、横平均HMと縦平均VMとの差が所定値以下で
あるか否かを判定する(図6S6)。補間量算出部54
は、このような判定(図6S4およびS6に相当する)
によって、横傾斜HDと縦傾斜VDとの差が所定値以下
であり、かつ横平均HMと縦平均VMとの差が所定値以
下であることを認識した場合(図6S6のYES側)、
空格子点に隣接する4つの格子点の画素出力の平均値を
補間量とする(図6S7)。
On the other hand, when recognizing that the difference between the horizontal inclination HD and the vertical inclination VD is equal to or smaller than a predetermined value (YES side in S4 in FIG. 6), the interpolation amount calculation unit 54 compares the horizontal average HM with the vertical average VM. Then, it is determined whether or not the difference between the horizontal average HM and the vertical average VM is equal to or less than a predetermined value (S6 in FIG. 6). Interpolation amount calculation unit 54
Is such a determination (corresponding to S4 and S6 in FIG. 6).
When it is recognized that the difference between the horizontal inclination HD and the vertical inclination VD is equal to or smaller than a predetermined value and the difference between the horizontal average HM and the vertical average VM is equal to or smaller than a predetermined value (YES in S6 in FIG. 6),
The average value of the pixel outputs of the four grid points adjacent to the empty grid point is set as the interpolation amount (S7 in FIG. 6).

【0050】例えば、補間量算出部54は、任意の値T
h、γについて、「|HD−VD|≦Thかつ|HM−V
M|≦γ」が成り立つ場合、空格子点の補間量G'
(k,p)を G'(k,p) = {G(k−1,p)+G(k+
1,p)+G(k,p−1)+G(k,p+1)}/4 によって算出する。
For example, the interpolation amount calculating section 54 calculates an arbitrary value T
For h and γ, “| HD-VD | ≦ Th and | HM-V
M | ≦ γ ”holds, the vacancy interpolation amount G ′
(K, p) is represented by G ′ (k, p) = {G (k−1, p) + G (k +
(1, p) + G (k, p-1) + G (k, p + 1)} / 4.

【0051】ここで、格子点の画素出力の範囲Gを「0
≦G≦255」とした場合、Thおよびγは20〜50程
度とする。また、補間量算出部54は、上述した判定
(図6S4およびS6に相当する)によって、横傾斜H
Dと縦傾斜VDとの差が所定値以下であり、かつ横平均
HMと縦平均VMとの差が所定値を上回ることを認識し
た場合(図6S6のNO側)、空格子点に隣接する格子
点の画素出力と、これらの格子点を上下左右の4つの方
向にそれぞれシフトした位置に配される各格子点の画素
出力との相関をとり、各方向毎に相関の強さを示す相関
量を算出する(図6S8)。
Here, the range G of the pixel output at the grid point is set to “0”.
≦ G ≦ 255 ”, Th and γ are about 20 to 50. Further, the interpolation amount calculation unit 54 determines the lateral inclination H by the above-described determination (corresponding to S4 and S6 in FIG. 6).
When it is recognized that the difference between D and the vertical inclination VD is equal to or less than a predetermined value, and that the difference between the horizontal average HM and the vertical average VM exceeds a predetermined value (NO side in FIG. 6S6), it is adjacent to a vacancy. The correlation between the pixel output of a grid point and the pixel output of each grid point arranged at a position where these grid points are shifted in four directions of up, down, left, and right, and a correlation indicating the strength of the correlation for each direction The amount is calculated (S8 in FIG. 6).

【0052】例えば、補間量算出部54は、上下左右の
4つの方向に対応する相関量C-up、C-down、C-left
およびC-rightを C-up = |G(k,p−1)−G(k,p−1−
n)|+|G(k,p+1)−G(k,p+1−n)|
+|G(k−1,p)−G(k−1,p−n)|+|G
(k+1,p)−G(k+1,p−n)| C-down = |G(k,p−1)−G(k,p−1+
n)|+|G(k,p+1)−G(k,p+1+n)|
+|G(k−1,p)−G(k−1,p+n)|+|G
(k+1,p)−G(k+1,p+n)| C-left = |G(k,p−1)−G(k−n,p−
1)|+|G(k,p+1)−G(k−n,p+1)|
+|G(k−1,p)−G(k−1−n,p)|+|G
(k+1,p)−G(k+1−n,p)| C-right = |G(k,p−1)−G(k+n,p−
1)|+|G(k,p+1)−G(k+n,p+1)|
+|G(k−1,p)−G(k−1+n,p)|+|G
(k+1,p)−G(k+1+n,p)| によって算出する。
For example, the interpolation amount calculator 54 calculates the correlation amounts C-up, C-down, C-left corresponding to the four directions of up, down, left, and right.
And C-right are expressed as follows: C-up = | G (k, p-1) -G (k, p-1-
n) | + | G (k, p + 1) -G (k, p + 1-n) |
+ | G (k-1, p) -G (k-1, pn) | + | G
(K + 1, p) -G (k + 1, pn) | C-down = | G (k, p-1) -G (k, p-1 +
n) | + | G (k, p + 1) -G (k, p + 1 + n) |
+ | G (k-1, p) -G (k-1, p + n) | + | G
(K + 1, p) -G (k + 1, p + n) | C-left = | G (k, p-1) -G (kn, p-
1) | + | G (k, p + 1) -G (kn, p + 1) |
+ | G (k−1, p) −G (k−1−n, p) | + | G
(K + 1, p) -G (k + 1-n, p) | C-right = | G (k, p-1) -G (k + n, p-
1) | + | G (k, p + 1) -G (k + n, p + 1) |
+ | G (k-1, p) -G (k-1 + n, p) | + | G
(K + 1, p) -G (k + 1 + n, p) |.

【0053】ここで、「n=2」とすると、上方向の相
関量C-up は、図7に示すように「○」で示される4つ
の格子点の画素出力と、「□」で示される4つの格子点
の画素出力との差の絶対値の総和に相当する。補間量算
出部54は、このようにして算出した相関量C-up、 C
-down、C-leftおよびC-rightの内、重複を許容しつつ
最も小さい値を選択することによって、相関が最も強い
方向を識別する(図6S9)。
Here, assuming that “n = 2”, the upward correlation amount C-up is represented by pixel outputs of four grid points indicated by “「 ”and“ □ ”as shown in FIG. It corresponds to the sum of the absolute values of the differences from the pixel outputs of the four grid points. The interpolation amount calculation unit 54 calculates the correlation amounts C-up, C
By selecting the smallest value among -down, C-left and C-right while allowing overlap, the direction having the strongest correlation is identified (S9 in FIG. 6).

【0054】また、補間量算出部54は、空格子点に隣
接する格子点の画素出力(G(k,p−1)、G(k,
p+1)、G(k−1,p)、(k+1,p))の内、
相関が最も強い方向の格子点の画素出力を空格子点の補
間量とする(図6S10)。例えば、上方向の相関が強
い場合、G'(k,p)を G(k,p−1)とし、下方
向の相関が強い場合、G'(k,p)を G(k,p+
1)とし、左方向の相関が強い場合、G'(k,p)を
G(k−1,p)とし、右方向の相関が強い場合、G'
(k,p)を G(k+1,p)とする。
Further, the interpolation amount calculating section 54 outputs the pixel outputs (G (k, p−1), G (k,
p + 1), G (k-1, p), (k + 1, p))
The pixel output of the lattice point in the direction with the strongest correlation is set as the interpolation amount of the empty lattice point (S10 in FIG. 6). For example, if the upward correlation is strong, G ′ (k, p) is G (k, p−1), and if the downward correlation is strong, G ′ (k, p) is G (k, p +
1), if the correlation in the left direction is strong, G ′ (k, p) is
G (k−1, p), and when the correlation in the right direction is strong, G ′
Let (k, p) be G (k + 1, p).

【0055】なお、相関が強い方向が複数ある場合、こ
れらの方向の格子点の画素出力の平均値を空格子点の補
間量としてもよい。補間処理部52は、このようにして
空格子点の補間量が決定されると、第一の実施形態と同
様に、全ての空格子点の補間処理が完了したか否かを判
定し(図6S11)、全ての空格子点の補間処理が完了
したことを認識するまで、上述した処理(図6S1以降
の処理)を繰り返し行う。
When there are a plurality of directions having a strong correlation, the average value of the pixel outputs of the lattice points in these directions may be used as the interpolation amount of the empty lattice point. When the interpolation amount of the vacancy is determined in this manner, the interpolation processing unit 52 determines whether or not the interpolation processing of all the vacancies is completed, as in the first embodiment (see FIG. 6S11), the above-described processing (the processing from S1 onward in FIG. 6) is repeatedly performed until it is recognized that the interpolation processing of all the vacancies has been completed.

【0056】すなわち、本実施形態では、横傾斜HDと
縦傾斜VDとの差が所定値以下であり、かつ横平均HM
と縦平均VMとの差が所定値を上回ることを認識した場
合、空格子点に隣接する格子点の4つの方向の相関量を
算出し、相関が最も強い方向の格子点の画素出力を空格
子点の補間量とすることができる。したがって、本実施
形態によれば、第一の実施形態と比べ、空格子点の補間
量の信頼性を確実に向上することができる。
That is, in this embodiment, the difference between the horizontal inclination HD and the vertical inclination VD is equal to or less than a predetermined value, and the horizontal average HM
When it is recognized that the difference between the vertical average VM and the vertical average VM exceeds a predetermined value, the correlation amounts in the four directions of the lattice points adjacent to the empty lattice point are calculated, and the pixel output of the lattice point in the direction with the strongest correlation is empty. It can be the interpolation amount of the child point. Therefore, according to the present embodiment, it is possible to reliably improve the reliability of the interpolation amount of the vacancy points as compared with the first embodiment.

【0057】なお、本実施形態では、横傾斜HDと縦傾
斜VDとの比較時に用いる任意の値Thについては、格子
点の画素出力の範囲に対応付けた一定の値を示したが、
例えば、請求項3および請求項4に記載の補間装置を適
用することによって、空格子点に隣接する格子点の画素
出力に基づいて決定される値Gを変数とする単調非減少
関数h、予め決められた定数a、bに対して、Thを Th = a+b×h(G) によって算出してもよい。
In the present embodiment, the arbitrary value Th used when comparing the horizontal tilt HD and the vertical tilt VD is a constant value corresponding to the range of the pixel output at the lattice point.
For example, by applying the interpolation device according to claims 3 and 4, a monotonic non-decreasing function h having a value G determined based on a pixel output of a grid point adjacent to a vacancy as a variable, For the determined constants a and b, Th may be calculated by Th = a + b × h (G).

【0058】ここで、関数hの変数Gは、空格子点に隣
接する格子点の画素出力の最大値もしくは平均値であっ
てもよく、空格子点に対して水平方向に隣接する2つの
格子点の画素出力の平均値もしくは垂直方向に隣接する
2つの格子点の画素出力の平均値であってもよい。 (第三の実施形態)図8は、第三の実施形態の補間処理
の動作フローチャートである。
Here, the variable G of the function h may be the maximum value or the average value of the pixel outputs of the grid points adjacent to the empty grid point. The average value of the pixel outputs of the points or the average value of the pixel outputs of two grid points adjacent in the vertical direction may be used. (Third Embodiment) FIG. 8 is an operation flowchart of an interpolation process according to a third embodiment.

【0059】なお、本実施形態は、請求項6に記載の発
明に対応した実施形態に相当する。また、本実施形態の
特徴は、補間処理の方法にあり、ハードウエアの構成に
ついては、図5に示す機能ブロック図と同じであるた
め、図示を省略する。さらに、補間処理以外の動作につ
いては、第二の実施形態と同様であるため説明を省略す
る。
This embodiment corresponds to an embodiment corresponding to the sixth aspect of the present invention. The feature of the present embodiment lies in the method of the interpolation processing, and the hardware configuration is the same as the functional block diagram shown in FIG. Further, the operation other than the interpolation processing is the same as that of the second embodiment, and thus the description is omitted.

【0060】ここで、請求項6に記載の発明と本実施形
態との対応関係については、傾斜算出手段は傾斜算出部
48に対応し、平均算出手段は平均算出部53に対応
し、判定手段は補間量算出部54の横平均と縦平均との
比較を行う機能に対応し、第一の補間量算出手段および
第二の補間量算出手段は、補間量算出部54の補間量を
算出する機能に対応する。
Here, regarding the correspondence between the invention described in claim 6 and the present embodiment, the inclination calculating means corresponds to the inclination calculating section 48, the average calculating means corresponds to the average calculating section 53, and the determining means Corresponds to a function of comparing the horizontal average and the vertical average of the interpolation amount calculation unit 54, and the first interpolation amount calculation unit and the second interpolation amount calculation unit calculate the interpolation amount of the interpolation amount calculation unit 54. Corresponds to the function.

【0061】以下、図5および図8を参照して第三の実
施形態の動作を説明する。制御部40は、第二の実施形
態と同様にしてレリーズボタンが押下されたことを認識
すると、信号処理部46内の補間処理部52に対して、
補間処理の実行を指示する。補間処理部52は、このよ
うに指示されると、第二の実施形態と同様に、補間処理
の対象となる空格子点を選択し(図8S1)、傾斜算出
部48、平均算出部53および補間量算出部54を起動
する。
The operation of the third embodiment will be described below with reference to FIGS. When the control unit 40 recognizes that the release button has been pressed in the same manner as the second embodiment, the control unit 40 instructs the interpolation processing unit 52 in the signal processing unit 46 to
Instructs execution of interpolation processing. When instructed in this way, the interpolation processing unit 52 selects a vacancy point to be subjected to the interpolation processing (S1 in FIG. 8), as in the second embodiment, and calculates the inclination calculation unit 48, the average calculation unit 53, The interpolation amount calculation unit 54 is started.

【0062】傾斜算出部48は、第二の実施形態と同様
に、空格子点の座標(k,p)について、横傾斜HDと
縦傾斜VDとを HD = |G(k−1,p)−G(k+1,p)| VD = |G(k,p−1)−G(k,p+1)| によって算出する(図8S2)。
As in the second embodiment, the inclination calculating section 48 calculates the horizontal inclination HD and the vertical inclination VD for the coordinates (k, p) of the vacant lattice point as follows: HD = │G (k−1, p) -G (k + 1, p) | VD = | G (k, p-1) -G (k, p + 1) | (FIG. 8S2).

【0063】平均算出部53は、第二の実施形態と同様
に、空格子点の座標(k,p)について、横平均HMお
よび縦平均VMを HM = (G(k−1,p)+G(k+1,p))/
2 VM = (G(k,p−1)+G(k,p+1))/
2 によって算出する(図8S3)。
As in the second embodiment, the average calculation unit 53 calculates the horizontal average HM and the vertical average VM for the coordinates (k, p) of the vacancy points as HM = (G (k−1, p) + G (K + 1, p)) /
2 VM = (G (k, p-1) + G (k, p + 1)) /
2 (S3 in FIG. 8).

【0064】補間量算出部54は、横平均HMと縦平均
VMとを比較し、横平均HMと縦平均VMとの差が所定
値以下であるか否かを判定する(図8S4)。補間量算
出部54は、このような判定によって、横平均HMと縦
平均VMとの差が所定値以下であることを認識した場合
(図8S4のYES側)、空格子点に隣接する4つの格
子点の画素出力の平均値を補間量とする(図8S5)。
The interpolation amount calculator 54 compares the horizontal average HM with the vertical average VM, and determines whether or not the difference between the horizontal average HM and the vertical average VM is equal to or smaller than a predetermined value (S4 in FIG. 8). When the interpolation amount calculation unit 54 recognizes that the difference between the horizontal average HM and the vertical average VM is equal to or smaller than a predetermined value (YES side in S4 of FIG. 8), the interpolation amount calculation unit 54 determines the four adjacent four vacancy points. The average value of the pixel outputs at the grid points is set as the interpolation amount (S5 in FIG. 8).

【0065】また、補間量算出部54は、このような判
定によって、横平均HMと縦平均VMとの差が所定値を
上回ることを認識した場合(図8S4のNO側)、横傾
斜HDおよび縦傾斜VDに対応する重み付けを行って空
格子点の補間量を算出する(図8S6)。例えば、補間
量算出部54は、任意の値γについて、「|HM−VM
|>γ」が成り立つ場合、正の単調非減少関数fについ
て、補間量G'(k,p)を G'(k,p)= [{G(k−1,p)+G(k−1,p)}
/(2×f(HD))+{G(k,p−1)+G(k,p+1)}
/(2×f(VD)]/(1/f(HD)+1/f(VD)) によって算出する。
When the interpolation amount calculation unit 54 recognizes that the difference between the horizontal average HM and the vertical average VM exceeds a predetermined value (NO in FIG. 8S4), the horizontal inclination HD and the horizontal inclination HD A weight corresponding to the vertical inclination VD is weighted to calculate an interpolation amount of a vacancy (S6 in FIG. 8). For example, the interpolation amount calculation unit 54 sets “| HM−VM
|> Γ ”, the interpolation amount G ′ (k, p) is given by G ′ (k, p) = [{G (k−1, p) + G (k−1) for the positive monotone non-decreasing function f. , P)}
/ (2 × f (HD)) + {G (k, p−1) + G (k, p + 1)}
/ (2 × f (VD)] / (1 / f (HD) + 1 / f (VD))

【0066】なお、本実施形態では、予め決められた定
数cに対し、関数fの一例として、 f(X)=X+c を用いる。ただし、f(X)≠0とする。ここで、格子
点の画素出力の範囲Gを「0≦G≦255」とした場
合、γは20〜50程度とする。
In this embodiment, f (X) = X + c is used as an example of the function f for a predetermined constant c. Note that f (X) ≠ 0. Here, when the range G of the pixel output at the lattice point is set to “0 ≦ G ≦ 255”, γ is set to about 20 to 50.

【0067】補間処理部52は、このようにして空格子
点の補間量が決定されると、第二の実施形態と同様に、
全ての空格子点の補間処理が完了したか否かを判定し
(図8S7)、全ての空格子点の補間処理が完了したこ
とを認識するまで、上述した処理(図8S1以降の処
理)を繰り返し行う。
When the interpolation amount of the vacancy is determined in this way, the interpolation processing unit 52 performs the same operation as in the second embodiment.
It is determined whether or not the interpolation processing for all vacancies has been completed (S7 in FIG. 8), and the above-described processing (the processing from S1 onward in FIG. 8) is performed until it is recognized that the interpolation processing for all vacancies has been completed. Repeat.

【0068】すなわち、本実施形態では、横平均HMと
縦平均VMとの差が所定値を上回る場合(横平均HMと
縦平均VMとが一致していないとみなされる場合)に
は、横平均HMおよび縦平均VMに対応する重み係数に
基づいて空格子点の補間量が算出される。したがって、
本実施形態によれば、横平均HMと縦平均VMとの値が
酷似している場合であっても、空格子点の補間量を精度
良く算出することができる。
That is, in the present embodiment, when the difference between the horizontal average HM and the vertical average VM exceeds a predetermined value (when the horizontal average HM and the vertical average VM are not considered to match), the horizontal average The interpolation amount of the vacant point is calculated based on the weight coefficient corresponding to the HM and the vertical average VM. Therefore,
According to the present embodiment, even when the values of the horizontal average HM and the vertical average VM are very similar, the interpolation amount of the vacancy can be calculated with high accuracy.

【0069】なお、本実施形態では、重み係数は、空格
子点の補間量を算出する度に関数fが示す式によって算
出されているが、例えば、補間量算出部49、54に設
けられたメモリ内に、横傾斜および縦傾斜に対応付けて
重み係数を予め格納し、補間量を算出する度に読み出し
てもよい。また、本実施実施形態および上述した第二の
実施形態では、横平均HMと縦平均VMとの差が所定値
以下であることを認識した場合、空格子点に隣接する4
つの格子点の画素出力の平均値を補間量としているが、
このような場合、横平均または縦平均の値を補間量とし
てもよい。
In the present embodiment, the weighting coefficient is calculated by the equation indicated by the function f every time the interpolation amount of the vacancy is calculated. For example, the weighting coefficient is provided in the interpolation amount calculation units 49 and 54. A weight coefficient may be stored in the memory in advance in association with the horizontal inclination and the vertical inclination, and may be read each time the interpolation amount is calculated. Further, in the present embodiment and the above-described second embodiment, when it is recognized that the difference between the horizontal average HM and the vertical average VM is equal to or smaller than a predetermined value, 4
Although the average value of the pixel outputs of two grid points is used as the interpolation amount,
In such a case, the value of the horizontal average or the vertical average may be used as the interpolation amount.

【0070】さらに、上述した各実施形態では、緑色に
おける補間処理を行ったが、本発明はこのような補間処
理に限定されず、例えば、「赤色を出力する画素」と
「青色を出力する画素」とが市松模様状に配された撮像
素子によって生成された画像信号に適用することによっ
て、赤色や青色における補間処理を行うことも可能であ
る。
Furthermore, in each of the above-described embodiments, the interpolation processing for green was performed. However, the present invention is not limited to such interpolation processing. For example, “pixels for outputting red” and “pixels for outputting blue” Is applied to an image signal generated by an image sensor arranged in a checkered pattern, so that red and blue interpolation processing can be performed.

【0071】ところで、本発明は、格子点と空格子点と
が市松模様状に配された構成の撮像素子であれば、単板
や多板およびカラーフィルタの如何にかかわらず適用可
能であるが、図12(1)のように、一見、市松模様状
でない撮像素子に対しても適用することができる。例え
ば、図12(1)において、4つの緑色(G)の画素出
力の中心部分を空格子点と仮定した場合、図12(1)
で示される撮像素子を45度回転することによって、空
格子点の上下左右の4つの方向には、格子点が配されて
いると言える。そのため、上述した各実施形態と同様に
して、空格子点の補間量を算出することができる。
By the way, the present invention can be applied to any image pickup device having a configuration in which lattice points and vacant lattice points are arranged in a checkered pattern, irrespective of a single plate, multiple plates, and a color filter. As shown in FIG. 12A, the present invention can also be applied to an imaging device that does not look like a checkered pattern. For example, in FIG. 12A, assuming that the center portion of the four green (G) pixel outputs is a vacancy point, FIG.
By rotating the imaging element indicated by 45 degrees by 45 degrees, it can be said that grid points are arranged in four directions, up, down, left, and right of the vacant grid point. Therefore, the interpolation amount of the vacancy can be calculated in the same manner as in the above-described embodiments.

【0072】(第四の実施形態)ところで、上述した各
実施形態では、電子スチルカメラ内に補間処理部47、
52を設けて補間処理を行っているが、このような補間
処理は、画像処理装置やコンピュータによって行うこと
もできる。図9は、第四の実施形態の機能ブロック図で
ある。
(Fourth Embodiment) In each of the above-described embodiments, the interpolation processing section 47 is provided in the electronic still camera.
Although the interpolation process is performed by providing 52, such an interpolation process can also be performed by an image processing device or a computer. FIG. 9 is a functional block diagram of the fourth embodiment.

【0073】なお、本実施形態は、請求項7ないし請求
項9に記載の「補間処理プログラムを記録した記録媒
体」を用い、パーソナルコンピュータによって補間処理
を行うことに相当する。図9において、機能が図1およ
び図5に示す機能ブロック図と同じものについては、同
じ符号を付与して示し、構成の説明については省略す
る。
This embodiment corresponds to performing an interpolation process by a personal computer using the "recording medium on which the interpolation process program is recorded" according to the seventh to ninth aspects. In FIG. 9, components having the same functions as those in the functional block diagrams shown in FIGS. 1 and 5 are denoted by the same reference numerals, and description of the configuration is omitted.

【0074】なお、図9に示す電子スチルカメラ60と
図1および図5に示す実施形態との構成の相違点は、信
号処理部61が信号処理部46に代えて設けられ、メモ
リカードドライバ50が設けられた点と、画像バッファ
メモリ45の出力が信号処理部61に接続され、信号処
理部61の出力がメモリカードドライバ50に接続され
た点である。
The difference between the electronic still camera 60 shown in FIG. 9 and the embodiment shown in FIGS. 1 and 5 is that a signal processing section 61 is provided instead of the signal processing section 46 and a memory card driver 50 is provided. Is provided, and the output of the image buffer memory 45 is connected to the signal processing unit 61, and the output of the signal processing unit 61 is connected to the memory card driver 50.

【0075】図において、パーソナルコンピュータ62
は、CPU63、メモリカードドライバ64および画像
メモリ65を有する。CPU63は、メモリカードドラ
イバ64および画像メモリ65に接続され、メモリカー
ドドライバ64と画像メモリ65とは相互に接続され
る。なお、CPU63には、CD−ROM66に記録さ
れた補間処理プログラムが予めインストールされてい
る。
In the figure, a personal computer 62
Has a CPU 63, a memory card driver 64, and an image memory 65. The CPU 63 is connected to the memory card driver 64 and the image memory 65, and the memory card driver 64 and the image memory 65 are mutually connected. Note that an interpolation processing program recorded on the CD-ROM 66 is installed in the CPU 63 in advance.

【0076】ここで、請求項7ないし請求項9に記載の
「補間処理プログラムを記録した記録媒体」は、CD−
ROM66に対応し、傾斜算出手順、補間量決定手順、
平均算出手順、第一の判定手順、第二の判定手順、第一
の補間量決定手順、第二の補間量決定手順、第三の補間
量決定手順、補間量算出手順、判定手順、第一の補間量
算出手順および第二の補間量算出手順は、CPU63に
よって行われる補間処理に相当する。
Here, the “recording medium on which the interpolation processing program is recorded” according to any one of claims 7 to 9 is a CD-ROM.
Corresponding to the ROM 66, a tilt calculation procedure, an interpolation amount determination procedure,
Average calculation procedure, first determination procedure, second determination procedure, first interpolation amount determination procedure, second interpolation amount determination procedure, third interpolation amount determination procedure, interpolation amount calculation procedure, determination procedure, first The interpolation amount calculation procedure and the second interpolation amount calculation procedure correspond to the interpolation processing performed by the CPU 63.

【0077】図10は、第四の実施形態の動作フローチ
ャートである。以下、図9および図10を参照して第四
の実施形態の動作を説明する。電子スチルカメラ60に
おいて、撮像素子43では、第一の実施形態と同様に、
信号電荷が生成される。また、撮像素子43は、このよ
うに生成された信号電荷を走査して画像信号を生成し、
A/D変換部44に与える。
FIG. 10 is an operation flowchart of the fourth embodiment. Hereinafter, the operation of the fourth embodiment will be described with reference to FIGS. In the electronic still camera 60, in the image sensor 43, as in the first embodiment,
A signal charge is generated. Further, the image pickup device 43 scans the signal charges thus generated to generate an image signal,
The signal is supplied to the A / D converter 44.

【0078】A/D変換部44は、このように与えられ
た画像信号をA/D変換して画像データを生成する(図
10S1)。このように生成された画像データは、画像
バッファメモリ45内に一時的に格納される(図10S
2)。このような処理は、制御部40によるタイミング
制御に基づき繰り返し行われる。
The A / D converter 44 performs A / D conversion on the image signal given in this way to generate image data (S1 in FIG. 10). The image data generated in this way is temporarily stored in the image buffer memory 45 (FIG. 10S
2). Such processing is repeatedly performed based on the timing control by the control unit 40.

【0079】制御部40は、レリーズボタン(図示され
ない)が押下されたか否かを判定し(図10S3)、レ
リーズボタンが押下されたことを認識すると、信号処理
部61およびメモリカードドライバ50に対して、画像
バッファメモリ45に格納された画像データをメモリカ
ード51に記録することを指示する(図10S4)。信
号処理部61では、画像バッファメモリ45に格納され
た画像データに対して、撮像素子固有の問題点(例え
ば、暗レベルなど)の調整などを行い、γ補正などの処
理を施し(ここで、補間処理は行われない。)、メモリ
カードドライバ50に与える。なお、γ補正は、信号処
理部61で行わず、パーソナルコンピュータ62内で行
ってもよい。
The control unit 40 determines whether or not a release button (not shown) has been pressed (S3 in FIG. 10). When recognizing that the release button has been pressed, the control unit 40 sends a signal to the signal processing unit 61 and the memory card driver 50. Then, an instruction is given to record the image data stored in the image buffer memory 45 on the memory card 51 (S4 in FIG. 10). The signal processing unit 61 adjusts the image data stored in the image buffer memory 45 for a problem (for example, a dark level) unique to the image sensor, and performs processing such as γ correction (here, No interpolation processing is performed.), And is given to the memory card driver 50. Note that the γ correction may be performed in the personal computer 62 without being performed in the signal processing unit 61.

【0080】メモリカードドライバ50は、画像データ
を画像ファイルの形式でメモリカード51に記録すると
共に、画像ファイルのヘッダ部に設けられた「補間要求
フラグ」(画像データが補間処理を必要とする旨を示す
フラグ)を立てる。このようにして画像データが記録さ
れたメモリカード51がパーソナルコンピュータ62に
装填されると、CPU63は、メモリカードドライバ6
4を介して画像ファイルのヘッダ部を読み出す(図10
S5)。
The memory card driver 50 records the image data on the memory card 51 in the form of an image file, and also stores an “interpolation request flag” (indicating that the image data requires interpolation processing) provided in the header of the image file. Is set. When the memory card 51 on which the image data is recorded is loaded into the personal computer 62, the CPU 63
4 to read out the header of the image file (FIG. 10)
S5).

【0081】CPU63は、このようにして画像ファイ
ルのヘッダ部を読み出すと、「補間要求フラグ」が立っ
ているか否かを判定する(図10S6)。CPU63
は、このような判定によって「補間要求フラグ」が立っ
ていることを認識した場合に限り、メモリカードドライ
バ64を介して画像データを読み出して画像メモリ65
に格納する(図10S7)。
When reading the header of the image file in this manner, the CPU 63 determines whether or not the "interpolation request flag" is set (S6 in FIG. 10). CPU63
Only when it is recognized that the “interpolation request flag” is set by such a determination, the image data is read out via the memory card driver 64 and the image memory 65 is read out.
(S7 in FIG. 10).

【0082】また、CPU63は、画像メモリ65に格
納した画像データに対し、補間処理を施す(図10S
8)。なお、本実施形態の補間処理は、上述した各実施
形態の補間処理と同じであるため、説明を省略する。C
PU63は、補間処理が終了した時点で、補間処理が施
された画像データをメモリカードドライバ64を介して
メモリカード51に再度記録する(図10S9)。な
お、補間処理が施された画像データをメモリカード51
に記録するか否かは、操作者がパーソナルコンピュータ
42の入力装置(例えば、キーボードなど)によって選
択できるようにしてもよい。
The CPU 63 performs an interpolation process on the image data stored in the image memory 65 (FIG. 10S).
8). Note that the interpolation processing according to the present embodiment is the same as the interpolation processing according to each of the above-described embodiments, and a description thereof will not be repeated. C
When the interpolation processing is completed, the PU 63 records the interpolated image data again on the memory card 51 via the memory card driver 64 (S9 in FIG. 10). The image data subjected to the interpolation processing is transferred to the memory card 51.
May be selected by an operator using an input device (for example, a keyboard or the like) of the personal computer 42.

【0083】すなわち、本実施形態では、上述した各実
施形態と同様の補間処理をパーソナルコンピュータ62
によって確実に行うことができる。したがって、本実施
形態によれば、空格子点の空間的な方向性を隣接する格
子点の画素出力に基づいて確実に推定することができる
ため、補間処理の精度を確実に向上することができる。
That is, in the present embodiment, the same interpolation processing as in the above-described embodiments is performed by the personal computer 62.
Can be performed reliably. Therefore, according to the present embodiment, since the spatial directionality of a vacant lattice point can be reliably estimated based on the pixel output of an adjacent lattice point, the accuracy of the interpolation processing can be reliably improved. .

【0084】なお、本実施形態では、パーソナルコンピ
ュータ62は補間処理を行うべき画像データをメモリカ
ード51を介して取得しているが、このような画像デー
タを取得する方法については、如何なる方法であっても
よい。例えば、通信手段を備えたパーソナルコンピュー
タに本発明を適用する場合、その通信手段を介して与え
られる画像データに対して補間処理を行うことも可能で
ある。
In this embodiment, the personal computer 62 obtains the image data to be subjected to the interpolation processing via the memory card 51. However, any method can be used to obtain such image data. You may. For example, when the present invention is applied to a personal computer having communication means, it is possible to perform interpolation processing on image data provided via the communication means.

【0085】[0085]

【発明の効果】上述したように請求項1および請求項7
に記載の発明では、空格子点の空間的な方向性を隣接す
る格子点の画素出力に基づいて推定できるため、空格子
点の補間量の信頼性を確実に向上することができる。ま
た、簡単な演算を行うことによって空格子点の空間的な
方向性を容易に推定することができるため、空格子点の
補間量を速やかに、かつ確実に求めることができる。
As described above, claims 1 and 7 are as described above.
According to the invention described in (1), since the spatial directionality of a vacancy point can be estimated based on the pixel outputs of adjacent lattice points, the reliability of the interpolation amount of the vacancy point can be reliably improved. In addition, since the spatial directionality of a vacancy can be easily estimated by performing a simple calculation, the interpolation amount of the vacancy can be quickly and reliably obtained.

【0086】請求項2に記載の発明では、空格子点の空
間的な方向性を推定する際の標準化を実現しつつ、簡単
な演算を行うことによって空格子点の空間的な方向性を
容易に推定することができる。請求項3に記載の発明で
は、補間の対象となる画像の特性に適用しつつ、空格子
点の空間的な方向性を確実に推定することができる。
According to the second aspect of the present invention, the spatial orientation of the vacancy is easily performed by performing a simple operation while standardizing the estimation of the spatial orientation of the vacancy. Can be estimated. According to the third aspect of the present invention, it is possible to reliably estimate the spatial directionality of a vacancy while applying the characteristics to the characteristics of an image to be interpolated.

【0087】請求項4に記載の発明では、補間の対象と
なる画像の特性に適用しつつ、空格子点の空間的な方向
性を確実に推定することができる。請求項5および請求
項8に記載の発明では、横傾斜や縦傾斜だけで空格子点
の空間的な方向性が推定できない場合であっても、横平
均、縦平均および空格子点に隣接する格子点の周囲に配
された格子点に基づいて、空格子点の空間的な方向性を
確実に推定することができる。そのため、空格子点の補
間量の信頼性を確実に向上することができる。
According to the fourth aspect of the present invention, it is possible to reliably estimate the spatial directionality of a vacancy while applying the characteristics of the image to be interpolated. According to the fifth and eighth aspects of the present invention, even when the spatial direction of a vacancy cannot be estimated only by the horizontal inclination or the vertical inclination, it is adjacent to the horizontal average, the vertical average, and the vacancy. Based on the grid points arranged around the grid points, it is possible to reliably estimate the spatial directionality of the empty grid points. Therefore, the reliability of the interpolation amount of the vacancy can be reliably improved.

【0088】請求項6および請求項9に記載の発明で
は、画像の滑らかさを損なうことなく、空格子点の補間
量を精度良く算出することができる。
According to the sixth and ninth aspects of the present invention, the interpolation amount of the vacancy can be calculated with high accuracy without impairing the smoothness of the image.

【図面の簡単な説明】[Brief description of the drawings]

【図1】第一の実施形態の機能ブロック図である。FIG. 1 is a functional block diagram of a first embodiment.

【図2】第一の実施形態の動作フローチャートである。FIG. 2 is an operation flowchart of the first embodiment.

【図3】第一の実施形態の補間処理の動作フローチャー
トである。
FIG. 3 is an operation flowchart of an interpolation process according to the first embodiment.

【図4】格子点の画素出力と空格子点の補間量とを示し
た図である。
FIG. 4 is a diagram showing a pixel output of a grid point and an interpolation amount of an empty grid point.

【図5】第二の実施形態の機能ブロック図である。FIG. 5 is a functional block diagram of a second embodiment.

【図6】第二の実施形態の補間処理の動作フローチャー
トである。
FIG. 6 is an operation flowchart of an interpolation process according to the second embodiment.

【図7】相関量の算出方法を説明する図である。FIG. 7 is a diagram illustrating a method of calculating a correlation amount.

【図8】第三の実施形態の補間処理の動作フローチャー
トである。
FIG. 8 is an operation flowchart of an interpolation process according to the third embodiment.

【図9】第四の実施形態の機能ブロック図である。FIG. 9 is a functional block diagram of a fourth embodiment.

【図10】第四の実施形態の動作フローチャートであ
る。
FIG. 10 is an operation flowchart of the fourth embodiment.

【図11】撮像素子の構成を示す図である。FIG. 11 is a diagram illustrating a configuration of an image sensor.

【図12】撮像素子の構成を示す図である。FIG. 12 is a diagram illustrating a configuration of an image sensor.

【図13】従来の補間処理を説明する図である。FIG. 13 is a diagram illustrating a conventional interpolation process.

【符号の説明】[Explanation of symbols]

40 制御部 41 撮影光学系 42 OLPF 43 撮像素子 44 A/D変換部 45 画像バッファメモリ 46、61 信号処理部 47、52 補間処理部 48 傾斜算出部 49、54 補間量算出部 50、64 メモリカードドライバ 51 メモリカード 53 平均算出部 60 電子スチルカメラ 62 パーソナルコンピュータ 63 CPU 65 画像メモリ 66 CD−ROM Reference Signs List 40 control unit 41 photographing optical system 42 OLPF 43 image sensor 44 A / D conversion unit 45 image buffer memory 46, 61 signal processing unit 47, 52 interpolation processing unit 48 inclination calculation unit 49, 54 interpolation amount calculation unit 50, 64 memory card Driver 51 Memory card 53 Average calculation unit 60 Electronic still camera 62 Personal computer 63 CPU 65 Image memory 66 CD-ROM

Claims (9)

【特許請求の範囲】[Claims] 【請求項1】 予め決められた色を出力する格子点と該
色を出力しない空格子点とが市松模様状に配された画像
の補間を行い、該空格子点の画素出力となる補間量を求
める補間装置において、 前記格子点および前記空格子点の位置を「右方向を正と
する横軸X」と「下方向を正とする縦軸Y」とで構成さ
れる座標系で表し、該格子点の画素出力をG(X,Y)
で表す場合、該空格子点の座標を(k,p)とすると、
該空格子点に対して水平方向に隣接する2つの格子点の
画素出力の差を示す横傾斜HDと、該空格子点に対して
垂直方向に隣接する2つの格子点の画素出力の差を示す
縦傾斜VDとを HD = |G(k−1,p)−G(k+1,p)| VD = |G(k,p−1)−G(k,p+1)| によって算出する傾斜算出手段と、 前記空格子点の補間量をG'(k,p)とすると、前記
傾斜算出手段によって算出された横傾斜HDと縦傾斜V
Dとを比較し、任意の値Thについて、「HD>VD+T
h」が成り立つ場合、 G'(k,p) = {G(k,p−1)+G(k,p
+1)}/2 とし、「VD>HD+Th」が成り立つ場合、 G'(k,p) = {G(k−1,p)+G(k+
1,p)}/2 とし、「|HD−VD|≦Th」が成り立つ場合、 G'(k,p) = {G(k−1,p)+G(k+
1,p)+G(k,p−1)+G(k,p+1)}/4 とする補間量決定手段とを備えたことを特徴とする補間
装置。
An interpolation amount for interpolating an image in which lattice points outputting a predetermined color and empty lattice points not outputting the color are arranged in a checkered pattern, and outputting pixel data of the empty lattice point In the interpolating apparatus, the positions of the lattice points and the empty lattice points are represented by a coordinate system composed of “a horizontal axis X having a positive right direction” and a vertical axis Y having a positive downward direction. The pixel output of the grid point is represented by G (X, Y)
When the coordinates of the vacancy are (k, p),
The horizontal slope HD indicating the difference between the pixel outputs of two grid points horizontally adjacent to the empty grid point, and the difference between the pixel outputs of two grid points vertically adjacent to the empty grid point are shown. Inclination calculating means for calculating the vertical inclination VD indicated by HD = | G (k-1, p) -G (k + 1, p) | VD = | G (k, p-1) -G (k, p + 1) | When the interpolation amount of the vacant point is G ′ (k, p), the horizontal inclination HD and the vertical inclination V calculated by the inclination calculating means are calculated.
D and for any value Th, “HD> VD + T
h ”holds, then G ′ (k, p) = {G (k, p−1) + G (k, p
+1)} / 2, and when “VD> HD + Th” holds, G ′ (k, p) = {G (k−1, p) + G (k +
1, p)} / 2, and when “| HD−VD | ≦ Th” is satisfied, G ′ (k, p) = {G (k−1, p) + G (k +
(P) + G (k, p−1) + G (k, p + 1)} / 4.
【請求項2】 請求項1に記載の補間装置において、 前記傾斜算出手段は、 前記Thの値を予め決められた一定の値とすることを特徴
とする補間装置。
2. The interpolation device according to claim 1, wherein the slope calculation means sets the value of Th to a predetermined constant value.
【請求項3】 請求項1に記載の補間装置において、 前記傾斜算出手段は、 前記Thの値を前記空格子点に隣接する格子点の画素出力
に対応付けて決定することを特徴とする補間装置。
3. The interpolation device according to claim 1, wherein the inclination calculating unit determines the value of Th in association with a pixel output of a grid point adjacent to the empty grid point. apparatus.
【請求項4】 請求項1に記載の補間装置において、 前記傾斜算出手段は、 前記空格子点に隣接する格子点の画素出力の最大値、該
空格子点に隣接する格子点の画素出力の平均値、該空格
子点に水平方向に隣接する格子点の画素出力の平均値も
しくは該空格子点に垂直方向に隣接する格子点の画素出
力の平均値に基づき前記Thの値を決定することを特徴と
する補間装置。
4. The interpolation device according to claim 1, wherein the slope calculating means calculates a maximum value of a pixel output of a grid point adjacent to the vacant grid point, and a maximum value of a pixel output of a grid point adjacent to the vacant grid point. Determining the value of Th based on an average value, an average value of pixel outputs of grid points horizontally adjacent to the empty grid point or an average value of pixel outputs of grid points vertically adjacent to the empty grid point; An interpolation device characterized by the above-mentioned.
【請求項5】 予め決められた色を出力する格子点と該
色を出力しない空格子点とが市松模様状に配された画像
の補間を行い、該空格子点の画素出力となる補間量を求
める補間装置において、 前記空格子点に対して水平方向に隣接する2つの格子点
の画素出力の差を示す横傾斜と、該空格子点に対して垂
直方向に隣接する2つの格子点の画素出力の差を示す縦
傾斜とを算出する傾斜算出手段と、 前記空格子点に対して水平方向に隣接する2つの格子点
の画素出力の平均を示す横平均と、該空格子点に対して
垂直方向に隣接する2つの格子点の画素出力の平均を示
す縦平均とを算出する平均算出手段と、 前記傾斜算出手段によって算出された横傾斜と縦傾斜と
を予め決められた条件に基づいて比較することによっ
て、これらの傾斜が一致しているとみなせるか否かを判
定する第一の判定手段と、 前記平均算出手段によって算出された横平均と縦平均と
を予め決められた条件に基づいて比較することによっ
て、これらの平均が一致しているとみなせるか否かを判
定する第二の判定手段と、 前記第一の判定手段によって横傾斜と縦傾斜とが一致し
ていないと判定された場合、前記空格子点に対して傾斜
の少ない方向に隣接する2つの格子点の画素出力に基づ
いて該空格子点の補間量を決定する第一の補間量決定手
段と、 前記第一の判定手段および前記第二の判定手段によって
横傾斜と縦傾斜とが一致し、かつ横平均と縦平均とが一
致していると判定された場合、前記空格子点に隣接する
4つの格子点の画素出力の平均に相当する値を該空格子
点の補間量とする第二の補間量決定手段と、 前記第一の判定手段および前記第二の判定手段によって
横傾斜と縦傾斜とが一致し、かつ横平均と縦平均とが一
致していないと判定された場合、前記空格子点に隣接す
る格子点の画素出力とこれらの格子点の周囲に配された
格子点の画素出力との類似性に基づいて、該空格子点の
補間量を決定する第三の補間量決定手段とを備えたこと
を特徴とする補間装置。
5. An interpolation amount for interpolating an image in which lattice points for outputting a predetermined color and vacant lattice points not outputting the color are arranged in a checkered pattern, and the pixel output of the vacant lattice point is performed. In the interpolating apparatus, a horizontal slope indicating a difference between pixel outputs of two grid points horizontally adjacent to the empty grid point, and a horizontal slope of two grid points vertically adjacent to the empty grid point, Inclination calculating means for calculating a vertical inclination indicating a difference between pixel outputs; a horizontal average indicating an average of pixel outputs of two grid points horizontally adjacent to the vacant grid point; Means for calculating a vertical average indicating the average of the pixel outputs of two grid points vertically adjacent to each other, and determining the horizontal inclination and the vertical inclination calculated by the inclination calculating means based on predetermined conditions. These slopes match by comparing By comparing the horizontal average and the vertical average calculated by the average calculation unit based on predetermined conditions, the first determination unit that determines whether or not the average can be regarded as being equal to each other, The second determining means for determining whether or not it can be considered that, if it is determined that the horizontal inclination and the vertical inclination do not match by the first determination means, the inclination of the vacancy with respect to the vacant point First interpolation amount determining means for determining an interpolation amount of the empty grid point based on pixel outputs of two grid points adjacent to each other in a smaller direction; and a lateral inclination by the first determining means and the second determining means. When it is determined that the horizontal average and the vertical average match and the horizontal average and the vertical average match, a value corresponding to the average of the pixel outputs of four grid points adjacent to the empty grid point is calculated as the empty grid. A second interpolation amount determining means for interpolating the point, When it is determined that the horizontal inclination and the vertical inclination match by the first determination unit and the second determination unit, and that the horizontal average and the vertical average do not match, a grid adjacent to the empty grid point A third interpolation amount determining means for determining the interpolation amount of the empty grid point based on the similarity between the pixel output of the point and the pixel outputs of the grid points arranged around these grid points. An interpolation device characterized by the above-mentioned.
【請求項6】 予め決められた色を出力する格子点と該
色を出力しない空格子点とが市松模様状に配された画像
の補間を行い、該空格子点の画素出力となる補間量を求
める補間装置において、 前記空格子点に対して水平方向に隣接する2つの格子点
の画素出力の差を示す横傾斜と、該空格子点に対して垂
直方向に隣接する2つの格子点の画素出力の差を示す縦
傾斜とを算出する傾斜算出手段と、 前記空格子点に対して水平方向に隣接する2つの格子点
の画素出力の平均を示す横平均と、該空格子点に対して
垂直方向に隣接する2つの格子点の画素出力の平均を示
す縦平均とを算出する平均算出手段と、 前記平均算出手段によって算出された横平均と縦平均と
を予め決められた条件に基づいて比較することによっ
て、これらの平均が一致しているとみなせるか否かを判
定する判定手段と、 前記判定手段によって横平均と縦平均とが一致していな
いと判定された場合、前記傾斜算出手段によって算出さ
れた横傾斜および縦傾斜に対応する重み付けを行って前
記空格子点の補間量を算出する第一の補間量算出手段
と、 前記判定手段によって横平均と縦平均とが一致している
と判定された場合、前記空格子点に隣接する4つの格子
点の画素出力の平均に相当する値を該空格子点の補間量
とする第二の補間量算出手段とを備えたことを特徴とす
る補間装置。
6. An interpolation amount of an image in which lattice points for outputting a predetermined color and empty lattice points for not outputting the color are arranged in a checkered pattern, and the interpolation amount becomes a pixel output of the empty lattice point. In the interpolating apparatus, a horizontal slope indicating a difference between pixel outputs of two grid points horizontally adjacent to the empty grid point, and a horizontal slope of two grid points vertically adjacent to the empty grid point, Inclination calculating means for calculating a vertical inclination indicating a difference between pixel outputs; a horizontal average indicating an average of pixel outputs of two grid points horizontally adjacent to the vacant grid point; Average calculating means for calculating a vertical average indicating an average of pixel outputs of two grid points vertically adjacent to each other, and calculating a horizontal average and a vertical average calculated by the average calculating means based on predetermined conditions. Comparisons show that these averages are consistent. Determining means for determining whether or not the horizontal average and vertical average do not coincide with each other. If the horizontal average does not match the vertical average, the determination means determines whether the horizontal average and the vertical average correspond to the horizontal inclination and the vertical inclination calculated by the inclination calculation means. First interpolation amount calculating means for performing weighting to calculate the interpolation amount of the vacancy, and when the determination means determines that the horizontal average and the vertical average are the same, adjacent to the vacancy A second interpolation amount calculating means for setting a value corresponding to an average of pixel outputs of four lattice points to be an interpolation amount of the empty lattice point.
【請求項7】 予め決められた色を出力する格子点と該
色を出力しない空格子点とが市松模様状に配された画像
の補間をコンピュータに実行させ、該空格子点の画素出
力となる補間量を求める補間処理プログラムを記録した
記録媒体であって、 前記格子点および前記空格子点の位置を「右方向を正と
する横軸X」と「下方向を正とする縦軸Y」とで構成さ
れる座標系で表し、該格子点の画素出力をG(X,Y)
で表す場合、該空格子点の座標を(k,p)とすると、
該空格子点に対して水平方向に隣接する2つの格子点の
画素出力の差を示す横傾斜HDと、該空格子点に対して
垂直方向に隣接する2つの格子点の画素出力の差を示す
縦傾斜VDとを HD = |G(k−1,p)−G(k+1,p)| VD = |G(k,p−1)−G(k,p+1)| によって算出する傾斜算出手順と、 前記空格子点の補間量をG'(k,p)とすると、前記
傾斜算出手順によって算出された横傾斜HDと縦傾斜V
Dとを比較し、任意の値Thについて、「HD>VD+T
h」が成り立つ場合、 G'(k,p) = {G(k,p−1)+G(k,p
+1)}/2 とし、「VD>HD+Th」が成り立つ場合、 G'(k,p) = {G(k−1,p)+G(k+
1,p)}/2 とし、「|HD−VD|≦Th」が成り立つ場合、 G'(k,p) = {G(k−1,p)+G(k+
1,p)+G(k,p−1)+G(k,p+1)}/4 とする補間量決定手順とをコンピュータに実行させるた
めの補間処理プログラムを記録した記録媒体。
7. A computer that interpolates an image in which grid points that output a predetermined color and empty grid points that do not output the color are arranged in a checkerboard pattern, and outputs the pixel output of the empty grid point. A recording medium on which an interpolation processing program for obtaining an interpolation amount is recorded, wherein the positions of the lattice points and the vacant lattice points are “a horizontal axis X having a positive right direction” and a vertical axis Y having a downward positive direction. And the pixel output of the grid point is represented by G (X, Y).
When the coordinates of the vacancy are (k, p),
The horizontal slope HD indicating the difference between the pixel outputs of two grid points horizontally adjacent to the empty grid point, and the difference between the pixel outputs of two grid points vertically adjacent to the empty grid point are shown. And the vertical inclination VD shown by HD = | G (k-1, p) -G (k + 1, p) | VD = | G (k, p-1) -G (k, p + 1) | When the interpolation amount of the vacant point is G ′ (k, p), the horizontal inclination HD and the vertical inclination V calculated by the inclination calculation procedure are calculated.
D and for any value Th, “HD> VD + T
h ”holds, then G ′ (k, p) = {G (k, p−1) + G (k, p
+1)} / 2, and when “VD> HD + Th” holds, G ′ (k, p) = {G (k−1, p) + G (k +
1, p)} / 2, and when “| HD−VD | ≦ Th” is satisfied, G ′ (k, p) = {G (k−1, p) + G (k +
(P) + G (k, p−1) + G (k, p + 1)} / 4. A recording medium for recording an interpolation processing program for causing a computer to execute the procedure.
【請求項8】 予め決められた色を出力する格子点と該
色を出力しない空格子点とが市松模様状に配された画像
の補間をコンピュータに実行させ、該空格子点の画素出
力となる補間量を求める補間処理プログラムを記録した
記録媒体であって、 前記空格子点に対して水平方向に隣接する2つの格子点
の画素出力の差を示す横傾斜と、該空格子点に対して垂
直方向に隣接する2つの格子点の画素出力の差を示す縦
傾斜とを算出する傾斜算出手順と、 前記空格子点に対して水平方向に隣接する2つの格子点
の画素出力の平均を示す横平均と、該空格子点に対して
垂直方向に隣接する2つの格子点の画素出力の平均を示
す縦平均とを算出する平均算出手順と、 前記傾斜算出手順によって算出された横傾斜と縦傾斜と
を予め決められた条件に基づいて比較することによっ
て、これらの傾斜が一致しているとみなせるか否かを判
定する第一の判定手順と、 前記平均算出手順によって算出された横平均と縦平均と
を予め決められた条件に基づいて比較することによっ
て、これらの平均が一致しているとみなせるか否かを判
定する第二の判定手順と、 前記第一の判定手順によって横傾斜と縦傾斜とが一致し
ていないと判定された場合、前記空格子点に対して傾斜
の少ない方向に隣接する2つの格子点の画素出力に基づ
いて該空格子点の補間量を決定する第一の補間量決定手
順と、 前記第一の判定手順および前記第二の判定手順によって
横傾斜と縦傾斜とが一致し、かつ横平均と縦平均とが一
致していると判定された場合、前記空格子点に隣接する
4つの格子点の画素出力の平均に相当する値を該空格子
点の補間量とする第二の補間量決定手順と、 前記第一の判定手順および前記第二の判定手順によって
横傾斜と縦傾斜とが一致し、かつ横平均と縦平均とが一
致していないと判定された場合、前記空格子点に隣接す
る格子点の画素出力とこれらの格子点の周囲に配された
格子点の画素出力との類似性に基づいて、該空格子点の
補間量を決定する第三の補間量決定手順とをコンピュー
タに実行させるための補間処理プログラムを記録した記
録媒体。
8. A computer that performs interpolation of an image in which lattice points that output a predetermined color and empty lattice points that do not output the color are arranged in a checkerboard pattern. A recording medium on which an interpolation processing program for obtaining an interpolation amount is recorded, wherein a horizontal slope indicating a difference between pixel outputs of two grid points horizontally adjacent to the vacant grid point, Calculating a vertical slope indicating a difference between pixel outputs of two grid points vertically adjacent to each other, and calculating an average of pixel outputs of two grid points horizontally adjacent to the empty grid point. A horizontal average, and an average calculation procedure of calculating a vertical average indicating an average of pixel outputs of two grid points vertically adjacent to the vacant grid point; and a horizontal slope calculated by the slope calculation procedure. The vertical inclination is determined based on predetermined conditions. By comparing, the first determination procedure to determine whether or not these slopes can be considered to match, and the horizontal average and the vertical average calculated by the average calculation procedure based on a predetermined condition By comparing them, a second determination procedure for determining whether or not these averages can be considered to be consistent, and it is determined that the horizontal slope and the vertical slope do not match by the first determination procedure In this case, a first interpolation amount determining step of determining an interpolation amount of the empty lattice point based on pixel outputs of two lattice points adjacent to the empty lattice point in a direction with a small inclination, When it is determined that the horizontal inclination and the vertical inclination coincide with each other by the determination procedure and the second determination procedure, and that the horizontal average and the vertical average coincide with each other, the four lattice points adjacent to the empty lattice point are determined. The value corresponding to the average of the pixel output is The second interpolation amount determination procedure to be the interpolation amount of the grid points, the horizontal inclination and the vertical inclination match by the first determination procedure and the second determination procedure, and the horizontal average and the vertical average match. If it is determined that the vacancy is not present, the interpolation of the vacancy is performed based on the similarity between the pixel outputs of the lattice points adjacent to the vacancy and the pixel outputs of the lattice points arranged around these lattice points. A recording medium for recording an interpolation processing program for causing a computer to execute a third interpolation amount determination procedure for determining an amount.
【請求項9】 予め決められた色を出力する格子点と該
色を出力しない空格子点とが市松模様状に配された画像
の補間をコンピュータに実行させ、該空格子点の画素出
力となる補間量を求める補間処理プログラムを記録した
記録媒体であって、 前記空格子点に対して水平方向に隣接する2つの格子点
の画素出力の差を示す横傾斜と、該空格子点に対して垂
直方向に隣接する2つの格子点の画素出力の差を示す縦
傾斜とを算出する傾斜算出手順と、 前記空格子点に対して水平方向に隣接する2つの格子点
の画素出力の平均を示す横平均と、該空格子点に対して
垂直方向に隣接する2つの格子点の画素出力の平均を示
す縦平均とを算出する平均算出手順と、 前記平均算出手順によって算出された横平均と縦平均と
を予め決められた条件に基づいて比較することによっ
て、これらの平均が一致しているとみなせるか否かを判
定する判定手順と、 前記判定手順によって横平均と縦平均とが一致していな
いと判定された場合、前記傾斜算出手順によって算出さ
れた横傾斜および縦傾斜に対応する重み付けを行って前
記空格子点の補間量を算出する第一の補間量算出手順
と、 前記判定手順によって横平均と縦平均とが一致している
と判定された場合、前記空格子点に隣接する4つの格子
点の画素出力の平均に相当する値を該空格子点の補間量
とする第二の補間量算出手順とをコンピュータに実行さ
せるための補間処理プログラムを記録した記録媒体。
9. A computer that executes interpolation of an image in which grid points for outputting a predetermined color and empty grid points that do not output the color are arranged in a checkered pattern, and outputs a pixel output of the empty grid point. A recording medium on which an interpolation processing program for obtaining an interpolation amount is recorded, wherein a horizontal slope indicating a difference between pixel outputs of two grid points horizontally adjacent to the vacant grid point, Calculating a vertical slope indicating a difference between pixel outputs of two grid points vertically adjacent to each other, and calculating an average of pixel outputs of two grid points horizontally adjacent to the empty grid point. An average calculation procedure of calculating a horizontal average and a vertical average indicating an average of pixel outputs of two grid points vertically adjacent to the empty grid point; and a horizontal average calculated by the average calculation procedure. Vertical average based on predetermined conditions By comparing, it is determined whether or not these averages can be considered to match, and, if it is determined by the determination procedure that the horizontal average and the vertical average do not match, the inclination calculation procedure A first interpolation amount calculating step of performing weighting corresponding to the horizontal inclination and the vertical inclination calculated by the above to calculate the interpolation amount of the vacant point, and the horizontal average and the vertical average match by the determination procedure. Is determined, the second interpolation amount calculation procedure in which a value corresponding to the average of the pixel outputs of the four grid points adjacent to the vacancy point is used as the interpolation amount of the vacancy point is executed by the computer. Recording medium on which the interpolation processing program is recorded.
JP9315036A 1997-11-17 1997-11-17 Interpolation device and recording medium recording interpolation processing program Pending JPH11150663A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP9315036A JPH11150663A (en) 1997-11-17 1997-11-17 Interpolation device and recording medium recording interpolation processing program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP9315036A JPH11150663A (en) 1997-11-17 1997-11-17 Interpolation device and recording medium recording interpolation processing program

Publications (1)

Publication Number Publication Date
JPH11150663A true JPH11150663A (en) 1999-06-02

Family

ID=18060660

Family Applications (1)

Application Number Title Priority Date Filing Date
JP9315036A Pending JPH11150663A (en) 1997-11-17 1997-11-17 Interpolation device and recording medium recording interpolation processing program

Country Status (1)

Country Link
JP (1) JPH11150663A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003509778A (en) * 1999-09-16 2003-03-11 シルバーブルック リサーチ ピーティーワイ リミテッド Method and apparatus for rotating Bayer images

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003509778A (en) * 1999-09-16 2003-03-11 シルバーブルック リサーチ ピーティーワイ リミテッド Method and apparatus for rotating Bayer images
US7558443B2 (en) 1999-09-16 2009-07-07 Silverbrook Research Pty Ltd Camera system with real-time dithering and printing capabilities
US7936918B2 (en) 1999-09-16 2011-05-03 Silverbrook Research Pty Ltd Method of printing from digital camera system

Similar Documents

Publication Publication Date Title
US8818046B2 (en) Image processing device, image processing method, and program
KR101342806B1 (en) How to form the final digital color image
USRE47062E1 (en) Image processing apparatus and method for generating a restoration image
US7667738B2 (en) Image processing device for detecting chromatic difference of magnification from raw data, image processing program, and electronic camera
EP2053844B1 (en) Image processing device, image processing method, and program
US8509481B2 (en) Image processing apparatus, image processing method, imaging apparatus
JP4154661B2 (en) Image processing apparatus and method, recording medium, and program
EP2219366B1 (en) Image capturing device, image capturing method, and image capturing program
JP4045645B2 (en) Interpolation processing apparatus and recording medium recording interpolation processing program
JP2000078597A (en) Digital color image value processing device
JP2010511350A (en) Providing color images with the desired resolution
JP6172935B2 (en) Image processing apparatus, image processing method, and image processing program
JP6817779B2 (en) Image processing equipment, its control method, programs and recording media
JP2014013574A (en) Image classification program, image classification device and electronic camera
JP4807582B2 (en) Image processing apparatus, imaging apparatus, and program thereof
JP4894708B2 (en) Imaging device
JP5223912B2 (en) Imaging apparatus and focus determination program
EP1109411A1 (en) Interpolation processor and recording medium recording interpolation processing program
JPH11275373A (en) Interpolation processing method
WO2007049432A1 (en) Imaging apparatus with motion vector detecting function
JP2000188762A (en) Interpolation processing apparatus and recording medium recording interpolation processing program
JP4716266B2 (en) Image processing apparatus, imaging apparatus, and program thereof
JP2000069492A (en) Interpolation processing apparatus and recording medium recording interpolation processing program
US7489822B2 (en) Image processing apparatus and method for detecting a direction of an edge in the vicinity of a pixel of interest and generating all color signals for each pixel by interpolation using color signals of a pixel of interest and its neighbor pixels, and a recording medium having a program recorded thereon for causing the apparatus to perform the method
JP2011155365A (en) Image processing apparatus and image processing method