JP2001338285A - Image processor and recording medium with image processing program recorded thereon - Google Patents

Image processor and recording medium with image processing program recorded thereon

Info

Publication number
JP2001338285A
JP2001338285A JP2000154771A JP2000154771A JP2001338285A JP 2001338285 A JP2001338285 A JP 2001338285A JP 2000154771 A JP2000154771 A JP 2000154771A JP 2000154771 A JP2000154771 A JP 2000154771A JP 2001338285 A JP2001338285 A JP 2001338285A
Authority
JP
Japan
Prior art keywords
color information
interpolation
image processing
image
color
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
JP2000154771A
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 JP2000154771A priority Critical patent/JP2001338285A/en
Publication of JP2001338285A publication Critical patent/JP2001338285A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To generate a high quality interpolated image by reducing noises to be generated, in interpolation processing of a first color information added with a second color information. SOLUTION: For the image processor performing interpolation processing of the first color information in image data containing at least the first color information and the second color information, this device is provided with an interpolating means for determining the interpolation value of the first color information, corresponding to the first color information and/or the second color information around an interpolation object pixel and a structure deciding means for deciding an image structure in a local area including the interpolation object pixel, and changing the contribution rate of the second color information in the interpolation value determination of the interpolation object pixel corresponding to the decided result.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、第1色以外の第2
色情報から得られる画像構造の情報を加味して、第1色
情報の補間値を求める画像処理の技術に関する。
TECHNICAL FIELD The present invention relates to a second color other than the first color.
The present invention relates to an image processing technique for obtaining an interpolation value of first color information in consideration of image structure information obtained from color information.

【0002】[0002]

【従来の技術】従来、第1色以外の第2色情報を加味し
て、第1色情報の補間値を決定する画像処理装置が知ら
れている(USP5629734)。以下、この種の画
像処理装置が実行する補間処理について説明する。ま
ず、画像処理装置は、補間対象画素を中心として、下記
のような5行5列の局所領域を画像データから抽出す
る。ここで、G○はG色の情報を意味し、Z○は、その
他の色情報(R色またはB色)を意味する。 ・・Z1・・ ・・G2・・ Z3G4Z5G6Z7 ・・G8・・ ・・Z9・・ 次に、画像処理装置は、この局所領域内の色情報に基づ
いて、 DH=|-Z3+2・Z5-Z7|+|G4-G6| ・・・[式1] DV=|-Z1+2・Z5-Z9|+|G2-G8| ・・・[式2] G5H=(G4+G6)/2+(-Z3+2・Z5-Z7)/4 ・・・[式3] G5V=(G2+G8)/2+(-Z1+2・Z5-Z9)/4 ・・・[式4] G5A=(G2+G4+G6+G8)/2+(-Z1-Z3+4・Z5-Z7-Z9)/8 ・・・[式5] if DH<DV then G5=G5H else if DV<DH then G5=G5V else G5=G5A ・・・[式6] からなる一連の演算を実行し、補間対象画素G5の値を
決定する。上述した[式3〜5]の第1項は、G色情報
に基づく単純な線形補間値である。一方、第2項は、そ
の他の色情報の曲率成分(空間2次微分)である。この
第2項を加算することにより、従来例では、補間画像の
ディテール成分を補っている。
2. Description of the Related Art Conventionally, there has been known an image processing apparatus that determines an interpolation value of first color information in consideration of second color information other than the first color (US Pat. No. 5,629,734). Hereinafter, an interpolation process performed by this type of image processing apparatus will be described. First, the image processing apparatus extracts the following 5-row, 5-column local region from the image data with the interpolation target pixel as the center. Here, G ○ means G color information, and Z ○ means other color information (R color or B color). .. G2... Z3G4Z5G6Z7... G8.... Z9... Next, the image processing apparatus calculates DH = | −Z3 + 2.Z5- based on the color information in this local area. Z7 | + | G4-G6 | ··· [Equation 1] DV = | -Z1 + 2 · Z5-Z9 | + | G2-G8 | ··· [Equation 2] G5H = (G4 + G6) / 2 + (-Z3 + 2 ・ Z5-Z7) / 4 ・ ・ ・ [Equation 3] G5V = (G2 + G8) / 2 + (-Z1 + 2 ・ Z5-Z9) / 4 ・ ・ ・ [Equation 4] G5A = (G2 + G4 + G6 + G8) / 2 + (-Z1-Z3 + 4 ・ Z5-Z7-Z9) / 8 [Equation 5] if DH <DV then G5 = G5H else if DV <DH then G5 = G5V else G5 = G5A A series of calculations consisting of [Equation 6] are executed to determine the value of the interpolation target pixel G5. The first term in the above [Equations 3 to 5] is a simple linear interpolation value based on the G color information. On the other hand, the second term is a curvature component (spatial second derivative) of other color information. In the conventional example, the detail component of the interpolated image is supplemented by adding the second term.

【0003】[0003]

【発明が解決しようとする課題】ところで、上述した従
来例では、補間後の画像に、黒や白などのドット(以下
『ドット雑音』という)を生じる場合があった。このド
ット雑音は、補間画像中にあって顕著に目立つため、補
間画像の画質を大きく損ねてしまう。そこで、本発明で
は、上述した問題点に鑑みて、良質な補間画像を生成す
ることを目的とする。
However, in the above-described conventional example, dots such as black and white (hereinafter referred to as "dot noise") may occur in the interpolated image. Since the dot noise is noticeable in the interpolated image, it greatly impairs the image quality of the interpolated image. In view of the above, an object of the present invention is to generate a high-quality interpolated image.

【0004】[0004]

【課題を解決するための手段】《請求項1》請求項1に
記載の発明は、第1色情報および第2色情報を少なくと
も含む画像データについて、第1色情報の補間処理を行
う画像処理装置において、補間対象画素の周辺の第1色
情報および/または第2色情報に応じて、第1色情報の
補間値を決定する補間手段と、補間対象画素を含む局所
領域について画像構造を判定し、その判定結果に応じ
て、補間対象画素の補間値決定における第2色情報の寄
与率を変更する構造判定手段とを備えたことを特徴とす
る。
According to a first aspect of the present invention, there is provided an image processing apparatus for performing an interpolation process of first color information on image data including at least first color information and second color information. In the apparatus, an interpolation means for determining an interpolation value of the first color information according to the first color information and / or the second color information around the interpolation target pixel, and determining an image structure for a local region including the interpolation target pixel. And a structure judging means for changing the contribution ratio of the second color information in determining the interpolation value of the interpolation target pixel according to the judgment result.

【0005】通常、画面内の色境界のような箇所では、
色成分の比率が空間的に変化するため、第1色情報と第
2色情報とが相異なる変化を示す。このような色境界の
箇所で従来例の補間処理を実施した場合、第1色情報の
補間画像に、第2色情報の相異なる画像構造が紛れ込
み、ドット雑音が発生する。そこで、上記構成では、構
造判定手段が補間対象画素を含む局所領域において画像
構造の判定を行う。構造判定手段は、この判定結果に応
じて、補間値決定における第2色情報の寄与率を変更す
る。したがって、上記構成を用いて、補間画像に第2色
情報の相異なる画像構造が紛れ込む状況に応じて、寄与
率を一時的に低減させることが可能となる。その結果、
ドット雑音の抑制とディテール再現とをバランスよく両
立させることが可能となり、良質な補間画像を生成する
ことが可能となる。
[0005] Usually, at a place such as a color boundary in a screen,
Since the ratio of the color components changes spatially, the first color information and the second color information show different changes. When the conventional interpolation processing is performed at such a color boundary, different image structures of the second color information are mixed in the interpolated image of the first color information, and dot noise occurs. Thus, in the above configuration, the structure determining unit determines the image structure in a local region including the interpolation target pixel. The structure determining unit changes the contribution ratio of the second color information in determining the interpolation value according to the determination result. Therefore, using the above configuration, it is possible to temporarily reduce the contribution ratio according to the situation where different image structures of the second color information are mixed in the interpolation image. as a result,
The suppression of dot noise and the reproduction of detail can both be achieved in a well-balanced manner, and a high-quality interpolated image can be generated.

【0006】《請求項2》請求項2に記載の発明は、請
求項1に記載の画像処理装置において、構造判定手段
は、補間対象画素を含む局所領域内にピークおよびトラ
ップが存在しない場合に、補間対象画素の補間値決定に
おける第2色情報の寄与率を低減する手段であることを
特徴とする。
[0008] According to a second aspect of the present invention, in the image processing apparatus according to the first aspect, the structure determining means determines whether a peak or trap does not exist in a local area including the pixel to be interpolated. And means for reducing the contribution ratio of the second color information in determining the interpolation value of the interpolation target pixel.

【0007】一般に、局所領域内にピークおよびトラッ
プを生じない箇所は、色が単調に変化していることを示
しており、ディテールよりも色境界である可能性の方が
高い。そこで、上記の構造判定手段は、補間対象画素を
含む局所領域内に第2色情報のピークおよびトラップが
存在しない場合、補間値決定における第2色情報の寄与
率を一時的に低減する。その結果、ドット雑音の発生機
会などが確実に減少し、ドット雑音を低減することが可
能となる。
In general, a portion where no peak or trap occurs in a local region indicates that the color is monotonically changing, and is more likely to be a color boundary than a detail. Therefore, when the peak and the trap of the second color information do not exist in the local region including the pixel to be interpolated, the structure determination unit temporarily reduces the contribution ratio of the second color information in determining the interpolation value. As a result, the occurrence of dot noise and the like are reliably reduced, and the dot noise can be reduced.

【0008】また、この色境界の判定がたとえはずれた
としても、このような箇所に含まれるディテール成分は
元々少ないため、補間画像のディテール再現性を全体的
に損ねるおそれはさほどない。したがって、上記構成で
は、ドット雑音の抑制とディテール再現とがバランスよ
く両立し、良質な補間画像を生成することが可能とな
る。
[0008] Even if the determination of the color boundary is incorrect, the detail components included in such a portion are originally small, so that there is little possibility that the detail reproducibility of the interpolated image will be impaired as a whole. Therefore, in the above configuration, the suppression of the dot noise and the reproduction of the detail are compatible with a good balance, and a high-quality interpolated image can be generated.

【0009】《請求項3》請求項3に記載の発明は、請
求項1に記載の画像処理装置において、構造判定手段
は、補間対象画素を含む局所領域について画像構造を判
定し、第1色情報の画像構造と第2色情報の画像構造と
の相関が小さいと判定した場合、補間対象画素の補間値
決定における第2色情報の寄与率を低減する手段である
ことを特徴とする。
[0010] According to a third aspect of the present invention, in the image processing apparatus according to the first aspect, the structure determining means determines an image structure for a local area including the pixel to be interpolated, and determines the first color. When it is determined that the correlation between the image structure of the information and the image structure of the second color information is small, the means is a means for reducing the contribution ratio of the second color information in determining the interpolation value of the pixel to be interpolated.

【0010】上記構成では、構造判定手段が補間対象画
素を含む局所領域において画像構造の判定を行う。この
判定の結果、『第1色情報の画像構造』と『第2色情報
の画像構造』との相関が小さい場合、補間値決定におけ
る第2色情報の寄与率を一時的に低減する。したがっ
て、第1色情報の補間画像に、第2色情報の相異なる画
像構造が紛れ込む機会や量が確実に少なくなり、補間画
像中のドット雑音を低減することが可能となる。一方、
上記の相関が逆にある程度強い場合、第2色情報の寄与
率は低減されない。したがって、第2色情報の画像構造
をもって第1色情報の画像構造が適切に補われ、ディテ
ールに富んだ補間画像を得ることが可能となる。
In the above arrangement, the structure determining means determines the image structure in the local area including the pixel to be interpolated. As a result of this determination, when the correlation between the “image structure of the first color information” and the “image structure of the second color information” is small, the contribution rate of the second color information in determining the interpolation value is temporarily reduced. Therefore, the chance and amount of different image structures of the second color information entering the interpolated image of the first color information are reliably reduced, and the dot noise in the interpolated image can be reduced. on the other hand,
On the other hand, if the correlation is somewhat strong, the contribution of the second color information is not reduced. Therefore, the image structure of the first color information is appropriately supplemented with the image structure of the second color information, and it is possible to obtain an interpolated image with rich details.

【0011】《請求項4》請求項4に記載の発明は、請
求項1ないし請求項3のいずれか1項に記載の画像処理
装置において、補間対象画素を含む局所領域において方
向ごとの類似性を判定する方向判定手段を備え、補間手
段は、方向判定手段により判定された類似性の高い方向
に位置する色情報の寄与率を高めて、補間値を算出する
ことを特徴とする。
According to a fourth aspect of the present invention, in the image processing apparatus according to any one of the first to third aspects, the similarity of each direction in a local region including a pixel to be interpolated is provided. , And the interpolation means calculates the interpolation value by increasing the contribution ratio of the color information positioned in the direction of high similarity determined by the direction determination means.

【0012】《請求項5》請求項5に記載の発明は、請
求項4に記載の画像処理装置において、構造判定手段
は、方向判定手段により判定された『類似性の高い方
向』に関して画像構造を判定することを特徴とする。
<Fifth aspect> According to a fifth aspect of the present invention, in the image processing apparatus according to the fourth aspect, the structure determining unit determines the image structure with respect to the “high similarity direction” determined by the direction determining unit. Is determined.

【0013】上記構成では、構造判定手段が、補間演算
を実行する方向について画像構造の判定を行う。したが
って、全方位について画像構造を判定する必要がなく、
判定処理の演算量を効率的に軽減することが可能とな
る。
In the above arrangement, the structure determining means determines the image structure in the direction in which the interpolation operation is performed. Therefore, there is no need to determine the image structure for all directions,
It is possible to efficiently reduce the calculation amount of the determination process.

【0014】《請求項6》請求項6に記載の発明は、第
1色情報および第2色情報を少なくとも含む画像データ
について、第1色情報の補間処理を行う画像処理装置に
おいて、補間対象画素の周辺の少なくとも第1色情報お
よび/または第2色情報に応じて第1色情報の補間値を
決定する補間手段と、補間対象画素を含む局所領域につ
いて彩度または色差を判定し、彩度または色差が大きい
と判定した場合、補間対象画素の補間値決定における第
2色情報の寄与率を低減する色判定手段とを備えたこと
を特徴とする。
According to a sixth aspect of the present invention, there is provided an image processing apparatus for performing interpolation of first color information on image data including at least first color information and second color information. Interpolating means for determining an interpolation value of the first color information in accordance with at least the first color information and / or the second color information, and determining a saturation or a color difference with respect to a local area including a pixel to be interpolated. Alternatively, the image processing apparatus further includes a color determination unit configured to reduce a contribution rate of the second color information in determining an interpolation value of the interpolation target pixel when the color difference is determined to be large.

