JPH10200902A - Image processor - Google Patents

Image processor

Info

Publication number
JPH10200902A
JPH10200902A JP9001377A JP137797A JPH10200902A JP H10200902 A JPH10200902 A JP H10200902A JP 9001377 A JP9001377 A JP 9001377A JP 137797 A JP137797 A JP 137797A JP H10200902 A JPH10200902 A JP H10200902A
Authority
JP
Japan
Prior art keywords
image
template
unit
neighborhood
approximation
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP9001377A
Other languages
Japanese (ja)
Other versions
JP3806477B2 (en
Inventor
Taketo Tsukioka
健人 月岡
Tateo Osawa
健郎 大澤
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.)
Olympus Corp
Original Assignee
Olympus Optical Co Ltd
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 Olympus Optical Co Ltd filed Critical Olympus Optical Co Ltd
Priority to JP00137797A priority Critical patent/JP3806477B2/en
Publication of JPH10200902A publication Critical patent/JPH10200902A/en
Application granted granted Critical
Publication of JP3806477B2 publication Critical patent/JP3806477B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Transforming Light Signals Into Electric Signals (AREA)
  • Color Television Image Signal Generators (AREA)

Abstract

PROBLEM TO BE SOLVED: To obtain a high definition image that approximates to a three-plate system and also to perform input image processing of optional color filter arrangement by selecting a template that resembles a neighborhood image most and creating a proximity image. SOLUTION: A proximity reading part 109 reads an image signal that corresponding to a prescribed rectangular area with each pixel position on a CCD as a center from an input image buffer 108 and transfers it to a least square approximated part 112, and the part 112 processes it. A band and color information recovering part 114 obtains a proximity correction approximated image that corrects the absence of a color component of a proximity image. When these processing about entire pixel positions is finished, plural correction pixel values about each pixel are acquired, and the correction pixel values are undergone weighted balancing through processing in a three-plate image adding part 115 and stored in an output image buffer 116. Thereby, a three color image that corrects the absence of color components and the degradation of an optical system of an electronic camera 100 is acquired.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、各画素位置に応じ
て少なくとも1つ以上の分光特性に関する情報が欠落す
る画像信号から元の画像信号を回復処理する画像処理装
置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an image processing apparatus for restoring an original image signal from an image signal in which at least one piece of information relating to spectral characteristics is missing in accordance with each pixel position.

【0002】[0002]

【従来の技術】電子撮像系を用いた電子スチルカメラな
どの撮像装置において、色フィルタをモザイク状に受光
面に配した撮像素子を用いる単板式や、一枚はG(緑)
フィルタのみ、もう一枚はR(赤)とB(青)のモザイ
クフィルタを配した2枚のCCDで撮像を行う二板式の
撮像系は、分光系と三枚の撮像素子を用いる三板方式の
撮像系と比較して安価に構成できるという利点をもつ。
ただし、これらの方式では画像の各画素位置において色
情報が少なくとも一つ以上欠落するため、画像処理装置
において、ある画素の欠落している色情報を他の画素の
欠落していない色情報を用いて推定する補間処理が必要
となる。
2. Description of the Related Art In an image pickup apparatus such as an electronic still camera using an electronic image pickup system, a single-plate type using an image pickup device in which color filters are arranged in a mosaic-like light-receiving surface, or G (green) for one sheet
The two-panel imaging system that performs imaging with two CCDs provided with only mosaic filters of R (red) and B (blue) and another mosaic filter is a three-panel imaging system using a spectral system and three imaging elements. It has the advantage that it can be constructed at a lower cost than an imaging system.
However, in these methods, at least one or more pieces of color information are lost at each pixel position of an image, and therefore, in the image processing apparatus, color information that is missing for one pixel is used as color information that is not missing for another pixel. It is necessary to perform interpolation processing for estimating.

【0003】しかし、単板方式や二板方式においては色
フィルタ配置に特有のモアレが発生し、またこのモアレ
の生じ方は色フィルタごとに異なる。このため、単純な
線形補間処理ではエッジ部の凹凸、角度変化、色付きな
どのアーティファクトが生じる。従来、これらのアーテ
ィファクトを軽減するために様々な補間手法が提案され
てきたが、なかでも効果のある補間手法として、 1.エッジ部の凹凸アーティファクトを軽減するため
に、局所的な画像の幾何学的構造を推定し、その構造に
応じた補間を行う方法と、 2.エッジ部の色付きを軽減するために、簡単な補間法
で広帯域の輝度信号を生成できる色フィルタ配置を持っ
た撮像素子を用い、色信号は輝度信号と同様に変化する
ものと仮定して色信号の補間を行う方法と、の二つが上
げられる。
[0003] However, in the single-plate system or the two-plate system, moiré peculiar to the arrangement of color filters occurs, and the manner in which the moiré occurs differs for each color filter. Therefore, in the simple linear interpolation processing, artifacts such as unevenness of an edge portion, a change in angle, and coloring are generated. Conventionally, various interpolation techniques have been proposed to reduce these artifacts. Among them, the most effective interpolation techniques include: 1. A method of estimating a local geometric structure of an image and performing interpolation according to the structure, in order to reduce unevenness artifacts at the edge portion. To reduce the coloring of edges, use an image sensor with a color filter arrangement that can generate a broadband luminance signal by a simple interpolation method, and assume that the color signal changes in the same way as the luminance signal. And a method of performing the interpolation of

【0004】以下に、1については特開昭61−501
423号公報、2については特開平4−502096号
公報に開示された手法を例に取りそれぞれの手法を説明
する。
In the following, 1 is described in JP-A-61-501.
Regarding JP-A No. 423 and JP-A No. 423, each of the methods will be described taking the method disclosed in Japanese Patent Application Laid-Open No. 4-502006 as an example.

【0005】特開昭61−501423号公報は、R、
G、B色フィルタ配列の撮像素子において、輝度成分に
対応するG信号の補間法を開示している。この方法で
は、G信号が欠落している画素の3×3近傍において、
その近傍があらかじめ用意した縁、筋、隅の幾何学的特
徴のうち、どれに最もよく当てはまるかを判定し、この
判定結果に基づいてそれぞれの幾何学的特徴に特化した
補間方法を選択している。
JP-A-61-501423 discloses R,
A method of interpolating a G signal corresponding to a luminance component in an image sensor having a G and B color filter array is disclosed. In this method, in the vicinity of 3 × 3 pixels where the G signal is missing,
Judge which of the geometric features of the edges, streaks, and corners the neighborhood best fits, and select an interpolation method specialized for each geometric feature based on this judgment result. ing.

【0006】また、特開平4−502096号公報は、
輝度成分が高サンプリング密度で、他の色成分が相対的
に低サンプリング密度で得られている画像信号におい
て、低サンプリング密度の色成分に対する補間法を開示
している。この方法では、低サンプリング密度の色成分
は高サンプリング密度の輝度成分を用いて算出される。
このため、低サンプリング密度の信号S2のサンプリン
グ位置には必ず高サンプリング密度の信号S1の標本値
が存在すると仮定する。そして、信号S2のサンプリン
グ位置における信号S1の標本値の差を所定の閾値と比
較し、閾値を下回る場合は信号S2の標本値のみを用い
た単純な線形補間を行う。
[0006] Japanese Patent Application Laid-Open No. 4-502096 discloses that
It discloses an interpolation method for a low sampling density color component in an image signal in which a luminance component is obtained at a high sampling density and other color components are obtained at a relatively low sampling density. In this method, the color components of the low sampling density are calculated using the luminance components of the high sampling density.
For this reason, it is assumed that a sample value of the high sampling density signal S1 always exists at the sampling position of the low sampling density signal S2. Then, the difference between the sample values of the signal S1 at the sampling position of the signal S2 is compared with a predetermined threshold value. If the difference is smaller than the threshold value, simple linear interpolation using only the sample values of the signal S2 is performed.

【0007】閾値を上回る場合は信号S2のサンプリン
グ位置間にエッジがあると判断し、信号S1と信号S2
がS2=aS1+bなる線形な関係にあると仮定して係
数a及びbを信号S2のサンプリング位置におけるS1
とS2の値から求める。
If it exceeds the threshold value, it is determined that there is an edge between the sampling positions of the signal S2, and the signals S1 and S2
Are assumed to have a linear relationship of S2 = aS1 + b, and the coefficients a and b are calculated as S1 at the sampling position of the signal S2.
And the value of S2.

【0008】[0008]

【発明が解決しようとする課題】上記した従来技術では
いずれも、相対的に高サンプリング密度で与えられる輝
度成分においても欠落する情報が存在するので、三板方
式で得られる輝度成分と比較して劣化した情報しか得ら
れない。また、この輝度成分に基づき算出される他の色
成分も、三板方式で得られる色成分に比較して劣化した
情報しか得られない。
In any of the above-mentioned prior arts, since there is information that is missing even in a luminance component given at a relatively high sampling density, the luminance component is deteriorated as compared with a luminance component obtained by a three-plate system. You can only get the information you have. Also, other color components calculated based on the luminance component can obtain only information that is deteriorated as compared with the color components obtained by the three-plate system.

【0009】また、上記した従来技術はいずれも任意の
色フィルタ配置の入力画像を処理する方法に関しては記
載していない。輝度成分の補間においては、あらかじめ
用意された幾何学的特徴とこれに対応する補間方法を用
意する必要があり、色フィルタ配置が変わると設計を変
更する必要がある。
Further, none of the above-mentioned prior arts describes a method for processing an input image having an arbitrary color filter arrangement. In the interpolation of the luminance component, it is necessary to prepare a geometric feature prepared in advance and an interpolation method corresponding thereto, and it is necessary to change the design when the color filter arrangement changes.

【0010】また、上記した従来技術はいずれも、ノイ
ズの影響による誤動作に対応する方法に関しては記載し
ていない。輝度成分および他の色成分を処理する場合、
一回の処理で補間を行うため、パルス性のノイズの影響
を受けやすい。特に輝度成分の処理においては3×3の
局所領域で幾何学的特徴を分類するため、ノイズによる
誤分類が発生しやすい。
Further, none of the above-mentioned prior arts describes a method for coping with a malfunction caused by the influence of noise. When processing luminance and other color components,
Since interpolation is performed in one process, it is easily affected by pulse noise. In particular, in the processing of the luminance component, since the geometric features are classified in a 3 × 3 local area, erroneous classification due to noise is likely to occur.

【0011】また、上記した従来技術はいずれも、撮像
装置の光学系により帯域制限される情報の回復に関して
は記載していない。すなわち、輝度成分および他の色の
色成分は帯域制限された範囲内で処理されており、この
帯域制限によって失われた情報を回復することができな
い。
None of the above-mentioned prior arts describes recovery of information whose band is limited by the optical system of the imaging apparatus. That is, the luminance component and the color component of another color are processed within the band-limited range, and the information lost due to the band limitation cannot be recovered.

【0012】本発明は上記した各課題に着目してなされ
たものであり、その第1の目的とするところは、三板方
式に近似する高精細な画像を得ることができ、かつ、任
意の色フィルタ配置の入力画像を処理することができる
画像処理装置を提供することにある。
The present invention has been made in view of the above-described problems, and a first object of the present invention is to obtain a high-definition image similar to a three-plate system and to obtain an arbitrary color image. An object of the present invention is to provide an image processing device that can process an input image having a filter arrangement.

【0013】また、本発明の第2の目的は、第1の目的
に加えて、画像信号のノイズによる劣化を低減できる画
像処理装置を提供することにある。
It is a second object of the present invention to provide an image processing apparatus capable of reducing deterioration of an image signal due to noise in addition to the first object.

【0014】また、本発明の第3の目的は、第1または
第2の目的に加えて、帯域制限によって失われた情報を
回復することができる画像処理装置を提供することにあ
る。
A third object of the present invention is to provide an image processing apparatus capable of recovering information lost due to band limitation in addition to the first and second objects.

【0015】[0015]

【課題を解決するための手段】上記の第1の目的を達成
するために、第1の発明は、画素の位置に応じて少なく
とも1つ以上の分光特性に関する情報が欠落する画像信
号から元の画像信号を回復処理する画像処理装置におい
て、前記情報が欠落する画像信号から、指定された画素
を包含する所定サイズの近傍画像を抽出する近傍画像抽
出手段と、この近傍画像抽出手段によって抽出された近
傍画像と同一サイズの複数の幾何学的パターンに基づく
テンプレート群を保持するテンプレート保持手段と、前
記近傍画像抽出手段によって抽出された近傍画像に含ま
れる複数の分光特性の情報と、上記テンプレート保持手
段によって保持された複数のテンプレート群との間でマ
ッチングを行なって近傍画像に最も類似する最適テンプ
レートを選択し、この最適テンプレートに基づき近傍画
像を近似する近傍近似画像を生成する近傍近似画像生成
手段と、この近傍近似画像生成手段によって生成された
近傍近似画像に基づき、前記指定された画素における欠
落する情報を復元する復元手段とを具備する。
In order to achieve the above first object, a first aspect of the present invention is to provide an image processing apparatus, comprising: an image signal which lacks information on at least one or more spectral characteristics according to a position of a pixel; In an image processing apparatus for restoring an image signal, a neighborhood image extraction unit for extracting a neighborhood image of a predetermined size including a designated pixel from an image signal in which the information is missing, and a neighborhood image extracted by the neighborhood image extraction unit A template holding unit for holding a template group based on a plurality of geometric patterns having the same size as the neighboring image; information on a plurality of spectral characteristics included in the neighboring image extracted by the neighboring image extracting unit; Performing a matching between the plurality of template groups held by, and selecting an optimal template most similar to the neighboring image, A neighborhood approximation image generating means for producing a neighborhood approximation image approximating a neighborhood image based on the optimal template, and restoring missing information in the specified pixel based on the neighborhood approximation image generated by the neighborhood approximation image generation means And a restoring means for performing the restoration.

【0016】また、第2の発明は、第1の発明におい
て、前記復元手段は、指定された画素を包含する複数の
前記近傍画像から得られる複数の前記近傍近似画像の、
前記少なくとも1つ以上の分光特性に関する情報を重み
つき平均することで復元処理を行なう。
In a second aspect based on the first aspect, the restoring means includes a plurality of the neighborhood approximate images obtained from the plurality of the neighborhood images including a designated pixel.
Restoration processing is performed by weighted averaging of information on at least one or more spectral characteristics.

【0017】また、第3の発明は、第1または第2の発
明において、前記テンプレート保持手段は、複数の幾何
学的パターンに基づく第1のテンプレート群と、この第
1のテンプレート群を撮像装置の光学系の帯域制限特性
に応じて劣化させた第2のテンプレート群とを有し、前
記近傍近似画像生成手段は、前記第2のテンプレート群
から前記近傍画像に類似する最適テンプレートを選択
し、これに対応する前記第1のテンプレート群に基づき
帯域制限前の近傍近似画像を生成する。
In a third aspect based on the first or second aspect, the template holding means includes: a first template group based on a plurality of geometric patterns; and an imaging device for capturing the first template group. A second template group degraded in accordance with the band limiting characteristics of the optical system of the above, wherein the neighborhood approximate image generation means selects an optimal template similar to the neighborhood image from the second template group, A neighborhood approximation image before band limitation is generated based on the first template group corresponding to this.

【0018】すなわち、第1の発明は、画素の位置に応
じて少なくとも1つ以上の分光特性に関する情報が欠落
する画像信号から元の画像信号を回復処理するにあたっ
て、まず、前記情報が欠落する画像信号から指定された
画素を包含する所定サイズの近傍画像を抽出する。そし
て、抽出された近傍画像と同一サイズの複数の幾何学的
パターンに基づくテンプレート群をテンプレート保持手
段に保持しておく。次に、前記抽出された近傍画像に含
まれる複数の分光特性の情報と、上記テンプレート保持
手段によって保持された複数のテンプレート群との間で
マッチングを行なって近傍画像に最も類似する最適テン
プレートを選択し、この最適テンプレートに基づき近傍
画像を近似する近傍近似画像を生成する。そして、生成
された近傍近似画像に基づき、前記指定された画素にお
ける欠落する情報を復元するようにする。
That is, in the first invention, in recovering an original image signal from an image signal in which at least one piece of information relating to spectral characteristics is missing in accordance with the position of a pixel, first, the image in which the information is missing is used. A neighborhood image of a predetermined size including a designated pixel is extracted from the signal. Then, a template group based on a plurality of geometric patterns having the same size as the extracted neighboring image is held in the template holding unit. Next, matching is performed between a plurality of pieces of spectral characteristic information included in the extracted neighboring image and a plurality of template groups held by the template holding unit, and an optimal template most similar to the nearby image is selected. Then, a neighborhood approximate image that approximates the neighborhood image is generated based on the optimal template. Then, based on the generated neighborhood approximate image, the missing information in the specified pixel is restored.

【0019】また、第2の発明は、第1の発明におい
て、復元処理を行なう場合は、指定された画素を包含す
る複数の前記近傍画像から得られる複数の前記近傍近似
画像の、前記少なくとも1つ以上の分光特性に関する情
報を重みつき平均するようにする。
According to a second aspect, in the first aspect, when performing the restoration process, at least one of the plurality of the neighborhood approximate images obtained from the plurality of the neighborhood images including the designated pixel is provided. Information about one or more spectral characteristics is weighted and averaged.

【0020】また、第3の発明は、第1または第2の発
明において、近傍近似画像を生成する場合は、複数の幾
何学的パターンに基づく第1のテンプレート群と、この
第1のテンプレート群を撮像装置の光学系の帯域制限特
性に応じて劣化させた第2のテンプレート群とを用意
し、前記第2のテンプレート群から前記近傍画像に類似
する最適テンプレートを選択し、これに対応する前記第
1のテンプレート群に基づき帯域制限前の近傍近似画像
を生成するようにする。
According to a third aspect of the present invention, in the first or second aspect of the present invention, when generating a neighborhood approximation image, the first template group based on a plurality of geometric patterns and the first template group And a second template group that is degraded according to the band limiting characteristic of the optical system of the imaging apparatus, and an optimal template similar to the neighboring image is selected from the second template group, and the corresponding template is selected. A neighborhood approximation image before band limitation is generated based on the first template group.

【0021】[0021]

【発明の実施の形態】以下、図面を参照して本発明の実
施形態を詳細に説明する。まず、本発明の第1実施形態
を説明する。
Embodiments of the present invention will be described below in detail with reference to the drawings. First, a first embodiment of the present invention will be described.

【0022】図1は本実施形態が適用される画像処理シ
ステムの構成を示す図であり、図2は図1の最小自乗近
似部112の構成及びその周辺回路を示す図であり、図
3は色成分マスクに関する説明図である。
FIG. 1 is a diagram showing the configuration of an image processing system to which the present embodiment is applied, FIG. 2 is a diagram showing the configuration of the least squares approximation unit 112 of FIG. 1 and its peripheral circuits, and FIG. FIG. 3 is an explanatory diagram related to a color component mask.

【0023】本実施形態の画像処理システムは図1に示
すように、電子カメラ100とこの電子カメラ100に
接続された画像処理装置101とから構成される。電子
カメラ100は光学系としてのレンズ102、及び光学
的に帯域制限を行うための水晶フィルタ103、撮像素
子としての単板RGBランダム配列CCD104を具備
し、単板RGBランダム配列CCD104の出力はA/
D変換部105を経て画像バッファ107に接続されて
いる。電子カメラ100にはさらに単板RGBランダム
配列CCD104のRGBフィルタ配列を記憶したフィ
ルタ配置情報保持ROM106が設けられている。
As shown in FIG. 1, the image processing system of this embodiment includes an electronic camera 100 and an image processing apparatus 101 connected to the electronic camera 100. The electronic camera 100 includes a lens 102 as an optical system, a crystal filter 103 for optically band limiting, and a single-chip RGB random array CCD 104 as an image sensor. The output of the single-chip RGB random array CCD 104 is A / A.
It is connected to the image buffer 107 via the D conversion unit 105. The electronic camera 100 is further provided with a filter arrangement information holding ROM 106 storing an RGB filter arrangement of the single-chip RGB random arrangement CCD 104.

【0024】画像処理装置101は上記した画像バッフ
ァ107の出力に接続された入力画像バッファ108
と、近傍読み出し部109と、劣化前テンプレート保持
ROM111a及び劣化後テンプレート保持ROM11
1bを具備するテンプレート保持ROM111と、最小
自乗近似部112と、帯域・色情報復元部114と、三
板画像加算部115と、出力画像バッファ116とを具
備している。
The image processing apparatus 101 includes an input image buffer 108 connected to the output of the image buffer 107 described above.
, The neighborhood reading unit 109, the pre-deterioration template holding ROM 111a and the post-deterioration template holding ROM
1b, a template holding ROM 111, a least square approximation unit 112, a band / color information restoring unit 114, a three-plate image adding unit 115, and an output image buffer 116.

【0025】図2は最小自乗近似部112の構成とその
周辺回路を示す図である。図2に示すように、最小自乗
近似部112は色成分マスク生成部112aと、最小自
乗係数算出部112bと、近似誤差累積部112cと、
近似係数保持バッファ112dと、テンプレート決定部
112eとを具備する。最小自乗近似部112はさらに
近傍読み出し部109に接続された近傍画像入力端子1
12rと、フィルタ配置情報保持ROM106に接続さ
れたフィルタ情報入力端子112pと、劣化後テンプレ
ート保持ROM111bに接続されたテンプレート入力
端子112qと、帯域・色情報復元部114に接続され
た近似パラメータ出力端子112sとを有する。
FIG. 2 is a diagram showing the configuration of the least squares approximation unit 112 and its peripheral circuits. As shown in FIG. 2, the least square approximation unit 112 includes a color component mask generation unit 112a, a least square coefficient calculation unit 112b, an approximation error accumulation unit 112c,
An approximate coefficient holding buffer 112d and a template determining unit 112e are provided. The least squares approximation unit 112 further includes a neighborhood image input terminal 1 connected to the neighborhood read unit 109.
12r, a filter information input terminal 112p connected to the filter arrangement information holding ROM 106, a template input terminal 112q connected to the post-deterioration template holding ROM 111b, and an approximate parameter output terminal 112s connected to the band / color information restoring unit 114. And

【0026】図1に示すように、電子カメラ100は2
本の線で画像処理装置101に接続されているが、この
うち画像バッファ107の出力は入力画像バッファ10
8、近傍読み出し部109を経て最小自乗近似部112
に接続されている。
As shown in FIG. 1, the electronic camera 100
The lines are connected to the image processing apparatus 101, of which the output of the image buffer 107 is
8. Least squares approximation unit 112 via neighborhood read unit 109
It is connected to the.

【0027】一方、フィルタ配置情報保持ROM106
は図2に示すようにフィルタ情報入力端子112p経由
で最小自乗近似部112内の色成分マスク生成部112
aに接続されている。最小自乗係数算出部112bはこ
の色成分マスク生成部112aのほかに、近傍画像入力
端子112rを介して近傍読み出し部109、及びテン
プレート入力端子112qを介して劣化後テンプレート
保持ROM111bからの入力を受けるべく接続され、
保持している情報を近似係数保持バッファ112d及び
近似誤差累積部112cに出力すべく接続されている。
On the other hand, the filter arrangement information holding ROM 106
Is a color component mask generation unit 112 in the least square approximation unit 112 via a filter information input terminal 112p as shown in FIG.
a. The least square coefficient calculating unit 112b receives the input from the neighborhood reading unit 109 via the nearby image input terminal 112r and the deteriorated template holding ROM 111b via the template input terminal 112q in addition to the color component mask generating unit 112a. Connected
It is connected to output the held information to the approximate coefficient holding buffer 112d and the approximate error accumulating unit 112c.

【0028】近似係数保持バッファ112d及び近似誤
差累積部112cはともにテンプレート決定部112e
に接続され、テンプレート決定部112eは決定した内
容を近似パラメータ出力端子112sを通じて帯域・色
情報復元部114に出力すべく接続されている。
The approximation coefficient holding buffer 112d and the approximation error accumulating unit 112c are both a template determining unit 112e.
And the template determining unit 112e is connected to output the determined content to the band / color information restoring unit 114 through the approximate parameter output terminal 112s.

【0029】図1に示すように帯域・色情報復元部11
4は最小自乗近似部112のほかに劣化前テンプレート
保持ROM111aからの入力を受けるべく接続され、
復元結果を三板画像加算部115経由で出力画像バッフ
ァ116に出力すべく接続されている。劣化前テンプレ
ート保持ROM111aと劣化後テンプレート保持RO
M111bはともにテンプレート保持ROM111の一
部である。
As shown in FIG. 1, the band / color information restoring unit 11
4 is connected to receive an input from the pre-deterioration template holding ROM 111a in addition to the least square approximation unit 112,
It is connected to output the restoration result to the output image buffer 116 via the three-plate image adding unit 115. Template holding ROM 111a before deterioration and template holding RO after deterioration
M111b is a part of the template holding ROM 111.

【0030】テンプレート保持ROM111の劣化前テ
ンプレート保持ROM111aには、所定のN種の幾何
学的特徴をもつ所定サイズのグレースケール画像である
テンプレートΨi(i=0〜N−1)が保持され、劣化
後テンプレート保持ROM111bには劣化前テンプレ
ート保持ROM111aの各テンプレートが電子カメラ
100の光学系による帯域制限を受けた画像であるテン
プレートΦi(i=0〜N−1)が保持されている。
The pre-deterioration template holding ROM 111a of the template holding ROM 111 holds a template #i (i = 0 to N-1) which is a grayscale image of a predetermined size having predetermined N kinds of geometrical features, and is degraded. A template Φi (i = 0 to N−1), which is an image of each template of the pre-deterioration template holding ROM 111a whose band is limited by the optical system of the electronic camera 100, is held in the post-template holding ROM 111b.

【0031】出力画像バッファ116は、入力画像の各
画素における色の欠落と帯域劣化が補正された3色カラ
ー画像を保持するが、この画像処理装置101では各画
素につき処理中に複数の補正値が計算される。それらを
補正値の信頼性に基づいて重みづけ計算するために、出
力画像バッファ116にはさらに各画素位置における画
素値の信頼性を表す信頼値が保持されている。
The output image buffer 116 holds a three-color image in which color loss and band deterioration have been corrected in each pixel of the input image. In the image processing apparatus 101, a plurality of correction values are set for each pixel during processing. Is calculated. In order to calculate the weights based on the reliability of the correction values, the output image buffer 116 further holds a reliability value indicating the reliability of the pixel value at each pixel position.

【0032】以下に上記した構成を有する画像処理シス
テムの作用を説明する。
The operation of the image processing system having the above configuration will be described below.

【0033】まず電子カメラ100を用いて被写体が撮
像され、レンズ102、水晶フィルタ103を通じて帯
域制限を受けた光学像が単板RGBランダム配列CCD
104上に形成される。単板RGBランダム配列2次元
CCD104の出力はA/D変換部105を経て画像バ
ッファ107にそのまま転送され、CCD上での各画素
位置につき単板RGBランダム配列CCD104におけ
る色フィルタ配置により定まる一つの色成分しか持たな
い画像が保存される。
First, an object is imaged using an electronic camera 100, and an optical image whose band is limited through a lens 102 and a crystal filter 103 is converted into a single-chip RGB random array CCD.
104 is formed. The output of the single-chip RGB random array two-dimensional CCD 104 is directly transferred to the image buffer 107 via the A / D converter 105, and one color determined by the color filter arrangement in the single-chip RGB random array CCD 104 for each pixel position on the CCD. Images with only components are saved.

【0034】撮像が終了すると、画像バッファ107内
の画像は入力画像バッファ108に転送される。同時
に、電子カメラ100の撮像素子の色フィルタ配置を保
持するフィルタ配置情報保持ROM106からも色フィ
ルタ配置情報が色成分マスク生成部112aに転送され
る。さらに、出力画像バッファ116のカラー画像の画
素値、及び信頼値はすべて0に初期化される。
When the imaging is completed, the image in the image buffer 107 is transferred to the input image buffer 108. At the same time, the color filter arrangement information is also transferred to the color component mask generation unit 112a from the filter arrangement information holding ROM 106 that holds the color filter arrangement of the image sensor of the electronic camera 100. Further, the pixel values and the reliability values of the color image in the output image buffer 116 are all initialized to zero.

【0035】次に、近傍読み出し部109によりCCD
上での各画素位置(x,y)を中心とする所定の矩形領
域(例えば5×5画素)に対応する画像信号が入力画像
バッファ108内より近傍画像h(p,q) として読み出さ
れ、最小自乗近似部112の最小自乗係数算出部112
bに転送される。以下の説明において、変数の組(p,
q)は、この近傍画像の中心画素(x,y)に対する相
対座標であり、例えば近傍の大きさが5×5であれば
[−2,−1,0,1,2]×[−2,−1,0,1,
2]の範囲を動く。また、場合によって色R,G,Bを
それぞれ整数値c=0,1,2に対応させて説明する。
Next, a CCD is read by the neighborhood reading unit 109.
An image signal corresponding to a predetermined rectangular area (for example, 5 × 5 pixels) centered on each pixel position (x, y) above is read out from the input image buffer 108 as a neighboring image h (p, q). , The least squares coefficient calculation unit 112 of the least squares approximation unit 112
b. In the following description, a set of variables (p,
q) is a relative coordinate with respect to the center pixel (x, y) of the neighboring image. For example, if the size of the neighborhood is 5 × 5, [−2, −1, 0, 1, 2] × [−2] , -1,0,1,
2]. In some cases, colors R, G, and B correspond to integer values c = 0, 1, and 2, respectively.

【0036】近傍読み出し部109から最小自乗係数算
出部112bに近傍画像が転送されると、色成分マスク
生成部112aは当該近傍画像の各色成分について、当
該色成分の存在する画素位置で1、その他の位置で0を
とるマスクmask(p,q,c) (c=0,1,2)を計算す
る。図3は近傍画像におけるある特定の色フィルタ配置
に対応する色成分マスクを例示したものである。
When the neighborhood image is transferred from the neighborhood reading unit 109 to the least square coefficient calculation unit 112b, the color component mask generation unit 112a calculates 1 for each color component of the neighborhood image at the pixel position where the color component exists, and others. Calculate the mask mask (p, q, c) (c = 0,1,2) which takes 0 at the position of. FIG. 3 illustrates a color component mask corresponding to a specific color filter arrangement in a neighboring image.

【0037】一方、最小自乗係数算出部112bは、劣
化後テンプレート保持ROM111bのテンプレートΦ
i(p,q) (i=0,1,2,〜,N−1)からテンプレ
ートΦ0(p,q)を読み出し、転送された近傍画像hから色
成分マスクにより生成された各色成分マスクにより生成
された各色成分c(c=0,1,2)との近似誤差e0
(1)、e0(2)、e0(3)を各々最小化する近似
係数α0(c),β0(c)を各色成分毎に計算する。
最小自乗係数算出部112bは、計算された近似係数α
0(c)、β0(c)を近傍画像hと共に近似係数保持
バッファ112dに送り、最小化された近似誤差e0
(1)、e0(2)、e0(3)とそれに対応するテン
プレートのインデックスi=0を近似誤差累積部112
cに送る。
On the other hand, the least-squares coefficient calculating unit 112b calculates the template Φ of the deteriorated template holding ROM 111b.
The template Φ0 (p, q) is read from i (p, q) (i = 0, 1, 2,..., N−1), and each color component mask generated by the color component mask from the transferred neighboring image h is used. Approximate error e0 with each generated color component c (c = 0, 1, 2)
Approximation coefficients α0 (c) and β0 (c) for minimizing (1), e0 (2) and e0 (3) are calculated for each color component.
The least square coefficient calculation unit 112b calculates the calculated approximate coefficient α
0 (c) and β0 (c) are sent to the approximation coefficient holding buffer 112d together with the neighboring image h to minimize the approximation error e0
(1), e0 (2), e0 (3) and the corresponding template index i = 0 are used as the approximation error accumulator 112.
Send to c.

