JP4581191B2 - Interpolation processing apparatus and recording medium recording interpolation processing program - Google Patents

Interpolation processing apparatus and recording medium recording interpolation processing program Download PDF

Info

Publication number
JP4581191B2
JP4581191B2 JP2000186367A JP2000186367A JP4581191B2 JP 4581191 B2 JP4581191 B2 JP 4581191B2 JP 2000186367 A JP2000186367 A JP 2000186367A JP 2000186367 A JP2000186367 A JP 2000186367A JP 4581191 B2 JP4581191 B2 JP 4581191B2
Authority
JP
Japan
Prior art keywords
similarity
color
interpolation processing
interpolation
component
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
JP2000186367A
Other languages
Japanese (ja)
Other versions
JP2002010279A (en
Inventor
健一 石賀
健 歌川
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nikon Corp
Original Assignee
Nikon Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nikon Corp filed Critical Nikon Corp
Priority to JP2000186367A priority Critical patent/JP4581191B2/en
Priority to US09/725,286 priority patent/US6836572B2/en
Publication of JP2002010279A publication Critical patent/JP2002010279A/en
Application granted granted Critical
Publication of JP4581191B2 publication Critical patent/JP4581191B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Landscapes

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

Description

【0001】
【発明の属する技術分野】
本発明は、カラーの画像データに対し、所定の色成分が欠落する画素に該色成分に相当する補間量を補う補間処理を行う補間処理装置および該補間処理をコンピュータに実行させる補間処理プログラムを記録した記録媒体に関する。
【0002】
【従来の技術】
電子カメラには、3色(RGB:赤・緑・青)のカラーフィルタが所定の位置に配置(例えば、ベイア配列など)された撮像素子によって、カラーの画像データを生成するものがある。このような電子カメラでは、撮像素子の個々の画素から1つの色成分の色情報しか出力されないため、画素単位で全ての色成分の色情報を得るために、補間処理を行う必要がある。
【0003】
このような補間処理の方法としては、補間処理の対象となる補間対象画素の空間的な類似性を判定し、類似性の強い方向に位置する画素から出力される色情報を用いて補間量を算出する方法が従来から考えられている。また、このような補間処理では、通常、1画素置きに配置された同色の色情報を用いて類似度(以下、「同色間類似度」と称する)を算出し、その類似度に基づいて類似性の強弱が判定される。
【0004】
しかし、このような類似性の強弱の判定では、同色の色情報が配置された間隔(1画素ピッチの2倍に相当する)よりも細かく変化する画像(空間周波数が高い画像)に対しては、類似性が強い方向を精度良く判定することはできない。そこで、空間周波数が高い画像に対して類似性の強い方向を判定するために、1画素ピッチに配置された異なる色の色情報を用いて類似度(以下、「異色間類似度」と称する)を算出し、その類似度に基づいて類似性の強弱を判定する技術を特願平11−145473号などで取り入れるようになった。
【0005】
ところが、異色間類似度は、色の違いを無視して算出されるので、取り扱いが非常に難しく、取り扱い方によっては、類似性の強弱を誤判定させるおそれがある。
そこで、本出願人は、特願平11−145473号で、異色間類似度と同色間類似度とを加重加算して得られる類似度を用いて類似性の強弱を判定したり、異色間類似度と同色間類似度との何れか一方を画像の特徴に応じて選択して類似性の強弱を判定する発明を出願している。
【0006】
【発明が解決しようとする課題】
しかし、特願平11−145473号に記載の「異色間類似度と同色間類似度とを加重加算して得られる類似度を用いて類似性の強弱を判定する補間処理装置」は、大部分の画像に対して類似性の強弱を正しく判定することができるが、ある特殊な構造を示す画像に対しては、異色間類似度による弊害が回避できず、誤判定を生じる場合があった。
【0007】
また、特願平11−145473号に記載の「異色間類似度と同色間類似度との何れか一方を画像の特徴に応じて選択して類似性の強弱を判定する補間処理装置」では、画像の特徴の抽出が適切に行えず、類似性の強弱の判定に適した類似度を用いることができない可能性が高かった。
そこで、請求項1ないし請求項8、請求項10に記載の発明は、類似性の強弱の判定に適した類似度を算出することによって、補間量を高い精度で算出することができる補間処理装置を提供することを目的とする。
【0008】
また、請求項に記載の発明は、類似性の強弱の判定に適した類似度を算出することによって、補間量を高い精度で算出することができる補間処理プログラムを記録した記録媒体を提供することを目的とする。
【0009】
【課題を解決するための手段】
請求項1に記載の補間処理装置は、 2次元配列された複数の画素を有し、前記複数の画素は、異なる第1〜第n(n≧2)色成分の色情報を出力し、前記各画素は1つの色成分の色情報を出力する撮像素子の第1色成分が欠落する画素に第1色成分の色情報を補間する補間処理装置において、
補間処理対象の画素における少なくとも2方向に対する類似度の各々を、前記補間処理対象の画素とその近傍の複数の画素とから選ばれる複数の画素の色情報に基づき、「異なる色成分の色情報を用いた異色間類似度成分を含む異色間類似度」と「同じ色成分の色情報のみを用いた同色間類似度成分を含む同色間類似度」との2種類に対して各々算出し、前記補間処理対象の画素が属する局所的な領域における画像の色彩に関する情報を画像内の方向を考慮して抽出し、前記色彩に関する情報に応じて、どちらか一方の類似度に切り換える、もしくは、各類似度を加重加算するときの加重比率を切り換えることにより算出する類似度算出手段と、前記類似度に基づき、各方向の類似性の強弱を判定する類似性判定手段と、前記類似性判定手段による判定結果に応じて、補間処理対象の画素の補間量を算出する補間量算出手段とを備えたことを特徴とする。
【0010】
請求項2に記載の補間処理装置は、請求項1に記載の補間処理装置において、前記異なる第1〜第n(n≧2)色成分の色情報を出力する複数の画素は、異なる第1〜第3色成分の色情報を出力し、第1色成分が第2色成分および第3色成分に比べて空間周波数が高い場合、前記類似度算出手段は、
(1)第1色成分の色情報と第2色成分の色情報とから成る異色間類似度成分と、
(2)第1色成分の色情報と第3色成分の色情報とから成る異色間類似度成分と
の少なくとも一方を含む類似度を異色間類似度とし、
(1)第1色成分の色情報のみから成る同色間類似度成分と、
(2)第2色成分の色情報のみから成る同色間類似度成分と、
(3)第3色成分の色情報のみから成る同色間類似度成分と
の少なくとも1つを含む類似度を同色間類似度とすることを特徴とする。
【0011】
請求項3に記載の補間処理装置は、請求項1または請求項2に記載の補間処理装置において、前記類似度算出手段は、前記色彩に関する情報を基準に、前記局所的な領域における画像が無彩色部であるか彩色部であるかを判別し、該局所的な領域における画像が無彩色部である場合には、補間処理対象の画素の複数の方向に対する類似度として前記異色間類似度を選択する、または、該異色間類似度と前記同色間類似度とを加重加算する際の該異色間類似度の加重比率を該同色間類似度の加重比率よりも大きくし、該局所的な領域における画像が彩色部である場合には、補間処理対象の画素の複数の方向に対する類似度として該同色間類似度を選択する、または、該異色間類似度と前記同色間類似度とを加重加算する際の該同色間類似度の加重比率を該異色間類似度の加重比率よりも大きくすることを特徴とする。
請求項4に記載の補間処理装置は、請求項1または請求項3に記載の補間処理装置において、前記類似度算出手段は、前記色彩に関する情報として前記異色間類似度を用いることを特徴とする。
【0012】
請求項5に記載の補間処理装置は、請求項4に記載の補間処理装置において、前記類似度算出手段は、前記異色間類似度が、少なくとも一方向に対して強い類似性を示す場合、前記局所的な領域における画像が無彩色部であると判断し、その他の場合、該局所的な領域における画像が彩色部であると判断することを特徴とする。
【0013】
請求項6に記載の補間処理装置は、請求項ないし請求項5の何れか1項に記載の補間処理装置において、前記類似度算出手段は、前記異色間類似度を前記同色間類似度よりも短い距離間隔で存在する色情報を用いて算出することを特徴とする。
【0014】
請求項7に記載の補間処理装置は、請求項1ないし請求項6の何れか1項に記載の補間処理装置において、前記類似度算出手段は、補間処理対象の画素の複数の方向に対する類似度として、補間処理対象の画素のみならず補間処理対象の画素の周辺の画素に対して算出した複数の方向に対する類似度を用いることを特徴とする。
請求項8に記載の補間処理装置は、請求項1ないし請求項7の何れか1項に記載の補間処理装置において、前記類似性判定手段は、各方向間の類似度の差異が所定の閾値よりも小さい場合、各方向の類似性が同程度であると判定することを特徴とする。
【0015】
請求項9に記載の補間処理プログラムを記録した記録媒体は、2次元配列された複数の画素を有し、前記複数の画素は、異なる第1〜第n(n≧2)色成分の色情報を出力し、前記各画素は1つの色成分の色情報を出力する撮像素子の第1色成分が欠落する画素に第1色成分の色情報を補間する補間処理プログラムを記録した記録媒体において、補間処理対象の画素における少なくとも2方向に対する類似度の各々を、前記補間処理対象の画素とその近傍の複数の画素とから選ばれる複数の画素の色情報に基づき、「異なる色成分の色情報を用いた異色間類似度成分を含む異色間類似度」と「同じ色成分の色情報のみを用いた同色間類似度成分を含む同色間類似度」との2種類に対して各々算出し、前記補間処理対象の画素が属する局所的な領域における画像の色彩に関する情報を画像内の方向を考慮して抽出し、前記色彩に関する情報に応じて、どちらか一方の類似度に切り換える、もしくは、各類似度を加重加算するときの加重比率を切り換えることにより算出する類似度算出手順と、前記類似度に基づき、各方向の類似性の強弱を判定する類似性判定手順と、前記類似性判定手順による判定結果に応じて、補間処理対象の画素の補間量を算出する補間量算出手順とをコンピュータに実行させることを特徴とする補間処理プログラムを記録したことを特徴とする。
請求項10に記載の補間処理装置は、請求項1に記載の補間処理装置において、前記色彩に関する情報は、前記補間処理対象の画素における少なくとも2方向において、異なる色成分の色情報を使用して求める情報であることを特徴とする。
【0019】
ここで、上記の発明に関連する発明(《1》〜《8》)を開示する
【0020】
》:請求項に記載の補間処理プログラムを記録した記録媒体において、前記異なる第1〜第n(n≧2)色成分の色情報を出力する複数の画素は、異なる第1〜第3色成分の色情報を出力し、第1色成分が第2色成分および第3色成分に比べて空間周波数が高い場合、
前記類似度算出手段は、
(1)第1色成分の色情報と第2色成分の色情報とから成る異色間類似度成分と、
(2)第1色成分の色情報と第3色成分の色情報とから成る異色間類似度成分と
の少なくとも一方を含む類似度を異色間類似度とし、
(1)第1色成分の色情報のみから成る同色間類似度成分と、
(2)第2色成分の色情報のみから成る同色間類似度成分と、
(3)第3色成分の色情報のみから成る同色間類似度成分と
の少なくとも1つを含む類似度を同色間類似度とする
ことを特徴とする補間処理プログラムを記録した記録媒体。
【0021】
》:《1》または請求項に記載の補間処理プログラムを記録した記録媒体において、
前記類似度算出手段は、
前記色彩に関する情報を基準に、前記局所的な領域における画像が無彩色部であるか彩色部であるかを判別し、該局所的な領域における画像が無彩色部である場合には、補間処理対象の画素の複数の方向に対する類似度として前記異色間類似度を選択する、または、該異色間類似度と前記同色間類似度とを加重加算する際の該異色間類似度の加重比率を該同色間類似度の加重比率よりも大きくし、該局所的な領域における画像が彩色部である場合には、補間処理対象の画素の複数の方向に対する類似度として該同色間類似度を選択する、または、該異色間類似度と前記同色間類似度とを加重加算する際の該同色間類似度の加重比率を該異色間類似度の加重比率よりも大きくする
ことを特徴とする補間処理プログラムを記録した記録媒体。
【0022】
》:《1》、請求項、《》の何れか1つに記載の補間処理プログラムを記録した記録媒体において、
前記類似度算出手順は、
前記色彩に関する情報として前記異色間類似度を用いる
ことを特徴とする補間処理プログラムを記録した記録媒体。
【0023】
》:《》に記載の補間処理プログラムを記録した記録媒体において、前記類似度算出手順は、前記異色間類似度が、少なくとも一方向に対して強い類似性を示す場合、前記局所的な領域における画像が無彩色部であると判断し、その他の場合、該補間処理対象の画素とその近傍の複数の画素とから選ばれる複数の画素における画像が彩色部であると判断する
ことを特徴とする補間処理プログラムを記録した記録媒体。
【0024】
》:請求項、《1》ないし《》の何れか1つに記載の補間処理プログラムを記録した記録媒体において、
前記類似度算出手順は、
前記異色間類似度を前記同色間類似度よりも短い距離間隔で存在する色情報を用いて算出する
ことを特徴とする補間処理プログラムを記録した記録媒体。
【0025】
》:請求項、《1》ないし《》の何れか1つに記載の補間処理プログラムを記録した記録媒体において、
前記類似度算出手順は、
補間処理対象の画素の複数の方向に対する類似度として、補間処理対象の画素のみならず補間処理対象の画素の周辺の画素に対して算出した複数の方向に対する類似度を用いる
ことを特徴とする補間処理プログラムを記録した記録媒体。
【0026】
》:請求項、《1》ないし《》の何れか1つに記載の補間処理プログラムを記録した記録媒体において、
前記類似性判定手順は、
各方向間の類似度の差異が所定の閾値よりも小さい場合、各方向の類似性が同程度であると判定する
ことを特徴とする補間処理プログラムを記録した記録媒体。
【0027】
なお、上述した異色間類似度は、複数の異色画素の色情報の差分の絶対値や、そのべき乗等により算出される類似度の要素により構成され、1つ以上の類似度の要素で構成される類似度成分を用いて算出される。同様に、同色間類似度は、複数の同色画素の色情報の差分の絶対値や、そのべき乗等により算出される類似度の要素により構成され、1つ以上の類似度の要素で構成される類似度成分を用いて算出される。
【0028】
【発明の実施の形態】
以下、図面に基づいて、本発明の実施形態について詳細を説明する。
図1は、第1の実施形態および第2の実施形態に対応する電子カメラの機能ブロック図である。
なお、第1の実施形態に対応する電子カメラは、請求項1ないし請求項8と、請求項10とに記載の補間処理装置が行う補間処理の機能を備えた電子カメラに相当し、第2の実施形態に対応する電子カメラは、請求項ないし請求項8と、請求項10とに記載の補間処理装置が行う補間処理の機能を備えた電子カメラに相当する。
【0029】
図1において、電子カメラ10は、制御部11、撮影光学系12、撮像部13、A/D変換部14、画像処理部15および記録部16を有する。また、画像処理部15は、補間処理部(例えば、補間処理専用の1チップ・マイクロプロセッサ)17を有する。さらに、撮像部13は、RGBのカラーフィルタがベイア配列された撮像素子(図示省略)を有している。
【0030】
なお、図1では、説明を簡単にするため、画像処理部15内に補間処理部17のみを記載しているが、画像処理部15内には、例えば、階調変換処理など他の画像処理を行う機能ブロックが設けられても良い。
【0031】
図1において、制御部11は、撮像部13、A/D変換部14、画像処理部15および記録部16に接続される。また、撮影光学系12で取得された光学像は、撮像部13内の撮像素子に結像する。撮像部13の出力は、A/D変換部14によって量子化され、画像データとして画像処理部15に供給される。画像処理部15に供給された画像データは、補間処理部17によって補間処理が施され、必要に応じてJPEG圧縮など画像圧縮を行ってから、記録部16を介して記録される。補間処理により各色成分の解像度が高められた画像データは、最終的に、ディスプレイ、プリンタなど各接続機器に応じた表色系データとして出力される。
【0032】
図2は、第1の実施形態および第2の実施形態における画像データの色成分の配列を示す図である。
図2では、R、G、Bを用いて色成分の種類を示し、i、jを用いて各々の色成分が存在する画素の位置を示しており、図2(1)は、赤色成分が存在する画素を補間対象画素とした場合の配列を示し、図2(2)は、青色成分が存在する画素を補間対象画素とした場合の配列を示す。
【0033】
なお、以下では、補間処理として緑色の補間量を求めるものとし、座標[i,j]に位置する画素を補間対象画素とする。また、以下に示す補間処理では、補間対象画素の色成分の種類(赤または青)に関係なく、緑色の補間量を算出することができるため、図2のRおよびBをZに置き換えて、補間対象画素の色情報をZ[i,j]によって表現し、他の画素の色情報についても同様に表現する。
【0034】
《第1の実施形態》
図3は、第1の実施形態における補間処理部17の動作フローチャートである。 以下、第1の実施形態の動作を説明するが、ここでは、図3を参照して補間処理部17の動作を説明する。
まず、補間処理部17は、縦方向と横方向とに対する異色間類似度成分と、縦方向と横方向とに対する同色間類似度成分とを算出する(図3S1)。
【0035】
なお、第1の実施形態では、縦方向と横方向とに対する異色間類似度成分として、以下の式10〜式13によって定義される複数種類の類似度成分を算出し、縦方向と横方向とに対する同色間類似度成分として、以下の式14〜式19によって定義される複数種類の類似度成分を算出する。
(a)異色間類似度成分
縦方向のGR(GB)間類似度成分:
Cv1[i,j]=(|G[i,j-1]-Z[i,j]|+|G[i,j+1]-Z[i,j]|)/2 ・・・式10
横方向のGR(GB)間類似度成分:
Ch1[i,j]=(|G[i-1,j]-Z[i,j]|+|G[i+1,j]-Z[i,j]|)/2 ・・・式11
縦方向のBG(RG)間類似度成分:
Cv2[i,j]=(|Z[i-1,j-1]-G[i-1,j]|+|Z[i-1,j+1]-G[i-1,j]|
+|Z[i+1,j-1]-G[i+1,j]|+|Z[i+1,j+1]-G[i+1,j]|)/4 ・・・式12
横方向のBG(RG)間類似度成分:
Ch2[i,j]=(|Z[i-1,j-1|-G[i,j-1]|+|Z[i-1,j+1]-G[i,j+1]|
+|Z[i+1,j-1]-G[i,j-1]|+|Z[i+1,j+1]-G[i,j+1]|)/4 ・・・式13
(b)同色間類似度成分
縦方向のGG間類似度成分:
Cv3[i,j]=|G[i,j-1]-G[i,j+1]| ・・・式14
横方向のGG間類似度成分:
Ch3[i,j]=|G[i-1,j]-G[i+1,j]| ・・・式15
縦方向のBB(RR)間類似度成分:
Cv4[i,j]=(|Z[i-1,j-1]-Z[i-1,j+1]|+|Z[i+1,j-1]-Z[i+1,j+1]|)/2 ・・・式16
横方向のBB(RR)間類似度成分:
Ch4[i,j]=(|Z[i-1,j-1]-Z[i+1,j-1]|+|Z[i-1,j+1]-Z[i+1,j+1]|)/2 ・・・式17
縦方向のRR(BB)間類似度成分:
Cv5[i,j]=(|Z[i,j-2]-Z[i,j]|+|Z[i,j+2]-Z[i,j]|)/2 ・・・式18
横方向のRR(BB)間類似度成分:
Ch5[i,j]=(|Z[i-2,j]-Z[i,j]|+|Z[i+2,j]-Z[i,j]|)/2 ・・・式19
なお、上述した各々の類似度成分を構成する類似度の要素は、差分の絶対値を用いて算出されているが、絶対値の2乗やべき乗等によって算出しても良い。
【0036】
次に、補間処理部17は、以下の式20、式21に示すようにして、複数種類の異色間類似度成分を方向別に加重加算して異色間類似度を算出すると共に、以下の式22、式23に示すようにして、複数種類の同色間類似度成分についても方向別に加重加算して同色間類似度を算出する(図3S2)。
CvN0[i,j]=α・Cv1[i,j]+β・Cv2[i,j] ・・・式20
ChN0[i,j]=α・Ch1[i,j]+β・Ch2[i,j] ・・・式21
ただし、α,βは、0または正の定数であり、α+β=1を満たす。
【0037】
Cv0[i,j]=γ・Cv3[i,j]+δ・Cv4[i,j]+ε・Cv5[i,j] ・・・式22
Ch0[i,j]=γ・Ch3[i,j]+δ・Ch4[i,j]+ε・Ch5[i,j] ・・・式23
ただし、γ,δ,εは、0または正の定数であり、γ+δ+ε=1を満たす。
なお、式20、式21において、α=1,β=0とすると、異色間類似度は、「補間対象画素と同色の色情報」と緑色成分の色情報とから構成されることになり、α=0,β=1とすると、異色間類似度は、「赤色成分と青色成分とのうち、補間対象画素とは異なる色成分の色情報」と緑色成分の色情報とから構成されることになる。また、式22、式23において、γ=0とすると、同色間類似度は、「赤色成分の色情報のみから成る類似度成分」と「青色成分の色情報のみから成る間類似度成分」との少なくとも一方を含むことになる。
【0038】
次に、補間処理部17は、補間対象画素と周辺画素とにおける各々の類似度成分の加重加算によって得られた値(CvN0[i,j],CvN0[i-1,j-1],CvN0[i-1,j+1],CvN0[i+1,j-1],CvN0[i+1,j+1]など)を、以下の《方法1》または《方法2》のように方向別に加重加算(以下、「周辺加算」と称する。)して、最終的な補間対象画素における縦方向と横方向とに対する異色間類似度と縦方向と横方向とに対する同色間類似度とを算出する(図3S3)。
【0039】
ただし、《方法1》または《方法2》において、CvN[i,j]は縦方向の異色間類似度を示し、ChN[i,j]は横方向の異色間類似度を示し、Cv[i,j]は縦方向の同色間類似度を示し、Ch[i,j]は横方向の同色間類似度を示す。
《方法1》
CvN[i,j]=(4・CvN0[i,j]+CvN0[i-1,j-1]+CvN0[i-1,j+1]
+CvN0[i+1,j-1]+CvN0[i+1,j+1])/8 ・・・式24
ChN[i,j]=(4・ChN0[i,j]+ChN0[i-1,j-1]+ChN0[i-1,j+1]
+ChN0[i+1,j-1]+ChN0[i+1,j+1])/8 ・・・式25
Cv[i,j]=(4・Cv0[i,j]+Cv0[i-1,j-1]+Cv0[i-1,j+1]
+Cv0[i+1,j-1]+Cv0[i+1,j+1])/8 ・・・式26
Ch[i,j]=(4・Ch0[i,j]+Ch0[i-1,j-1]+Ch0[i-1,j+1]
+Ch0[i+1,j-1]+Ch0[i+1,j+1])/8 ・・・式27
《方法2》
CvN[i,j]=(4・CvN0[i,j]
+2(CvN0[i-1,j-1]+CvN0[i+1,j-1]+CvN0[i-1,j+1]+CvN0[i+1,j+1])
+CvN0[i,j-2]+CvN0[i,j+2]+CvN0[i-2,j]+CvN0[i+2,j])/16 ・・・式28
ChN[i,j]=(4・ChN0[i,j]
+2(ChN0[i-1,j-1]+ChN0[i+1,j-1]+ChN0[i-1,j+1]+ChN0[i+1,j+1])
+ChN0[i,j-2]+ChN0[i,j+2]+ChN0[i-2,j]+ChN0[i+2,j])/16 ・・・式29
Cv[i,j]=(4・Cv0[i,j]
+2(Cv0[i-1,j-1]+Cv0[i+1,j-1]+Cv0[i-1,j+1]+Cv0[i+1,j+1])
+Cv0[i,j-2]+Cv0[i,j+2]+Cv0[i-2,j]+Cv0[i+2,j])/16 ・・・式30
Ch[i,j]=(4・Ch0[i,j]
+2(Ch0[i-1,j-1]+Ch0[i+1,j-1]+Ch0[i-1,j+1]+Ch0[i+1,j+1])
+Ch0[i,j-2]+Ch0[i,j+2]+Ch0[i-2,j]+Ch0[i+2,j])/16 ・・・式31
なお、《方法1》は、図4(1)に示すようにして補間対象画素と周辺画素とにおける類似度成分の加重加算を行うことに相当し、《方法2》は、図4(2)に示すようにして補間対象画素と周辺画素とにおける類似度成分の加重加算を行うことに相当する。
【0040】
このようにして、第1の実施形態では、補間対象画素における異色間類似度および同色間類似度を周辺加算して算出することにより、後述する類似性の強弱の判定において、補間対象画素と周辺画素との連続性が考慮されて精度が高められる。
ただし、演算を簡略化する場合は、
CvN[i,j]=CvN0[i,j]
ChN[i,j]=ChN0[i,j]
Cv[i,j]=Cv0[i,j]
Ch[i,j]=Ch0[i,j]
とする。
【0041】
ところで、上述した異色間類似度成分は、縦方向または横方向に隣接する画素の色情報を比較することによって算出されるので、このような異色間類似度成分から成る異色間類似度は、同色間類似度よりも短い距離間隔で類似性の強弱の判定が可能である。すなわち、異色間類似度には、同色間類似度よりも細かい画像の構造が反映されることになる。
【0042】
とりわけ、異色間類似度は、異なる色成分の色情報が全て同一の輝度情報を表していると仮定して算出されるため、異色間類似度を用いた類似性の強弱の判定は、無彩色部において、信頼性が高い。一方、同色間類似度を用いた類似性の強弱の判定は、彩色部・無彩色部ともに全般的に信頼性が高いが、画像の構造が細かい部分では、異色間類似度を用いた場合に比べて信頼性が劣る。
【0043】
したがって、補間処理の対象となる画像全体に対して、信頼性の高い類似性の判定を行うには、画像全体を、無彩色部と彩色部に分け、各々の部分に適した類似度を用いる方法が優れている。
補間処理部17は、縦方向と横方向とに対する異色間類似度と縦方向と横方向とに対する同色間類似度とを算出すると、補間対象画素の近傍の画像が無彩色部であるか否かを判定する(図3S4)。
【0044】
そして、このような判定によって、補間処理部17は、補間対象画素の近傍の画像が無彩色部であると判断した場合、異色間類似度を用いて補間対象画素における類似性の強弱を判定し(図3S5)、補間対象画素の近傍の画像が彩色部であると判断した場合、同色間類似度を用いて補間対象画素における類似性の強弱を判定する(図3S6)。
【0045】
ところで、補間対象画素の近傍の画像が無彩色部であるか否かの判定には、局所的な色彩の有無を示す色指標が必要となるが、このような色指標として、局所的な色差情報を用いる。上述したように算出した異色間類似度には、類似性の強弱と同時に局所的な色差情報が反映されているので、色指標として、異色間類似度を直接利用することが可能である。
【0046】
ただし、異色間類似度は、値が小さい程、類似性が強いことを示すので、縦方向および横方向に対する異色間類似度が共に大きな値である場合には、無彩色部で縦横両方向に対する類似性が弱いか、または、補間対象画素の近傍の画像が彩色部であることを意味する。逆に、縦方向と横方向との少なくとも1つの方向に対する異色間類似度が比較的小さな値であれば、補間対象画素の近傍の画像が無彩色部であり、類似性の強い方向が存在していることを意味する。
【0047】
ここで、異色間類似度と同色間類似度とを切り換えて、類似性の強弱を判定する処理の詳細を説明する。
図5は、類似性の強弱を判定する処理の詳細を示すフローチャートであり、図6は、類似度と類似性の強弱の関係を示す図である。
なお、図5S1は、図3S4に対応し、図5S2〜S6は、図3S5に対応し、図5S7〜S11は、図3S6に対応する。
【0048】
まず、補間処理部17は、閾値ThNv,ThNhについて、
CvN[i,j]≦ThNv または ChN[i,j]≦ThNh ・・・条件1
が成り立つか否かを判定する(図5S1)。ただし、閾値ThNv,ThNhは、階調数が256のとき10程度以下の値をとるものとする。
補間処理部17は、条件1が成り立つ場合、閾値Th0について、
|CvN[i,j]-ChN[i,j]|≦Th0 ・・・条件2
が成り立つか否かを判定する(図5S2)。なお、条件2は、縦方向の異色間類似度CvN[i,j]と横方向の異色間類似度ChN[i,j]とが同程度であるか否かを判定するための条件であり、閾値Th0は、縦方向の異色間類似度CvN[i,j]と横方向の異色間類似度ChN[i,j]との差異が微少である場合、ノイズの影響によって一方の類似性が強いと誤判定されることを避ける役割を果たす。そのため、ノイズの多いカラー画像に対しては、閾値Th0の値を高く設定することによって、類似性の判定の精度が高められる。
【0049】
補間処理部17は、条件1および条件2が成り立つ場合(図6の領域1に相当する)、補間対象画素の近傍の画像が無彩色部であり、縦横両方向に類似性が強いと判断し、類似性を示す指標HV[i,j]に0を設定する(図5S3)。
補間処理部17は、条件1が成り立ち、条件2が成り立たない場合、
CvN[i,j]<ChN[i,j] ・・・条件3
が成り立つか否かを判定する(図5S4)。
【0050】
補間処理部17は、条件1および条件3が成り立ち、条件2が成り立たない場合(図6の領域2に相当する)、補間対象画素の近傍の画像が無彩色部であり、縦方向に類似性が強いと判断し、指標HV[i,j]に1を設定する(図5S5)。
補間処理部17は、条件1が成り立ち、条件2および条件3が成り立たない場合(図6の領域3に相当する)、補間対象画素の近傍の画像が無彩色部であり、横方向に類似性が強いと判断し、指標HV[i,j]に−1を設定する(図5S6)。
【0051】
補間処理部17は、条件1が成り立たない場合、閾値Th1について、
|Cv[i,j]-Ch[i,j]|≦Th1 ・・・条件4
が成り立つか否かを判定する(図5S7)。なお、条件4は、縦方向の同色間類似度Cv[i,j]と横方向の同色間類似度Ch[i,j]とが同程度であるか否かを判定するための条件であり、閾値Th1は、縦方向の同色間類似度Cv[i,j]と横方向の同色間類似度Ch[i,j]との差異が微少である場合、ノイズの影響によって一方の類似性が強いと誤判定されることを避ける役割を果し、閾値Th0と同様に、ノイズの多いカラー画像に対して値を高く設定することによって、類似性の判定の精度が高められる。
【0052】
補間処理部17は、条件1が成り立たず、条件4が成り立つ場合(図6の領域4に相当する)、補間対象画素の近傍の画像が彩色部であり、縦横両方向に類似性が強い(または、弱い)と判断し、指標HV[i,j]に0を設定する(図5S8)。
補間処理部17は、条件1および条件4が成り立たない場合、
Cv[i,j]<Ch[i,j] ・・・条件5
が成り立つか否かを判定する(図5S9)。
【0053】
補間処理部17は、条件1が成り立たず、条件5が成り立つ場合(図6の領域5に相当する)、補間対象画素の近傍の画像が彩色部であり、縦方向に類似性が強いと判断し、指標HV[i,j]に1を設定する(図5S10)。
補間処理部17は、条件1および条件5が成り立たない場合(図6の領域6に相当する)、補間対象画素の近傍の画像が彩色部であり、横方向に類似性が強いと判断し、指標HV[i,j]に−1を設定する(図5S11)。
【0054】
以上説明したようにして類似性の強弱が判定されると、補間処理部17は、類似性の強弱の判定結果に応じて、補間量を算出する(図3S7)。
例えば、補間処理部17は、以下のようにして緑の補間量G[i,j]を算出する。
HV[i,j]が1の場合 G[i,j]=Gv[i,j] ・・・式32
HV[i,j]が−1の場合 G[i,j]=Gh[i,j] ・・・式33
HV[i,j]が0の場合 G[i,j]=(Gv[i,j]+Gh[i,j])/2 ・・・式34
ただし、Gv[i,j],Gh[i,j]は、以下の《方法1》または《方法2》のようにして算出される値である。
【0055】
《方法1》
Gv[i,j]=(G[i,j-1]+G[i,j+1])/2 ・・・式35
Gh[i,j]=(G[i-1,j]+G[i+1,j])/2 ・・・式36
《方法2》
Gv[i,j]=(G[i,j-1]+G[i,j+1])/2+(2・Z[i,j]-Z[i,j-2]-Z[i,j+2])/4 ・・・式37
Gh[i,j]=(G[i-1,j]+G[i+1,j])/2+(2・Z[i,j]-Z[i-2,j]-Z[i+2,j])/4 ・・・式38
以上説明したように、第1の実施形態では、局所的な色差情報が反映される異色間類似度を利用して画像全体を無彩色部と彩色部に分け、各々の部分に適した類似度に基づいて類似性の強弱を判定することができるため、従来の技術に比べて補間量を高い精度で算出することができる。
【0056】
なお、第1の実施形態では、類似性の強弱を判定する際に、異色間類似度と同色間類似度とを切り換えているが、類似性の判定に用いる類似度としては、異色間類似度と同色間類似度とを完全に切り換える以外に、無彩色部では異色間類似度の加算比率を上げ、彩色部では同色間類似度の加算比率を上げて、異色間類似度と同色間類似度とを加重加算して得られる類似度でも良い。
【0057】
また、第1の実施形態では、局所的な色彩の有無を調べる方法として異色間類似度に含まれる色差を用いたが、色の比など他の色指標を用いても良い。
以下、RB補間処理の動作を説明するが、ここでは、従来から行われているRB補間処理を説明する(B補間処理の説明は省略する)。
まず、従来から行われているRB補間処理としては、色差空間における線形補間処理が知られており、全ての画素の色差(赤色成分(または、青色成分)の色情報から緑色成分の色情報を減算した値)を算出した後に、補間対象画素毎に、以下の(1)〜(3)の何れかの処理を行って、補間量が算出される。
【0058】
(1)補間対象画素に欠落する色成分が、補間対象画素の上下方向に隣接する2つの画素に存在する場合、それらの2つの画素の色差の平均値に補間対象画素の緑色成分の色情報を加算した値を補間量とする。
(2)補間対象画素に欠落する色成分が、補間対象画素の左右方向に隣接する2つの画素に存在する場合、それらの2つの画素の色差の平均値に補間対象画素の緑色成分の色情報を加算した値を補間量とする。
【0059】
(3)補間対象画素に欠落する色成分が、補間対象画素の斜め方向に隣接する4つの画素に存在する場合、それらの4つの画素の色差の平均値に補間対象画素の緑色成分の色情報を加算した値を補間量とする。
《第2の実施形態》
図7は、第2の実施形態における補間処理部17の動作フローチャートである。
以下、第2の実施形態の動作を説明するが、ここでは、図7を参照して補間処理部17の動作を説明する。
【0060】
まず、補間処理部17は、以下の式39と式40とによって定義される縦方向と横方向とに対する異色間類似度を算出する(図7S1)。
縦方向の異色間類似度:
CvN[i,j]=(|G[i,j-1]-Z[i,j]|+|G[i,j+1]-Z[i,j]|)/2 ・・・式39
横方向の異色間類似度:
ChN[i,j]=(|G[i-1,j]-Z[i,j]|+|G[i+1,j]-Z[i,j]|)/2 ・・・式40
次に、補間処理部17は、補間対象画素の近傍の画像の彩度が高いか否かを判定する(図7S2)。
【0061】
そして、このような判定によって、補間処理部17は、補間対象画素の近傍の画像の彩度が高いと判断した場合、異色間類似度と同色間類似度とを加重加算する際の同色間類似度の重み係数da1に異色間類似度の重み係数da2よりも大きい値を設定する(図7S3)。一方、補間処理部17は、補間対象画素の近傍の画像の彩度が低いと判断した場合、異色間類似度の重み係数da2に同色間類似度の重み係数da1よりも大きい値を設定する(図7S4)。
【0062】
ところで、補間対象画素の近傍の画像の彩度が高いか否かの判定は、第1の実施形態における「補間対象画素の近傍の画像が無彩色部であるか否かの判定」と同様に、異色間類似度を利用することによって行える。
すなわち、縦方向および横方向に対する異色間類似度が共に大きな値である場合には、補間対象画素の近傍の画像の彩度が高いか、または、彩度が低くても、縦横両方向に対する類似性が弱いことを意味する。逆に、縦方向と横方向との少なくとも1つの方向に対する異色間類似度が比較的小さな値であれば、補間対象画素の近傍の画像の彩度が低く、類似性の強い方向が存在していることを意味する。
【0063】
例えば、補間処理部17は、閾値BWthについて、
CvN[i,j]>BWth かつ ChN[i,j]>BWth ・・・条件6
が成り立つ場合、彩度が高いと判断し、条件6が成り立たない場合、彩度が低いと判断と判断する。ただし、閾値BWthは、階調数が256のとき5程度の値をとるものとする。
【0064】
そして、補間処理部17は、条件6が成り立つ場合(補間対象画素の近傍の画像の彩度が高い場合)、同色間類似度の重み係数da1および異色間類似度の重み係数da2に以下のような値を設定し、
da1=da1s
da2=da2s
条件6が成り立たない場合(補間対象画素の近傍の画像の彩度が低い場合)、同色間類似度の重み係数da1および異色間類似度の重み係数da2に以下のような値を設定する。
【0065】
da1=da1d
da2=da2d
ただし、da1s,da2s,da1d,da2dは、0または正の定数であり、「da1s>da2s かつ da1d<da2d」を満たす。例えば、(da1s,da2s,da1d,da2d)=(1,0,0,1)や(2,1,1,2)等が考えられる。なお、(da1s,da2s,da1d,da2d)=(1,0,0,1)が成り立つ場合、異色間類似度と同色間類似度との一方を用いて類似性の強弱が判定されることになる。
【0066】
以上説明したようにして重み係数を設定すると、補間処理部17は、縦方向と横方向とに対する同色間類似度を算出すると共に、同色間類似度と異色間類似度とを方向別に加重加算する(図7S5)。
例えば、補間処理部17は、以下のようにして、同色間類似度と異色間類似度との加重加算を行う。
【0067】
Cv0[i,j]=(|G[i,j-1]-G[i,j+1]|・da1+CvN[i,j]・da2)/(da1+da2) ・・・式41
Ch0[i,j]=(|G[i-1,j]-G[i+1,j]|・da1+ChN[i,j]・da2)/(da1+da2) ・・・式42
なお、式41、式42では、縦方向の同色間類似度として、
|G[i,j-1]-G[i,j+1]|
が算出され、横方向の同色間類似度として、
|G[i-1,j]-G[i+1,j]|
が算出されることを意味する。
【0068】
ところで、第2の実施形態において、Cv0[i,j]、Ch0[i,j]を直接、類似度として用いても良いが、類似度の精度を高めるため、異色間類似度と同色間類似度とを算出して加重加算する処理は、補間対象画素だけでなく周辺画素でも行う。
補間処理部17は、補間対象画素と周辺画素とにおける各々の類似度成分の方向別の加重加算によって得られた値(Cv0[i,j],Cv0[i-1,j-1],Cv0[i+1,j-1],Cv0[i-1,j+1],Cv0[i+1,j+1]など)を、以下のように加重加算(以下、「周辺加算」と称する。)して、補間対象画素における縦方向の類似度Cv[i,j]と横方向の類似度Ch[i,j]とを算出する(図7S6)。
【0069】
縦方向の類似度:
Cv[i,j]=(4・Cv0[i,j]+Cv0[i-1,j-1]
+Cv0[i+1,j-1]+Cv0[i-1,j+1]+Cv0[i+1,j+1])/8 ・・・式43
横方向の類似度:
Ch[i,j]=(4・Ch0[i,j]+Ch0[i-1,j-1]
+Ch0[i+1,j-1]+Ch0[i-1,j+1]+Ch0[i+1,j+1])/8 ・・・式44
次に、補間処理部17は、縦方向の類似度と横方向の類似度とを用いて類似性の強弱を判定し、類似性の強弱の判定結果に応じて、補間量を算出する(図7S7)。
【0070】
例えば、補間処理部17は、閾値Th1について、
Ch[i,j]-Cv[i,j]>Th1 ・・・条件7
が成り立つ場合、縦方向の類似性が強いと判断し、条件7が成り立たず、
Cv[i,j]-Ch[i,j]>Th1 ・・・条件8
が成り立つ場合、横方向の類似性が強いと判断し、条件7および条件8が成り立たない場合、縦横両方向に類似性が強い(または、弱い)と判断する。ただし、閾値Th1は、階調数が256のとき5程度の値をとるものとする。
【0071】
そして、補間処理部17は、以下のようにして緑の補間量G[i,j]を算出する。
縦方向の類似性が強い場合:G[i,j]=Gv[i,j] ・・・式45
横方向の類似性が強い場合:G[i,j]=Gh[i,j] ・・・式46
縦横両方向に類似性が強い(または、弱い)場合:
G[i,j]=(Gv[i,j]+Gh[i,j])/2 ・・・式47
ただし、Gv[i,j],Gh[i,j]は、第1の実施形態(式35〜式38)と同様に算出される値である。
【0072】
ところで、類似性の強弱を判定する際、第2の実施形態では、縦方向の類似度Cv[i,j]および横方向の類似度Ch[i,j]を用いるので、補間量を算出すべき画素毎に、縦方向と横方向とに対して1種類ずつの類似度を記録しておけば良いのに対し、第1の実施形態では、「縦方向の異色間類似度CvN[i,j]および横方向の異色間類似度ChN[i,j]」または「縦方向の同色間類似度Cv[i,j]および横方向の同色間類似度Ch[i,j]」を用いるので、補間量を算出すべき画素毎に、縦方向と横方向とに対して2種類ずつの類似度を記録しておく必要がある。
【0073】
すなわち、第2の実施形態では、類似性の強弱の判定に要する記憶領域を第1の実施形態に比べて小さく抑えることができると共に、第1の実施形態と同様に補間量を精度良く算出することができる。
以下、RB補間処理の動作を説明するが、ここでは、従来から行われているRB補間処理を説明する(B補間処理の説明は省略する)。
【0074】
まず、従来から行われているRB補間処理としては、色差空間における線形補間処理が知られており、全ての画素の色差(赤色成分(または、青色成分)の色情報から緑色成分の色情報を減算した値)を算出した後に、補間対象画素毎に、以下の(1)〜(3)の何れかの処理を行って、補間量が算出される。
(1)補間対象画素に欠落する色成分が、補間対象画素の上下方向に隣接する2つの画素に存在する場合、それらの2つの画素の色差の平均値に補間対象画素の緑色成分の色情報を加算した値を補間量とする。
【0075】
(2)補間対象画素に欠落する色成分が、補間対象画素の左右方向に隣接する2つの画素に存在する場合、それらの2つの画素の色差の平均値に補間対象画素の緑色成分の色情報を加算した値を補間量とする。
(3)補間対象画素に欠落する色成分が、補間対象画素の斜め方向に隣接する4つの画素に存在する場合、それらの4つの画素の色差の平均値に補間対象画素の緑色成分の色情報を加算した値を補間量とする。
【0076】
《第3の実施形態》
以下、第3の実施形態の動作を説明する。
図8は、第3の実施形態の機能ブロック図である。
なお、第3の実施形態は、請求項に記載の補間処理プログラムを記録した記録媒体を用いて、パーソナルコンピュータによって補間処理を実行することに相当する。
【0077】
図8において、機能が図1に示す機能ブロック図と同じものについては、同じ符号を付与して示し、構成の説明については省略する。
なお、図8に示す電子カメラ20と図1に示した電子カメラ10との構成の相違点は、図8の制御部21と画像処理部22とが図1の制御部11と画像処理部15とに代えて設けられ、図8のインタフェース部23が新たに設けられた点である。
【0078】
また、図8において、パーソナルコンピュータ30は、CPU31、インタフェース部32、ハードディスク33およびメモリ34を有し、CPU31は、バスを介してインタフェース部32、ハードディスク33およびメモリ34に接続される。
なお、パーソナルコンピュータ30には、CD−ROMなどの記録媒体に記録された補間処理プログラム(前述した各実施形態の補間処理部17と同様にして補間処理を実行する補間処理プログラム)が予めインストールされているものとする。すなわち、ハードディスク33には、このような補間処理プログラムが実行可能な状態で格納されている。
【0079】
以下、図8を参照して第3の実施形態の動作を説明する。
まず、電子カメラ20では、図1に示した電子カメラ10と同様にして生成された画像データが画像処理部22に供給される。画像処理部22は、画像データに補間処理以外の画像処理(例えば、階調変換処理など)を施し、記録部16では、画像処理が施された画像データが画像ファイルの形式で記録される。
【0080】
このような画像ファイルは、インタフェース部23を介してパーソナルコンピュータ30に供給される。
パーソナルコンピュータ30内のCPU31は、インタフェース部32を介して画像ファイルを取得すると、前述した補間処理プログラムを実行する。補間処理により各色成分の解像度が高められた画像データは、必要に応じて画像圧縮等を行ってから、ハードディスク33などに記録され、最終的に、ディスプレイ、プリンタなどの各接続機器に応じた表色系データとして出力される。
【0081】
すなわち、第3の実施形態では、前述した各実施形態と同様の補間処理をパーソナルコンピュータ30によって行うことができる。
【0082】
【発明の効果】
上述したように、請求項1、請求項、請求項および請求項10に記載の発明は、方向性を考慮した色彩に関する情報を用いることによって、補間処理対象の画素が属する局所的な領域における画像の色に関する特徴を抽出するので、異色間類似度と同色間類似度との使い分けや、異色間類似度と同色間類似度との加重比率の設定に際し、従来よりも適切な指標に基づいて画像の特徴抽出が行える。そのため、類似性の強弱の判定に適した類似度を算出することができ、補間量の精度が高められる。
【0084】
請求項に記載の発明は、色彩に関する情報を用いることによって、異色間類似度と同色間類似度との使い分けや、異色間類似度と同色間類似度との加重比率を設定できると共に、従来よりも多くの色成分を用いて異色間類似度および同色間類似度の算出することができる。そのため、類似性の強弱の判定に適した類似度を高い精度で算出することができ、補間量の精度が高められる。
【0085】
請求項および請求項に記載の発明は、補間処理対象の画素が属する局所的な領域における画像の特徴を抽出する際、色彩に関する情報として異色間類似度を用いるので、類似性の強弱の判定のために異色間類似度を算出してしまえば、色彩に関する情報を改めて求める必要がない。すなわち、補間処理全体を効率良く行うことができる。
【0086】
請求項に記載の発明では、異色間類似度を同色間類似度よりも短い距離間隔で存在する色情報を用いて算出するので、異色間類似度に空間周波数が高い画像の類似性が反映される。すなわち、異色間類似度を用いて類似性の強弱を判定する際や、色彩に関する情報として異色間類似度を用いて補間処理対象の画素が属する局所的な領域における画像の特徴を抽出する際に、高周波部分の解像能力が効果的に引き出すことができる。そのため、類似性の強弱の判定精度を上げることができ、補間量の精度が高められる。
【0087】
請求項に記載の発明では、補間処理対象の画素と周辺部分との間で、類似性が強い方向の連続性を考慮しつつ、補間処理対象の画素の類似度を算出することができ、請求項に記載の発明では、ノイズなどによって発生する類似性の誤判定を低減することができる。すなわち、請求項および請求項に記載の発明では、類似性の強弱の判定精度を上げることができるので、補間量の精度が高められる。
【図面の簡単な説明】
【図1】第1の実施形態および第2の実施形態に対応する電子カメラの機能ブロック図である。
【図2】第1の実施形態および第2の実施形態における画像データの色成分の配列を示す図である。
【図3】第1の実施形態における補間処理部の動作フローチャートである。
【図4】類似度成分の加重加算を説明する図である。
【図5】類似性の強弱を判定する処理の詳細を示すフローチャートであり。
【図6】類似度と類似性の強弱の関係を示す図である。
【図7】第2の実施形態における補間処理部17の動作フローチャートである。
【図8】第3の実施形態の機能ブロック図である。
【符号の説明】
10、20 電子カメラ
11、21 制御部
12 撮影光学系
13 撮像部
14 A/D変換部
15、22 画像処理部
16 記録部
17 補間処理部
23、32 インタフェース部
30 パーソナルコンピュータ
31 CPU
33 ハードディスク
34 メモリ
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an interpolation processing device that performs interpolation processing for compensating for an amount of interpolation corresponding to a color component for pixels lacking a predetermined color component, and an interpolation processing program that causes a computer to execute the interpolation processing. The present invention relates to a recorded recording medium.
[0002]
[Prior art]
Some electronic cameras generate color image data using an imaging device in which color filters of three colors (RGB: red, green, and blue) are arranged at predetermined positions (for example, a Bayer array). In such an electronic camera, since only color information of one color component is output from each pixel of the image sensor, it is necessary to perform interpolation processing in order to obtain color information of all color components in units of pixels.
[0003]
As a method of such interpolation processing, the spatial similarity of the interpolation target pixel to be interpolated is determined, and the amount of interpolation is determined using color information output from pixels located in the direction of strong similarity. A calculation method has been conventionally considered. In such an interpolation process, the similarity (usually referred to as “similar similarity”) is usually calculated using color information of the same color arranged every other pixel, and similarities are calculated based on the similarity. Sexual strength is determined.
[0004]
However, in the determination of the strength of such similarity, for an image (an image having a high spatial frequency) that changes more finely than an interval (corresponding to twice a pixel pitch) where the color information of the same color is arranged. Therefore, it is impossible to accurately determine the direction in which the similarity is strong. Therefore, in order to determine a direction having a strong similarity to an image having a high spatial frequency, the similarity (hereinafter referred to as “similarity between different colors”) using color information of different colors arranged at one pixel pitch is used. Japanese Patent Application No. 11-145473 and the like have come to adopt a technique for determining the strength of similarity based on the degree of similarity.
[0005]
However, the similarity between different colors is calculated by ignoring the difference in color, so that it is very difficult to handle, and depending on how it is handled, there is a risk of misjudging the strength of similarity.
Therefore, the applicant of the present application, in Japanese Patent Application No. 11-145473, determines the strength of similarity using the similarity obtained by weighted addition of the similarity between different colors and the similarity between the same colors, An invention has been filed in which one of the degree of similarity and the degree of similarity between the same colors is selected according to the characteristics of the image to determine the degree of similarity.
[0006]
[Problems to be solved by the invention]
However, most of the “interpolation processing apparatus for determining the strength of similarity using the similarity obtained by weighted addition of the similarity between different colors and the similarity between the same colors” described in Japanese Patent Application No. 11-145473 is mostly used. Although it is possible to correctly determine the strength of similarity with respect to an image of a certain color, there is a case in which an adverse effect due to the similarity between different colors cannot be avoided and an erroneous determination may occur for an image having a certain special structure.
[0007]
  In addition, in the “interpolation processing device that selects either one of different-color similarities or similar-color similarities according to image characteristics and determines the strength of similarity” described in Japanese Patent Application No. 11-145473, There was a high possibility that image features could not be extracted properly and a similarity suitable for determining the strength of similarity could not be used.
  Therefore, claims 1 to8. Claim 10It is an object of the present invention to provide an interpolation processing apparatus that can calculate an interpolation amount with high accuracy by calculating a degree of similarity suitable for determining the strength of similarity.
[0008]
  Claims9An object of the present invention is to provide a recording medium on which an interpolation processing program capable of calculating an interpolation amount with high accuracy is calculated by calculating a similarity suitable for determination of similarity strength. .
[0009]
[Means for Solving the Problems]
  The interpolation processing device according to claim 1 has a plurality of pixels arranged two-dimensionally, and the plurality of pixels are different first to first.n (n ≧ 2)An image pickup element that outputs color information of a color component and each pixel outputs color information of one color component.Of childIn an interpolation processing apparatus that interpolates color information of a first color component into a pixel in which the first color component is missing,
  Based on color information of a plurality of pixels selected from the pixel to be interpolated and a plurality of pixels in the vicinity thereof, each similarity degree in at least two directions in the pixel to be interpolated is expressed as “Using color information of different color components“Similarity between different colors including similarity between different colors” and “Only color information of the same color component was used"Similarity between same colors including similarity components between same colors"Against eachAnd the image in the local region to which the interpolation target pixel belongsInformation on color is extracted considering the direction in the image, and information on the color is extractedDepending on the similarity, the similarity calculation means for switching by switching to either one of the similarities, or by switching the weighting ratio for weighted addition of each similarity, and the similarity of each direction based on the similarity Similarity determination means for determining strength and interpolation amount calculation means for calculating an interpolation amount of a pixel to be interpolated in accordance with a determination result by the similarity determination means.
[0010]
  An interpolation processing apparatus according to claim 2 is provided.2. The interpolation processing device according to claim 1, wherein the plurality of pixels that output color information of the first to nth (n ≧ 2) color components different from each other output color information of the first to third color components different from each other. When the first color component has a higher spatial frequency than the second color component and the third color component, the similarity calculation means includes:
(1) a different color similarity component composed of color information of the first color component and color information of the second color component;
(2) a different color similarity component composed of color information of the first color component and color information of the third color component;
The similarity including at least one of
(1) The same-color similarity component consisting only of color information of the first color component;
(2) the same-color similarity component consisting only of color information of the second color component;
(3) the same-color similarity component consisting only of color information of the third color component;
Similarity including at least one of the same color similarityIt is characterized by that.
[0011]
  The interpolation processing device according to claim 3 is the interpolation processing device according to claim 1 or 2, wherein the similarity calculation unit includes:Based on the information on the color, it is determined whether the image in the local region is an achromatic portion or a chromatic portion. If the image in the local region is an achromatic portion, an interpolation process is performed. The similarity between the different colors is selected as the similarity with respect to a plurality of directions of the target pixel, or the weight ratio of the similarity between the different colors when the similarity between the different colors and the similarity between the same colors are weighted and added. The similarity between the same colors is larger than the weighted ratio of the same color, and when the image in the local region is a chromatic part, the similarity between the same colors is selected as the similarity for a plurality of directions of the interpolation target pixel. Alternatively, the weight ratio of the similarity between the same colors when weighted addition of the similarity between the different colors and the similarity between the same colors is made larger than the weight ratio of the similarity between the different colorsIt is characterized by that.
  The interpolation processing device according to claim 4 is:4. The interpolation processing apparatus according to claim 1, wherein the similarity calculation unit uses the similarity between different colors as information about the color.It is characterized by that.
[0012]
  The interpolation processing device according to claim 5 is the interpolation processing device according to claim 4,The similarity calculation means determines that the image in the local region is an achromatic part when the similarity between different colors shows strong similarity in at least one direction, and in other cases, the local color That an image in a specific area is a chromatic partIt is characterized by that.
[0013]
  The interpolation processing device according to claim 6 is the1In the interpolation processing device according to any one of claims 5 to 5, the similarity calculation unit includes:The similarity between different colors is calculated using color information existing at a distance interval shorter than the similarity between the same colors.It is characterized by that.
[0014]
  The interpolation processing device according to claim 7 is the claim1 toThe interpolation processing apparatus according to claim 6, wherein the similarity calculation unit includes:Similarities in multiple directions calculated for not only the pixels to be interpolated but also the surrounding pixels of the pixels to be interpolated, as the degrees of similarity of the pixels to be interpolatedIt is characterized by using.
  The interpolation processing device according to claim 8 is the claimAny one of claims 1 to 7In the interpolation processing device described in the above, the similarity determination unit includes:When the difference in similarity between directions is smaller than a predetermined threshold, it is determined that the similarity in each direction is the same.It is characterized by that.
[0015]
  Claim 9The recording medium on which the interpolation processing program is recorded has a plurality of pixels arranged two-dimensionally, and the plurality of pixels output color information of different first to nth (n ≧ 2) color components, A pixel is a recording medium that records an interpolation processing program for interpolating color information of a first color component into a pixel that lacks the first color component of an image sensor that outputs color information of one color component. Based on the color information of a plurality of pixels selected from the pixel to be interpolated and a plurality of pixels in the vicinity thereof, each of the similarities in at least two directions is “similarity between different colors using color information of different color components”. The inter-color similarity including components "and the" similar similarity including the same-color similarity components using only the color information of the same color component "are calculated for each of the two types. Image in the local region to which it belongs Information related to color is extracted in consideration of the direction in the image, and it is calculated by switching to one of the similarities according to the information related to the color, or by switching the weighting ratio when each similarity is weighted. The degree of similarity of each direction based on the similarity calculation procedure, the similarity determination procedure for determining the strength of similarity in each direction based on the similarity, and the determination result by the similarity determination procedure An interpolation processing program characterized by causing a computer to execute an interpolation amount calculation procedure to be calculated is recordedIt is characterized by that.
  The interpolation processing device according to claim 10 is the claim.1In the described interpolation processing apparatus,The information on the color is information obtained by using color information of different color components in at least two directions in the interpolation target pixel.It is characterized by that.
[0019]
  Here, the invention (<< 1 >> to << 8 >>) related to the above invention is disclosed..
[0020]
1>>: Claim9A plurality of pixels that output color information of the first to nth (n ≧ 2) color components different from each other, the color information of the first to third color components different from each other. When the first color component has a higher spatial frequency than the second color component and the third color component,
  The similarity calculation means includes:
(1) a different color similarity component composed of color information of the first color component and color information of the second color component;
(2) a different color similarity component composed of color information of the first color component and color information of the third color component;
The similarity including at least one of
(1) The same-color similarity component consisting only of color information of the first color component;
(2) the same-color similarity component consisting only of color information of the second color component;
(3) the same-color similarity component consisting only of color information of the third color component;
Similarity including at least one of the same color similarity
  The recording medium which recorded the interpolation processing program characterized by the above-mentioned.
[0021]
2>>: << 1 >>OrClaim9In the recording medium recording the interpolation processing program described in 1.
  The similarity calculation means includes:
  Based on the information on the color, it is determined whether the image in the local region is an achromatic portion or a chromatic portion. If the image in the local region is an achromatic portion, an interpolation process is performed. The similarity between the different colors is selected as the similarity with respect to a plurality of directions of the target pixel, or the weight ratio of the similarity between the different colors when the similarity between the different colors and the similarity between the same colors are weighted and added. The similarity between the same colors is larger than the weighted ratio of the same color, and when the image in the local region is a chromatic part, the similarity between the same colors is selected as the similarity for a plurality of directions of the interpolation target pixel. Alternatively, the weight ratio of the similarity between the same colors when weighted addition of the similarity between the different colors and the similarity between the same colors is made larger than the weight ratio of the similarity between the different colors
  The recording medium which recorded the interpolation processing program characterized by the above-mentioned.
[0022]
3>>: << 1 >>, Claim9, <<2>> In a recording medium recording the interpolation processing program according to any one of
  The similarity calculation procedure includes:
  The similarity between the different colors is used as information on the color
  The recording medium which recorded the interpolation processing program characterized by the above-mentioned.
[0023]
4>>:3In the recording medium on which the interpolation processing program described in the above item is recorded, the similarity calculation procedure is such that when the similarity between different colors shows a strong similarity in at least one direction, there is no image in the local region. In other cases, it is determined that the image is a color portion, and in other cases, an image at a plurality of pixels selected from the pixel to be interpolated and a plurality of pixels in the vicinity thereof is determined to be a color portion.
  The recording medium which recorded the interpolation processing program characterized by the above-mentioned.
[0024]
5>>: Claim9, << 1 >> or <<4>> In a recording medium recording the interpolation processing program according to any one of
  The similarity calculation procedure includes:
  The similarity between different colors is calculated using color information existing at a distance interval shorter than the similarity between the same colors.
  The recording medium which recorded the interpolation processing program characterized by the above-mentioned.
[0025]
6>>: Claim9, << 1 >> or <<5>> In a recording medium recording the interpolation processing program according to any one of
  The similarity calculation procedure includes:
  As the similarity to a plurality of directions of a pixel to be interpolated, the similarity to a plurality of directions calculated not only for the pixel to be interpolated but also for pixels around the pixel to be interpolated is used.
  The recording medium which recorded the interpolation processing program characterized by the above-mentioned.
[0026]
7>>: Claim9, << 1 >> or <<6>> In a recording medium recording the interpolation processing program according to any one of
  The similarity determination procedure includes:
  When the difference in similarity between directions is smaller than a predetermined threshold, it is determined that the similarity in each direction is the same.
  The recording medium which recorded the interpolation processing program characterized by the above-mentioned.
[0027]
Note that the above-described similarity between different colors is configured by an element of similarity calculated by an absolute value of a difference in color information of a plurality of different color pixels, a power of the difference, or the like, and is configured by one or more elements of similarity. It is calculated using the similarity component. Similarly, the similarity between the same colors is configured by an element of similarity calculated by an absolute value of a difference in color information of a plurality of pixels of the same color, a power thereof, or the like, and is configured by one or more elements of similarity. Calculated using the similarity component.
[0028]
DETAILED DESCRIPTION OF THE INVENTION
  Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.
  FIG. 1 is a functional block diagram of an electronic camera corresponding to the first embodiment and the second embodiment.
  An electronic camera corresponding to the first embodiment is claimed in claims 1 to 5.8 and claim 10The electronic camera corresponding to the second embodiment is equivalent to an electronic camera having a function of interpolation processing performed by the interpolation processing device described in claim 2.1Or claims8 and claim 10It corresponds to an electronic camera provided with a function of interpolation processing performed by the interpolation processing device described in 1).
[0029]
In FIG. 1, the electronic camera 10 includes a control unit 11, a photographing optical system 12, an imaging unit 13, an A / D conversion unit 14, an image processing unit 15, and a recording unit 16. Further, the image processing unit 15 includes an interpolation processing unit (for example, a one-chip microprocessor dedicated to interpolation processing) 17. Further, the imaging unit 13 includes an imaging element (not shown) in which RGB color filters are arranged in a Bayer array.
[0030]
In FIG. 1, only the interpolation processing unit 17 is shown in the image processing unit 15 for the sake of simplicity, but other image processing such as gradation conversion processing is included in the image processing unit 15. A functional block for performing the above may be provided.
[0031]
In FIG. 1, the control unit 11 is connected to an imaging unit 13, an A / D conversion unit 14, an image processing unit 15, and a recording unit 16. In addition, the optical image acquired by the photographic optical system 12 is formed on the image sensor in the imaging unit 13. The output of the imaging unit 13 is quantized by the A / D conversion unit 14 and supplied to the image processing unit 15 as image data. The image data supplied to the image processing unit 15 is subjected to interpolation processing by the interpolation processing unit 17 and is subjected to image compression such as JPEG compression as necessary, and then recorded via the recording unit 16. The image data in which the resolution of each color component is increased by the interpolation process is finally output as color system data corresponding to each connected device such as a display and a printer.
[0032]
FIG. 2 is a diagram illustrating an arrangement of color components of image data in the first embodiment and the second embodiment.
In FIG. 2, R, G, and B are used to indicate the type of color component, and i and j are used to indicate the position of the pixel where each color component exists, and FIG. FIG. 2 (2) shows an array in the case where an existing pixel is an interpolation target pixel, and FIG. 2 (2) shows an array in a case where a pixel having a blue component is an interpolation target pixel.
[0033]
In the following, a green interpolation amount is obtained as an interpolation process, and a pixel located at coordinates [i, j] is set as an interpolation target pixel. Further, in the interpolation processing shown below, since the green interpolation amount can be calculated regardless of the color component type (red or blue) of the interpolation target pixel, R and B in FIG. The color information of the interpolation target pixel is expressed by Z [i, j], and the color information of other pixels is expressed in the same manner.
[0034]
<< First Embodiment >>
FIG. 3 is an operation flowchart of the interpolation processing unit 17 in the first embodiment. The operation of the first embodiment will be described below. Here, the operation of the interpolation processing unit 17 will be described with reference to FIG.
First, the interpolation processing unit 17 calculates the different color similarity component in the vertical direction and the horizontal direction and the same color similarity component in the vertical direction and the horizontal direction (S1 in FIG. 3).
[0035]
In the first embodiment, as different-color similarity components in the vertical direction and the horizontal direction, a plurality of types of similarity components defined by the following Expressions 10 to 13 are calculated, and the vertical direction and the horizontal direction are calculated. A plurality of types of similarity components defined by the following formulas 14 to 19 are calculated as the same-color similarity components for.
(A) Different color similarity component
Vertical GR (GB) similarity component:
Cv1 [i, j] = (| G [i, j-1] -Z [i, j] | + | G [i, j + 1] -Z [i, j] |) / 2 Ten
Horizontal GR (GB) similarity component:
Ch1 [i, j] = (| G [i-1, j] -Z [i, j] | + | G [i + 1, j] -Z [i, j] |) / 2 11
Vertical BG (RG) similarity component:
Cv2 [i, j] = (| Z [i-1, j-1] -G [i-1, j] | + | Z [i-1, j + 1] -G [i-1, j] |
+ | Z [i + 1, j-1] -G [i + 1, j] | + | Z [i + 1, j + 1] -G [i + 1, j] |) / 4 Formula 12
Horizontal BG (RG) similarity component:
Ch2 [i, j] = (| Z [i-1, j-1 | -G [i, j-1] | + | Z [i-1, j + 1] -G [i, j + 1] |
+ | Z [i + 1, j-1] -G [i, j-1] | + | Z [i + 1, j + 1] -G [i, j + 1] |) / 4 Equation 13
(B) Same color similarity component
Vertical GG similarity component:
Cv3 [i, j] = | G [i, j-1] -G [i, j + 1] |
Horizontal GG similarity component:
Ch3 [i, j] = | G [i-1, j] -G [i + 1, j] |
Vertical BB (RR) similarity component:
Cv4 [i, j] = (| Z [i-1, j-1] -Z [i-1, j + 1] | + | Z [i + 1, j-1] -Z [i + 1, j + 1] |) / 2 ・ ・ ・ Equation 16
Horizontal BB (RR) similarity component:
Ch4 [i, j] = (| Z [i-1, j-1] -Z [i + 1, j-1] | + | Z [i-1, j + 1] -Z [i + 1, j + 1] |) / 2 ・ ・ ・ Equation 17
Vertical RR (BB) similarity component:
Cv5 [i, j] = (| Z [i, j-2] -Z [i, j] | + | Z [i, j + 2] -Z [i, j] |) / 2 18
Horizontal RR (BB) similarity component:
Ch5 [i, j] = (| Z [i-2, j] -Z [i, j] | + | Z [i + 2, j] -Z [i, j] |) / 2 19
In addition, although the element of the similarity which comprises each similarity component mentioned above is calculated using the absolute value of a difference, you may calculate by the square of an absolute value, a power, etc.
[0036]
Next, the interpolation processing unit 17 calculates the similarity between different colors by weighting and adding different types of similarity components between different colors as shown in the following Expression 20 and Expression 21, and the following Expression 22 As shown in Equation 23, the similarity between the same colors is calculated by weighted addition of the plurality of types of similarity components between the same colors for each direction (S2 in FIG. 3).
CvN0 [i, j] = α · Cv1 [i, j] + β · Cv2 [i, j] Equation 20
ChN0 [i, j] = α · Ch1 [i, j] + β · Ch2 [i, j] Equation 21
However, α and β are 0 or a positive constant and satisfy α + β = 1.
[0037]
Cv0 [i, j] = γ · Cv3 [i, j] + δ · Cv4 [i, j] + ε · Cv5 [i, j] Equation 22
Ch0 [i, j] = γ · Ch3 [i, j] + δ · Ch4 [i, j] + ε · Ch5 [i, j] Equation 23
However, γ, δ, ε is 0 or a positive constant and satisfies γ + δ + ε = 1.
In Equations 20 and 21, if α = 1 and β = 0, the similarity between different colors is composed of “color information of the same color as the interpolation target pixel” and color component color information. When α = 0 and β = 1, the similarity between different colors is composed of “color information of the color component different from the interpolation target pixel among the red component and the blue component” and the color information of the green component. become. Also, in Equations 22 and 23, when γ = 0, the similarity between same colors is “similarity component consisting only of color information of red component” and “intersimilarity component consisting only of color information of blue component”. Of at least one of them.
[0038]
Next, the interpolation processing unit 17 obtains values (CvN0 [i, j], CvN0 [i-1, j-1], CvN0) obtained by weighted addition of respective similarity components in the interpolation target pixel and the peripheral pixels. [i-1, j + 1], CvN0 [i + 1, j-1], CvN0 [i + 1, j + 1] etc.) in the direction of << Method 1 >> or << Method 2 >> Separately, weighted addition (hereinafter referred to as “peripheral addition”) is performed to calculate the similarity between different colors in the vertical direction and the horizontal direction and the similarity between the same colors in the vertical direction and the horizontal direction in the final interpolation target pixel. (S3 in FIG. 3).
[0039]
However, in << Method 1 >> or << Method 2 >>, CvN [i, j] indicates the similarity between the different colors in the vertical direction, ChN [i, j] indicates the similarity between the different colors in the horizontal direction, and Cv [i , j] indicates the similarity between the same colors in the vertical direction, and Ch [i, j] indicates the similarity between the same colors in the horizontal direction.
<< Method 1 >>
CvN [i, j] = (4 ・ CvN0 [i, j] + CvN0 [i-1, j-1] + CvN0 [i-1, j + 1]
+ CvN0 [i + 1, j-1] + CvN0 [i + 1, j + 1]) / 8 ・ ・ ・ Equation 24
ChN [i, j] = (4 ・ ChN0 [i, j] + ChN0 [i-1, j-1] + ChN0 [i-1, j + 1]
+ ChN0 [i + 1, j-1] + ChN0 [i + 1, j + 1]) / 8 ・ ・ ・ Equation 25
Cv [i, j] = (4 ・ Cv0 [i, j] + Cv0 [i-1, j-1] + Cv0 [i-1, j + 1]
+ Cv0 [i + 1, j-1] + Cv0 [i + 1, j + 1]) / 8 ・ ・ ・ Equation 26
Ch [i, j] = (4 ・ Ch0 [i, j] + Ch0 [i-1, j-1] + Ch0 [i-1, j + 1]
+ Ch0 [i + 1, j-1] + Ch0 [i + 1, j + 1]) / 8 ・ ・ ・ Equation 27
<< Method 2 >>
CvN [i, j] = (4 ・ CvN0 [i, j]
+2 (CvN0 [i-1, j-1] + CvN0 [i + 1, j-1] + CvN0 [i-1, j + 1] + CvN0 [i + 1, j + 1])
+ CvN0 [i, j-2] + CvN0 [i, j + 2] + CvN0 [i-2, j] + CvN0 [i + 2, j]) / 16 Equation 28
ChN [i, j] = (4 ・ ChN0 [i, j]
+2 (ChN0 [i-1, j-1] + ChN0 [i + 1, j-1] + ChN0 [i-1, j + 1] + ChN0 [i + 1, j + 1])
+ ChN0 [i, j-2] + ChN0 [i, j + 2] + ChN0 [i-2, j] + ChN0 [i + 2, j]) / 16 Equation 29
Cv [i, j] = (4 ・ Cv0 [i, j]
+2 (Cv0 [i-1, j-1] + Cv0 [i + 1, j-1] + Cv0 [i-1, j + 1] + Cv0 [i + 1, j + 1])
+ Cv0 [i, j-2] + Cv0 [i, j + 2] + Cv0 [i-2, j] + Cv0 [i + 2, j]) / 16 Equation 30
Ch [i, j] = (4 ・ Ch0 [i, j]
+2 (Ch0 [i-1, j-1] + Ch0 [i + 1, j-1] + Ch0 [i-1, j + 1] + Ch0 [i + 1, j + 1])
+ Ch0 [i, j-2] + Ch0 [i, j + 2] + Ch0 [i-2, j] + Ch0 [i + 2, j]) / 16 Equation 31
Note that << Method 1 >> corresponds to performing weighted addition of similarity components between the interpolation target pixel and surrounding pixels as shown in FIG. 4 (1), and << Method 2 >> corresponds to FIG. 4 (2). This is equivalent to performing weighted addition of similarity components between the interpolation target pixel and the surrounding pixels as shown in FIG.
[0040]
In this way, in the first embodiment, by calculating the similarity between different colors and the similarity between the same colors in the interpolation target pixel in the peripheral addition, in the determination of the strength of similarity described later, the interpolation target pixel and the peripheral color are calculated. The accuracy is improved in consideration of continuity with pixels.
However, to simplify the calculation,
CvN [i, j] = CvN0 [i, j]
ChN [i, j] = ChN0 [i, j]
Cv [i, j] = Cv0 [i, j]
Ch [i, j] = Ch0 [i, j]
And
[0041]
By the way, the above-mentioned different-color similarity component is calculated by comparing the color information of pixels adjacent in the vertical direction or the horizontal direction, so the different-color similarity composed of such different-color similarity components is the same color. It is possible to determine the strength of similarity at a distance interval shorter than the degree of similarity. That is, the similarity between different colors reflects a finer image structure than the similarity between the same colors.
[0042]
In particular, since the similarity between different colors is calculated on the assumption that all the color information of different color components represents the same luminance information, the determination of the strength of similarity using the similarity between different colors is achromatic. In part, the reliability is high. On the other hand, the determination of the strength of similarity using the similarity between the same colors is generally reliable for both the chromatic and achromatic parts, but when the similarity between the different colors is used in the detailed part of the image Compared to reliability.
[0043]
Therefore, in order to perform highly reliable similarity determination for the entire image to be interpolated, the entire image is divided into an achromatic portion and a chromatic portion, and a similarity suitable for each portion is used. The method is excellent.
When the interpolation processing unit 17 calculates the similarity between different colors in the vertical direction and the horizontal direction and the similarity between the same colors in the vertical direction and the horizontal direction, whether or not the image in the vicinity of the interpolation target pixel is an achromatic color part. Is determined (S4 in FIG. 3).
[0044]
If the interpolation processing unit 17 determines that the image in the vicinity of the interpolation target pixel is an achromatic color part by such determination, the interpolation processing unit 17 determines the strength of the similarity in the interpolation target pixel using the similarity between different colors. (FIG. 3S5) When it is determined that the image in the vicinity of the interpolation target pixel is a chromatic part, the similarity between the interpolation target pixels is determined using the similarity between the same colors (S6 in FIG. 3).
[0045]
By the way, in order to determine whether or not an image in the vicinity of the interpolation target pixel is an achromatic portion, a color index indicating the presence or absence of a local color is required. As such a color index, a local color difference is used. Use information. Since the similarity between different colors calculated as described above reflects local color difference information as well as the strength of similarity, it is possible to directly use the similarity between different colors as a color index.
[0046]
However, the similarity between different colors indicates that the smaller the value is, the stronger the similarity is. Therefore, if the similarity between different colors in the vertical and horizontal directions is a large value, the achromatic part is similar in both vertical and horizontal directions. This means that the image is weak or the image in the vicinity of the interpolation target pixel is a chromatic part. On the other hand, if the similarity between different colors in at least one of the vertical direction and the horizontal direction is a relatively small value, the image in the vicinity of the interpolation target pixel is an achromatic portion, and there is a direction with strong similarity. Means that
[0047]
Here, the details of the process for determining the strength of similarity by switching between the similarity between different colors and the similarity between the same colors will be described.
FIG. 5 is a flowchart showing details of processing for determining the strength of similarity, and FIG. 6 is a diagram showing the relationship between the degree of similarity and the strength of similarity.
5S1 corresponds to FIG. 3S4, FIGS. 5S2 to S6 correspond to FIG. 3S5, and FIGS. 5S7 to S11 correspond to FIG. 3S6.
[0048]
First, the interpolation processing unit 17 determines the threshold values ThNv and ThNh.
CvN [i, j] ≦ ThNv or ChN [i, j] ≦ ThNh ・ ・ ・ Condition 1
Is determined (S1 in FIG. 5). However, the threshold values ThNv and ThNh assume values of about 10 or less when the number of gradations is 256.
When the condition 1 is satisfied, the interpolation processing unit 17 sets the threshold Th0 as follows:
| CvN [i, j] -ChN [i, j] | ≦ Th0 ・ ・ ・ Condition 2
It is determined whether or not holds (S2 in FIG. 5). The condition 2 is a condition for determining whether or not the vertical different-color similarity CvN [i, j] and the horizontal different-color similarity ChN [i, j] are approximately equal. , The threshold Th0 is similar to one another due to the influence of noise when the difference between the similarities CvN [i, j] in the vertical direction and the similarities ChN [i, j] in the horizontal direction is very small. It plays the role of avoiding being mistaken as strong. For this reason, the accuracy of similarity determination can be increased by setting the threshold Th0 high for a noisy color image.
[0049]
When the condition 1 and the condition 2 are satisfied (corresponding to the region 1 in FIG. 6), the interpolation processing unit 17 determines that the image in the vicinity of the interpolation target pixel is an achromatic color part and has strong similarity in both the vertical and horizontal directions, The index HV [i, j] indicating similarity is set to 0 (S3 in FIG. 5).
If the condition 1 is satisfied and the condition 2 is not satisfied, the interpolation processing unit 17
CvN [i, j] <ChN [i, j] ... Condition 3
Is determined (S4 in FIG. 5).
[0050]
When the conditions 1 and 3 are satisfied and the condition 2 is not satisfied (corresponding to the region 2 in FIG. 6), the interpolation processing unit 17 is an achromatic portion of the image near the interpolation target pixel, and is similar in the vertical direction. Is set to 1 and the index HV [i, j] is set to 1 (S5 in FIG. 5).
When the condition 1 is satisfied and the condition 2 and the condition 3 are not satisfied (corresponding to the region 3 in FIG. 6), the interpolation processing unit 17 is an achromatic portion of the image near the interpolation target pixel, and is similar in the horizontal direction. Is set to −1 in the index HV [i, j] (S6 in FIG. 5).
[0051]
When the condition 1 is not satisfied, the interpolation processing unit 17 sets the threshold Th1 as follows:
| Cv [i, j] -Ch [i, j] | ≦ Th1 ・ ・ ・ Condition 4
Is determined (S7 in FIG. 5). Condition 4 is a condition for determining whether or not the similarity Cv [i, j] between the same colors in the vertical direction and the similarity C [i, j] between the same colors in the horizontal direction are approximately the same. When the difference between the same-color similarity Cv [i, j] in the vertical direction and the same-color similarity Ch [i, j] in the horizontal direction is very small, the threshold Th1 It plays the role of avoiding being erroneously determined to be strong, and similarly to the threshold value Th0, by setting a high value for a noisy color image, the accuracy of similarity determination is increased.
[0052]
When the condition 1 is not satisfied and the condition 4 is satisfied (corresponding to the region 4 in FIG. 6), the interpolation processing unit 17 is an image near the interpolation target pixel, which is a chromatic part, and has high similarity in both vertical and horizontal directions (or The index HV [i, j] is set to 0 (S8 in FIG. 5).
When the condition 1 and the condition 4 are not satisfied, the interpolation processing unit 17
Cv [i, j] <Ch [i, j] ... Condition 5
Is determined (S9 in FIG. 5).
[0053]
When the condition 1 is not satisfied and the condition 5 is satisfied (corresponding to the region 5 in FIG. 6), the interpolation processing unit 17 determines that the image in the vicinity of the interpolation target pixel is a chromatic part and has high similarity in the vertical direction. Then, the index HV [i, j] is set to 1 (S10 in FIG. 5).
When the conditions 1 and 5 are not satisfied (corresponding to the region 6 in FIG. 6), the interpolation processing unit 17 determines that the image in the vicinity of the interpolation target pixel is a coloring portion and has a strong similarity in the horizontal direction. The index HV [i, j] is set to -1 (S11 in FIG. 5).
[0054]
When the similarity is determined as described above, the interpolation processing unit 17 calculates an interpolation amount according to the determination result of the similarity strength (S7 in FIG. 3).
For example, the interpolation processing unit 17 calculates the green interpolation amount G [i, j] as follows.
When HV [i, j] is 1, G [i, j] = Gv [i, j] Equation 32
When HV [i, j] is −1 G [i, j] = Gh [i, j] Equation 33
When HV [i, j] is 0 G [i, j] = (Gv [i, j] + Gh [i, j]) / 2 Equation 34
However, Gv [i, j] and Gh [i, j] are values calculated as in the following <Method 1> or <Method 2>.
[0055]
<< Method 1 >>
Gv [i, j] = (G [i, j-1] + G [i, j + 1]) / 2 Equation 35
Gh [i, j] = (G [i-1, j] + G [i + 1, j]) / 2 Equation 36
<< Method 2 >>
Gv [i, j] = (G [i, j-1] + G [i, j + 1]) / 2+ (2 ・ Z [i, j] -Z [i, j-2] -Z [ i, j + 2]) / 4 ・ ・ ・ Equation 37
Gh [i, j] = (G [i-1, j] + G [i + 1, j]) / 2+ (2 ・ Z [i, j] -Z [i-2, j] -Z [ i + 2, j]) / 4 ・ ・ ・ Equation 38
As described above, in the first embodiment, the entire image is divided into the achromatic portion and the chromatic portion using the similarity between different colors reflecting the local color difference information, and the similarity suitable for each portion is used. Since the degree of similarity can be determined based on the above, the amount of interpolation can be calculated with higher accuracy than in the conventional technique.
[0056]
In the first embodiment, when determining the strength of similarity, the similarity between different colors and the similarity between the same colors are switched. As the similarity used for determining the similarity, the similarity between different colors is used. In addition to completely switching between the same-color similarity, the achromatic part increases the similar-color similarity addition ratio, and the chromatic part increases the same-color similarity addition ratio. Similarity obtained by weighted addition of.
[0057]
In the first embodiment, the color difference included in the similarity between different colors is used as a method for checking the presence / absence of a local color, but other color indexes such as a color ratio may be used.
Hereinafter, the operation of the RB interpolation processing will be described. Here, the conventional RB interpolation processing will be described (the description of the B interpolation processing is omitted).
First, linear interpolation processing in a color difference space is known as RB interpolation processing that has been conventionally performed, and color information of a green component is obtained from color information (red component (or blue component)) of all pixels. After calculating (subtracted value), the interpolation amount is calculated by performing any one of the following processes (1) to (3) for each interpolation target pixel.
[0058]
(1) When a color component missing from an interpolation target pixel exists in two pixels adjacent in the vertical direction of the interpolation target pixel, the color information of the green component of the interpolation target pixel is obtained as an average value of color differences between the two pixels. The value obtained by adding is used as the interpolation amount.
(2) When the color component missing in the interpolation target pixel exists in two pixels adjacent in the left-right direction of the interpolation target pixel, the color information of the green component of the interpolation target pixel is calculated as the average value of the color difference between the two pixels. The value obtained by adding is used as the interpolation amount.
[0059]
(3) When a color component missing from the interpolation target pixel is present in four pixels adjacent in the diagonal direction of the interpolation target pixel, the color information of the green component of the interpolation target pixel is obtained as an average value of the color differences of these four pixels. The value obtained by adding is used as the interpolation amount.
<< Second Embodiment >>
FIG. 7 is an operation flowchart of the interpolation processing unit 17 in the second embodiment.
The operation of the second embodiment will be described below. Here, the operation of the interpolation processing unit 17 will be described with reference to FIG.
[0060]
First, the interpolation processing unit 17 calculates the similarity between different colors in the vertical direction and the horizontal direction defined by the following formulas 39 and 40 (S1 in FIG. 7).
Similarity between different colors in the vertical direction:
CvN [i, j] = (| G [i, j-1] -Z [i, j] | + | G [i, j + 1] -Z [i, j] |) / 2 39
Horizontal similarity between different colors:
ChN [i, j] = (| G [i-1, j] -Z [i, j] | + | G [i + 1, j] -Z [i, j] |) / 2 40
Next, the interpolation processing unit 17 determines whether or not the saturation of the image near the interpolation target pixel is high (S2 in FIG. 7).
[0061]
If the interpolation processing unit 17 determines that the saturation of the image in the vicinity of the interpolation target pixel is high due to such determination, the inter-similar similarity when weighted addition of the different-color similarity and the same-color similarity is performed. A value larger than the weight coefficient da2 of the similarity between different colors is set in the degree weight coefficient da1 (S3 in FIG. 7). On the other hand, if the interpolation processing unit 17 determines that the saturation of the image in the vicinity of the interpolation target pixel is low, the interpolation processing unit 17 sets a value larger than the weight coefficient da1 of the same-color similarity to the weight coefficient da2 of the similarity between different colors ( FIG. 7 S4).
[0062]
By the way, the determination as to whether or not the saturation of the image near the interpolation target pixel is high is the same as the “determination as to whether or not the image near the interpolation target pixel is an achromatic portion” in the first embodiment. This can be done by using the similarity between different colors.
In other words, if the similarity between different colors in the vertical and horizontal directions is a large value, the similarity in both the vertical and horizontal directions is high even if the saturation of the image in the vicinity of the interpolation target pixel is high or low. Means weak. On the other hand, if the similarity between different colors in at least one of the vertical direction and the horizontal direction is a relatively small value, the saturation of the image in the vicinity of the interpolation target pixel is low, and there is a direction with high similarity. Means that
[0063]
For example, the interpolation processing unit 17 sets the threshold value BWth as
CvN [i, j]> BWth and ChN [i, j]> BWth ... Condition 6
Is satisfied, it is determined that the saturation is high. If the condition 6 is not satisfied, it is determined that the saturation is low. However, the threshold BWth takes a value of about 5 when the number of gradations is 256.
[0064]
Then, when the condition 6 is satisfied (when the saturation of the image in the vicinity of the interpolation target pixel is high), the interpolation processing unit 17 sets the same-color similarity weight coefficient da1 and the different-color similarity weight coefficient da2 as follows. Set the correct value,
da1 = da1s
da2 = da2s
When the condition 6 is not satisfied (when the saturation of the image in the vicinity of the interpolation target pixel is low), the following values are set for the weight coefficient da1 for the same-color similarity and the weight coefficient da2 for the different-color similarity.
[0065]
da1 = da1d
da2 = da2d
However, da1s, da2s, da1d, and da2d are 0 or a positive constant and satisfy “da1s> da2s and da1d <da2d”. For example, (da1s, da2s, da1d, da2d) = (1,0,0,1), (2,1,1,2), etc. are conceivable. When (da1s, da2s, da1d, da2d) = (1,0,0,1) holds, the strength of similarity is determined using one of the similarity between different colors and the similarity between the same colors. Become.
[0066]
When the weighting factor is set as described above, the interpolation processing unit 17 calculates the similarity between the same colors in the vertical direction and the horizontal direction, and weights and adds the similarity between the same colors and the similarity between different colors for each direction. (FIG. 7 S5).
For example, the interpolation processing unit 17 performs weighted addition of the same-color similarity and the different-color similarity as follows.
[0067]
Cv0 [i, j] = (| G [i, j-1] -G [i, j + 1] | · da1 + CvN [i, j] · da2) / (da1 + da2) Equation 41
Ch0 [i, j] = (| G [i-1, j] -G [i + 1, j] | · da1 + ChN [i, j] · da2) / (da1 + da2) Equation 42
In Equation 41 and Equation 42, the similarity between the same colors in the vertical direction is
| G [i, j-1] -G [i, j + 1] |
Is calculated, and the similarity between the same colors in the horizontal direction is
| G [i-1, j] -G [i + 1, j] |
Is calculated.
[0068]
By the way, in the second embodiment, Cv0 [i, j] and Ch0 [i, j] may be directly used as similarities. However, in order to increase the accuracy of the similarity, the similarity between different colors and the similarity between the same colors The process of calculating the degree and performing the weighted addition is performed not only on the interpolation target pixel but also on the peripheral pixels.
The interpolation processing unit 17 obtains values (Cv0 [i, j], Cv0 [i-1, j-1], Cv0) obtained by weighted addition of the respective similarity components in the interpolation target pixel and the surrounding pixels. [i + 1, j-1], Cv0 [i-1, j + 1], Cv0 [i + 1, j + 1], etc.) are called weighted addition (hereinafter referred to as “peripheral addition”) as follows: Then, the vertical similarity Cv [i, j] and the horizontal similarity Ch [i, j] at the interpolation target pixel are calculated (S6 in FIG. 7).
[0069]
Vertical similarity:
Cv [i, j] = (4 ・ Cv0 [i, j] + Cv0 [i-1, j-1]
+ Cv0 [i + 1, j-1] + Cv0 [i-1, j + 1] + Cv0 [i + 1, j + 1]) / 8 Equation 43
Horizontal similarity:
Ch [i, j] = (4 ・ Ch0 [i, j] + Ch0 [i-1, j-1]
+ Ch0 [i + 1, j-1] + Ch0 [i-1, j + 1] + Ch0 [i + 1, j + 1]) / 8 Equation 44
Next, the interpolation processing unit 17 determines the strength of the similarity using the vertical similarity and the horizontal similarity, and calculates an interpolation amount according to the determination result of the similarity strength (FIG. 7S7).
[0070]
For example, the interpolation processing unit 17 sets the threshold value Th1.
Ch [i, j] -Cv [i, j]> Th1 Condition 7
Is satisfied, the similarity in the vertical direction is determined to be strong, and condition 7 does not hold,
Cv [i, j] -Ch [i, j]> Th1 Condition 8
Is satisfied, it is determined that the similarity in the horizontal direction is strong. If the conditions 7 and 8 are not satisfied, it is determined that the similarity is strong (or weak) in both the vertical and horizontal directions. However, the threshold value Th1 takes a value of about 5 when the number of gradations is 256.
[0071]
Then, the interpolation processing unit 17 calculates the green interpolation amount G [i, j] as follows.
When similarity in the vertical direction is strong: G [i, j] = Gv [i, j] Equation 45
If the horizontal similarity is strong: G [i, j] = Gh [i, j]
When similarity is strong (or weak) in both vertical and horizontal directions:
G [i, j] = (Gv [i, j] + Gh [i, j]) / 2 Equation 47
However, Gv [i, j] and Gh [i, j] are values calculated in the same manner as in the first embodiment (Equation 35 to Equation 38).
[0072]
By the way, when determining the strength of the similarity, in the second embodiment, the vertical similarity Cv [i, j] and the horizontal similarity Ch [i, j] are used. For each power pixel, one type of similarity may be recorded in the vertical direction and the horizontal direction, whereas in the first embodiment, “similarity between different colors in the vertical direction CvN [i, j] and the similarity between different colors in the horizontal direction ChN [i, j] "or" the similarity between the same colors in the vertical direction Cv [i, j] and the similarity between the same colors in the horizontal direction Ch [i, j] " For each pixel whose interpolation amount is to be calculated, it is necessary to record two types of similarity in the vertical direction and the horizontal direction.
[0073]
In other words, in the second embodiment, the storage area required to determine the strength of similarity can be reduced compared to the first embodiment, and the interpolation amount can be calculated with high accuracy as in the first embodiment. be able to.
Hereinafter, the operation of the RB interpolation processing will be described. Here, the conventional RB interpolation processing will be described (the description of the B interpolation processing is omitted).
[0074]
First, linear interpolation processing in a color difference space is known as RB interpolation processing that has been conventionally performed, and color information of a green component is obtained from color information of all pixels (red component (or blue component)). After calculating (subtracted value), the interpolation amount is calculated by performing any one of the following processes (1) to (3) for each interpolation target pixel.
(1) When a color component missing from an interpolation target pixel exists in two pixels adjacent in the vertical direction of the interpolation target pixel, the color information of the green component of the interpolation target pixel is obtained as an average value of color differences between the two pixels. The value obtained by adding is used as the interpolation amount.
[0075]
(2) When the color component missing in the interpolation target pixel exists in two pixels adjacent in the left-right direction of the interpolation target pixel, the color information of the green component of the interpolation target pixel is calculated as the average value of the color difference between the two pixels. The value obtained by adding is used as the interpolation amount.
(3) When a color component missing from the interpolation target pixel is present in four pixels adjacent in the diagonal direction of the interpolation target pixel, the color information of the green component of the interpolation target pixel is obtained as an average value of the color differences of these four pixels. The value obtained by adding is used as the interpolation amount.
[0076]
<< Third Embodiment >>
  The operation of the third embodiment will be described below.
  FIG. 8 is a functional block diagram of the third embodiment.
  The third embodiment is claimed in the claims.9This is equivalent to executing interpolation processing by a personal computer using a recording medium in which the interpolation processing program described in 1 is recorded.
[0077]
8, components having the same functions as those in the functional block diagram shown in FIG. 1 are denoted by the same reference numerals, and description of the configuration is omitted.
8 is different from the electronic camera 10 shown in FIG. 1 in that the control unit 21 and the image processing unit 22 in FIG. 8 are different from the control unit 11 and the image processing unit 15 in FIG. The interface unit 23 shown in FIG. 8 is newly provided.
[0078]
In FIG. 8, the personal computer 30 includes a CPU 31, an interface unit 32, a hard disk 33, and a memory 34. The CPU 31 is connected to the interface unit 32, the hard disk 33, and the memory 34 via a bus.
Note that the personal computer 30 is preinstalled with an interpolation processing program (an interpolation processing program that executes interpolation processing in the same manner as the interpolation processing unit 17 of each embodiment described above) recorded on a recording medium such as a CD-ROM. It shall be. That is, the hard disk 33 stores such an interpolation processing program in an executable state.
[0079]
The operation of the third embodiment will be described below with reference to FIG.
First, in the electronic camera 20, image data generated in the same manner as the electronic camera 10 illustrated in FIG. 1 is supplied to the image processing unit 22. The image processing unit 22 performs image processing (for example, gradation conversion processing) other than the interpolation processing on the image data, and the recording unit 16 records the image data subjected to the image processing in the form of an image file.
[0080]
Such an image file is supplied to the personal computer 30 via the interface unit 23.
When the CPU 31 in the personal computer 30 acquires an image file via the interface unit 32, the CPU 31 executes the above-described interpolation processing program. The image data in which the resolution of each color component is increased by the interpolation processing is subjected to image compression or the like as necessary, and then recorded on the hard disk 33 or the like, and finally displayed in accordance with each connected device such as a display and a printer. Output as color system data.
[0081]
That is, in the third embodiment, the personal computer 30 can perform the same interpolation process as that of each of the embodiments described above.
[0082]
【The invention's effect】
  As described above, claim 1, claim3, Claims9And claims10The invention described inBy using information about colors that take direction into account, the features related to the color of the image in the local region to which the pixel to be interpolated belongs are extracted. When setting the weight ratio between the similarity between colors and the similarity between colors, image features can be extracted based on a more appropriate index than before. Therefore, the similarity suitable for determining the strength of similarity can be calculated, and the accuracy of the interpolation amount can be increased.
[0084]
  Claim2In the invention described in the above, by using the information on the color, it is possible to set the weight ratio between the different color similarity and the same color similarity, and the weight ratio between the different color similarity and the same color similarity. It is possible to calculate the similarity between different colors and the similarity between the same colors using the color components. Therefore, it is possible to calculate the degree of similarity suitable for determining the degree of similarity with high accuracy, and the accuracy of the interpolation amount is increased.
[0085]
  Claim4And claims5In the invention described in the above, when extracting the feature of the image in the local region to which the pixel to be interpolated belongs, the similarity between different colors is used as information about the color, so the similarity between different colors is used for determining the strength of similarity. Once the degree is calculated, there is no need to obtain information about the color again. That is, the entire interpolation process can be performed efficiently.
[0086]
  Claim6In the invention described in (2), the similarity between different colors is calculated using color information that exists at a distance interval shorter than the similarity between the same colors, so that the similarity between images having a high spatial frequency is reflected in the similarity between different colors. That is, when determining the strength of similarity using the degree of similarity between different colors, or when extracting image features in the local region to which the pixel to be interpolated belongs using the degree of similarity between different colors as color information The resolution capability of the high frequency part can be effectively extracted. As a result, the accuracy of similarity determination can be increased, and the accuracy of the interpolation amount can be increased.
[0087]
  Claim7In the invention described in the above, it is possible to calculate the degree of similarity of the interpolation target pixel while considering the continuity in the direction in which the similarity is strong between the interpolation target pixel and the peripheral portion.8In the invention described in (2), it is possible to reduce erroneous determination of similarity caused by noise or the like. That is, the claim7And claims8In the invention described in (1), since the accuracy of similarity determination can be increased, the accuracy of the interpolation amount can be increased.
[Brief description of the drawings]
FIG. 1 is a functional block diagram of an electronic camera corresponding to a first embodiment and a second embodiment.
FIG. 2 is a diagram illustrating an arrangement of color components of image data in the first embodiment and the second embodiment.
FIG. 3 is an operation flowchart of an interpolation processing unit in the first embodiment.
FIG. 4 is a diagram illustrating weighted addition of similarity components.
FIG. 5 is a flowchart showing details of processing for determining the strength of similarity.
FIG. 6 is a diagram illustrating a relationship between similarity and strength of similarity.
FIG. 7 is an operation flowchart of the interpolation processing unit 17 in the second embodiment.
FIG. 8 is a functional block diagram of a third embodiment.
[Explanation of symbols]
10, 20 Electronic camera
11, 21 Control unit
12 Shooting optical system
13 Imaging unit
14 A / D converter
15, 22 Image processing unit
16 Recording section
17 Interpolation processing unit
23, 32 Interface section
30 Personal computer
31 CPU
33 Hard disk
34 memory

Claims (10)

2次元配列された複数の画素を有し、前記複数の画素は、異なる第1〜第n(n≧2)色成分の色情報を出力し、前記各画素は1つの色成分の色情報を出力する撮像素子の第1色成分が欠落する画素に第1色成分の色情報を補間する補間処理装置において、
補間処理対象の画素における少なくとも2方向に対する類似度の各々を、前記補間処理対象の画素とその近傍の複数の画素とから選ばれる複数の画素の色情報に基づき、「異なる色成分の色情報を用いた異色間類似度成分を含む異色間類似度」と「同じ色成分の色情報のみを用いた同色間類似度成分を含む同色間類似度」との2種類に対して各々算出し、前記補間処理対象の画素が属する局所的な領域における画像の色彩に関する情報を画像内の方向を考慮して抽出し、前記色彩に関する情報に応じて、どちらか一方の類似度に切り換える、もしくは、各類似度を加重加算するときの加重比率を切り換えることにより算出する類似度算出手段と、
前記類似度に基づき、各方向の類似性の強弱を判定する類似性判定手段と、
前記類似性判定手段による判定結果に応じて、補間処理対象の画素の補間量を算出する補間量算出手段と
を備えたことを特徴とする補間処理装置。
It has a plurality of pixels arranged two-dimensionally, and the plurality of pixels output color information of different first to nth (n ≧ 2) color components, and each pixel has color information of one color component. in the interpolation processor for interpolating the color information of the first color component in the pixel where the first color component of the image pickup element which outputs are missing,
Based on the color information of a plurality of pixels selected from the pixel to be interpolated and a plurality of pixels in the vicinity thereof, each of the similarities in at least two directions in the pixel to be interpolated is displayed as “color information of different color components. Calculated for each of the two types of “similarity between different colors including similarity components used between different colors ” and “similarity between same colors including similarity components between same colors using only color information of the same color components ”, Information related to the color of the image in the local region to which the pixel to be interpolated belongs is extracted in consideration of the direction in the image and switched to one of the similarities according to the information related to the color , or each similar Similarity calculation means for calculating by switching weight ratio when weighted addition of degrees,
Similarity determination means for determining the strength of similarity in each direction based on the similarity;
An interpolation processing apparatus comprising: an interpolation amount calculation unit that calculates an interpolation amount of a pixel to be interpolated in accordance with a determination result by the similarity determination unit.
請求項1に記載の補間処理装置において、
前記異なる第1〜第n(n≧2)色成分の色情報を出力する複数の画素は、異なる第1〜第3色成分の色情報を出力し、第1色成分が第2色成分および第3色成分に比べて空間周波数が高い場合、
前記類似度算出手段は、
(1)第1色成分の色情報と第2色成分の色情報とから成る異色間類似度成分と、
(2)第1色成分の色情報と第3色成分の色情報とから成る異色間類似度成分と
の少なくとも一方を含む類似度を異色間類似度とし、
(1)第1色成分の色情報のみから成る同色間類似度成分と、
(2)第2色成分の色情報のみから成る同色間類似度成分と、
(3)第3色成分の色情報のみから成る同色間類似度成分と
の少なくとも1つを含む類似度を同色間類似度とする
ことを特徴とする補間処理装置。
The interpolation processing device according to claim 1,
The plurality of pixels that output the color information of the different first to nth (n ≧ 2) color components output the color information of the different first to third color components, and the first color component is the second color component and If the spatial frequency is higher than the third color component,
The similarity calculation means includes:
(1) a different color similarity component composed of color information of the first color component and color information of the second color component;
(2) a different color similarity component composed of color information of the first color component and color information of the third color component;
The similarity including at least one of
(1) The same-color similarity component consisting only of color information of the first color component;
(2) the same-color similarity component consisting only of color information of the second color component;
(3) the same-color similarity component consisting only of color information of the third color component;
An interpolation processing apparatus characterized in that a similarity including at least one of the above is defined as a similarity between the same colors .
請求項1または請求項2に記載の補間処理装置において、
前記類似度算出手段は、
前記色彩に関する情報を基準に、前記局所的な領域における画像が無彩色部であるか彩色部であるかを判別し、該局所的な領域における画像が無彩色部である場合には、補間処理対象の画素の複数の方向に対する類似度として前記異色間類似度を選択する、または、該異色間類似度と前記同色間類似度とを加重加算する際の該異色間類似度の加重比率を該同色間類似度の加重比率よりも大きくし、該局所的な領域における画像が彩色部である場合には、補間処理対象の画素の複数の方向に対する類似度として該同色間類似度を選択する、または、該異色間類似度と前記同色間類似度とを加重加算する際の該同色間類似度の加重比率を該異色間類似度の加重比率よりも大きくする
ことを特徴とする補間処理装置。
In the interpolation processing apparatus according to claim 1 or 2,
The similarity calculation means includes:
Based on the information on the color, it is determined whether the image in the local region is an achromatic portion or a chromatic portion. If the image in the local region is an achromatic portion, an interpolation process is performed. The similarity between the different colors is selected as the similarity with respect to a plurality of directions of the target pixel, or the weight ratio of the similarity between the different colors when the similarity between the different colors and the similarity between the same colors are weighted and added. The similarity between the same colors is larger than the weighted ratio of the same color, and when the image in the local region is a chromatic part, the similarity between the same colors is selected as the similarity for a plurality of directions of the interpolation target pixel. Alternatively , an interpolation processing device characterized in that a weight ratio of the same-color similarity when weighted addition between the different-color similarity and the same-color similarity is made larger than the weight ratio of the different-color similarity .
請求項1または請求項3に記載の補間処理装置において、
前記類似度算出手段は、
前記色彩に関する情報として前記異色間類似度を用いる
ことを特徴とする補間処理装置。
In the interpolation processing device according to claim 1 or 3,
The similarity calculation means includes:
An interpolation processing apparatus using the different color similarity as information on the color .
請求項4に記載の補間処理装置において、
前記類似度算出手段は、
前記異色間類似度が、少なくとも一方向に対して強い類似性を示す場合、前記局所的な領域における画像が無彩色部であると判断し、その他の場合、該局所的な領域における画像が彩色部であると判断する
ことを特徴とする補間処理装置。
The interpolation processing device according to claim 4, wherein
The similarity calculation means includes:
When the similarity between the different colors shows strong similarity in at least one direction, it is determined that the image in the local region is an achromatic portion, and in other cases, the image in the local region is colored. An interpolation processing apparatus characterized in that it is determined to be a part .
請求項ないし請求項5の何れか1項に記載の補間処理装置において、
前記類似度算出手段は、
前記異色間類似度を前記同色間類似度よりも短い距離間隔で存在する色情報を用いて算出する
ことを特徴とする補間処理装置。
In the interpolation processing apparatus according to any one of claims 1 to 5,
The similarity calculation means includes:
An interpolation processing apparatus , wherein the similarity between different colors is calculated using color information existing at a distance interval shorter than the similarity between the same colors .
請求項1ないし請求項6の何れか1項に記載の補間処理装置において、
前記類似度算出手段は、
補間処理対象の画素の複数の方向に対する類似度として、補間処理対象の画素のみならず補間処理対象の画素の周辺の画素に対して算出した複数の方向に対する類似度を用いる
ことを特徴とする補間処理装置。
It claims 1 in the interpolation processing apparatus according to any one of claims 6,
The similarity calculation means includes:
Interpolation characterized by using the similarity for multiple directions calculated not only for the pixel to be interpolated but also for the surrounding pixels of the pixel to be interpolated as the degree of similarity for the pixel to be interpolated Processing equipment.
請求項1ないし請求項7の何れか1項に記載の補間処理装置において、
前記類似性判定手段は、
各方向間の類似度の差異が所定の閾値よりも小さい場合、各方向の類似性が同程度であると判定する
ことを特徴とする補間処理装置。
In the interpolation processing device according to any one of claims 1 to 7 ,
The similarity determination means includes
An interpolation processing apparatus , wherein when the difference in similarity between directions is smaller than a predetermined threshold, it is determined that the similarity in each direction is the same .
2次元配列された複数の画素を有し、前記複数の画素は、異なる第1〜第n(n≧2)色成分の色情報を出力し、前記各画素は1つの色成分の色情報を出力する撮像素子の第1色成分が欠落する画素に第1色成分の色情報を補間する補間処理プログラムを記録した記録媒体において、
補間処理対象の画素における少なくとも2方向に対する類似度の各々を、前記補間処理対象の画素とその近傍の複数の画素とから選ばれる複数の画素の色情報に基づき、「異なる色成分の色情報を用いた異色間類似度成分を含む異色間類似度」と「同じ色成分の色情報のみを用いた同色間類似度成分を含む同色間類似度」との2種類に対して各々算出し、前記補間処理対象の画素が属する局所的な領域における画像の色彩に関する情報を画像内の方向を考慮して抽出し、前記色彩に関する情報に応じて、どちらか一方の類似度に切り換える、もしくは、各類似度を加重加算するときの加重比率を切り換えることにより算出する類似度算出手順と、
前記類似度に基づき、各方向の類似性の強弱を判定する類似性判定手順と、
前記類似性判定手順による判定結果に応じて、補間処理対象の画素の補間量を算出する補間量算出手順と
をコンピュータに実行させることを特徴とする補間処理プログラムを記録した記録媒体
It has a plurality of pixels arranged two-dimensionally, and the plurality of pixels output color information of different first to nth (n ≧ 2) color components, and each pixel has color information of one color component. In a recording medium that records an interpolation processing program for interpolating color information of a first color component into a pixel in which the first color component of an image sensor to be output is missing,
Based on the color information of a plurality of pixels selected from the pixel to be interpolated and a plurality of pixels in the vicinity thereof, each of the similarities in at least two directions in the pixel to be interpolated is displayed as “color information of different color components. Calculated for two types of similarity between different colors including the different color similarity component used and “same color similarity including the same color similarity component using only the color information of the same color component”, Extract information about the color of the image in the local area to which the pixel to be interpolated belongs in consideration of the direction in the image, and switch to one of the similarities according to the information about the color, or each similarity Similarity calculation procedure to calculate by switching weight ratio when weighted addition of degrees,
A similarity determination procedure for determining the strength of similarity in each direction based on the similarity;
An interpolation amount calculation procedure for calculating an interpolation amount of a pixel to be interpolated in accordance with a determination result by the similarity determination procedure;
The recording medium which recorded the interpolation processing program characterized by making a computer perform .
請求項1に記載の補間処理装置において、
前記色彩に関する情報は、前記補間処理対象の画素における少なくとも2方向において、異なる色成分の色情報を使用して求める情報である
ことを特徴とする補間処理装置。
The interpolation processing device according to claim 1 ,
The information regarding the color is information obtained by using color information of different color components in at least two directions in the pixel to be interpolated.
JP2000186367A 1998-06-01 2000-06-21 Interpolation processing apparatus and recording medium recording interpolation processing program Expired - Lifetime JP4581191B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2000186367A JP4581191B2 (en) 2000-06-21 2000-06-21 Interpolation processing apparatus and recording medium recording interpolation processing program
US09/725,286 US6836572B2 (en) 1998-06-01 2000-11-29 Interpolation processing apparatus and recording medium having interpolation processing program recorded therein

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000186367A JP4581191B2 (en) 2000-06-21 2000-06-21 Interpolation processing apparatus and recording medium recording interpolation processing program

Publications (2)

Publication Number Publication Date
JP2002010279A JP2002010279A (en) 2002-01-11
JP4581191B2 true JP4581191B2 (en) 2010-11-17

Family

ID=18686536

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000186367A Expired - Lifetime JP4581191B2 (en) 1998-06-01 2000-06-21 Interpolation processing apparatus and recording medium recording interpolation processing program

Country Status (1)

Country Link
JP (1) JP4581191B2 (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100506086B1 (en) 2002-12-26 2005-08-03 삼성전자주식회사 Apparatus and Method for enhancing the quality of reproducing image
JP4840740B2 (en) 2004-12-01 2011-12-21 株式会社メガチップス Pixel interpolation method and image determination method
US7576783B2 (en) * 2005-02-04 2009-08-18 Hau Hwang Confidence based weighting for color interpolation
JP4946581B2 (en) * 2007-04-05 2012-06-06 ソニー株式会社 Image processing device
JP4982897B2 (en) 2007-08-27 2012-07-25 株式会社メガチップス Image processing device
JP5017597B2 (en) * 2007-11-27 2012-09-05 株式会社メガチップス Pixel interpolation method
JP5877931B2 (en) 2013-05-23 2016-03-08 富士フイルム株式会社 Pixel interpolation device and operation control method thereof
JP6239358B2 (en) * 2013-12-02 2017-11-29 株式会社メガチップス Pixel interpolation device, imaging device, program, and integrated circuit
JP6758859B2 (en) * 2016-03-01 2020-09-23 キヤノン株式会社 Imaging equipment, imaging system, and image processing methods

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07236147A (en) * 1993-08-31 1995-09-05 Sanyo Electric Co Ltd Color separating circuit for single plate type color video camera
JPH11275373A (en) * 1998-03-19 1999-10-08 Nikon Corp Interpolation processing method
JP2000069492A (en) * 1998-08-26 2000-03-03 Nikon Corp Interpolation processor and storage medium in which interpolation processing program is recorded

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3771054B2 (en) * 1998-07-01 2006-04-26 株式会社リコー Image processing apparatus and image processing method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07236147A (en) * 1993-08-31 1995-09-05 Sanyo Electric Co Ltd Color separating circuit for single plate type color video camera
JPH11275373A (en) * 1998-03-19 1999-10-08 Nikon Corp Interpolation processing method
JP2000069492A (en) * 1998-08-26 2000-03-03 Nikon Corp Interpolation processor and storage medium in which interpolation processing program is recorded

Also Published As

Publication number Publication date
JP2002010279A (en) 2002-01-11

Similar Documents

Publication Publication Date Title
JP4599672B2 (en) Interpolation processing apparatus and recording medium recording interpolation processing program
JP3985679B2 (en) Image processing method, image processing program, and image processing apparatus
US7391903B2 (en) Image processing method, image processing program and image processing processor for interpolating color components
JP3972816B2 (en) Image processing apparatus and color system conversion method
KR20040066051A (en) Weighted gradient based and color corrected interpolation
JP4321064B2 (en) Image processing apparatus and image processing program
JP4329542B2 (en) Image processing apparatus and image processing program for determining similarity of pixels
JP4581191B2 (en) Interpolation processing apparatus and recording medium recording interpolation processing program
US20020047907A1 (en) Image processing apparatus and storage medium for storing image processing program
JPWO2017203941A1 (en) IMAGE PROCESSING APPARATUS, IMAGE PROCESSING METHOD, AND PROGRAM
JP2000341701A (en) Interpolation processor and storage medium recording interpolation processing program
JP4415468B2 (en) Interpolation processing apparatus and recording medium recording interpolation processing program
US8675106B2 (en) Image processing apparatus and control method for the same
US8654220B2 (en) Image processing apparatus and control method for the same
JP4748278B2 (en) Interpolation processing apparatus and recording medium recording interpolation processing program
JP4196055B2 (en) Image processing method, image processing program, and image processing apparatus
JP4239483B2 (en) Image processing method, image processing program, and image processing apparatus
JP2012100215A (en) Image processing device, imaging device, and image processing program
CN118365513B (en) Image optimization method, image processing method and image sensing device
JP5983138B2 (en) Image processing apparatus, imaging apparatus, and program
JP4239480B2 (en) Image processing method, image processing program, and image processing apparatus
JP5983137B2 (en) Image processing apparatus, imaging apparatus, and program
JP4239484B2 (en) Image processing method, image processing program, and image processing apparatus
CN100559888C (en) Be applied to the pixel saturation inhibiting method and the device of color digital image
JP2000278702A (en) Interpolation processor and recording medium storing interpolation processing program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20070319

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20090714

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090811

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20091009

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

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20100816

R150 Certificate of patent or registration of utility model

Ref document number: 4581191

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20130910

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20130910

Year of fee payment: 3

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

EXPY Cancellation because of completion of term