【0015】一般に、彩度または色差が大きい箇所は、
第1色情報と第2色情報との信号レベルが大きく異な
る。このような箇所において第2情報の画像構造をもっ
て第1情報の画像構造のディテールを補った場合、レベ
ル差に起因する誤差が補間画像に紛れ込む。このような
誤差によっても、ドット雑音を生じるおそれがある。そ
こで、上記構成では、色判定手段が、補間対象画素を含
む局所領域において彩度または色差を判定する。その判
定の結果、彩度または色差が大きいと判定された場合、
色判定手段は、補間値決定における第2色情報の寄与率
を一時的に低減する。その結果、上述したレベル差に起
因する誤差が補間画像に紛れ込む機会や量が確実に少な
くなり、ドット雑音を低減することが可能となる。
In general, locations where the saturation or color difference is large are:
The signal levels of the first color information and the second color information are significantly different. When details of the image structure of the first information are supplemented with the image structure of the second information in such a portion, an error caused by the level difference is mixed in the interpolated image. Such errors may also cause dot noise. Therefore, in the above configuration, the color determination unit determines the saturation or the color difference in the local area including the interpolation target pixel. If it is determined that the saturation or the color difference is large,
The color determination means temporarily reduces the contribution rate of the second color information in determining the interpolation value. As a result, the chance and the amount of the error caused by the above-described level difference to be mixed into the interpolated image are surely reduced, and the dot noise can be reduced.

【0016】《請求項7》請求項7に記載の発明は、請
求項1ないし請求項6のいずれか1項に記載の画像処理
装置において、第2色情報の寄与率は、低減するに際し
て実質ゼロに設定されることを特徴とする。
<Seventh Aspect> According to the seventh aspect, in the image processing apparatus according to any one of the first to sixth aspects, the contribution rate of the second color information is substantially reduced when the second color information is reduced. It is characterized by being set to zero.

【0017】このように、第2情報の寄与率を実質ゼロ
に低減する非線形処理により、ドット雑音の発生を確実
に阻止することが可能となる。
As described above, the nonlinear processing for reducing the contribution ratio of the second information to substantially zero makes it possible to reliably prevent the generation of dot noise.

【0018】《請求項8》請求項8に記載の発明は、第
1色情報および第2色情報を少なくとも含む画像データ
について、第1色情報の補間処理を行う画像処理装置に
おいて、補間対象画素(下記Y(0)の画素位置)を通る画
像上の所定方向に、 ・第1色情報X(-1) ・第2色情報Y(0) ・第1色情報X(+1) ・第2色情報Y(+2) が並ぶ画素配列に対して、補間対象画素の第1色情報X
(0)を、 X(0)=(1-a1)・X(-1)+a1・X(+1)+a2・Y(0) -a2・Y(+2) ・・・[式7] (ただし、a1,a2は予め定められた比例係数)によって
決定する非対称補間手段を備えたことを特徴とする。
According to an eighth aspect of the present invention, there is provided an image processing apparatus for performing interpolation processing of first color information on image data including at least first color information and second color information. In a predetermined direction on the image passing through (the pixel position of Y (0) below), first color information X (-1) second color information Y (0) first color information X (+1) For a pixel array in which two-color information Y (+2) is arranged, the first color information X
(0) is calculated as X (0) = (1-a1) .X (-1) + a1.X (+1) + a2.Y (0) -a2.Y (+2) (Where a1 and a2 are asymmetrical interpolation means determined by a predetermined proportional coefficient).

【0019】上記の[式7]の第1項および第2項は、
周辺の第1色情報X(-1),X(+1)を使用して、(1-a1)対a1
の内分比で補間を行い、X(0)の線形補間値を求めている
項である。一方、[式7]の第3項および第4項は、第
2色情報Y(0),Y(+2)の間の空間1次微分(gradient)
に該当する。この空間1次微分は、Y(0)からY(+2)の方
向へ向かって第2色情報の空間変化を抽出した成分であ
る。[式7]では、X(0)の線形補間値に、この空間1次
微分を重み係数a2で加算することにより、補間画像のデ
ィテール分を補っている。
The first and second terms of the above [Equation 7] are:
Using the surrounding first color information X (-1), X (+1), (1-a1) vs. a1
Is a term for which a linear interpolation value of X (0) is obtained by performing interpolation using the internal division ratio of. On the other hand, the third and fourth terms in [Equation 7] are the spatial first derivative (gradient) between the second color information Y (0) and Y (+2).
Corresponds to. This spatial first derivative is a component obtained by extracting a spatial change of the second color information from Y (0) toward Y (+2). In [Equation 7], the spatial first derivative is added to the linear interpolation value of X (0) by the weighting coefficient a2 to supplement the detail of the interpolated image.

【0020】したがって、第1色情報の補間処理のみで
は得られない、ディテールに富んだ補間画像を生成する
ことが可能となる。特に、本発明では、上述した従来例
に比べて、補間対称画素の周辺画素を非対称に使用して
いる点に特徴がある。そのため、対称形の従来例よりも
周辺画素の使用数が少なく(5個→4個)、その分だけ
色境界やエッジをまたいで誤差が補間値に紛れ込んでし
まうなどの弊害を削減することが可能となる。このよう
な作用により、ドット雑音の発生機会が低減し、良質な
補間画像を生成することが可能となる。
Therefore, it is possible to generate an interpolated image rich in detail, which cannot be obtained only by the interpolation processing of the first color information. In particular, the present invention is characterized in that peripheral pixels of an interpolation symmetric pixel are used asymmetrically as compared with the above-described conventional example. Therefore, the number of peripheral pixels used is smaller than that of the symmetrical conventional example (5 → 4), and it is possible to reduce such an adverse effect that errors are mixed in the interpolation values across color boundaries and edges. It becomes possible. With such an operation, the chance of generating dot noise is reduced, and a high-quality interpolated image can be generated.

【0021】さらに、本発明の補間処理は、補間対象画
素の近傍で上記並びの画素配列が存在すれば適用でき
る。したがって、ベイヤー配列に限らず、多様な色配列
の画像データに本発明が適用可能である。例えば、この
ような並びが特定方向にしか存在しない場合にも、その
特定方向について本発明が適用可能である。また例え
ば、補色配列のように縦方向と横方向で隣接する色が異
なる場合にも、本発明が適用可能である。
Further, the interpolation processing of the present invention can be applied if the above-mentioned pixel arrangement exists near the pixel to be interpolated. Therefore, the present invention is applicable not only to the Bayer array but also to image data of various color arrays. For example, even when such an arrangement exists only in a specific direction, the present invention is applicable to the specific direction. Also, for example, the present invention is applicable to a case where adjacent colors are different in the vertical direction and the horizontal direction as in a complementary color arrangement.

【0022】《請求項9》請求項9に記載の発明は、請
求項8に記載の画像処理装置において、補間対象画素を
含む局所領域において、補間対象画素を起点とする複数
の所定方向について類似性を判定する方向判定手段を備
え、非対称補間手段は、方向判定手段により類似性が高
いと判定された所定方向を選んで、第1色情報X(0)の算
出を行うことを特徴とする。
In a ninth aspect of the present invention, in the image processing apparatus according to the eighth aspect, in a local area including the pixel to be interpolated, a plurality of predetermined directions starting from the pixel to be interpolated are similar. Direction determining means for determining the sex, and the asymmetric interpolation means selects the predetermined direction determined to have high similarity by the direction determining means and calculates the first color information X (0). .

【0023】上記構成では、方向判定手段が、補間対象
画素を起点とする複数の所定方向について類似性を判定
する。非対称補間手段は、この類似性の高い所定方向に
ついて非対称の補間演算を実行する。したがって、非対
称の補間演算が色境界やエッジをまたいで行われるおそ
れが一層少なくなり、ドット雑音の発生機会が一段と少
なくなる。
In the above arrangement, the direction determining means determines the similarity in a plurality of predetermined directions starting from the pixel to be interpolated. The asymmetric interpolation means executes an asymmetric interpolation operation in the predetermined direction having a high similarity. Therefore, the possibility that an asymmetric interpolation operation is performed across color boundaries and edges is further reduced, and the chance of generating dot noise is further reduced.

【0024】《請求項10》請求項10に記載の発明
は、請求項8に記載の画像処理装置において、補間対象
画素を含む局所領域において、補間対象画素を起点とす
る複数の所定方向について類似性を判定する方向判定手
段を備え、非対称補間手段は、複数の所定方向ごとに算
出した第1色情報X(0)を、方向判定手段で判定した類似
性に応じた加重比率で加重合成することを特徴とする。
In a tenth aspect of the present invention, in the image processing apparatus according to the eighth aspect, in a local region including the pixel to be interpolated, the local region including the pixel to be interpolated is similar in a plurality of predetermined directions starting from the pixel to be interpolated. Direction determining means for determining the gender, and the asymmetric interpolation means weights and synthesizes the first color information X (0) calculated for each of the plurality of predetermined directions at a weight ratio according to the similarity determined by the direction determining means. It is characterized by the following.

【0025】上記構成を用いて、類似性の低い方向の加
重比率を低減することが可能となる。その結果、色境界
やエッジをまたぐ方向からの誤差混入が抑制され、ドッ
ト雑音の発生機会や発生量を低減することが可能とな
る。したがって、良質な補間画像を生成することが可能
となる。
With the above configuration, it is possible to reduce the weight ratio in the direction of low similarity. As a result, error mixing from a direction that straddles a color boundary or an edge is suppressed, and it is possible to reduce the occurrence opportunity and amount of dot noise. Therefore, it is possible to generate a high-quality interpolation image.

【0026】《請求項11》請求項11に記載の記録媒
体は、コンピュータを、請求項1ないし請求項10のい
ずれか1項に記載の画像処理装置として機能させるため
の画像処理プログラムが記録されていることを特徴とす
る。
(11) An image processing program for causing a computer to function as the image processing apparatus according to any one of (1) to (10) is recorded on the recording medium according to claim 11. It is characterized by having.

【0027】このような画像処理プログラムの実行によ
り、コンピュータが、請求項1〜10のいずれか1項に
記載の各構成要件として機能する。その結果、請求項1
〜10のいずれか1項に記載の画像処理装置を、コンピ
ュータ上で実現することが可能となる。
By executing such an image processing program, the computer functions as each component according to any one of the first to tenth aspects. As a result, claim 1
The image processing device described in any one of the above items 10 to 10 can be realized on a computer.

【0028】[0028]

【発明の実施の形態】以下、図面に基づいて本発明にお
ける実施の形態を説明する。
Embodiments of the present invention will be described below with reference to the drawings.

【0029】《第1の実施形態》第1の実施形態は、請
求項1,2,4,5,7に対応した電子カメラの実施形
態である。
First Embodiment A first embodiment is an electronic camera according to the first, second, fourth, fifth, and seventh aspects.

【0030】[電子カメラの概略構成]図1は、電子カ
メラ11の概略構成を示す図である。図1において、電
子カメラ11には、撮影レンズ12が装着される。この
撮影レンズ12の像空間には、撮像素子13の受光面が
設置される。この撮像素子13は、受光面上の光像を光
電変換して、ベイヤー配列の原画像データを生成する。
この原画像データは、信号処理部14およびA/D変換
部15を介してデジタル化された後、シグナルプロセッ
サおよび画像メモリなどからなる画像処理部16に与え
られる。
[Schematic Configuration of Electronic Camera] FIG. 1 is a diagram showing a schematic configuration of the electronic camera 11. In FIG. 1, a photographing lens 12 is mounted on an electronic camera 11. The light receiving surface of the image sensor 13 is provided in the image space of the photographing lens 12. The image sensor 13 photoelectrically converts the light image on the light receiving surface to generate original image data in a Bayer array.
The original image data is digitized via a signal processing unit 14 and an A / D conversion unit 15 and then supplied to an image processing unit 16 including a signal processor and an image memory.

【0031】この画像処理部16は、原画像データに対
して、欠陥画素補正、黒レベルクランプ、ホワイトバラ
ンス処理、γ補正などの階調変換、色補間処理、色空間
変換、空間フィルタ処理(エッジ強調など)などの画像
処理を施す。この画像処理部16で画像処理を完了した
画像データは、電子カメラ11内の記録系(図示せず)
へ出力される。
The image processing section 16 performs gradation conversion such as defective pixel correction, black level clamping, white balance processing, and γ correction, color interpolation processing, color space conversion, and spatial filter processing (edge processing) on the original image data. Image processing such as emphasis). The image data that has been subjected to the image processing by the image processing unit 16 is stored in a recording system (not shown) in the electronic camera 11.
Output to

【0032】なお、上述した構成において、本発明の補
間手段は、画像処理部16における『G色の補間処理を
行う機能』に対応する。また、構造判定手段は、画像処
理部16における『画像構造を判定し、その判定結果に
応じてG色補間におけるG色以外の色情報の寄与率を変
更する機能』に対応する。さらに、方向判定手段は、画
像処理部16における『類似性判定により補間方向を決
定する機能』に対応する。
In the configuration described above, the interpolation means of the present invention corresponds to the "function of performing G color interpolation processing" in the image processing section 16. The structure determining means corresponds to “the function of determining the image structure and changing the contribution ratio of the color information other than the G color in the G color interpolation according to the determination result” in the image processing unit 16. Further, the direction determining means corresponds to the “function of determining an interpolation direction by similarity determination” in the image processing unit 16.

【0033】[色補間処理の概略説明]図2は、画像処
理部16における色補間処理の概略を説明する図であ
る。以下、本発明の特徴の説明に先立って、色補間処理
の全体動作を説明する。まず、画像処理部16は、原画
像データに対して、ホワイトバランス処理および階調変
換などを施して、色補間前の画像データを生成する。こ
の色補間前の画像データは、G色情報であるG[X,
Y]と、G色以外(R色またはB色)の色情報であるZ
[X,Y]とから構成される。なお、ここでのXは横方
向の画素位置を示す座標値であり、Yは縦方向の画素位
置を示す座標値である。
[Outline of Color Interpolation Processing] FIG. 2 is a diagram for explaining the outline of the color interpolation processing in the image processing section 16. Hereinafter, before describing the features of the present invention, the overall operation of the color interpolation processing will be described. First, the image processing unit 16 performs white balance processing, gradation conversion, and the like on the original image data to generate image data before color interpolation. The image data before the color interpolation is G [X,
Y] and Z which is color information other than G color (R color or B color)
[X, Y]. Here, X is a coordinate value indicating a pixel position in the horizontal direction, and Y is a coordinate value indicating a pixel position in the vertical direction.

