Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP3573085B2 - Image processing apparatus and image processing method - Google Patents
[go: Go Back, main page]

JP3573085B2 - Image processing apparatus and image processing method - Google Patents

Image processing apparatus and image processing method Download PDF

Info

Publication number
JP3573085B2
JP3573085B2 JP2000356707A JP2000356707A JP3573085B2 JP 3573085 B2 JP3573085 B2 JP 3573085B2 JP 2000356707 A JP2000356707 A JP 2000356707A JP 2000356707 A JP2000356707 A JP 2000356707A JP 3573085 B2 JP3573085 B2 JP 3573085B2
Authority
JP
Japan
Prior art keywords
image
similar
block
image block
blocks
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2000356707A
Other languages
Japanese (ja)
Other versions
JP2002163648A (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.)
Seiko Epson Corp
Original Assignee
Seiko Epson 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 Seiko Epson Corp filed Critical Seiko Epson Corp
Priority to JP2000356707A priority Critical patent/JP3573085B2/en
Priority to US09/987,440 priority patent/US6898332B2/en
Publication of JP2002163648A publication Critical patent/JP2002163648A/en
Application granted granted Critical
Publication of JP3573085B2 publication Critical patent/JP3573085B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Image Processing (AREA)
  • Editing Of Facsimile Originals (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、例えば低品質の画像を補間して高品質の画像に変換可能な画像処理装置及び画像処理方法に関する。
【0002】
【従来の技術】
例えば、低品質のデジタル画像を高品質の画像に変換したり、低解像度の画像を高解像度に変換したり、画像を拡大したりする場合には、オリジナルの画素と画素との間に新たな画素を挿入する等の画像補間が行われる。デジタル画像の補間方法としては、例えば、最近傍補間法(最近隣接補間法、零次ホールド法、Nearest−Neighbor法とも呼ばれる)、線形補間法(直線補間法、共一次補間法、Bi−Linear法とも呼ばれる)、3次たたみ込み補間法(立体コンボリューション法、Bi−Cubic法、Cubic Convolution法と呼ばれる)が知られている。
【0003】
【発明が解決しようとする課題】
上述した各補間法は、サンプリング定理に基づくsinc関数による補間を基本概念としているため、原画像がナイキスト周波数の半分以下の周波数成分から構成されている場合にのみ、理論的に正しい。しかし、実際の原画像に含まれる周波数成分は無限に大きいため、前記各補間法では、原画像中に含まれる高周波成分を復元することができない。
【0004】
そこで、このようなサンプリングの過程で失われた高周波成分を補間するための手法として、周波数変換法が提案されている。周波数変換法としては、周波数領域において帯域制限された周波数成分を実空間に射影し、全実空間成分のうちの制限範囲のみを周波数空間に射影し、全周波数成分のうちの帯域制限された部分を既知である元周波数成分に置き換えた上で、再び実空間に射影するという操作を無限に繰り返すゲルヒベルグ−パポリスの反復法(GP法)がよく知られている。一般的には、周波数変換にDCT演算を用いることで演算上の負担を軽減している(IM−GPDCT法)。
【0005】
しかし、適当な高周波成分が得られるまで、DCT演算や逆DCT演算を繰り返す必要があるため、処理時間が長くなる。また、ノイズが強調されたり、リンギングが発生したりして、画質が低下するおそれもある。
【0006】
本発明は、上記のような課題に鑑みなされたもので、その目的は、高品質の画像をより高速に得ることができる画像処理装置及び画像処理方法を提供することにある。
【0007】
【課題を解決するための手段】
上記目的達成のため、本発明では、近接するブロック同士が重なり合うようにして各画像ブロックを取得すると共に、各画像ブロックのうちフラクタル相似性の度合が所定の基準値を上回る画像ブロックのみを自己に相似する画像で置換するようにしている。
【0008】
即ち、本発明では、原画像を保持するための原画像保持手段と、前記保持された原画像から所定サイズの画像ブロックを、近接する各画像ブロックが所定量だけ重なり合うようにして、それぞれ取得する画像ブロック取得手段と、前記取得された各画像ブロックについて、相似性の度合が所定の基準値を上回るか否かを判定する相似性判定手段と、前記相似性判定手段により前記相似性の度合が前記所定の基準値を上回ると判定された前記各画像ブロックのそれぞれについて、前記原画像の中から相似する相似画像ブロックを検出する相似画像検出手段と、前記検出された各相似画像ブロックを、対応する前記各画像ブロックにそれぞれ置換する画像置換手段と、前記置換された相似画像ブロックと前記相似性判定手段により前記相似性の度合が前記所定の基準値以下であると判定された画像ブロックとを重ね合わせる画像加算手段と、前記画像加算手段により加算されたブロックの重複部分の画像を調整する画像調整手段とを備えたことを特徴とする。
【0009】
例えば、原画像のディジタルデータは、例えば、メモリ等の原画像保持手段により保持されている。画像ブロック取得手段は、保持された原画像から所定サイズ(n×m画素、n=mでもよい)の画像ブロックを取得する。ここで、近接する画像ブロックがそれぞれ所定量ずつ重なり合うようにして、各画像ブロックが取得される。例えば、原画像の一画素毎に当該画素を略中心とする所定サイズの画像ブロックを取得することにより、隣接する各画像ブロックは、所定量ずつ重なり合うことになる。
【0010】
相似性判定手段は、各画像ブロックについて相似性の度合が所定の基準値を上回ったか否かを判定する。相似画像ブロックとしてフラクタル相似画像ブロックを用いる場合は、「フラクタル性の度合」と表現することもできる。相似性の度合としては、画像ブロックのエッジの強度を用いることができる。フラクタル自己相似性の高い画像ほど、エッジ強度が高くなる性質を有するためである。
【0011】
相似画像検出手段は、相似性の度合が所定の基準値を上回ると判定された各画像ブロックのそれぞれについて、該各画像ブロックに相似する相似画像ブロックを原画像の中から検出する。画像のある一部は、周囲のより大きな画像の縮小形となっている性質、即ち、フラクタル相似性を利用して、原画像の中から画像ブロックに相似する相似画像ブロックをそれぞれ検出することができる。ここで、相似性の度合が所定の基準値以下の各画像ブロックについては、相似画像ブロックの検出は行われない点に注意すべきである。
【0012】
検出された各相似画像ブロックは、画像置換手段によって、それぞれ対応する画像ブロックに置き換えられる。相似性の度合が低い各画像ブロックは、そのまま使用される。画像加算手段は、相似画像ブロックと相似性の度合が所定の基準値以下であると判定された画像ブロックとを加算する。これにより、大別するなら、相似画像ブロック同士が重なり合う箇所、相似画像ブロックと画像ブロックとが重なり合う箇所、画像ブロック同士が重なり合う箇所の3種類の重なりが生じる。
【0013】
近接する各画像ブロックは互いに所定量ずつ重なり合うようにして取得されているので、加算される各ブロックも近接するブロック同士が所定量ずつ重なり合う。そこで、画像調整手段は、ブロックの重なり合った部分の値を調整する。例えば、重なり合った画素の値を加算して平均化することにより画像を調整することができる。これに限らず、例えば、重み付けをして平均をとってもよい。
【0014】
相似画像検出手段は、画像ブロックのサイズよりも大きいサイズで相似画像ブロックを検出し、該相似画像ブロックのサイズを前記画像ブロックのサイズと等しくなるように縮小させるものであってもよい。
【0015】
例えば、画像ブロックのサイズをn×m、相似画像ブロックのサイズを(k・n)×(k・m)とすれば、相似画像ブロックをk分の一に縮小することにより、画像ブロックと相似画像ブロックのサイズを一致させることができる。
【0016】
または、相似画像検出手段は、画像ブロックのサイズよりも大きいサイズで原画像中に設定される所定領域の中から、画素を間引きすることにより、前記画像ブロックと同一サイズの相似画像ブロックを検出するものであってもよい。
【0017】
前記の例で言えば、(k・n)×(k・m)の画素を有する相似画像ブロックから1/kの画素を抽出し、残りの画素を捨てることにより、n×m個の画素を有する画像ブロックと同一サイズの相似画像ブロックを得ることができる。
【0018】
相似画像検出手段は、予め設定された所定の条件下で、原画像の中から各画像ブロックに相似する相似画像ブロックをそれぞれ検出することができる。
【0019】
所定の条件としては、相似画像ブロックを検出するための探索領域の設定条件を挙げることができる。そして、相似画像検出手段は、原画像よりも小さく設定される探索領域内で、該画像ブロックに相似する相似画像ブロックを検出するように構成してもよい。
【0020】
原画像の全体で相似画像ブロックを探索することもできるが、探索領域を広くするほど相似画像ブロックを検出するまでの時間がかかる。探索領域を原画像よりも小さく設定することにより、処理時間を短縮することができる。また、原画像の特性(自然画像かテキスト画像か等)や画像ブロックのサイズ等にもよるが、当該画像ブロックの周辺に相似画像ブロックが存在する可能性が高い場合は、相似画像ブロックを検出する時間を短縮できる。従って、探索領域は、画像ブロックの周辺に設定してもよい。
【0021】
前記所定の条件とは、相似画像ブロックを検出するための探索領域の設定条件及び該相似画像ブロックを検出するための画像操作のパラメータ条件を挙げることもできる。そして、相似画像検出手段は、所定の探索領域内で、画像操作のパラメータを変えながら複数の候補画像ブロックを取得し、該各候補画像ブロックの中から画像ブロックに最も相似する候補画像ブロックを該画像ブロックに相似する相似画像ブロックとして検出するように構成してもよい。
【0022】
「画像操作」としては、例えば、画像の平行移動、拡大、縮小、回転を行うアフィン変換を挙げることができる。「画像操作のパラメータ」とは、例えば、並行移動の量、拡大率、縮小率、回転角度を挙げることができる。相似画像検出手段は、所定の探索領域内で、画像操作のパラメータを変化させながら、複数の候補画像ブロックを取得する。そして、これら複数の候補画像ブロックの中から最も画像ブロックに相似するものを相似画像ブロックとして検出する。
【0023】
相似画像検出手段は、画像操作のパラメータを変えながら各候補画像ブロックの相似性を判定し、最も画像ブロックに相似する候補画像ブロックの取得に用いたパラメータのみを保持して、該保持されたパラメータにより相似画像ブロックを検出するようにしてもよい。
【0024】
各候補画像ブロックをそれぞれ保持しておく場合は、各候補画像ブロックを記憶させるためのメモリ領域が大きくなるが、最小距離の候補画像ブロックを得るのに必要なパラメータのみを保持することにより、少ないメモリ領域で相似画像ブロックを検出することができる。
【0025】
原画像がカラー画像の場合は、表色系の各成分毎に前記所定の条件をそれぞれ設定可能とすることもできる。
【0026】
例えば、RGB表色系なら、R(赤)、G(緑)、B(青)の各色成分毎に、探索領域の場所及び広さや画像操作の種類及びパラメータを設定することが可能である。RGB表色系に限らず、YUV表色系、YIQ表色系、YCbCr表色系、Lab表色系等の各種表色系において、色成分や輝度成分毎に、相似画像ブロックを検出するための所定条件を変えてもよい。これにより、例えば、画像処理装置が適用される製品の種類(ディジタルカメラ、プリンタ、スキャナ等々)や原画像の特性(自然画像か否か)、ユーザーの好み等に応じて、各色成分毎の所定条件を変えることができる。
【0027】
本発明は、コンピュータプログラムを記録した記録媒体として把握することもできる。プログラムは、例えば、ハードディスクやフロッピーディスク、メモリ等の種々の有形的な記録媒体に固定することができる。また、これに限らず、例えば、ネットワーク上のサーバから所定のプログラムをダウンロードする等のように、通信媒体を用いることもできる。
【0028】
【発明の実施の形態】
以下、図1〜図8に基づき、本発明の実施の形態を説明する。
【0029】
1.第1の実施の形態
図1〜図6は本発明の第1の実施の形態に係る画像処理装置の構成を示すブロック図である。
【0030】
本画像処理装置1は、原画像保持部2から入力される原画像に所定の画像処理を加えて、出力画像保持部13に処理済みの画像を出力するものである。原画像保持部2及び出力画像保持部13は、メモリ等から構成される。原画像保持部2及び出力画像保持部13は、画像処理装置1の構成として取り込んでも良いし、画像処理装置1とはそれぞれ別体の構成としてもよい。例えば、原画像が記録されたPCカードから原画像データを読み出し、処理済みの画像を当該PCカードの空き領域に書き戻す場合は、PCカードが原画像保持部2及び出力画像保持部13となる。
【0031】
「画像ブロック取得手段」としての局所領域画像取得部3は、原画像の各画素毎に所定サイズの局所領域画像をそれぞれ取得するものである。局所領域画像が「画像ブロック」に該当する。図2と共に後述するように、各画素毎にそれぞれ局所領域画像を取得するため、近接する各局所領域画像は所定量ずつ重なり合うことになる。局所領域画像取得部3は、パラメータ設定部4から設定される局所領域画像取得用のパラメータに基づいて、局所領域画像を取得する。このパラメータとしては、例えば、局所領域画像のサイズ等を挙げることができる。注目画素ポインタ5は、現在処理中の画素(注目画素)の位置を検出する。
【0032】
アフィン変換画像取得部6は、エッジ強度判定部14からの指示に基づいて、取得された各局所領域画像のうち所定の基準値を上回るエッジ強度を有すると判定された各局所領域画像に相似する画像を、原画像中から検出して取得するものである。アフィン変換画像取得部6は、アフィン変換パラメータ設定部7で設定されたアフィン変換用パラメータに基づいて、局所領域画像の周辺に存在する画像を操作し、局所領域画像に相似するアフィン変換画像を検出するようになっている。局所領域画像に相似するアフィン変換画像が「相似画像ブロック」に該当する。
【0033】
アフィン変換画像取得部6は、局所領域画像よりも大きいサイズ、例えば縦横2倍のサイズのアフィン変換画像を取得する。この取得されたアフィン変換画像は、縮小部8により局所領域画像と同サイズになるように縮小される。相似性算出部9は、局所領域画像取得部3が取得した局所領域画像とアフィン変換画像取得部6により取得され縮小部8により縮小されたアフィン変換画像との距離を算出し、両者の相似性、類似度を算出するものである。距離計算は、固有ベクトル距離を計算してもよいし、簡易的に二乗平均を取ってもよい。ここで、アフィン変換画像取得部6,縮小部8及び相似性算出部9が「相似画像検出手段」に該当する。
【0034】
そして、相似性算出部9によって最も相似すると判定されたアフィン変換画像は、「画像置換手段」としての置換部10によって、対応する局所領域画像と置き換えられる。
【0035】
「画像加算手段」としての加算部11は、置換されたアフィン変換画像と置換されなかった局所領域画像とを加算する。即ち、原画像から取得された全局所領域画像は、自己に相似するアフィン変換画像に置換されて加算されるか、又は、元の局所領域画像のままで加算される。近接する局所領域画像同士が重なり合うようにして局所領域画像が取得されるため、置換されたアフィン変換画像及び元の局所領域画像は、近接する画像同士が所定量ずつ重なり合うようにして、加算部11により加算される。「画像調整手段」としての平均化処理部12は、各画像が重なり合った部分の値を平均化することにより調整する。重なり合った部分の画像調整方法としては、単純平均をとってもよいし、または、重み付けして平均をとってもよい。このようにして調整された画像は、出力画像保持部13に保持される。なお、画像調整後に、拡大処理、縮小処理、回転処理、色変換処理等を行っても良い。
【0036】
「相似性判定手段」としてのエッジ強度判定部14は、取得された各局所領域画像のフラクタル性の度合を判定するものである。フラクタル性の度合が高いと判定された局所領域画像については、アフィン変換画像取得部6によってアフィン変換画像が検出される。フラクタル性の度合が低い局所領域画像は、そのままアフィン変換画像と加算される。即ち、原画像から取得される全ての局所領域画像についてアフィン変換画像を取得するのではなく、フラクタル性の度合の高い局所領域画像についてのみアフィン変換画像が取得される。「フラクタル性の度合」としては、エッジ強度を用いることができる。これについては、図5と共に後述する。
【0037】
図2は、画像処理装置による画像処理方法の大略を示す説明図である。図2(a)に示すように、原画像の各画素毎に局所領域画像が設定され、各局所領域画像のうちエッジ強度の高い各局所領域画像毎にアフィン変換画像がそれぞれ取得される。
【0038】
現在の処理に係る注目画像を略中心として、例えば、n×nサイズの局所領域画像が取得される。図中では、n=2の場合を例示している。アフィン変換画像は、局所領域画像サイズよりも大きくなるように、具体的には例えば縦横2倍の大きさで取得される(2n×2n)。実施の形態では、特に明示しない限り、局所領域画像及びアフィン変換画像を正方形として説明するが、本発明はこれに限定されない。各画像は長方形、平行四辺形等の他の多角形に設定することも可能である。
【0039】
ここで、局所領域画像に相似するアフィン変換画像は、原画像の全体から探索することも可能である。しかし、探索領域を広げるほど処理時間が長くなる。また、画像ブロックのサイズや原画像の特性等にもよるが、相似画像ブロックは画像ブロックの周辺で発見される可能性が高い場合がある。特に、本発明は、原画像全体を互いに重複しない複数の画像ブロックに分割して、各画像ブロックに相似する画像ブロックを求めるものではなく、隣接する各画像ブロックの一部が重複するように設定するため、画像ブロック数が多くなり、相似画像ブロックを検出する回数が増大する。従って、相似画像ブロックの探索領域(探索範囲)を原画像全体に広げると、処理時間がより長くなる可能性がある。
【0040】
そこで、本実施の形態では、原画像の全体を探索するのではなく、原画像の一部、さらには、画像ブロックの周辺に限定して相似画像ブロックを探索するようにしている。探索領域のサイズは、原画像の性質等に応じて動的に変更することができる。画像ブロックのサイズをn×m、原画像のサイズをXmax,Ymax、探索領域のサイズをαn×βmとした場合、下記の関係が成立する。
【0041】
1<α<Xmax/n・・・(数式1)
1<β<Ymax/m・・・(数式2)
探索領域のサイズを決定する係数α,βの値は、上記数式1,2を満たす範囲で任意に設定することができる。但し、本発明はこれに限らず、原画像全体を探索してもよい。
【0042】
図2(b)に示すように、局所領域画像よりも縦横2倍サイズで取得されたアフィン変換画像(「候補画像ブロック」)は、局所領域画像と同一サイズになるように縮小される。そして、縮小されたアフィン変換画像と局所領域画像との距離が算出され、相似性、類似度が判定される。ある局所領域画像について複数個取得されたアフィン変換画像の中から最も相似性の高いアフィン変換画像が、当該局所領域画像と置換される。
【0043】
図2(c)に示すように、近接する画像同士が互いに重複するようにして局所領域画像が取得されているため、該各局所領域画像に置換されるアフィン変換画像もそれぞれ隣接する画像同士が重複する。図中に示すように、2画素×2画素の局所領域画像を一画素ずつずらして取得する場合、x方向だけに着目すると、最大4枚の画像が重複することになる。y方向でも同様に最大で4枚の局所領域画像が重複する。そこで、重複した部分は、各画素の値の単純平均を取ることで調整する。
【0044】
なお、本実施の形態では、全局所領域画像についてアフィン変換画像を取得するのではなく、エッジ強度(フラクタル性)の高い局所領域画像についてのみアフィン変換画像を取得する。従って、図2(c)に示す4枚の画像が全てアフィン変換画像であるとは限らない。アフィン変換画像同士、元の局所領域画像同士、アフィン変換画像と局所領域画像とが重なり合う場合がある。
【0045】
図3は、アフィン変換画像を取得する際の画像操作方法及びパラメータを示す説明図である。図3(a)に示すように、画像をSx,Syだけ平行移動させることができる。また、図3(b)に示すように、画像を角度θだけ回転させることもできる。さらに、図3(c),(d)に示すように、画像をx方向にEx倍拡大又は縮小したり、y方向にEy倍拡大又は縮小することもできる。
【0046】
次に、図4〜図6に基づいて本実施の形態の作用を説明する。以下、ステップを「S」と略記する。
【0047】
まず、図4は、画像処理の全体の流れを示すフローチャートである。S1では、注目画素の座標(x,y)に(0,0)をセットし、原画像の最初の画素から変換を開始させる。次に、注目画素を中心とする局所領域画像のエッジ強度を計算する(S2)。図5に示すように、注目画素Px5を中心とする3画素×3画素の領域を例に挙げると、注目画素の上下に位置する列のレベル差(|Px1+Px2+Px3|−|Px7+Px8+Px9|)と、注目画素の左右に位置する列のレベル差(|Px1+Px4+Px7|−|Px3+Px6+Px9|)とを検出し(S2)、上下左右のレベル差が所定の基準値thよりも大きいか否かを判定する(S3)。即ち、注目画素周辺のエッジ強度をもってフラクタル性の度合が強いか否かを判定している。
【0048】
ここで、エッジ強度判定のための領域と局所領域画像のサイズとは必ずしも一致させる必要はない。例えば、注目画素を中心として4画素×4画素の局所領域画像を取得する場合、注目画素を中心とする3画素×3画素の領域でエッジ強度を判定することもできるし、5画素×5画素以上の領域でエッジ強度を判定することも可能である。本実施の形態では、エッジ強度判定領域と局所領域画像のサイズとを一致させるものとして述べる。
【0049】
算出されたエッジ強度が所定の基準値thを上回る場合は(S3:YES)、図6と共に後述するフラクタル補間が行われる(S4)。一方、エッジ強度が所定の基準値以下の場合は(S3:NO)、局所領域画像が取得され(S5)、この取得された局所領域画像がそのまま加算される(S6)。
【0050】
そして、注目する画素を次の画素に移し(S7)、原画像の全画素について、アフィン変換画像又は局所領域画像のいずれかを取得したか否かを判定する(S8)。原画像全体の処理が終了していない場合は、再びS2に戻って上述の各処理を繰り返す。
【0051】
原画像の全画素について、それぞれに対応する局所領域画像又は局所領域画像に相似するアフィン変換画像を取得して加算した場合は(S8:YES)、各画像の重複部分について平均化し、出力画像とする(S9)。なお、このようにして変換された画像を拡大等する場合は、さらに、線形補間等の従来の補間処理を行うことができる。
【0052】
なお、本実施の形態では原画像の全体について処理を行う場合を例示したが、本発明はこれに限られない。ユーザー等により指定された所定の領域についてのみ本発明による画像処理を部分的に適用することもできる。
【0053】
次に、図6は、図4中にS4として示されるフラクタル補間処理の流れを示すフローチャートである。
【0054】
まず、局所領域画像とアフィン変換画像との相似性を判定するための「最小距離」に最大値をセットする(S11)。そして、注目画素を略中心とする局所領域画像を取得し(S12)、アフィン変換用の各パラメータ(Sx,Sy,Ex,Ey,θ)にそれぞれ初期値をセットする(S13)。なお、後述する他のステップでも同様だが、処理に影響がない限り、ステップの処理順序を変更可能である。即ち、S11〜S13の処理順序は問わない。
【0055】
設定されたパラメータに基づいてアフィン変換画像を取得すると(S14)、この取得したアフィン変換画像が局所領域画像と同一サイズになるように縮小する(S15)。そして、局所領域画像と該局所領域画像に対応する同一サイズのアフィン変換画像との距離を算出し(S16)、この算出された距離が相似性判定のパラメータ「最小距離」に設定された値よりも小さいか否か、即ち、より相似しているかを判定する(S17)。もしも、最新の距離の算出結果が「最小距離」よりも小さい場合は、この最新のアフィン変換パラメータ及び距離の値を保持しておく(S18)。最新の距離が「最小距離」よりも小さくない場合は、取得されたアフィン変換画像が局所領域画像に似ていない場合のため、各パラメータ及び距離の値を保持しない。
【0056】
そして、各パラメータを所定量だけ変化させ(S19)、各パラメータの可変範囲を超えたか否かを判定する(S20)。つまり、各パラメータを初期値から上限値まで変化させながらアフィン変換画像をそれぞれ取得し、局所領域画像との距離を算出する(S14〜S20)。従って、S18では、各パラメータの可変範囲内で得られるアフィン変換画像のうち、現在の注目画素に係る局所領域画像と最も相似するアフィン変換画像のアフィン変換パラメータ及びその距離が保持されることになる。
【0057】
各パラメータを上限まで変化させた場合には、S18で保持された各パラメータに基づいて、局所領域画像に最も相似するアフィン変換画像を取得する(S21)。そして、取得したアフィン変換画像を局所領域画像と同一サイズまで縮小し(S22)、先に取得されたアフィン変換画像に加算する(S23)。加算とは、メモリ領域の所定位置にアフィン変換画像のディジタルデータを格納することである。
【0058】
これにより、原画像から取得される全局所領域画像のうち、フラクタル相似性の度合が高い局所領域画像については、該局所領域画像に相似するアフィン変換画像が原画像中から検出されて置換され、加算される。一方、フラクタル相似性の度合が低い局所領域画像については、アフィン変換画像の取得は行われず、元の局所領域画像がそのまま加算される。
【0059】
このように構成される本実施の形態では、以下の効果を奏する。
【0060】
第1に、近接する画像同士が所定量ずつ重なり合うようにして局所領域画像を取得し、フラクタル相似性の高い各局所領域画像については、該各局所領域画像に相似するアフィン変換画像を原画像中から検出して置換するため、低品質の画像を高品質の画像に変換可能となる。
【0061】
第2に、フラクタル性の度合の高い場合にのみアフィン変換画像を取得するため、全ての局所領域画像についてアフィン変換画像を取得する場合に比較して、処理時間を短縮することができる。
【0062】
第3に、各画像を所定量ずつ重複せしめ、重なり合った部分を平均化等により処理するため、画像を重複させない場合に比べて、画像間のつなぎ目に違和感が生じるのを防止できる。従って、例えば、原画像が自然画像の場合等に、自然な階調変化を保ちつつ品質を高めることができる。
【0063】
第4に、局所領域画像に相似するアフィン画像を原画像の全体から探索するのではなく、局所領域画像の周辺から探索するため、局所領域画像に相似するアフィン変換画像を比較的短時間で得ることができる。従って、検出すべきアフィン変換画像が多い場合でも、全体の処理時間が著しく増大するのを防止することができる。
【0064】
第5に、アフィン変換画像と局所領域画像との相似性を判断しながら、局所領域画像に最も相似するアフィン変換パラメータを保持し、探索領域の探索が終了した後で、保持したアフィン変換パラメータによりアフィン変換画像を取得するため、少ないメモリ資源で局所領域画像に相似するアフィン変換画像を得ることができる。
【0065】
2.第2の実施の形態
次に、図7に基づき、本発明の第2の実施の形態を説明する。なお、以下の各実施の形態では、上述した構成要素と同一の構成要素に同一の符号を付し、その説明を省略するものとする。本実施の形態の特徴は、画素を間引きしてアフィン変換画像を取得することにより、局所領域画像と同一サイズのアフィン変換画像を得るようにした点にある。
【0066】
図7(a)に示すように、2n×2nのサイズでアフィン変換画像を取得し、この取得したアフィン変換画像を縮小することにより、局所領域画像と同一サイズのアフィン変換画像を得ることができる。
【0067】
これに対し、図7(b)に示すように、2n×2nのサイズでアフィン変換画像を取得するものの、該サイズ中の全画素を取得するのではなく、1個置きに画素を間引いて取得することにより、縮小処理を行わずに局所領域画像と同一サイズのアフィン変換画像を得ることができる。
【0068】
3.第3の実施の形態
次に、図8に基づいて本発明の第3の実施の形態を説明する。本実施の形態の特徴は、原画像の特性等に基づいて、アフィン変換パラメータの値を各色成分毎に設定可能とした点にある。
【0069】
まず、ユーザーは、画像処理装置による画像改質を行うに際し、色にじみ防止モードかシャープモードかを排他的に選択することができる(S31)。色にじみ防止モードでは、色のにじみを抑えるべく、RGB表色系で表現された原画像のうちR成分及びB成分に本発明によるフラクタル補間を適用する。一方、シャープモードでは、画像の輪郭等を鮮明にするべく、G成分のみフラクタル補間を適用する。例えば、各1個ずつのR成分用画素及びB成分用画素と2個のG成分用画素とで一つの単位を形成しているようなディジタルカメラ等において、色にじみ防止モードは自然画像に、シャープモードは文字や線図等の画像に、それぞれ好適に用いられる。
【0070】
色にじみ防止モードが選択された場合は、フラクタル補間対象となる色プレーンにRプレーン及びBプレーンをセットすると共に(S32)、該各R,Bプレーン用のアフィン変換パラメータをセットする(S33)。一方、シャープモードが選択された場合は、フラクタル補間対象プレーンとしてGプレーンをセットすると共に(S34)、該Gプレーン用のアフィン変換パラメータをセットする(S35)。なお、S33,S35でセットするパラメータの初期値及び可変範囲は同一であってもよい。
【0071】
そして、前記同様に、注目画素の初期値をセットした後(S36)、注目画素を中心とする局所領域画像のエッジ強度を算出する(S36,S37)。算出されたエッジ強度が所定の基準値thを上回る場合は(S38:YES)、フラクタル補間を行い(S39)、エッジ強度が基準値th以下の場合は(S38:NO)、取得した局所領域画像をそのまま加算する(S40,S41)。原画像の全画素について処理を終了するまで上記各処理を繰り返す(S42,S43)。
【0072】
原画像の全画素についてアフィン変換画像又は局所領域画像を取得した場合は(S43:YES)、各画像を加算して平均化する(S44)。これにより、一枚のプレーンの処理が終了する。そこで、次に処理すべきプレーンがあるか否かを判定し(S45)、処理すべきプレーンが残っている場合は、該プレーンに切り替えて上述の各処理を行わせる(S46)。フラクタル補間の実行を指定された全プレーンについて処理を終了した場合は、他のプレーンと合成し、出力画像を得る(S47)。
【0073】
即ち、色にじみ防止モードの場合は、Rプレーン及びBプレーンの画像データについて本発明によるフラクタル補間が行われ、Gプレーンと合成されて出力画像が得られる。この場合、Gプレーンについては、線形補間等の他の補間処理を行ってから合成してもよいし、補間処理を行わずに合成してもよい。同様に、シャープモードの場合は、Gプレーンの画像データについてのみ本発明によるフラクタル補間が行われ、Rプレーン及びBプレーンと合成される。
【0074】
これにより、原画像の特性やユーザーの希望等に応じて、画像処理を行うことができる。
【0075】
なお、当業者であれば、前記各実施の形態に記載された本発明の要旨の範囲内で種々の追加、変更、組合せ等が可能である。例えば、前記各実施の形態では、原画像の各画素毎に局所領域画像を取得する場合を例示したが、これに限らず、例えば、1画素おき、2画素おき等のように、近接する局所領域画像が所定量ずつ重なり合う範囲内において、所定間隔で画素を選定してもよい。
【0076】
【発明の効果】
以上説明した通り、本発明に係る画像処理装置及び画像処理方法によれば、低品質の画像を高品質の画像に比較的短時間で変換することが可能となる。
【図面の簡単な説明】
【図1】本発明の第1の実施の形態に係る画像処理装置のブロック図である。
【図2】画像処理の概要を示す説明図である。
【図3】アフィン変換の概要を示す説明図である。
【図4】画像処理方法を示すフローチャートである。
【図5】エッジ強度の算出方法を示す説明図である。
【図6】図4中に示されるフラクタル補間の具体的処理の流れを示すフローチャートである。
【図7】本発明の第2の実施の形態に係る画像処理方法の説明図である。
【図8】本発明の第3の実施の形態に係る画像処理方法のフローチャートである。
【符号の説明】
1 画像処理装置
2 原画像保持部
3 局所領域画像取得部
4 パラメータ設定部
5 画素ポインタ
6 アフィン変換画像取得部
7 アフィン変換パラメータ設定部
8 縮小部
9 相似性算出部
10 置換部
11 加算部
12 平均化処理部
13 出力画像保持部
14 エッジ強度判定部
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to an image processing apparatus and an image processing method capable of interpolating a low-quality image into a high-quality image, for example.
[0002]
[Prior art]
For example, when converting a low-quality digital image to a high-quality image, converting a low-resolution image to a high-resolution image, or enlarging an image, a new pixel is placed between the original pixels. Image interpolation such as inserting a pixel is performed. As a method for interpolating a digital image, for example, a nearest neighbor interpolation method (also referred to as a nearest neighbor interpolation method, a zero-order hold method, a Nearest-Neighbor method), a linear interpolation method (linear interpolation method, bilinear interpolation method, Bi-Linear method) A third-order convolution interpolation method (also referred to as a three-dimensional convolution method, a Bi-Cubic method, or a Cubic Convolution method) is known.
[0003]
[Problems to be solved by the invention]
Each of the above-described interpolation methods has a basic concept of interpolation using a sinc function based on the sampling theorem, and is theoretically correct only when the original image is composed of frequency components equal to or less than half the Nyquist frequency. However, since the frequency components contained in the actual original image are infinitely large, the above-described interpolation methods cannot restore the high-frequency components contained in the original image.
[0004]
Therefore, a frequency conversion method has been proposed as a method for interpolating the high-frequency components lost in the sampling process. As the frequency conversion method, the frequency components band-limited in the frequency domain are projected to the real space, only the restricted range of all the real space components is projected to the frequency space, and the band-limited portion of the total frequency components is Is replaced with a known original frequency component, and the operation of projecting again to the real space is infinitely repeated, and the Gerchberg-Papolis iterative method (GP method) is well known. In general, the computational burden is reduced by using DCT computation for frequency conversion (IM-GPDCT method).
[0005]
However, it is necessary to repeat the DCT operation and the inverse DCT operation until an appropriate high-frequency component is obtained, so that the processing time becomes long. In addition, noise may be emphasized, ringing may occur, and image quality may be degraded.
[0006]
SUMMARY An advantage of some aspects of the invention is to provide an image processing apparatus and an image processing method that can obtain a high-quality image at higher speed.
[0007]
[Means for Solving the Problems]
In order to achieve the above object, in the present invention, each image block is acquired such that adjacent blocks overlap each other, and only image blocks having a degree of fractal similarity exceeding a predetermined reference value among each image block are included in the image blocks. The image is replaced with a similar image.
[0008]
That is, in the present invention, an original image holding unit for holding an original image and an image block of a predetermined size are acquired from the held original image such that adjacent image blocks overlap by a predetermined amount. An image block acquisition unit, a similarity determination unit that determines whether or not the degree of similarity exceeds a predetermined reference value for each of the acquired image blocks; and a degree of the similarity determined by the similarity determination unit. For each of the image blocks determined to exceed the predetermined reference value, a similar image detecting unit that detects a similar image block from the original image, and the detected similar image blocks correspond to each other. Image replacement means for replacing each of the image blocks, and the degree of similarity determined by the replaced similar image block and the similarity determination means. Image adding means for superimposing an image block determined to be equal to or less than the predetermined reference value, and image adjusting means for adjusting an image of an overlapping portion of the block added by the image adding means. Features.
[0009]
For example, digital data of an original image is held by an original image holding unit such as a memory. The image block acquisition unit acquires an image block of a predetermined size (n × m pixels, n = m may be used) from the held original image. Here, each image block is obtained such that adjacent image blocks overlap by a predetermined amount. For example, by acquiring, for each pixel of the original image, an image block of a predetermined size substantially at the center of the pixel, adjacent image blocks overlap by a predetermined amount.
[0010]
The similarity determining means determines whether the degree of similarity of each image block exceeds a predetermined reference value. When a fractal similar image block is used as the similar image block, it can be expressed as “a degree of fractal property”. As the degree of similarity, the strength of the edge of the image block can be used. This is because an image having higher fractal self-similarity has a property of increasing edge strength.
[0011]
The similar image detecting means detects a similar image block similar to each image block from the original image for each image block for which the degree of similarity is determined to exceed a predetermined reference value. It is possible to detect a similar image block similar to an image block from an original image by using a property that a part of the image is a reduced form of a larger image around the image, that is, fractal similarity. it can. Here, it should be noted that similarity image blocks are not detected for each image block whose degree of similarity is equal to or less than a predetermined reference value.
[0012]
Each of the detected similar image blocks is replaced by a corresponding image block by the image replacement means. Each image block having a low degree of similarity is used as it is. The image adding means adds the similar image block and the image block whose degree of similarity is determined to be equal to or less than a predetermined reference value. As a result, roughly classified, there are three types of overlaps: a place where similar image blocks overlap, a place where similar image blocks and image blocks overlap, and a place where image blocks overlap.
[0013]
Since the adjacent image blocks are acquired so as to overlap each other by a predetermined amount, the blocks to be added also overlap the adjacent blocks by a predetermined amount. Therefore, the image adjusting means adjusts the value of the overlapping portion of the block. For example, the image can be adjusted by adding and averaging the values of the overlapping pixels. However, the present invention is not limited to this. For example, an average may be obtained by weighting.
[0014]
The similar image detecting means may detect the similar image block with a size larger than the size of the image block, and reduce the size of the similar image block to be equal to the size of the image block.
[0015]
For example, assuming that the size of an image block is n × m and the size of a similar image block is (kn) × (km), the similar image block is reduced by a factor of k to obtain a similar image block. The size of the image blocks can be matched.
[0016]
Alternatively, the similar image detecting means detects a similar image block having the same size as the image block by thinning out pixels from a predetermined area set in the original image with a size larger than the size of the image block. It may be something.
[0017]
In the above example, from a similar image block having (kn) × (km) pixels, 1 / k 2 Is extracted, and the remaining pixels are discarded, whereby a similar image block having the same size as an image block having n × m pixels can be obtained.
[0018]
The similar image detecting means can detect similar image blocks similar to each image block from the original image under predetermined conditions set in advance.
[0019]
Examples of the predetermined condition include a setting condition of a search area for detecting a similar image block. Then, the similar image detecting means may be configured to detect a similar image block similar to the image block in a search area set to be smaller than the original image.
[0020]
Although a similar image block can be searched for in the entire original image, the wider the search area, the longer it takes to detect a similar image block. By setting the search area smaller than the original image, the processing time can be reduced. Although it depends on the characteristics of the original image (natural image or text image, etc.) and the size of the image block, if there is a high possibility that a similar image block exists around the image block, the similar image block is detected. Can reduce the time it takes to do so. Therefore, the search area may be set around the image block.
[0021]
Examples of the predetermined condition include a setting condition of a search area for detecting a similar image block and a parameter condition of an image operation for detecting the similar image block. Then, the similar image detecting means acquires a plurality of candidate image blocks while changing image operation parameters within a predetermined search area, and selects a candidate image block most similar to the image block from among the candidate image blocks. You may comprise so that it may detect as a similar image block similar to an image block.
[0022]
The “image operation” includes, for example, affine transformation for performing parallel movement, enlargement, reduction, and rotation of an image. The “parameters for image operation” include, for example, the amount of parallel movement, enlargement ratio, reduction ratio, and rotation angle. The similar image detecting means acquires a plurality of candidate image blocks while changing image operation parameters within a predetermined search area. Then, of these plurality of candidate image blocks, the one that is most similar to the image block is detected as a similar image block.
[0023]
The similar image detecting means determines the similarity of each candidate image block while changing the parameters of the image operation, and holds only the parameters used for obtaining the candidate image block most similar to the image block, and stores the stored parameters. May be used to detect similar image blocks.
[0024]
When each of the candidate image blocks is stored, the memory area for storing each of the candidate image blocks becomes large, but by storing only the parameters necessary for obtaining the candidate image block of the minimum distance, the number of memory regions is reduced. Similar image blocks can be detected in the memory area.
[0025]
When the original image is a color image, the predetermined condition may be settable for each component of the color system.
[0026]
For example, in the case of the RGB color system, it is possible to set the location and size of the search area, the type of image operation, and parameters for each of the R (red), G (green), and B (blue) color components. In order to detect similar image blocks for each color component and luminance component in various color systems such as the YUV color system, the YIQ color system, the YCbCr color system, and the Lab color system as well as the RGB color system. May be changed. Thus, for example, the predetermined color component can be determined for each color component according to the type of product (digital camera, printer, scanner, etc.) to which the image processing apparatus is applied, the characteristics of the original image (whether or not the image is a natural image), and user preferences. Conditions can be changed.
[0027]
The present invention can be understood as a recording medium on which a computer program is recorded. The program can be fixed to various tangible recording media such as a hard disk, a floppy disk, and a memory. The present invention is not limited to this, and a communication medium may be used, such as downloading a predetermined program from a server on a network.
[0028]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, an embodiment of the present invention will be described with reference to FIGS.
[0029]
1. First embodiment
FIGS. 1 to 6 are block diagrams showing the configuration of the image processing apparatus according to the first embodiment of the present invention.
[0030]
The image processing apparatus 1 performs predetermined image processing on an original image input from the original image holding unit 2, and outputs a processed image to the output image holding unit 13. The original image holding unit 2 and the output image holding unit 13 are configured by a memory or the like. The original image holding unit 2 and the output image holding unit 13 may be incorporated as a configuration of the image processing device 1 or may be configured separately from the image processing device 1. For example, when the original image data is read from the PC card on which the original image is recorded, and the processed image is written back to the empty area of the PC card, the PC card becomes the original image holding unit 2 and the output image holding unit 13. .
[0031]
The local area image obtaining section 3 as “image block obtaining means” obtains a local area image of a predetermined size for each pixel of the original image. The local area image corresponds to the “image block”. As will be described later with reference to FIG. 2, since a local region image is obtained for each pixel, adjacent local region images overlap by a predetermined amount. The local area image obtaining section 3 obtains a local area image based on the local area image obtaining parameters set by the parameter setting section 4. As this parameter, for example, the size of the local area image can be cited. The target pixel pointer 5 detects the position of the pixel currently being processed (target pixel).
[0032]
The affine transformed image acquisition unit 6 is similar to each of the local region images determined to have an edge intensity exceeding a predetermined reference value among the acquired local region images based on the instruction from the edge intensity determination unit 14. The image is detected and acquired from the original image. The affine transformation image acquisition unit 6 operates an image existing around the local region image based on the affine transformation parameters set by the affine transformation parameter setting unit 7 to detect an affine transformation image similar to the local region image. It is supposed to. An affine transformed image similar to the local region image corresponds to a “similar image block”.
[0033]
The affine-transformed image acquisition unit 6 acquires an affine-transformed image having a size larger than the local region image, for example, a size that is twice as long and wide. The obtained affine transformed image is reduced by the reducing unit 8 so as to have the same size as the local region image. The similarity calculating unit 9 calculates the distance between the local region image acquired by the local region image acquiring unit 3 and the affine transformed image acquired by the affine transformed image acquiring unit 6 and reduced by the reducing unit 8, and the similarity between the two is calculated. , To calculate the similarity. In the distance calculation, an eigenvector distance may be calculated, or a square mean may be simply taken. Here, the affine transformed image acquisition unit 6, the reduction unit 8, and the similarity calculation unit 9 correspond to “similar image detection means”.
[0034]
Then, the affine transformed image determined to be most similar by the similarity calculating unit 9 is replaced with a corresponding local area image by the replacing unit 10 as “image replacing means”.
[0035]
The adding unit 11 as an “image adding unit” adds the replaced affine transformed image and the non-replaced local region image. That is, the entire local region image acquired from the original image is replaced with an affine transformed image similar to the self image and added, or the original local region image is added as it is. Since the local region images are acquired such that the adjacent local region images overlap each other, the replaced affine transformed image and the original local region image are added such that the adjacent images overlap by a predetermined amount, and the adding unit 11 Is added by The averaging processing unit 12 as “image adjusting means” adjusts by averaging the values of the portion where each image overlaps. As an image adjustment method of the overlapping portion, a simple average may be taken, or a weighted average may be taken. The image adjusted in this way is held in the output image holding unit 13. After image adjustment, enlargement processing, reduction processing, rotation processing, color conversion processing, and the like may be performed.
[0036]
The edge strength determination unit 14 as “similarity determination means” determines the degree of fractalness of each of the acquired local region images. The affine-transformed image is detected by the affine-transformed image acquiring unit 6 for the local region image determined to have a high degree of fractal property. The local region image having a low degree of fractal property is added as it is to the affine transformed image. That is, instead of acquiring affine transformed images for all local region images acquired from the original image, affine transformed images are acquired only for local region images having a high degree of fractal property. As the “degree of fractal property”, edge strength can be used. This will be described later with reference to FIG.
[0037]
FIG. 2 is an explanatory diagram illustrating an outline of an image processing method by the image processing apparatus. As shown in FIG. 2A, a local region image is set for each pixel of the original image, and an affine transformed image is obtained for each local region image having a high edge strength among the local region images.
[0038]
For example, an n × n size local region image is acquired with the image of interest related to the current process substantially at the center. The figure illustrates a case where n = 2. The affine transformed image is acquired so as to be larger than the local area image size, specifically, for example, twice as large in the vertical and horizontal directions (2n × 2n). In the embodiments, the local region image and the affine transformed image are described as squares unless otherwise specified, but the present invention is not limited to this. Each image can be set to another polygon such as a rectangle or a parallelogram.
[0039]
Here, an affine transformed image similar to the local region image can be searched for from the entire original image. However, the processing time becomes longer as the search area is expanded. Further, depending on the size of the image block, the characteristics of the original image, and the like, a similar image block may be more likely to be found around the image block. In particular, the present invention does not divide the entire original image into a plurality of image blocks that do not overlap each other, and obtain image blocks similar to each image block, but set so that a part of each adjacent image block overlaps. Therefore, the number of image blocks increases, and the number of times of detecting similar image blocks increases. Therefore, if the search area (search range) of the similar image block is extended to the entire original image, the processing time may be longer.
[0040]
Therefore, in the present embodiment, a similar image block is searched for only a part of the original image and further around the image block, instead of searching the entire original image. The size of the search area can be dynamically changed according to the properties of the original image and the like. When the size of the image block is n × m, the size of the original image is Xmax and Ymax, and the size of the search area is αn × βm, the following relationship is established.
[0041]
1 <α <Xmax / n (Equation 1)
1 <β <Ymax / m (Equation 2)
The values of the coefficients α and β that determine the size of the search area can be set arbitrarily within a range that satisfies Equations 1 and 2. However, the present invention is not limited to this, and the entire original image may be searched.
[0042]
As shown in FIG. 2B, an affine transformed image (“candidate image block”) acquired at a size twice as large as the local region image is reduced to have the same size as the local region image. Then, the distance between the reduced affine transformed image and the local region image is calculated, and the similarity and the similarity are determined. An affine transformed image having the highest similarity is replaced with the local region image from among the affine transformed images obtained for a certain local region image.
[0043]
As shown in FIG. 2C, since the local region images are acquired such that the adjacent images overlap each other, the affine transformed images replaced with the respective local region images also have adjacent images. Duplicate. As shown in the figure, when a local area image of 2 pixels × 2 pixels is acquired by shifting one pixel at a time, focusing only on the x direction, a maximum of four images overlap. Similarly, a maximum of four local region images overlap in the y direction. Therefore, the overlapping part is adjusted by taking a simple average of the values of each pixel.
[0044]
In the present embodiment, an affine transformed image is acquired only for a local region image having a high edge strength (fractal property), instead of acquiring an affine transformed image for the entire local region image. Therefore, all four images shown in FIG. 2C are not necessarily affine transformed images. The affine transformed images, the original local region images, and the affine transformed image and the local region image may overlap each other.
[0045]
FIG. 3 is an explanatory diagram showing an image operation method and parameters when acquiring an affine transformed image. As shown in FIG. 3A, the image can be translated by Sx and Sy. Further, as shown in FIG. 3B, the image can be rotated by the angle θ. Further, as shown in FIGS. 3C and 3D, the image can be enlarged or reduced Ex times in the x direction, or enlarged or reduced Ey times in the y direction.
[0046]
Next, the operation of the present embodiment will be described with reference to FIGS. Hereinafter, steps are abbreviated as “S”.
[0047]
First, FIG. 4 is a flowchart showing the overall flow of the image processing. In S1, (0, 0) is set to the coordinates (x, y) of the target pixel, and conversion is started from the first pixel of the original image. Next, the edge strength of the local area image centering on the target pixel is calculated (S2). As shown in FIG. 5, taking a region of 3 × 3 pixels centered on the target pixel Px5 as an example, the level difference (| Px1 + Px2 + Px3 | − | Px7 + Px8 + Px9 |) of the columns located above and below the target pixel The level difference (| Px1 + Px4 + Px7 |-| Px3 + Px6 + Px9 |) of the columns located on the left and right of the pixel is detected (S2), and it is determined whether the level difference between the upper, lower, left, and right directions is greater than a predetermined reference value th (S3). . That is, it is determined whether or not the degree of fractal property is strong based on the edge strength around the target pixel.
[0048]
Here, it is not always necessary to match the size of the region for edge strength determination with the size of the local region image. For example, when acquiring a local area image of 4 × 4 pixels around the pixel of interest, the edge strength can be determined in an area of 3 × 3 pixels centering on the pixel of interest, or 5 × 5 pixels It is also possible to determine the edge strength in the above area. In the present embodiment, a description will be given assuming that the size of the edge strength determination area matches the size of the local area image.
[0049]
When the calculated edge strength exceeds the predetermined reference value th (S3: YES), fractal interpolation described later with reference to FIG. 6 is performed (S4). On the other hand, if the edge strength is equal to or smaller than the predetermined reference value (S3: NO), a local region image is obtained (S5), and the obtained local region image is added as it is (S6).
[0050]
Then, the pixel of interest is moved to the next pixel (S7), and it is determined whether any of the affine transformed image or the local region image has been acquired for all the pixels of the original image (S8). If the processing of the entire original image has not been completed, the process returns to S2 and the above-described processing is repeated.
[0051]
When a local region image or an affine transformed image similar to the local region image corresponding to each pixel of the original image is obtained and added (S8: YES), the overlapping portion of each image is averaged, and the output image is averaged. (S9). When the image converted in this way is enlarged or the like, conventional interpolation processing such as linear interpolation can be further performed.
[0052]
Note that, in the present embodiment, a case where the processing is performed on the entire original image is exemplified, but the present invention is not limited to this. The image processing according to the present invention can be partially applied only to a predetermined area specified by a user or the like.
[0053]
Next, FIG. 6 is a flowchart showing the flow of the fractal interpolation process indicated as S4 in FIG.
[0054]
First, the maximum value is set to the “minimum distance” for determining the similarity between the local area image and the affine transformed image (S11). Then, a local region image having the pixel of interest substantially at the center is acquired (S12), and initial values are set to the respective parameters (Sx, Sy, Ex, Ey, θ) for affine transformation (S13). The same applies to other steps described later, but the processing order of the steps can be changed as long as the processing is not affected. That is, the processing order of S11 to S13 does not matter.
[0055]
When an affine transformed image is acquired based on the set parameters (S14), the acquired affine transformed image is reduced so as to have the same size as the local region image (S15). Then, the distance between the local area image and the affine transformed image of the same size corresponding to the local area image is calculated (S16), and the calculated distance is calculated based on the value set in the similarity determination parameter “minimum distance”. Is smaller or not, that is, whether or not they are more similar (S17). If the latest distance calculation result is smaller than the "minimum distance", the latest affine transformation parameters and the distance values are held (S18). If the latest distance is not smaller than the “minimum distance”, the acquired affine transformed image does not resemble the local region image, and thus does not hold the value of each parameter and distance.
[0056]
Then, each parameter is changed by a predetermined amount (S19), and it is determined whether or not each parameter exceeds the variable range (S20). That is, an affine transformation image is acquired while changing each parameter from the initial value to the upper limit value, and the distance to the local region image is calculated (S14 to S20). Therefore, in S18, among the affine transformed images obtained within the variable range of each parameter, the affine transformed parameters of the affine transformed image most similar to the local region image related to the current target pixel and the distance thereof are held. .
[0057]
When each parameter is changed to the upper limit, an affine transformed image that is most similar to the local region image is acquired based on each parameter held in S18 (S21). Then, the acquired affine transformed image is reduced to the same size as the local area image (S22), and is added to the previously acquired affine transformed image (S23). The addition means storing the digital data of the affine transformed image at a predetermined position in the memory area.
[0058]
Thereby, of all the local region images obtained from the original image, for a local region image having a high degree of fractal similarity, an affine transformation image similar to the local region image is detected and replaced in the original image, Is added. On the other hand, for a local region image with a low degree of fractal similarity, an affine transformed image is not obtained, and the original local region image is added as it is.
[0059]
The present embodiment configured as above has the following effects.
[0060]
First, a local region image is acquired such that adjacent images overlap by a predetermined amount, and for each local region image having high fractal similarity, an affine transformed image similar to each local region image is included in the original image. , The low-quality image can be converted to a high-quality image.
[0061]
Second, since the affine transformation image is acquired only when the degree of fractalness is high, the processing time can be reduced as compared with the case where the affine transformation images are acquired for all the local region images.
[0062]
Third, since each image is overlapped by a predetermined amount and the overlapped portion is processed by averaging or the like, it is possible to prevent a sense of incongruity at a joint between images as compared with a case where the images are not overlapped. Therefore, for example, when the original image is a natural image, the quality can be improved while maintaining a natural gradation change.
[0063]
Fourth, an affine image similar to the local region image is obtained in a relatively short time because the affine image similar to the local region image is searched not from the entire original image but from the periphery of the local region image. be able to. Therefore, even when there are many affine-transformed images to be detected, it is possible to prevent the overall processing time from significantly increasing.
[0064]
Fifth, while judging the similarity between the affine transformation image and the local region image, the affine transformation parameters most similar to the local region image are held, and after the search of the search region is completed, the stored affine transformation parameters are used. Since an affine transformed image is obtained, an affine transformed image similar to a local region image can be obtained with a small amount of memory resources.
[0065]
2. Second embodiment
Next, a second embodiment of the present invention will be described with reference to FIG. In the following embodiments, the same components as those described above are denoted by the same reference numerals, and description thereof will be omitted. The feature of the present embodiment is that an affine transformed image having the same size as the local region image is obtained by thinning out the pixels and acquiring an affine transformed image.
[0066]
As shown in FIG. 7A, an affine transformed image having the same size as the local region image can be obtained by acquiring an affine transformed image with a size of 2n × 2n and reducing the acquired affine transformed image. .
[0067]
On the other hand, as shown in FIG. 7B, an affine transformed image is acquired in a size of 2n × 2n, but not all pixels in the size are acquired, but pixels are acquired every other pixel. By doing so, an affine transformed image having the same size as the local area image can be obtained without performing the reduction processing.
[0068]
3. Third embodiment
Next, a third embodiment of the present invention will be described with reference to FIG. The feature of this embodiment is that the value of the affine transformation parameter can be set for each color component based on the characteristics of the original image and the like.
[0069]
First, the user can exclusively select the color blur prevention mode or the sharp mode when performing the image modification by the image processing apparatus (S31). In the color fringing prevention mode, the fractal interpolation according to the present invention is applied to the R component and the B component of the original image expressed in the RGB color system in order to suppress color fringing. On the other hand, in the sharp mode, fractal interpolation is applied only to the G component in order to sharpen the outline and the like of the image. For example, in a digital camera or the like in which one R component pixel and one B component pixel and two G component pixels each form one unit, the color fringing prevention mode is applied to a natural image. The sharp mode is suitably used for images such as characters and diagrams.
[0070]
If the color fringing prevention mode is selected, the R plane and the B plane are set as the color planes to be subjected to fractal interpolation (S32), and the affine transformation parameters for the respective R and B planes are set (S33). On the other hand, when the sharp mode is selected, the G plane is set as the fractal interpolation target plane (S34), and the affine transformation parameters for the G plane are set (S35). Note that the initial values and the variable ranges of the parameters set in S33 and S35 may be the same.
[0071]
Then, similarly to the above, after setting the initial value of the target pixel (S36), the edge strength of the local region image centering on the target pixel is calculated (S36, S37). If the calculated edge strength exceeds the predetermined reference value th (S38: YES), fractal interpolation is performed (S39). If the edge strength is equal to or less than the reference value th (S38: NO), the acquired local region image is obtained. Is added as it is (S40, S41). The above processes are repeated until the process is completed for all pixels of the original image (S42, S43).
[0072]
When the affine transformed image or the local area image has been acquired for all the pixels of the original image (S43: YES), the respective images are added and averaged (S44). Thus, processing of one plane is completed. Therefore, it is determined whether or not there is a next plane to be processed (S45). If there is a plane to be processed, the plane is switched to the above plane and the above-described processing is performed (S46). When the processing has been completed for all the planes for which the execution of fractal interpolation has been designated, the image is combined with another plane to obtain an output image (S47).
[0073]
That is, in the color fringing prevention mode, the fractal interpolation according to the present invention is performed on the image data of the R plane and the B plane, and the image data is synthesized with the G plane to obtain an output image. In this case, the G plane may be combined after performing other interpolation processing such as linear interpolation, or may be combined without performing the interpolation processing. Similarly, in the case of the sharp mode, the fractal interpolation according to the present invention is performed only on the image data of the G plane, and is combined with the R plane and the B plane.
[0074]
Thus, image processing can be performed according to the characteristics of the original image, the user's request, and the like.
[0075]
It should be noted that those skilled in the art can make various additions, modifications, combinations, and the like within the scope of the present invention described in each of the above embodiments. For example, in each of the above embodiments, the case where a local region image is obtained for each pixel of the original image is exemplified. However, the present invention is not limited to this. For example, local local images are obtained every other pixel, such as every other pixel. Pixels may be selected at predetermined intervals within a range in which the area images overlap by a predetermined amount.
[0076]
【The invention's effect】
As described above, according to the image processing apparatus and the image processing method according to the present invention, a low-quality image can be converted into a high-quality image in a relatively short time.
[Brief description of the drawings]
FIG. 1 is a block diagram of an image processing apparatus according to a first embodiment of the present invention.
FIG. 2 is an explanatory diagram illustrating an outline of image processing.
FIG. 3 is an explanatory diagram showing an outline of an affine transformation.
FIG. 4 is a flowchart illustrating an image processing method.
FIG. 5 is an explanatory diagram showing a method of calculating edge strength.
FIG. 6 is a flowchart showing a specific process flow of fractal interpolation shown in FIG. 4;
FIG. 7 is an explanatory diagram of an image processing method according to a second embodiment of the present invention.
FIG. 8 is a flowchart of an image processing method according to a third embodiment of the present invention.
[Explanation of symbols]
1 Image processing device
2 Original image storage
3 Local area image acquisition unit
4 Parameter setting section
5 pixel pointer
6 Affine transformed image acquisition unit
7 Affine transformation parameter setting section
8 Reduction section
9 Similarity calculator
10 Replacement unit
11 Addition unit
12 Averaging unit
13 Output image holding unit
14 Edge strength judgment unit

Claims (13)

原画像を保持するための原画像保持手段と、
前記保持された原画像から所定サイズの画像ブロックを、近接する各画像ブロックが所定量だけ重なり合うようにして、それぞれ取得する画像ブロック取得手段と、
前記取得された各画像ブロックについて、相似性の度合が所定の基準値を上回るか否かを判定する相似性判定手段と、
前記相似性判定手段により前記相似性の度合が前記所定の基準値を上回ると判定された前記各画像ブロックのそれぞれについて、前記原画像の中から相似する相似画像ブロックを検出する相似画像検出手段と、
前記検出された各相似画像ブロックを、対応する前記各画像ブロックにそれぞれ置換する画像置換手段と、
前記置換された相似画像ブロックと前記相似性判定手段により前記相似性の度合が前記所定の基準値以下であると判定された画像ブロックとを重ね合わせる画像加算手段と、
前記画像加算手段により加算されたブロックの重複部分の画像を調整する画像調整手段と、
を備えたことを特徴とする画像処理装置。
An original image holding unit for holding an original image;
An image block acquisition unit that acquires an image block of a predetermined size from the held original image so that each adjacent image block overlaps by a predetermined amount,
For each of the obtained image blocks, similarity determining means for determining whether the degree of similarity exceeds a predetermined reference value,
For each of the image blocks for which the degree of similarity is determined to be greater than the predetermined reference value by the similarity determination means, for each of the image blocks, similar image detection means for detecting similar image blocks from the original image; ,
An image replacement unit that replaces each of the detected similar image blocks with a corresponding one of the image blocks,
Image adding means for superimposing the replaced similar image block and an image block whose degree of similarity is determined to be equal to or less than the predetermined reference value by the similarity determining means,
Image adjustment means for adjusting the image of the overlapping portion of the block added by the image addition means,
An image processing apparatus comprising:
前記相似性の度合として、前記画像ブロックのエッジの強度を用いる請求項1に記載の画像処理装置。The image processing apparatus according to claim 1, wherein an intensity of an edge of the image block is used as the degree of the similarity. 前記画像調整手段は、前記重複部分の画像を平均化するものである請求項1又は請求項2のいずれかに記載の画像処理装置。The image processing apparatus according to claim 1, wherein the image adjustment unit averages the image of the overlapping portion. 前記画像ブロック取得手段は、前記原画像の1画素毎に、当該画素を略中心とする所定サイズの画像ブロックを取得するものである請求項1〜請求項3のいずれかに記載の画像処理装置。The image processing apparatus according to any one of claims 1 to 3, wherein the image block obtaining means obtains, for each pixel of the original image, an image block of a predetermined size having the pixel substantially at the center. . 前記相似画像検出手段は、前記画像ブロックのサイズよりも大きいサイズで前記相似画像ブロックを検出し、該相似画像ブロックのサイズを前記画像ブロックのサイズと等しくなるように縮小させるものである請求項1〜請求項4のいずれかに記載の画像処理装置。2. The similar image detecting means detects the similar image block with a size larger than the size of the image block, and reduces the size of the similar image block so as to be equal to the size of the image block. The image processing device according to claim 4. 前記相似画像検出手段は、前記画像ブロックのサイズよりも大きいサイズで前記原画像中に設定される所定領域の中から、画素を間引きすることにより、前記画像ブロックと同一サイズの相似画像ブロックを検出するものである請求項1〜請求項4のいずれかに記載の画像処理装置。The similar image detection unit detects a similar image block having the same size as the image block by thinning out pixels from a predetermined area set in the original image with a size larger than the size of the image block. The image processing apparatus according to claim 1, wherein the image processing apparatus performs processing. 前記相似画像検出手段は、予め設定された所定の条件下で、前記原画像の中から前記各画像ブロックに相似する相似画像ブロックをそれぞれ検出するものである請求項1〜請求項6のいずれかに記載の画像処理装置。The said similar image detection means detects each similar image block similar to each said image block from the said original image under predetermined conditions set beforehand, respectively, The Claims 1 to 6 characterized by the above-mentioned. An image processing apparatus according to claim 1. 前記所定の条件とは、前記相似画像ブロックを検出するための探索領域の設定条件であり、
前記相似画像検出手段は、前記原画像よりも小さく設定される探索領域内で、該画像ブロックに相似する前記相似画像ブロックを検出するものである請求項7に記載の画像処理装置。
The predetermined condition is a setting condition of a search area for detecting the similar image block,
The image processing apparatus according to claim 7, wherein the similar image detecting unit is configured to detect the similar image block similar to the image block in a search area set to be smaller than the original image.
前記所定の条件とは、前記相似画像ブロックを検出するための探索領域の設定条件及び該相似画像ブロックを検出するための画像操作のパラメータ条件であり、
前記相似画像検出手段は、所定の探索領域内で、画像操作のパラメータを変えながら複数の候補画像ブロックを取得し、該各候補画像ブロックの中から前記画像ブロックに最も相似する候補画像ブロックを該画像ブロックに相似する相似画像ブロックとして検出するものである請求項7に記載の画像処理装置。
The predetermined condition is a setting condition of a search area for detecting the similar image block and a parameter condition of an image operation for detecting the similar image block,
The similar image detecting means obtains a plurality of candidate image blocks in a predetermined search area while changing image operation parameters, and selects a candidate image block most similar to the image block from among the candidate image blocks. The image processing apparatus according to claim 7, wherein the image processing apparatus detects the image block as a similar image block similar to the image block.
前記相似画像検出手段は、前記画像操作のパラメータを変えながら前記各候補画像ブロックの相似性を判定し、最も前記画像ブロックに相似する候補画像ブロックの取得に用いたパラメータのみを保持して、該保持されたパラメータにより前記相似画像ブロックを検出するものである請求項9に記載の画像処理装置。The similar image detecting means determines the similarity of each of the candidate image blocks while changing the parameters of the image operation, and holds only the parameters used for acquiring the candidate image block most similar to the image block, The image processing device according to claim 9, wherein the similar image block is detected based on the stored parameters. 前記原画像がカラー画像の場合は、表色系の各成分毎に前記所定の条件をそれぞれ設定可能である請求項7〜請求項10のいずれかに記載の画像処理装置。The image processing apparatus according to claim 7, wherein when the original image is a color image, the predetermined condition can be set for each component of a color system. 近接する画像ブロック同士が所定量だけ重なり合うようにして原画像から各画像ブロックを順次取得し、
前記順次取得された各画像ブロックについて、相似性の度合をそれぞれ判定し、
前記相似性の度合が所定の基準値を上回る各画像ブロックについては、該各画像ブロックに相似する相似画像ブロックを前記原画像中からそれぞれ検出し、
前記各検出された相似画像ブロックを対応する前記各画像ブロックにそれぞれ置換せしめ、
前記置換された各相似画像ブロックと前記相似性の度合が前記所定の基準値以下の各画像ブロックとを重ね合わせ、
前記各ブロックの重複部分を調整して出力させる、
ことを特徴とする画像処理方法。
Each image block is sequentially acquired from the original image so that adjacent image blocks overlap by a predetermined amount,
For each of the sequentially acquired image blocks, the degree of similarity is determined,
For each image block whose degree of similarity exceeds a predetermined reference value, a similar image block similar to each image block is detected from the original image, respectively.
Each of the detected similar image blocks is replaced with a corresponding one of the image blocks,
Each of the replaced similar image blocks and the degree of similarity are superimposed on each image block equal to or less than the predetermined reference value,
Adjusting and outputting the overlapping portion of each block,
An image processing method comprising:
コンピュータに画像処理を実行させるための画像処理プログラムを記録した記録媒体において、
保持された原画像から所定サイズの画像ブロックを、近接する各画像ブロックが所定量だけ重なり合うようにして、それぞれ取得させる機能と、
前記取得された各画像ブロックについて、相似性の度合が所定の基準値を上回るか否かを判定させる機能と、
前記相似性の度合が前記所定の基準値を上回ると判定された前記各画像ブロックのそれぞれについて、前記原画像の中から相似する相似画像ブロックを検出させる機能と、
前記検出された各相似画像ブロックを、対応する前記各画像ブロックにそれぞれ置換させる機能と、
前記置換された相似画像ブロックと前記相似性の度合が前記所定の基準値以下であると判定された画像ブロックとを重ね合わさせる機能と、
前記加算されたブロックの重複部分の画像を調整させる機能と、
をコンピュータ上に実現させるためのコンピュータプログラムを該コンピュータが読取り及び理解可能な形態で記録したことを特徴とする記録媒体。
In a recording medium recording an image processing program for causing a computer to execute image processing,
A function of acquiring image blocks of a predetermined size from the held original image such that adjacent image blocks overlap by a predetermined amount,
For each of the acquired image blocks, a function to determine whether the degree of similarity exceeds a predetermined reference value,
For each of the image blocks for which the degree of similarity is determined to exceed the predetermined reference value, a function of detecting a similar image block similar to the original image,
A function of replacing each of the detected similar image blocks with a corresponding one of the image blocks,
A function of superimposing the replaced similar image block and the image block whose degree of similarity is determined to be equal to or less than the predetermined reference value,
A function of adjusting an image of an overlapping portion of the added block;
A computer-readable recording medium storing a computer program for realizing the program on a computer in a form readable and understandable by the computer.
JP2000356707A 2000-11-15 2000-11-22 Image processing apparatus and image processing method Expired - Fee Related JP3573085B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2000356707A JP3573085B2 (en) 2000-11-22 2000-11-22 Image processing apparatus and image processing method
US09/987,440 US6898332B2 (en) 2000-11-15 2001-11-14 Image processing device and image processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000356707A JP3573085B2 (en) 2000-11-22 2000-11-22 Image processing apparatus and image processing method

Publications (2)

Publication Number Publication Date
JP2002163648A JP2002163648A (en) 2002-06-07
JP3573085B2 true JP3573085B2 (en) 2004-10-06

Family

ID=18828891

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000356707A Expired - Fee Related JP3573085B2 (en) 2000-11-15 2000-11-22 Image processing apparatus and image processing method

Country Status (1)

Country Link
JP (1) JP3573085B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006236317A (en) * 2005-01-26 2006-09-07 Matsushita Electric Ind Co Ltd Image processing method
US7689053B2 (en) 2005-01-26 2010-03-30 Panasonic Corporation Image processing method

Also Published As

Publication number Publication date
JP2002163648A (en) 2002-06-07

Similar Documents

Publication Publication Date Title
US7149355B2 (en) Image processing apparatus, image processing method, image processing program, and computer-readable record medium storing image processing program
JP3882585B2 (en) Image processing apparatus and program
JP3882651B2 (en) Image processing apparatus and program
US8233745B2 (en) Image processing apparatus and image processing method
EP0874330A2 (en) Area based interpolation for image enhancement
WO2007093864A1 (en) Distortion correction of images using hybrid interpolation technique
US11854157B2 (en) Edge-aware upscaling for improved screen content quality
US6898332B2 (en) Image processing device and image processing method
JPH08294001A (en) Image processing method and image processing apparatus
JP3601448B2 (en) Image processing apparatus and image processing method
US8743419B2 (en) Image processing apparatus and method converting low-resolution image to high-resolution using signal value patterns
JP3573085B2 (en) Image processing apparatus and image processing method
JP3491829B2 (en) Image processing apparatus and image processing method
JP3491830B2 (en) Image processing apparatus and image processing method
JP2004180171A (en) Device, method and program for processing image, and storage medium
JP4590973B2 (en) Image processing apparatus and image processing method
JP2012113398A (en) Image processing device and image processing system
JP4265362B2 (en) Image processing device
JP2015106318A (en) Image processing apparatus and image processing method
KR101332030B1 (en) Method of magnifying image and computer readable medium storing the program thereof
CN111626935B (en) Pixel map scaling method, game content generation method and device
JP3972625B2 (en) Image processing apparatus and image processing method
JP2003125197A (en) Image processing apparatus and program
JP6891014B2 (en) Image processing device, image processing method, and program
CN116128726A (en) Single Zhang Tupian resolution improvement method based on interpolation

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20040604

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20040621

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20080709

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20090709

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20100709

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20110709

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20110709

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20120709

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20120709

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20130709

Year of fee payment: 9

LAPS Cancellation because of no payment of annual fees