【0038】近似誤差累積部112cは、転送された近
似誤差e0(1)、e0(2)、e0(3)から累積加
算誤差e0=e0(1)+e0(2)+e0(3)を計
算し、テンプレート決定部112eに転送する。
The approximate error accumulating section 112c calculates a cumulative addition error e0 = e0 (1) + e0 (2) + e0 (3) from the transferred approximate errors e0 (1), e0 (2), and e0 (3). Is transferred to the template determining unit 112e.

【0039】テンプレート決定部112eは、累積加算
誤差eを最小とするテンプレートを決定するもので、各
テンプレートに対応して得られる累積加算誤差eの値を
比較して、その最小値を取るテンプレートを選択する。
テンプレート決定部112eには、テンプレートのイン
デックスと、そのテンプレートに対応する累積加算誤差
e、更に、このテンプレートに対応する近似係数α
(c)、β(c)を記憶する記憶部が設けられている。
そこで、テンプレートΦ0(p,q)のインデックスi=0
と、そのテンプレートに対応する累積加算誤差e0とが
テンプレート決定部112eに転送されると、これらを
記憶部に保持する。また、このとき、近似係数保持バッ
ファ112dから近似係数α0(c)、β0(c)が転
送され、この記憶部に保持される。
The template determining unit 112e determines a template that minimizes the cumulative addition error e. The template determining unit 112e compares the value of the cumulative addition error e obtained for each template, and determines a template that takes the minimum value. select.
The template determining unit 112e includes a template index, a cumulative addition error e corresponding to the template, and an approximation coefficient α corresponding to the template.
A storage unit for storing (c) and β (c) is provided.
Therefore, the index i = 0 of the template Φ0 (p, q)
When the cumulative addition error e0 corresponding to the template is transferred to the template determining unit 112e, these are stored in the storage unit. At this time, the approximation coefficients α0 (c) and β0 (c) are transferred from the approximation coefficient holding buffer 112d and are stored in the storage unit.

【0040】次に、最小自乗係数算出部112bが2番
目のテンプレートΦ1(p,q)を読み出し、上記のステップ
を繰り返すことにより、テンプレートΦ1(p,q)のインデ
ックスi=1と、このテンプレートに対応する累積加算
誤差e1が求められる。テンプレート決定部112e
は、累積加算誤差e0と累積加算誤差e1とを比較し、
誤差が小さい方の値を対応するインデックスと共に記憶
部に残す。また、近似係数についても、小さい累積加算
誤差を発生されるテンプレートの近似係数が記憶部に保
持される。以降は、3番目のテンプレートΦ2(p,q)、4
番目のテンプレートΦ3(p,q)、…と順番に読み出して
は、累積加算誤差e2、e3…を求め、逐次記憶部に記
憶された累積加算誤差の値と比較しては、より小さい方
を記憶部にインデックス及び近似係数と共に残していく
ことにより、最終的に累積加算誤差を最小とするテンプ
レートを決定する。
Next, the least-square coefficient calculator 112b reads the second template Φ1 (p, q) and repeats the above steps to obtain the index i = 1 of the template Φ1 (p, q) and this template Is obtained. Template determination unit 112e
Compares the cumulative addition error e0 with the cumulative addition error e1,
The value with the smaller error is stored in the storage unit together with the corresponding index. As for the approximation coefficient, the approximation coefficient of the template that generates a small cumulative addition error is stored in the storage unit. Thereafter, the third template Φ2 (p, q), 4
.. Are sequentially read to obtain the cumulative addition errors e2, e3,..., And are compared with the cumulative addition errors stored in the sequential storage unit. The template that minimizes the cumulative addition error is finally determined by leaving the index and the approximation coefficient in the storage unit.

【0041】最小自乗係数算出部112bで全てのテン
プレートが処理された後、テンプレート決定部112e
は誤差の最小値 min_e を与えたインデックス min_i
と近似係数 min_α(c) 、 min_β(c) 、および誤差の
最小値 min_e に反比例する近似評価値Aを帯域・色情
報復元部114に転送する。ここで、例えば近似評価値
AはA=1/(1+ min_e )により計算する。
After all the templates have been processed by the least squares coefficient calculator 112b, the template determiner 112e
Is the index min_i giving the minimum value of the error min_e
And the approximation coefficients min_α (c) and min_β (c) and the approximate evaluation value A inversely proportional to the minimum error value min_e are transferred to the band / color information restoration unit 114. Here, for example, the approximate evaluation value A is calculated by A = 1 / (1 + min_e).

【0042】帯域・色情報復元部114は、転送された
インデックス min_i に対応する劣化前のテンプレート
Ψ min_i(p,q)を劣化前テンプレート保持ROM111
aから読み出し、転送された係数 min_α(c) 、min _
β(c) を用いて式 f(p,q,c) = min_α(c) Ψ min_i(p,q)+ min_β
(c) (c=0,1,2 ) を計算することにより、近傍画像h(p,q) の色成分の欠
落を補正した近傍補正近似画像f(p,q,c) を得る。劣化
前のテンプレートを用いていることにより、f(p,q,c)
においてはさらに電子カメラ100の光学系による帯域
の劣化も補正されている。帯域・色情報復元部114
は、算出したf(p,q,c) を近似評価値Aとともに三板画
像加算部115に転送する。
The band / color information restoring unit 114 stores the undegraded template Ψ min_i (p, q) corresponding to the transferred index min_i in the undegraded template holding ROM 111.
a_min (α), min_α (c), min_α (c)
Using β (c), the equation f (p, q, c) = min_α (c) Ψmin_i (p, q) + min_β
(c) By calculating (c = 0,1,2), a neighborhood corrected approximate image f (p, q, c) in which the missing color component of the neighborhood image h (p, q) is corrected is obtained. By using the template before deterioration, f (p, q, c)
In, the deterioration of the band due to the optical system of the electronic camera 100 is also corrected. Band / color information restoration unit 114
Transfers the calculated f (p, q, c) together with the approximate evaluation value A to the three-plate image adding unit 115.

【0043】処理の途中では、出力画像バッファ116
の各画素位置にはこれまでの処理で得られた複数の補正
画素値の平均値と信頼値が保持されるようになってい
る。三板画像加算部115は、出力画像バッファ116
から当該近傍画像に対する領域の各画素の補正画素値と
信頼値をそれぞれ変数Sf(p,q,c) およびQ(p,q) に読
み出す。そして、これらと帯域・色情報復元部114か
ら転送された近傍補正近似画像f(p,q,c) 及び近似評価
値Aから、新たな補正画素値Sfnew (p,q,c) および信
頼値Qnew (p,q) を式 Qnew (p,q) =Q(p,q) +A、 Sfnew (p,q,c) =(Q(p,q) ・Sf(p,q,c) +A・f
(p,q,c))/Qnew (p,q) (c=0,1,2 ) により計算し、Sfnew (p,q,c) 及びQnew (p,q) を出
力画像バッファ116の当該近傍画像に対応する領域に
書き込む。
During the processing, the output image buffer 116
Each pixel position holds an average value and a reliability value of a plurality of corrected pixel values obtained in the processing up to this point. The three-plate image adding unit 115 includes an output image buffer 116
, The corrected pixel value and the reliability value of each pixel in the region for the neighboring image are read as variables Sf (p, q, c) and Q (p, q), respectively. Then, a new corrected pixel value Sf new (p, q, c) and a reliability are obtained from these and the neighborhood correction approximate image f (p, q, c) and the approximate evaluation value A transferred from the band / color information restoration unit 114. The value Q new (p, q) is calculated by the equation Q new (p, q) = Q (p, q) + A, Sf new (p, q, c) = (Q (p, q) · Sf (p, q, c) + A ・ f
(p, q, c)) / Q new (p, q) (c = 0,1,2), and Sf new (p, q, c) and Q new (p, q) are output image buffers The data is written in an area 116 corresponding to the neighboring image.

【0044】全ての画素位置に関してこれらの処理が終
了すると、入力画像バッファ108の画像の各画素につ
いて、当該画素を含むすべての近傍画像に対して近傍補
正近似画像が計算される。その結果、各画素に関して複
数の補正画素値が得られるが、これらの補正画素値は三
板画像加算部115における処理により重み付き平均さ
れて出力画像バッファ116に蓄積される。これによっ
て最終的に色成分の欠落と電子カメラ100の光学系に
よる劣化とが補正された3色カラー画像が得られる。
When these processes are completed for all pixel positions, for each pixel of the image in the input image buffer 108, a proximity correction approximate image is calculated for all the neighboring images including the pixel. As a result, a plurality of corrected pixel values are obtained for each pixel. These corrected pixel values are weighted and averaged by the processing in the three-plate image adding unit 115 and accumulated in the output image buffer 116. As a result, a three-color image is finally obtained in which the lack of color components and the deterioration due to the optical system of the electronic camera 100 are corrected.

【0045】なお、この実施形態の各構成要素は種々の
変形、変更が可能である。例えば、単板RGBランダム
配列CCD104は種々の色フィルタ配置のCCD、あ
るいは一枚はG、もう一枚はRとBといった二板構成の
CCDでもよい。
The components of the embodiment can be variously modified and changed. For example, the single-chip RGB random array CCD 104 may be a CCD having various color filters, or may be a two-chip CCD having one G and another R and B.

【0046】また、種々の光学系をもった電子カメラに
対応させるために次のような構成も可能である。電子カ
メラ100の側ではフィルタ配置情報保持ROM106
が色フィルタ配置情報以外に、レンズ102、水晶フィ
ルタ103等の光学系の帯域制限情報をも保持するよう
にし、画像処理装置101の側では、劣化前テンプレー
ト保持ROM111a内の各劣化前テンプレートに対
し、種々の光学系の帯域制限による劣化を想定した複数
の劣化後テンプレートを用意する。そして、最小自乗近
似部112ではフィルタ配置情報保持ROM106の光
学系情報に基づいて劣化後テンプレートを一つ選択する
ようにする。
The following configuration is also possible to correspond to an electronic camera having various optical systems. On the electronic camera 100 side, a filter arrangement information holding ROM 106
Holds the band-limiting information of the optical system such as the lens 102 and the crystal filter 103 in addition to the color filter arrangement information. On the image processing apparatus 101 side, each of the pre-deterioration templates in the pre-deterioration template holding ROM 111a is stored. A plurality of post-deterioration templates are prepared assuming deterioration due to band limitation of various optical systems. Then, the least-squares approximation unit 112 selects one degraded template based on the optical system information in the filter arrangement information holding ROM 106.

【0047】同様に、カメラの利用者により設定された
被写体に関する情報を画像処理装置101に転送し、最
小自乗近似部112がそれに応じてテンプレートのセッ
トを選択するような構成にすることも可能である。三板
画像加算部115も、各画素について得られた複数の近
似値を蓄積しておき、それらの値から多数決などで近似
値を決定する等の変更が可能である。
Similarly, it is also possible to adopt a configuration in which information about the subject set by the user of the camera is transferred to the image processing apparatus 101, and the least-square approximation unit 112 selects a template set accordingly. is there. The three-plate image addition unit 115 can also store a plurality of approximate values obtained for each pixel, and change the values by determining an approximate value by majority decision or the like.

【0048】また、電子カメラ100に水晶フィルタ1
03がなく帯域制限がなされていない場合には、テンプ
レート保持ROM111が劣化前テンプレート保持RO
M111aのみからなり、最小自乗近似部112が劣化
前テンプレート保持ROM111aに接続される構成に
する。この場合、各部分の作用は、最小自乗近似部11
2がテンプレートとしてΦiのかわりにΨiを用いる点
を除いて同一である。その結果、帯域・色情報復元部1
14では色成分の欠落は補正されるが帯域の劣化につい
てはなにもされない近傍補正近似画像が得られ、出力画
像バッファ116には入力画像バッファ108内の画像
の色成分の欠落が補正された3色カラー画像が得られ
る。
The electronic camera 100 has a crystal filter 1
03 and the band is not limited, the template holding ROM 111 stores the pre-deterioration template holding RO.
M111a alone, and the least squares approximation unit 112 is connected to the pre-deterioration template holding ROM 111a. In this case, the operation of each part is the least square approximation unit 11
2 is the same except that Ψi is used instead of Φi as a template. As a result, the band / color information restoring unit 1
In 14, a neighborhood correction approximation image is obtained in which the lack of color components is corrected but no degradation of the band is performed, and the lack of color components of the image in the input image buffer 108 is corrected in the output image buffer 116. A three-color image is obtained.

【0049】以下に本発明の第2実施形態を説明する。
図4は本発明の第2実施形態が適用される画像処理シス
テムの構成を示す図であり、図5は図4における最小自
乗近似部112の処理の流れを表すフローチャートであ
る。
Hereinafter, a second embodiment of the present invention will be described.
FIG. 4 is a diagram illustrating a configuration of an image processing system to which the second embodiment of the present invention is applied, and FIG. 5 is a flowchart illustrating a processing flow of the least squares approximation unit 112 in FIG.

【0050】図4において、本画像処理システムは電子
カメラ200と、この電子カメラ200に接続された画
像処理装置201とから構成される。電子カメラ200
は、第1実施形態と同様、光学系としてレンズ202及
び帯域制限を行うための水晶フィルタ203、撮像素子
としての単板ベイヤー配列CCD204を具備し、単板
ベイヤー配列CCD204の出力はA/D変換部205
を経て画像バッファ207に接続されている。電子カメ
ラ200内の単板ベイヤー配列CCD204の色フィル
タ配列に関する情報は、後述するようにベイヤー配列の
規則性を利用して画像処理装置201内で計算により求
められる。
Referring to FIG. 4, the image processing system includes an electronic camera 200 and an image processing device 201 connected to the electronic camera 200. Electronic camera 200
Has a lens 202 as an optical system, a crystal filter 203 for performing band limiting, and a single-chip Bayer array CCD 204 as an image sensor, as in the first embodiment. The output of the single-chip Bayer array CCD 204 is A / D converted. Part 205
Through the image buffer 207. Information on the color filter array of the single-plate Bayer array CCD 204 in the electronic camera 200 is obtained by calculation in the image processing apparatus 201 using the regularity of the Bayer array as described later.

【0051】画像処理装置201は、入力画像バッファ
208と、近傍読み出し部209と、平坦度評価部21
0と、劣化前テンプレート保持ROM211a及び劣化
後テンプレート保持ROM211bを具備するテンプレ
ート保持ROM211と、最小自乗近似部212と、色
情報復元部213と、帯域・色情報復元部214と、補
間係数計算部215と、線形演算部216と、出力画像
バッファ217とを具備する。
The image processing apparatus 201 includes an input image buffer 208, a neighborhood read section 209, and a flatness evaluation section 21.
0, a template holding ROM 211 having a pre-deterioration template holding ROM 211a and a post-deterioration template holding ROM 211b, a least square approximation unit 212, a color information restoration unit 213, a band / color information restoration unit 214, and an interpolation coefficient calculation unit 215 , A linear operation unit 216, and an output image buffer 217.

【0052】電子カメラ200内の画像バッファ207
の出力は、画像処理装置201内の入力画像バッファ2
08、近傍読み出し部209を経て平坦度評価部210
に接続されている。
Image buffer 207 in electronic camera 200
Is output from the input image buffer 2 in the image processing apparatus 201.
08, the flatness evaluation unit 210 via the neighborhood read unit 209
It is connected to the.

【0053】最小自乗近似部212は、平坦度評価部2
10およびテンプレート保持ROM211内の劣化後テ
ンプレート保持ROM211bの出力を受けるべく接続
され、かつ処理結果を色情報復元部213及び帯域・色
情報復元部214に出力すべく接続されている。帯域・
色情報復元部214はこの最小自乗近似部212のほか
に、テンプレート保持ROM211内の劣化前テンプレ
ート保持ROM211aの出力を受けるべく接続されて
いる。色情報復元部213は最小自乗近似部212のほ
かに、テンプレート保持ROM211内の劣化後テンプ
レート保持ROM211bの出力を受けるべく接続され
ている。
The least-squares approximation unit 212 includes a flatness evaluation unit 2
10 is connected to receive the output of the post-deterioration template holding ROM 211b in the template holding ROM 211, and is connected to output the processing result to the color information restoring unit 213 and the band / color information restoring unit 214. Band
The color information restoring unit 214 is connected to receive the output of the pre-deterioration template holding ROM 211a in the template holding ROM 211 in addition to the least squares approximating unit 212. The color information restoring unit 213 is connected to receive the output of the post-deterioration template holding ROM 211b in the template holding ROM 211 in addition to the least square approximation unit 212.

【0054】テンプレート保持ROM211の劣化前テ
ンプレート保持ROM211aには、第1実施形態と同
様に、N種の幾何学的特徴をもつ所定サイズのグレース
ケール画像であるテンプレートΨi(i=0〜N−1)
が保持され、劣化後テンプレート保持ROM211bに
は劣化前テンプレート保持ROM211aの各テンプレ
ートが電子カメラ200の光学系による帯域制限を受け
た画像であるテンプレートΦi(i=0〜N−1)が保
持されている。
In the pre-deterioration template holding ROM 211a of the template holding ROM 211, similarly to the first embodiment, a template #i (i = 0 to N−1) which is a grayscale image of a predetermined size having N kinds of geometric features is stored. )
And the template Φi (i = 0 to N−1), which is an image in which each template of the pre-deterioration template holding ROM 211a is subjected to the band limitation by the optical system of the electronic camera 200, is stored in the post-deterioration template holding ROM 211b. I have.

【0055】色情報復元部213及び帯域・色情報復元
部214は共に補間係数計算部215に接続されてい
る。線形演算部216は補間係数計算部215及び平坦
度評価部210の出力を受けるべく接続され、かつ復元
結果を出力画像バッファ217に出力すべく接続されて
いる。
The color information restoring section 213 and the band / color information restoring section 214 are both connected to the interpolation coefficient calculating section 215. The linear operation unit 216 is connected to receive the outputs of the interpolation coefficient calculation unit 215 and the flatness evaluation unit 210, and is connected to output the restoration result to the output image buffer 217.

【0056】以下に、上記した構成を有する画像処理シ
ステムの作用を説明する。
The operation of the image processing system having the above configuration will be described below.

【0057】第2実施形態においても第1実施形態と同
様に電子カメラ200で撮像が行われ、光学系で帯域劣
化を受け、かつ各画素位置につき一つの色成分しか持た
ない画像が画像バッファ207に保持される。撮像が終
了すると、画像バッファ207内の画像は入力画像バッ
ファ208に転送される。第1実施形態と異なり、電子
カメラ200内の撮像素子の色フィルタ配列は、電子カ
メラ200から画像処理装置201に転送される代わり
にベイヤー配列の規則性を利用して後ほど画像処理装置
201内で計算される。
In the second embodiment, similarly to the first embodiment, an image is taken by the electronic camera 200, the band is deteriorated by the optical system, and an image having only one color component at each pixel position is stored in the image buffer 207. Is held. When the imaging is completed, the image in the image buffer 207 is transferred to the input image buffer 208. Unlike the first embodiment, the color filter array of the image sensor in the electronic camera 200 uses the regularity of the Bayer array instead of being transferred from the electronic camera 200 to the image processing apparatus 201, and then uses the regularity of the Bayer array in the image processing apparatus 201 later. Is calculated.

【0058】次に、入力画像バッファ208内の画像の
各画素位置(x,y)につき、以下の処理が行われる。
Next, the following processing is performed for each pixel position (x, y) of the image in the input image buffer 208.

【0059】近傍読み出し部209により当該画素位置
(x,y)の所定の矩形領域(例えば5×5画素)が近
傍画像h(p,q) として読み出される。
A predetermined rectangular area (for example, 5 × 5 pixels) at the pixel position (x, y) is read as a nearby image h (p, q) by the nearby reading unit 209.

【0060】以下の説明において、変数の組(p,q)
は、この近傍画像の中心画素(x,y)に対する相対座
標であり、例えば近傍の大きさが5×5であれば[−
2,−1,0,1,2]×[−2,−1,0,1,2]
の範囲を動く、また、場合によって色R,G,Bをそれ
ぞれ整数値c=0,1,2に対応させて説明する。
In the following description, a set of variables (p, q)
Is a relative coordinate with respect to the center pixel (x, y) of this neighborhood image. For example, if the neighborhood size is 5 × 5, [−
2, -1,0,1,2] × [-2, -1,0,1,2]
, And the colors R, G, and B may be associated with integer values c = 0, 1, and 2, respectively.

【0061】読み出された近傍画像は、平坦度評価部2
10に送られる。平坦度評価部210では、各色成分ご
とに画素値が存在する位置に対する画素値の分散を計算
し、全ての色成分に対する分散の和が所定の閾値以上で
あれば、最小自乗近似部212に近傍画像を転送する。
また、平坦度評価部210は、この評価とは無関係に近
傍画像を線形演算部216に転送する。
The read neighboring image is sent to the flatness evaluation section 2
Sent to 10. The flatness evaluation unit 210 calculates the variance of the pixel value for the position where the pixel value exists for each color component, and if the sum of the variances for all the color components is equal to or more than a predetermined threshold value, the vicinity of the least square approximation unit 212 Transfer images.
Further, the flatness evaluation section 210 transfers the neighboring image to the linear operation section 216 irrespective of this evaluation.

【0062】最小自乗係数算出部212は、近傍画像が
転送されると図5に示すフローに従って処理を行い、第
1実施形態と同様に、近傍画像を最もよく近似する劣化
後テンプレートのインデックス min_i と近似係数 min
_α(c) 、min _β(c) (c=0,1,2)を算出す
る。
When the neighboring image is transferred, the least square coefficient calculating unit 212 performs processing according to the flow shown in FIG. 5, and similarly to the first embodiment, the index min_i of the degraded template that best approximates the neighboring image and Approximation coefficient min
_Α (c) and min_β (c) (c = 0, 1, 2) are calculated.

【0063】図5に示すフローチャートの各ステップ
(S)は以下のような処理を行なう。
Each step (S) in the flowchart shown in FIG. 5 performs the following processing.

【0064】S1:当該近傍画像の中心画素の座標
(x,y)を得、この値とベイヤー配列の規則性に基づ
いて、近傍画像内の位置(p,q)に対し色成分cの色
フィルタが存在すれば1、存在しなければ0をとる色成
分マスクを表す配列変数mask(p,q,c) を計算する。図5
中、関数rem(a,b)はaをbで割った余りを返し、関数ab
s(a)はaの絶対値を与える。また、変数Nをテンプレー
トの総数に、変数 min_iとc=0,1,2に対する配
列変数 min_α(c) 、min _β(c) の値を0に初期化す
る。配列変数h(p,q) は近傍画像の画素値で初期化され
る。テンプレート要素のインデックスを表す変数iは0
に初期化される。テンプレートの最小当てはめ誤差を表
す変数 min_e は画像処理装置201で扱うことのでき
る最大の数に初期化される。
S1: The coordinates (x, y) of the center pixel of the neighboring image are obtained, and based on this value and the regularity of the Bayer array, the color of the color component c with respect to the position (p, q) in the neighboring image is obtained. An array variable mask (p, q, c) representing a color component mask that takes 1 if a filter exists and 0 if not exists is calculated. FIG.
The function rem (a, b) returns the remainder of dividing a by b, and the function ab
s (a) gives the absolute value of a. Also, the variable N is initialized to the total number of templates, and the values of the array variables min_α (c) and min_β (c) for the variables min_i and c = 0, 1, 2 are initialized to 0. The array variable h (p, q) is initialized with the pixel values of the neighboring image. The variable i representing the index of the template element is 0
Is initialized to The variable min_e representing the minimum fitting error of the template is initialized to the maximum number that can be handled by the image processing device 201.

【0065】S2:i番目のテンプレートΦi(p,q) を
劣化後テンプレート保持ROM211bから読み出し、
配列変数Φ(p,q) に代入する。色を表す変数cと誤差を
表す変数eを0に初期化する。
S2: The i-th template Φi (p, q) is read from the degraded template holding ROM 211b,
Assign to the array variable Φ (p, q). A variable c representing a color and a variable e representing an error are initialized to zero.

【0066】S3:変数h(p,q) 、Φ(p,q) 、mask(p,
q,c) から定義される、色変数c、実数α,βの関数で
ある誤差関数err(c,α, β)を最小化するα,βを求め
る。誤差関数err(c,α, β)は、色成分cの存在する位
置において、テンプレート画像Φをゲインαとバイアス
βにより加工した画像αΦ+βと近傍画像の誤差の尺度
であり、図中において記号
S3: Variables h (p, q), Φ (p, q), mask (p, q)
α, β that minimizes an error function err (c, α, β), which is a function of a color variable c and real numbers α and β, defined from (q, c). The error function err (c, α, β) is a measure of the error between the image αΦ + β obtained by processing the template image Φ with the gain α and the bias β at the position where the color component c exists, and the neighboring image.

【数1】 (Equation 1)

【0067】は近傍画像内におけるa(p,q) の自乗和を
表す。誤差関数err(c,α, β)を最小化するα,βを求
めることは、近傍画像の各色成分を最もよく近似するよ
うにテンプレートΦのゲインαとバイアスβを調整する
ことに等しい。最小化された誤差関数の値は変数eに足
し込まれ、求められたゲインαとバイアスβは配列変数
の色cに対応する要素α(c) 、β(c) に代入される。そ
の後、色を表す変数cはインクリメントされる。
Represents the sum of squares of a (p, q) in the neighboring image. Obtaining α and β that minimizes the error function err (c, α, β) is equivalent to adjusting the gain α and bias β of the template Φ so as to best approximate each color component of the neighboring image. The value of the minimized error function is added to the variable e, and the obtained gain α and bias β are substituted into elements α (c) and β (c) corresponding to the color c of the array variable. Thereafter, the variable c representing the color is incremented.

【0068】S4:すべての色成分RGBに対する処理
S3が終了したかどうかを色を表すcが2、つまりBを
越えたかどうかで判断し、越えた場合はS5、越えない
場合は引き続きS3に分岐する。
S4: It is determined whether or not the process S3 for all the color components RGB has been completed based on whether c representing the color has exceeded 2, that is, B, and if so, branch to S5. If not, continue to S3. I do.

【0069】S5:S5に到達した時点で、変数eはi
番目の劣化テンプレート要素を近傍画像に当てはめた場
合の誤差を表している。変数 min_e は、i未満のすべ
ての劣化テンプレート要素に関する当てはめ誤差の最小
値を表している。eが min_e より小さい場合は、S6
に分岐して当てはめ誤差最小のテンプレートに関する情
報を更新する。大きい場合はS7に分岐する。
S5: Upon reaching S5, the variable e becomes i
The error when the second degradation template element is applied to the neighboring image is shown. The variable min_e represents the minimum value of the fitting error for all degraded template elements less than i. If e is smaller than min_e, S6
To update the information on the template with the minimum fitting error. If it is larger, the process branches to S7.

【0070】S6: min_e をeに、 min_i をiに、
c=0,1,2に関して min_α(c) 、 min_β(c) を
α(c) 、β(c) に更新する。
S6: min_e is set to e, min_i is set to i,
For c = 0, 1, and 2, update min_α (c) and min_β (c) to α (c) and β (c).

【0071】S7:インデックスiをインクリメントす
る。
S7: The index i is incremented.

【0072】S8:インデックスiがNに一致しなけれ
ばS2に、一致すればS9に分岐する。
S8: If the index i does not match N, branch to S2, otherwise, branch to S9.

【0073】最小自乗近似部212の出力 min_i 、mi
n _α(c) 、 min_β(c) は色情報復元部213及び帯
域・色情報復元部214に転送される。色情報復元部2
13では劣化後テンプレート保持ROM211bから、
帯域・色情報復元部214では劣化前テンプレート保持
ROM211aからそれぞれインデックス min_i に対
応するテンプレートΦ min_i(p,q)、Ψ min_i(p,q)を
読み出し、近似係数 min_α(c) 、min _β(c) を用い
て式 f(p,q,c) = min_α(c) Ψ min_i(p,q)+ min_β
(c) 、 g(p,q,c) = min_α(c) Φ min_i(p,q)+ min_β
(c) (c=0,1,2) を計算し、近傍画像h(p,q) に対して色成分の欠落と帯
域の劣化を補正した近傍補正近似画像f(p,q,c) 、およ
び色成分の欠落のみを補正した近傍補正近似画像g(p,
q,c) を得る。そして、これらを補間係数計算部215
に転送する。
Outputs min_i, mi of least squares approximation unit 212
n_α (c) and min_β (c) are transferred to the color information restoration unit 213 and the band / color information restoration unit 214. Color information restoration unit 2
In step 13, from the template holding ROM 211b after deterioration,
The band / color information restoration unit 214 reads templates Φ min_i (p, q) and Ψ min_i (p, q) corresponding to the index min_i from the pre-deterioration template holding ROM 211a, respectively, and approximates the coefficients min_α (c) and min_β (c ) Using the formula f (p, q, c) = min_α (c) Ψmin_i (p, q) + min_β
(c), g (p, q, c) = min_α (c) Φ min_i (p, q) + min_β
(c) (c = 0,1,2) is calculated, and a neighborhood corrected approximate image f (p, q, c) is obtained by correcting missing color components and band degradation of the neighborhood image h (p, q). , And a neighborhood corrected approximate image g (p,
q, c). Then, these are calculated by the interpolation coefficient calculation unit 215.
Transfer to

【0074】補間係数計算部215では、f(p,q,c) 及
びg(p,q,c) から、当該近傍画像内の画素値を用いて劣
化前のカラー画素値を推定するのに適した情報を補間係
数の形で算出する。そのために、近傍補正近似画像g
(p,q,c) を当該近傍における電子カメラ200の色フィ
ルタ配置に応じてサンプリングした入力画像バッファ2
08内の画像同様の単板状態の画像g′(p,q) とf(p,
q,c) の関係を調べ、g′からfを線形演算で回復する
のに必要な係数を計算する。ここでは、補間係数計算部
215は例として以下の原理に従って係数を計算する。
The interpolation coefficient calculator 215 estimates the color pixel value before deterioration from f (p, q, c) and g (p, q, c) using the pixel values in the neighboring image. Suitable information is calculated in the form of interpolation coefficients. Therefore, the neighborhood correction approximate image g
The input image buffer 2 which samples (p, q, c) according to the color filter arrangement of the electronic camera 200 in the vicinity.
The images g ′ (p, q) and f (p,
q, c) is examined, and the coefficients required to recover f from g 'by linear operation are calculated. Here, the interpolation coefficient calculation unit 215 calculates coefficients according to the following principle, for example.

【0075】まずfの色cの各画素を自己回帰モデルの
考えに基づいて3色画像gの各画素の線形和として
First, each pixel of the color c of f is calculated as a linear sum of each pixel of the three-color image g based on the idea of the autoregressive model.

【数2】 (Equation 2)