【0034】画像処理部16は、この色補間前の画像デ
ータについてG色の補間処理を実行し、G面FG[X,
Y]を生成する。次に、画像処理部16は、Z[X,
Y]とFG[X,Y]とに基づいて色差変換を実行し、
2種類の色差面DB[X,Y],DR[X,Y]を生成
する。画像処理部16は、このように求めた色差面DB
[X,Y],DR[X,Y]について色差補間を実行
し、色差補間後の色差面FDB[X,Y],FDR
[X,Y]を生成する。
The image processing section 16 performs a G color interpolation process on the image data before the color interpolation, and obtains a G plane FG [X,
Y] is generated. Next, the image processing unit 16 outputs Z [X,
Y] and FG [X, Y] to perform color difference conversion,
Two types of color difference planes DB [X, Y] and DR [X, Y] are generated. The image processing unit 16 calculates the color difference plane DB
The color difference interpolation is executed for [X, Y] and DR [X, Y], and the color difference planes FDB [X, Y] and FDR after the color difference interpolation are performed.
[X, Y] is generated.

【0035】続いて、画像処理部16は、色差面FDB
[X,Y],FDR[X,Y]とG面FG[X,Y]と
に基づいて、B面FB[X,Y]およびR面FR[X,
Y]を復元する。上述した一連の課程を経て、RGB3
面分の補間画像FR[X,Y],FG[X,Y],FB
[X,Y]が生成される。
Subsequently, the image processing section 16 controls the color difference plane FDB.
Based on [X, Y], FDR [X, Y] and G plane FG [X, Y], B plane FB [X, Y] and R plane FR [X,
Y] is restored. After a series of courses described above, RGB3
Interpolated images FR [X, Y], FG [X, Y], FB
[X, Y] is generated.

【0036】[G補間処理の詳細説明]続いて、本発明
の特徴であるG補間処理の動作について説明する。図3
は、補間対象画素[i,j]におけるG補間処理ルーチ
ンを示す図である。以下、図3に示すステップ番号に沿
って、G補間処理を説明する。
[Detailed Description of G Interpolation Processing] Next, the operation of the G interpolation processing which is a feature of the present invention will be described. FIG.
FIG. 9 is a diagram showing a G interpolation processing routine for an interpolation target pixel [i, j]. Hereinafter, the G interpolation processing will be described along the step numbers shown in FIG.

【0037】ステップS1: 画像処理部16は、補間
対象画素を通る縦横方向について、 Cv0[i,j]=|G[i,j-1]-G[i,j+1]|+(|G[i,j-1]-Z[i,j]|+|G[i,j+1]-Z[i,j]|)/2 ・・・[式8] Ch0[i,j]=|G[i-1,j]-G[i+1,j]|+(|G[i-1,j]-Z[i,j]|+|G[i+1,j]-Z[i,j]|)/2 ・・・[式9] を計算し、非類似度Cv0,Ch0を求める。
Step S1: The image processing unit 16 determines that Cv0 [i, j] = | G [i, j-1] -G [i, j + 1] | + (| G [i, j-1] -Z [i, j] | + | G [i, j + 1] -Z [i, j] |) / 2 [Equation 8] Ch0 [i, j] = | G [i-1, j] -G [i + 1, j] | + (| G [i-1, j] -Z [i, j] | + | G [i + 1, j]- Z [i, j] |) / 2 [Expression 9] is calculated, and the dissimilarities Cv0 and Ch0 are obtained.

【0038】ステップS2: 次に、画像処理部16
は、下式に従って非類似度Cv0,Ch0を局所平均化して、
非類似度の参照範囲を拡大する。 Cv[i,j]=(4・Cv0[i,j]+Cv0[i-1,j-1]+Cv0[i+1,j-1]+Cv0[i-1,j+1]+Cv0[i+1,j+1]) /8 ・・・[式10] Ch[i,j]=(4・Ch0[i,j]+Ch0[i-1,j-1]+Ch0[i+1,j-1]+Ch0[i-1,j+1]+Ch0[i+1,j+1]) /8 ・・・[式11]
Step S2: Next, the image processing unit 16
Is obtained by locally averaging the dissimilarities Cv0 and Ch0 according to the following equation,
The reference range of dissimilarity is expanded. Cv [i, j] = (4 ・ Cv0 [i, j] + Cv0 [i-1, j-1] + Cv0 [i + 1, j-1] + Cv0 [i-1, j + 1] + Cv0 [i + 1, j + 1]) / 8 [Equation 10] Ch [i, j] = (4 · Ch0 [i, j] + Ch0 [i-1, j-1] + Ch0 [ i + 1, j-1] + Ch0 [i-1, j + 1] + Ch0 [i + 1, j + 1]) / 8 [Equation 11]

【0039】ステップS3: 画像処理部16は、参照
範囲を拡大した非類似度Cv,Chを比較して、類似性のよ
り高い方向を判定する。まず、|Cv[i, j]-Ch[i, j]|≦
閾値Th1の場合、画像処理部16は、両方向とも類似性
は同程度であると判断して、ステップS10に動作を移
行する。次に、Cv[i, j]<Ch[i, j]の場合、画像処理部
16は縦方向の類似性が高いと判断して、ステップS4
に動作を移行する。一方、Cv[i, j]>Ch[i, j]の場合、
画像処理部16は横方向の類似性が高いと判断して、ス
テップS7に動作を移行する。
Step S3: The image processing unit 16 compares the dissimilarities Cv and Ch with the reference range expanded to determine the direction of higher similarity. First, | Cv [i, j] -Ch [i, j] | ≦
If the threshold value is Th1, the image processing unit 16 determines that the similarity is substantially the same in both directions, and shifts the operation to step S10. Next, if Cv [i, j] <Ch [i, j], the image processing unit 16 determines that the similarity in the vertical direction is high, and proceeds to step S4.
Move the operation to. On the other hand, if Cv [i, j]> Ch [i, j],
The image processing unit 16 determines that the similarity in the horizontal direction is high, and shifts the operation to step S7.

【0040】ステップS4: 画像処理部16は、類似
性の高い縦方向について、 G=(G[i,j-1]+G[i,j+1])/2 ・・・[式12] を算出し、同色補間値Gを求める。
Step S4: The image processing section 16 calculates G = (G [i, j-1] + G [i, j + 1]) / 2 in the vertical direction having high similarity [Equation 12]. To calculate the same color interpolation value G.

【0041】ステップS5: 画像処理部16は、類似
性の高い縦方向について, Xr=|Z[i,j-2]-Z[i,j+2]|-|2・Z[i,j]-Z[i,j-2]-Z[i,j+2]| ・・・[式13] を算出し、ピーク判別値Xrとする。
Step S5: The image processing unit 16 calculates Xr = | Z [i, j-2] -Z [i, j + 2] |-| 2 · Z [i, j for the vertical direction having high similarity. ] -Z [i, j-2] -Z [i, j + 2] |... [Equation 13] is calculated and set as the peak discrimination value Xr.

【0042】ステップS6: 画像処理部16は、後述
するステップS15において使用する係数aを1に設定
する。その後、画像処理部16は、ステップS13に動
作を移行する。
Step S6: The image processing section 16 sets the coefficient a used in step S15 to be described later to one. Thereafter, the image processing unit 16 shifts the operation to Step S13.

【0043】ステップS7: 画像処理部16は、類似
性の高い横方向について、 G=(G[i-1,j]+G[i+1,j])/2 ・・・[式14] を算出し、同色補間値Gを求める。
Step S7: The image processing section 16 calculates G = (G [i-1, j] + G [i + 1, j]) / 2 in the horizontal direction having high similarity [Equation 14]. To calculate the same color interpolation value G.

【0044】ステップS8: 画像処理部16は、類似
性の高い横方向について, Xr=|Z[i-2,j]-Z[i+2,j]|-|2・Z[i,j]-Z[i-2,j]-Z[i+2,j]| ・・・[式15] を算出し、ピーク判別値Xrとする。
Step S8: The image processing section 16 determines that Xr = | Z [i-2, j] -Z [i + 2, j] |-| 2 · Z [i, j ] -Z [i-2, j] -Z [i + 2, j] |... [Equation 15] is calculated and set as the peak discrimination value Xr.

【0045】ステップS9: 画像処理部16は、後述
するステップS15において使用する係数aを0に設定
する。その後、画像処理部16は、ステップS13に動
作を移行する。
Step S9: The image processing section 16 sets the coefficient a used in step S15 described later to 0. Thereafter, the image processing unit 16 shifts the operation to Step S13.

【0046】ステップS10: 画像処理部16は、縦
横の両方向について、 G=(G[i,j-1]+G[i,j+1]+G[i-1,j]+G[i+1,j])/4 ・・・[式16] を算出し、同色補間値Gを求める。
Step S10: The image processing section 16 calculates G = (G [i, j-1] + G [i, j + 1] + G [i-1, j] + G [i] in both the vertical and horizontal directions. +1, j]) / 4 [Expression 16] is calculated, and the same color interpolation value G is obtained.

【0047】ステップS11: 画像処理部16は、 Xrv=|Z[i,j-2]-Z[i,j+2]|-|2・Z[i,j]-Z[i,j-2]-Z[i,j+2]| ・・・[式17] Xrh=|Z[i-2,j]-Z[i+2,j]|-|2・Z[i,j]-Z[i-2,j]-Z[i+2,j]| ・・・[式18] Xr =min(Xrv,Xrh) ・・・[式19] を算出し、ピーク判別値Xrとする。Step S11: The image processing section 16 determines that Xrv = | Z [i, j-2] -Z [i, j + 2] |-| 2 · Z [i, j] -Z [i, j- 2] -Z [i, j + 2] | [Equation 17] Xrh = | Z [i-2, j] -Z [i + 2, j] |-| 2 · Z [i, j] -Z [i-2, j] -Z [i + 2, j] | ... [Equation 18] Xr = min (Xrv, Xrh) ... [Equation 19] is calculated, and the peak determination value Xr is calculated. I do.

【0048】ステップS12: 画像処理部16は、後
述するステップS15において使用する係数aを1/2
に設定する。その後、画像処理部16は、ステップS1
3に動作を移行する。
Step S12: The image processing section 16 sets the coefficient a used in step S15 to be described later to 1/2.
Set to. Thereafter, the image processing unit 16 proceeds to step S1
The operation moves to 3.

【0049】ステップS13: ここで、画像処理部1
6は、上記ステップで算出したピーク判別値Xrの値を判
別する。ここでピーク判別値Xrが閾値Th2よりも小さい
場合、画像処理部16は、補間対象画素を含む局所領域
内にピークおよびトラップが存在しないと判断して、ス
テップS14に動作を移行する。一方、ピーク判別値Xr
が閾値Th2を上回る場合、画像処理部16は、補間対象
画素を含む局所領域内にピークまたはトラップが存在す
ると判断して、ステップS15に動作を移行する。な
お、閾値Th2の値としては、例えばゼロに設定すればよ
い。また、複数のテスト画像において、ドット雑音の発
生箇所におけるピーク判別値Xrの値を調べ、これらピー
ク判別値Xrの平均値や分散を考慮して閾値Th2を決定し
てもよい。
Step S13: Here, the image processing unit 1
Step 6 determines the value of the peak determination value Xr calculated in the above step. Here, when the peak discrimination value Xr is smaller than the threshold Th2, the image processing unit 16 determines that there is no peak and trap in the local area including the interpolation target pixel, and shifts the operation to step S14. On the other hand, the peak discrimination value Xr
Is greater than the threshold Th2, the image processing unit 16 determines that a peak or trap exists in the local area including the interpolation target pixel, and shifts the operation to step S15. The threshold Th2 may be set to, for example, zero. Further, in a plurality of test images, the value of the peak discrimination value Xr at the location where the dot noise occurs may be checked, and the threshold Th2 may be determined in consideration of the average value and the variance of the peak discrimination values Xr.

【0050】ステップS14: 画像処理部16は、補
間対象画素[i,j]においてドット雑音が生じる可能
性が高いと判断して、補間値決定におけるG色以外の寄
与率を一時的に実質ゼロとする。その結果、 FG[i,j]=G ・・・[式20] をもって、補間対象画素におけるG色の最終的な補間値
とする。
Step S14: The image processing section 16 determines that there is a high possibility that dot noise will occur in the pixel [i, j] to be interpolated, and temporarily reduces the contribution ratio of colors other than G in the interpolation value determination to substantially zero. And As a result, FG [i, j] = G (Equation 20) is used as the final interpolation value of the G color at the interpolation target pixel.

【0051】ステップS15: 画像処理部16は、補
間対象画素[i,j]においてドット雑音が生じる可能
性が低いと判断して、補間値決定におけるG色以外の寄
与率をそのまま維持する。その結果、 FG[i,j]=G+[Z[i,j]/2-[a・(Z[i,j-2]+Z[i,j+2])+(1-a)・(Z[i-2,j]+Z[i+2,j] )]/4] ・・・[式21] をもって、補間対象画素におけるG色の最終的な補間値
とする。
Step S15: The image processing section 16 determines that there is little possibility that dot noise will occur in the pixel [i, j] to be interpolated, and maintains the contribution ratios other than the G color in the interpolation value determination. As a result, FG [i, j] = G + [Z [i, j] / 2- [a · (Z [i, j-2] + Z [i, j + 2]) + (1-a) [(Z [i−2, j] + Z [i + 2, j])] / 4] [Expression 21] is used as the final interpolation value of the G color at the interpolation target pixel.

【0052】[第1の実施形態の効果など]図4は、第
1の実施形態の効果を比較説明するための画面拡大写真
(ディスプレー上の中間調画像にディザをかけて二値化
した画像データ)である。この内、図4aは、近接する
G色値のみを使った、一般的な補間画像である。この図
4aでは、補間処理において、ディテール箇所の斜めエ
ッジが忠実に再現されず、崩れたようなエッジ形状とな
っている。
[Effects of First Embodiment, etc.] FIG. 4 is an enlarged picture (an image obtained by dithering a halftone image on a display by dithering) to compare and explain the effects of the first embodiment. Data). Among them, FIG. 4A is a general interpolated image using only adjacent G color values. In FIG. 4A, in the interpolation processing, the oblique edge of the detail portion is not faithfully reproduced, and the edge shape is broken.

【0053】また、図4bは、上述した従来例と同様
に、G色以外の色情報を加味した補間画像である。この
図4bでは、ディテール箇所の斜めエッジに関しては忠
実に再現され、滑らかなエッジ形状となっている。しか
しながら、色境界箇所に関しては、ドット雑音(黒点)
が多数発生している。
FIG. 4B shows an interpolated image in which color information other than the G color is taken into account, as in the above-described conventional example. In FIG. 4B, the oblique edge of the detail portion is faithfully reproduced and has a smooth edge shape. However, for color boundary points, dot noise (black spots)
Many have occurred.

【0054】一方、図4cは、第1の実施形態によって
処理された補間画像である。この図4cでは、ディテー
ル箇所の斜めエッジが忠実に再現され、滑らかなエッジ
形状となっている。さらに、色境界箇所においては、ド
ット雑音の発生数が極めて少ないという際立った特徴を
示す。
FIG. 4C is an interpolated image processed according to the first embodiment. In FIG. 4C, the oblique edge of the detail portion is faithfully reproduced, and has a smooth edge shape. Further, the color boundary portion has a distinctive feature that the number of occurrences of dot noise is extremely small.

【0055】このように、第1の実施形態では、ドット
雑音が少なく、かつディテール再現性に優れた、良質な
補間画像を生成することが可能となる。次に、別の実施
形態について説明する。
As described above, in the first embodiment, it is possible to generate a high-quality interpolated image with little dot noise and excellent detail reproducibility. Next, another embodiment will be described.

【0056】《第2の実施形態》第2の実施形態は、請
求項1,2,4,5,7に対応した電子カメラの実施形
態である。なお、第2の実施形態における電子カメラの
概略構成は、第1の実施形態(図1)と共通するため、
図1に示す参照符号をそのまま使用して、以下の説明を
行う。
<< Second Embodiment >> A second embodiment is an electronic camera according to the first, second, fourth, fifth and seventh aspects. Note that the schematic configuration of the electronic camera according to the second embodiment is common to that of the first embodiment (FIG. 1).
The following description will be made using the reference numerals shown in FIG. 1 as they are.

【0057】ここで、本発明の構成要件と第2の実施形
態との対応関係については、補間手段が、画像処理部1
6における『G色の補間処理を行う機能』に対応する。
また、構造判定手段が、画像処理部16における『画像
構造を判定し、その判定結果に応じてG色補間における
G色以外の寄与率を変更する機能』に対応する。さら
に、方向判定手段は、画像処理部16における『類似性
判定により補間方向を決定する機能』に対応する。
Here, as for the correspondence between the constituent elements of the present invention and the second embodiment, the interpolation means uses the image processing unit 1
6 corresponds to the “function of performing G color interpolation processing”.
Further, the structure determination means corresponds to “the function of determining the image structure and changing the contribution ratio of colors other than G in the G color interpolation according to the determination result” in the image processing unit 16. Further, the direction determining means corresponds to the “function of determining an interpolation direction by similarity determination” in the image processing unit 16.

【0058】図5は、補間対象画素[i,j]における
G補間処理ルーチンを示す図である。第2の実施形態に
おける動作上の相違点は、第1の実施形態(図3)にお
けるステップS13〜15を、図5に示すステップS2
1〜22に置換している点である。以下、相違点の動作
について説明する。
FIG. 5 is a diagram showing a G interpolation processing routine for the interpolation target pixel [i, j]. The difference in the operation of the second embodiment is that steps S13 to S15 in the first embodiment (FIG. 3) are replaced by step S2 shown in FIG.
1 to 22. Hereinafter, the operation of the difference will be described.

【0059】ステップS21: 画像処理部16は、ピ
ーク判別値Xrに応じて寄与率bを決定する。ここでの寄
与率bの決定には、例えば図6に示すようなメンバーシ
ップ関数b(Xr)が使用される。このメンバーシップ関数b
(Xr)は、ピーク判別値Xrの増加に従って、寄与率bを上
限値cから下限値ゼロの間で漸次低減させる関数であ
る。
Step S21: The image processing section 16 determines the contribution ratio b according to the peak discrimination value Xr. Here, for example, a membership function b (Xr) as shown in FIG. 6 is used to determine the contribution rate b. This membership function b
(Xr) is a function that gradually reduces the contribution ratio b from the upper limit c to the lower limit zero as the peak discrimination value Xr increases.

【0060】ステップS22: 画像処理部16は、決
定された寄与率bを使用して、 FG[i,j]=G+b・[Z[i,j]/2-[a・(Z[i,j-2]+Z[i,j+2])+(1-a)・(Z[i-2,j]+Z[i+2, j])]/4] ・・・[式22] を算出し、補間対象画素におけるG色補間値とする。
Step S22: The image processing unit 16 uses the determined contribution ratio b to calculate FG [i, j] = G + b · [Z [i, j] / 2- [a · (Z [ i, j-2] + Z [i, j + 2]) + (1-a) · (Z [i-2, j] + Z [i + 2, j]) / 4] ・ ・ ・ [ Equation 22] is calculated and used as a G color interpolation value in the interpolation target pixel.

【0061】[第2の実施形態の効果など]第2の実施
形態では、ドット雑音を発生するか否か不確実な場合
に、寄与率bを上限値cから下限値ゼロの間の適当な中
間値に設定する。そのため、不確実な箇所において、ド
ット雑音の振幅抑制と、ディテール再現とを適度に調整
することが可能となる。次に、別の実施形態について説
明する。
[Effects of Second Embodiment, etc.] In the second embodiment, when it is uncertain whether or not to generate dot noise, the contribution ratio b is set to an appropriate value between the upper limit value c and the lower limit value zero. Set to an intermediate value. Therefore, it is possible to appropriately control the suppression of the amplitude of the dot noise and the reproduction of the detail in an uncertain location. Next, another embodiment will be described.

【0062】《第3の実施形態》第3の実施形態は、請
求項1,3,4,5,7に対応した電子カメラの実施形
態である。なお、第3の実施形態における電子カメラの
概略構成は、第1の実施形態(図1)と共通するため、
図1に示す参照符号をそのまま使用して、以下の説明を
行う。
Third Embodiment A third embodiment is an electronic camera according to the first, third, fourth, fifth, and seventh aspects. Note that the schematic configuration of the electronic camera according to the third embodiment is the same as that of the first embodiment (FIG. 1).
The following description will be made using the reference numerals shown in FIG. 1 as they are.

【0063】ここで、本発明の構成要件と第3の実施形
態との対応関係については、補間手段が、画像処理部1
6における『G色の補間処理を行う機能』に対応する。
また、構造判定手段が、画像処理部16における『画像
構造を判定し、その判定結果に応じてG色補間における
G色以外の寄与率を変更する機能』に対応する。さら
に、方向判定手段は、画像処理部16における『類似性
判定により補間方向を決定する機能』に対応する。
Here, as for the correspondence between the constituent elements of the present invention and the third embodiment, the interpolation means uses the image processing unit 1.
6 corresponds to the “function of performing G color interpolation processing”.
Further, the structure determination means corresponds to “the function of determining the image structure and changing the contribution ratio of colors other than G in the G color interpolation according to the determination result” in the image processing unit 16. Further, the direction determining means corresponds to the “function of determining an interpolation direction by similarity determination” in the image processing unit 16.

【0064】図7は、補間対象画素[i,j]における
G補間処理ルーチンを示す図である。第3の実施形態に
おける動作上の相違点は、第1の実施形態(図3)にお
けるステップS5,S8,S11,S13を、図7に示
すステップS23〜26にそれぞれ置換している点であ
る。以下、相違点の動作について説明する。
FIG. 7 is a diagram showing a G interpolation processing routine for the interpolation target pixel [i, j]. The difference in operation in the third embodiment is that steps S5, S8, S11, and S13 in the first embodiment (FIG. 3) are replaced with steps S23 to S26 shown in FIG. 7, respectively. . Hereinafter, the operation of the difference will be described.

【0065】ステップS23: 画像処理部16は、類
似性の高い縦方向について, Xc=|Z[i,j-2]-Z[i,j+2]-(G[i,j-1]-G[i,j+1])・2| ・・・[式23] を算出し、相関判別値Xcとする。
Step S23: The image processing unit 16 calculates Xc = | Z [i, j-2] -Z [i, j + 2]-(G [i, j-1] for the vertical direction having high similarity. -G [i, j + 1]) · 2 | (Equation 23) is calculated as the correlation determination value Xc.

【0066】ステップS24: 画像処理部16は、類
似性の高い横方向について, Xc=|Z[i-2,j]-Z[i+2,j]-(G[i-1,j]-G[i+1,j])・2| ・・・[式24] を算出し、相関判別値Xcとする。
Step S24: The image processing section 16 calculates Xc = | Z [i-2, j] -Z [i + 2, j]-(G [i-1, j]) for the horizontal direction having a high similarity. -G [i + 1, j]) · 2 | (Equation 24) is calculated and set as the correlation determination value Xc.

【0067】ステップS25: 画像処理部16は、 Xcv=|Z[i,j-2]-Z[i,j+2]-(G[i,j-1]-G[i,j+1])・2| ・・・[式25] Xch=|Z[i-2,j]-Z[i+2,j]-(G[i-1,j]-G[i+1,j])・2| ・・・[式26] Xc =max(Xcv,Xch) ・・・[式27] を算出し、相関判別値Xcとする。Step S25: The image processing unit 16 determines that Xcv = | Z [i, j-2] -Z [i, j + 2]-(G [i, j-1] -G [i, j + 1) ]) · 2 | ... [Equation 25] Xch = | Z [i-2, j] -Z [i + 2, j]-(G [i-1, j] -G [i + 1, j ]] · 2 | ··· [Equation 26] Xc = max (Xcv, Xch) ··· [Equation 27] is used as the correlation determination value Xc.

【0068】ステップS26: ここで、画像処理部1
6は、上記ステップで算出した相関判別値Xcの値を判別
する。ここで相関判別値Xcが閾値Th3を上回る場合、画
像処理部16は、G色の画像構造とG色以外の画像構造
との相関が低いと判定して、ステップS14に動作を移
行する。一方、相関判別値Xcが閾値Th3よりも小さい場
合、画像処理部16は、G色の画像構造とG色以外の画
像構造との相関が高いと判定して、ステップS15に動
作を移行する。なお、閾値Th3の値としては、複数のテ
スト画像においてドット雑音の発生箇所における相関判
別値Xcの値を調べ、これら相関判別値Xcの平均値や分散
を考慮して決定することが好ましい。
Step S26: Here, the image processing unit 1
6 determines the value of the correlation determination value Xc calculated in the above step. Here, when the correlation determination value Xc exceeds the threshold Th3, the image processing unit 16 determines that the correlation between the image structure of G color and the image structure other than G color is low, and shifts the operation to step S14. On the other hand, when the correlation determination value Xc is smaller than the threshold Th3, the image processing unit 16 determines that the correlation between the image structure of G color and the image structure other than G color is high, and shifts the operation to step S15. It is preferable that the value of the threshold Th3 be determined by examining the value of the correlation discrimination value Xc at the place where the dot noise occurs in a plurality of test images and considering the average value and variance of these correlation discrimination values Xc.

【0069】[第3の実施形態の効果など]第3の実施
形態では、G色の画像構造とG色以外の画像構造との相
関が小さい場合、補間値決定におけるG色以外の寄与率
を実質ゼロにする。したがって、G色以外の相異なる画
像構造が、G色の補間画像に紛れ込むおそれがなく、ド
ット雑音を確実に低減することが可能となる。また、逆
に相関が強い場合には、寄与率は低減されず、G色以外
の画像構造をもってG色の画像構造が適切に補われ、デ
ィテールに富んだ補間画像が生成される。次に、別の実
施形態について説明する。
[Effects of Third Embodiment, etc.] In the third embodiment, when the correlation between the image structure of G color and the image structure other than G color is small, the contribution ratio of the color other than G in determining the interpolation value is determined. Substantially zero. Therefore, there is no possibility that different image structures other than the G color are mixed into the G color interpolation image, and it is possible to reliably reduce the dot noise. Conversely, when the correlation is strong, the contribution rate is not reduced, the image structure of G color is appropriately supplemented with an image structure other than G color, and an interpolation image rich in detail is generated. Next, another embodiment will be described.

【0070】《第4の実施形態》第4の実施形態は、請
求項6,7に対応した電子カメラの実施形態である。な
お、第4の実施形態における電子カメラの概略構成は、
第1の実施形態(図1)と共通するため、図1に示す参
照符号をそのまま使用して、以下の説明を行う。
<< Fourth Embodiment >> A fourth embodiment is an electronic camera according to the sixth and seventh aspects. The schematic configuration of the electronic camera according to the fourth embodiment is as follows.
Since the second embodiment is common to the first embodiment (FIG. 1), the following description will be made using the reference numerals shown in FIG. 1 as they are.

【0071】ここで、本発明の構成要件と第4の実施形
態との対応関係については、補間手段が、画像処理部1
6における『G色の補間処理を行う機能』に対応する。
また、構造判定手段が、画像処理部16における『色差
を判定し、その判定結果に応じてG補間におけるG色以
外の寄与率を変更する機能』に対応する。
Here, as for the correspondence between the constituent features of the present invention and the fourth embodiment, the interpolation means uses the image processing unit 1.
6 corresponds to the “function of performing G color interpolation processing”.
In addition, the structure determination means corresponds to the “function of determining a color difference and changing a contribution ratio other than the G color in the G interpolation according to the determination result” in the image processing unit 16.

【0072】図8は、補間対象画素[i,j]における
G補間処理ルーチンを示す図である。第4の実施形態に
おける動作上の相違点は、第1の実施形態(図3)にお
けるステップS5,S8,S11,S13を、図8に示
すステップS27〜30にそれぞれ置換している点であ
る。以下、相違点の動作について説明する。
FIG. 8 is a diagram showing a G interpolation processing routine for the interpolation target pixel [i, j]. The operation difference in the fourth embodiment is that steps S5, S8, S11, and S13 in the first embodiment (FIG. 3) are replaced with steps S27 to S30 shown in FIG. 8, respectively. . Hereinafter, the operation of the difference will be described.

【0073】ステップS27: 画像処理部16は、類
似性の高い縦方向について, Xs=|Z[i,j-2]+Z[i,j]-G[i,j-1]・2|+|Z[i,j+2]+Z[i,j]-G[i,j+1]・2| ・・・[式28] を算出し、色差判別値Xsとする。
Step S27: The image processing section 16 calculates Xs = | Z [i, j-2] + Z [i, j] -G [i, j-1] · 2 | + | Z [i, j + 2] + Z [i, j] -G [i, j + 1] · 2 | (Equation 28) is calculated and set as the color difference determination value Xs.