【0076】と近似することを考える。自己回帰モデル
とは、ある画素の画素値が、その画素の周囲の画素値の
重み付き線形和とノイズ項との和で示されるモデルのこ
とである。ここではノイズ項は無視している。この式で
整数変数組(u,v)は変数組(p,q)のとりうる範
囲より狭い範囲Dを動く。
Consider approximation as follows. The autoregressive model is a model in which the pixel value of a certain pixel is represented by the sum of a weighted linear sum of pixel values around the pixel and a noise term. Here, the noise term is ignored. In this equation, the integer variable set (u, v) moves in a range D narrower than the range that the variable set (p, q) can take.

【0077】H(u,v) は、近傍内の位置(u,v)にお
ける色フィルタの種類をR=0,G=1,B=2と表す
整数値である。この式は各位置(p,q)のまわりで、
位置(0,0)(中心画素)の回りにおけるものと同じ
配置の色フィルタを通じてサンプリングされたgの画素
値を使って位置(p,q)におけるfの値を推定するこ
とを表している。
H (u, v) is an integer value representing the type of the color filter at the position (u, v) in the neighborhood as R = 0, G = 1, B = 2. This equation, around each position (p, q),
This indicates that the value of f at the position (p, q) is estimated using the pixel values of g sampled through the color filters arranged in the same manner as those around the position (0, 0) (center pixel).

【0078】この式による近似の自乗誤差を最小にする
ためにwc uvの満たすべき式は、(u,v)の動く範囲
Dと同じ範囲を動く整数変数組(k,l)に対し
In order to minimize the square error of the approximation by this equation, the equation to be satisfied by w c uv is as follows for an integer variable set (k, l) that moves in the same range as the range D in which (u, v) moves.

【数3】 (Equation 3)

【0079】となる。この式において、左辺及び右辺第
2項は空間的相関情報を表している。右辺及び左辺にお
けるwc uv以外の量はすべてfとgから計算でき、式全
体は行列演算により解くことができる。近傍の中心にお
いては、(p,q)=(0,0)であり、g′(u,v) =
g(u ,v ,H(u,v))となるので、係数wc uvを用いて
近傍画像の劣化前の中心画素のRGB値を近傍画素内の
画素値だけから求めることができる。
Is obtained. In this equation, the second term on the left side and the second term on the right side represent spatial correlation information. All quantities other than w c uv on the right and left sides can be calculated from f and g, and the entire equation can be solved by matrix operation. At the center of the neighborhood, (p, q) = (0,0) and g ′ (u, v) =
Since g (u, v, H (u, v)), the RGB value of the central pixel before deterioration of the neighboring image can be obtained from only the pixel value in the neighboring pixel using the coefficient w c uv .

【0080】この原理に基づいて、補間係数計算部21
5では、f(p,q,c) 及びg(p,q,c)から、すべての色c
=0,1,2について(2)式に従って補間係数wc uv
を計算し、線形演算部216に転送する。
Based on this principle, the interpolation coefficient calculator 21
In 5, all colors c are obtained from f (p, q, c) and g (p, q, c).
For = 0, 1, 2 according to equation (2), the interpolation coefficient w c uv
Is calculated and transferred to the linear operation unit 216.

【0081】線形演算部216は、平坦度評価部210
から最小自乗近似部212に画像転送が行われず、従っ
て補間係数計算部215からの係数の転送も行われない
場合には、図5のフローのS1において変数mask(p,q,
c) を計算した方法と同様の方法で平坦度評価部210
からあらかじめ転送されていた近傍画像の各色成分に対
応する位置を求め、それらの位置における平均値を近傍
画像の中心画素における当該色成分の推定値とし、出力
画像バッファ216の対応する画素位置に書き込む。
The linear operation section 216 includes the flatness evaluation section 210
, The image transfer is not performed to the least squares approximation unit 212, and thus the transfer of the coefficient from the interpolation coefficient calculation unit 215 is not performed, the variable mask (p, q,
c) The flatness evaluation section 210 is calculated in the same manner as
, The positions corresponding to the respective color components of the neighboring image which have been transferred in advance are obtained, and the average value at those positions is used as the estimated value of the color component at the central pixel of the neighboring image, and written to the corresponding pixel position of the output image buffer 216. .

【0082】一方、補間係数計算部215からの係数の
転送が行われた場合には、転送された係数によって近傍
画像内の画素を重みつき加算し、出力画像バッファ21
7の対応する画素位置に書き込む。
On the other hand, when the coefficients are transferred from the interpolation coefficient calculation unit 215, the pixels in the neighboring image are weighted and added by the transferred coefficients, and the output image buffer 21
7 is written to the corresponding pixel position.

【0083】これらの処理が入力画像バッファ208内
の画像のすべての画素位置につき終了すると、すべての
画素位置について、その近傍の幾何学的特徴に応じて当
該画素における色成分の欠落と帯域劣化を最適に補正す
る補間係数により線形補間が行われたことになり、出力
画像バッファ217には電子カメラ200の光学系によ
る帯域劣化および色成分の欠落が補正された3色カラー
画像が得られる。
When these processes are completed for all the pixel positions of the image in the input image buffer 208, the loss of the color component and the deterioration of the band at the relevant pixel position are determined in accordance with the geometrical features in the vicinity. This means that linear interpolation has been performed using the interpolation coefficient to be optimally corrected, and a three-color image in which the band degradation and the lack of color components due to the optical system of the electronic camera 200 have been corrected is obtained in the output image buffer 217.

【0084】この構成においても第1実施形態と同様に
種々の変形が可能である。撮像素子は単板ベイヤー配列
CCD204に限らないことはいうまでもない。補間係
数計算部215の計算方式にも種々のものがありうる。
例えば色情報復元部213から得られた画像と帯域・色
情報復元部214から得られた画像に対する各画像値の
比や近傍画像全体での画素値の自乗和の比を補間係数と
して用いる簡便なものでもよい。
In this configuration, various modifications are possible as in the first embodiment. It goes without saying that the image pickup device is not limited to the single-plate Bayer array CCD 204. There are various calculation methods of the interpolation coefficient calculation unit 215.
For example, a simple method of using the ratio of each image value to the image obtained from the color information restoring unit 213 and the image obtained from the band / color information restoring unit 214 or the ratio of the sum of squares of the pixel values in the whole neighboring image as an interpolation coefficient. It may be something.

【0085】又、第2実施形態でも第1実施形態と同様
に各画素位置を包含する複数の近傍に対する補正画像が
得られる。これを有効に活用するために、帯域・色情報
復元部214及び色情報復元部213の作用を以下のよ
うに変更することもできる。
In the second embodiment, similarly to the first embodiment, corrected images for a plurality of neighborhoods including each pixel position can be obtained. In order to effectively utilize this, the operation of the band / color information restoring unit 214 and the color information restoring unit 213 can be changed as follows.

【0086】帯域・色情報復元部214及び色情報復元
部213はそれぞれ内部に近傍画像と同サイズ(例えば
5×5画素)の画像バッファを保持し、これらのバッフ
ァでは入力画像バッファ208に電子カメラ200から
画像が転送された時点で全画素値が0に初期化される。
入力画像バッファ208中の画像の画素位置(x,y)
に対する処理の最中には、帯域・色情報復元部214内
の画像バッファには、その直前の画素位置、例えば(x
−1,y)に対する処理において帯域・色情報復元部2
14から補間係数計算部215に出力された画像f_pr
ev(p,q,c) が保持されている。
The band / color information restoring unit 214 and the color information restoring unit 213 each store therein an image buffer having the same size (for example, 5 × 5 pixels) as the neighboring image. All pixel values are initialized to 0 when the image is transferred from 200.
Pixel position (x, y) of image in input image buffer 208
During the processing for, the image buffer in the band / color information restoration unit 214 stores the immediately preceding pixel position, for example, (x
-1, y), the band / color information restoring unit 2
14 to the interpolation coefficient calculation unit 215
ev (p, q, c) is retained.

【0087】画素位置(x,y)に対する処理において
最小自乗近似部212から min_i、 min_α(c) 、min
_β(c) が転送されると、帯域・色情報復元部214
は内部の画像バッファからf_prev(p,q,c) を読み出
し、また劣化前テンプレート保持ROM211aからイ
ンデックス min_i に対応するテンプレートΨ min_i
(p,q)を読み出して、近似係数 min_α(c) 、min _β
(c) を用いて式 f(p,q,c) =( min_α(c) Ψ min_i(p,q)+ min_β
(c) +f_prev(p+1,q,c))/2(pが2未満の時) f(p,q,c) = min_α(c) Ψ min_i(p,q)+ min_β
(c) (pが2の時) によって近傍画像に対して色成分の欠落と帯域の劣化を
補正した3色画像f(p,q,c) を得、補間係数計算部21
5に出力する。同時に、f(p,q,c) をf_prev(p,q,c)
として内部バッファに保持する。
In the process for the pixel position (x, y), the least square approximation unit 212 outputs min_i, min_α (c), min
When _β (c) is transferred, the band / color information restoring unit 214
Reads out f_prev (p, q, c) from the internal image buffer and reads the template {min_i corresponding to the index min_i from the pre-deterioration template holding ROM 211a.
(p, q) is read out, and approximation coefficients min_α (c), min_β
f (p, q, c) = (min_α (c) Ψmin_i (p, q) + min_β using (c)
(c) + f_prev (p + 1, q, c)) / 2 (when p is less than 2) f (p, q, c) = min_α (c) Ψmin_i (p, q) + min_β
(c) (when p is 2) obtains a three-color image f (p, q, c) in which the lack of color components and the deterioration of the band have been corrected for the neighboring image, and the interpolation coefficient calculation unit 21
5 is output. At the same time, f (p, q, c) is replaced by f_prev (p, q, c)
As an internal buffer.

【0088】同様に、入力画像バッファ208中の画像
の画素位置(x,y)に対する処理の最中には、色情報
復元部213内の画像バッファには、その直前の画素位
置(x−1,y)に対する処理において色情報復元部2
14から補間係数計算部215に出力された画像g_pr
ev(p,q,c) が保持されている。画素位置(x,y)に対
する処理において最小自乗近似部212から min_i 、
min _α(c) 、min _β(c) が転送されると、色情報復
元部214は内部の画像バッファからg_prev(p,q,c)
を読み出し、また劣化前テンプレート保持ROM211
aからインデックスmin_i に対応するテンプレートΦ
min_i(p,q)を読み出して、近似係数 min_α(c) 、 mi
n_β(c) を用いて式 g(p,q,c) =( min_α(c) Φ min_i(p,q)+ min_β
(c) +g_prev(p+1,q,c))/2(pが2未満の時) g(p,q,c) = min_α(c) Φ min_i(p,q)+ min_β
(c) (pが2の時) によって近傍画像に対して色成分の欠落を補正した3色
画像g(p,q,c) を得、補間係数計算部215に出力す
る。同時に、g(p,q,c) をg_prev(p,q,c) として内部
バッファに保持する。
Similarly, during the processing for the pixel position (x, y) of the image in the input image buffer 208, the immediately preceding pixel position (x−1) is stored in the image buffer in the color information restoring unit 213. , Y) in the color information restoration unit 2
14 to the interpolation coefficient calculation unit 215
ev (p, q, c) is retained. In the processing for the pixel position (x, y), the least square approximation unit 212 outputs min_i,
When min_α (c) and min_β (c) are transferred, the color information restoring unit 214 outputs g_prev (p, q, c) from the internal image buffer.
Is read, and the pre-deterioration template holding ROM 211 is read.
template Φ corresponding to index min_i from a
read min_i (p, q) and calculate approximation coefficients min_α (c), mi
Using n_β (c), the equation g (p, q, c) = (min_α (c) Φ min_i (p, q) + min_β
(c) + g_prev (p + 1, q, c)) / 2 (when p is less than 2) g (p, q, c) = min_α (c) Φ min_i (p, q) + min_β
(c) (when p is 2) obtains a three-color image g (p, q, c) in which the lack of color components has been corrected for the neighboring image, and outputs it to the interpolation coefficient calculation unit 215. At the same time, g (p, q, c) is held in the internal buffer as g_prev (p, q, c).

【0089】この作用により、帯域・色情報復元部21
4及び色情報復元部213においては各回の処理結果を
前回の処理結果を用いて生成するため処理結果の信頼性
が高まり、補間の精度が向上する。
With this operation, the band / color information restoring section 21
4 and the color information restoring unit 213 generate the processing result of each round using the previous processing result, so that the reliability of the processing result is increased and the accuracy of interpolation is improved.

【0090】この実施形態では、電子カメラ200に水
晶フィルタ203がなく帯域制限がなされていない場合
にも容易に対応できる。この場合はテンプレート保持R
OM211が劣化前テンプレート保持ROM211aの
みからなるので、最小自乗近似部212は劣化前テンプ
レート保持ROM211aの出力を受けて、処理結果を
帯域・色情報復元部214のみに出力するようにする。
同時に、色情報復元部213を取り除いて補間係数算出
部215は帯域・色情報復元部214のみから信号を受
信する構成にする。この場合、各部分の作用は、最小自
乗近似部212ではテンプレートとしてΦiのかわりに
Ψiを用いる点を除いて同一である。帯域・色情報復元
部214の動作は同じだが、結果として色成分の欠落は
補正されるが帯域の劣化についてはなにもされない近傍
補正近似画像f(p,q,c) が得られる。
This embodiment can easily cope with the case where the electronic camera 200 does not have the crystal filter 203 and the band is not limited. In this case, the template holding R
Since the OM 211 includes only the pre-deterioration template holding ROM 211a, the least square approximation unit 212 receives the output of the pre-deterioration template holding ROM 211a and outputs the processing result only to the band / color information restoration unit 214.
At the same time, the color information restoration unit 213 is removed, and the interpolation coefficient calculation unit 215 is configured to receive signals only from the band / color information restoration unit 214. In this case, the operation of each part is the same except that the least squares approximation unit 212 uses Ψi instead of Φi as a template. The operation of the band / color information restoring unit 214 is the same, but as a result, a neighborhood corrected approximate image f (p, q, c) is obtained in which the loss of the color component is corrected but the band is not degraded.

【0091】補間係数算出部215では、g(p,q,c) を
f(p,q,c) と同一の画像とし、計算を進める。その結
果、補間係数算出部215では単板状態の近傍画像h
(p,q) の中心画素h(0,0) の欠落色成分を補正するのに
適切な補間係数が得られ、その係数を用いて線形演算部
216が補間を行うため、出力画像バッファ217には
入力画像バッファ208内の画像の色成分の欠落が補正
された3色カラー画像が得られる。
The interpolation coefficient calculator 215 sets g (p, q, c) to the same image as f (p, q, c) and proceeds with the calculation. As a result, the interpolation coefficient calculating unit 215 determines the neighborhood image h in the single-plate state.
An interpolation coefficient suitable for correcting the missing color component of the center pixel h (0,0) of (p, q) is obtained, and the linear operation unit 216 performs interpolation using the coefficient. , A three-color image in which the lack of color components of the image in the input image buffer 208 has been corrected is obtained.

【0092】この変形例において、さらに帯域・色情報
復元部214に前述の各画素位置を包含する複数の近傍
に対する補正画像を有効活用する変形例と同一の変形を
行えば、帯域制限がなされていない場合にも帯域・色情
報復元部214において各回の処理結果を前回の処理結
果を活用して生成することにより補間の精度を向上する
ことができる。
In this modification, if the band / color information restoring unit 214 is subjected to the same modification as the modification in which the corrected images for the plurality of neighborhoods including the respective pixel positions are effectively used, the band is limited. Even in the case where there is no data, the band / color information restoring unit 214 generates the processing result of each time by utilizing the previous processing result, thereby improving the accuracy of interpolation.

【0093】以下に本発明の第3実施形態を説明する。
図6は本発明の第3実施形態が適用される画像処理シス
テムの構成を示す図である。電子カメラ300は、第2
実施形態と同一の構成である。電子カメラ300内の単
板ベイヤー配列CCD304の色フィルタ配列に関する
情報は、第2実施形態と同様に、ベイヤー配列の規則性
を利用して画像処理装置301内で計算により求められ
る。
Hereinafter, a third embodiment of the present invention will be described.
FIG. 6 is a diagram showing a configuration of an image processing system to which the third embodiment of the present invention is applied. The electronic camera 300 is
This is the same configuration as the embodiment. Information on the color filter array of the single-plate Bayer array CCD 304 in the electronic camera 300 is obtained by calculation in the image processing apparatus 301 using the regularity of the Bayer array, as in the second embodiment.

【0094】画像処理装置301は、入力画像バッファ
308と、近傍読み出し部309と、テンプレート選択
部310と、劣化前テンプレート保持ROM311a及
び劣化後テンプレート保持ROM311bを具備するテ
ンプレート保持ROM311と、最小自乗近似部312
と、劣化後テンプレート加工部313と、帯域・色情報
復元部314と、三板画像加算部315aと、単板画像
加算部315bと、単板画像バッファ316と、出力画
像バッファ317と、差分計算部318と、差分画像バ
ッファ319と、規則性評価部320とを具備する。
The image processing apparatus 301 includes an input image buffer 308, a neighborhood reading unit 309, a template selecting unit 310, a template holding ROM 311 having a pre-deterioration template holding ROM 311a and a post-deterioration template holding ROM 311b, and a least square approximation unit. 312
A post-deterioration template processing unit 313, a band / color information restoring unit 314, a three-plate image addition unit 315a, a single-plate image addition unit 315b, a single-plate image buffer 316, an output image buffer 317, and a difference calculation unit. 318, a difference image buffer 319, and a regularity evaluation unit 320.

【0095】電子カメラ300内の画像バッファ307
の出力は第2実施形態と同様に、画像処理装置301内
の入力画像バッファ308に接続されるが、入力画像バ
ッファ308は近傍読み出し部309に加えて差分計算
部318にも接続される。
The image buffer 307 in the electronic camera 300
Is connected to the input image buffer 308 in the image processing apparatus 301 as in the second embodiment, but the input image buffer 308 is also connected to the difference calculation unit 318 in addition to the neighborhood read unit 309.

【0096】近傍読み出し部309は入力画像バッファ
308のほかに、差分画像バッファ319の出力を受け
るべく接続され、かつ読み出した情報を規則性評価部3
20に出力すべく接続されている。規則性評価部320
はテンプレート選択部310及び最小自乗近似部312
に接続されている。テンプレート選択部310は規則性
評価部320のほかに、テンプレート保持ROM311
内の劣化後テンプレート保持ROM311b及び劣化前
テンプレート保持ROM311aの出力を受けるべく接
続され、かつ選択結果を最小自乗近似部312、帯域・
色情報復元部314及び劣化後テンプレート加工部31
3に出力すべく接続されている。
The neighborhood read unit 309 is connected to receive the output of the difference image buffer 319 in addition to the input image buffer 308, and reads out the read information from the regularity evaluation unit 3.
20 to be output. Regularity evaluation unit 320
Is a template selection unit 310 and a least squares approximation unit 312
It is connected to the. The template selection unit 310 includes a template holding ROM 311 in addition to the regularity evaluation unit 320.
Are connected to receive the outputs of the post-deterioration template holding ROM 311b and the pre-deterioration template holding ROM 311a, and select the selection result by the least square approximation unit 312,
Color information restoring section 314 and post-deterioration template processing section 31
3 to be output.

【0097】テンプレート保持ROM311には、上記
した第1、第2実施形態と同様に、劣化前テンプレート
保持ROM311aにN種の幾何学的特徴をもつ所定サ
イズのグレースケール画像であるテンプレートΨi(i
=0〜N−1)が保持され、劣化後テンプレート保持R
OM311bには、劣化前テンプレート保持ROM31
1aの各テンプレートが電子カメラ300の光学系によ
る帯域劣化を受けたテンプレートΦi(i=0〜N−
1)が保持されている。
In the template holding ROM 311, as in the first and second embodiments described above, the template #i (i) which is a grayscale image of a predetermined size having N kinds of geometric features is stored in the pre-deterioration template holding ROM 311 a.
= 0 to N−1), and the template holding R after deterioration
The OM 311b includes a pre-deterioration template holding ROM 31.
1a is a template Φi (i = 0 to N−
1) is held.

【0098】第1、第2実施形態と異なる点は、各テン
プレート要素の持つ幾何学的特徴がその構造的な複雑さ
によって分類され、個々の要素を読み出すのに単一の整
数値iではなく二つの数の組(s,i)を必要とする点
である。sは構造の複雑さを表し、個々のテンプレート
を平均値に対する大小で2値化した場合の連結成分の数
である。例えば、一つのエッジパターンしか含まないテ
ンプレートに対してはs=2であり、一つの線分パター
ンしか含まないテンプレートではs=3となる。また、
iは同じ複雑度sを持つテンプレートのクラスの個々の
要素にアクセスするのに用いられる。
The difference from the first and second embodiments is that the geometrical features of each template element are classified according to their structural complexity, and it is not a single integer value i for reading out each element. The point is that two sets of numbers (s, i) are required. s represents the complexity of the structure, and is the number of connected components when each template is binarized based on the average value. For example, s = 2 for a template containing only one edge pattern, and s = 3 for a template containing only one line segment pattern. Also,
i is used to access individual elements of the class of template with the same complexity s.

【0099】最小自乗近似部312の内部構成及び作用
は第2実施形態におけるものと同一である。最小自乗近
似部312は処理結果を帯域・色情報復元部314及び
劣化後テンプレート加工部313に出力すべく接続され
ている。
The internal configuration and operation of the least squares approximation unit 312 are the same as those in the second embodiment. The least square approximation unit 312 is connected to output the processing result to the band / color information restoration unit 314 and the post-deterioration template processing unit 313.

【0100】帯域・色情報復元部314は、最小自乗近
似部312およびテンプレート選択部310の出力を受
けるべく接続され、かつ復元結果を三板画像加算部31
5aを経て出力画像バッファ317に出力すべく接続さ
れている。
The band / color information restoring section 314 is connected to receive the outputs of the least squares approximating section 312 and the template selecting section 310, and outputs the restoration result to the three-plate image adding section 31.
It is connected to output to the output image buffer 317 via 5a.

【0101】劣化後テンプレート加工部313は、最小
自乗近似部312およびテンプレート選択部310の出
力を受けるべく接続され、かつ処理結果を単板画像加算
部315bを経て単板画像バッファ316に出力すべく
接続されている。単板画像バッファ316は差分計算部
318に記憶している情報を出力すべく接続され、差分
計算部318は差分画像バッファ319に処理結果を出
力すべく接続されている。
The post-deterioration template processing unit 313 is connected to receive the outputs of the least square approximation unit 312 and the template selection unit 310, and outputs the processing result to the single image buffer 316 via the single image addition unit 315b. It is connected. The single-chip image buffer 316 is connected to output information stored in the difference calculation unit 318, and the difference calculation unit 318 is connected to the difference image buffer 319 to output the processing result.

【0102】単板画像バッファ316および出力画像バ
ッファ317は、入力画像バッファ308内の画像と同
じ大きさの三色画像を保持するほか、各画素に付きカウ
ンタを保持する。このカウンタは、それぞれのバッファ
の各画素位置に書き込みが行われた回数を保持するため
に設けられている。
The single-plate image buffer 316 and the output image buffer 317 hold a three-color image having the same size as the image in the input image buffer 308, and also hold a counter for each pixel. This counter is provided to hold the number of times writing has been performed at each pixel position of each buffer.

【0103】第1実施形態と同様に、それぞれのバッフ
ァの各画素位置で複数の画素値が計算されるため、ここ
では三板画像加算部315a及び単板画像加算部315
bでそれらを平均化する処理を行っている。この処理に
書き込み回数が必要になる。
As in the first embodiment, since a plurality of pixel values are calculated at each pixel position in each buffer, the three-plate image addition unit 315a and the single-plate image addition unit 315 are used here.
The processing of averaging them is performed in b. This process requires the number of times of writing.

【0104】以下に、上記した構成を有する画像処理シ
ステムの作用を説明する。第3実施形態においても、第
1、第2実施形態と同様に、電子カメラ300で撮像が
行われ、光学系で帯域劣化を受け各画素位置につき一つ
の色成分しか持たない画像が画像バッファ307に保持
される。撮像が終了すると、画像バッファ307内の画
像は入力画像バッファ308に転送され、出力画像バッ
ファ317および単板画像バッファ316のカラー画像
の画素値、及びカウンタはすべて0に初期化される。
Hereinafter, the operation of the image processing system having the above-described configuration will be described. In the third embodiment, similarly to the first and second embodiments, an image is taken by the electronic camera 300, and an image having only one color component at each pixel position due to band degradation in the optical system is stored in the image buffer 307. Is held. When the imaging is completed, the image in the image buffer 307 is transferred to the input image buffer 308, and the pixel values and the counters of the color image in the output image buffer 317 and the single image buffer 316 are all initialized to zero.

【0105】次に、類似の処理を複数回繰り返して補正
を行う。1回目の処理は入力画像バッファ308内の画
像に対して行われる。この処理の結果、入力画像は複雑
度の低いテンプレートを用いて近似され、同時に色成分
の欠落と帯域劣化が補正された画像が出力画像バッファ
317に生成される。同じく、複雑度の低いテンプレー
トを用いて近似された入力画像の色成分の欠落を補正
し、ついでベイヤー配列でサンプリングした画像が単板
画像バッファ316に生成される。
Next, similar processing is repeated a plurality of times to perform correction. The first processing is performed on the image in the input image buffer 308. As a result of this processing, the input image is approximated using a low-complexity template, and at the same time, an image in which the lack of color components and the band degradation have been corrected is generated in the output image buffer 317. Similarly, the missing color component of the approximated input image is corrected using a template with low complexity, and an image sampled by the Bayer array is generated in the single-chip image buffer 316.

【0106】単板画像バッファ316内の画像は入力画
像を複雑度の低いテンプレートで近似したものなので入
力画像の大まかな幾何学的特徴しか反映しておらず、近
似誤差が生じる。この誤差が差分画像バッファ319に
誤差画像として保持される。
Since the image in the single-chip image buffer 316 is obtained by approximating the input image with a low-complexity template, only the rough geometrical characteristics of the input image are reflected, and an approximation error occurs. This error is stored in the difference image buffer 319 as an error image.

【0107】二回目以降は、差分画像バッファ319内
の誤差画像に対して処理が行われる。誤差画像はそれま
での繰り返しに比してより複雑度の高いテンプレートを
用いて近似、劣化補正され、処理結果が出力画像バッフ
ァ317に加算される。差分画像には、それまで(一回
目を含む)の段階的な近似をすべて加算した近似画像と
入力画像の誤差画像が出力され、再びこの誤差画像に対
する処理が行われる。以下にこの処理の詳細を説明す
る。
After the second time, processing is performed on the error image in the difference image buffer 319. The error image is approximated and degraded using a template with higher complexity than the previous iteration, and the processing result is added to the output image buffer 317. As the difference image, an error image of the input image and an approximate image obtained by adding all of the stepwise approximations up to and including the first time are output, and the error image is processed again. The details of this processing will be described below.

【0108】まず、1回目は、入力画像バッファ308
内の画像の各画素位置(x,y)につき、以下の処理が
行われる。
First, the input image buffer 308
The following processing is performed for each pixel position (x, y) of the image in the image.

【0109】近傍読み出し部309により当該画素位置
(x,y)の所定の矩形領域(例えば5×5画素)が近
傍画像h(p,q) として読み出される。以下の説明におい
て、変数の組(p,q)は、この近傍画像の中心画素
(x,y)に対する相対座標であり、例えば近傍の大き
さが5×5であれば[−2,−1,0,1,2]×[−
2,−1,0,1,2]の範囲を動く。また、場合によ
って色R,G,Bをそれぞれ整数値c=0,1,2に対
応させて説明する。
A predetermined rectangular area (for example, 5 × 5 pixels) at the pixel position (x, y) is read by the neighborhood reading section 309 as a neighborhood image h (p, q). In the following description, the set of variables (p, q) is a relative coordinate with respect to the center pixel (x, y) of the neighboring image. For example, if the size of the neighborhood is 5 × 5, [−2, −1] , 0,1,2] × [−
2, -1, 0, 1, 2]. In some cases, colors R, G, and B correspond to integer values c = 0, 1, and 2, respectively.

【0110】読み出された近傍画像は規則性評価部32
0に送られる。この一回目の処理では、近傍画像はなに
も処理を受けずに最小自乗近似部312に転送される。
同時にテンプレート選択部310に対してはテンプレー
ト保持ROM311に保持されたテンプレートのとりう
る複雑度のうち最も近い値が出力される。
The read neighboring image is sent to the regularity evaluation section 32.
Sent to 0. In the first processing, the neighboring image is transferred to the least squares approximation unit 312 without any processing.
At the same time, the closest value of the possible complexity of the template held in the template holding ROM 311 is output to the template selecting unit 310.

【0111】テンプレート選択部310は、規則性評価
部320から出力される値を複雑度をあらわす内部変数
sにセットし、内部変数テンプレート保持ROM311
と他の構成要素の仲立ちを行う。テンプレート選択部3
10に接続している構成要素からi番目のテンプレート
の読み出し要求がある場合には、テンプレート選択部3
10は内部変数sを用いて読み出し信号(s,i)を生
成し、要求が最小自乗近似部312及び劣化後テンプレ
ート加工部313からの場合は劣化後テンプレート保持
ROM311bに、また帯域・色情報復元部314から
の場合には劣化前テンプレート保持ROM311aにア
クセスする。
The template selection section 310 sets the value output from the regularity evaluation section 320 to an internal variable s representing the complexity, and stores the internal variable template holding ROM 311
And mediate between other components. Template selection part 3
When there is a request to read the i-th template from the components connected to the
Reference numeral 10 generates a read signal (s, i) using the internal variable s. From the unit 314, the pre-deterioration template holding ROM 311a is accessed.

【0112】最小自乗近似部312は、近傍画像h(p,
q) が転送されると図5に示すフローに従って処理を行
い、第1、第2実施形態と同様に、近傍画像を最もよく
近似する劣化後テンプレートのインデックス min_i と
近似係数 min_α(c) 、min _β(c) とを算出し、劣化
後テンプレート加工部313及び帯域・色情報復元部3
14に転送する。
The least squares approximation unit 312 calculates the neighborhood image h (p,
When q) is transferred, processing is performed according to the flow shown in FIG. 5, and similarly to the first and second embodiments, the index min_i of the degraded template that best approximates the neighboring image and the approximation coefficients min_α (c), min _Β (c) and the post-deterioration template processing unit 313 and the band / color information restoration unit 3
Transfer to 14.

【0113】帯域・色情報復元部314における処理
は、テンプレート保持ROM311へのアクセスがテン
プレート選択部310を経て行われること以外は第2実
施形態と同一である。帯域・色情報復元部314は近傍
補正近似画像f(p,q,c) を三板画像加算部315aに転
送する。
The processing in the band / color information restoring unit 314 is the same as that in the second embodiment except that access to the template holding ROM 311 is performed via the template selecting unit 310. The band / color information restoring unit 314 transfers the neighborhood corrected approximate image f (p, q, c) to the three-plate image adding unit 315a.

【0114】劣化後テンプレート加工部313は、まず
第2実施形態中の色情報復元部213と同様に、近傍画
像h(p,q) に対して色成分の欠落のみを補正した3色画
像g(p,q,c) を計算する。次に、最終的にg(p,q,c) を
当該近傍における電子カメラ300の色フィルタ配置に
応じてサンプリングした画像g′(p,q) を生成し、単板
画像加算部315bにそれぞれ転送する。
The post-deterioration template processing unit 313 firstly, like the color information restoring unit 213 in the second embodiment, corrects only the lack of color components in the neighboring image h (p, q) to obtain a three-color image g. Calculate (p, q, c). Next, g (p, q, c) is finally sampled in accordance with the color filter arrangement of the electronic camera 300 in the vicinity to generate an image g ′ (p, q), which is then sent to the single-chip image adder 315b. Forward.