【0074】ステップS28: 画像処理部16は、類
似性の高い横方向について, Xs=|Z[i-2,j]+Z[i,j]-G[i-1,j]・2|+|Z[i+2,j]+Z[i,j]-G[i+1,j]・2| ・・・[式29] を算出し、色差判別値Xsとする。
Step S28: The image processing section 16 determines that Xs = | Z [i-2, j] + Z [i, j] -G [i-1, j] · 2 | + | Z [i + 2, j] + Z [i, j] -G [i + 1, j] · 2 | (Equation 29) is calculated and used as the color difference determination value Xs.

【0075】ステップS29: 画像処理部16は、 Xsv=|Z[i,j-2]+Z[i,j]-G[i,j-1]・2|+|Z[i,j+2]+Z[i,j]-G[i,j+1]・2| ・・・[式28a] Xsh=|Z[i-2,j]+Z[i,j]-G[i-1,j]・2|+|Z[i+2,j]+Z[i,j]-G[i+1,j]・2| ・・・[式29a] Xs =max(Xsv,Xsh) ・・・[式30] を算出し、色差判別値Xsとする。Step S29: The image processing unit 16 determines that Xsv = | Z [i, j-2] + Z [i, j] -G [i, j-1] · 2 | + | Z [i, j + 2] + Z [i, j] -G [i, j + 1] · 2 |... [Equation 28a] Xsh = | Z [i−2, j] + Z [i, j] -G [i −1, j] · 2 | + | Z [i + 2, j] + Z [i, j] −G [i + 1, j] · 2 | (Equation 29a) Xs = max (Xsv, Xsh)... [Equation 30] is calculated as the color difference determination value Xs.

【0076】ステップS30: ここで、画像処理部1
6は、上記ステップで算出した色差判別値Xsの値を判別
する。ここで色差判別値Xsが閾値Th4を上回る場合、画
像処理部16は、局所領域の色差(彩度)が大きいと判
定して、ステップS14に動作を移行する。一方、色差
判別値Xsが閾値Th4よりも小さい場合、画像処理部16
は、局所領域の色差が小さいと判定して、ステップS1
5に動作を移行する。なお、閾値Th4の値としては、複
数のテスト画像においてドット雑音の発生箇所における
色差判別値Xsの値を調べ、これら色差判別値Xsの平均値
や分散を考慮して決定することが好ましい。
Step S30: Here, the image processing unit 1
6 determines the value of the color difference determination value Xs calculated in the above step. Here, if the color difference determination value Xs exceeds the threshold Th4, the image processing unit 16 determines that the color difference (saturation) of the local region is large, and shifts the operation to step S14. On the other hand, when the color difference determination value Xs is smaller than the threshold Th4, the image processing unit 16
Determines that the color difference in the local region is small, and determines in step S1
Operation is shifted to 5. It is preferable that the value of the threshold Th4 be determined by examining the value of the color difference discrimination value Xs at the place where the dot noise occurs in a plurality of test images, and considering the average value and variance of these color difference discrimination values Xs.

【0077】[第4の実施形態の効果など]第4の実施
形態では、G色の色差(彩度)が大きい場合、補間値決
定におけるG色以外の寄与率を実質ゼロにする。したが
って、高彩度箇所に発生しやすいドット雑音を確実に低
減することが可能となる。また、逆に彩度が小さい場合
には、寄与率は低減されず、G色以外の画像構造をもっ
てG補間画素のディテールが適切に増強される。次に、
別の実施形態について説明する。
[Effects of the Fourth Embodiment] In the fourth embodiment, when the color difference (saturation) of the G color is large, the contribution ratios other than the G color in the determination of the interpolation value are set to substantially zero. Therefore, it is possible to reliably reduce the dot noise that is likely to be generated in a high chroma portion. Conversely, when the saturation is small, the contribution rate is not reduced, and the details of the G interpolation pixels are appropriately enhanced with an image structure other than the G color. next,
Another embodiment will be described.

【0078】《第5の実施形態》第5の実施形態は、請
求項8,9に対応した電子カメラの実施形態である。な
お、第5の実施形態における電子カメラの概略構成は、
第1の実施形態(図1)と共通するため、図1に示す参
照符号をそのまま使用して、以下の説明を行う。
Fifth Embodiment A fifth embodiment is an electronic camera according to the eighth and ninth aspects. The schematic configuration of the electronic camera according to the fifth embodiment is as follows.
Since the second embodiment is common to the first embodiment (FIG. 1), the following description will be made using the reference numerals shown in FIG. 1 as they are.

【0079】ここで、本発明の構成要件と第5の実施形
態との対応関係については、方向判定手段が、画像処理
部16における『補間対象画素を起点とする複数の所定
方向について類似性判定を行う機能』に対応する。ま
た、非対称補間手段が、画像処理部16における『類似
性の高い所定方向についてG色の非対称補間値を求める
機能』に対応する。
Here, as for the correspondence between the constituent elements of the present invention and the fifth embodiment, the direction determining means determines whether or not the image processing section 16 determines “similarity determination for a plurality of predetermined directions starting from the pixel to be interpolated. Function to perform Further, the asymmetric interpolation means corresponds to the “function of obtaining an asymmetric interpolation value of G color in a predetermined direction with high similarity” in the image processing unit 16.

【0080】図9は、第5の実施形態におけるG補間処
理ルーチンを示す図である。以下、図9に示すステップ
番号に沿って、G補間処理の動作を説明する。
FIG. 9 is a diagram showing a G interpolation processing routine according to the fifth embodiment. Hereinafter, the operation of the G interpolation processing will be described along the step numbers shown in FIG.

【0081】ステップS41: 画像処理部16は、補
間対象画素を含む局所領域において、縦横方向の類似性
判定を行い、類似性の高い方向を補間方向に決定する。
Step S41: The image processing section 16 performs similarity determination in the vertical and horizontal directions in the local area including the pixel to be interpolated, and determines a direction having a high similarity as the interpolation direction.

【0082】ステップS42: 画像処理部16は、補
間対象画素(下記Y(0)の画素位置)を中心に補間方向に
並ぶ ・第2色情報Y(-2) ・第1色情報X(-1) ・第2色情報Y(0) ・第1色情報X(+1) ・第2色情報Y(+2) の画素配列について、 Yth=|Y(-2)-Y(0)|-|Y(+2)-Y(0)| ・・・[式31] を計算し、類似性判定値Ythを求める。ここでの類似性
判定値Ythは、補間対象画素を起点とする2方向に関し
て類似性を比較した結果(すなわち非対称性)となる。
Step S42: The image processing section 16 arranges in the direction of interpolation around the pixel to be interpolated (the pixel position of Y (0) below). Second color information Y (-2) First color information X (- 1) 2nd color information Y (0) 1st color information X (+1) 2nd color information Y (+2) Yth = | Y (-2) -Y (0) | -| Y (+2) -Y (0) |... [Equation 31] is calculated to determine the similarity determination value Yth. The similarity determination value Yth here is a result of comparing similarities in two directions starting from the pixel to be interpolated (ie, asymmetry).

【0083】ステップS43: 画像処理部16は、類
似性判定値Ythの値を判定する。ここで、類似性判定値Y
thの絶対値が閾値th5以下の場合、画像処理部16は、
類似性に明確な差がないと判断して、ステップS44に
動作を移行する。また、類似性判定値Ythが閾値th5を上
回る場合、画像処理部16は、Y(+2)側の類似性が高い
と判断し、ステップS45に動作を移行する。一方、類
似性判定値Ythが閾値-th5を下回る場合、画像処理部1
6は、Y(-2)側の類似性が高いと判断し、ステップS4
6に動作を移行する。なお、閾値Th5の値としては、複
数のテスト画像においてドット雑音の発生頻度などを評
価しながら、試行的に決定することが好ましい。
Step S43: The image processing section 16 determines the value of the similarity determination value Yth. Here, the similarity determination value Y
When the absolute value of th is equal to or smaller than the threshold th5, the image processing unit 16
It is determined that there is no clear difference in similarity, and the operation moves to step S44. If the similarity determination value Yth exceeds the threshold th5, the image processing unit 16 determines that the similarity on the Y (+2) side is high, and shifts the operation to step S45. On the other hand, when the similarity determination value Yth is smaller than the threshold value -th5, the image processing unit 1
6 judges that the similarity on the Y (-2) side is high, and determines in step S4
The operation moves to 6. It is preferable that the threshold value Th5 be determined on a trial basis while evaluating the frequency of occurrence of dot noise in a plurality of test images.

【0084】ステップS44: 類似性に明確な差が無
いので、画像処理部16は、補間方向について対称な補
間演算を実行し、補間対称画素の補間値X(0)を決定す
る。
Step S44: Since there is no clear difference in similarity, the image processing section 16 executes an interpolation operation symmetrical in the interpolation direction to determine an interpolation value X (0) of the interpolation symmetric pixel.

【0085】ステップS45: Y(+2)側の類似性が高
いので、画像処理部16は、Y(+2)側を使用した非対称
な補間演算を下式に従って実行する。 X(0)=a1・X(-1)+(1-a1)・X(+1)+a2・[Y(0)-Y(+2)] ・・・[式32] ここで、係数a1については、例えば1/2程度が好まし
い。また、類似性の高い方向の加重比率を高めるため、
係数a1を1/2よりも若干小さい値にしてもよい。ま
た、係数a2については、複数のテスト画像において、デ
ィテールの強調量などを主観評価して、試行的に決定す
ることが好ましい。
Step S45: Since the similarity on the Y (+2) side is high, the image processing unit 16 executes an asymmetric interpolation operation using the Y (+2) side according to the following equation. X (0) = a1 · X (-1) + (1-a1) · X (+1) + a2 · [Y (0) −Y (+2)] (32) where the coefficient About a1, for example, about 1/2 is preferable. Also, to increase the weighting ratio in the direction of higher similarity,
The coefficient a1 may be set to a value slightly smaller than 1/2. Further, it is preferable that the coefficient a2 is determined on a trial basis by subjecting a plurality of test images to subjective evaluation of the amount of detail enhancement and the like.

【0086】ステップS46: Y(-2)側の類似性が高
いので、画像処理部16は、Y(-2)側を使用した非対称
な補間演算を下式に従って実行する。 X(0)=a1・X(+1)+(1-a1)・X(-1)+a2・[Y(0)-Y(-2)] ・・・[式33] ここで、係数a1については、例えば1/2程度が好まし
い。また、類似性の高い方向の加重比率を高めるため、
係数a1を1/2よりも若干小さい値にしてもよい。ま
た、係数a2については、複数のテスト画像において、デ
ィテールの強調量などを主観評価して、試行的に決定す
ることが好ましい。
Step S46: Since the similarity on the Y (-2) side is high, the image processing unit 16 executes an asymmetric interpolation operation using the Y (-2) side according to the following equation. X (0) = a1 · X (+1) + (1-a1) · X (−1) + a2 · [Y (0) −Y (−2)] (33) where the coefficient About a1, for example, about 1/2 is preferable. Also, to increase the weighting ratio in the direction of higher similarity,
The coefficient a1 may be set to a value slightly smaller than 1/2. Further, it is preferable that the coefficient a2 is determined on a trial basis by subjecting a plurality of test images to subjective evaluation of the amount of detail enhancement and the like.

【0087】[第5の実施形態の効果など]上述したよ
うに、第5の実施形態では 類似性の高い方向を選んだ
上で非対称補間演算を実行する。したがって、色境界や
エッジをまたいで補間画像に誤差が混入するおそれが少
なく、ドット雑音の少ない良質な補間画像を生成するこ
とが可能となる。
[Effects of Fifth Embodiment] As described above, in the fifth embodiment, an asymmetric interpolation operation is executed after selecting a direction having a high similarity. Therefore, there is little possibility that an error is mixed in the interpolated image over the color boundary or the edge, and a high-quality interpolated image with little dot noise can be generated.

【0088】なお、上述した実施形態では、類似性の高
い方向を選んで非対称補間演算を実行しているが、これ
に限定されるものではない。より一般的には、請求項1
0に記載されるように、類似性に応じた加重比率で、複
数方向の非対称補間値を加重合成してもよい。例えば、 b1= |Y(+2)-Y(0)| ・・・[式34a] b2= |Y(-2)-Y(0)| ・・・[式34b] を用いて、以下のように加重合成を行ってもよい。 X(0)=((a1・X(-1)+(1-a1)・X(+1)+a2・(Y(0)-Y(+2)))・b2 +(a1・X(+1)+(1-a1)・X(-1)+a2・(Y(0)-Y(-2)))・b1)/(b1+b2) ・・・[式35] この場合、類似性の度合いを的確に反映した加重比率
で、補間演算を実行することが可能となる。次に、別の
実施形態について説明する。
In the above-described embodiment, the asymmetric interpolation operation is executed by selecting a direction having a high similarity. However, the present invention is not limited to this. More generally, claim 1
As described in “0”, the asymmetric interpolation values in a plurality of directions may be weighted and synthesized at a weight ratio according to the similarity. For example, b1 = | Y (+2) -Y (0) | (Expression 34a) b2 = | Y (-2) -Y (0) | (Expression 34b) Weighted synthesis may be performed as described above. X (0) = ((a1 ・ X (-1) + (1-a1) ・ X (+1) + a2 ・ (Y (0) -Y (+2))) ・ b2 + (a1 ・ X ( +1) + (1-a1) · X (-1) + a2 · (Y (0) −Y (-2))) · b1) / (b1 + b2) (Equation 35) The interpolation calculation can be executed at a weighting ratio that accurately reflects the degree of similarity. Next, another embodiment will be described.

【0089】《第6の実施形態》第6の実施形態は、請
求項1,4,5,8,10に対応した電子カメラの実施
形態である。なお、第6の実施形態における電子カメラ
の概略構成は、第1の実施形態(図1)と共通するた
め、図1に示す参照符号をそのまま使用して、以下の説
明を行う。
<< Sixth Embodiment >> A sixth embodiment is an electronic camera according to claims 1, 4, 5, 8, and 10. Since the schematic configuration of the electronic camera according to the sixth embodiment is common to that of the first embodiment (FIG. 1), the following description will be made using the reference numerals shown in FIG. 1 as they are.

【0090】ここで、請求項1,4,5の構成要件と第
6の実施形態との対応関係については、補間手段が、画
像処理部16における『G色の補間処理を行う機能』に
対応する。また、構造判定手段が、画像処理部16にお
ける『画像構造の判定結果に応じてG補間におけるG色
以外の寄与率を変更する機能』に対応する。一方、請求
項8,10の構成要件と第6の実施形態との対応関係に
ついては、方向判定手段が、画像処理部16における
『補間対象画素を起点とする複数の所定方向について類
似性判定を行う機能』に対応する。また、非対称補間手
段が、画像処理部16における『複数の所定方向につい
てG色の非対称補間値を求め、これらの非対称補間値を
加重合成してG色の補間値を決定する機能』に対応す
る。
Here, regarding the correspondence between the constitutional requirements of claims 1, 4 and 5 and the sixth embodiment, the interpolating means corresponds to the "function of performing G color interpolation processing" in the image processing section 16. I do. Further, the structure determination means corresponds to “the function of changing the contribution ratio of the G interpolation other than the G color according to the determination result of the image structure” in the image processing unit 16. On the other hand, with regard to the correspondence between the constitutional requirements of claims 8 and 10 and the sixth embodiment, the direction determining means performs the “ Function to perform ”. Also, the asymmetric interpolation means corresponds to the “function of determining an asymmetric interpolation value of G color in a plurality of predetermined directions and determining a G color interpolation value by weight-synthesizing these asymmetric interpolation values” in the image processing unit 16. .

【0091】図10は、第6の実施形態におけるG補間
処理ルーチンを示す図である。以下、図10に示すステ
ップ番号に沿って、G補間処理の動作を説明する。
FIG. 10 is a diagram showing a G interpolation processing routine according to the sixth embodiment. Hereinafter, the operation of the G interpolation processing will be described along the step numbers shown in FIG.

【0092】ステップS51: 画像処理部16は、補
間対象画素を含む局所領域において、縦横方向の類似性
判定を行い、類似性の高い方向を補間方向に決定する。
ここで縦方向を補間方向に決定した場合、画像処理部1
6はステップS52に動作を移行する。また、横方向を
補間方向に決定した場合、画像処理部16はステップS
55に動作を移行する。一方、縦横どちらの類似性にも
明確な差が無い場合、画像処理部16は、補間方向を縦
横方向として、動作をステップS58に移行する。
Step S51: The image processing section 16 determines the similarity in the vertical and horizontal directions in the local area including the pixel to be interpolated, and determines the direction having the higher similarity as the interpolation direction.
If the vertical direction is determined as the interpolation direction, the image processing unit 1
6 shifts the operation to step S52. When the horizontal direction is determined to be the interpolation direction, the image processing unit 16 determines in step S
The operation shifts to 55. On the other hand, when there is no clear difference between the vertical and horizontal similarities, the image processing unit 16 sets the interpolation direction to the vertical and horizontal directions and shifts the operation to step S58.

【0093】ステップS52: ここで、画像処理部1
6は、補間方向である縦方向について bt1=|Z[i,j]-Z[i,j-2]|+1 ・・・[式36] bt2=|Z[i,j]-Z[i,j+2]|+1 ・・・[式37] mbt=bt1+bt2 ・・・[式38] を計算する。なお、[式36〜37]の加算項『+1』
は、後述するステップS61においてゼロ除算エラーを
避けるための最小数であり、別途、エラー処理がなされ
る場合には省略できる。
Step S52: Here, the image processing unit 1
6 is bt1 = | Z [i, j] -Z [i, j-2] | +1 ... [Expression 36] bt2 = | Z [i, j] -Z [ i, j + 2] | +1 (Expression 37) mbt = bt1 + bt2 (Expression 38) Note that the addition term “+1” in [Equations 36 to 37]
Is a minimum number for avoiding a division by zero error in step S61 described later, and can be omitted when error processing is separately performed.

【0094】ステップS53: 画像処理部16は、補
間方向である縦方向について、 G=(G[i,j-1]+G[i,j+1])/2 ・・・[式39] を算出し、同色補間値Gを求める。
Step S53: The image processing section 16 calculates G = (G [i, j-1] + G [i, j + 1]) / 2 in the vertical direction as the interpolation direction [Equation 39]. To calculate the same color interpolation value G.

【0095】ステップS54: 画像処理部16は、後
述するステップS61において使用する係数aを1に設
定する。その後、画像処理部16は、ステップS61に
動作を移行する。
Step S54: The image processing section 16 sets the coefficient a used in step S61 described later to one. Thereafter, the image processing unit 16 shifts the operation to Step S61.

【0096】ステップS55: ここで、画像処理部1
6は、補間方向である横方向について by1=|Z[i,j]-Z[i-2,j]|+1 ・・・[式40] by2=|Z[i,j]-Z[i+2,j]|+1 ・・・[式41] mby=by1+by2 ・・・[式42] を計算する。なお、[式40〜41]の加算項『+1』
は、後述するステップS61においてゼロ除算エラーを
避けるための最小数であり、別途、エラー処理がなされ
る場合には省略できる。
Step S55: Here, the image processing unit 1
6 is by1 = | Z [i, j] -Z [i-2, j] | +1... [Equation 40] in the horizontal direction which is the interpolation direction by2 = | Z [i, j] -Z [ i + 2, j] | +1 (Expression 41) mby = by1 + by2 (Expression 42) is calculated. Note that the addition term “+1” in [Equations 40 to 41]
Is a minimum number for avoiding a division by zero error in step S61 described later, and can be omitted when error processing is separately performed.

【0097】ステップS56: 画像処理部16は、補
間方向である横方向について、 G=(G[i-1,j]+G[i+1,j])/2 ・・・[式43] を算出し、同色補間値Gを求める。
Step S56: The image processing section 16 calculates G = (G [i-1, j] + G [i + 1, j]) / 2 in the horizontal direction which is the interpolation direction [Equation 43]. To calculate the same color interpolation value G.

【0098】ステップS57: 画像処理部16は、後
述するステップS61において使用する係数aをゼロに
設定する。その後、画像処理部16は、ステップS61
に動作を移行する。
Step S57: The image processing section 16 sets the coefficient a used in step S61 described later to zero. Thereafter, the image processing unit 16 proceeds to step S61.
Move the operation to.

【0099】ステップS58: ここで、画像処理部1
6は、補間方向である縦横方向について bt1=|Z[i,j]-Z[i,j-2]|+1 ・・・[式44] bt2=|Z[i,j]-Z[i,j+2]|+1 ・・・[式45] mbt=bt1+bt2 ・・・[式46] by1=|Z[i,j]-Z[i-2,j]|+1 ・・・[式47] by2=|Z[i,j]-Z[i+2,j]|+1 ・・・[式48] mby=by1+by2 ・・・[式49]
を計算する。
Step S58: Here, the image processing unit 1
6 is bt1 = | Z [i, j] -Z [i, j-2] | +1... [Equation 44] bt2 = | Z [i, j] -Z [ i, j + 2] | +1 (Equation 45) mbt = bt1 + bt2 (Equation 46) by1 = | Z [i, j] -Z [i-2, j] | +1 .. [Equation 47] by2 = | Z [i, j] -Z [i + 2, j] | +1 (Equation 48) mby = by1 + by2 (Equation 49)
Is calculated.

【0100】ステップS59: 画像処理部16は、補
間方向である縦横方向について、 G=(G[i,j-1]+G[i,j+1]+G[i-1,j]+G[i+1,j])/4 ・・・[式50] を算出し、同色補間値Gを求める。
Step S59: The image processing section 16 calculates G = (G [i, j-1] + G [i, j + 1] + G [i-1, j] + G [i + 1, j]) / 4 [Equation 50] is calculated to obtain the same color interpolation value G.

【0101】ステップS60: 画像処理部16は、後
述するステップS61において使用する係数aを1/2
に設定する。その後、画像処理部16は、ステップS6
1に動作を移行する。
Step S60: The image processing section 16 sets the coefficient a used in step S61 to be described later to 1/2.
Set to. Thereafter, the image processing unit 16 proceeds to step S6
The operation is shifted to 1.

【0102】ステップS61: 画像処理部16は、 FG[i,j]=G+a・[(Z[i,j]-Z[i,j-2])・bt2+(Z[i,j]-Z[i,j+2])・bt1]/(2・mbt) +(1-a)・[(Z[i,j]-Z[i-2,j])・by2+(Z[i,j]-Z[i+2,j])・by1]/(2・mby) ・・・[式51] をもって、補間対象画素におけるG色の最終的な補間値
を決定する。
Step S61: The image processing section 16 calculates FG [i, j] = G + a. [(Z [i, j] -Z [i, j-2]). Bt2 + (Z [i, j] -Z [i, j + 2]) · bt1] / (2 · mbt) + (1-a) · [(Z [i, j] -Z [i-2, j]) · by2 + (Z [i , j] -Z [i + 2, j]) · by1] / (2 · mby) [Equation 51] is used to determine the final interpolation value of the G color at the interpolation target pixel.

【0103】[第6の実施形態の効果など]上述したよ
うに、第6の実施形態では、非対称補間演算を実施しつ
つ、同時に補間値決定におけるG色以外の寄与率も変更
している。したがって、請求項1および請求項8に記載
する各効果を相乗的に得ることが可能となり、良質な補
間画像を生成することが可能となる。
[Effects of Sixth Embodiment] As described above, in the sixth embodiment, the asymmetrical interpolation operation is performed, and at the same time, the contribution ratios other than the G color in the interpolation value determination are changed. Therefore, it is possible to obtain the effects described in claims 1 and 8 synergistically, and to generate a high-quality interpolated image.

【0104】なお、上述した第6の実施形態を次のよう
に変更してもよい。まず、画像処理部16は、補間対象
位置[i,j]を含む局所領域について縦横の類似性を比較
し、類似性の高い方向を補間方向に決定する。ここで、
縦方向を補間方向とした場合、画像処理部16は、 b1=abs(Z[i,j]-Z[i,j-2])+1 ・・・[式52] b2=abs(Z[i,j]-Z[i,j+2])+1 ・・・[式53] mb=b1+b2 ・・・[式54] G1=(3*G[i,j-1]+G[i,j+1])/4+(Z[i,j]-Z[i,j-2])/2 ・・・[式55] G2=(3*G[i,j+1]+G[i,j-1])/4+(Z[i,j]-Z[i,j+2])/2 ・・・[式56] FG[i, j]=(b2*G1+b1*G2)/mba ・・・[式57] を計算し、FG[i, j]をもってG補間値とする。
The above-described sixth embodiment may be modified as follows. First, the image processing unit 16 compares the vertical and horizontal similarities of the local area including the interpolation target position [i, j], and determines the direction of higher similarity as the interpolation direction. here,
When the vertical direction is set as the interpolation direction, the image processing unit 16 calculates b1 = abs (Z [i, j] -Z [i, j-2]) + 1... [Expression 52] b2 = abs (Z [ i, j] -Z [i, j + 2]) + 1 [Equation 53] mb = b1 + b2 [Equation 54] G1 = (3 * G [i, j-1] + G [i, j + 1]) / 4+ (Z [i, j] -Z [i, j-2]) / 2 [Equation 55] G2 = (3 * G [i, j + 1] + G [i, j-1]) / 4+ (Z [i, j] -Z [i, j + 2]) / 2 ... [Equation 56] FG [i, j] = (b2 * G1 + b1 * G2) / mba [Expression 57] is calculated, and FG [i, j] is used as a G interpolation value.

【0105】一方、横方向を補間方向とした場合、画像
処理部16は、 b1=abs(Z[i,j]-Z[i-2,j])+1 ・・・[式58] b2=abs(Z[i,j]-Z[i+2,j])+1 ・・・[式59] mb=b1+b2 ・・・[式60] G1=(3*G[i-1,j]+G[i+1,j])/4+(Z[i,j]-Z[i-2,j])/2 ・・・[式61] G2=(3*G[i+1,j]+G[i-1,j])/4+(Z[i,j]-Z[i+2,j])/2 ・・・[式62] FG[i, j]=(b2*G1+b1*G2)/mb ・・・[式63] を計算し、FG[i, j]をもってG補間値とする。この場合
も、請求項1および請求項8に記載する各効果を相乗的
に得ることが可能となり、良質な補間画像を生成するこ
とが可能となる。
On the other hand, if the horizontal direction is the interpolation direction, the image processing section 16 calculates b1 = abs (Z [i, j] -Z [i-2, j]) + 1 (Equation 58) b2 = abs (Z [i, j] -Z [i + 2, j]) + 1 [Equation 59] mb = b1 + b2 [Equation 60] G1 = (3 * G [i-1 , j] + G [i + 1, j]) / 4+ (Z [i, j] -Z [i-2, j]) / 2 [Equation 61] G2 = (3 * G [i + 1, j] + G [i-1, j]) / 4+ (Z [i, j] -Z [i + 2, j]) / 2 [Equation 62] FG [i, j] = (b2 * G1 + b1 * G2) / mb (Equation 63) is calculated, and FG [i, j] is used as a G interpolation value. Also in this case, it is possible to obtain the respective effects described in claims 1 and 8 synergistically, and to generate a high-quality interpolation image.

【0106】《実施形態の補足事項》なお、上述した実
施形態では、電子カメラ11上で補間処理を実行する場
合について説明したが、本発明はこれに限定されるもの
ではない。例えば、コンピュータ上において、図3,図
5,図7〜10に示すような補間処理ルーチンを実行す
ることももちろん可能である。また、請求項11に記載
したように、このような補間処理を実行する画像処理プ
ログラムを記録した記録媒体も、本発明の実施の一形態
となる。なお、このような記録媒体の製造行為として
は、インターネットなどの通信媒体を経由して、遠隔地
からプログラムデータを転送し、相手先のコンピュータ
内のメモリやハードディスクなどに記録させる行為も含
まれる。
<< Supplementary Items of Embodiment >> In the above-described embodiment, the case where the interpolation processing is executed on the electronic camera 11 has been described, but the present invention is not limited to this. For example, it is of course possible to execute an interpolation processing routine as shown in FIGS. 3, 5, and 7 to 10 on a computer. Further, as described in claim 11, a recording medium on which an image processing program for executing such interpolation processing is recorded is also an embodiment of the present invention. Note that the act of manufacturing such a recording medium includes an act of transferring program data from a remote location via a communication medium such as the Internet and recording the program data in a memory or a hard disk in a partner computer.