【0115】処理の途中では、出力画像バッファ317
および単板画像バッファ316において、それぞれ各画
素位置につき複数の近似画素値が得られるが、両バッフ
ァではそれらの平均近似画素値が保持され、またこれま
でに得られた近似画素値の個数がカウンタに保持される
ようになっている。この個数は当該画素位置にこれまで
に書き込みが行われた回数に等しい。
During the processing, the output image buffer 317
A plurality of approximate pixel values are obtained for each pixel position in the single-chip image buffer 316, and the average approximate pixel values are held in both buffers, and the number of approximate pixel values obtained so far is counted. Is to be held. This number is equal to the number of times writing has been performed on the pixel position so far.

【0116】三板画像加算部315aでは、画像出力バ
ッファ317の当該近傍画像に対応する領域から平均近
似画素値Sf(p,q,c) およびカウンタZf(p,q) が読み
出され、新しい平均近似画素値Sfnew (p,q,c) が、計
算式、 Sfnew (p,q,c) =(Zf(p,q) ・Sf(p,q,c) +f
(p,q,c))/(Zf(p,q) +1) (c=0,1,2 ) によって、また新しいカウンタZfnew (p,q) の値が式 Zfnew (p,q) =Zf(p,q) +1 によって計算され、Sfnew (p,q,c) およびZf
new (p,q) が出力画像バッファ317の当該近傍画像に
対応する領域に書き戻される。
The three-plate image adding unit 315a reads the average approximate pixel value Sf (p, q, c) and the counter Zf (p, q) from the area corresponding to the neighboring image in the image output buffer 317, and reads the new average value. The approximate pixel value Sf new (p, q, c) is calculated by the following formula: Sf new (p, q, c) = (Zf (p, q) · Sf (p, q, c) + f
(p, q, c)) / (Zf (p, q) +1) (c = 0,1,2) and the value of the new counter Zf new (p, q) is given by the formula Zf new (p, q) = Zf (p, q) +1, and Sf new (p, q, c) and Zf
new (p, q) is written back to the area of the output image buffer 317 corresponding to the neighboring image.

【0117】一方、単板画像加算部315bでは、単板
画像バッファ316から当該近傍画像に対応する領域内
の各画素の平均近似画素値Sg′(p,q) 及びカウンタZ
g′(p,q) が読み出され、新しい平均近似画素値Sg′
new (p,q) が、計算式、 Sg′new (p,q) =(Zg′(p,q) ・Sg′(p,q) +
g′(p,q))/(Zg′(p,q) +1) によって、また新しいカウンタZg′new (p,q) の値が Zg′new (p,q) =Zg′(p,q) +1 によって計算され、Sg′new (p,q) およびZg′new
(p,q) が単板画像バッファ316の当該近傍画像に対応
する領域に書き戻される。
On the other hand, in the single-plate image adding unit 315b, the average approximate pixel value Sg '(p, q) of each pixel in the region corresponding to the neighboring image and the counter Z from the single-plate image buffer 316.
g ′ (p, q) is read out and a new average approximate pixel value Sg ′ is read out.
new (p, q) is calculated as follows: Sg ′ new (p, q) = (Zg ′ (p, q) · Sg ′ (p, q) +
g '(p, q)) / (Zg' (p, q) by +1) and new counter Zg 'new (p, q values of) the Zg' new (p, q) = Zg '(p, q ) +1 and Sg ′ new (p, q) and Zg ′ new
(p, q) is written back to the area corresponding to the neighboring image in the single-chip image buffer 316.

【0118】入力画像バッファ308内の画像の各画素
位置につき、以上の処理が終了すると、単板画像バッフ
ァ316には、入力画像バッファ308内の画像を単純
なテンプレートで近似し、帯域劣化補正はせずに色成分
の欠落のみの補正を行い、得られた画像をさらに単板ベ
イヤー配列CCD304の色フィルタ配置でサンプリン
グした単板状態の画像が得られる。同じく出力画像バッ
ファ317には単純なテンプレートで近似され、欠落色
復元と帯域劣化の両方の補正を受けたカラー画像が得ら
れる。
When the above processing is completed for each pixel position of the image in the input image buffer 308, the image in the input image buffer 308 is approximated to the single-plate image buffer 316 by a simple template, and the band degradation correction is performed. The correction of only the lack of the color component is performed without performing the above operation, and the obtained image is further sampled by the color filter arrangement of the single-chip Bayer array CCD 304 to obtain an image in a single-plate state. Similarly, the output image buffer 317 is approximated by a simple template, and a color image that has been corrected for both missing color restoration and band degradation can be obtained.

【0119】一回目の処理では、最後に差分計算部31
8が単板画像バッファ316と入力画像バッファ308
の差分をとり、近似誤差を表す差分画像を差分画像バッ
ファ319に生成する。
In the first process, finally, the difference calculation unit 31
8 is a single-plate image buffer 316 and an input image buffer 308
And a difference image representing the approximation error is generated in the difference image buffer 319.

【0120】二回目以降の処理では、近傍読み出し部3
09が以降の入力を差分画像バッファ309に切り替
え、差分画像に対しこれまでの処理が繰り返される。こ
の繰り返しで、一回目と動作が異なるのは規則性評価部
320だけである。
In the second and subsequent processes, the neighborhood reading unit 3
09 switches the subsequent input to the difference image buffer 309, and the processing up to this point is repeated for the difference image. In this repetition, only the regularity evaluation unit 320 has a different operation from the first time.

【0121】規則性評価部320では、転送された近似
画像に対してまず分散の大きさを計算し、所定の閾値以
下であれば近似誤差は十分小さいとして最小自乗近似部
312への近似画像の転送を行わない。所定の閾値以上
の場合は、最大値を1、最小値を0に正規化した近傍画
像にラプラシアンフィルタがかけられ、得られた画像内
で自乗和が算出される。自乗和が所定の閾値より大きな
場合は近傍画像はノイズであるとして同じく転送を行わ
ない。
The regularity evaluation section 320 first calculates the magnitude of the variance of the transferred approximated image, and if it is equal to or smaller than a predetermined threshold, determines that the approximation error is sufficiently small. Do not transfer. If the value is equal to or larger than the predetermined threshold value, a Laplacian filter is applied to the neighboring image in which the maximum value is normalized to 1 and the minimum value is normalized to 0, and the sum of squares is calculated in the obtained image. If the sum of squares is larger than a predetermined threshold, the neighboring image is determined to be noise, and no transfer is performed.

【0122】その他の場合は近傍画像の複雑度sを計算
し、テンプレート選択部310に複雑度sを転送し、最
小自乗近似部312に近傍画像を転送する。差分画像の
すべての画素位置で近傍画像が最小自乗近似部312に
転送されなかった場合に差分画像に対する繰り返し処理
は終了する。
In other cases, the complexity s of the neighboring image is calculated, the complexity s is transferred to the template selecting unit 310, and the neighboring image is transferred to the least square approximation unit 312. When the neighboring image has not been transferred to the least squares approximation unit 312 at all the pixel positions of the difference image, the repetition processing for the difference image ends.

【0123】この間、以前の近似で捕捉できなかった微
細構造が差分画像に計算され、差分画像がその微細構造
に対応した複雑度をもつテンプレートによる近似で劣化
補正され、結果が出力画像バッファ317に蓄積され
る。その結果、出力画像バッファ317には電子カメラ
300の光学系による劣化と色の欠落が補正された3色
カラー画像が得られる。
During this time, the fine structure that could not be captured by the previous approximation is calculated as a difference image, the difference image is corrected for deterioration by approximation using a template having the complexity corresponding to the fine structure, and the result is stored in the output image buffer 317. Stored. As a result, in the output image buffer 317, a three-color image is obtained in which the deterioration due to the optical system of the electronic camera 300 and the lack of color are corrected.

【0124】第3実施形態においても構成要素は種々の
変更が考えられる。例えば、複雑度sの定義はここで上
げたもの以外に微分画像の強度などいろいろな候補があ
げられる。規則性評価部320のノイズ判定基準も種々
のものが考えられる。また、各回の処理は独立している
ので、繰り返し回数に応じて近傍読み出し部309から
読み出す近傍画像のサイズを小さくすることも可能であ
る。これにより、複雑度の高いテンプレートの種類を減
らすことができる。
In the third embodiment as well, various changes can be considered for the components. For example, the definition of the complexity s includes various candidates other than those described above, such as the intensity of the differential image. Various noise judgment criteria of the regularity evaluation unit 320 can be considered. Further, since the processing of each time is independent, it is also possible to reduce the size of the neighboring image read from the neighboring reading unit 309 according to the number of repetitions. This makes it possible to reduce the types of templates having high complexity.

【0125】処理を高速化するために、複数段階の処理
を一段階ですませることも可能である。この場合、三板
画像加算部315a、単板画像加算部315b、単板画
像バッファ316及び差分画像バッファ319は不要と
なり、出力画像バッファ317においてカウンタを保持
する必要もなくなる。帯域・色情報復元部314は復元
結果を出力画像バッファ317に直接出力し、劣化後テ
ンプレート加工部313は差分計算部318に、また差
分計算部318は規則性評価部320に処理結果を直接
出力する。また、作用も以下のように変更される。
In order to speed up the processing, it is possible to perform the processing in a plurality of stages in one stage. In this case, the three-plate image addition unit 315a, the single-plate image addition unit 315b, the single-plate image buffer 316, and the difference image buffer 319 become unnecessary, and the output image buffer 317 does not need to hold a counter. The band / color information restoration unit 314 directly outputs the restoration result to the output image buffer 317, the post-deterioration template processing unit 313 directly outputs the processing result to the difference calculation unit 318, and the difference calculation unit 318 directly outputs the processing result to the regularity evaluation unit 320. I do. The operation is also changed as follows.

【0126】入力画像バッファ308内の画像の各画素
位置(x,y)につき、近傍読み出し部309により近
傍画像h(p,q) が読み出され、規則性評価部320に送
られる。規則性評価部320はテンプレート保持ROM
311に保持されたテンプレートのとりうる複雑度のう
ち最も低い値をテンプレート選択部310に出力し、近
傍画像h(p,q) を最小自乗近似部312に転送する。
For each pixel position (x, y) of the image in the input image buffer 308, the neighboring image h (p, q) is read by the neighboring reading unit 309 and sent to the regularity evaluation unit 320. The regularity evaluation unit 320 is a template holding ROM
The lowest value of the possible complexity of the template held in 311 is output to template selecting section 310, and neighboring image h (p, q) is transferred to least squares approximating section 312.

【0127】最小自乗近似部312は、テンプレート選
択部310により選択された劣化後テンプレートのう
ち、近傍画像h(p,q) を最もよく近似するもののインデ
ックスと近似係数とを算出し、劣化後テンプレート加工
部313及び帯域・色情報復元部314に転送する。
The least-squares approximation unit 312 calculates an index and an approximation coefficient of one of the post-deterioration templates selected by the template selection unit 310 that best approximates the neighboring image h (p, q), and The data is transferred to the processing unit 313 and the band / color information restoring unit 314.

【0128】帯域・色情報復元部314では、近傍画像
に対して色成分の欠落と帯域の劣化を補正した近傍補正
近似画像f(p,q,c) を得、その中心画素の値f(0,0,c)
を出力画像バッファ317の対応する画素位置に足し込
む。
The band / color information restoring unit 314 obtains a neighborhood correction approximate image f (p, q, c) obtained by correcting the lack of color components and the deterioration of the band with respect to the neighborhood image, and obtains the value f (p, 0,0, c)
Is added to the corresponding pixel position of the output image buffer 317.

【0129】一方、劣化後テンプレート加工部313
は、近傍画像h(p,q) に対して色成分の欠落のみを補正
した3色画像g(p,q,c) を計算し、さらにg(p,q,c) を
当該近傍画像における電子カメラ300の色フィルタ配
置に応じてサンプリングして画像g′(p,q) を得る。
g′(p,q) は差分計算部318に転送され、近傍画像h
(p,q) との差分が近傍差分画像として計算されて規則性
評価部320に転送される。
On the other hand, the post-deterioration template processing unit 313
Calculates a three-color image g (p, q, c) obtained by correcting only missing color components with respect to the neighboring image h (p, q), and further calculates g (p, q, c) in the neighboring image. An image g '(p, q) is obtained by sampling according to the color filter arrangement of the electronic camera 300.
g ′ (p, q) is transferred to the difference calculator 318, and the neighborhood image h
The difference from (p, q) is calculated as a neighborhood difference image and transferred to the regularity evaluation unit 320.

【0130】規則性評価部320は、この実施形態の2
回目の処理における処理と同様に転送された近傍差分画
像の複雑度を調べ、近傍差分画像がノイズとみなされな
い場合には算出された複雑度をテンプレート選択部31
0に転送し、近傍差分画像を再び最小自乗近似部312
に転送する。
The regularity evaluation section 320 is the same as the second embodiment.
The complexity of the transferred neighborhood difference image is checked in the same manner as in the processing in the third processing, and if the neighborhood difference image is not regarded as noise, the calculated complexity is used as the template selection unit 31.
0, and transfers the neighborhood difference image to the least squares approximation unit 312 again.
Transfer to

【0131】これにより、各画素位置の近傍画像に対し
て劣化後テンプレートが複雑度の低い順に当てはめら
れ、当てはめ結果により近傍画像の中心画素値の色成分
の欠落および帯域の劣化が補正されて出力画像バッファ
317に出力される。
As a result, the post-deterioration template is applied to the neighboring image at each pixel position in ascending order of complexity, and the result of the application corrects the loss of the color component of the central pixel value of the nearby image and the deterioration of the band and outputs the corrected image. Output to the image buffer 317.

【0132】また、電子カメラ300に水晶フィルタ3
03がなく帯域制限がなされていない場合には、テンプ
レート保持ROM311が劣化前テンプレート保持RO
M311aのみからなり、テンプレート選択部310が
劣化前テンプレート保持ROM311aと規則性評価部
320のみから入力を受けるように構成を変更する。こ
の場合、各部分の作用で従来と異なる点は、テンプレー
ト選択部310がどの構成要素からのテンプレートの読
み出し要求に対しても劣化前テンプレート保持ROM3
11aにアクセスすること、最小自乗近似部212はテ
ンプレートとしてΦiのかわりにΨiを用いること、及
び帯域・色情報復元部314は動作は同じだが、結果と
して色成分の欠落は補正されるが帯域の劣化については
なにもされない近傍補正近似画像f(p,q,c) を出力する
ことのみである。その結果、二回目以降の繰り返し処理
が進むにつれ、入力画像のより複雑度の高い幾何学的特
徴まで反映し、色成分の欠落が補正された画像が保持さ
れるようになり、最終的に入力画像バッファ308内の
画像の色成分の欠落が補正された3色カラー画像が得ら
れる。
The electronic camera 300 has a crystal filter 3
03 and the band is not limited, the template holding ROM 311 stores the pre-deterioration template holding RO.
The configuration is changed so that the template selection unit 310 receives only the input from the pre-deterioration template holding ROM 311a and the regularity evaluation unit 320 only. In this case, the operation of each part is different from that of the related art in that the template selection unit 310 receives the template read request from any of the constituent elements, and
11a, the least square approximation unit 212 uses Ψi instead of Φi as a template, and the band / color information restoring unit 314 operates in the same manner. All that is required is to output a neighborhood correction approximate image f (p, q, c) in which no degradation is performed. As a result, as the second and subsequent iterations progress, the more complex geometric features of the input image are reflected, and the image in which the color component has been corrected is retained. A three-color image is obtained in which the lack of color components of the image in the image buffer 308 has been corrected.

【0133】以下に、本発明の第4実施形態を説明す
る。図7は本発明の第4実施形態が適用される画像処理
システムの構成を示す図であり、図8は図7に示す最小
自乗近似部412の構成及びその周辺回路を示す図であ
る。
Hereinafter, a fourth embodiment of the present invention will be described. FIG. 7 is a diagram showing the configuration of an image processing system to which the fourth embodiment of the present invention is applied, and FIG. 8 is a diagram showing the configuration of the least squares approximation unit 412 shown in FIG. 7 and its peripheral circuits.

【0134】図7において電子カメラ400は、図4に
おける単板ベイヤー配列CCDが単板RGBランダム配
列CCD404に置き換わっている点を除いて第2実施
形態と同一の構成である。電子カメラ400内の単板R
GBランダム配列CCD404の色フィルタ配列に関す
る情報は、図8に示すようにあらかじめ画像処理装置4
01内の色成分マスク生成部412aに保持されてい
る。
In FIG. 7, the electronic camera 400 has the same configuration as that of the second embodiment except that the single-chip Bayer array CCD in FIG. 4 is replaced with a single-chip RGB random array CCD 404. Single plate R in electronic camera 400
Information on the color filter array of the GB random array CCD 404 is stored in advance in the image processing device 4 as shown in FIG.
01 is held in the color component mask generation unit 412a.

【0135】画像処理装置401は、入力画像バッファ
408と、近傍読み出し部409と、劣化前テンプレー
ト保持ROM411a及び劣化後テンプレート保持RO
M411bとを具備するテンプレート保持ROM411
と、最小自乗近似部412と、帯域・色情報復元部41
4と、画像加算部415と、三板画像バッファ417a
及び単板画像バッファ417bを具備する近似画像バッ
ファ417と、残差演算部418と、規則性判定部41
9と、残差加算部420と、出力画像バッファ421と
を具備する。
The image processing device 401 includes an input image buffer 408, a neighborhood read unit 409, a template storage ROM 411a before deterioration and a template storage RO after deterioration.
M411b and a template holding ROM 411 having
, Least square approximation unit 412, band / color information restoration unit 41
4, an image adding unit 415, and a three-plate image buffer 417a
And an approximate image buffer 417 including a single-plate image buffer 417b, a residual calculation unit 418, and a regularity determination unit 41.
9, a residual adder 420, and an output image buffer 421.

【0136】最小自乗近似部412は図8に示すよう
に、色成分マスク生成部412aと、最小自乗係数算出
部412bと、近似誤差累積部412cと、近似係数保
持バッファ412dと、テンプレート決定部412eと
を具備する。上記最小自乗近似部412はさらに、近傍
読み出し部409に接続された近傍画像入力端子412
rと、劣化後テンプレート保持ROM411bに接続さ
れたテンプレート入力端子412pと、帯域・色情報復
元部414に接続された近似パラメータ出力端子412
sと、画像加算部415に接続された近傍近似画像出力
端子412tとを有する。
As shown in FIG. 8, the least square approximation unit 412 includes a color component mask generation unit 412a, a least square coefficient calculation unit 412b, an approximation error accumulation unit 412c, an approximation coefficient holding buffer 412d, and a template determination unit 412e. And The least square approximation unit 412 further includes a neighborhood image input terminal 412 connected to the neighborhood reading unit 409.
r, a template input terminal 412p connected to the deteriorated template holding ROM 411b, and an approximate parameter output terminal 412 connected to the band / color information restoring unit 414.
s, and a neighborhood approximate image output terminal 412 t connected to the image addition unit 415.

【0137】図7において電子カメラ400内の画像バ
ッファ407は画像処理装置401内の入力画像バッフ
ァ408に接続されている。入力画像バッファ408は
近傍読み出し部409及び残差演算部418に接続され
ている。近傍読み出し部409は図8に示す近傍画像入
力端子412rを経て最小自乗近似部412内の最小自
乗係数算出部412bに接続されている。
In FIG. 7, an image buffer 407 in the electronic camera 400 is connected to an input image buffer 408 in the image processing device 401. The input image buffer 408 is connected to the neighborhood reading unit 409 and the residual calculation unit 418. The neighborhood reading unit 409 is connected to the least square coefficient calculation unit 412b in the least square approximation unit 412 via the neighborhood image input terminal 412r shown in FIG.

【0138】図8において、最小自乗係数算出部412
bは近傍読み出し部409のほかに、色成分マスク生成
部412aと、テンプレート入力端子412p経由で劣
化後テンプレート保持ROM411bとに接続され、処
理結果を近似係数保持バッファ412dおよび近似誤差
累積部412cに出力すべく接続されている。
In FIG. 8, the least square coefficient calculating section 412
b is connected to a color component mask generation unit 412a and a degraded template holding ROM 411b via a template input terminal 412p in addition to the neighborhood reading unit 409, and outputs a processing result to an approximation coefficient holding buffer 412d and an approximation error accumulating unit 412c. Connected to

【0139】テンプレート決定部412eは近似誤差累
積部412c、近似係数保持バッファ412dおよび色
成分マスク生成部412aの出力を受けるべく接続さ
れ、かつ決定した内容を近傍補正近似画像出力端子41
2tを経て画像加算部415に、近似パラメータ出力端
子412sを経て帯域・色情報復元部414に出力すべ
く接続されている。
The template determining section 412e is connected to receive the outputs of the approximate error accumulating section 412c, the approximate coefficient holding buffer 412d and the color component mask generating section 412a, and outputs the determined content to the neighborhood correction approximate image output terminal 41.
It is connected to the image addition unit 415 via 2t and to the band / color information restoration unit 414 via the approximate parameter output terminal 412s.

【0140】テンプレート保持ROM411は、第2実
施形態と同様に、劣化前テンプレート保持ROM411
aと劣化後テンプレート保持ROM411bとからな
る。劣化前テンプレート保持ROM411aには、所定
のN種の幾何学的特徴をもつ所定サイズのグレースケー
ル画像であるテンプレートΨi(i=0〜N−1)が保
持され、帯域・色情報復元部414に接続されている。
劣化後テンプレート保持ROM411bには、劣化前テ
ンプレート保持ROM411aの各テンプレートが電子
カメラ400の光学系による帯域劣化を受けた画像であ
るテンプレートΦi(i=0〜N−1)が保持されてい
る。
The template holding ROM 411 is the same as the second embodiment.
a and a template holding ROM 411b after deterioration. The template Ψi (i = 0 to N−1) which is a grayscale image of a predetermined size having predetermined N kinds of geometric features is stored in the pre-deterioration template storage ROM 411 a, and stored in the band / color information restoration unit 414. It is connected.
The template Φi (i = 0 to N−1), which is an image in which each template of the template storage ROM 411a before deterioration has been subjected to band deterioration by the optical system of the electronic camera 400, is stored in the template storage ROM 411b after deterioration.

【0141】図7に示すように、帯域・色情報復元部4
14は最小自乗近似部412及び劣化前テンプレート保
持ROM411aの出力を受けるべく接続され、かつ復
元結果を画像加算部415に出力すべく接続されてい
る。画像加算部415は帯域・色情報復元部414及び
最小自乗近似部412からの出力を独立に処理すべく接
続され、それぞれの処理結果を近似画像バッファ417
内の三板画像バッファ417a及び単板画像バッファ4
17bに出力する。
As shown in FIG. 7, the band / color information restoring unit 4
Reference numeral 14 is connected to receive the outputs of the least square approximation unit 412 and the pre-deterioration template holding ROM 411a, and is connected to output the restoration result to the image addition unit 415. The image adding unit 415 is connected to independently process the outputs from the band / color information restoring unit 414 and the least squares approximating unit 412, and outputs the respective processing results to the approximate image buffer 417.
Three image buffer 417a and single image buffer 4
17b.

【0142】三板画像バッファ417aおよび単板画像
バッファ417bは、入力画像バッファ408内の画像
と同じ画素数の画像を保持するほか、各画素に付きカウ
ンタを保持する。このカウンタは、それぞれのバッファ
の各画素位置に書き込みが行われた回数を保持するため
に設けられている。第1実施形態と同様に、それぞれの
バッファの各画素位置で複数の画素値が計算されるた
め、ここでは画像加算部415でそれらを平均化する処
理を行っている。この処理に書き込み回数が必要にな
る。
The three-plate image buffer 417a and the single-plate image buffer 417b hold an image having the same number of pixels as the image in the input image buffer 408, and also hold a counter for each pixel. This counter is provided to hold the number of times writing has been performed at each pixel position of each buffer. Similar to the first embodiment, since a plurality of pixel values are calculated at each pixel position in each buffer, here, the image adding unit 415 performs a process of averaging them. This process requires the number of times of writing.

【0143】単板画像バッファ417bは記憶している
内容を残差演算部418及び規則性判定部419を経て
残差加算部420に出力すべく接続されている。一方、
三板画像バッファ417aは記憶した内容を残差加算部
420に直接出力すべく接続されている。残差加算部4
20は処理結果を出力画像バッファ421に出力すべく
接続されている。
The single-chip image buffer 417b is connected to output the stored contents to the residual adding section 420 via the residual calculating section 418 and the regularity determining section 419. on the other hand,
The three-plate image buffer 417a is connected to directly output the stored contents to the residual adding unit 420. Residual adder 4
Reference numeral 20 is connected to output the processing result to the output image buffer 421.

【0144】以下に、上記した構成を有する画像処理シ
ステムの作用を説明する。
Hereinafter, the operation of the image processing system having the above configuration will be described.

【0145】電子カメラ400により撮像された被写体
像は、第1〜第3実施形態と同様に、レンズ402、水
晶フィルタ403により帯域制限を受け、劣化した光学
像として単板RGBランダム配列CCD404上に形成
される。単板RGBランダム配列CCD404は各画素
につき劣化画像のRGBのいずれか一つの色情報を取得
し、得られた画像をA/D変換部405を経てデジタル
画像信号として画像バッファ407に転送する。撮像が
終了すると、画像バッファ407内の画像情報は画像処
理装置401内の入力画像バッファ408に転送され、
さらに三板画像バッファ417a及び単板画像バッファ
417bの画素値及びカウンタはすべて0に初期化され
る その後、画像処理装置401では入力画像バッファ40
8内の画像情報の各画素位置(x,y)ごとに以下の処
理が行われる。
As in the first to third embodiments, the subject image picked up by the electronic camera 400 is band-limited by the lens 402 and the quartz filter 403, and becomes a degraded optical image on the single-chip RGB random array CCD 404. It is formed. The single-chip RGB random array CCD 404 acquires any one of RGB color information of the deteriorated image for each pixel, and transfers the obtained image to the image buffer 407 as a digital image signal via the A / D converter 405. When the imaging is completed, the image information in the image buffer 407 is transferred to the input image buffer 408 in the image processing device 401,
Further, the pixel values and counters of the three-plate image buffer 417a and the single-plate image buffer 417b are all initialized to 0.
The following processing is performed for each pixel position (x, y) of the image information in 8.

【0146】近傍読み出し部409により処理画素位置
を中心とする所定の矩形領域(例えば5×5画素)が近
傍画像 h(p,q) として読み込まれ、最小自乗近似部41
2内の最小自乗係数算出部412bに転送される。以下
の説明において、変数の組(p,q)は、この近傍画像
の中心画素(x,y)に対する相対座標であり、例えば
近傍の大きさが5×5であれば[−2,−1,0,1,
2]×[−2,−1,0,1,2]の範囲を動く。ま
た、場合によって色R,G,Bをそれぞれ整数値c=
0,1,2に対応させて説明する。
A predetermined rectangular area (for example, 5 × 5 pixels) centered on the processing pixel position is read by the neighborhood reading section 409 as a neighborhood image h (p, q), and the least square approximation section 41
2 is transferred to the least squares coefficient calculation unit 412b. In the following description, the set of variables (p, q) is a relative coordinate with respect to the center pixel (x, y) of the neighboring image. For example, if the size of the neighborhood is 5 × 5, [−2, −1] , 0,1,
2] × [−2, −1, 0, 1, 2]. In some cases, the colors R, G, and B are respectively set to integer values c =
Description will be made in correspondence with 0, 1, and 2.

【0147】最小自乗係数算出部412bは、劣化後テ
ンプレート保持ROM411bに予め記憶されているテ
ンプレートΦi(p,q) (i=0〜N−1)を順に読み出
し、転送された近傍画像h(p,q) の各色成分c(c=
0,1,2)について、順に近似誤差
The least squares coefficient calculating section 412b sequentially reads out templates Φi (p, q) (i = 0 to N-1) stored in advance in the degraded template holding ROM 411b, and transfers the transferred neighborhood image h (p , q) for each color component c (c =
0, 1, 2)

【数4】 (Equation 4)

【0148】を最小化する近似係数α(c) 、β(c) を計
算する。
Approximate coefficients α (c) and β (c) for minimizing the following are calculated.

【0149】ここで、mask(p,q,c) は、単板RGBラン
ダム配列CCD404上で、当該近傍画像内の座標(p,
q) に対応する位置に色成分cに対応する色フィルタが
存在すれば1、しなければ0をとるマスクであり、色成
分マスク生成部412aにより算出される。図3は近傍
画像における特定の色フィルタ配置に対応する色成分マ
スクを例示したものである。
Here, mask (p, q, c) is the coordinate (p, q, c) in the neighboring image on the single-chip RGB random array CCD 404.
If the color filter corresponding to the color component c exists at the position corresponding to q), the mask takes 1; otherwise, it takes 0, and is calculated by the color component mask generation unit 412a. FIG. 3 illustrates a color component mask corresponding to a specific color filter arrangement in a neighboring image.

【0150】近似誤差e(c) は近似誤差累積部412c
に出力され、近似誤差累積部412cでは近似誤差e
(c) を全色成分について累積加算し、累積近似誤差eと
してテンプレート決定部412eに転送する。また、近
似係数α(c) 、β(c) (c=0,1,2)は近似係数保
持バッファ412dに順に出力され、そこに保持され
る。
The approximation error e (c) is calculated by the approximation error accumulator 412c.
And the approximation error accumulating unit 412c outputs the approximation error e
(c) is cumulatively added for all color components, and transferred to the template determining unit 412e as a cumulative approximate error e. The approximate coefficients α (c) and β (c) (c = 0, 1, 2) are sequentially output to the approximate coefficient holding buffer 412d and held there.

【0151】テンプレート決定部412eには、それ以
前のテンプレートΦi′(p,q)(i′<i)に対する累積
近似誤差の最小値 min_e と最小値を与えたテンプレー
トのインデックス min_i が保持されている。テンプレ
ート決定部412eは、近似誤差累積部412cから転
送された誤差eを、内部に保持する誤差の最小値 min_
e と比較し、新たな誤差がより小さければ min_e をe
に、また min_i をiに更新する。
The template determination unit 412e holds the minimum value min_e of the cumulative approximation error with respect to the previous template Φi ′ (p, q) (i ′ <i) and the index min_i of the template that has given the minimum value. . The template determination unit 412e stores the error e transferred from the approximation error accumulation unit 412c as the minimum value
e, and if the new error is smaller,
And min_i is updated to i.

【0152】テンプレート決定部412eはまた誤差の
最小値を与えるテンプレートに関する近似係数もこれら
を min_α(c) および min_β(c) (c=0,1,2)
として保持しており、 min_e の更新と同時にこれらの
値も近似係数保持バッファ412dから読み込まれた近
似係数α(c) 、β(c) にそれぞれ更新される。
The template determining unit 412e also calculates the approximation coefficients for the template that gives the minimum value of the error by min_α (c) and min_β (c) (c = 0, 1, 2).
These values are updated to the approximate coefficients α (c) and β (c) read from the approximate coefficient holding buffer 412d at the same time as the update of min_e.

【0153】全ての劣化後テンプレートΦiが処理され
た後、テンプレート決定部412eに保持された近似係
数 min_α(c) 、min _β(c) (c=0,1,2)とイ
ンデックスmin _i が帯域・色情報復元部414に出力
される。同時に、テンプレート決定部412eはまず式
g(p,q,c) = min_α(c) Φ min_i(p,q)+ min_β
(c) によって当該近傍画像h(p,q) の色成分の欠落を補
正した画像g(p,q,c) を計算する。
After all the degraded templates Φi have been processed, the approximation coefficients min_α (c), min_β (c) (c = 0, 1, 2) and the index min_i stored in the template determination unit 412e are assigned to the band. -Output to the color information restoration unit 414. At the same time, the template determination unit 412e first calculates the expression g (p, q, c) = min_α (c) Φ min_i (p, q) + min_β
An image g (p, q, c) in which the missing color component of the neighboring image h (p, q) is corrected by (c) is calculated.

【0154】次に色成分マスク生成部412aにより算
出されたmask(p,q,c) を用いてカラー画像g(p,q,c) を
当該近傍画像における電子カメラ400の色フィルタ配
置に応じてサンプリングし、単板状態の画像g′(p,q)
を得て、画像加算部415に転送する。
Next, using the mask (p, q, c) calculated by the color component mask generation unit 412a, the color image g (p, q, c) is changed according to the color filter arrangement of the electronic camera 400 in the neighboring image. G ′ (p, q)
And transfers it to the image addition unit 415.

【0155】帯域・色情報復元部414は、転送された
インデックス min_i に対応する劣化前テンプレートΨ
min_i を劣化前テンプレート保持ROM411aから
読み出し、転送された近似係数 min_α(c) 、min _β
(c) (c=0,1,2)を用いて、近傍画像h(p,q) の
色成分の欠落を補正し、さらに帯域の劣化も補正した近
傍補正近似画像f(p,q,c) をf(p,q,c) = min_α(c)
Ψ min_i(p,q)+ min_β(c) (c=0,1,2)によ
り計算し、画像加算部415に転送する。
The band / color information restoring unit 414 determines the pre-deterioration template Ψ corresponding to the transferred index min_i.
min_i is read from the pre-deterioration template holding ROM 411a, and the transferred approximation coefficients min_α (c), min_β
(c) By using (c = 0, 1, 2), the missing color component of the neighboring image h (p, q) is corrected, and the vicinity correction approximate image f (p, q, c) by f (p, q, c) = min_α (c)
。 Calculated by min_i (p, q) + min_β (c) (c = 0,1,2) and transferred to the image adding unit 415.

【0156】処理の途中では、三板画像バッファ417
aおよび単板画像バッファ417bにおいて、それぞれ
各画素位置につき複数の近似画素値が得られるが、両バ
ッファではそれらの平均近似画素値が保持され、またこ
れまでに得られた近似画素値の個数がカウンタに保持さ
れるようになっている。これは、当該画素位置にこれま
でに書き込みが行われた回数に等しい。
During the processing, the three-plate image buffer 417
a and a single-plate image buffer 417b, a plurality of approximate pixel values are obtained for each pixel position. Both buffers hold their average approximate pixel values, and the number of approximate pixel values obtained so far is It is held in the counter. This is equal to the number of times writing has been performed on the pixel position so far.

【0157】画像加算部415では、帯域・色情報復元
部414からf(p,q,c) が転送されると、三板画像バッ
ファ417aから当該近傍画像に対応する領域内の各画
素の平均近似画素値Sf(p,q,c) 及びカウンタZf(p,
q) を読み出し、新しい平均近似画素値Sfnew (p,q,c)
を、計算式 Sfnew (p,q,c) =(Zf(p,q) ・Sf(p,q,c) +f
(p,q,c))/(Zf(p,q) +1) (c=0,1,2) によって、また新しいカウンタZfnew (p,q) の値を式 Zfnew (p,q) =Zf(p,q)+1 によって計算し、Sfnew (p,q,c) およびZfnew (p,
q) を三板画像バッファ417aの当該近傍画像に対す
る領域に書き戻す。
In the image adding section 415, when f (p, q, c) is transferred from the band / color information restoring section 414, the average approximation of each pixel in the area corresponding to the neighboring image is performed from the three-plate image buffer 417a. The pixel value Sf (p, q, c) and the counter Zf (p,
q) and read a new average approximate pixel value Sf new (p, q, c)
Is calculated by the following formula: Sf new (p, q, c) = (Zf (p, q) · Sf (p, q, c) + f
(p, q, c)) / (Zf (p, q) +1) (c = 0,1,2), and the value of the new counter Zf new (p, q) is calculated by the equation Zf new (p, q). = Zf (p, q) +1, and Sf new (p, q, c) and Zf new (p, q)
q) is written back to the area for the neighboring image in the three-plate image buffer 417a.

【0158】一方、画像加算部415にテンプレート決
定部412eからg′(p,q) が転送されると、画像加算
部415は単板画像バッファ417bから当該近傍画像
に対応する領域内の各画素の平均近似画素値Sg′(p,
q) 及びカウンタZg′(p,q)を読み出し、新しい平均近
似画素値Sg′new (p,q) を、計算式 Sg′new (p,q) =(Zg′(p,q) ・Sg′(p,q) +
g′(p,q))/(Zg′(p,q) +1) によって、新しいカウンタZg′new (p,q) の値を Zg′new (p,q) =Zg(p,q)+1 によって計算し、Sg′new (p,q) およびZg′
new (p,q) を単板画像バッファ417bの当該近傍画像
に対応する領域に書き戻す。
On the other hand, when g ′ (p, q) is transferred from the template determining unit 412 e to the image adding unit 415, the image adding unit 415 sends each pixel in the area corresponding to the neighboring image from the single-plate image buffer 417 b. Average approximate pixel value Sg ′ (p,
q) and the counter Zg ′ (p, q) are read, and a new average approximate pixel value Sg ′ new (p, q) is calculated by the following formula: Sg ′ new (p, q) = (Zg ′ (p, q) · Sg ′ (P, q) +
g ′ (p, q)) / (Zg ′ (p, q) +1), the value of the new counter Zg ′ new (p, q) is changed to Zg ′ new (p, q) = Zg (p, q) +1 Sg ′ new (p, q) and Zg ′
new (p, q) is written back to the area corresponding to the neighboring image in the single-chip image buffer 417b.

【0159】入力画像バッファ408内の画像の各画素
位置につき、以上の処理が終了すると、単板画像バッフ
ァ417bには、入力画像バッファ408内の画像をテ
ンプレートで近似し、色成分の欠落を補正した後に再び
単板RGBランダム配列CCD404の色フィルタ配置
でサンプリングした単板状態の近似画像が得られる。同
じく三板画像バッファ417aにはテンプレートで近似
され、色成分欠落と帯域劣化の補正を受けたカラー画像
が得られる。
When the above processing is completed for each pixel position of the image in the input image buffer 408, the image in the input image buffer 408 is approximated by the template in the single-plate image buffer 417b to correct the missing color component. After that, an approximate image in a single-plate state obtained again by sampling the color filters of the single-chip RGB random array CCD 404 is obtained. Similarly, the three-plate image buffer 417a is approximated by a template, and a color image corrected for missing color components and band degradation is obtained.

【0160】さらに、近似画像バッファ417内の画像
に対して以下の処理が行われる。
Further, the following processing is performed on the image in the approximate image buffer 417.

【0161】残差演算部418は、入力画像バッファ4
08内の画像の各画素位置(x,y)につき、その画素
位置を中心とする所定の大きさの近傍画像h(p,q) を読
み出す。同時に、単板画像バッファ417bから当該近
傍画像の領域に対応する画像を読み出し、h(p,q) との
差を計算し、残差画像d(p,q) として規則性判定部41
9に出力する。
[0161] The residual operation unit 418
For each pixel position (x, y) of the image in 08, a neighboring image h (p, q) of a predetermined size centered on the pixel position is read. At the same time, an image corresponding to the area of the neighboring image is read out from the single-chip image buffer 417b, a difference from h (p, q) is calculated, and the regularity determining unit 41 calculates the difference as a residual image d (p, q).
9 is output.

【0162】規則性判定部419は、入力した残差画像
d(p,q) が規則的構造を有する画像であるか否かを第3
実施形態と同様の判定基準で評価する。まずd(p,q) を
最大値1、最小値0に正規化し、ラプラシアンフィルタ
をかける。その結果を画像全体で自乗和し、所定の閾値
と比較する。閾値を下回る場合は規則的構造を有すると
判定し、残差画像の中心画素の値d(0,0) を残差加算部
420へ出力する。閾値を上回る場合はなにも転送しな
い。
The regularity judging section 419 determines whether or not the input residual image d (p, q) is an image having a regular structure.
Evaluation is made based on the same criteria as in the embodiment. First, d (p, q) is normalized to a maximum value 1 and a minimum value 0, and a Laplacian filter is applied. The result is sum of squares of the whole image and is compared with a predetermined threshold. If the difference is smaller than the threshold value, it is determined that the pixel has a regular structure, and the value d (0,0) of the central pixel of the residual image is output to the residual adding unit 420. If the value exceeds the threshold, nothing is transferred.

【0163】残差加算部420は、三板画像バッファ4
17aから入力画像バッファ408内の位置(x,y)
に対応する位置の画素値Sf(0,0,c) (c=0,1,
2)を読み出す。規則性判定部419から値d(0,0) が
転送されてきた場合には、d(0,0) から3色分の画素値
d′(0,0,c) を生成し、Sf(0,0,c) と各色c=0,1
2ごとに加算する。ここで、入力画像バッファ408内
の位置(x,y)に対応する単板RGBランダム配列C
CD404上の位置に存在する色フィルタの色をc′と
すると、d′(0,0,c) はd(0,0) から以下の式で計算さ
れる。
The residual adder 420 is a three-plate image buffer 4
17a to the position (x, y) in the input image buffer 408
Pixel value Sf (0,0, c) at the position corresponding to (c = 0,1,
Read out 2). When the value d (0,0) is transferred from the regularity determining unit 419, pixel values d '(0,0, c) for three colors are generated from d (0,0), and Sf ( 0,0, c) and each color c = 0,1
Add every two. Here, the single-chip RGB random array C corresponding to the position (x, y) in the input image buffer 408
Assuming that the color of the color filter existing at the position on the CD 404 is c ', d' (0,0, c) is calculated from d (0,0) by the following equation.

【0164】 d′(0,0,c) =d(0,0) (c=c′の時)D ′ (0,0, c) = d (0,0) (when c = c ′)

【数5】 (Equation 5)

【0165】すべての位置(x,y)についてこの処理
が終了すると、各画素位置でその近傍の幾何学的特徴に
テンプレート保持ROM411内のテンプレートが対応
できる範囲で色成分の欠落と帯域劣化が補正され、さら
に対応できない微細構造が輝度成分に反映されることに
より、出力画像バッファ421に電子カメラ400の光
学系による劣化と色の欠落が補正された3色カラー画像
が得られる。
When this processing is completed for all positions (x, y), the missing color components and the band degradation are corrected within a range in which the template in the template holding ROM 411 can correspond to the geometric feature in the vicinity at each pixel position. In addition, since the unsupported fine structure is reflected in the luminance component, a three-color image in which the deterioration and color loss due to the optical system of the electronic camera 400 are corrected is obtained in the output image buffer 421.

【0166】電子カメラ400に水晶フィルタ403が
なく帯域制限がなれていない場合には、テンプレート保
持ROM411が劣化前テンプレート保持ROM411
aのみからなり、最小自乗近似部412内の最小自乗係
数算出部412bが劣化前テンプレート保持ROM41
1aから入力を受けるように構成を変更する。この場
合、各部分の作用で特徴となるのは、最小自乗近似部4
12でテンプレートとしてΦiのかわりにΨiを用いる
点と、帯域・色情報復元部414の動作は同じだが、結
果として色成分の欠落は補正されるが帯域の劣化につい
てはなにもされない近傍補正近似画像f(p,q,c) が得ら
れる点のみである。その結果、入力画像バッファ408
内の画像の色成分の欠落のみが補正された3色カラー画
像が出力画像バッファ421に得られる。
If the electronic camera 400 does not have the crystal filter 403 and the band is not limited, the template holding ROM 411 stores the pre-deterioration template holding ROM 411.
a, the least-squares coefficient calculation unit 412 b in the least-squares approximation unit 412 stores the pre-deterioration template holding ROM 41.
The configuration is changed so as to receive an input from 1a. In this case, the feature of the operation of each part is that the least squares approximation unit 4
12, the operation of the band / color information restoring unit 414 is the same as that of using ii instead of Φi as a template, but as a result, the missing correction of the color component is corrected, but the deterioration of the band is not corrected. The only point is that the image f (p, q, c) is obtained. As a result, the input image buffer 408
The output image buffer 421 obtains a three-color image in which only the lack of the color components of the image in the image is corrected.

【0167】処理を高速化するために、近似画像バッフ
ァ417を設けない構成も可能である。この場合、最小
自乗近似部412は残差演算部418に直接出力し、帯
域・色情報復元部414は残差加算部420に直接出力
するため、画像加算部415も不要となる。作用として
は、入力画像バッファ408の各画素位置(x,y)に
つき、残差演算部418が最小自乗近似部412から転
送された単板状態の画像g′(p,q) と画素位置(x,
y)を中心とする近傍画像h(p,q) の差分を計算して規
則性判定部419に転送することと、帯域・色情報復元
部414が算出したf(p,q,c) の中心画素値f(0,0,c)
のみを残差加算部420に転送すること、および残差加
算部420ではSf(0,0,c) の代わりに帯域・色情報復
元部414から転送されたf(0,0,c) を用いてd′(0,
0,c) を計算すること、の三点のみが上記した第4実施
形態と異なる点である。これにより、補正の精度は落ち
るが記憶容量が少なく、より高速な処理が可能になる。
In order to speed up the processing, a configuration in which the approximate image buffer 417 is not provided is also possible. In this case, since the least square approximation unit 412 directly outputs to the residual calculation unit 418 and the band / color information restoration unit 414 directly outputs to the residual addition unit 420, the image addition unit 415 is also unnecessary. The operation is as follows. For each pixel position (x, y) of the input image buffer 408, the residual calculation unit 418 and the image g ′ (p, q) in the single-plate state transferred from the least square approximation unit 412 and the pixel position ( x,
The difference between the neighboring images h (p, q) centered on y) is calculated and transferred to the regularity determining unit 419, and the difference between f (p, q, c) calculated by the band / color information restoring unit 414 is calculated. Central pixel value f (0,0, c)
Is transferred to the residual adder 420, and the residual adder 420 replaces f (0,0, c) transferred from the band / color information restorer 414 instead of Sf (0,0, c). Using d '(0,
0, c) is different from the fourth embodiment described above. As a result, although the accuracy of the correction is reduced, the storage capacity is small, and higher-speed processing can be performed.

【0168】以下に、本発明の第5実施形態を説明す
る。図9は本発明の第5実施形態が適用される画像処理
システムの構成を示す図であり、電子カメラ500と画
像処理装置501とからなる。
Hereinafter, a fifth embodiment of the present invention will be described. FIG. 9 is a diagram showing a configuration of an image processing system to which the fifth embodiment of the present invention is applied, and includes an electronic camera 500 and an image processing device 501.

【0169】本実施形態の電子カメラ500では帯域制
限のために設けられていた水晶フィルタ203が設けら
れていない点を除けば第2実施形態における電子カメラ
200と同一の構成である。電子カメラ500内の画像
バッファ507の出力は、第3実施形態と同様に画像処
理装置501内の入力画像バッファ508に接続され、
入力画像バッファ508は近傍読み出し部509及び差
分計算部518に接続されている。
The electronic camera 500 of the present embodiment has the same configuration as the electronic camera 200 of the second embodiment except that the crystal filter 203 provided for band limitation is not provided. The output of the image buffer 507 in the electronic camera 500 is connected to the input image buffer 508 in the image processing device 501 as in the third embodiment.
The input image buffer 508 is connected to the neighborhood reading unit 509 and the difference calculation unit 518.

【0170】画像処理装置501は、入力画像バッファ
508と、近傍読み出し部509と、テンプレート選択
部510と、テンプレート保持ROM511と、最小自
乗近似部512と、単板画像生成部513と、色情報復
元部514と、三板画像加算部515aと、単板画像加
算部515bと、単板画像バッファ516と、出力画像
バッファ517と、差分計算部518と、差分画像バッ
ファ519と、規則性評価部520と、テンプレート生
成部521とを具備する。
The image processing device 501 includes an input image buffer 508, a neighborhood read unit 509, a template selection unit 510, a template holding ROM 511, a least square approximation unit 512, a single-plate image generation unit 513, and a color information restoration unit. Unit 514, three-plate image addition unit 515a, single-plate image addition unit 515b, single-plate image buffer 516, output image buffer 517, difference calculation unit 518, difference image buffer 519, and regularity evaluation unit 520. , A template generation unit 521.

【0171】図9において、近傍読み出し部509は入
力画像バッファ508および差分画像バッファ519の
出力を受けるべく接続され、かつ読み出した情報を規則
性評価部520に出力すべく接続されている。規則性評
価部520はテンプレート生成部521、三板画像加算
部515aおよび最小自乗近似部512に接続されてい
る。最小自乗近似部512は第2実施形態における構成
と同一の構成であり、テンプレート選択部510と規則
性評価部520の出力を受けるべく接続され、かつ処理
結果を単板画像生成部513及び色情報復元部514に
出力すべく接続されている。テンプレート選択部510
はテンプレート保持ROM511及びテンプレート生成
部521の出力を受けるべく接続され、かつ選択結果を
単板画像生成部513及び色情報復元部514に出力す
べく接続されている。
In FIG. 9, the neighborhood read unit 509 is connected to receive the outputs of the input image buffer 508 and the difference image buffer 519, and is connected to output the read information to the regularity evaluation unit 520. The regularity evaluation unit 520 is connected to the template generation unit 521, the three-plate image addition unit 515a, and the least square approximation unit 512. The least square approximation unit 512 has the same configuration as the configuration in the second embodiment, is connected to receive the outputs of the template selection unit 510 and the regularity evaluation unit 520, and outputs the processing result to the single-plate image generation unit 513 and the color information. It is connected to output to the restoration unit 514. Template selection section 510
Is connected to receive the output of the template holding ROM 511 and the template generation unit 521, and is connected to output the selection result to the single-plate image generation unit 513 and the color information restoration unit 514.

【0172】入力画像に水晶フィルタによる帯域劣化が
ないのでテンプレート保持ROM511にはこれまでの
実施形態と異なり帯域制限の劣化前と劣化後のテンプレ
ートを保持しない。そのかわり、所定のN種の幾何学的
特徴をもつ所定サイズのグレースケール画像がテンプレ
ートΦi(i=0〜N−1)として保持される。ここ
で、レンズ502による帯域劣化は通常、少ないとして
無視している。
Since the input image has no band deterioration due to the crystal filter, the template holding ROM 511 does not hold the templates before and after the band limit deterioration unlike the previous embodiments. Instead, a grayscale image of a predetermined size having predetermined N types of geometric features is stored as a template Φi (i = 0 to N−1). Here, band degradation due to the lens 502 is usually ignored because it is small.

【0173】色情報復元部514は三板画像加算部51
5aを経て出力画像バッファ517に接続されている。
単板画像生成部513は単板画像加算部515bを経て
単板画像バッファ516に接続されている。単板画像バ
ッファ516は差分計算部518に記憶内容を出力すべ
く接続され、差分計算部518は差分画像バッファ51
9に処理結果を出力すべく接続されている。
The color information restoring unit 514 includes the three-plate image adding unit 51
It is connected to an output image buffer 517 via 5a.
The veneer image generation unit 513 is connected to the veneer image buffer 516 via the veneer image addition unit 515b. The single-chip image buffer 516 is connected to output the stored contents to the difference calculation unit 518, and the difference calculation unit 518 is connected to the difference image buffer 51.
9 is connected to output the processing result.

【0174】単板画像バッファ516および出力画像バ
ッファ517は、入力画像バッファ508内の画像と同
じ画素数の画像を保持するが、その他に各画素につきカ
ウンタを保持する。このカウンタは、それぞれのバッフ
ァの各画素位置に書き込みが行われた回数を保持するた
めに設けられてる。第3実施形態と同様にそれぞれのバ
ッファの各画素位置で複数の画素値が計算されるため、
最終的にそれらを平均化する処理を行っている。この処
理に書き込み回数が必要になる。
The single-plate image buffer 516 and the output image buffer 517 hold images having the same number of pixels as the images in the input image buffer 508, but also hold a counter for each pixel. This counter is provided to hold the number of times data has been written to each pixel position in each buffer. Since a plurality of pixel values are calculated at each pixel position of each buffer as in the third embodiment,
Finally, a process for averaging them is performed. This process requires the number of times of writing.

【0175】以下に、上記した構成を有する画像処理シ
ステムの作用を説明する。
Hereinafter, the operation of the image processing system having the above configuration will be described.

【0176】電子カメラ500で撮像が行われ、レンズ
502による帯域劣化しか含まず、各画素位置につき一
つの色成分しか持たない画像がこれまでの実施形態と同
様に画像バッファ507に保持される。撮像が終了する
と、画像バッファ507内の画像は入力画像バッファ5
08に転送され、出力画像バッファ517および単板画
像バッファ516のカラー画像の画素値、及びカウンタ
はすべて0に初期化される。次に、2段階で補正処理が
行われる。1回目の処理では、入力画像バッファ508
内の画像の各画素位置(x,y)につき、以下の処理が
行われる。
An image is taken by the electronic camera 500, and an image including only the band degradation due to the lens 502 and having only one color component at each pixel position is held in the image buffer 507 as in the previous embodiments. When the imaging is completed, the image in the image buffer 507 is
08, the pixel values of the color image in the output image buffer 517 and the single image buffer 516, and the counter are all initialized to zero. Next, a correction process is performed in two stages. In the first processing, the input image buffer 508
The following processing is performed for each pixel position (x, y) of the image in the image.

【0177】近傍読み出し部509により当該画素位置
(x,y)の所定の矩形領域(例えば7×7画素)が近
傍画像h(p,q) として読み出される。以下の説明におい
て、変数の組(p,q)は、この近傍画像内の中心画素
(x,y)に対する相対座標であり、例えば近傍の大き
さが7×7であれば[−3,−2,−1,0,1,2,
3]×[−3,−2,−1,0,1,2,3]の範囲を
動く、また、場合によって色R,G,Bをそれぞれ整数
値c=0,1,2に対応させて説明する。
A predetermined rectangular area (for example, 7 × 7 pixels) at the pixel position (x, y) is read as a neighboring image h (p, q) by the neighboring reading unit 509. In the following description, the set of variables (p, q) is a relative coordinate with respect to the center pixel (x, y) in the neighboring image. For example, if the size of the neighborhood is 7 × 7, [-3,- 2, -1,0,1,2,
3] × [−3, −2, −1, 0, 1, 2, 3]. In some cases, colors R, G, and B correspond to integer values c = 0, 1, 2, respectively. Will be explained.

【0178】読み出された近傍画像は規則性評価部52
0に送られるが、そこではなにも処理を受けずに最小自
乗近似部512に転送される。テンプレート生成部52
1には1回目の処理ではなにも転送しない。
The read neighboring image is sent to the regularity evaluation section 52.
0, where it is transferred to the least squares approximation unit 512 without any processing. Template generator 52
No. 1 is not transferred in the first processing.

【0179】テンプレート生成部521は、近傍画像が
転送されてくるとその画像をグレースケール画像とみな
してエッジを保ったまま平滑化し、新たなテンプレート
を作成しテンプレート選択部510に転送する機能を持
つが、1回目の処理にはなにもしない。
When a nearby image is transferred, the template generating section 521 regards the image as a grayscale image, smoothes the image while maintaining the edge, creates a new template, and transfers the template to the template selecting section 510. However, nothing is performed in the first processing.

【0180】テンプレート選択部510では、接続して
いる他の構成要素からi番目のテンプレートの読み出し
要求があった場合には、テンプレート生成部521から
テンプレートが転送されてきている場合はそのテンプレ
ートを返し、なにも転送されていない場合はテンプレー
ト保持ROM511からi番目のテンプレートΦiを読
み出す機能を持つ。1回目の処理では、テンプレート生
成部521からなにも転送されないのでテンプレート保
持ROM511にアクセスすることになる。
The template selecting section 510 returns the template when the template is transferred from the template generating section 521 when there is a read request for the i-th template from another connected component. In the case where nothing has been transferred, it has a function of reading the i-th template Φi from the template holding ROM 511. In the first process, since nothing is transferred from the template generation unit 521, the template holding ROM 511 is accessed.

【0181】最小自乗計数算出部512は、近傍画像が
転送されると図5に示されたフローに従って処理を行
い、これまでの実施形態と同様に近傍画像を最もよく近
似するテンプレートのインデックス min_i と近似係数
min_α(c) 、 min_β(c) とを算出し、単板画像生成
部513と色情報復元部514に転送する。
When the neighborhood image is transferred, the least squares count calculation unit 512 performs the processing according to the flow shown in FIG. 5, and similarly to the previous embodiments, the index of the template min_i that best approximates the neighborhood image and Approximation coefficient
Calculate min_α (c) and min_β (c) and transfer them to the single-plate image generation unit 513 and the color information restoration unit 514.

【0182】色情報復元部514では、画素ごとの色成
分の欠落を修復するために、式 g(p,q,c) = min_α(c) Φ min_i(p,q)+ min_β
(c) (c=0,1,2) に従って、近傍画像h(p,q) の色成分の欠落を近似的に
埋めた3色画像g(p,q,c) を生成し、三板画像加算部5
15aに転送する。
In the color information restoring unit 514, in order to restore missing color components for each pixel, the following expression is used: g (p, q, c) = min_α (c) Φ min_i (p, q) + min_β
(c) According to (c = 0,1,2), a three-color image g (p, q, c) in which the missing color component of the neighboring image h (p, q) is approximately filled is generated, and a three-plate image Adder 5
15a.

【0183】単板画像生成部513では、色情報復元部
514と同様に近傍画像h(p,q) の色成分の欠落を近似
的に埋めた3色画像g(p,q,c) を計算するが、さらにg
(p,q,c) を当該近傍画像における電子カメラ500の色
フィルタ配置に応じてサンプリングした画像g′(p,q)
を生成する。そして、g′(p,q) を単板画像加算部51
5bに転送する。
The single-plate image generation unit 513 converts the three-color image g (p, q, c) in which the missing color components of the neighboring image h (p, q) are approximately filled in, similarly to the color information restoration unit 514. Calculate, but also g
An image g ′ (p, q) obtained by sampling (p, q, c) according to the color filter arrangement of the electronic camera 500 in the vicinity image
Generate Then, g ′ (p, q) is added to the single-plate image adding unit 51.
5b.

【0184】処理の途中では、出力画像バッファ517
および単板画像バッファ516において、それぞれ各画
素位置につき複数の近似画素値が得られるが、両バッフ
ァではそれらの平均近似画素値が保持され、またこれま
でに得られた近似画素値の個数(=書き込み回数)がカ
ウンタに保持されるようになっている。
During the processing, the output image buffer 517
A plurality of approximate pixel values are obtained for each pixel position in the single-plate image buffer 516, and the average approximate pixel values are held in both buffers, and the number of approximate pixel values obtained so far (= The number of times of writing is held in the counter.

【0185】三板画像加算部515aでは、画像出力バ
ッファ517から当該近傍画像に対応する領域内の各画
素の平均近似画素値Sg(p,q,c) 及びカウンタZg(p,
q) が読み出され、転送されたg(p,q,c) を用いて新し
い平均近似画素値Sgnew (p,q,c) が計算式 Sgnew (p,q,c) =(Zg(p,q) ・Sg(p,q,c) +g
(p,q,c))/(Zg(p,q) +1)(c=0,1,2) によって計算され、また新しいカウンタZgnew (p,q)
の値が式 Zgnew (p,q) =Zg(p,q) +1 によって計算され、Sgnew (p,q,c) およびZg
new (p,q) が画像出力バッファ517の当該近傍画像に
対応する領域に書き戻される。
In the three-plate image adding unit 515a, the average approximate pixel value Sg (p, q, c) of each pixel in the area corresponding to the neighboring image from the image output buffer 517 and the counter Zg (p,
q) is read out, and a new average approximate pixel value Sg new (p, q, c) is calculated by using the transferred g (p, q, c), and a calculation formula Sg new (p, q, c) = (Zg (p, q) Sg (p, q, c) + g
(p, q, c)) / (Zg (p, q) +1) (c = 0,1,2) and a new counter Zg new (p, q)
Is calculated by the equation Zg new (p, q) = Zg (p, q) +1, and Sg new (p, q, c) and Zg
new (p, q) is written back to the area of the image output buffer 517 corresponding to the neighboring image.

【0186】一方、単板画像加算部515bでは、三板
画像加算部515aと同様に単板画像バッファ516の
当該近傍画像に対応する領域から平均近似画素値Sg′
(p,q) 及びカウンタZg′(p,q) が読み出され、転送さ
れたg′(p,q) を用いて新しい平均近似画素値Sg′
new (p,q) が計算式 Sg′new (p,q) =(Zg′(p,q) ・Sg′(p,q) +
g′(p,q))/(Zg′(p,q) +1) によって計算され、また新しいカウンタZg′new (p,
q) の値が Zg′new (p,q) =Zg′(p,q) +1 によって計算され、Sg′new (p,q) およびZg′new
(p,q) が単板画像バッファ516の当該近傍画像に対応
する領域に書き戻される。
On the other hand, the single-panel image addition unit 515b calculates the average approximate pixel value Sg 'from the region corresponding to the neighboring image in the single-panel image buffer 516, as in the three-panel image addition unit 515a.
(p, q) and the counter Zg '(p, q) are read out, and a new average approximate pixel value Sg' is obtained using the transferred g '(p, q).
new (p, q) is calculated by Sg ′ new (p, q) = (Zg ′ (p, q) · Sg ′ (p, q) +
g ′ (p, q)) / (Zg ′ (p, q) +1) and a new counter Zg ′ new (p,
q) is calculated by Zg ′ new (p, q) = Zg ′ (p, q) +1, and Sg ′ new (p, q) and Zg ′ new
(p, q) is written back to the area of the single-chip image buffer 516 corresponding to the neighboring image.

【0187】入力画像バッファ508内の画像の各画素
位置につき、以上の処理が終了すると、単板画像バッフ
ァ516には、入力画像バッファ内508の画像をテン
プレート保持ROM511内のテンプレートで近似し、
色成分の欠落を補正した後、さらに単板ベイヤー配列C
CD504の色フィルタ配置でサンプリングした状態の
画像が得られる。同じく出力画像バッファ517にはテ
ンプレート保持ROM511内のテンプレートで近似さ
れ、色成分の欠落が補正されたカラー画像が得られる。
1回目の処理の最後に、差分計算部518は単板画像バ
ッファ516と入力画像バッファ508の差分をとり、
近似誤差を表す差分画像を差分画像バッファ519に出
力する。
When the above processing is completed for each pixel position of the image in the input image buffer 508, the image in the input image buffer 508 is approximated to the single-plate image buffer 516 by the template in the template holding ROM 511.
After compensating for the lack of color components, the single-layer Bayer array C
An image sampled by the color filter arrangement of the CD 504 is obtained. Similarly, in the output image buffer 517, a color image approximated by the template in the template holding ROM 511 and a missing color component is corrected is obtained.
At the end of the first processing, the difference calculation unit 518 calculates the difference between the single-plate image buffer 516 and the input image buffer 508,
The difference image representing the approximation error is output to the difference image buffer 519.

【0188】2回目の処理では、入力画像バッファ50
8の各画素位置(x,y)につき、以下の処理を行う。
In the second processing, the input image buffer 50
The following processing is performed for each pixel position (x, y) of No. 8.

【0189】近傍読み出し部509により当該画素位置
(x,y)を中心とする一回目と同じサイズの矩形領域
が再び近傍画像h(p,q) として読み出される。同時に、
差分画像バッファ519の近傍画像に対応する領域が差
分近傍画像d(p,q) として読み出される。二つの画像は
規則性評価部520に転送される。
A rectangular area having the same size as the first time around the pixel position (x, y) is read again as a neighboring image h (p, q) by the neighboring reading unit 509. at the same time,
The area corresponding to the neighboring image in the difference image buffer 519 is read as the difference neighboring image d (p, q). The two images are transferred to the regularity evaluation unit 520.

【0190】規則性評価部520では、1回目の処理と
異なり差分近傍画像d(p,q) の規則性を調べる。評価の
基準には、画像を最大値1、最小値0に正規化した画像
にラプラシアンフィルタをかけ、その結果について画像
全体に対する自乗和をとった値をノイズ尺度として利用
する。d(p,q) に対するノイズ尺度L1を求め、さらに
ホワイトノイズからなる画像に対してどの程度規則的か
を判断するために、各画素値が最大値1、最小値0、平
均値0.5の白色雑音を生じる乱数により生成されたd
(p,q) と同一サイズの画像に対してあらかじめ計算した
ノイズ尺度L0を用いて、相対ノイズ尺度Lを式L=
(1−L1/L0)により算出する。
The regularity evaluation section 520 examines the regularity of the difference neighboring image d (p, q) unlike the first processing. As a criterion for evaluation, a Laplacian filter is applied to an image obtained by normalizing the image to a maximum value of 1 and a minimum value of 0, and a value obtained by taking the sum of squares of the result with respect to the entire image is used as a noise measure. To determine a noise measure L1 for d (p, q), and to determine how regular an image composed of white noise is, each pixel value has a maximum value of 1, a minimum value of 0, and an average value of 0.5. Generated by a random number that produces white noise
Using the noise scale L0 calculated in advance for an image of the same size as (p, q), the relative noise scale L is calculated by the equation L =
It is calculated by (1-L1 / L0).

【0191】相対ノイズ尺度Lは、0〜1の範囲でd
(p,q) の規則性を表す。Lが所定の閾値以下であれば、
d(p,q) はノイズであるとしてなにもしない。所定の閾
値以上であれば、d(p,q) をテンプレート生成部521
に転送し、h(p,q) を最小自乗近似部512に転送し、
また、相対ノイズ尺度Lを三板画像加算部515aに転
送する。
The relative noise scale L is d in the range of 0 to 1.
Represents the regularity of (p, q). If L is equal to or less than a predetermined threshold,
d (p, q) does nothing because it is noise. If it is equal to or greater than the predetermined threshold, d (p, q)
And h (p, q) to the least squares approximation unit 512,
Further, the relative noise measure L is transferred to the three-plate image adding unit 515a.

【0192】テンプレート生成部521は、1回目の処
理とは異なり、転送されたd(p,q)をグレースケール画
像とみなしてエッジを保ったまま平滑化し、新たなテン
プレートΦ′(p,q) を作成しテンプレート選択部510
に転送する。
Unlike the first processing, the template generating section 521 regards the transferred d (p, q) as a grayscale image, smoothes it while keeping the edge, and creates a new template Φ ′ (p, q ) And a template selection unit 510
Transfer to

【0193】テンプレート選択部510では、転送され
たテンプレートΦ′(p,q) を新たなテンプレート集合に
設定し、以後他の構成要素からテンプレートの読み出し
要求があった場合、Φ′(p,q) を返す。
The template selection unit 510 sets the transferred template Φ ′ (p, q) as a new template set, and thereafter, when there is a template read request from another component, Φ ′ (p, q) ) return it.