【0107】また、上述した実施形態では、ベイヤー配
列におけるG色の空格子位置を補間する場合について説
明したが、本発明はこれに限定されるものではない。本
発明は、2色以上の色情報を含む画像データを対象にし
た補間処理全般に適用可能な技術である。したがって、
本発明は、ベイヤー配列以外の色配列(例えば補色配列
やハニカム配列)の補間処理にも適用可能であり、また
G色以外の補間処理(例えば色差補間やその他の表色系
における補間)にも適用可能である。さらに、本発明
は、空格子位置の補間処理に限らず、画像データの画素
数を変換する際の補間処理にももちろん適用可能であ
る。また、特定色以外の2色以上を加味して特定色の補
間値を決定するような処理があった場合、特定色以外の
1色を加味して特定色の補間値(最終的な補間値に限ら
ず、補間値の導出課程における中間値も含む)を決定す
る処理過程に、本発明を適用することも可能である。
Further, in the above-described embodiment, a case has been described where the G-color vacancy position in the Bayer array is interpolated, but the present invention is not limited to this. The present invention is a technique applicable to general interpolation processing for image data including color information of two or more colors. Therefore,
The present invention can be applied to interpolation processing of a color array other than the Bayer array (for example, a complementary color array or a honeycomb array), and can also be applied to interpolation processing other than the G color (for example, color difference interpolation or interpolation in another color system). Applicable. Further, the present invention is not limited to the interpolation processing of the vacant lattice position, and is of course applicable to the interpolation processing when converting the number of pixels of the image data. Further, when there is a process of determining an interpolation value of a specific color by adding two or more colors other than the specific color, the interpolation value of the specific color (final interpolation value) is added by adding one color other than the specific color. The present invention is not limited to this, and the present invention can be applied to a process of determining an intermediate value in a process of deriving an interpolation value.

【0108】なお、上述した実施形態では、補間対象画
素の第2色情報を使用しているが、これに限定されるも
のではない。例えば、補間対象画素の第2色情報を直に
使用せずに、周辺の第2色情報のみを使用して、第1色
情報の補間画像のディテール増強を図ってもよい。この
場合は、空間周波数の高域成分が徒らに増えることがな
く、画像雑音の低減と、圧縮符号量の低減という2つの
効果を得ることが可能となる。
Although the second embodiment uses the second color information of the pixel to be interpolated, the present invention is not limited to this. For example, the detail of the interpolation image of the first color information may be enhanced by using only the surrounding second color information without directly using the second color information of the interpolation target pixel. In this case, the high frequency component of the spatial frequency does not increase unnecessarily, and it is possible to obtain the two effects of reducing the image noise and reducing the amount of compression code.

【0109】また、上述した実施形態では、ホワイトバ
ランス調整後の画像データに対して補間処理を実行して
いる。この場合、極端な色の偏りが予め補正されている
ので、ドット雑音の発生可能性の高い箇所が予め低減さ
れる。したがって、本発明の補正処理をホワイトバラン
ス調整後に行うことにより、ドット雑音を相乗的に低減
し、かつディテール再現性を相乗的に高めるという優れ
た長所が得られる。しかしながら、本発明は、これに限
定されるものではなく、ホワイトバランス調整前に実行
しても十分な効果を得ることが可能である。
In the above-described embodiment, the interpolation processing is performed on the image data after the white balance adjustment. In this case, since the extreme color bias is corrected in advance, the places where the dot noise is likely to occur are reduced in advance. Therefore, by performing the correction processing of the present invention after white balance adjustment, an excellent advantage that dot noise is synergistically reduced and detail reproducibility is synergistically enhanced is obtained. However, the present invention is not limited to this, and a sufficient effect can be obtained even if executed before white balance adjustment.

【0110】なお、上述した実施形態では、階調変換後
の画像データに対して補間処理を実行している。この場
合、極端な階調の偏りが視覚特性に合わせて補正されて
いるので、ドット雑音の発生可能性の高い箇所が予め低
減される。したがって、本発明の補正処理を階調変換後
に行うことにより、ドット雑音を相乗的に低減し、かつ
ディテール再現性を相乗的に高めるという優れた長所が
得られる。しかしながら、本発明は、これに限定される
ものではなく、階調変換前に実行しても十分な効果を得
ることが可能である。
In the above-described embodiment, the interpolation processing is performed on the image data after the gradation conversion. In this case, since the extreme grayscale bias is corrected in accordance with the visual characteristics, the places where the dot noise is likely to occur are reduced in advance. Therefore, by performing the correction processing of the present invention after gradation conversion, an excellent advantage of synergistically reducing dot noise and synergistically improving detail reproducibility can be obtained. However, the present invention is not limited to this, and it is possible to obtain a sufficient effect even if it is executed before gradation conversion.

【0111】また、上述した実施形態では、画像処理部
16がソフトウェア処理によって補間処理を実施する場
合について説明しているが、これに限定されるものでは
ない。画像処理部16を、ASICなどのハードウェア
構成によって実現してももちろんかまわない。なお、上
述した実施形態では、なるべく発明を開示するため、局
所領域の範囲を具体的に考慮した式を挙げて説明してい
る。これらの式は、多種多様な画像データにおいて汎用
的に良好な補間画像を生成できるという優れた長所を有
する。しかし実際には、画像の画素数、表示画面上の大
きさ、プリント時の大きさなどに応じて、局所領域の範
囲を適宜に最適化(視覚的に細かい所まで見えなくても
よい状況では局所領域を一時的に拡大するなど)しても
よい。したがって、本発明は、局所領域を具体的に考慮
した式によって、狭く限定されるものではない。
In the above-described embodiment, the case where the image processing unit 16 performs the interpolation processing by software processing has been described, but the present invention is not limited to this. Of course, the image processing unit 16 may be realized by a hardware configuration such as an ASIC. Note that, in the above-described embodiment, in order to disclose the invention as much as possible, an explanation is given using an expression that specifically considers the range of the local region. These equations have an excellent advantage that a good interpolation image can be generated for a wide variety of image data in general. However, in practice, the range of the local area is appropriately optimized according to the number of pixels of the image, the size on the display screen, the size at the time of printing, and the like (in a situation where it is not necessary to visually see small parts, Local area may be temporarily enlarged). Therefore, the present invention is not narrowly limited by the equation specifically considering the local region.

【0112】また、第1および第2の実施形態では、上
述したピーク判別値Xrを用いて補間対象画素の付近にピ
ークまたはトラップが存在するか否かを判定している。
この判定法は、少ない演算量で短時間に判定できるとい
う優れた長所を有する。しかしながら、本発明は、局所
領域内にピークまたはトラップが存在するか否かを判定
する方法であれば何でもよい。例えば、補間対象画素の
周辺の第2色情報(または第1色情報)について最小値
と最大値とを求め、この最小値〜最大値の範囲から、補
間対象画素の第2色情報(または補間対象画素の近接の
第1色情報)がはみ出しているか否かを判定することに
より、ピークまたはトラップが存在するか否かを判定し
てもよい。
In the first and second embodiments, it is determined whether or not a peak or trap exists near the pixel to be interpolated using the above-described peak discrimination value Xr.
This determination method has an excellent advantage that determination can be made in a short time with a small amount of calculation. However, the present invention may be any method for determining whether a peak or trap exists in a local region. For example, a minimum value and a maximum value are obtained for the second color information (or first color information) around the interpolation target pixel, and the second color information (or interpolation) of the interpolation target pixel is determined from the range between the minimum value and the maximum value. It may be determined whether or not a peak or trap exists by determining whether or not the first color information adjacent to the target pixel) protrudes.

【0113】なお、第3の実施形態では、G色の空間1
次微分とG色以外の空間1次微分とを比較して、画像構
造の相関性を判定している。この判定法は、画像構造の
相関性を少ない演算量で短時間に判定できるという優れ
た長所を有する。しかしながら、本発明は、画像構造の
相関を判定する方法であれば何でもよい。例えば、パタ
ーンマッチングや相互相関係数を求める手法など多様な
相関判定法を使用してもよい。
In the third embodiment, the G color space 1
The correlation between image structures is determined by comparing the second derivative and the first derivative of the space other than the G color. This determination method has an excellent advantage that the correlation of the image structure can be determined in a short time with a small amount of calculation. However, the present invention may be any method that determines the correlation between image structures. For example, various correlation determination methods such as pattern matching and a method for obtaining a cross-correlation coefficient may be used.

【0114】また、第4の実施形態では、色差の判定を
行っている。この判定法は、彩度の判定に比べて少ない
演算量で短時間に判定できるという優れた長所を有す
る。しかしながら、本発明は、この判別法に限定され
ず、例えば、彩度の判定を行う方法でもかまわない。
In the fourth embodiment, the color difference is determined. This determination method has an excellent advantage that determination can be made in a short time with a small amount of calculation compared to the determination of saturation. However, the present invention is not limited to this determination method. For example, a method of determining saturation may be used.

【0115】さらに、第4の実施形態では、比較的広い
局所領域において色差判定を行っている。これは画像雑
音の影響を受けにくいという優れた長所を有する。しか
しながら、本発明は、これに限定されるものではない。
例えば、『補間対象画素の線形補間値』と『補間対象画
素の第2色情報』とから求めた色差(または彩度)に応
じて、第2情報の寄与率を変更してももちろんよい。
Further, in the fourth embodiment, the color difference is determined in a relatively wide local area. This has the advantage of being less susceptible to image noise. However, the present invention is not limited to this.
For example, the contribution ratio of the second information may be changed according to the color difference (or saturation) obtained from the “linear interpolation value of the interpolation target pixel” and the “second color information of the interpolation target pixel”.

【0116】[0116]

【発明の効果】請求項1に記載の発明では、補間対称画
素を含む局所領域について画像構造を判定し、その判定
結果に応じて『補間値決定における第2色情報の寄与
率』を変更する。この構成を用いて、ドット雑音の発生
度合いの高い画像構造に柔軟に対応して寄与率を低減す
ることが可能となる。その結果、ドット雑音の少ない良
質な補間画像を生成することが可能となる。
According to the first aspect of the present invention, an image structure is determined for a local region including an interpolation symmetric pixel, and "the contribution ratio of the second color information in determining the interpolation value" is changed according to the determination result. . By using this configuration, it is possible to flexibly cope with an image structure in which the degree of occurrence of dot noise is high and to reduce the contribution ratio. As a result, it is possible to generate a high-quality interpolation image with little dot noise.

【0117】請求項2に記載の発明では、局所領域内に
ピークおよびトラップが存在しない場合、第2色情報の
寄与率を低減する。その結果、ドット雑音を発生するお
それが高く、かつディテール増強にさほど益しない箇所
において寄与率が低減され、ドット雑音を低減すること
が可能となる。
According to the second aspect of the invention, when there is no peak or trap in the local area, the contribution of the second color information is reduced. As a result, the contribution rate is reduced in a place where dot noise is highly likely to be generated and does not significantly contribute to the enhancement of the detail, and the dot noise can be reduced.

【0118】請求項3に記載の発明では、『第1色情報
の画像構造』と『第2色情報の画像構造』との相関が小
さい場合に第2色情報の寄与率を低減する。したがっ
て、補間画像に第2色情報の相異なる画像構造が紛れ込
む機会が少なくなり、ドット雑音を確実に低減すること
が可能となる。
According to the third aspect of the invention, when the correlation between the "image structure of the first color information" and the "image structure of the second color information" is small, the contribution ratio of the second color information is reduced. Therefore, the chance that different image structures of the second color information are mixed in the interpolated image is reduced, and the dot noise can be reliably reduced.

【0119】請求項4に記載の発明では、方向類似性の
判別結果を用いて、補間方向を制御する。したがって、
原画像の画像構造(例えば縦縞や横縞など)を十分に維
持することが可能となる。
According to the fourth aspect of the present invention, the direction of interpolation is controlled using the result of determination of the direction similarity. Therefore,
It is possible to sufficiently maintain the image structure (for example, vertical stripes and horizontal stripes) of the original image.

【0120】請求項5に記載の発明では、補間方向につ
いて、第2色情報の寄与率を低減するか否かの判定を実
行する。したがって、補間方向において第2色情報を加
味するか否かの現実的な判定が可能となる。また、全方
位について判定を行う必要がなく、判定処理の演算量を
効率的に削減することが可能となる。
In the invention according to claim 5, it is determined whether or not the contribution ratio of the second color information is reduced in the interpolation direction. Therefore, it is possible to determine realistically whether to add the second color information in the interpolation direction. Further, it is not necessary to perform determination in all directions, and the amount of calculation in the determination process can be efficiently reduced.

【0121】請求項6に記載の発明では、彩度または色
差が大きい場合に第2色情報の寄与率を低減する。した
がって、色成分比の格差に基づく誤差が補間画像に紛れ
込むおそれが少なくなり、ドット雑音を低減することが
可能となる。
According to the sixth aspect of the invention, when the saturation or the color difference is large, the contribution of the second color information is reduced. Therefore, there is less possibility that an error based on the difference in the color component ratio will be mixed into the interpolated image, and it is possible to reduce dot noise.

【0122】請求項7に記載の発明では、第2情報の寄
与率を実質ゼロに低減するので、ドット雑音の発生を確
実に阻止することが可能となる。
According to the seventh aspect of the present invention, since the contribution ratio of the second information is reduced to substantially zero, it is possible to reliably prevent the generation of dot noise.

【0123】請求項8に記載の発明では、第2色情報の
空間1次微分を第1情報の補間画像に加味することによ
って、補間画像のディテールを補う。したがって、空間
2次微分(ラプラシアン)を使用する従来例とは異な
り、補間処理に使用する周辺画素を非対称形に選ぶこと
が可能となる。このような非対称形により周辺画素が色
境界やエッジをまたぐ確率が低くなり、補間画像に誤差
が混入するおそれが少なくなる。その結果、ドット雑音
を低減し、良質な補間画像を生成することが可能とな
る。
According to the eighth aspect of the present invention, details of the interpolated image are supplemented by adding the spatial first derivative of the second color information to the interpolated image of the first information. Therefore, unlike the conventional example using the spatial second derivative (Laplacian), it becomes possible to select the peripheral pixels used for the interpolation processing in an asymmetrical manner. Such an asymmetric shape reduces the probability that peripheral pixels cross color boundaries and edges, and reduces the possibility that errors will be mixed in the interpolated image. As a result, it is possible to reduce dot noise and generate a high-quality interpolated image.

【0124】請求項9に記載の発明では、類似性の高い
所定方向について非対称の補間演算を実行する。したが
って、非対称の補間演算が色境界やエッジをまたいで行
われるおそれが少なく、ドット雑音の少ない良質な補間
画像を生成することが可能となる。
According to the ninth aspect of the present invention, an asymmetric interpolation operation is performed in a predetermined direction having a high similarity. Therefore, there is little possibility that an asymmetric interpolation operation is performed across color boundaries or edges, and a high-quality interpolated image with little dot noise can be generated.