【0194】最小自乗係数算出部512は、近傍画像h
(p,q) が転送されると1回目と同様の処理を行い、近傍
画像h(p,q) を最もよく近似するテンプレートのインデ
ックス min_i と近似係数 min_α(c) 、 min_β(c)
とを算出し、色情報復元部514のみに転送する。ただ
し、最小自乗係数算出部512が読み出すテンプレート
はテンプレート選択部510によってΦ′(p,q) の一つ
に限られているので、min_α(c) 、 min_β(c) は、
テンプレートΦ′(p,q) で近傍画像h(p,q) を近似する
場合の最適な近似係数を意味する。
The least square coefficient calculating section 512 calculates the neighborhood image h
When (p, q) is transferred, the same processing as the first time is performed, and the index min_i of the template that best approximates the neighboring image h (p, q) and the approximation coefficients min_α (c), min_β (c)
Is calculated and transferred to only the color information restoring unit 514. However, since the template read out by the least square coefficient calculating unit 512 is limited to one of Φ ′ (p, q) by the template selecting unit 510, min_α (c) and min_β (c) are
This means an optimum approximation coefficient when the neighborhood image h (p, q) is approximated by the template Φ ′ (p, q).

【0195】色情報復元部514における処理は、1回
目の処理と異なり、近傍画像h(p,q) の中心画素h(0,
0) における欠落色成分の回復のみを行う。具体的に
は、式 g(0,0,c) = min_α(c) Φ′(p,q) + min_β(c)
(c=0,1,2) に従って、h(0,0) に対応する色成分の回復された画素
値g(0,0,c) (c=0,1,2)を生成し、三板画像加
算部515aに転送する。
The processing in the color information restoring unit 514 differs from the first processing in that the center pixel h (0,
Only the missing color component in step (0) is recovered. Specifically, the equation g (0,0, c) = min_α (c) Φ ′ (p, q) + min_β (c)
According to (c = 0,1,2), a recovered pixel value g (0,0, c) (c = 0,1,2) of a color component corresponding to h (0,0) is generated, and The data is transferred to the image addition unit 515a.

【0196】出力画像バッファ517の近傍画像h(p,
q) に対応する領域内の各画素では、1回目の処理でテ
ンプレート保持ROM511内のテンプレートにより近
似されて求められた3色の画素値Sg(p,q,c) (c=
0,1,2)が保持されている。三板画像加算部515
aでは、画像出力バッファ517の近傍画像h(p,q) の
中心画素の位置に対応する位置の画素値Sg(0,0,c)
(c=0,1,2)を読み出し、規則性評価部520か
ら転送されてきた相対ノイズ尺度Lを用いて、以前の近
似結果Sg(0,0,c) と二回目の近似結果g(0,0,c) の重
み付き和をとる。式 Sgnew (0,0,c) =(1−L)・Sg(0,0,c) +L・g
(0,0,c) (c=0,1,2) により当該画素位置の新しい値Sgnew (0,0,c) (c=
0,1,2)を計算し、画像出力バッファ517に書き
戻す。入力画像バッファの各画素位置につき、2回目の
処理が終了すると、出力画像バッファ517には色成分
の欠落が回復された3色カラー画像が得られる。
The neighboring image h (p, p) in the output image buffer 517
For each pixel in the area corresponding to q), the pixel values Sg (p, q, c) (c = 3) of the three colors obtained by approximation by the template in the template holding ROM 511 in the first processing are obtained.
0, 1, 2) are held. Three-plate image addition unit 515
In a, the pixel value Sg (0,0, c) at the position corresponding to the position of the center pixel of the neighboring image h (p, q) in the image output buffer 517
(C = 0, 1, 2), and using the relative noise scale L transferred from the regularity evaluation unit 520, the previous approximation result Sg (0,0, c) and the second approximation result g ( Take the weighted sum of 0,0, c). Formula Sg new (0,0, c) = (1−L) · Sg (0,0, c) + L · g
(0,0, c) (c = 0,1,2) gives a new value Sg new (0,0, c) (c =
(0, 1, 2) is calculated and written back to the image output buffer 517. When the second processing is completed for each pixel position in the input image buffer, a three-color image in which the lack of color components has been recovered is obtained in the output image buffer 517.

【0197】以下に本発明の第6実施形態を説明する。
図10〜12は第6実施形態を説明するための図であ
り、図10は本実施形態が適用される画像処理システム
の構成を示す図であり、図11は図10中合成最小自乗
近似部612の詳細図であり、図12は図10中合成最
小自乗近似部612の作用の説明図である。
Hereinafter, a sixth embodiment of the present invention will be described.
10 to 12 are diagrams for explaining the sixth embodiment, FIG. 10 is a diagram showing a configuration of an image processing system to which the present embodiment is applied, and FIG. 11 is a composite least square approximation unit in FIG. FIG. 12 is a detailed diagram of FIG. 612, and FIG. 12 is an explanatory diagram of the operation of the combined least squares approximation unit 612 in FIG.

【0198】図10において、本実施形態の画像処理シ
ステムは電子カメラ600と画像処理装置601とから
なり、電子カメラ600は、第4実施形態における電子
カメラ400と同一の構成である。電子カメラ600内
の画像バッファ607は画像処理装置601内の入力画
像バッファ608に接続されている。電子カメラ600
内の単板RGBランダム配列フィルタCCD604の色
フィルタ配置に関する情報は第4実施形態と同様にあら
かじめ画像処理装置601内の色成分マスク生成部61
2aに保持されている。
In FIG. 10, the image processing system according to the present embodiment includes an electronic camera 600 and an image processing device 601, and the electronic camera 600 has the same configuration as the electronic camera 400 according to the fourth embodiment. An image buffer 607 in the electronic camera 600 is connected to an input image buffer 608 in the image processing device 601. Electronic camera 600
The information regarding the color filter arrangement of the single-chip RGB random array filter CCD 604 in the color component mask generation unit 61 in the image processing device 601 is previously stored in the same manner as in the fourth embodiment.
2a.

【0199】画像処理装置601は、入力画像バッファ
608と、近傍読み出し部609と、劣化前テンプレー
ト保持ROM611a及び劣化後テンプレート保持RO
M611bを具備するテンプレート保持ROM611
と、合成最小自乗近似部612と、帯域・色情報復元部
614と、三板画像加算部615と、出力画像バッファ
616とを具備する。
The image processing apparatus 601 includes an input image buffer 608, a neighborhood reading unit 609, a pre-deterioration template holding ROM 611a and a post-deterioration template holding RO.
Template holding ROM 611 including M611b
, A combined least squares approximation unit 612, a band / color information restoration unit 614, a three-plate image addition unit 615, and an output image buffer 616.

【0200】また、図10に示す合成最小自乗近似部6
12は、図11に示すように、色成分マスク生成部61
2aと、最小自乗係数算出部612bと、近似誤差累積
部612cと、近似係数保持バッファ612dと、テン
プレート決定部612eと、近傍画像バッファ612f
と、テンプレート累積部612gと、テンプレート合成
部612hと、最小自乗係数算出部612iと、近似誤
差累積部612jと、近似係数保持バッファ612kと
を具備する。この合成最小自乗近似部612はさらに近
傍画像入力端子612rと、テンプレート入力端子61
2pと、近似パラメータ出力端子612sとを有してい
る。
The composite least squares approximation unit 6 shown in FIG.
12 is a color component mask generation unit 61 as shown in FIG.
2a, a least squares coefficient calculating unit 612b, an approximate error accumulating unit 612c, an approximate coefficient holding buffer 612d, a template determining unit 612e, and a nearby image buffer 612f.
, A template accumulating section 612g, a template synthesizing section 612h, a least square coefficient calculating section 612i, an approximate error accumulating section 612j, and an approximate coefficient holding buffer 612k. The composite least squares approximation unit 612 further includes a neighborhood image input terminal 612r and a template input terminal 61
2p and an approximate parameter output terminal 612s.

【0201】入力画像バッファ608は近傍読み出し部
609に接続され、近傍読み出し部609は近傍画像入
力端子612rを経て合成最小自乗近似部612内の近
傍画像バッファ612fに接続されている。合成最小自
乗近似部612は、テンプレート入力端子612pを介
して劣化後テンプレート保持ROM611bに接続され
るとともに、近似パラメータ出力端子612sを介して
帯域・色情報復元部614に接続されている。
The input image buffer 608 is connected to the neighborhood read section 609, and the neighborhood read section 609 is connected to the neighborhood image buffer 612f in the composite least squares approximation section 612 via the neighborhood image input terminal 612r. The combined least squares approximation unit 612 is connected to the post-deterioration template holding ROM 611b via the template input terminal 612p, and is connected to the band / color information restoration unit 614 via the approximation parameter output terminal 612s.

【0202】テンプレート保持ROM611の構成と、
テンプレート保持ROM611、帯域・色情報復元部6
14、三板画像加算部615および出力画像バッファ6
16間の接続関係は、第1実施形態と同一である。
The structure of the template holding ROM 611,
Template holding ROM 611, band / color information restoring unit 6
14. Three-plate image adder 615 and output image buffer 6
The connection relation between 16 is the same as that of the first embodiment.

【0203】本実施形態では、第1実施形態と同様に、
処理中に各画素につき複数の補正値が計算されるため、
それらを各補正値の信頼性に基づいて重みつき平均す
る。そのため、出力画像バッファ616は、各画素位置
において画像データ以外に重みつき平均の計算に必要な
信頼値を保持する。
In this embodiment, similar to the first embodiment,
Since multiple correction values are calculated for each pixel during processing,
These are weighted and averaged based on the reliability of each correction value. Therefore, the output image buffer 616 holds a confidence value required for calculating a weighted average in addition to image data at each pixel position.

【0204】合成最小自乗近似部612内の近傍画像バ
ッファ612fは近傍画像入力端子612rを介して近
傍読み出し部609の出力を受けるべく接続され、かつ
記憶している情報を最小自乗係数算出部612b及び6
12iに出力すべく接続されている。最小自乗係数算出
部612bは近傍画像バッファ612fのほかに、色成
分マスク生成部612a及びテンプレート入力端子61
2p経由で劣化後テンプレート保持ROM611bの出
力を受けるべく接続され、かつ処理結果を近似係数保持
バッファ612d及び近似誤差累積部612cに出力す
べく接続されている。
The neighborhood image buffer 612f in the composite least squares approximation section 612 is connected to receive the output of the neighborhood read section 609 via the neighborhood image input terminal 612r, and stores the stored information into the least square coefficient calculation section 612b and 6
12i for output. The least square coefficient calculation unit 612b includes a color component mask generation unit 612a and a template input terminal 61 in addition to the neighborhood image buffer 612f.
It is connected to receive the output of the post-degradation template holding ROM 611b via 2p, and is connected to output the processing result to the approximation coefficient holding buffer 612d and the approximation error accumulating unit 612c.

【0205】テンプレート累積部612gは近似係数保
持バッファ612d及び近似誤差累積部612cの出力
を受けるべく接続され、かつ累積結果をテンプレート合
成部612hに出力すべく接続されている。テンプレー
ト合成部612hは合成結果を最小自乗係数算出部61
2iおよびテンプレート決定部612eに出力すべく接
続されている。
The template accumulation unit 612g is connected to receive the outputs of the approximation coefficient holding buffer 612d and the approximation error accumulation unit 612c, and is connected to output the accumulation result to the template synthesis unit 612h. The template synthesizing unit 612h outputs the synthesis result to the least square coefficient calculating unit 61.
2i and a template determination unit 612e.

【0206】最小自乗係数算出部612iはテンプレー
ト合成部612hのほかに、色成分マスク生成部612
a及び近傍画像バッファ612fの出力を受けるべく接
続され、かつ処理結果を近似係数保持バッファ612k
及び近似誤差累積部612jに出力すべく接続されてい
る。近似係数保持バッファ612k及び近似誤差累積部
612jは共にテンプレート決定部612eに接続さ
れ、テンプレート決定部612eは近似パラメータ出力
端子612sを経て帯域・色情報復元部614に接続さ
れている。
The least square coefficient calculating section 612i includes a color component mask generating section 612 in addition to the template synthesizing section 612h.
a and the output of the neighboring image buffer 612f, and the processing result is stored in the approximate coefficient holding buffer 612k.
And to the approximation error accumulator 612j. The approximation coefficient holding buffer 612k and the approximation error accumulating unit 612j are both connected to the template determining unit 612e, and the template determining unit 612e is connected to the band / color information restoring unit 614 via the approximate parameter output terminal 612s.

【0207】以下に上記した構成の画像処理システムの
作用を説明する。
The operation of the image processing system having the above configuration will be described below.

【0208】電子カメラ600により撮像された被写体
像は、これまでの第1乃至第4実施形態と同様に、レン
ズ602、水晶フィルタ603により帯域制限を受け、
劣化した光学像として単板RGBランダム配列CCD6
04上に形成される。単板RGBランダム配列CCD6
04は各画素につき劣化画像のRGBのいずれか一つの
色情報を取得し、得られた画像をA/D変換部605を
経てデジタル画像信号として画像バッファ607に転送
する。撮像が終了すると、画像バッファ607内の画像
情報は画像処理装置601内の入力画像バッファ608
に転送され、さらに出力画像バッファ616の画素値及
び信頼値はすべて0に初期化される。
The subject image picked up by the electronic camera 600 is band-limited by the lens 602 and the crystal filter 603 as in the first to fourth embodiments.
Single-chip RGB random array CCD6 as a deteriorated optical image
04 is formed. Single-chip RGB random array CCD6
Reference numeral 04 obtains any one of RGB color information of the deteriorated image for each pixel, and transfers the obtained image to the image buffer 607 as a digital image signal via the A / D converter 605. When the imaging is completed, the image information in the image buffer 607 is stored in the input image buffer 608 in the image processing device 601.
And the pixel values and the reliability values of the output image buffer 616 are all initialized to zero.

【0209】その後、入力画像バッファ608内の画像
情報の各画素位置(x,y)ごとに以下の処理が行われ
る。
After that, the following processing is performed for each pixel position (x, y) of the image information in the input image buffer 608.

【0210】近傍読み出し部609により処理画素位置
(x,y)を中心とする所定の矩形領域(例えば5×5
画素)が近傍画像h(p,q) として読み出され、合成最小
自乗近似部612に転送される。以下の説明において、
変数の組(p,q)は、この近傍画像の中心画素(x,
y)に対する相対座標であり、例えば近傍の大きさが5
×5であれば[−2,−1,0,1,2]×[−2,−
1,0,1,2]の範囲を動く、また、場合によって色
R,G,Bをそれぞれ整数値c=0,1,2に対応させ
て説明する。
[0210] A predetermined rectangular area (for example, 5 x 5) centered on the processing pixel position (x, y) is detected by the neighborhood read unit 609.
The pixel is read as the neighboring image h (p, q) and transferred to the composite least squares approximation unit 612. In the following description,
The set of variables (p, q) is the central pixel (x,
y), for example, when the size of the neighborhood is 5
If it is × 5, [−2, −1, 0, 1, 2] × [−2, −
[1, 0, 1, 2], and the colors R, G, and B may be associated with integer values c = 0, 1, and 2, respectively.

【0211】近傍読み出し部609で読みだされた近傍
画像h(p,q) は、合成最小自乗近似部612内の近傍画
像バッファ612fに転送される。近傍画像バッファ6
12fにh(p,q) が転送されると、その一方で単板RG
Bランダム配列CCD604上で、当該近傍画像内の座
標(p,q) に対応する位置に色成分cに対応する色フィル
タが存在すれば1、存在しなければ0をとる変数mask
(p,q,c) が色成分マスク生成部612aにより算出さ
れ、その内部に保持される。図3は近傍画像におけるあ
る特定の色フィルタ配置に対応する色成分マスクを例示
したものである。
The neighborhood image h (p, q) read by the neighborhood reading unit 609 is transferred to the neighborhood image buffer 612f in the composite least squares approximation unit 612. Nearby image buffer 6
When h (p, q) is transferred to 12f, on the other hand, veneer RG
A variable mask that takes 1 if a color filter corresponding to the color component c exists at a position corresponding to the coordinates (p, q) in the neighboring image on the B random array CCD 604, and takes 0 otherwise.
(p, q, c) is calculated by the color component mask generation unit 612a and is stored therein. FIG. 3 illustrates a color component mask corresponding to a specific color filter arrangement in a neighboring image.

【0212】最小自乗係数算出部612bは、劣化後テ
ンプレート保持ROM611bに予め記憶されているテ
ンプレートΦi(p,q) (i=0〜N−1)を順に読み出
し、近傍画像バッファ612fより転送された近傍画像
h(p,q) の各色成分c(c=0,1,2)について、変
数mask(p,q,c) を用いて、順に近似誤差
The least square coefficient calculating section 612b sequentially reads out templates Φi (p, q) (i = 0 to N-1) stored in advance in the degraded template holding ROM 611b, and transfers the templates Φi (p, q) (i = 0 to N-1) from the neighboring image buffer 612f. For each color component c (c = 0,1,2) of the neighboring image h (p, q), an approximation error is sequentially obtained using the variable mask (p, q, c).

【数6】 (Equation 6)

【0213】を最小化する近似係数α(c) 、β(c) を計
算する。
Approximate coefficients α (c) and β (c) for minimizing are calculated.

【0214】近似誤差e(c) は近似誤差累積部612c
に出力され、近似誤差累積部612cでは近似誤差e
(c) を全色成分について累積加算し、累積近似誤差eと
してテンプレート累積部612gに転送する。また、近
似係数α(c) 、β(c) (c=0,1,2)は近似係数保
持バッファ612dに順に出力され、そこに保持され
る。テンプレート累積部612gには、N行のテーブル
Tが保持される。
The approximation error e (c) is calculated by the approximation error accumulator 612c.
And the approximation error accumulating unit 612c outputs the approximation error e
(c) is cumulatively added for all color components, and is transferred to the template accumulating unit 612g as a cumulative approximation error e. The approximate coefficients α (c) and β (c) (c = 0, 1, 2) are sequentially output to the approximate coefficient holding buffer 612d and held there. The template accumulation unit 612g holds a table T of N rows.

【0215】図12は合成最小自乗近似部の作用を説明
するための図であり、(a)は任意の近傍画像を示し、
(b)は0からN−1までのN個のテンプレートを示
し、(c)はテーブルTであり、(d)はソート後のテ
ーブルTであり、(e)は集合Vであり、(f)は変数
Uであり、(g)は合成テンプレートである。
FIGS. 12A and 12B are diagrams for explaining the operation of the composite least squares approximation unit. FIG. 12A shows an arbitrary neighboring image.
(B) shows N templates from 0 to N-1, (c) is a table T, (d) is a sorted table T, (e) is a set V, (f) ) Is a variable U, and (g) is a composite template.

【0216】図12(c)に示すようにテーブルTに
は、それまでの各テンプレートΦi′(p,q)(i′<i)
のインデックスi′、Φi′(p,q) に対応する累積近似
誤差、および近似係数が(i′+1)番目の行に登録さ
れている。図12(c)では図12(a)に示す近傍画
像h(p,q) を図12(b)のテンプレートΦi(p,q) で
近似した場合が例示してある。
As shown in FIG. 12C, in the table T, each template Φi ′ (p, q) (i ′ <i)
, The cumulative approximation error and the approximation coefficient corresponding to Φi ′ (p, q) are registered in the (i ′ + 1) th row. FIG. 12C illustrates a case where the neighborhood image h (p, q) shown in FIG. 12A is approximated by the template Φi (p, q) in FIG. 12B.

【0217】テンプレート累積部612gは、近似誤差
累積部612cから累積近似誤差eが転送されると、近
似係数保持バッファ612dに保持された近似係数α
(c) 、β(c) (c=0,1,2)を読み出し、i,eと
ともにテーブルTの(i+1)番目の行に書き込む。
When the cumulative approximation error e is transferred from the approximation error accumulator 612c, the template accumulator 612g stores the approximation coefficient α held in the approximation coefficient holding buffer 612d.
(c) and β (c) (c = 0, 1, 2) are read out and written together with i and e in the (i + 1) th row of the table T.

【0218】最小自乗係数算出部612bがすべてのΦ
i(i=0〜N−1)について処理を終えると、テンプ
レート合成部612hはテンプレート累積部612gに
保持されたテーブルTを用いて以下の手順で新たにテン
プレート集合を構成する。
The least squares coefficient calculator 612b calculates all Φ
When the processing for i (i = 0 to N−1) is completed, the template synthesizing unit 612h configures a new template set in the following procedure using the table T held in the template accumulating unit 612g.

【0219】まず、N個の内部変数mark(i) (i=0〜
N−1)とカウンタ total_markをすべて0に初期化す
る。次に、テーブルTの行を図12(d)に示すように
累積近似誤差の小さな順に並べ替え、最も累積近似誤差
の小さな行に対応するテンプレートインデックスをk′
とする。図12(d)においては、k′は3となってい
る。同時に、k′に対応する近似係数をαm(c) 、βm
(c) (c=0,1,2)とする。さらに、mark(k′) を
1、total _markを1に設定する。
First, N internal variables mark (i) (i = 0 to
N-1) and the counter total_mark are all initialized to 0. Next, the rows of the table T are rearranged in ascending order of the cumulative approximation error as shown in FIG. 12D, and the template index corresponding to the row with the smallest cumulative approximation error is k ′.
And In FIG. 12D, k 'is 3. At the same time, the approximation coefficients corresponding to k ′ are αm (c), βm
(c) (c = 0, 1, 2). Further, mark (k ') is set to 1 and total_mark is set to 1.

【0220】以後、並べ替えた行の順番に各行を読みこ
み、累積近似誤差が所定の閾値より小さい場合には、そ
の行の近似係数値を変数α(c) 、β(c) に読み出してそ
れぞれαm(c) 、βm(c) との差の絶対値eα,eβを
とる。αm(c) とα(c) が同符号かつeαおよびeβが
所定の閾値より小さな場合についてのみ、その行のテン
プレートインデックスkを用いてmark(k) を1に設定
し、 total_markを1増やす。 total_markが所定の上
限値M′に達するか、全ての行に対しこの処理が完了す
れば繰り返しは終了する。
Thereafter, the respective rows are read in the order of the rearranged rows, and when the cumulative approximation error is smaller than a predetermined threshold value, the approximate coefficient value of the row is read into variables α (c) and β (c). The absolute values eα and eβ of the differences from αm (c) and βm (c), respectively, are taken. Only when αm (c) and α (c) have the same sign and eα and eβ are smaller than a predetermined threshold, mark (k) is set to 1 using the template index k of the row and total_mark is incremented by 1. When the total_mark reaches the predetermined upper limit M 'or when this processing is completed for all rows, the repetition ends.

【0221】この処理が終了すると、図12(e)に示
すようにmark(k) が1となっているテンプレートインデ
ックスkの集合Vが構成されたことになる。整数集合V
の各要素は、最も累積近似誤差が小さかったテンプレー
トk′と近似誤差の生じ方が似ておりかつ近似誤差が十
分小さいテンプレートのインデックスである。
When this process is completed, a set V of template indexes k whose mark (k) is 1 is formed as shown in FIG. Integer set V
Are the indices of the template in which the approximation error is similar to the template k ′ in which the cumulative approximation error is the smallest and the approximation error is sufficiently small.

【0222】続いて、Vから要素数が所定の個数の部分
集合をすべて作り、図12(f)に示すように各部分集
合を値とする変数U(j) (j=0〜M−1)に登録す
る。図12(f)においては各部分集合の要素数は2で
ある。ここで、Mは条件を満たす部分集合の総数であ
る。さらに、変数U(j) に対して合成テンプレートΦ′
j(p,q) を以下の式に従って構成する。
Subsequently, all subsets having a predetermined number of elements are created from V, and variables U (j) (j = 0 to M−1) having each subset as a value as shown in FIG. ). In FIG. 12F, the number of elements of each subset is two. Here, M is the total number of subsets that satisfy the condition. Further, a synthesis template Φ ′ for the variable U (j)
j (p, q) is constructed according to the following equation.

【0223】[0223]

【数7】 (Equation 7)

【0224】この式において、kは整数集合U(j) に含
まれるすべての整数値を取る。関数maxはすべてのk
に関する引数の最大値を計算する。正実数λ(j,k) と正
実数μ(j,k) はλ(j,k) Φk(p,q) +μ(j,k) を最大値
1、最小値0に正規化するための正規化変数である。
In this equation, k takes all the integer values included in the integer set U (j). The function max is all k
Calculate the maximum value of the argument for Positive real number λ (j, k) and positive real number μ (j, k) are used to normalize λ (j, k) Φk (p, q) + μ (j, k) to maximum value 1 and minimum value 0. It is a normalized variable.

【0225】図12(g)に合成テンプレートΦ′j
(p,q) を例示している。変数
FIG. 12 (g) shows a composite template Φ'j
(p, q). variable

【数8】 (Equation 8)

【0226】はΦ′j(p,q) とともにテンプレート合成
部612hに保持される。ここで、j=0〜M−1であ
る。
Is stored in the template synthesizing section 612h together with Φ'j (p, q). Here, j = 0 to M−1.

【0227】テンプレート合成部612hの処理が完了
すると、最小自乗係数算出部612iはテンプレート合
成部612hから順にテンプレートΦ′j(p,q) (j=
0〜M−1)を読み出し、最小自乗係数算出部612b
と同様に近傍画像バッファ612fから転送された近傍
画像h(p,q) の各色成分c(c=0,1,2)につい
て、順に近似誤差
When the processing of the template synthesizing unit 612h is completed, the least squares coefficient calculating unit 612i sequentially converts the template Φ'j (p, q) (j =
0-M-1) and read out the least square coefficient calculating unit 612b.
Similarly, the approximation error is sequentially obtained for each color component c (c = 0, 1, 2) of the neighboring image h (p, q) transferred from the neighboring image buffer 612f.

【数9】 (Equation 9)

【0228】を最小化する近似係数α′(c) 、β′(c)
を計算し、近似誤差累積部612jに近似誤差e′
(c)を出力する。近似誤差累積部612jでは近似誤
差e′(c)を全色成分について累積加算し、累積近似誤
差e′=e′(0) +e′(1) +e′(2) をテンプレート
決定部612eに転送する。近似係数α′(c) 、β′
(c) (c=0,1,2)は近似係数保持バッファ612
kに順に出力され、保持される。
Approximation coefficients α ′ (c) and β ′ (c)
Is calculated, and the approximation error e ′ is added to the approximation error accumulating unit 612j.
(C) is output. The approximation error accumulator 612j accumulates the approximation error e '(c) for all color components and transfers the accumulated approximation error e' = e '(0) + e' (1) + e '(2) to the template determiner 612e. I do. Approximation coefficients α '(c), β'
(c) (c = 0, 1, 2) is the approximate coefficient holding buffer 612
k are sequentially output and held.

【0229】テンプレート決定部612eには、それ以
前のテンプレートΦ′j ′(p,q) (j′<j)に対する
誤差の最小値 min_e ′と最小値を与えたインデックス
min_j が保持されている。テンプレート決定部612
eは、近似誤差累積部612dから転送された誤差e′
を内部に保持する誤差の最小値 min_e ′と比較し、新
たな誤差がより小さければ min_e ′をe′に、 min_
j をjに更新する。
The template determining unit 612e has the minimum value min_e ′ of the error with respect to the template Φ′j ′ (p, q) (j ′ <j) and the index given the minimum value.
min_j is held. Template determination unit 612
e is the error e ′ transferred from the approximation error accumulator 612d.
Is compared with the minimum value min_e ′ of the error that holds the inside, and if the new error is smaller, min_e ′ is replaced with e ′,
Update j to j.

【0230】また、テンプレート決定部612eは誤差
の最小値を与えるテンプレートに関する近似係数をもこ
れらを min_α′(c) および min_β′(c) (c=0,
1,2)として保持しており、 min_e ′の更新と同時
にこれらの値も近似係数保持バッファ612kから読み
込まれた近似係数α′(c) 、β′(c) にそれぞれ更新さ
れる。
The template determining unit 612e also calculates the approximation coefficients related to the template that gives the minimum value of the error by min_α ′ (c) and min_β ′ (c) (c = 0,
1, 2), and at the same time as the update of min_e ', these values are updated to the approximate coefficients α' (c) and β '(c) read from the approximate coefficient holding buffer 612k.

【0231】最小自乗係数算出部612iで全てのテン
プレートΦ′j(p,q) が処理された後、テンプレート決
定部612eは誤差の最小値 min_e ′を与えたインデ
ックス min_j を用いてテンプレート合成部612hの
内部変数
After all the templates Φ′j (p, q) are processed by the least squares coefficient calculating section 612i, the template determining section 612e uses the index min_j to which the minimum value of the error min_e ′ is given to the template synthesizing section 612h. Internal variables of

【数10】 (Equation 10)

【0232】同時に、近似誤差誤差の最小値 min_e ′
に反比例する近似評価値A′をA′=1/(1+ min_
e ′)により計算する。そして、
At the same time, the minimum value of the approximation error error min_e '
A ′ = 1 / (1 + min_
e '). And

【数11】 [Equation 11]

【0233】およびA′を帯域・色情報復元部614に
転送する。
And A 'are transferred to the band / color information restoring section 614.

【0234】帯域・色情報復元部614は、転送された
整数の集合U(min_j)に含まれるすべての整数kに対
し、対応する劣化前のテンプレートΨk(p,q) を劣化前
テンプレート保持ROM611aから読み出し、転送さ
れた係数
The band / color information restoring unit 614 stores the pre-deterioration template Ψk (p, q) corresponding to all the integers k included in the transferred integer set U (min_j) in the pre-deterioration template holding ROM 611a. Coefficients read and transferred from

【数12】 (Equation 12)

【0235】を用いて以下の式から近傍画像の劣化前の
画像を近似する近傍補正近似画像f(p,q,c) を得る。
Using the following equation, a neighborhood corrected approximate image f (p, q, c) that approximates the image before deterioration of the neighborhood image is obtained from the following equation.

【0236】[0236]

【数13】 (Equation 13)

【0237】そして、f(p,q,c) を近似評価値A′とと
もに三板画像加算部615に転送する。
Then, f (p, q, c) is transferred to the three-plate image adder 615 together with the approximate evaluation value A '.

【0238】処理の途中では、出力画像バッファ616
の各画素位置にこれまでの処理で得られた複数の補正画
素値の平均値と信頼値が保持されるようになっている。
三板画像加算部615は、出力画像バッファ616から
当該近傍画像に対応する領域の補正画素値の平均値Sf
(p,q,c) と信頼値Q(p,q,c) を読み出し、これらと帯域
・色情報復元部614から転送された近傍補正近似画像
f(p,q,c) 及び近似評価値A′から、新たな補正画素値
の平均値Sfnew (p,q,c) および信頼値Qnew(p,q) を
式 Qnew (p,q) =Q(p,q) +A′、 Sfnew (p,q,c) =(Q(p,q) ・Sf(p,q,c) +A′・
f(p,q,c))/Qnew (p,q) (c=0,1,2) により計算し、Sfnew (p,q,c) 及びQnew (p,q) を出
力画像バッファ616の当該近傍画像に対応する領域に
書き込む。
During the processing, the output image buffer 616
In each pixel position, the average value and the reliability value of a plurality of corrected pixel values obtained by the processing so far are held.
The three-plate image adding unit 615 outputs the average value Sf of the corrected pixel values of the area corresponding to the neighboring image from the output image buffer 616.
(p, q, c) and the reliability value Q (p, q, c) are read out, and the neighborhood correction approximate image f (p, q, c) and the approximate evaluation value transferred from the band / color information restoring unit 614 are read out. From A ′, the average value Sf new (p, q, c) and the confidence value Q new (p, q) of the new corrected pixel value are calculated by the equation Q new (p, q) = Q (p, q) + A ′, Sf new (p, q, c) = (Q (p, q) · Sf (p, q, c) + A ′ ·
f (p, q, c)) / Q new (p, q) (c = 0,1,2), and Sf new (p, q, c) and Q new (p, q) are output images The data is written to an area of the buffer 616 corresponding to the neighboring image.

【0239】全ての画素位置に関してこれらの処理が終
了すると、入力画像バッファ608の画像の各画素につ
いて、当該画素を含むすべての近傍画像に対する近傍補
正近似画像が計算され、その結果得られる各画素に関す
る複数の補正画素値が三板画像加算部615における処
理により重み付き平均されて出力画像バッファ616に
蓄積されるため、最終的に電子カメラ600の光学系に
よる劣化と色の欠落が補正された3色カラー画像が得ら
れる。
When these processes are completed for all the pixel positions, for each pixel of the image in the input image buffer 608, a neighborhood correction approximate image for all the neighborhood images including the pixel is calculated, and for each pixel obtained as a result. Since a plurality of corrected pixel values are weighted and averaged by the processing in the three-plate image adding unit 615 and accumulated in the output image buffer 616, the three colors in which the deterioration and the lack of color due to the optical system of the electronic camera 600 are finally corrected are corrected. A color image is obtained.

【0240】補正の精度は低いが、メモリ容量を削減
し、処理を高速化しない場合には、画像加算部615を
削除し、出力画像バッファ616内に信頼値を保持しな
い構成が考えられる。この場合、帯域・色情報復元部6
14は直接出力画像バッファ616に出力する。作用と
しては、帯域・色情報復元部614において、帯域・色
情報を補正したf(p,q,c) のうち、中心画素の補正値f
(0,0,c) (c=0,1,2)のみを出力画像バッファ6
16に出力するように変更する。
If the accuracy of the correction is low, but the memory capacity is reduced and the processing is not speeded up, the image adder 615 may be deleted and the reliability value may not be held in the output image buffer 616. In this case, the band / color information restoring unit 6
14 outputs directly to the output image buffer 616. The effect is that the band / color information restoring unit 614 corrects the center pixel correction value f (p, q, c) of the band / color information corrected f (p, q, c).
(0,0, c) Only the output image buffer 6 (c = 0,1,2)
16 to be output.

【0241】また、電子カメラ600に水晶フィルタ6
03がなく帯域制限がなされていない場合には、テンプ
レート保持ROM611が劣化前テンプレート保持RO
M611aのみからなり、合成最小自乗近似部612が
劣化前テンプレート保持ROM611aに接続される構
成にする。
The electronic camera 600 has a crystal filter 6.
03 and the band is not limited, the template holding ROM 611 stores the pre-deterioration template holding RO.
M611a only, and the combined least squares approximation unit 612 is connected to the pre-deterioration template holding ROM 611a.

【0242】この場合、各部分の作用は、合成最小自乗
近似部612内部では、テンプレートとしてΦiのかわ
りにΨiが用いられる点を除いて同一である。その結
果、帯域・色情報復元部614では色成分の欠落は補正
されるが帯域の劣化についてはなにもされない近傍補正
近似画像が得られ、出力画像バッファ616には入力画
像バッファ608内の画像の色成分の欠落が補正された
3色カラー画像が得られる。
In this case, the operation of each part is the same in the composite least squares approximation unit 612 except that Ψi is used instead of Φi as a template. As a result, the band / color information restoring unit 614 obtains a neighborhood correction approximate image in which the loss of the color component is corrected but the band is not degraded, and the output image buffer 616 stores the image in the input image buffer 608. A three-color image in which the missing color components are corrected is obtained.

【0243】この変形例において、さらに前述の処理を
高速化する変形例と同一の変形を施せば同じく処理の高
速化が達せられることは容易に推察されるであろう。
In this modified example, it can be easily supposed that the same modification can be attained by performing the same modification as in the modification for increasing the processing speed.

【0244】なお、上記した具体的実施形態には、以下
の構成を有する発明が含まれている。
Note that the specific embodiments described above include inventions having the following configurations.

【0245】(1) 画素の位置に応じて少なくとも1
つ以上の分光特性に関する情報が欠落する画像信号から
元の画像信号を回復処理する画像処理装置において、前
記情報が欠落する画像信号から、指定された画素を包含
する所定サイズの近傍画像を抽出する近傍画像抽出手段
と、この近傍画像抽出手段によって抽出された近傍画像
と同一サイズの複数の幾何学的パターンに基づくテンプ
レート群を保持するテンプレート保持手段と、前記近傍
画像抽出手段によって抽出された近傍画像に含まれる複
数の分光特性の情報と、上記テンプレート保持手段によ
って保持された複数のテンプレート群との間でマッチン
グを行なって近傍画像に最も類似する最適テンプレート
を選択し、この最適テンプレートに基づき近傍画像を近
似する近傍近似画像を生成する近傍近似画像生成手段
と、この近傍近似画像生成手段によって生成された近傍
近似画像に基づき、前記指定された画素における欠落す
る情報を復元する復元手段と、を具備することを特徴と
する画像処理装置。
(1) At least one pixel depends on the position of a pixel.
In an image processing apparatus for restoring an original image signal from an image signal in which information relating to one or more spectral characteristics is missing, a nearby image of a predetermined size including a designated pixel is extracted from the image signal in which the information is missing. A nearby image extracting unit; a template holding unit that holds a template group based on a plurality of geometric patterns having the same size as the nearby image extracted by the nearby image extracting unit; and a nearby image extracted by the nearby image extracting unit. Is selected between the information on the plurality of spectral characteristics included in the template and the plurality of template groups held by the template holding unit to select an optimal template most similar to the nearby image. A neighborhood approximation image generating means for producing a neighborhood approximation image approximating Based on the near approximation image generated by the generating means, the image processing apparatus characterized by comprising a, and restoring means for restoring the missing information in the designated pixel.

【0246】(2) 前記復元手段は、指定された画素
を包含する複数の前記近傍画像から得られる複数の前記
近傍近似画像の、前記少なくとも1つ以上の分光特性に
関する情報を重みつき平均することで復元処理を行なう
ことを特徴とする構成(1)に記載の画像処理装置。
(2) The restoration means weights and averages information on at least one or more spectral characteristics of a plurality of neighborhood approximate images obtained from a plurality of neighborhood images including designated pixels. The image processing apparatus according to the configuration (1), wherein the restoration processing is performed by:

【0247】(3) 前記テンプレート保持手段は、複
数の幾何学的パターンに基づく第1のテンプレート群
と、この第1のテンプレート群を撮像装置の光学系の帯
域制限特性に応じて劣化させた第2のテンプレート群と
を有し、前記近傍近似画像生成手段は、前記第2のテン
プレート群から前記近傍画像に類似する最適テンプレー
トを選択し、これに対応する前記第1のテンプレート群
に基づき帯域制限前の近傍近似画像を生成することを特
徴とする構成(1)または(2)に記載の画像処理装
置。
(3) The template holding means includes a first template group based on a plurality of geometric patterns, and a first template group degraded according to a band limiting characteristic of an optical system of the imaging apparatus. And the near-approximated image generating means selects an optimum template similar to the nearby image from the second template group, and performs band limiting based on the corresponding first template group. The image processing device according to the configuration (1) or (2), which generates the previous neighborhood approximate image.

【0248】(4) 前記復元手段は、前記近傍画像と
前記近傍近似画像との差分情報を算出し、この差分情報
から所定の評価関数に基づき構造成分のみを抽出し、こ
の構造成分のコントラスト情報を用いて前記近傍近似画
像の輝度成分を変調することで前記指定された画素にお
ける欠落する情報を復元することを特徴とする構成
(2)または(3)記載の画像処理装置。
(4) The restoring means calculates difference information between the near image and the near approximation image, extracts only structural components from the difference information based on a predetermined evaluation function, and obtains contrast information of the structural components. The image processing apparatus according to the configuration (2) or (3), wherein the missing information in the specified pixel is restored by modulating a luminance component of the neighborhood approximate image using the image processing.

【0249】(5) 前記復元手段は、前記近傍画像と
前記近傍近似画像との差分情報を算出し、この差分情報
から所定の評価関数に基づき構造成分のみを抽出し、前
記近傍近似画像生成手段は、前記構造成分に基づき第3
のテンプレート群を生成し、この第3のテンプレート群
により前記近傍画像を近似する近傍再近似画像を生成
し、前記復元手段は、前記近傍近似画像および前記近傍
再近似画像に基づき前記指定された画素における欠落す
る情報を復元することを特徴とする構成(2)に記載の
画像処理装置。
(5) The restoring means calculates difference information between the neighboring image and the neighboring approximate image, extracts only structural components from the difference information based on a predetermined evaluation function, and Is the third based on the structural component
And generating a neighborhood re-approximation image approximating the neighborhood image by using the third template group, wherein the restoration unit is configured to generate the specified pixel based on the neighborhood approximation image and the neighborhood re-approximation image. (2) The image processing apparatus according to (2), wherein the missing information is restored.

【0250】(6) 前記テンプレート保持手段に保持
された前記テンプレート群は異なる解像度ごとに分類さ
れており、前記復元手段は、前記近傍画像と前記近傍近
似画像との差分情報を算出し、この差分情報から所定の
評価関数に基づき構造成分のみを抽出し、前記近傍近似
画像生成手段は、前記構造成分と、前記テンプレート群
における前記構造成分の解像度に対応したテンプレート
群との間でマッチングを行って最適テンプレートを選択
し、この最適テンプレートから前記差分情報を近似する
差分近傍近似画像を生成し、前記復元手段は、前記差分
近傍近似画像と前記近傍近似画像に基づき前記指定され
た画素における欠落する情報を復元し、前記差分近傍近
似画像と前記構造成分との差分情報から新たな構造成分
を抽出し、この構造成分が所定の閾値以下になるまで復
元処理を反復することを特徴とする構成(2)に記載の
画像処理装置。
(6) The template group held in the template holding means is classified for each different resolution, and the restoring means calculates difference information between the near image and the near approximate image, and calculates the difference information. Extracting only the structural component from the information based on a predetermined evaluation function, the neighborhood approximate image generation unit performs matching between the structural component and a template group corresponding to the resolution of the structural component in the template group. Selecting an optimal template, generating a differential neighborhood approximate image that approximates the difference information from the optimal template, and the restoring unit is configured to determine the missing information in the designated pixel based on the difference neighborhood approximate image and the neighborhood approximate image. And a new structural component is extracted from the difference information between the difference neighborhood approximate image and the structural component. The image processing apparatus according to configuration (2), wherein the restoration processing is repeated until the component becomes equal to or less than a predetermined threshold.

【0251】(7) 前記テンプレート保持手段に保持
された前記第2のテンプレート群は異なる解像度ごとに
分類されており、前記復元手段は、前記近傍画像と前記
近傍近似画像との差分情報を算出し、この差分情報から
所定の評価関数に基づき構造成分のみを抽出し、前記近
傍近似画像生成手段は、前記構造成分と、前記第2のテ
ンプレート群における前記構造成分の解像度に対応した
テンプレート群との間でマッチングを行って最適テンプ
レートを選択し、この最適テンプレートから前記差分情
報を近似する差分近傍近似画像を生成し、前記復元手段
は、前記差分近傍近似画像と前記近傍近似画像に基づき
前記指定された画素における欠落する情報を復元し、前
記差分近傍近似画像と前記構造成分との差分情報から新
たな構造成分を抽出し、この構造成分が所定の閾値以下
になるまで復元処理を反復することを特徴とする構成
(3)に記載の画像処理装置。
(7) The second template group held in the template holding means is classified for each different resolution, and the restoring means calculates difference information between the neighboring image and the neighboring approximate image. Extracting only the structural component from the difference information based on a predetermined evaluation function, the neighborhood approximation image generating means compares the structural component with the template group corresponding to the resolution of the structural component in the second template group. And selecting an optimal template by performing matching between them, generating a differential neighborhood approximate image that approximates the difference information from the optimal template, and the restoring unit is configured to execute the specified neighborhood based on the difference neighborhood approximate image and the neighborhood approximate image. The missing information in the restored pixel is restored, and a new structural component is extracted from the difference information between the approximate difference image and the structural component. The image processing apparatus according to configuration (3), wherein the restoration processing is repeated until the structural component becomes equal to or smaller than a predetermined threshold.

【0252】(8) 前記復元手段は、前記近傍近似画
像から空間的相関情報を算出し、この空間的相関情報に
基づき前記指定された画素に対する自己回帰モデルを適
用して前記指定された画素における欠落する情報を復元
することを特徴とする構成(1)、(2)、(3)のい
ずれか1つに記載の画像処理装置。
(8) The restoration means calculates spatial correlation information from the neighborhood approximation image, and applies an auto-regression model to the specified pixel based on the spatial correlation information to calculate the spatial correlation information at the specified pixel. The image processing apparatus according to any one of the configurations (1), (2), and (3), which restores missing information.

【0253】(9) 前記近傍近似画像生成手段は、前
記近傍画像と前記複数のテンプレート群との間でマッチ
ングを行い、マッチング誤差の少ない複数のテンプレー
トを合成して単一の最適テンプレートを生成することを
特徴とする構成(1)または(2)に記載の画像処理装
置。
(9) The neighborhood approximate image generation means performs matching between the neighborhood image and the plurality of template groups, and combines a plurality of templates with small matching errors to generate a single optimal template. The image processing device according to the configuration (1) or (2), wherein

【0254】(10) 前記近傍近似画像生成手段は、
前記近傍画像と前記第2のテンプレート群との間でマッ
チングを行い、マッチング誤差の少ない複数のテンプレ
ートを合成して単一の最適テンプレートを生成すること
を特徴とする構成(3)に記載の画像処理装置。
(10) The neighborhood-approximate-image generating means includes:
The image according to the configuration (3), wherein matching is performed between the neighboring image and the second template group, and a plurality of templates having small matching errors are combined to generate a single optimal template. Processing equipment.

【0255】(11) 前記近傍近似画像生成手段は、
前記テンプレート保持手段に保持された前記テンプレー
ト群を定数αで乗算し、定数βを加算して変形させるこ
とで前記近傍画像に最も類似する最適テンプレートを選
択することを特徴とする構成(1)、(2)、(4)〜
(6)、(8)、(9)に記載の画像処理装置。
(11) The neighborhood approximation image generation means:
A configuration (1) wherein the template group held in the template holding means is multiplied by a constant α, and a constant β is added and deformed to select an optimal template most similar to the neighboring image. (2), (4)-
(6) The image processing device according to (8) or (9).

【0256】(12) 前記近傍近似画像生成手段は、
前記テンプレート保持手段に保持された前記第2のテン
プレート群を定数αで乗算し、定数βを加算して変形さ
せることで前記近傍画像に最も類似する最適テンプレー
トを選択することを特徴とする構成(3)、(7)、
(10)に記載の画像処理装置。
(12) The neighborhood-approximate-image generation means includes:
The second template group held in the template holding unit is multiplied by a constant α, and a constant β is added and deformed to select an optimal template most similar to the neighboring image ( 3), (7),
The image processing device according to (10).

【0257】構成(1)〜(12)と上記した各実施形
態との対応関係は以下の通りである。
The correspondence between the configurations (1) to (12) and each of the above embodiments is as follows.

【0258】A.構成(1)には少なくとも第1〜第6
実施形態が対応し、第1実施形態では、近傍画像抽出手
段は入力画像バッファ108及び近傍読み出し部109
に対応する。テンプレート保持手段はテンプレート保持
ROM111に対応する。近傍近似画像生成手段は最小
自乗近似部112及び帯域・色情報復元部114に対応
する。復元手段は三板画像加算部115および出力画像
バッファ116に対応する。
A. Configuration (1) includes at least first to sixth
In the first embodiment, the neighborhood image extracting unit includes the input image buffer 108 and the neighborhood reading unit 109.
Corresponding to The template holding means corresponds to the template holding ROM 111. The neighborhood approximation image generation unit corresponds to the least square approximation unit 112 and the band / color information restoration unit 114. The restoration unit corresponds to the three-plate image adding unit 115 and the output image buffer 116.

【0259】第2実施形態では、近傍画像抽出手段は入
力画像バッファ208及び近傍読み出し部209に対応
する。テンプレート保持手段はテンプレート保持ROM
211に対応する。近傍近似画像生成手段は最小自乗近
似部212、帯域・色情報復元部214及び色情報復元
部213に対応する。復元手段は補間係数計算部21
5、線形演算部216及び出力画像バッファ217に対
応する。
In the second embodiment, the neighboring image extracting means corresponds to the input image buffer 208 and the neighboring reading section 209. Template holding means is template holding ROM
This corresponds to 211. The neighborhood approximation image generation unit corresponds to the least square approximation unit 212, the band / color information restoration unit 214, and the color information restoration unit 213. The restoration means is an interpolation coefficient calculating unit 21
5, corresponding to the linear operation unit 216 and the output image buffer 217.

【0260】第3実施形態では、近傍画像抽出手段は入
力画像バッファ308及び近傍読み出し部309に対応
する。テンプレート保持手段はテンプレート保持ROM
311に対応する。近傍近似画像生成手段はテンプレー
ト選択部310、最小自乗近似部312、帯域・色情報
復元部314及び劣化後テンプレート加工部313に対
応する。復元手段は三板画像加算部315a、出力画像
バッファ317、単板画像加算部315b、単板画像バ
ッファ316、差分計算部318、差分画像バッファ3
19及び規則性評価部320に対応する。
In the third embodiment, the neighborhood image extracting means corresponds to the input image buffer 308 and the neighborhood read unit 309. Template holding means is template holding ROM
311. The neighborhood approximation image generation unit corresponds to the template selection unit 310, the least square approximation unit 312, the band / color information restoration unit 314, and the post-deterioration template processing unit 313. The restoration means includes a three-plate image addition unit 315a, an output image buffer 317, a single-plate image addition unit 315b, a single-plate image buffer 316, a difference calculation unit 318, and a difference image buffer 3
19 and the regularity evaluation unit 320.

【0261】第4実施形態では、近傍画像抽出手段は入
力画像バッファ408及び近傍読み出し部409に対応
する。テンプレート保持手段はテンプレート保持ROM
411に対応する。近傍近似画像生成手段は最小自乗近
似部412及び帯域・色情報復元部414に対応する。
復元手段は画像加算部415、三板画像バッファ417
a、単板画像バッファ417b、残差演算部418、規
則性判定部419、残差加算部420及び出力画像バッ
ファ421に対応する。
In the fourth embodiment, the neighboring image extracting means corresponds to the input image buffer 408 and the neighboring reading section 409. Template holding means is template holding ROM
411. The neighborhood approximation image generation unit corresponds to the least square approximation unit 412 and the band / color information restoration unit 414.
The restoration means includes an image addition unit 415 and a three-plate image buffer 417.
a, the single-plate image buffer 417b, the residual calculation unit 418, the regularity determination unit 419, the residual addition unit 420, and the output image buffer 421.

【0262】第5実施形態では、近傍画像抽出手段は入
力画像バッファ508及び近傍読み出し部509に対応
する。テンプレート保持手段はテンプレート保持ROM
511に対応する。近傍近似画像生成手段はテンプレー
ト選択部510、テンプレート生成部521、最小自乗
近似部512、色情報復元部514及び単板画像生成部
513に対応する。復元手段は三板画像加算部515
a、単板画像加算部515b、単板画像バッファ51
6、差分計算部518、差分画像バッファ519、規則
性評価部520及び及び出力画像バッファ517に対応
する。
In the fifth embodiment, the neighborhood image extracting means corresponds to the input image buffer 508 and the neighborhood reading section 509. Template holding means is template holding ROM
511. The neighborhood approximation image generation unit corresponds to the template selection unit 510, the template generation unit 521, the least square approximation unit 512, the color information restoration unit 514, and the single-plate image generation unit 513. The restoration means is a three-plate image addition unit 515
a, single-chip image adder 515b, single-chip image buffer 51
6, the difference calculation unit 518, the difference image buffer 519, the regularity evaluation unit 520, and the output image buffer 517.

【0263】第6実施形態では、近傍画像抽出手段は入
力画像バッファ608及び近傍読み出し部609に対応
する。テンプレート保持手段はテンプレート保持ROM
611に対応する。近傍近似画像生成手段は合成最小自
乗近似部612及び帯域・色情報復元部614に対応す
る。復元手段は三板画像加算部615及び出力画像バッ
ファ616に対応する。
In the sixth embodiment, the neighboring image extracting means corresponds to the input image buffer 608 and the neighboring reading section 609. Template holding means is template holding ROM
611. The neighborhood approximation image generation unit corresponds to the composite least square approximation unit 612 and the band / color information restoration unit 614. The restoration means corresponds to the three-plate image addition unit 615 and the output image buffer 616.

【0264】単板状態の画像の各近傍に対し、近傍近似
画像生成手段が複数の分光成分全てを考慮して最も良く
近似するテンプレートを一つ決定し、そのテンプレート
に基づいた補間を復元手段が行うため、輝度成分、色成
分を区別して扱う場合と比較してモアレに影響されるこ
とがなく、近傍に含まれる微細な幾何学的特徴を検出す
ることができる。
For each neighborhood of the image in the single-plate state, the neighborhood approximation image generation means determines one template that is the best approximation in consideration of all the plurality of spectral components, and the restoration means restores the interpolation based on the template. As a result, compared to the case where the luminance component and the color component are handled separately, it is possible to detect minute geometric features included in the vicinity without being affected by moiré.

【0265】これによって、以下に述べる発明が解決し
ようとする課題のP1が解決される。また、特定の色成
分を高サンプリング密度で得ておく必要もないため、P
2も解決される。
Thus, the problem P1 to be solved by the invention described below is solved. Also, since it is not necessary to obtain a specific color component at a high sampling density, P
2 is also resolved.

【0266】B.構成(2)には少なくとも第1〜第6
実施形態が対応し、第1実施形態では、復元手段は三板
画像加算部115および出力画像バッファ116に対応
する。
B. Configuration (2) includes at least first to sixth
In the first embodiment, the restoration unit corresponds to the three-plate image addition unit 115 and the output image buffer 116 in the first embodiment.

【0267】第2実施形態では、復元手段は補間係数計
算部215、線形演算部216及び出力画像バッファ2
17に対応する。
In the second embodiment, the restoration means comprises an interpolation coefficient calculation section 215, a linear operation section 216, and an output image buffer 2
17 corresponds.

【0268】第3実施形態では、復元手段は三板画像加
算部315a、出力画像バッファ317、単板画像加算
部315b、単板画像バッファ316、差分計算部31
8、差分画像バッファ319及び規則性評価部320に
対応する。
In the third embodiment, the restoration means includes a three-plate image addition unit 315a, an output image buffer 317, a single-plate image addition unit 315b, a single-plate image buffer 316, and a difference calculation unit 31.
8, corresponding to the difference image buffer 319 and the regularity evaluation unit 320.

【0269】第4実施形態では、復元手段は画像加算部
415、三板画像バッファ417a、単板画像バッファ
417b、残差演算部418、規則性判定部419、残
差加算部420及び出力画像バッファ421に対応す
る。
In the fourth embodiment, the restoration means comprises an image adding section 415, a three-plate image buffer 417a, a single-plate image buffer 417b, a residual calculating section 418, a regularity determining section 419, a residual adding section 420, and an output image buffer 421. Corresponding to

【0270】第5実施形態では、復元手段は三板画像加
算部515a、単板画像加算部515b、単板画像バッ
ファ516、差分計算部518、差分画像バッファ51
9、規則性評価部520及び出力画像バッファ517に
対応する。
In the fifth embodiment, the restoration means includes a three-plate image addition unit 515a, a single-plate image addition unit 515b, a single-plate image buffer 516, a difference calculation unit 518, and a difference image buffer 51.
9, the regularity evaluation unit 520 and the output image buffer 517.

【0271】第6実施形態では、復元手段は三板画像加
算部615及び出力画像バッファ616に対応する。
In the sixth embodiment, the restoration means corresponds to the three-plate image addition unit 615 and the output image buffer 616.

【0272】入力画像の各画素について、近傍近似画像
生成手段によりその画素を包含する複数の近傍の各々に
対する近傍近似画像が生成され、復元手段がそれら複数
の近傍近似画像における当該画素の近似値を重みつき平
均して当該画素の最終的な近似値を計算する結果、各近
傍における近似の誤りが補正される。
For each pixel of the input image, the neighborhood approximation image generation means generates a neighborhood approximation image for each of a plurality of neighborhoods including the pixel, and the restoration means calculates the approximate value of the pixel in the plurality of neighborhood approximation images. As a result of calculating the final approximate value of the pixel by weighted averaging, the approximation error in each neighborhood is corrected.

【0273】これによって、以下に述べる発明が解決し
ようとする課題のP3が解決される。
As a result, the problem P3 to be solved by the invention described below is solved.

【0274】C.構成(3)には少なくとも第1、第
2、第3、第4、第6実施形態が対応し、第1実施形態
では、テンプレート保持手段はテンプレート保持ROM
111に対応する。近傍近似画像生成手段は、最小自乗
近似部112及び帯域・色情報復元部114に対応す
る。
C. At least the first, second, third, fourth and sixth embodiments correspond to the configuration (3). In the first embodiment, the template holding means is a template holding ROM.
111. The neighborhood approximation image generation unit corresponds to the least square approximation unit 112 and the band / color information restoration unit 114.

【0275】第2実施形態では、テンプレート保持手段
はテンプレート保持ROM211に対応する。近傍近似
画像生成手段は最小自乗近似部212、帯域・色情報復
元部214及び色情報復元部213に対応する。
In the second embodiment, the template holding means corresponds to the template holding ROM 211. The neighborhood approximation image generation unit corresponds to the least square approximation unit 212, the band / color information restoration unit 214, and the color information restoration unit 213.

【0276】第3実施形態では、テンプレート保持手段
はテンプレート保持ROM311に対応する。近傍近似
画像生成手段はテンプレート選択部310、最小自乗近
似部312、帯域・色情報復元部314及び劣化後テン
プレート加工部313に対応する。
In the third embodiment, the template holding means corresponds to the template holding ROM 311. The neighborhood approximation image generation unit corresponds to the template selection unit 310, the least square approximation unit 312, the band / color information restoration unit 314, and the post-deterioration template processing unit 313.

【0277】第4実施形態では、テンプレート保持手段
はテンプレート保持ROM411に対応する。近傍近似
画像生成手段は最小自乗近似部412及び帯域・色情報
復元部414に対応する。
In the fourth embodiment, the template holding means corresponds to the template holding ROM 411. The neighborhood approximation image generation unit corresponds to the least square approximation unit 412 and the band / color information restoration unit 414.

【0278】第6実施形態では、テンプレート保持手段
はテンプレート保持ROM611に対応する。近傍近似
画像生成手段は合成最小自乗近似部612及び帯域・色
情報復元部614に対応する。
In the sixth embodiment, the template holding means corresponds to the template holding ROM 611. The neighborhood approximation image generation unit corresponds to the composite least square approximation unit 612 and the band / color information restoration unit 614.

【0279】テンプレート保持手段が複数の幾何学的パ
ターンに基づく第1のテンプレート群と、この第1のテ
ンプレート群を撮像装置の光学系の帯域制限特性に応じ
て劣化させた第2のテンプレート群を持ち、入力画像の
各画素の近傍に対して近傍近似画像生成手段が第2のテ
ンプレート群から最も類似する最適テンプレートを選択
し、これに対応する前記第1のテンプレート群のテンプ
レートに基づき帯域制限前の近傍近似画像を生成する結
果、光学系の帯域劣化が補正された画像が得られる。
The template holding means stores a first template group based on a plurality of geometric patterns and a second template group obtained by degrading the first template group in accordance with the band limiting characteristic of the optical system of the imaging apparatus. The neighborhood approximation image generating means selects the most similar optimal template from the second template group with respect to the neighborhood of each pixel of the input image, and based on the corresponding template of the first template group, performs the As a result, an image in which the band degradation of the optical system is corrected is obtained.

【0280】これによって、以下に述べる発明が解決し
ようとする課題のP5が解決される。
This solves the problem P5 to be solved by the invention described below.

【0281】D.構成(4)には少なくとも第4実施形
態が対応する。
D. At least the fourth embodiment corresponds to the configuration (4).

【0282】復元手段は画像加算部415、三板画像バ
ッファ417a、単板画像バッファ417b、残差演算
部418、規則性判定部419、残差加算部420及び
出力画像バッファ421に対応する。
The restoration means corresponds to the image adder 415, the three-plate image buffer 417a, the single-plate image buffer 417b, the residual calculator 418, the regularity determiner 419, the residual adder 420, and the output image buffer 421.

【0283】入力画像の各画素の近傍に対して近傍近似
画像生成手段が近傍近似画像を生成し、復元手段が近傍
とその近傍近似画像との差分情報を算出し、この差分情
報から構造成分のみを抽出し、構造成分のコントラスト
情報を用いて近傍近似画像の輝度成分を変調すること
で、近傍がテンプレートにより完全に近似できない場合
でも近似誤差のうち規則的構造を持つ成分は出力画像の
輝度成分に反映される。
The neighborhood approximation image generation means generates a neighborhood approximation image for each neighborhood of each pixel of the input image, and the restoration means calculates difference information between the neighborhood and the neighborhood approximation image. Is extracted, and the luminance component of the nearby approximation image is modulated using the contrast information of the structural component, so that even if the neighborhood cannot be completely approximated by the template, the component having the regular structure in the approximation error is the luminance component of the output image. Is reflected in

【0284】これによって、以下に述べる発明が解決し
ようとする課題のP7が解決される。
[0284] This solves the problem P7 to be solved by the invention described below.

【0285】E.構成(5)には少なくとも第5実施形
態が対応する。
E. At least the fifth embodiment corresponds to the configuration (5).

【0286】近傍近似画像生成手段はテンプレート選択
部510、テンプレート生成部521、最小自乗近似部
512、色情報復元部514及び単板画像生成部513
に対応する。復元手段は三板画像加算部515a、単板
画像加算部515b、単板画像バッファ516、差分計
算部518、差分画像バッファ519、規則性評価部5
20及び出力画像バッファ517に対応する。
The neighborhood approximation image generation means includes a template selection unit 510, a template generation unit 521, a least square approximation unit 512, a color information restoration unit 514, and a single-plate image generation unit 513.
Corresponding to The restoration means includes a three-plate image addition unit 515a, a single-plate image addition unit 515b, a single-plate image buffer 516, a difference calculation unit 518, a difference image buffer 519, and a regularity evaluation unit 5.
20 and the output image buffer 517.

【0287】入力画像の各画素の近傍に対し、まず近傍
近似画像生成手段が近傍近似画像を生成し、復元手段が
近傍と近傍近似画像との誤差である差分画像を算出し、
近傍近似画像生成手段が差分画像から所定の評価関数に
基づき構造成分を算出して第3のテンプレート群を生成
する。次に、近傍近似画像生成手段が近傍を第3のテン
プレート群によって再び近似し、近傍再近似画像を生成
する。最後に、復元手段が近傍近似画像と近傍再近似画
像に基づいて補正を行う。その結果、近傍がテンプレー
ト保持手段のテンプレートにより近似できない規則的構
造を含んでいる場合でも、その構造を近似誤差を表わす
差分画像から抽出して再近似を行う。
For the neighborhood of each pixel of the input image, the neighborhood approximation image generation means first generates a neighborhood approximation image, and the restoration means calculates a difference image which is an error between the neighborhood and the neighborhood approximation image.
A neighborhood approximation image generation unit calculates a structural component from the difference image based on a predetermined evaluation function to generate a third template group. Next, the neighborhood approximation image generation means approximates the neighborhood again by the third template group, and generates a neighborhood re-approximation image. Finally, the restoration unit performs correction based on the neighborhood approximate image and the neighborhood re-approximation image. As a result, even when the neighborhood includes a regular structure that cannot be approximated by the template of the template holding unit, the structure is extracted from the difference image representing the approximation error and the approximation is performed again.

【0288】これによって、以下に述べる発明が解決し
ようとする課題のP7が解決される。
This solves the problem P7 to be solved by the invention described below.

【0289】F.構成(6)、(7)には少なくとも第
3実施形態が対応する。
F. At least the third embodiment corresponds to the configurations (6) and (7).

【0290】テンプレート保持手段はテンプレート保持
ROM311に対応する。近傍近似画像生成手段はテン
プレート選択部310、最小自乗近似部312、帯域・
色情報復元部314及び劣化後テンプレート加工部31
3に対応する。復元手段は三板画像加算部315a、出
力画像バッファ317、単板画像加算部315b、単板
画像バッファ316、差分計算部318、差分画像バッ
ファ319及び規則性評価部320に対応する。
The template holding means corresponds to the template holding ROM 311. The neighborhood approximation image generation unit includes a template selection unit 310, a least square approximation unit 312,
Color information restoring section 314 and post-deterioration template processing section 31
Corresponds to 3. The restoration means corresponds to the three-plate image addition unit 315a, the output image buffer 317, the single-plate image addition unit 315b, the single-plate image buffer 316, the difference calculation unit 318, the difference image buffer 319, and the regularity evaluation unit 320.

【0291】テンプレート保持手段が異なる解像度ごと
に分類されたテンプレート群を有し、入力画像の各画素
の近傍に対し、近傍近似画像生成手段が解像度の低いテ
ンプレートから解像度の高いテンプレートへとテンプレ
ートの解像度を上げながら近似誤差を減少させていくた
め、複雑な構造のテンプレートを用意することなく高速
に近似処理が行える。
The template holding means has a group of templates classified for different resolutions, and for the vicinity of each pixel of the input image, the neighborhood approximation image generating means converts the resolution of the template from a low-resolution template to a high-resolution template. Since the approximation error is reduced while increasing the approximation, the approximation process can be performed at high speed without preparing a template having a complicated structure.

【0292】これによって、以下に述べる発明が解決し
ようとする課題のP4が解決される。
Thus, the problem P4 to be solved by the invention described below is solved.

【0293】G.構成(8)には少なくとも第2実施形
態が対応する。
G. At least the second embodiment corresponds to the configuration (8).

【0294】復元手段は補間係数計算部215、線形演
算部216及び出力画像バッファ217に対応する。
The restoring means corresponds to the interpolation coefficient calculation section 215, the linear operation section 216, and the output image buffer 217.

【0295】入力画像の各画素の近傍に対し、近傍近似
画像生成手段が近傍近似画像を生成し、復元手段が近傍
近似画像から空間的相関情報を算出し、この空間的相関
情報に基づき当該画素に対する自己回帰モデルを適用し
て欠落する情報を復元することにより、近傍近似画像生
成手段により選択されたテンプレートの如何にかかわら
ず共通の手順で補間処理が行われる。
A neighborhood approximation image generating means generates a neighborhood approximation image for each neighborhood of each pixel of the input image, and a restoration means calculates spatial correlation information from the neighborhood approximation image. By applying the auto-regression model to and restoring the missing information, the interpolation process is performed in a common procedure regardless of the template selected by the neighborhood approximation image generating means.

【0296】これによって、以下に述べる発明が解決し
ようとする課題のP6が解決される。
Thus, the problem P6 to be solved by the invention described below is solved.

【0297】H.構成(9)、(10)には少なくとも
第6実施形態が対応する。
H. At least the sixth embodiment corresponds to the configurations (9) and (10).

【0298】近傍近似画像生成手段は合成最小自乗近似
部612及び帯域・色情報復元部614に対応する。
The neighborhood approximation image generating means corresponds to the synthesis least square approximation unit 612 and the band / color information restoration unit 614.

【0299】入力画像の各画素の近傍に対し、近傍近似
画像生成手段が近似誤差の少ない複数のテンプレートを
合成して単一の最適テンプレートを生成する。
The neighborhood approximation image generation means combines a plurality of templates with a small approximation error with the neighborhood of each pixel of the input image to generate a single optimal template.

【0300】これによって、以下に述べる発明が解決し
ようとする課題のP8が解決される。
As a result, the problem P8 to be solved by the invention described below is solved.

【0301】I.構成(11)、(12)には少なくと
も第1〜第6実施形態が対応する。
I. At least the first to sixth embodiments correspond to the configurations (11) and (12).

【0302】第1実施形態では、近傍近似画像生成手段
は最小自乗近似部112及び帯域・色情報復元部114
に対応する。
In the first embodiment, the neighborhood approximation image generating means includes the least square approximation unit 112 and the band / color information restoration unit 114
Corresponding to

【0303】第2実施形態では、近傍近似画像生成手段
は最小自乗近似部212、帯域・色情報復元部214及
び色情報復元部213に対応する。
In the second embodiment, the neighborhood approximation image generation means corresponds to the least square approximation unit 212, the band / color information restoration unit 214, and the color information restoration unit 213.

【0304】第3実施形態では、近傍近似画像生成手段
はテンプレート選択部310、最小自乗近似部312、
帯域・色情報復元部314及び劣化後テンプレート加工
部313に対応する。
In the third embodiment, the neighborhood approximation image generation means includes a template selection unit 310, a least square approximation unit 312,
It corresponds to the band / color information restoring unit 314 and the post-deterioration template processing unit 313.

【0305】第4実施形態では、近傍近似画像生成手段
は最小自乗近似部412及び帯域・色情報復元部414
に対応する。
In the fourth embodiment, the neighborhood approximation image generating means includes the least square approximation unit 412 and the band / color information restoration unit 414
Corresponding to

【0306】第5実施形態では、近傍近似画像生成手段
はテンプレート選択部510、テンプレート生成部52
1、最小自乗近似部512、色情報復元部514及び単
板画像生成部513に対応する。
In the fifth embodiment, the neighborhood approximation image generation means includes a template selection unit 510, a template generation unit 52
1, corresponding to the least square approximation unit 512, the color information restoration unit 514, and the single-plate image generation unit 513.

【0307】第6実施形態では、近傍近似画像生成手段
は合成最小自乗近似部612及び帯域・色情報復元部6
14に対応する。
[0307] In the sixth embodiment, the neighborhood approximation image generation means includes the synthesis least square approximation unit 612 and the band / color information restoration unit 6
14 corresponds to.

【0308】入力画像の各画素の近傍に対し、近傍近似
画像生成手段において、まず近傍の各色成分ごとにテン
プレートに定数αを乗算し、定数βを加算した変形テン
プレートにより当該色成分を近似するための最適な係数
α,βを求める。次に、各色成分ごとに最適な近似を与
える係数α,βを用いた場合の変形テンプレートによる
近似誤差を単色近似誤差として計算し、全ての色成分の
単色近似誤差に基づいてテンプレートによる近傍の近似
度を評価することにより、一つのテンプレートで複数の
色成分の近似を行うことができる。
For the neighborhood of each pixel of the input image, the neighborhood approximation image generating means firstly multiplies the template by a constant α for each color component in the neighborhood, and approximates the color component by a modified template obtained by adding the constant β. The optimal coefficients α and β are determined. Next, an approximation error due to the deformed template when using the coefficients α and β that provide the optimum approximation for each color component is calculated as a single-color approximation error, and the approximation of the neighborhood using the template is performed based on the single-color approximation errors of all color components By evaluating the degree, it is possible to approximate a plurality of color components with one template.

【0309】これによって、以下に述べる発明が解決し
ようとする課題のP1、P2が解決される。
[0309] This solves the problems P1 and P2 to be solved by the invention described below.

【0310】上記した構成(1)〜(12)によって解
決される発明が解決しようとする課題は以下の通りであ
る。
The problems to be solved by the inventions solved by the above constitutions (1) to (12) are as follows.

【0311】P1 従来技術では相対的に高サンプリング密度で与えられる
輝度成分においても欠落する情報が存在し、三板方式で
得られる輝度成分と比較して劣化した情報しか得られな
い。また、この輝度成分に基づき算出される他の色成分
も、三板方式で得られる色成分に比較して劣化した情報
しか得られない。
P1 In the prior art, there is missing information even in a luminance component provided at a relatively high sampling density, and only information that is deteriorated compared to the luminance component obtained by the three-plate system can be obtained. Also, other color components calculated based on the luminance component can obtain only information that is deteriorated as compared with the color components obtained by the three-plate system.

【0312】P2 従来技術では任意の色フィルタ配置の入力画像を処理す
る方法に関しては記載していない。輝度成分の補間にお
いては、あらかじめ用意された幾何学的特徴とこれに対
応する補間方法を用意する必要があり、色フィルタ配置
が変わると設計を変更する必要がある。
P2 The prior art does not describe a method for processing an input image having an arbitrary color filter arrangement. In the interpolation of the luminance component, it is necessary to prepare a geometric feature prepared in advance and an interpolation method corresponding thereto, and it is necessary to change the design when the color filter arrangement changes.

【0313】P3 従来技術ではノイズの影響による誤動作に対応する方法
に関しては記載していない。輝度成分および他の色成分
を処理する場合、一回の処理で補間を行うため、パルス
性のノイズの影響を受けやすい。特に輝度成分の処理に
おいては3×3の局所領域で幾何学的特徴を分類するた
め、ノイズによる誤分類が発生しやすい。
P3 The prior art does not describe a method for coping with a malfunction caused by the influence of noise. When processing luminance components and other color components, interpolation is performed in a single process, so that it is easily affected by pulse noise. In particular, in the processing of the luminance component, since the geometric features are classified in a 3 × 3 local area, erroneous classification due to noise is likely to occur.

【0314】P4 従来技術ではノイズの影響を軽減するために幾何学的特
徴を判定する領域のサイズを大きくした場合に高速な処
理で判定を行なうことができない。
P4 In the prior art, when the size of a region for determining a geometric feature is increased in order to reduce the influence of noise, the determination cannot be performed by high-speed processing.

【0315】P5 従来技術では撮像装置の光学系により帯域制限される情
報の回復に関しては記載されていない。輝度成分および
他の色の色成分は帯域制限された範囲内で処理されてお
り、帯域の回復は扱うことはできない。
P5 The prior art does not describe the recovery of information whose band is limited by the optical system of the imaging device. The luminance component and the color components of other colors are processed within the band-limited range, and band recovery cannot be handled.

【0316】P6 従来技術では複数の補間方法を幾何学的特徴に応じて用
意しており、単一の方法に関しては記載されていない。
輝度成分を幾何学的特徴に基づき補間する際には、幾何
学的特徴の数だけ補間方法を用意しなければならない。
高精度な処理のためには、幾何学的特徴の数を増やす必
要があるが、これに応じて補間方法を考えねばならず、
処理が煩雑になる。
P6 In the prior art, a plurality of interpolation methods are prepared according to geometrical features, and no description is given for a single method.
When the luminance component is interpolated based on geometric features, interpolation methods must be prepared for the number of geometric features.
For high-precision processing, it is necessary to increase the number of geometric features, but the interpolation method must be considered accordingly.
Processing becomes complicated.

【0317】P7 従来技術ではあらかじめ用意された幾何学的特徴とこれ
に対応する補間方法に当てはまらない場合に対する対策
に関しては記載されていない。輝度成分を幾何学的特徴
に応じて分類する際には、強制的にどれかの幾何学的特
徴に分類するため、当てはまらない領域に関しては誤差
が発生して高精度な処理を行なうことができない。
P7 In the prior art, there is no description about a geometric feature prepared in advance and a countermeasure against a case where it does not apply to the corresponding interpolation method. When a luminance component is classified according to a geometric feature, since the classification is forcibly classified into any of the geometric features, an error occurs in a region that does not apply, and high-precision processing cannot be performed. .

【0318】P8 従来技術ではあらかじめ用意された幾何学的特徴とこれ
に対応する補間方法に当てはまらない場合には高精度な
処理を行なうことができない。
P8 In the prior art, high-precision processing cannot be performed unless a geometric feature prepared in advance and an interpolation method corresponding thereto are applied.

【0319】[0319]

【発明の効果】請求項1に記載の発明によれば、従来に
比べて高精細な画像を得ることができ、かつ、任意の色
フィルタ配置の入力画像を処理することができるように
なる。
According to the first aspect of the present invention, it is possible to obtain a higher definition image than before and to process an input image having an arbitrary color filter arrangement.

【0320】また、請求項2に記載の発明によれば、請
求項1に記載の発明の効果に加えて、画像信号のノイズ
による劣化を低減できるようになる。
According to the second aspect of the present invention, in addition to the effects of the first aspect of the present invention, it is possible to reduce deterioration of the image signal due to noise.

【0321】また、請求項3に記載の発明によれば、請
求項1または請求項2に記載の発明の効果に加えて、帯
域制限によって失われた情報を回復することができるよ
うになる。
According to the invention of claim 3, in addition to the effect of the invention of claim 1 or 2, information lost due to band limitation can be recovered.

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

【図1】本発明の第1実施形態が適用される画像処理シ
ステムの構成を示す図である。
FIG. 1 is a diagram showing a configuration of an image processing system to which a first embodiment of the present invention is applied.

【図2】図1に示す最小自乗近似部の構成とその周辺回
路を示す図である。
FIG. 2 is a diagram illustrating a configuration of a least squares approximation unit illustrated in FIG. 1 and peripheral circuits thereof;

【図3】色成分マスク生成部により生成されるマスクの
説明図である。
FIG. 3 is an explanatory diagram of a mask generated by a color component mask generation unit.

【図4】本発明の第2実施形態が適用される画像処理シ
ステムの構成を示す図である。
FIG. 4 is a diagram illustrating a configuration of an image processing system to which a second embodiment of the present invention is applied.

【図5】図4における最小自乗近似部112の処理の流
れを表すフローチャートである。
FIG. 5 is a flowchart illustrating a processing flow of a least squares approximation unit 112 in FIG. 4;

【図6】本発明の第3実施形態が適用される画像処理シ
ステムの構成を示す図である。
FIG. 6 is a diagram showing a configuration of an image processing system to which a third embodiment of the present invention is applied.

【図7】本発明の第4実施形態が適用される画像処理シ
ステムの構成を示す図である。
FIG. 7 is a diagram illustrating a configuration of an image processing system to which a fourth embodiment of the present invention is applied.

【図8】図7に示す最小自乗近似部の構成とその周辺回
路を示す図である。
8 is a diagram showing a configuration of a least squares approximation unit shown in FIG. 7 and its peripheral circuits.

【図9】本発明の第5実施形態が適用される画像処理シ
ステムの構成を示す図である。
FIG. 9 is a diagram illustrating a configuration of an image processing system to which a fifth embodiment of the present invention is applied.

【図10】本発明の第6実施形態が適用される画像処理
システムの構成を示す図である。
FIG. 10 is a diagram illustrating a configuration of an image processing system to which a sixth embodiment of the present invention is applied.

【図11】図10に示す合成最小自乗近似部の構成とそ
の周辺回路を示す図である。
11 is a diagram showing a configuration of a composite least squares approximation unit shown in FIG. 10 and its peripheral circuits.

【図12】合成最小自乗近似部の作用を説明するための
図である。
FIG. 12 is a diagram for explaining the operation of a composite least squares approximation unit.

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

100…電子カメラ、101…画像処理装置、102…
レンズ、103…水晶フィルタ、104…単板RGBラ
ンダム配列CCD、105…A/D変換部、106…フ
ィルタ配置情報保持ROM、107…画像バッファ、1
08…入力画像バッファ、109…近傍読み出し部、1
11…テンプレート保持ROM、112…最小自乗近似
部、114…帯域・色情報復元部、115…三板画像加
算部、116…出力画像バッファ。
100: electronic camera, 101: image processing device, 102:
Lens: 103: quartz filter, 104: single-chip RGB random array CCD, 105: A / D converter, 106: ROM for holding filter arrangement information, 107: image buffer, 1
08: input image buffer, 109: neighborhood read unit, 1
11: template holding ROM, 112: least square approximation unit, 114: band / color information restoration unit, 115: three-plate image addition unit, 116: output image buffer

─────────────────────────────────────────────────────
────────────────────────────────────────────────── ───

【手続補正書】[Procedure amendment]

【提出日】平成10年1月19日[Submission date] January 19, 1998

【手続補正1】[Procedure amendment 1]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0037[Correction target item name] 0037

【補正方法】変更[Correction method] Change

【補正内容】[Correction contents]

【0037】一方、最小自乗係数算出部112bは、劣
化後テンプレート保持ROM111bのテンプレートΦ
i(p,q) (i=0,1,2,〜,N−1)からテンプレ
ートΦ0(p,q)を読み出し、転送された近傍画像hから色
成分マスクにより生成された各色成分c(c=0,1,
2)との近似誤差e0(1)、e0(2)、e0(3)
を各々最小化する近似係数α0(c),β0(c)を
近似誤差を表す一般式 e(c) = ‖mask(p,q,c) ・( α(c) Φi(p,q)+β(c)
−h(p,q)‖ を用いて、 各色成分毎に計算する。最小自乗係数算出部
112bは、計算された近似係数α0(c)、β0
(c)を近傍画像hと共に近似係数保持バッファ112
dに送り、最小化された近似誤差e0(1)、e0
(2)、e0(3)とそれに対応するテンプレートのイ
ンデックスi=0を近似誤差累積部112cに送る。
On the other hand, the least-squares coefficient calculating unit 112b calculates the template Φ of the deteriorated template holding ROM 111b.
The template Φ0 (p, q) is read from i (p, q) (i = 0, 1, 2,..., N−1), and each color component c generated by the color component mask from the transferred neighboring image h (C = 0,1,
Error e0 (1), e0 (2), e0 (3)
The approximation coefficients respectively minimize α0 (c), β0 (c ),
General expression e (c) = approximation error = ‖mask (p, q, c) · (α (c) Φi (p, q) + β (c)
Calculate for each color component using −h (p, q) ‖ . The least squares coefficient calculation unit 112b calculates the calculated approximate coefficients α0 (c), β0
(C) together with the neighboring image h and the approximate coefficient holding buffer 112
d and minimized approximation errors e0 (1), e0
(2), e0 (3) and the corresponding template index i = 0 are sent to the approximation error accumulator 112c.

【手続補正2】[Procedure amendment 2]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0040[Correction target item name] 0040

【補正方法】変更[Correction method] Change

【補正内容】[Correction contents]

【0040】次に、最小自乗係数算出部112bが2番
目のテンプレートΦ1(p,q)を読み出し、上記のステップ
を繰り返すことにより、テンプレートΦ1(p,q)のインデ
ックスi=1と、このテンプレートに対応する累積加算
誤差e1が求められる。テンプレート決定部112e
は、累積加算誤差e0と累積加算誤差e1とを比較し、
誤差が小さい方の値を対応するインデックスと共に記憶
部に残す。また、近似係数についても、小さい累積加算
誤差を発生するテンプレートの近似係数が記憶部に保持
される。以降は、3番目のテンプレートΦ2(p,q)、4番
目のテンプレートΦ3(p,q)、…と順番に読み出しては、
累積加算誤差e2、e3…を求め、逐次記憶部に記憶さ
れた累積加算誤差の値と比較しては、より小さい方を記
憶部にインデックス及び近似係数と共に残していくこと
により、最終的に累積加算誤差を最小とするテンプレー
トを決定する。
Next, the least-square coefficient calculator 112b reads the second template Φ1 (p, q) and repeats the above steps to obtain the index i = 1 of the template Φ1 (p, q) and this template Is obtained. Template determination unit 112e
Compares the cumulative addition error e0 with the cumulative addition error e1,
The value with the smaller error is stored in the storage unit together with the corresponding index. As for the approximation coefficient, the approximation coefficient of the template that generates a small cumulative addition error is stored in the storage unit. Thereafter, the third template Φ2 (p, q), the fourth template Φ3 (p, q),.
The cumulative addition errors e2, e3,... Are obtained and compared with the values of the cumulative addition errors stored in the sequential storage unit, and the smaller one is left in the storage unit together with the index and the approximation coefficient. A template that minimizes the addition error is determined.

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 画素の位置に応じて少なくとも1つ以上
の分光特性に関する情報が欠落する画像信号から元の画
像信号を回復処理する画像処理装置において、 前記情報が欠落する画像信号から、指定された画素を包
含する所定サイズの近傍画像を抽出する近傍画像抽出手
段と、 この近傍画像抽出手段によって抽出された近傍画像と同
一サイズの複数の幾何学的パターンに基づくテンプレー
ト群を保持するテンプレート保持手段と、 前記近傍画像抽出手段によって抽出された近傍画像に含
まれる複数の分光特性の情報と、上記テンプレート保持
手段によって保持された複数のテンプレート群との間で
マッチングを行なって近傍画像に最も類似する最適テン
プレートを選択し、この最適テンプレートに基づき近傍
画像を近似する近傍近似画像を生成する近傍近似画像生
成手段と、 この近傍近似画像生成手段によって生成された近傍近似
画像に基づき、前記指定された画素における欠落する情
報を復元する復元手段と、を具備することを特徴とする
画像処理装置。
1. An image processing apparatus for recovering an original image signal from an image signal in which at least one or more information on spectral characteristics is missing according to a position of a pixel, wherein the information is specified from an image signal in which the information is missing. Image extracting means for extracting a nearby image of a predetermined size containing the extracted pixels, and a template holding means for holding a template group based on a plurality of geometric patterns of the same size as the nearby image extracted by the nearby image extracting means And performing matching between information on a plurality of spectral characteristics included in the nearby image extracted by the nearby image extracting unit and a plurality of template groups held by the template holding unit to be most similar to the nearby image. Select the optimal template and generate a neighborhood approximation image that approximates the neighborhood image based on this optimal template. An image comprising: a neighborhood approximation image generating unit that forms the image; and a restoration unit that restores missing information in the designated pixel based on the neighborhood approximation image generated by the neighborhood approximation image generation unit. Processing equipment.
【請求項2】 前記復元手段は、指定された画素を包含
する複数の前記近傍画像から得られる複数の前記近傍近
似画像の、前記少なくとも1つ以上の分光特性に関する
情報を重みつき平均することで復元処理を行なうことを
特徴とする請求項1記載の画像処理装置。
2. The method according to claim 1, wherein the restoration unit performs weighted averaging on information on the at least one or more spectral characteristics of a plurality of the neighboring approximate images obtained from the plurality of the neighboring images including a designated pixel. 2. The image processing apparatus according to claim 1, wherein a restoration process is performed.
【請求項3】 前記テンプレート保持手段は、複数の幾
何学的パターンに基づく第1のテンプレート群と、この
第1のテンプレート群を撮像装置の光学系の帯域制限特
性に応じて劣化させた第2のテンプレート群とを有し、 前記近傍近似画像生成手段は、前記第2のテンプレート
群から前記近傍画像に類似する最適テンプレートを選択
し、これに対応する前記第1のテンプレート群に基づき
帯域制限前の近傍近似画像を生成することを特徴とする
請求項1または2記載の画像処理装置。
3. The template holding means includes: a first template group based on a plurality of geometric patterns; and a second template group degraded according to a band limiting characteristic of an optical system of the imaging apparatus. The neighborhood approximate image generation means selects an optimal template similar to the neighborhood image from the second template group, and performs band limiting before the band limitation based on the first template group corresponding thereto. The image processing apparatus according to claim 1, wherein a neighborhood approximation image is generated.
JP00137797A 1997-01-08 1997-01-08 Image processing device Expired - Fee Related JP3806477B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP00137797A JP3806477B2 (en) 1997-01-08 1997-01-08 Image processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP00137797A JP3806477B2 (en) 1997-01-08 1997-01-08 Image processing device

Publications (2)

Publication Number Publication Date
JPH10200902A true JPH10200902A (en) 1998-07-31
JP3806477B2 JP3806477B2 (en) 2006-08-09

Family

ID=11499806

Family Applications (1)

Application Number Title Priority Date Filing Date
JP00137797A Expired - Fee Related JP3806477B2 (en) 1997-01-08 1997-01-08 Image processing device

Country Status (1)

Country Link
JP (1) JP3806477B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004326770A (en) * 2003-04-24 2004-11-18 Eastman Kodak Co Method and system for automatically decreasing aliasing artifact
JP2008193747A (en) * 2008-05-09 2008-08-21 Olympus Corp Image processing apparatus and recording medium storing image processing program

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004326770A (en) * 2003-04-24 2004-11-18 Eastman Kodak Co Method and system for automatically decreasing aliasing artifact
JP2008193747A (en) * 2008-05-09 2008-08-21 Olympus Corp Image processing apparatus and recording medium storing image processing program

Also Published As

Publication number Publication date
JP3806477B2 (en) 2006-08-09

Similar Documents

Publication Publication Date Title
JP4610930B2 (en) Image processing apparatus and image processing program
US7149355B2 (en) Image processing apparatus, image processing method, image processing program, and computer-readable record medium storing image processing program
JP4054184B2 (en) Defective pixel correction device
US8406557B2 (en) Method and apparatus for correcting lens shading
US8040558B2 (en) Apparatus and method for shift invariant differential (SID) image data interpolation in fully populated shift invariant matrix
US8588521B2 (en) Image processing apparatus and control method therefor
JP5306563B2 (en) Imaging apparatus and image generation method
US20020126892A1 (en) Noise cleaning and interpolating sparsely populated color digital image using a variable noise cleaning Kernel
US20100123792A1 (en) Image processing device, image processing method and program
JP2020166628A (en) Image processing methods, image processing equipment, programs, image processing systems, and methods for manufacturing trained models
US7945091B2 (en) Image processor correcting color misregistration, image processing program, image processing method, and electronic camera
WO2003047234A2 (en) System and method for providing multi-sensor super-resolution
US7269295B2 (en) Digital image processing methods, digital image devices, and articles of manufacture
US20100040304A1 (en) Image quality improvement processing apparatus, image quality improvement processing method and computer-readable recording medium storing image quality improvement processing computer program
EP2103979B1 (en) Method for correcting chromatic aberration
JP4985403B2 (en) Image processing system and image processing program
US20050025379A1 (en) Digital imaging systems, articles of manufacture, and digital image processing methods
CN114519676A (en) Bayer format-based raw image denoising device and method
US8213710B2 (en) Apparatus and method for shift invariant differential (SID) image data interpolation in non-fully populated shift invariant matrix
Saito et al. Demosaicing approach based on extended color total-variation regularization
CN112241670B (en) Image processing methods and devices
JPH06153087A (en) Method for correcting picture element defect
JP3806477B2 (en) Image processing device
JP4255819B2 (en) Signal processing method and image acquisition apparatus
JP3899144B2 (en) Image processing device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20040106

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20060414

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20060509

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20060515

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

Free format text: PAYMENT UNTIL: 20100519

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20100519

Year of fee payment: 4

LAPS Cancellation because of no payment of annual fees