【0125】請求項10に記載の発明では、類似性判定
に応じて加重比率を調整する。この構成を用いて、類似
性の低い所定方向について加重比率を低減することが可
能となる。その結果、補間画像に色境界やエッジをまた
いで誤差が紛れ込むおそれが軽減し、ドット雑音の少な
い良質な補間画像を生成することが可能となる。
According to the tenth aspect, the weight ratio is adjusted according to the similarity determination. With this configuration, it is possible to reduce the weighting ratio in a predetermined direction with low similarity. As a result, it is possible to reduce a possibility that an error is mixed in the interpolated image over a color boundary or an edge, and to generate a high-quality interpolated image with little dot noise.

【0126】請求項11に記載の記録媒体を使用するこ
とにより、コンピュータを、請求項1ないし請求項10
のいずれか1項に記載の画像処理装置として機能させる
ことが可能となる。
By using the recording medium according to the eleventh aspect, a computer can be used.
It is possible to function as the image processing device according to any one of the above.

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

【図1】電子カメラ11の概略構成を示す図である。FIG. 1 is a diagram showing a schematic configuration of an electronic camera 11;

【図2】画像処理部16による色補間処理の概略を説明
する図である。
FIG. 2 is a diagram illustrating an outline of a color interpolation process performed by an image processing unit 16;

【図3】第1の実施形態におけるG補間処理ルーチンを
示す図である。
FIG. 3 is a diagram illustrating a G interpolation processing routine according to the first embodiment.

【図4】第1の実施形態の効果を比較説明するための画
面拡大写真(ディスプレー上の中間調画像にディザをか
けて二値化したもの)である。
FIG. 4 is an enlarged screen photograph (a binarized image obtained by dithering a halftone image on a display) for comparatively explaining the effect of the first embodiment.

【図5】第2の実施形態におけるG補間処理ルーチンを
示す図である。
FIG. 5 is a diagram illustrating a G interpolation processing routine according to the second embodiment.

【図6】メンバーシップ関数b(Xr)の一例を示す図であ
る。
FIG. 6 is a diagram illustrating an example of a membership function b (Xr).

【図7】第3の実施形態におけるG補間処理ルーチンを
示す図である。
FIG. 7 is a diagram illustrating a G interpolation processing routine according to a third embodiment.

【図8】第4の実施形態におけるG補間処理ルーチンを
示す図である。
FIG. 8 is a diagram illustrating a G interpolation processing routine according to a fourth embodiment.

【図9】第5の実施形態におけるG補間処理ルーチンを
示す図である。
FIG. 9 is a diagram illustrating a G interpolation processing routine according to a fifth embodiment.

【図10】第6の実施形態におけるG補間処理ルーチン
を示す図である。
FIG. 10 is a diagram illustrating a G interpolation processing routine according to a sixth embodiment.

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

11 電子カメラ 12 撮影レンズ 13 撮像素子 14 信号処理部 15 A/D変換部 16 画像処理部 Reference Signs List 11 electronic camera 12 photographing lens 13 image sensor 14 signal processing unit 15 A / D conversion unit 16 image processing unit

───────────────────────────────────────────────────── フロントページの続き Fターム(参考) 5B057 BA02 CA01 CB01 CE02 CE14 CE17 5C077 MP07 MP08 NN08 PP02 PP32 PP34 PP37 PP47 PP68 PQ08 PQ18 RR19 TT09 5C079 HB01 HB06 LA02 LA28 MA11 NA02  ──────────────────────────────────────────────────続 き Continued on the front page F term (reference) 5B057 BA02 CA01 CB01 CE02 CE14 CE17 5C077 MP07 MP08 NN08 PP02 PP32 PP34 PP37 PP47 PP68 PQ08 PQ18 RR19 TT09 5C079 HB01 HB06 LA02 LA28 MA11 NA02

Claims (11)

【特許請求の範囲】[Claims] 【請求項1】 第1色情報および第2色情報を少なくと
も含む画像データについて、第1色情報の補間処理を行
う画像処理装置において、 補間対象画素の周辺の第1色情報および/または第2色
情報に応じて、第1色情報の補間値を決定する補間手段
と、 前記補間対象画素を含む局所領域について画像構造を判
定し、その判定結果に応じて、前記補間対象画素の補間
値決定における前記第2色情報の寄与率を変更する構造
判定手段とを備えたことを特徴とする画像処理装置。
An image processing apparatus for performing an interpolation process of first color information on image data including at least first color information and second color information, the first color information and / or the second color information around an interpolation target pixel. Interpolating means for determining an interpolation value of the first color information according to the color information; determining an image structure for a local region including the interpolation target pixel; determining an interpolation value of the interpolation target pixel according to the determination result And a structure determining unit for changing a contribution ratio of the second color information.
【請求項2】 請求項1に記載の画像処理装置におい
て、 前記構造判定手段は、前記補間対象画素を含む局所領域
内にピークおよびトラップが存在しない場合に、前記補
間対象画素の補間値決定における前記第2色情報の寄与
率を低減する手段であることを特徴とする画像処理装
置。
2. The image processing apparatus according to claim 1, wherein the structure determining unit determines the interpolation value of the interpolation target pixel when a peak and a trap do not exist in a local area including the interpolation target pixel. An image processing apparatus, characterized in that it is means for reducing the contribution ratio of the second color information.
【請求項3】 請求項1に記載の画像処理装置におい
て、 前記構造判定手段は、前記補間対象画素を含む局所領域
について画像構造を判定し、第1色情報の画像構造と第
2色情報の画像構造との相関が小さいと判定した場合、
前記補間対象画素の補間値決定における前記第2色情報
の寄与率を低減する手段であることを特徴とする画像処
理装置。
3. The image processing apparatus according to claim 1, wherein the structure determining unit determines an image structure of a local region including the interpolation target pixel, and determines an image structure of the first color information and a second color information. If it is determined that the correlation with the image structure is small,
An image processing apparatus, comprising: means for reducing a contribution rate of the second color information in determining an interpolation value of the interpolation target pixel.
【請求項4】 請求項1ないし請求項3のいずれか1項
に記載の画像処理装置において、 前記補間対象画素を含む局所領域において方向ごとの類
似性を判定する方向判定手段を備え、 前記補間手段は、前記方向判定手段により判定された
『類似性の高い方向』に位置する色情報の寄与率を高め
て、補間値を算出することを特徴とする画像処理装置。
4. The image processing apparatus according to claim 1, further comprising: a direction determination unit configured to determine a similarity for each direction in a local region including the interpolation target pixel; The image processing apparatus calculates the interpolation value by increasing the contribution ratio of the color information positioned in the “high similarity direction” determined by the direction determination unit.
【請求項5】 請求項4に記載の画像処理装置におい
て、 前記構造判定手段は、前記方向判定手段により判定され
た『類似性の高い方向』に関して画像構造を判定するこ
とを特徴とする画像処理装置。
5. The image processing apparatus according to claim 4, wherein the structure determination unit determines an image structure with respect to the “high similarity direction” determined by the direction determination unit. apparatus.
【請求項6】 第1色情報および第2色情報を少なくと
も含む画像データについて、第1色情報の補間処理を行
う画像処理装置において、 補間対象画素の周辺の第1色情報および/または第2色
情報に応じて第1色情報の補間値を決定する補間手段
と、 前記補間対象画素を含む局所領域について彩度または色
差を判定し、彩度または色差が大きいと判定した場合、
前記補間対象画素の補間値決定における前記第2色情報
の寄与率を低減する色判定手段とを備えたことを特徴と
する画像処理装置。
6. An image processing apparatus for performing an interpolation process of first color information on image data including at least first color information and second color information, wherein the first color information and / or the second color information around an interpolation target pixel are provided. An interpolation means for determining an interpolation value of the first color information according to the color information; and determining a saturation or a color difference for a local area including the interpolation target pixel, and determining that the saturation or the color difference is large.
An image processing apparatus comprising: a color determination unit configured to reduce a contribution ratio of the second color information in determining an interpolation value of the interpolation target pixel.
【請求項7】 請求項1ないし請求項6のいずれか1項
に記載の画像処理装置において、 前記第2色情報の寄与率は、低減するに際して実質ゼロ
に設定されることを特徴とする画像処理装置。
7. The image processing apparatus according to claim 1, wherein the contribution rate of the second color information is set to substantially zero when the second color information is reduced. Processing equipment.
【請求項8】 第1色情報および第2色情報を少なくと
も含む画像データについて、第1色情報の補間処理を行
う画像処理装置において、 補間対象画素(下記Y(0)の画素位置)を通る画像上の所
定方向に、 ・第1色情報X(-1) ・第2色情報Y(0) ・第1色情報X(+1) ・第2色情報Y(+2) が並ぶ画素配列に対して、前記補間対象画素の第1色情
報X(0)を、 X(0)=(1-a1)・X(-1)+a1・X(+1)+a2・Y(0) -a2・Y(+2) (ただし、a1,a2は予め定められた比例係数)によって
決定する非対称補間手段を備えたことを特徴とする画像
処理装置。
8. An image processing apparatus for performing an interpolation process on first color information for image data including at least first color information and second color information, the image data passing through an interpolation target pixel (pixel position of Y (0) below). A pixel array in which a first color information X (-1), a second color information Y (0), a first color information X (+1), and a second color information Y (+2) are arranged in a predetermined direction on the image. , The first color information X (0) of the pixel to be interpolated is expressed as X (0) = (1-a1). -a2 · Y (+2) (where a1 and a2 are predetermined proportionality coefficients).
【請求項9】 請求項8に記載の画像処理装置におい
て、 前記補間対象画素を含む局所領域において、前記補間対
象画素を起点とする複数の所定方向について類似性を判
定する方向判定手段を備え、 前記非対称補間手段は、前記方向判定手段により類似性
が高いと判定された所定方向を選んで、前記第1色情報
X(0)の算出を行うことを特徴とする画像処理装置。
9. The image processing apparatus according to claim 8, further comprising: a direction determining unit that determines similarity in a plurality of predetermined directions starting from the interpolation target pixel in a local region including the interpolation target pixel, The asymmetric interpolation means selects a predetermined direction determined to have a high similarity by the direction determination means, and selects the first color information.
An image processing apparatus for calculating X (0).
【請求項10】 請求項8に記載の画像処理装置におい
て、 前記補間対象画素を含む局所領域において、前記補間対
象画素を起点とする複数の所定方向について類似性を判
定する方向判定手段を備え、 前記非対称補間手段は、前記複数の所定方向ごとに算出
した第1色情報X(0)を、前記方向判定手段で判定した類
似性に応じた加重比率で加重合成することを特徴とする
画像処理装置。
10. The image processing apparatus according to claim 8, further comprising: a direction determining unit that determines similarity in a plurality of predetermined directions starting from the interpolation target pixel in a local region including the interpolation target pixel, The image processing, wherein the asymmetric interpolation means weights and synthesizes the first color information X (0) calculated for each of the plurality of predetermined directions at a weight ratio according to the similarity determined by the direction determination means. apparatus.
【請求項11】 コンピュータを、請求項1ないし請求
項10のいずれか1項に記載の画像処理装置として機能
させるための画像処理プログラムを記録した機械読み取
り可能な記録媒体。
11. A machine-readable recording medium in which an image processing program for causing a computer to function as the image processing apparatus according to claim 1 is recorded.
JP2000154771A 2000-05-25 2000-05-25 Image processor and recording medium with image processing program recorded thereon Pending JP2001338285A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000154771A JP2001338285A (en) 2000-05-25 2000-05-25 Image processor and recording medium with image processing program recorded thereon

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000154771A JP2001338285A (en) 2000-05-25 2000-05-25 Image processor and recording medium with image processing program recorded thereon

Publications (1)

Publication Number Publication Date
JP2001338285A true JP2001338285A (en) 2001-12-07

Family

ID=18659815

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000154771A Pending JP2001338285A (en) 2000-05-25 2000-05-25 Image processor and recording medium with image processing program recorded thereon

Country Status (1)

Country Link
JP (1) JP2001338285A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006135919A (en) * 2004-11-09 2006-05-25 Eastman Kodak Co Method and program for interpolating color imaged image data
US7489822B2 (en) 2004-03-31 2009-02-10 Sharp Kabushiki Kaisha 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

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7489822B2 (en) 2004-03-31 2009-02-10 Sharp Kabushiki Kaisha 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
JP2006135919A (en) * 2004-11-09 2006-05-25 Eastman Kodak Co Method and program for interpolating color imaged image data

Similar Documents

Publication Publication Date Title
JP5260635B2 (en) Noise-reduced color image using panchromatic image
US7986352B2 (en) Image generation system including a plurality of light receiving elements and for correcting image data using a spatial high frequency component, image generation method for correcting image data using a spatial high frequency component, and computer-readable recording medium having a program for performing the same
CN100380915C (en) Image processing apparatus and image processing method as well as computer program
US7016549B1 (en) Image processing method for direction dependent low pass filtering
US6934056B2 (en) Noise cleaning and interpolating sparsely populated color digital image using a variable noise cleaning kernel
JP5156022B2 (en) Noise reduction for panchromatic and color images
US7373020B2 (en) Image processing apparatus and image processing program
US8525904B2 (en) Image processing device, image processing method, and capturing device
US20080062409A1 (en) Image Processing Device for Detecting Chromatic Difference of Magnification from Raw Data, Image Processing Program, and Electronic Camera
US8284271B2 (en) Chroma noise reduction for cameras
US8184905B2 (en) Apparatus for color interpolation using adjustable threshold
KR20040066051A (en) Weighted gradient based and color corrected interpolation
US7982787B2 (en) Image apparatus and method and program for producing interpolation signal
WO2005112470A1 (en) Image processing device and image processing program
US8238685B2 (en) Image noise reduction method and image processing apparatus using the same
JP4066803B2 (en) Image processing apparatus, image processing program, image processing method, and electronic camera
JP4321064B2 (en) Image processing apparatus and image processing program
JP7014158B2 (en) Image processing equipment, image processing method, and program
JPH0630308A (en) Picture data processing unit
JP4369030B2 (en) Image correction method and apparatus, and computer-readable recording medium storing image correction program
JP2001338285A (en) Image processor and recording medium with image processing program recorded thereon
JP2003134523A (en) Image pickup apparatus and method
JP3914810B2 (en) Imaging apparatus, imaging method, and program thereof
JPH1013845A (en) Picture processor
JP3965556B2 (en) Image processing apparatus and method, recording medium, and program