JP2004180171A - Device, method and program for processing image, and storage medium - Google Patents

Device, method and program for processing image, and storage medium Download PDF

Info

Publication number
JP2004180171A
JP2004180171A JP2002346561A JP2002346561A JP2004180171A JP 2004180171 A JP2004180171 A JP 2004180171A JP 2002346561 A JP2002346561 A JP 2002346561A JP 2002346561 A JP2002346561 A JP 2002346561A JP 2004180171 A JP2004180171 A JP 2004180171A
Authority
JP
Japan
Prior art keywords
image
area
enlarged
enlarged image
feature amount
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2002346561A
Other languages
Japanese (ja)
Other versions
JP4126541B2 (en
Inventor
Satoshi Kubota
聡 久保田
Kanya Ishizaka
敢也 石坂
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.)
Fujifilm Business Innovation Corp
Original Assignee
Fuji Xerox Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fuji Xerox Co Ltd filed Critical Fuji Xerox Co Ltd
Priority to JP2002346561A priority Critical patent/JP4126541B2/en
Publication of JP2004180171A publication Critical patent/JP2004180171A/en
Application granted granted Critical
Publication of JP4126541B2 publication Critical patent/JP4126541B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

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

Abstract

<P>PROBLEM TO BE SOLVED: To provide an image processor and image processing method for fast performing magnifying processing in a high quality manner and with a small processing load. <P>SOLUTION: An image block characteristic amount calculation part 12 calculates a characteristic amount in an area under consideration about an image block with a prescribed size including pixels under consideration segmented by an image block setting part 11. A magnified image block generating part 13 has a first generating part 21 for performing magnifying processing in a high quality manner and a second generating part 22 whose processing load is small as a plurality of magnifying means and uses one between the first and second generating parts to generate a magnified image block corresponding to the area under consideration according to the characteristic amount calculated by the image block characteristic amount calculation part 12. For example, the first generation part 21 is used for a part affecting image quality and the second generation part 22 is used for the other parts to realize fast magnifying processing in a high quality manner. An image block arranging part 14 sequentially arranges the generated magnified image block to generate magnified image data. <P>COPYRIGHT: (C)2004,JPO

Description

【0001】
【発明の属する技術分野】
本発明は、カラーを含む多階調で表現された画像の拡大処理を行う画像処理技術に関するものであり、特に入力された画像に対してボケやジャギーなどの画質欠陥をなるべく生じさせること無く、高画質にしかも処理負荷が軽い拡大処理を行う画像処理技術に関するものである。
【0002】
【従来の技術】
画像の拡大処理は、画像の編集やファイリング、表示、印刷などを行うシステムにとって基本的な処理の一つである。また近年、インターネットのホームページ上の画像やデジタルビデオなどのディスプレイ解像度での表示を主目的とした画像データなどの普及により、これらの低解像度画像を高解像度のプリンタなどで印刷することも頻繁に行われている。このプリンタによる印刷の際に、高画質の出力結果を得ることが望まれており、高画質の拡大処理に対する重要度が高まっている。
【0003】
カラーを含む多階調で表現された画像(以下では、これを多値画像と称する)を拡大処理する既存の代表的な手法としては、最近傍法や線形補間法、キュービック・コンボリューション法などがある。最近傍法は、拡大後の各画素値として、その画素を原画像上に逆写像した際に最も距離が近い画素の画素値を使うという方法である。この方法は、演算量が少ないため高速に処理することができる。しかし、原画像の1画素がそのまま矩形形状に拡大されるため、隣り合う画素の画素値の差が小さい場合は画質劣化の程度は小さくほとんど影響はないが、逆に大きい場合などは、斜線部やエッジ部のジャギーが目立ったり、倍率が大きい場合には画像がモザイク状になるなど、画質劣化の程度は大きい。
【0004】
線形補間法は、画素間の画素値が直線的に変化していると仮定し、拡大後の画素を逆写像した点の近傍4画素の画素値を線形に補間して画素値を求めるという方法である。この方法では、最近傍法よりも処理は重いものの演算量は比較的少なく、ジャギーなども発生しにくい。その一方で、直線的に変化しているという仮定に当てはまらないエッジ部分を中心に、画像全体がボケ気味になるという欠点がある。
【0005】
キュービック・コンボリューション法は、標本化定理に基づいてsinc関数(sin(x)/x)を近似した補間関数を定義し、拡大後の画素を逆写像した点の近傍16画素(X、Y方向それぞれ4画素)と前記の近似補間関数との畳み込み演算により、拡大後の画素値を求める方法である。この方法は、前記2つの手法に比べて画質は比較的良いが、参照範囲が大きく演算量が多いという欠点がある。また、高域が強調気味となる特性を持つため、エッジ部分で軽いジャギーが発生したりノイズ成分が強調されてしまうなどの欠点もある。
【0006】
これらの問題を解決する試みとして、例えば特許文献1、特許文献2、特許文献3や特許文献4などの新規方式が提案されている。特許文献1に記載されている技術では、まず原画像を2値化し、その2値画像から原画像に含まれる斜め成分の方向を予め用意した2次元パターン(行列データ)と一致判定することにより求め、求められた斜め方向に沿って補間処理をする。またそれ以外の部分は線形補間処理を行っている。しかし、原画像を予め定められた閾値により2値化してから斜め成分の方向判定を行っているので、濃度差の大きいエッジに対しては有効であるが、濃度差の小さいエッジの再現には問題がある。
【0007】
特許文献2に記載されている技術では、パターンファイルに1対1に対応した整数倍率毎のドット配置ファイル(拡大パターンファイル)と画素ブロックのどの位置の画素値で配置ファイルの画素値を決定するかという画素参照情報により拡大画像ブロックを生成する。さらに一致パターンがないときは単純に現画像ブロックの注目画素で拡大画像ブロックを生成する。しかし特許文献2では、パターンマッチングのみで一意に拡大ブロックを生成しているため、パターンファイルおよびドット配置ファイルの数により拡大画像の画質が決まる、つまり画質向上には予め多くのパターンファイルが必要であり、多くのパターンファイルを予め用意しておくのは現実的ではない。
【0008】
特許文献3に記載されている技術では、原画像の変化度合いの検出法として、エッジ検出フィルタによるエッジ検出を行い、そのエッジ検出結果に基づいてエッジ画素を定義する。そしてエッジ画素と判断された場合には、キュービック・コンボリューション法の3次関数形状を調整したM−キュービック法で拡大を行い、そうでない場合は最近傍法で拡大する。しかし、変化度合いの大きいエッジ部分をM−キュービック法で行うので、キュービック・コンボリューション法の画質特徴を踏襲し、ジャギーの発生やノイズ成分が強調されるという欠点がある。
【0009】
特許文献4に記載されている技術では、画像の性質を予めブロック毎の濃度ヒストグラムで測り、その結果に基づいて第1補間(パターンマッチング法またはニアレストネイバー法(NN法))と第2補間(キュービック・コンボリューション法あるいはM−キュービック法)の結果を重畳する。第1補間処理の1つであるパターンマッチング法では、予め定めた角度パターンに現画像ブロックから生成したパターン(2値化パターン)が一致した場合、現画像ブロックを含む参照ブロックを用いて所定のルールで注目画素に対する補間画素ブロックを生成する。しかし特許文献4においても、M−キュービック法との重畳であるのでジャギーの発生やノイズ成分が強調される問題がある。
【0010】
このような従来の拡大手法に対し、高画質な拡大手法として例えば特願2002−76896号に記載されている手法がある。この手法は、正確なエッジ方向を検出し、そのエッジ方向に応じた画素値から拡大画像を生成するものであり、入力された画像に対してボケやジャギーなどの画質欠陥をなるべく生じさせること無く拡大処理を行うことができる。しかし処理に時間がかかるため、高画質を維持したまま処理負荷を低減し、高速処理によって処理時間を短縮することが望まれていた。
【0011】
【特許文献1】
特開2000−228723号公報
【特許文献2】
特開2001−188900号公報
【特許文献3】
特開2000−188681号公報
【特許文献4】
特開2002−165089号公報
【0012】
【発明が解決しようとする課題】
本発明は、上述した従来技術の問題点を考慮してなされたものであり、入力された画像に対してボケやジャギーなどの画質欠陥をなるべく生じさせること無く、高画質に、しかも処理負荷が軽く高速に拡大処理を行うことができる画像処理装置及び画像処理方法を提供することを目的とするものである。また、そのような画像処理装置の機能あるいは画像処理方法をコンピュータにより実行するための画像処理プログラムと、そのような画像処理プログラムを格納したコンピュータが読取可能な記憶媒体を提供することを目的とするものである。
【0013】
【課題を解決するための手段】
本発明は、画像の拡大処理を行う画像処理装置及び画像処理方法において、画像を拡大するための複数の拡大手法を用意しておき、注目画素を含む所定の大きさの画像領域の特徴量を領域特徴量算出手段で算出し、算出された特徴量に従って拡大画像領域生成手段に設けられた複数の拡大手法を切り替えて画像領域に対応する拡大画像領域を生成し、得られた拡大画像領域を画像配置手段で配置して出力画像を生成することを特徴とするものである。このように、拡大処理を行う所定の大きさの画像領域毎に、その画像領域の特徴量に応じて拡大手法を切り替えるので、例えば特徴量に応じて処理負荷の異なる拡大手段を選択し、特徴量によってエッジ部分などの画質に影響する画像領域については高画質で拡大処理を行い、平坦部分などでは処理負荷の軽い拡大手段を用いて拡大画像領域を生成するなどといった処理が可能となり、高画質でありながら全体として高速な拡大処理を行うことができる。
【0014】
領域特徴量算出手段によって算出する特徴量としては、画像領域内の各画素値から画像領域内の凹凸度合いを算出したり、画像領域内の変化方向を算出することができる。また、カラー画像については、色空間におけるそれぞれの色成分毎に特徴量を算出し、算出した1つあるいは複数の特徴量をもとに色空間における1つの色成分のデータを選択し、その色成分のデータにおける画像領域の特徴量を画像領域の特徴量とすることができる。
【0015】
拡大画像領域生成手段に設けられる拡大手段としては、例えば、画像領域の特徴量とともに、その画像領域の近傍領域の特徴量および近傍領域内の画素値を用いて拡大画像領域を生成する拡大手段を設けておき、領域特徴量算出手段で算出された特徴量が所定の条件を満たす画像領域、例えばエッジなどを含む高画質の拡大処理が必要な画像領域に対して、この拡大手段を選択して拡大処理を行うことができる。
【0016】
画像配置手段による拡大画像領域の配置は、それぞれが重なり合わないように並べてゆくほか、拡大画像領域を重なり合うように順次配置し、重なり合う画素については重なる画素値の総和を算出して重なった数で割るように構成することができる。
【0017】
また本発明は、画像の拡大処理を行う画像処理装置及び画像処理方法において、注目画素を含む所定の大きさの画像領域の特徴量を領域特徴量算出手段で算出し、算出された特徴量が所定の条件を満たす前記画像領域に対応する拡大画像領域を拡大画像領域生成手段で生成し、さらに入力画像を前記画像領域の拡大手法とは異なる拡大手法により拡大画像生成手段で拡大して拡大画像を生成し、画像配置手段で拡大画像領域を拡大画像上の対応する位置に配置することを特徴とするものである。このように、全体としては拡大画像生成手段で処理負荷の軽い拡大手法を用いて拡大処理しておき、エッジ部などの画質にとって重要な部分のみについて拡大画像領域生成手段で高画質の拡大画像領域を生成して配置する。これによって、画像全体に対して高画質の拡大手法を用いて拡大処理を行う場合に比べて処理負荷を軽減することができ、高画質でありながら高速に拡大処理を行うことが可能となる。
【0018】
この発明の場合も、領域特徴量算出手段によって算出する特徴量としては、画像領域内の各画素値から画像領域内の凹凸度合いを算出したり、画像領域内の変化方向を算出することができる。また、カラー画像については、色空間におけるそれぞれの色成分毎に特徴量を算出し、算出した1つあるいは複数の特徴量をもとに色空間における1つの色成分のデータを選択し、その1つの色成分のデータにおける画像領域の特徴量をすべての色成分における画像領域の特徴量とすることができる。また拡大画像領域生成手段に設けられる拡大手段としては、例えば、画像領域の特徴量とともに、その画像領域の近傍領域の特徴量および近傍領域内の画素値を用いて拡大画像領域を生成する拡大手段を設けておき、領域特徴量算出手段で算出された特徴量が所定の条件を満たす画像領域、例えばエッジなどを含む高画質の拡大処理が必要な画像領域に対して、この拡大手段を選択して拡大処理を行うことができる。画像全体の拡大処理を行う拡大画像生成手段としては、入力画像毎あるいは入力画像中の数ライン毎に拡大画像を生成するように構成することができる。
【0019】
画像配置手段による拡大画像領域の配置は、拡大画像を書き換えてしまうほか、拡大画像と重なり合うように順次配置し、重なり合う画素については重なる画素値の総和を算出して重なった数で割るように構成することができる。
【0020】
さらに本発明は、画像の拡大処理をコンピュータに実行させる画像処理プログラムであって、請求項1ないし請求項20のいずれか1項に記載の画像処理装置の機能あるいは請求項21または請求項22に記載の画像処理方法をコンピュータに実行させることを特徴とするものである。これによって、上述の拡大処理の機能をコンピュータによって実行させることができる。さらに本発明では、このような画像処理プログラムを格納したコンピュータが読取可能な記憶媒体を提供することができる。
【0021】
【発明の実施の形態】
図1は、本発明の画像処理装置及び画像処理方法の第1の実施の形態を示すブロック図である。図中、1は画像処理部、2は画像データ格納部、11は画像ブロック設定部、12は画像ブロック特徴量算出部、13は拡大画像ブロック生成部、14は画像ブロック配置部、21は第1生成部、22は第2生成部である。
【0022】
画像データ格納部2は、画像データが画像処理部1で拡大処理されるまで一時的に記憶する機能や、解像度変換または拡大処理された拡大画像データが図示しない出力装置に出力されるまで一時的に記憶する機能などを備えたものである。なお、画像データは画像処理装置で処理可能な画像フォーマット(例えば、BMP、TIFF、PNGなど)で記述されたデータであり、図示しないデジタルカメラやスキャナなどによって取り込まれたり、パーソナルコンピュータ等において作成、編集等を処理するアプリケーションプログラムで作成された画像データ等である。拡大画像データについても、同様の画像フォーマットのデータである。
【0023】
画像処理部1は、画像ブロック設定部11と、画像ブロック特徴量算出部12と、拡大画像ブロック生成部13と、画像ブロック配置部14を含んで構成されており、画像データ格納部2との間で、拡大処理の対象となる画像データの読み出しや、拡大処理によって生成された拡大画像データの書き込みなどを行う。
【0024】
画像ブロック設定部11は、画像ブロック特徴量算出部12および拡大画像ブロック生成部13における処理で必要とされる所定のブロックサイズをそれぞれ設定し、画像データ格納部2に記憶されている入力画像データから注目画素を含むそれぞれのブロックサイズの画像ブロックを順次切り出し、画像ブロック特徴量算出部12および拡大画像ブロック生成部13に送信する。
【0025】
画像ブロック特徴量算出部12は、画像ブロック設定部11で順次切り出された画像ブロック中の注目領域における画像特徴量を、注目領域あるいは注目領域の周辺部を含む画像ブロック内の各画素値から算出する。画像特徴量としては、例えば後述するように注目領域のエッジ強度およびエッジ角度を算出することができる。しかしこれに限られるものではなく、例えば注目領域の各画素値の平均値を求め、その平均値に対する注目領域の各画素値のばらつきを表すような値(例えば、標準偏差や分散)を求めるなど、種々の画像特徴量を算出するものであってよい。
【0026】
拡大画像ブロック生成部13は、複数の拡大手段、ここでは第1生成部21及び第2生成部22を有しており、画像ブロック特徴量算出部12で算出された画像特徴量に従って複数の拡大手段を切り替えて注目領域に対応する拡大画像ブロックを生成する。例えば画像ブロック特徴量算出部12においてエッジ強度を数値として算出している場合、特徴量と所定値とを比較し、その比較の結果に応じて第1生成部21あるいは第2生成部22のいずれかに切り替えて拡大画像ブロックを生成することができる。なお、ここでは特徴量が所定値よりも大きい場合には第1生成部21で、所定値以下の場合には第2生成部22で拡大処理を行うものとする。もちろん、拡大手段の切り替えに用いる特徴量はエッジ強度に限られるものではなく、上述の標準偏差や分散、あるいはそのほかの種々の特徴量を用いることができる。第1生成部21及び第2生成部22における拡大手法は任意であるが、上述の例のようにエッジ強度が大きい数値を示す場合に動作する第1生成部21としては、画質を優先した拡大手法が望ましい。また、この場合の第2生成部22は、第1生成部21よりも高速で処理可能な拡大手法が望ましく、これによって全体の処理時間を短縮することができる。
【0027】
画像ブロック配置部14は、拡大画像ブロック生成部13で生成された拡大画像ブロックを順次配置し、解像度変換あるいは拡大された拡大画像データを画像データ格納部2に出力する。なお、拡大画像ブロックの配置方法については後述するが、例えば順次並べてゆく方法の他、拡大画像ブロックを重なり合うように順次配置して重畳させ、重なる画素値の総和を重なった数で割ることにより画素値を算出するように構成することもできる。
【0028】
図2は、本発明の画像処理装置及び画像処理方法の実施の一形態における動作の一例を示すフローチャートである。ここでは具体例を含めて説明してゆく。S41において、画像データ格納部2に記憶された入力画像データに対して、画像ブロック設定部11で、画像ブロック特徴量算出部12および拡大画像ブロック生成部13の処理で必要とされる各々のブロックサイズを設定する。さらに、設定したブロックサイズの画像ブロックを入力画像データから切り出す。図3は、画像ブロック設定部11で設定及び切り出しを行う画像ブロックの説明図である。中央部の細かい右上がりのハッチングを施した画素が注目領域、その周囲の荒い左上がりのハッチングを施した画素が周辺領域である。ここでは一例として、注目領域を2×2画素サイズ、注目領域を含む周辺領域を4×4画素サイズとしている。この場合、設定されるブロックサイズは2倍拡大の場合は図3(A)に示す6×6画素サイズの画像ブロックが、また4倍拡大の場合は図3(B)に示す8×8画素サイズの画像ブロックが切り出される。
【0029】
S42において、画像ブロック特徴量算出部12は、切り出された画像ブロック中の注目領域(図3中の細かい右上がりのハッチングを施した2×2画素の領域)のエッジ強度Gを以下の式(1)で算出する。なお、{a,b,c,d}は注目領域内の各画素値である。入力画像データがグレースケール画像でなく、例えばRGB色空間のカラー画像の場合は、注目領域に関してR,G,Bの各色空間の色成分毎の画像ブロックそれぞれについて、式(1)を用いてエッジ強度Gr、Gg、Gbを計算し、Gr、Gg、Gb中で最大のエッジ強度である色成分の画像ブロックを選択し、そのエッジ強度を注目領域の(すべての色成分に共通の)エッジ強度とする。
gx=(a+c−b−d)/2
gy=(a+b−c−d)/2
G=gx×gx+gy×gy ・・(1)
なお、エッジ強度は上記式(1)で算出されるものに限定されるわけでなく、以下の式(2)などで算出してもよい。
G=|gx|+|gy| ・・(2)
【0030】
S43において、S42で算出した注目領域のエッジ強度Gと所定の閾値Thとの比較を行う。ここで閾値Thよりエッジ強度Gが大きい場合は、注目領域が入力画像中のエッジ部分あるいは変化の大きい部分であるので、そうした注目領域の画像特徴を保存するような拡大画像ブロックの生成処理をS44〜S47において行う。また、注目領域のエッジ強度Gが閾値Thよりも小さい場合は、S44〜S47の処理に比べて処理負荷の小さい拡大画像ブロックの生成処理をS48において行う。
【0031】
S44において、画像ブロック特徴量算出部12は、閾値Thよりエッジ強度Gが大きいと判断された注目領域およびその注目領域を含む1ないし複数の周辺領域中の参照領域のエッジ角度Θを以下に示す式(3)でそれぞれ計算する。
Θ=arctan(gy/gx) ・・(3)
なお、gx、gyはS42において各々算出された値である。そして、得られた複数のエッジ角度Θから注目領域のエッジ方向θを推定する。例えば得られた複数のエッジ角度Θの平均値を取るなどの演算を行い、エッジ方向θを推定することができる。もちろん、エッジ方向θの推定方法は任意である。
【0032】
S45において、画像ブロック特徴量算出部12は、S44で推定されたエッジ方向θおよび注目領域の画素分布パターンを用いて第1および第2エッジパターンを選択する。ここで第1および第2エッジパターンは、後述の図9に示すようにエッジ方向および画素分布パターン毎に予め用意されており、例えば図示しない画像処理部1中の記憶部あるいは画像データ格納部2の一部などにテーブル情報として記憶させておくことができる。なお、詳細は後述する。
【0033】
S46において、拡大画像ブロック生成部13の第1生成部21は、拡大率に応じたサイズおよび要素値をもつ所定の強調パターン(以下、強調カーネルと呼ぶ)を用いて、画像ブロック設定部11で切り出された画像ブロック中の注目領域およびその周辺領域の画像データを強調する。なお、強調カーネル及びその強調カーネルを用いた強調処理については後述する。
【0034】
S47において、拡大画像ブロック生成部13の第1生成部21は、画像ブロック特徴量算出部12で推定された前記注目領域のエッジ方向θと、選択された前記エッジパターンおよびS46において算出された注目領域および周辺領域の強調された画素値を用いて、注目領域に対する拡大画像ブロックを生成する。
【0035】
このようにして、S43において注目領域のエッジ強度Gが大きい場合に、そのようなエッジ部分あるいは変化が大きいという特徴を保存するような拡大画像ブロックが生成される。これによって、エッジ部分などについてボケやジャギーの少ない高画質の拡大画像ブロックの生成を行うことができる。
【0036】
一方、S48において、拡大画像ブロック生成部13の第2生成部22は、S43で画像ブロック特徴量算出部12において閾値Thよりエッジ強度Gが小さいと判断された注目領域に対する拡大画像ブロックを生成する。第2生成部22における拡大画像ブロック生成処理は、S44〜S47における拡大画像ブロックの生成処理とは異なり、例えば最近傍補間などの処理負荷の小さい拡大処理でよい。すなわち、エッジ強度Gが小さい場合には、上述のような複雑で処理時間を要する処理を行わなくても、もっと処理負荷の小さい拡大画像ブロックの生成処理でも十分な画質を得ることが可能である。従って、エッジ強度Gが小さい場合には拡大画像ブロック生成部13の第2生成部22を選択して処理負荷の小さい拡大画像ブロックの生成処理を行い、全体としての処理時間の短縮を図っている。
【0037】
S49において、画像ブロック配置部14は、拡大画像ブロック生成部13で生成された前記注目領域に対する拡大画像ブロック(S44〜S47の処理で生成された拡大画像ブロック及びS48の処理で生成された拡大画像ブロック)を、後述する所定の方法で順次配置し、配置を終えた画像ブロックを出力すべき拡大画像データの一部として画像データ格納部2に格納する。
【0038】
S50において、入力画像データに対して出力すべき拡大画像データの生成が完了したかを判断し、完了していない場合は、S41に処理を戻し、次の画像ブロックを切り出し、上述の処理を繰り返す。完了した場合は、拡大画像データを出力して拡大処理を終了する。
【0039】
以上、本発明の画像処理装置及び画像処理方法の実施の一形態における動作の一例について説明した。次に、主要部である画像ブロック特徴量算出部12、拡大画像ブロック生成部13および画像ブロック配置部15の詳細について説明する。
【0040】
まず、画像ブロック特徴量算出部12の詳細について説明する。ここでも上述の図3に示したように、注目領域を2×2画素サイズブロック、注目領域を含む周辺領域を4×4画素サイズブロックとする。図4は、画像ブロック特徴量算出部12の一構成例を示すブロック図である。図中、31はエッジ強度算出部、32はエッジ方向推定部、33はエッジパターン選択部である。図4に示した例では、画像ブロック特徴量算出部12は、エッジ強度算出部31、エッジ方向推定部32、エッジパターン選択部33を有している。
【0041】
エッジ強度算出部31は、上述したように、画像ブロック設定部11で切り出された画像ブロック中の注目領域のエッジ強度Gを上記の式(1)で算出し、算出されたエッジ強度Gと所定の閾値Thとの比較を行い、注目領域の拡大処理手法を選択する。なお、注目領域のエッジ強度Gが閾値Thよりも小さい場合は、エッジ方向推定部32及びエッジパターン選択部33における処理を行わずに、拡大画像ブロック生成部13の第2生成部22における拡大処理が行われる。
【0042】
以下にエッジ方向推定部32およびエッジパターン選択部33の処理の詳細を説明する。図5は、注目領域および周辺領域の具体例と注目領域のエッジ方向の一例の説明図である。図5(A)は注目領域および周辺領域の一例を示している。各矩形がそれぞれ画素であり、各数字はそれぞれの画素値を示している。注目領域は太線枠で囲まれた画素{a,b,c,d}={15,104,86,203}である。この図5に示す例を用いて、エッジ方向推定部32におけるエッジ方向推定処理の流れについて説明する。
【0043】
図6は、エッジ方向推定部32におけるエッジ方向推定処理の一例を示すフローチャートである。S61において、図5(A)中の太線枠で囲まれた注目領域のエッジ角度Θを、上述した式(3)で計算する。例えば具体的に図5(A)に示すような注目領域{a,b,c,d}={15,104,86,203}の場合、gx、gyはそれぞれ式(1)よりgx=−103、gy=−85となる。従って、図5(A)に示す注目領域におけるエッジ角度ΘはΘ=−140.5°となる。このエッジ角度Θの方向を図5(B)においては破線の矢線によって示している。
【0044】
さらに図5(B)に示すように角度方向を設定し、得られたエッジ角度Θを22.5°(8方向)の角度範囲のいずれに含まれるかを調べる。この場合、エッジ角度Θが0°あるいは±180°を方向0、22.5°あるいは−157.5°の方向を方向1、45°あるいは−135°の方向を方向2、67.5°あるいは−112.5°の方向を方向3、90°あるいは−90°の方向を方向4、112.5°あるいは−67.5°の方向を方向5、135°あるいは−45°の方向を方向6、157.5°あるいは−22.5°の方向を方向7とし、これらの角度の±11.25°の範囲をそれぞれの方向であるものとしている。上述の具体例におけるエッジ角度Θ(=−140.5°)は−135°±11.25°の範囲内に含まれるので、エッジ角度は方向2となる。
【0045】
S61では、さらに後述するS66における注目領域のエッジ方向推定に用いるエッジ角度の参照数をカウントするための変数である角度参照数を1にセットする。
【0046】
S62において、S61で計算された注目領域のエッジ角度Θに応じて、図5(A)に示した周辺領域(太線枠外の領域)中からエッジ方向の推定に用いる参照領域を選択する。図7は、エッジ方向の推定に用いる参照領域の一例の説明図である。図中の太線枠で示した2×2画素が参照領域である。図7(A)はS61で求めたエッジ角度の方向が0の場合を示し、図7(B)は方向が4の場合、図7(C)はそれ以外の方向の場合を示している。なお、図7(A)及び(B)に示す方向0及び方向4の場合の参照領域の数は2であり、図7(C)に示す方向0,4以外の方向の場合の参照領域の数は4である。図5に示した具体例では、エッジ角度の方向は方向2であるので、図7(C)に示した4つの参照領域が選択の候補となる。なお、参照領域の選択は図7に示したものに限定されるわけではなく、例えば図7(C)の場合などは、参照領域数を8としたり、それぞれの方向に応じた参照領域を設定してもよい。
【0047】
S63において、S62で選択された参照領域の1つに対して、S61と同様に式(3)に従って、エッジ角度Θを計算する。S64において、S63で計算された参照領域のエッジ角度と、S61で計算された注目領域のエッジ角度とを比較する。両エッジ角度の差が予め設定されている閾値Θthよりも小さい場合には、S65において角度参照数を1増やし、S66に処理を移す。両エッジ方向の差が予め設定されている閾値Θthよりも大きい場合には、エッジ方向推定には適さない参照領域と判断し、そのままS66に処理を移す。S66において、全ての選択可能な参照領域のエッジ角度計算が終了したか否かを判断する。終了していればS67に処理を移し、まだ終了していない参照領域がある場合には、S63からS65の処理を繰り返す。
【0048】
図5に示した具体例では、上部の参照領域{86,203,171,211}からエッジ角度ΘU=−149.4°、左部の参照領域{10,15,20,86}からエッジ角度ΘL=−131.2°、下部の参照領域{1,102,15,104}からエッジ角度ΘD=−175.2°、右部の参照領域{104,215,203,219}からエッジ角度ΘR=−141.0°となる。注目領域のエッジ角度Θ=−140.5°とそれぞれの参照領域のエッジ角度が比較され、その差が閾値Θthより小さい参照領域の数が角度参照数としてカウントされる。
【0049】
S67において、注目領域のエッジ角度と、S64においてエッジ方向推定に適したと判断された参照領域のエッジ角度との総和を計算し、前記エッジ角度の総和を角度参照数で割った平均エッジ角度を注目領域の推定エッジ方向とする。図8は、図5に示した注目領域における推定エッジ方向の一例の説明図である。例えば上述の具体例において、すべての参照領域について注目領域のエッジ角度との差が閾値Θthより小さいとすれば、注目領域及び4つの参照領域から求められたエッジ角度の総和は−737.3°となり、角度参照数5で割ることによって平均エッジ角度は−147.5°と求めることができる。この場合も上述の注目領域のエッジ方向と同様に、例えば8方向のいずれかに正規化するとすれば、−147.5°は方向1となる。これを推定エッジ方向とする。
【0050】
なお上述の説明では、入力画像データがグレースケール画像である場合について説明を行っているが、勿論これに限定されるわけではない。例えばRGB色空間のカラー画像の場合には、先に図2のフローチャートのS32でも説明したように、各々の色成分のデータにおけるエッジ角度Gr、Gg、Gbの強さにより選択された色空間データで上記の処理を行えばよい。このようにすることで、カラー画像における拡大画像データのエッジ部の色ずれなど、画質低下を抑えることが可能となる。
【0051】
また、上述の説明では注目領域および参照領域における式(1)を用いたエッジ角度計算後に8方向のいずれかに正規化したが、勿論これに限定されるわけではなく、さらに精度の高いエッジ方向が必要であれば12方向(15.0°ごと)、16方向(12.25°ごと)など、さらに多数の方向に正規化しても良い。
【0052】
次に、エッジパターン選択部33の動作の詳細について説明する。図9は、エッジパターンテーブルの一例の説明図である。エッジパターン選択部33は、例えば図9に示すようなエッジパターンテーブルを用いて、エッジパターンの変換を行う。図9に示したように、エッジパターンテーブルには注目領域のパターンサイズに対応する第1エッジパターンがそれぞれのエッジ方向(ここでは8方向)ごとに1ないし数パターンが登録されており、それぞれのパターンに対応して、第1エッジパターンのパターンサイズよりも大きなパターンサイズのパターンが第2エッジパターンとして登録されている。
【0053】
エッジパターン選択部33では、例えば図9に示すようなエッジパターンテーブルを用いて、エッジ方向推定部32で推定された注目領域のエッジ方向に相当する第1エッジパターンを選択し、選択された第1エッジパターンに対応する第2エッジパターンを決定する。
【0054】
具体的に図5(A)に示す太線枠で囲まれた注目領域およびその周辺領域の場合、注目領域に対する推定エッジ方向は、エッジ方向推定部11によって、上述のようにすべての参照領域について注目領域のエッジ角度との差が閾値Θthより小さいとした場合には方向1であると求められている。注目領域の推定エッジ方向(方向1)に従い、図9に示すエッジパターンテーブル内から注目領域のエッジパターンに相当するパターン候補が選択される。この場合、方向1の第1エッジパターンであるパターン0からパターン3の4つのパターンが選択され、図5(A)に示す注目領域に対する第1エッジパターンの候補となる。
【0055】
次に、エッジパターン選択部33では、以下に説明するように、パターン0からパターン3のいずれか1つを注目領域に対する第1エッジパターンとして選択する。図10は、図5に示す注目領域に対応する第1エッジパターンの選択方法の具体例の説明図である。この具体例では、推定エッジ方向が方向1であったことにより、図5に示した注目領域に対するエッジパターンとして、図9に示すエッジパターンテーブルから第1エッジパターン中の4つのエッジパターンの候補が選択された。選択されたエッジパターンの候補を図10(A)として示している。
【0056】
このようなエッジパターンの候補のそれぞれについて、図10(B)に示すようにビットパターン化する。ここでは白部分を0、それ以外を1としてビットパターン化している。ただし、図9に示すエッジパターンテーブルを予めビットテーブル化して登録しておいても良く、その場合は、このビットパターン化の処理は省略できる。
【0057】
次に式(4)に従い、注目領域中の平均画素値を計算し、注目領域内の各々の画素値から平均値を引き、その符号を以て注目領域の画素値パターンとする。
Mean=(a+b+c+d)/4
a_sign=a−Mean
b_sign=b−Mean
c_sign=c−Mean
d_sign=d−Mean ・・(4)
図5(A)に示す例の場合ではMean=(15+104+86+203)/4=102であり、a_sign=−87、b_sign=2、c_sign=−16、d_sign=101であり、その符号を画素値パターンとすると図10(C)に示すようになる。さらに画素値パターンを図10(D)に示すようにビットパターン化する。
【0058】
次に、図10(B)に示した各エッジパターン候補のビットパターンと、図10(D)に示した注目領域のビットパターンとのパターンマッチングを行い、注目領域に対する第1エッジパターン中のエッジパターンを1つ選択する。この場合はパターン2が注目領域に対する第1エッジパターンとして選択される(図10(E))。
【0059】
最後に、第1エッジパターンが選択されると、それに1対1に対応するように予め用意された第2エッジパターンを決定する。この場合は図9に示したエッジパターンテーブルから、第1エッジパターンにおける方向1のパターン2に対応する第2エッジパターン(方向1、パターン2)が選択される(図10(F))。第2エッジパターンは、後述する拡大画像ブロック生成部2における注目領域に対する拡大画像ブロック生成の際に使用される。
【0060】
なお、第1および第2エッジパターンは図9に示したものに限定されるわけではなく、例えば、入力画像データの種類に応じて図9とは異なったエッジパターンを用いてもよく、また各角度における第1および第2エッジパターン候補数を増減させてもよい。もちろん、テーブルとして構成する必要もなく、特定された第1エッジパターンから第2エッジパターンが導出できればよい。
【0061】
次に拡大画像ブロック生成部13について詳細に説明する。最初に、拡大画像ブロック生成部13の第1生成部21における拡大画像領域の生成処理の詳細について説明する。拡大画像ブロック生成部13の第1生成部21では、まず、画像ブロック設定部11で設定された拡大倍率に応じたサイズおよび要素の強調カーネルを用いて、上述の図3に示したような画像ブロック設定部11で切り出された画像ブロック中の注目領域およびその周辺領域の画像データのコントラストを強調する。
【0062】
図11は、拡大画像ブロック生成部13の第1生成部21で用いる強調カーネルの具体例の説明図である。また図12は、図11に示す強調カーネルで画素Pを強調する場合の説明図である。図11(A)に示す強調カーネル(カーネル0)は倍率が2倍の時に、図11(B)に示す強調カーネル(カーネル1)は倍率が4倍の時に、図11(C)に示す強調カーネル(カーネル2)は倍率が8倍の時に、それぞれ用いるものである。図中、中心の画素値とその画素の上下左右に配置されたハッチングを施した画素を使用し、下部に記載した重みを用いて強調処理を行うことを示している。
【0063】
拡大処理を行う場合、4倍、8倍の処理を行うと、原画像の特徴を有している画素は2画素、4画像離れた位置の画素となる。そのため、図11に示すように倍率が高いほど離れた画素を選択して強調処理に用いている。もちろん、16倍以降の倍率においても同様である。また、参照する画素の位置は、図11に示すような上下左右に限られたものではない。例えば、斜め方向の画素を含めたり、さらに離れた画素をも参照するように構成したり、入力画像データの種類およびサイズなどにより用いるカーネルを変更するなど、カーネルの要素(参照する画素)および要素間の距離が図11に示した強調カーネルと異なったものを用いてもよい。
【0064】
例えば図11(A)に示すような強調カーネルを用いる場合、図12(A)に示すように、例えば中心の参照画素Pの強調処理を行う場合には、その上下左右に存在する画素a,b,c,dを参照し、また重みとして中心の注目画素については1.6を、周辺の参照画素に対しては0.15をそれぞれ用いる。これらにより、画素Pの画素値P’は次の式(5)に従って計算することができる。
注目画素値P’=1.60×P‐0.15×(a+b+c+d)・・(5)
【0065】
なお、例えば図11(B)に示すような強調カーネルを用いる場合にも、同様に図12(B)に示すように参照画素Pの強調処理を行う場合には、その上下左右に1画素おいて存在する画素a,b,c,dを参照し、また重みとして中心の注目画素については1.2を、周辺の参照画素に対しては0.05をそれぞれ用いて式(5)と同様にして画素Pの画素値P’を計算すればよい。
【0066】
図13は、入力画像データを8倍拡大する場合の強調カーネルによるコントラスト強調処理の説明図である。後述するように第1生成部21による拡大処理の手法は2倍ごとに行うため、8倍の拡大を行う場合には、まず2倍の拡大を行い、2倍に拡大された画像データに対してさらに2倍の拡大を行って4倍に拡大された画像データを生成し、さらにその4倍に拡大された画像データに対して2倍の拡大を行って、最終的に8倍に拡大された画像データを得る。上述の強調カーネルによる強調処理は、それぞれの2倍拡大の前に行う。
【0067】
すなわち、図13(A)に示す入力画像データを2倍拡大する場合に、図11(A)に示すカーネル0を用いて入力画像データのコントラスト強調を行い、後述する処理によって2倍に拡大して図13(B)に示す2倍拡大データを生成する。次に、図13(B)に示す2倍拡大された画像データを2倍拡大する場合に、2倍拡大画像データに対して図11(B)に示すカーネル1を用いてコントラスト強調を行い、その後2倍に拡大して図13(C)に示す4倍拡大データを生成する。さらに、図13(C)に示す4倍拡大データに対して図11(C)に示すカーネル2を用いてコントラスト強調を行い、その後2倍に拡大して図13(D)に示す8倍拡大データを生成する。図11に示した強調カーネルは、このようにして用いられ、それぞれの拡大の段階でのデータに対して強調処理を施す。
【0068】
次に拡大画像ブロック生成部13の第1生成部21は、実際に拡大画像ブロックを生成する。この拡大画像ブロックの生成処理の詳細について説明する。拡大画像ブロック生成部13の第1生成部21では、画像ブロック特徴量算出部12のエッジパターン選択部33で得られた第2エッジパターンと、上述の画像強調処理においてコントラスト強調された画素値を用いて、注目領域に対する拡大画像ブロックを生成する。
【0069】
図14は、拡大画像ブロック生成部13の第1生成部21における拡大画像ブロック生成処理の一例を示すフローチャートである。S71において、画像強調処理によりコントラスト強調された注目領域、および、画像ブロック特徴量算出部12のエッジパターン選択部33で選択された第2エッジパターンを用いて、まず3×3画素の拡大画像ブロックを生成する。図15は、3×3画素の拡大画像ブロックの生成処理の具体例の説明図である。図15(A)には図5(A)に示した注目領域及び周辺領域の一例を示している。また、この注目領域に対応して、例えば図10において説明したようにして求められた第2エッジパターン(図9における方向1のパターン2)を図15(B)に示している。図15(B)においては、それぞれの画素をp0〜p8としている。図15(A)に示した注目領域{a,b,c,d}をもとに、画素p0〜p8の画素値を次の式によって計算する。
p0=a
p1=(a+c)/2
p2=b
p3=(a+c)/2
p4=(b+c)/2
p5=(b+d)/2
p6=c
p7=(b+d)/2
p8=d
このような計算を行うことによって、図15(C)に示すように3×3画素の拡大画像ブロックを生成することができる。
【0070】
図16は、第2エッジパターンと3×3画素の拡大画像ブロックを生成する際に用いる計算式の一例の説明図である。上述のように図15(B)に示したような第2エッジパターンが選択されている場合には、上述の式によって3×3画素の拡大画像ブロックを生成することができるが、この時用いる計算式は、選択された第2エッジパターン毎に決まっている。図16(A)に示した第2エッジパターンは図9に示す方向1のパターン0であり、
p0=a
p2=b
p3=(a+c)/2
p4=(b+c)/2
p5=(b+d)/2
p6=c
p7=(c+d)/2
p8=d
p1=2×p4−p7
によって3×3画素の拡大画像ブロックを生成することができる。
【0071】
図16(B)に示した第2エッジパターンは図9に示す方向5のパターン1であり、この場合は
p0=a
p1=(a+c)/2
p2=b
p3=(c+d)/2
p4=(a+d)/2
p5=(a+b)/2
p6=c
p7=(c+d)/2
p8=d
によって3×3画素の拡大画像ブロックを生成することができる。
【0072】
図16(C)に示した第2エッジパターンは図9に示す方向2のパターン0であり、この場合は
p0=a
p1=a
p2=b
p3=a
p4=(b+c)/2
p5=(b+d)/2
p6=c
p7=(c+d)/2
p8=d
によって3×3画素の拡大画像ブロックを生成することができる。
【0073】
図16(D)に示した第2エッジパターンは図9に示す方向0のパターン0であり、この場合は
p0=a
p1=(a+b)/2
p2=b
p3=(a+c)/2
p5=(b+d)/2
p6=c
p7=(c+d)/2
p8=d
p4=(p1+p7)/2
によって3×3画素の拡大画像ブロックを生成することができる。なお、他の第2エッジパターンの場合にも、同様にそれぞれの第2エッジパターンに対応した計算式に従って計算を行うことによって、3×3画素の拡大画像ブロックを生成することができる。
【0074】
図14に戻り、S72において、画像ブロック特徴量算出部12のエッジ方向推定部32で推定された注目領域の推定エッジ方向を判断し、推定エッジ方向が方向1〜方向3および方向5〜方向7の場合はS73に、推定エッジ方向が方向0および方向4(すなわちエッジ方向が垂直あるいは水平方向)の場合はS74に処理を移す。
【0075】
S73において、注目領域の推定エッジ方向が方向1〜方向3および方向5〜方向7の場合、すなわちエッジ方向が垂直あるいは水平方向以外の場合に、S71で生成された3×3画素の拡大画像ブロックから4×4画素の拡大画像ブロックを生成する。ここでは、3×3画素の拡大画像ブロックと、コントラスト強調された注目領域及びその周辺領域から、まず3×4画素の拡大画像ブロックを生成し、その後、生成した3×4画素の拡大画像ブロックとコントラスト強調された注目領域及びその周辺領域から4×4画素の拡大画像ブロックを生成する。
【0076】
図17は、3×4画素の拡大画像ブロックの生成処理の具体例の説明図である。図17(A)には一例として図5(A)に示した注目領域及び周辺領域の例を示している。また、図17(B)におけるp0〜p8は、図15(C)に示した3×3画素の拡大画像ブロックを中央部に示している。
【0077】
まず図17(B)の中央部に示す3×3画素の拡大画像ブロックとともに、図17(A)において太線枠で示した、コントラスト強調された周辺領域中の参照画素(r0〜r5)を用いて、図17(C)に示す3×4画素の拡大画像ブロック(q0〜q11)を生成する。3×4画素の拡大画像ブロックの各画素値q0〜q11は、次のような計算式により決定される。
q0=0.2×r0+0.8×p0
q1=0.4×p0+0.6×p1
q2=0.6×p1+0.4×p2
q3=0.8×p2+0.2×r1
q4=0.2×r2+0.8×p3
q5=0.4×p3+0.6×p4
q6=0.6×p4+0.4×p5
q7=0.8×p5+0.2×r3
q8=0.2×r4+0.8×p6
q9=0.4×p6+0.6×p7
q10=0.6×p7+0.4×p8
q11=0.8×p8+0.2×r5
【0078】
図18は、推定エッジ方向による参照画素の選択方法の説明図である。図17に示した例では、図5(A)に示した注目領域及び周辺領域から画像ブロック特徴量算出部12で求めた推定エッジ方向が方向1であった場合を想定して、参照画素の位置を図17(A)に太線枠で囲んだように左上から下へ3画素と右下から上へ3画素とした。この参照画素の例を図18(A)に示しているが、このような位置の画素を参照画素とするのは、注目領域の推定エッジ方向が方向1(22.5°)から方向3(67.5°)の場合である。注目領域の推定エッジ方向が方向5(112.5°)から方向7(157.5°)の場合には、図18(B)に太線枠で囲んで示すように、左下から上へ3画素と右上から下へ3画素とするとよい。このように、注目領域における推定エッジ方向に従って、参照画素を選択する。もちろん、参照画素の選択は図18に示すように2パターンからの選択に限定されるわけではなく、推定エッジ方向に従い、より多くの参照画素選択パターンを用意してもよい。また、選択する参照画素についても、推定エッジ方向によって変更してもよい。
【0079】
図19は、4×4画素の拡大画像ブロックの生成処理の具体例の説明図である。上述のようにして生成された3×4画素の拡大画像ブロック、および、コントラスト強調された周辺領域中の参照画素(r0〜r7)を用いて、4×4画素の拡大画像ブロックを生成する。コントラスト強調された注目領域及び参照領域を図19(A)に示し、生成された3×4画素の拡大画像ブロックを図19(B)の中央部に示している。ここでは参照画素r0〜r7として、図19(A)において太線枠で示したように、コントラスト強調された参照領域の下部4画素と上部4画素を用いる。そして、次のような計算式に従って、図19(C)に示す4×4画素の拡大画像ブロック(s0〜s15)を生成する。
s0=0.2×r0+0.8×q0
s1=0.2×r1+0.8×q1
s2=0.2×r2+0.8×q2
s3=0.2×r3+0.8×q3
s4=0.4×q0+0.6×q4
s5=0.4×q1+0.6×q5
s6=0.4×q2+0.6×q6
s7=0.4×q3+0.6×q7
s8=0.6×q4+0.4×q8
s9=0.6×q5+0.4×q9
s10=0.6×q6+0.4×q10
s11=0.6×q7+0.4×q11
s12=0.8×q8+0.2×r4
s13=0.8×q9+0.2×r5
s14=0.8×q10+0.2×r6
s15=0.8×q11+0.2×r7
【0080】
なお、上記で説明した図14のS73における4×4画素の拡大画像ブロックの生成処理において、ここでは3×3画素ブロック→3×4画素ブロック→4×4画素ブロックという処理の流れによって拡大処理を行う例を示したが、3×3画素ブロック→4×3画素ブロック→4×4画素ブロックの処理の流れでもよいし、3×3画素ブロックから4×4画素ブロックを生成してもよい。もちろん、これらの場合の参照画素の選択は適宜変更されることになる。
【0081】
図14に戻り、S74では、注目領域の推定エッジ方向が方向0および方向4の場合(すなわち垂直方向あるいは水平方向の場合)に、S71で生成された3×3画素の拡大画像ブロックから4×4画素の拡大画像ブロックを生成する。図20は、推定エッジ方向が方向0および方向4の場合における4×4画素の拡大画像ブロックの生成処理の一例の説明図である。注目領域の推定エッジ方向が方向0および方向4の場合は、図20(A)に示すコントラスト強調された周辺領域中の画素(A,B,C,D)を用い、図20(B)において左右に示す参照画素r0〜r5を次のような式を用いて算出する。
r0=A
r1=B
r2=0.5×A+0.5×C
r3=0.5×B+0.5×D
r4=C
r5=D
なお、図20(B)の中央部には、図14のS71で生成された3×3画素の拡大画像ブロックp0〜p8を示している。
【0082】
このようにして3×3画素の拡大画像ブロックと、参照画素r0〜r5が得られたら、これらを用いて上述の図17で説明した計算方法によって3×4画素の拡大画像ブロックq0〜q11を生成する。これを図20(C)に示している。さらに、このようにして生成した3×4画素の拡大画像ブロックq0〜q11と、図20(A)に示すコントラスト強調された周辺領域の上下4画素ずつを参照画素とし、上述の図19に示した計算方法によって図20(D)に示す4×4画素の拡大画像ブロック(s0〜s15)を生成する。
【0083】
以上のように、図14に示したS71からS74の処理を行うことにより、画像ブロック特徴量算出部12において閾値Thよりエッジ強度Gが大きいと判断された注目領域に対する4×4画素の拡大画像ブロック(例えば図19(C)または図20(D)に示すs0〜s15)が生成される。
【0084】
次に、画像ブロック特徴量算出部12において閾値Thよりエッジ強度Gが小さいと判断された注目領域に対しては、拡大画像ブロック生成部13の第2生成部22において、上述したような注目領域の画像特徴を保存する拡大画像ブロック生成部13の第1生成部21における拡大処理ではなく、処理負荷を軽減した、より簡便な拡大画像ブロックの生成処理を行う。例えばその一例として、2×2画素の注目領域から最近傍補間により4×4画素の拡大画像ブロックを生成することができる。もちろん、この第2生成部22において用いる拡大手法は任意であり、第1生成部21よりも処理負荷の軽い手法であればどのような手法を用いてもよい。
【0085】
以上説明したように、画像ブロック特徴量算出部12で算出された画像特徴量に従って、拡大画像ブロック生成部13において行う拡大処理を選択することにより、入力画像データを高画質に拡大でき、さらには処理負荷も削減することが可能となる。具体的には、第2生成部22において第1生成部21よりも処理負荷の軽い拡大手法を用いることによって、拡大処理全体の処理負荷を軽減し、処理時間を短縮して高速な拡大処理を実現することができる。なお、ここでは拡大画像ブロック生成部13が2つの拡大手法を有しているものとし、いずれかを選択的に用いることとしたが、さらに複数の拡大手法を設けておき、画像ブロック特徴量算出部12で算出された種々の画像特徴量に従って複数の拡大手法の中からいずれかを選択して拡大処理を行うように構成することもできる。
【0086】
次に、画像ブロック配置部14について説明する。画像ブロック配置部14では、拡大画像ブロック生成部13で生成された注目領域に対する拡大画像ブロックを所定の方法により順次配置する。図21は、拡大画像ブロック生成部13で生成された4×4画素の拡大画像ブロックを配置する具体例の説明図である。図21に示す例では、順次生成された拡大画像ブロック0および拡大画像ブロック1をオーバーラップさせるように配置している。オーバーラップする画素は各々前画素値との平均をとるようにして配置する。または、オーバーラップする画素の総和を計算し、前記画素値の総和をオーバーラップした数で割ることにより各画素値を算出するようにしてもよい。この場合、注目画素は例えば1画素づつずらしながら選択し、拡大処理を行ってゆくことになる。あるいは、オーバーラップさせずに並べてゆくこともできる。この場合、注目領域を重ならないように選択してゆけばよい。
【0087】
なお、4×4画素の拡大画像ブロックは、拡大画像ブロック生成部13中の第1生成部21と第2生成部22のいずれかで生成されるため、拡大方式の違いによる画質劣化が懸念されるが、上述のようにオーバーラップさせて平均化することによって、そのような画質劣化の発生を抑えることができる。
【0088】
図22は、本発明の画像処理装置及び画像処理方法の第2の実施の形態を示すブロック図である。図中、図1と同様の部分には同じ符号を付し、重複する説明を省略する。13’は拡大画像ブロック生成部、14’は画像ブロック配置部、15は拡大画像生成部である。この第2の実施の形態においては、画像処理部1は、画像ブロック設定部11、画像ブロック特徴量算出部12、拡大画像ブロック生成部13’、画像ブロック配置部14’とともに、拡大画像生成部15を含んで構成されている。なお、画像ブロック設定部11及び画像ブロック特徴量算出部12は、上述の第1の実施の形態における機能と同様である。また、拡大画像ブロック生成部13’及び画像ブロック配置部14’は、上述の第1の実施の形態における拡大画像ブロック生成部13及び画像ブロック配置部14に対応する構成である。このうち、拡大画像ブロック生成部13’は、上述の第1の実施の形態における拡大画像ブロック生成部13の第1生成部21の機能と同様であり、ここでは説明を省略する。
【0089】
画像ブロック配置部14’は、画像ブロック特徴量算出部12において閾値Thよりエッジ強度Gが大きいと判断された注目領域に対し、拡大画像ブロック生成部13’で拡大処理された拡大画像ブロックを、後述する拡大画像生成部15から出力された拡大画像上の対応する位置に順次配置し、解像度変換または拡大された画像データを画像データ格納部2に出力する。拡大画像ブロックを拡大画像生成部15から出力された拡大画像上の対応する位置に順次配置する際には、拡大画像ブロックの各画素値で置き換えるように配置してもよいし、または拡大画像生成部15から出力された拡大画像の対応する位置の各画素値と重畳するように配置してもよい。なお、拡大画像ブロック同士はオーバーラップするように配置される場合、オーバーラップする画素の総和を計算し、画素値の総和をオーバーラップした数で割ることにより各画素値を算出する。
【0090】
拡大画像生成部15は、画像データ格納部2に記憶されている入力画像データを拡大し、画像ブロック配置部14’にその拡大画像を出力する。拡大画像生成部15における拡大処理は、拡大画像ブロック生成部13’における拡大処理とは異なり、より処理負荷の小さい拡大処理、例えば最近傍補間拡大や線形補間拡大処理などを行うことができる。さらに、画像ブロック毎の処理ではなく、入力画像単位あるいは入力画像数ライン単位で処理することができる。
【0091】
図23は、本発明の画像処理装置及び画像処理方法の第2の実施の形態における動作の一例を示すフローチャートである。なお、S81、S82、およびS84からS87までの処理は、図2に示した第1の実施の形態の処理の一例におけるS41、S42、およびS44からS47までの処理と同様なので説明を省略する。
【0092】
S83において、画像ブロック特徴量算出部12は、S82で算出した注目領域の特徴量を算出する。ここでは上述の例と同様にエッジ強度Gを算出し、所定の閾値Thとの比較を行うこととする。もちろん、この第2の実施の形態においても、画像ブロック特徴量算出部12で算出する特徴量はエッジ強度に限らないことは上述の第1の実施の形態と同様である。
【0093】
ここで閾値Thよりエッジ強度Gが大きい場合は、注目領域が入力画像中のエッジ部分あるいは変化の大きい部分であるので、そのような注目領域の画像特徴を保存する拡大処理をS84〜S87において行い、拡大画像ブロックを生成する。なお、上述のようにこのS84〜S87における拡大処理については説明を省略する。
【0094】
注目領域のエッジ強度Gが閾値Thよりも小さい場合は、S84〜S87の処理を行わず、処理をS81に移し、次の画像ブロックを設定する。すなわち当該注目領域については拡大画像ブロック生成部13’による拡大画像ブロックの生成を行わない。
【0095】
一方、このような処理と並行して、あるいは前後して、拡大画像生成部15による拡大画像の生成処理が行われる。すなわちS88において、拡大画像生成部15は、画像データ格納部2に記憶されている入力画像データを画像毎または数ライン毎に入力し、最近傍補間拡大処理を行い、画像ブロック配置部14’に出力する。もちろんS88で行う拡大処理は、最近傍補間拡大処理に限ったものではなく、拡大画像ブロック生成部13’における拡大手法よりも処理負荷の軽い種々の手法、例えば線形補間拡大処理などを、処理速度要求や出力画像データに要求される画質などを勘案して適用することもできる。
【0096】
S89において、画像ブロック配置部14’は、拡大画像ブロック生成部13’で生成された注目領域に対する拡大画像ブロックを、拡大画像生成部15で生成した拡大画像上の対応する位置に順次配置する。拡大画像ブロックがオーバーラップして配置される場合には、上述のような平均化の処理を行う。これらの処理をすべて終えた拡大画像ブロックあるいはライン単位の拡大画像は、画像データ格納部2に出力され、格納される。
【0097】
S90において、入力画像データに対して出力すべき拡大画像データの生成が完了したか否かを判断し、完了していない場合はS81に処理を戻し、次の画像ブロックを切り出して上述のS81からS90までの処理を繰り返す。完了した場合は、拡大画像データを所定の出力先に出力して拡大処理を終了する。
【0098】
このような処理によって、入力画像データは処理負荷の軽い拡大手法によって拡大画像生成部15により高速に拡大処理が施される。しかしこのままではエッジ部などにボケやジャギーなどが発生することがある。これに対して本発明の第2の実施の形態では、エッジ部分あるいは変化の大きい部分については部分的に拡大画像ブロック生成部13’によって画像特徴を保存する拡大処理を行うことによって、高画質の拡大画像を得ている。従って、全体として高速であるとともに高画質の拡大画像を得ることが可能となる。
【0099】
図24は、本発明の画像処理装置の機能または画像処理方法をコンピュータプログラムで実現した場合におけるコンピュータプログラム及びそのコンピュータプログラムを格納した記憶媒体の一例の説明図である。図中、101はプログラム、102はコンピュータ、111は光磁気ディスク、112は光ディスク、113は磁気ディスク、114はメモリ、121は光磁気ディスク装置、122は光ディスク装置、123は磁気ディスク装置である。
【0100】
上述の本発明の各実施の形態で説明した画像処理部1の機能は、コンピュータにより実行可能なプログラム101によっても実現することが可能である。その場合、そのプログラム101およびそのプログラムが用いるデータなどは、コンピュータが読み取り可能な記憶媒体に記憶することも可能である。記憶媒体とは、コンピュータのハードウェア資源に備えられている読取装置に対して、プログラムの記述内容に応じて、磁気、光、電気等のエネルギーの変化状態を引き起こして、それに対応する信号の形式で、読取装置にプログラムの記述内容を伝達できるものである。例えば、光磁気ディスク111,光ディスク112(CDやDVDなどを含む)、磁気ディスク113,メモリ114(ICカード、メモリカードなどを含む)等である。もちろんこれらの記憶媒体は、可搬型に限られるものではない。
【0101】
これらの記憶媒体にプログラム101を格納しておき、例えばコンピュータ102の光磁気ディスク装置121,光ディスク装置122,磁気ディスク装置123,あるいは図示しないメモリスロットにこれらの記憶媒体を装着することによって、コンピュータからプログラム101を読み出し、本発明の画像処理装置の機能または画像処理方法を実行することができる。あるいは、予め記憶媒体をコンピュータ102に装着しておき、例えばネットワークなどを介してプログラム101をコンピュータ102に転送し、記憶媒体にプログラム101を格納して実行させてもよい。なお、画像データ格納部2は、コンピュータ102内のメモリあるいは付属の磁気ディスク装置やその他の記憶媒体を適用することができる。もちろん、本発明の一部の機能についてハードウェアによって構成することもできるし、あるいは、すべてをハードウェアで構成してもよい。
【0102】
【発明の効果】
以上の説明から明らかなように、本発明によれば、注目画素を含む所定の大きさの画像領域の特徴量を算出し、算出された特徴量に従って注目画素を含む所定の大きさの画像領域を拡大する複数の拡大手法を切り替えて拡大画像領域を生成し、得られた拡大画像領域を所定の方法で配置して、拡大された出力画像を生成している。このような拡大処理によって、例えば、入力画像中の特徴的な部分に関しては、その特徴量を保存する拡大手法を適用し、入力画像中の平坦な部分(空や肌などの画像部分)などの特徴的でない部分に関しては処理負荷の小さい拡大手法を適用することによって、特徴的部分のボケやジャギーの画質欠陥を抑制した高画質な拡大処理を行うとともに、処理負荷が小さく高速に拡大処理を行うことができる。
【0103】
さらに、注目画素を含む所定の大きさの画像領域の特徴量を算出し、算出された特徴量に従って、特定の注目画素を含む所定の大きさの画像領域を拡大して拡大画像領域を生成し、さらに入力画像を特徴量と関係なく、拡大画像領域の生成処理とは異なる拡大手法で拡大して拡大画像を生成し、拡大画像領域を拡大画像上の対応する位置に所定の方法で配置することにより、拡大された出力画像を生成することができる。このような拡大処理によって、処理負荷の重い画像領域毎の拡大処理を特徴的な部分だけに限定することができ、高画質な拡大画像が得られるとともに、処理負荷が小さく高速な拡大処理を実現することができるという効果がある。
【図面の簡単な説明】
【図1】本発明の画像処理装置及び画像処理方法の第1の実施の形態を示すブロック図である。
【図2】本発明の画像処理装置及び画像処理方法の実施の一形態における動作の一例を示すフローチャートである。
【図3】画像ブロック設定部11で設定及び切り出しを行う画像ブロックの説明図である。
【図4】画像ブロック特徴量算出部12の一構成例を示すブロック図である。
【図5】注目領域および周辺領域の具体例と注目領域のエッジ方向の一例の説明図である。
【図6】エッジ方向推定部32におけるエッジ方向推定処理の一例を示すフローチャートである。
【図7】エッジ方向の推定に用いる参照領域の一例の説明図である。
【図8】図5に示した注目領域における推定エッジ方向の一例の説明図である。
【図9】エッジパターンテーブルの一例の説明図である。
【図10】図5に示す注目領域に対応する第1エッジパターンの選択方法の具体例の説明図である。
【図11】拡大画像ブロック生成部13の第1生成部21で用いる強調カーネルの具体例の説明図である。
【図12】図11に示す強調カーネルで画素Pを強調する場合の説明図である。
【図13】入力画像データを8倍拡大する場合の強調カーネルによるコントラスト強調処理の説明図である。
【図14】拡大画像ブロック生成部13の第1生成部21における拡大画像ブロック生成処理の一例を示すフローチャートである。
【図15】3×3画素の拡大画像ブロックの生成処理の具体例の説明図である。
【図16】第2エッジパターンと3×3画素の拡大画像ブロックを生成する際に用いる計算式の一例の説明図である。
【図17】3×4画素の拡大画像ブロックの生成処理の具体例の説明図である。
【図18】推定エッジ方向による参照画素の選択方法の説明図である。
【図19】4×4画素の拡大画像ブロックの生成処理の具体例の説明図である。
【図20】推定エッジ方向が方向0および方向4の場合における4×4画素の拡大画像ブロックの生成処理の一例の説明図である。
【図21】拡大画像ブロック生成部13で生成された4×4画素の拡大画像ブロックを配置する具体例の説明図である。
【図22】本発明の画像処理装置及び画像処理方法の第2の実施の形態を示すブロック図である。
【図23】本発明の画像処理装置及び画像処理方法の第2の実施の形態における動作の一例を示すフローチャートである。
【図24】本発明の画像処理装置の機能または画像処理方法をコンピュータプログラムで実現した場合におけるコンピュータプログラム及びそのコンピュータプログラムを格納した記憶媒体の一例の説明図である。
【符号の説明】
1…画像処理部、2…画像データ格納部、11…画像ブロック設定部、12…画像ブロック特徴量算出部、13,13’…拡大画像ブロック生成部、14,14’…画像ブロック配置部、15…拡大画像生成部、21…第1生成部、22…第2生成部、31…エッジ強度算出部、32…エッジ方向推定部、33…エッジパターン選択部、101…プログラム、102…コンピュータ、111…光磁気ディスク、112…光ディスク、113…磁気ディスク、114…メモリ、121…光磁気ディスク装置、122…光ディスク装置、123…磁気ディスク装置。
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to an image processing technique for performing an enlargement process of an image represented by multi-gradation including color, and in particular, without causing an image quality defect such as blur or jaggy to an input image as much as possible. The present invention relates to an image processing technique for performing enlargement processing with high image quality and light processing load.
[0002]
[Prior art]
The image enlargement process is one of the basic processes for a system that performs editing, filing, display, printing, and the like of an image. In recent years, with the spread of image data on the Internet homepage and image data mainly for display at a display resolution such as digital video, low-resolution images are frequently printed with a high-resolution printer or the like. Has been done. At the time of printing by this printer, it is desired to obtain a high-quality output result, and the importance of high-quality enlargement processing is increasing.
[0003]
Existing representative methods for enlarging an image represented by multi-gradation including color (hereinafter referred to as a multi-valued image) include a nearest neighbor method, a linear interpolation method, a cubic convolution method, and the like. There is. The nearest neighbor method is a method of using the pixel value of a pixel having the closest distance when the pixel is inversely mapped on the original image as each pixel value after enlargement. This method can perform high-speed processing because the amount of calculation is small. However, since one pixel of the original image is directly enlarged to a rectangular shape, the degree of image quality degradation is small and hardly affected when the difference between the pixel values of adjacent pixels is small. The degree of image quality degradation is large, such as when jaggies at edges and edge portions are conspicuous or when the magnification is large, the image becomes mosaic.
[0004]
The linear interpolation method is a method of assuming that pixel values between pixels linearly change, and linearly interpolating pixel values of four pixels near a point at which an enlarged pixel is inversely mapped to obtain a pixel value. It is. In this method, although the processing is heavier than the nearest neighbor method, the amount of calculation is relatively small, and jaggies and the like hardly occur. On the other hand, there is a drawback that the entire image tends to be blurred around an edge portion that does not satisfy the assumption that it changes linearly.
[0005]
The cubic convolution method defines an interpolation function approximating a sinc function (sin (x) / x) based on the sampling theorem, and 16 pixels (X, Y directions) near a point where the enlarged pixel is inversely mapped. This is a method in which a pixel value after enlargement is obtained by a convolution operation of the above-mentioned approximate interpolation function (4 pixels each). This method has a relatively good image quality as compared with the above two methods, but has the disadvantage that the reference range is large and the amount of calculation is large. In addition, since the high range has a characteristic of being slightly emphasized, there is a disadvantage that a light jaggy occurs at an edge portion and a noise component is emphasized.
[0006]
As an attempt to solve these problems, for example, new systems such as Patent Literature 1, Patent Literature 2, Patent Literature 3, and Patent Literature 4 have been proposed. In the technique described in Patent Document 1, an original image is first binarized, and the direction of an oblique component included in the original image is determined from the binary image to coincide with a two-dimensional pattern (matrix data) prepared in advance. Then, an interpolation process is performed along the obtained oblique direction. The other parts are subjected to linear interpolation processing. However, since the direction of the oblique component is determined after binarizing the original image with a predetermined threshold value, it is effective for an edge having a large density difference, but it is effective for reproducing an edge having a small density difference. There's a problem.
[0007]
In the technique described in Patent Document 2, a pixel value of an arrangement file is determined based on a dot arrangement file (enlarged pattern file) for each integral magnification corresponding to a pattern file on a one-to-one basis and a pixel value at which position of a pixel block. An enlarged image block is generated based on such pixel reference information. Furthermore, when there is no matching pattern, an enlarged image block is simply generated using the target pixel of the current image block. However, in Patent Literature 2, since an enlarged block is uniquely generated only by pattern matching, the image quality of the enlarged image is determined by the number of pattern files and dot arrangement files. In other words, many pattern files are required in advance to improve the image quality. Therefore, it is not realistic to prepare many pattern files in advance.
[0008]
In the technique described in Patent Document 3, as a method of detecting the degree of change in the original image, edge detection is performed by an edge detection filter, and an edge pixel is defined based on the edge detection result. If it is determined that the pixel is an edge pixel, enlargement is performed by the M-cubic method in which the shape of the cubic function of the cubic convolution method is adjusted; otherwise, enlargement is performed by the nearest neighbor method. However, since the edge portion having a large degree of change is performed by the M-cubic method, there is a drawback that the image quality characteristics of the cubic convolution method are followed, and jaggies are generated and noise components are emphasized.
[0009]
In the technique described in Patent Document 4, the properties of an image are measured in advance by a density histogram for each block, and based on the result, a first interpolation (a pattern matching method or a nearest neighbor method (NN method)) and a second interpolation are performed. (Cubic convolution method or M-cubic method) is superimposed. In the pattern matching method, which is one of the first interpolation processes, when a pattern (binary pattern) generated from the current image block matches a predetermined angle pattern, a predetermined block is used using a reference block including the current image block. An interpolated pixel block for the target pixel is generated by a rule. However, also in Patent Document 4, there is a problem in that jaggies occur and noise components are emphasized because of superposition with the M-cubic method.
[0010]
In contrast to such a conventional enlargement method, there is a method described in Japanese Patent Application No. 2002-76896, for example, as an enlargement method with high image quality. This method detects an accurate edge direction and generates an enlarged image from a pixel value corresponding to the edge direction, without causing image quality defects such as blur and jaggy in the input image as much as possible. Enlargement processing can be performed. However, since processing takes time, it has been desired to reduce the processing load while maintaining high image quality and to reduce the processing time by high-speed processing.
[0011]
[Patent Document 1]
JP 2000-228723 A
[Patent Document 2]
JP 2001-188900 A
[Patent Document 3]
JP 2000-188681 A
[Patent Document 4]
JP-A-2002-165089
[0012]
[Problems to be solved by the invention]
The present invention has been made in consideration of the above-described problems of the related art, and has high image quality and a low processing load without causing image quality defects such as blurring and jaggy in an input image as much as possible. It is an object of the present invention to provide an image processing apparatus and an image processing method capable of performing light and high-speed enlargement processing. It is another object of the present invention to provide an image processing program for causing a computer to execute the functions or the image processing method of such an image processing device, and a computer-readable storage medium storing such an image processing program. Things.
[0013]
[Means for Solving the Problems]
According to the present invention, in an image processing apparatus and an image processing method for performing image enlargement processing, a plurality of enlargement methods for enlarging an image are prepared, and a feature amount of an image region of a predetermined size including a pixel of interest is prepared. An enlarged image area corresponding to the image area is generated by switching the plurality of enlargement methods provided in the enlarged image area generating means in accordance with the calculated characteristic amount, and calculating the obtained enlarged image area. An output image is generated by arranging the image by an image arranging means. As described above, since the enlargement method is switched for each image region of a predetermined size to be subjected to the enlargement process according to the feature amount of the image region, for example, an enlargement unit having a different processing load is selected according to the feature amount, and the feature is selected. High-quality enlargement processing is performed for image areas that affect image quality, such as edge parts, depending on the amount, and processing such as generating an enlarged image area using flattening means with a small processing load can be performed for flat areas. However, high-speed enlargement processing can be performed as a whole.
[0014]
As the feature amount calculated by the area feature amount calculating means, it is possible to calculate the degree of unevenness in the image region from each pixel value in the image region, or to calculate the change direction in the image region. For a color image, a feature amount is calculated for each color component in the color space, and data of one color component in the color space is selected based on the calculated one or more feature amounts, and the color is calculated. The feature amount of the image region in the component data can be used as the feature amount of the image region.
[0015]
As the enlarging means provided in the enlarged image area generating means, for example, an enlarging means for generating an enlarged image area using the characteristic amount of the image area, the characteristic amount of the neighboring area of the image area, and the pixel value in the neighboring area is used. The enlargement unit is selected for an image region in which the feature amount calculated by the region feature amount calculation unit satisfies a predetermined condition, for example, an image region that requires high-quality enlargement processing including an edge or the like. Enlargement processing can be performed.
[0016]
The arrangement of the enlarged image areas by the image arranging means is arranged so that they do not overlap each other, and the enlarged image areas are sequentially arranged so as to overlap, and for the overlapping pixels, the sum of the overlapping pixel values is calculated and the number of overlapping pixels is calculated. It can be configured to divide.
[0017]
Further, according to the present invention, in an image processing apparatus and an image processing method for performing an image enlargement process, a feature amount of an image region having a predetermined size including a pixel of interest is calculated by an area feature amount calculating unit, and the calculated feature amount is calculated. An enlarged image area corresponding to the image area that satisfies a predetermined condition is generated by an enlarged image area generation unit, and the input image is enlarged by an enlarged image generation unit using an enlargement method different from the enlargement method of the image area. Is generated, and the enlarged image area is arranged at a corresponding position on the enlarged image by the image arrangement means. In this way, as a whole, the enlargement processing is performed using the enlargement method with a light processing load by the enlarged image generation means, and only the portion important to the image quality such as the edge portion is enlarged by the enlarged image area generation means. Is generated and placed. As a result, the processing load can be reduced as compared with the case where the enlargement process is performed on the entire image using a high-quality enlargement method, and the enlargement process can be performed at high speed while maintaining high image quality.
[0018]
Also in the case of the present invention, as the feature amount calculated by the area feature amount calculating means, it is possible to calculate the degree of unevenness in the image region from each pixel value in the image region or calculate the change direction in the image region. . For a color image, a feature amount is calculated for each color component in the color space, and data of one color component in the color space is selected based on the calculated one or more feature amounts. The feature amount of the image region in the data of one color component can be used as the feature amount of the image region in all color components. The enlargement means provided in the enlarged image area generation means includes, for example, an enlargement means for generating an enlarged image area using the characteristic amount of the image area, the characteristic amount of the neighborhood area of the image area, and the pixel value in the neighborhood area. The enlargement unit is selected for an image region in which the feature amount calculated by the region feature amount calculation unit satisfies a predetermined condition, for example, an image region that requires high-quality enlargement processing including an edge or the like. To perform enlargement processing. The enlarged image generating means for performing the enlarging process of the entire image can be configured to generate an enlarged image for each input image or every several lines in the input image.
[0019]
The arrangement of the enlarged image area by the image arranging means is such that the enlarged image is rewritten, and the enlarged image area is sequentially arranged so as to overlap the enlarged image, and for the overlapping pixels, the sum of the overlapping pixel values is calculated and divided by the number of overlaps. can do.
[0020]
Furthermore, the present invention is an image processing program for causing a computer to execute an image enlargement process, wherein the function of the image processing apparatus according to any one of claims 1 to 20 or the function of the image processing apparatus according to claim 21 or 22 is provided. The image processing method described above is executed by a computer. Thus, the function of the above-described enlargement processing can be executed by the computer. Further, according to the present invention, a computer-readable storage medium storing such an image processing program can be provided.
[0021]
BEST MODE FOR CARRYING OUT THE INVENTION
FIG. 1 is a block diagram showing a first embodiment of an image processing apparatus and an image processing method according to the present invention. In the figure, 1 is an image processing unit, 2 is an image data storage unit, 11 is an image block setting unit, 12 is an image block feature amount calculation unit, 13 is an enlarged image block generation unit, 14 is an image block arrangement unit, and 21 is a The first generation unit 22 is a second generation unit.
[0022]
The image data storage unit 2 has a function of temporarily storing the image data until the image processing unit 1 enlarges the image data, or temporarily stores the image data after the resolution conversion or the enlargement processing is output to an output device (not shown). The storage device has a function of storing the information in the storage device. The image data is data described in an image format (for example, BMP, TIFF, PNG, etc.) that can be processed by the image processing apparatus, and is captured by a digital camera or scanner (not shown), created by a personal computer, or the like. This is image data or the like created by an application program that processes editing or the like. The enlarged image data has the same image format.
[0023]
The image processing unit 1 includes an image block setting unit 11, an image block feature amount calculating unit 12, an enlarged image block generating unit 13, and an image block arranging unit 14. In the meantime, reading of image data to be enlarged, writing of enlarged image data generated by the enlargement processing, and the like are performed.
[0024]
The image block setting unit 11 sets predetermined block sizes required for processing in the image block feature amount calculation unit 12 and the enlarged image block generation unit 13, and sets input image data stored in the image data storage unit 2. , Image blocks of respective block sizes including the pixel of interest are sequentially cut out and transmitted to the image block feature amount calculation unit 12 and the enlarged image block generation unit 13.
[0025]
The image block feature amount calculation unit 12 calculates the image feature amount in the attention area in the image block sequentially cut out by the image block setting unit 11 from each pixel value in the image block including the attention area or the periphery of the attention area. I do. As the image feature amount, for example, an edge strength and an edge angle of the attention area can be calculated as described later. However, the present invention is not limited to this. For example, an average value of each pixel value of the attention area is obtained, and a value (for example, a standard deviation or a variance) representing variation of each pixel value of the attention area with respect to the average value is obtained. , Various image feature amounts may be calculated.
[0026]
The enlarged image block generation unit 13 includes a plurality of enlargement units, here, a first generation unit 21 and a second generation unit 22, and performs a plurality of enlargement according to the image feature amount calculated by the image block feature amount calculation unit 12. The means is switched to generate an enlarged image block corresponding to the attention area. For example, when the image block feature amount calculation unit 12 calculates the edge strength as a numerical value, the feature amount is compared with a predetermined value, and either of the first generation unit 21 or the second generation unit 22 is determined according to the comparison result. It is possible to generate an enlarged image block by switching between the two. Here, the enlargement process is performed by the first generator 21 when the feature value is larger than the predetermined value, and by the second generator 22 when the feature value is smaller than the predetermined value. Of course, the feature amount used for switching the enlargement means is not limited to the edge strength, and the above-described standard deviation, variance, or other various feature amounts can be used. Although the enlargement method in the first generation unit 21 and the second generation unit 22 is arbitrary, the first generation unit 21 that operates when the edge strength indicates a large numerical value as in the above-described example is an enlargement that prioritizes image quality. An approach is desirable. Further, in this case, the second generation unit 22 is desirably an enlargement method that can perform processing at a higher speed than the first generation unit 21, whereby the overall processing time can be reduced.
[0027]
The image block arranging unit 14 sequentially arranges the enlarged image blocks generated by the enlarged image block generating unit 13 and outputs enlarged image data whose resolution has been converted or enlarged to the image data storage unit 2. Although the method of arranging the enlarged image blocks will be described later, for example, in addition to the method of sequentially arranging the enlarged image blocks, the enlarged image blocks are sequentially arranged so as to overlap each other and overlapped, and the sum of the overlapping pixel values is divided by the number of overlapped pixels. It can be configured to calculate a value.
[0028]
FIG. 2 is a flowchart illustrating an example of an operation of the image processing apparatus and the image processing method according to the embodiment of the present invention. Here, a description will be given including a specific example. In step S41, the input image data stored in the image data storage unit 2 is processed by the image block setting unit 11, the image block feature amount calculation unit 12, and the enlarged image block generation unit 13 for each block. Set the size. Further, an image block having the set block size is cut out from the input image data. FIG. 3 is an explanatory diagram of an image block to be set and cut out by the image block setting unit 11. The pixel in the center, which is finely hatched upward and to the right, is the region of interest, and the surrounding pixels, which are hatched roughly upward and to the left, are the peripheral region. Here, as an example, the attention area has a size of 2 × 2 pixels, and the peripheral area including the attention area has a size of 4 × 4 pixels. In this case, the set block size is a 6 × 6 pixel size image block shown in FIG. 3A in the case of 2 × enlargement, and an 8 × 8 pixel size shown in FIG. 3B in the case of 4 × enlargement. An image block of the size is cut out.
[0029]
In S42, the image block feature amount calculation unit 12 calculates the edge strength G of the region of interest (the region of 2 × 2 pixels hatched in FIG. 3 with a fine upward-sloping hatch) in the cut-out image block by the following equation ( It is calculated in 1). Note that {a, b, c, d} are each pixel value in the attention area. If the input image data is not a grayscale image but a color image in, for example, an RGB color space, an edge of each image block for each color component in each of the R, G, and B color spaces with respect to the region of interest is calculated using Expression (1) The intensities Gr, Gg, Gb are calculated, an image block of a color component having the largest edge intensity among the Gr, Gg, Gb is selected, and the edge intensity is determined as the edge intensity (common to all color components) of the attention area. And
gx = (a + c−b−d) / 2
gy = (a + b−c−d) / 2
G = gx × gx + gy × gy (1)
The edge strength is not limited to the one calculated by the above equation (1), but may be calculated by the following equation (2).
G = | gx | + | gy | (2)
[0030]
In S43, the edge strength G of the attention area calculated in S42 is compared with a predetermined threshold Th. If the edge strength G is larger than the threshold Th, the region of interest is an edge portion or a portion having a large change in the input image. Therefore, an enlarged image block generation process for preserving the image feature of the region of interest is performed in S44. This is performed in steps S47 to S47. If the edge strength G of the attention area is smaller than the threshold value Th, a process of generating an enlarged image block having a smaller processing load than in the processes of S44 to S47 is performed in S48.
[0031]
In S44, the image block feature quantity calculation unit 12 shows the attention area determined to have the edge strength G greater than the threshold Th and the edge angle の of the reference area in one or a plurality of peripheral areas including the attention area below. Each is calculated by equation (3).
Θ = arctan (gy / gx) (3)
Note that gx and gy are the values calculated in S42, respectively. Then, the edge direction θ of the region of interest is estimated from the plurality of obtained edge angles Θ. For example, it is possible to estimate the edge direction θ by performing an operation such as taking an average value of a plurality of obtained edge angles Θ. Of course, the method of estimating the edge direction θ is arbitrary.
[0032]
In S45, the image block feature amount calculation unit 12 selects the first and second edge patterns using the edge direction θ estimated in S44 and the pixel distribution pattern of the attention area. Here, the first and second edge patterns are prepared in advance for each edge direction and each pixel distribution pattern as shown in FIG. 9 described later. For example, the storage unit or the image data storage unit 2 in the image processing unit 1 (not shown) Can be stored as table information in a part of the table. The details will be described later.
[0033]
In S46, the first generation unit 21 of the enlarged image block generation unit 13 uses the predetermined emphasis pattern (hereinafter, referred to as an emphasis kernel) having a size and an element value according to the enlargement ratio, by the image block setting unit 11, The image data of the region of interest and the peripheral region in the cut-out image block is emphasized. The emphasis kernel and emphasis processing using the emphasis kernel will be described later.
[0034]
In S47, the first generation unit 21 of the enlarged image block generation unit 13 determines the edge direction θ of the attention area estimated by the image block feature amount calculation unit 12, the selected edge pattern, and the attention calculated in S46. An enlarged image block for the region of interest is generated using the emphasized pixel values of the region and the peripheral region.
[0035]
In this manner, when the edge strength G of the attention area is high in S43, an enlarged image block that preserves such an edge portion or a feature that the change is large is generated. As a result, it is possible to generate a high-quality enlarged image block with less blurring and jaggies for an edge portion and the like.
[0036]
On the other hand, in S48, the second generation unit 22 of the enlarged image block generation unit 13 generates an enlarged image block for the attention area for which the edge strength G is determined to be smaller than the threshold Th in the image block feature amount calculation unit 12 in S43. . The enlarged image block generation processing in the second generation unit 22 is different from the enlarged image block generation processing in S44 to S47, and may be an enlargement processing with a small processing load such as nearest neighbor interpolation. In other words, when the edge strength G is small, it is possible to obtain sufficient image quality even in the process of generating an enlarged image block with a smaller processing load without performing the above-described complicated and time-consuming processing. . Therefore, when the edge strength G is small, the second generation unit 22 of the enlarged image block generation unit 13 is selected to generate an enlarged image block with a small processing load, thereby shortening the processing time as a whole. .
[0037]
In S49, the image block arranging unit 14 generates the enlarged image block (the enlarged image block generated in the processing of S44 to S47 and the enlarged image block generated in the processing of S48) for the attention area generated by the enlarged image block generating unit 13. Are sequentially arranged by a predetermined method described later, and the arranged image blocks are stored in the image data storage unit 2 as a part of enlarged image data to be output.
[0038]
In S50, it is determined whether the generation of the enlarged image data to be output with respect to the input image data has been completed. If not completed, the process returns to S41, cuts out the next image block, and repeats the above processing. . If completed, the enlarged image data is output and the enlargement processing ends.
[0039]
The example of the operation of the image processing apparatus and the image processing method according to the embodiment of the present invention has been described above. Next, details of the image block feature amount calculation unit 12, the enlarged image block generation unit 13, and the image block arrangement unit 15, which are main components, will be described.
[0040]
First, the details of the image block feature amount calculation unit 12 will be described. Here, as shown in FIG. 3 described above, the region of interest is a 2 × 2 pixel size block, and the peripheral region including the region of interest is a 4 × 4 pixel size block. FIG. 4 is a block diagram illustrating a configuration example of the image block feature amount calculation unit 12. In the figure, 31 is an edge strength calculation unit, 32 is an edge direction estimation unit, and 33 is an edge pattern selection unit. In the example illustrated in FIG. 4, the image block feature amount calculation unit 12 includes an edge strength calculation unit 31, an edge direction estimation unit 32, and an edge pattern selection unit 33.
[0041]
As described above, the edge strength calculation unit 31 calculates the edge strength G of the attention area in the image block cut out by the image block setting unit 11 using the above equation (1), and calculates the calculated edge strength G by a predetermined value. Is compared with the threshold value Th, and an enlargement processing method for the attention area is selected. When the edge strength G of the attention area is smaller than the threshold value Th, the processing in the edge direction estimation unit 32 and the edge pattern selection unit 33 is not performed, and the enlargement processing in the second generation unit 22 of the enlarged image block generation unit 13 is performed. Is performed.
[0042]
Hereinafter, details of the processing of the edge direction estimating unit 32 and the edge pattern selecting unit 33 will be described. FIG. 5 is a diagram illustrating a specific example of the attention area and the peripheral area and an example of the edge direction of the attention area. FIG. 5A shows an example of the attention area and the peripheral area. Each rectangle is a pixel, and each number indicates a pixel value. The attention area is a pixel {a, b, c, d} = {15, 104, 86, 203} surrounded by a thick line frame. The flow of the edge direction estimation processing in the edge direction estimation unit 32 will be described using the example shown in FIG.
[0043]
FIG. 6 is a flowchart illustrating an example of the edge direction estimation processing in the edge direction estimation unit 32. In S61, the edge angle の of the region of interest surrounded by the thick line frame in FIG. 5A is calculated by the above-described equation (3). For example, in the case of the attention area {a, b, c, d} = {15, 104, 86, 203} as shown in FIG. 5 (A), gx and gy are gx = − 103, gy = -85. Therefore, the edge angle に お け る in the attention area shown in FIG. 5A is Θ = −140.5 °. The direction of the edge angle Θ is indicated by a broken arrow in FIG.
[0044]
Further, an angle direction is set as shown in FIG. 5B, and it is checked which of the angle ranges of 22.5 ° (eight directions) includes the obtained edge angle 含 ま. In this case, the edge angle 0 is 0 ° or ± 180 ° in the direction 0, 22.5 ° or −157.5 ° in the direction 1, 45 ° or −135 ° in the direction 2, 67.5 ° or The direction of -112.5 ° is direction 3, the direction of 90 ° or -90 ° is direction 4, the direction of 112.5 ° or -67.5 ° is direction 5, the direction of 135 ° or -45 ° is direction 6. , 157.5 ° or −22.5 ° as direction 7, and ranges of ± 11.25 ° of these angles are the respective directions. Since the edge angle Θ (= −140.5 °) in the above specific example is included in the range of −135 ° ± 11.25 °, the edge angle is the direction 2.
[0045]
In S61, the angle reference number, which is a variable for counting the reference number of the edge angle used for estimating the edge direction of the attention area in S66 described later, is set to 1.
[0046]
In S62, a reference region used for estimating the edge direction is selected from the peripheral regions (regions outside the thick line frame) shown in FIG. 5A according to the edge angle の of the region of interest calculated in S61. FIG. 7 is an explanatory diagram of an example of a reference region used for estimating an edge direction. 2 × 2 pixels indicated by a thick line frame in the drawing are reference regions. 7A shows a case where the direction of the edge angle obtained in S61 is 0, FIG. 7B shows a case where the direction is 4, and FIG. 7C shows a case where the direction is other than that. Note that the number of reference areas in the case of the directions 0 and 4 shown in FIGS. 7A and 7B is two, and the number of the reference areas in the directions other than the directions 0 and 4 shown in FIG. The number is four. In the specific example shown in FIG. 5, since the direction of the edge angle is direction 2, the four reference regions shown in FIG. 7C are selection candidates. Note that the selection of the reference area is not limited to that shown in FIG. 7. For example, in the case of FIG. 7C, the number of reference areas is set to 8, or the reference area is set according to each direction. May be.
[0047]
In S63, the edge angle Θ is calculated for one of the reference regions selected in S62 in accordance with the equation (3) in the same manner as in S61. In S64, the edge angle of the reference region calculated in S63 is compared with the edge angle of the region of interest calculated in S61. If the difference between the two edge angles is smaller than the preset threshold value Δth, the angle reference number is increased by 1 in S65, and the process proceeds to S66. If the difference between the two edge directions is larger than the preset threshold value Δth, it is determined that the reference area is not suitable for the estimation of the edge direction, and the process proceeds directly to S66. In S66, it is determined whether the calculation of the edge angles of all the selectable reference areas has been completed. If it has been completed, the process proceeds to S67. If there is a reference area that has not been completed yet, the processes from S63 to S65 are repeated.
[0048]
In the specific example shown in FIG. 5, the edge angle {U = -149.4 ° from the upper reference region {86, 203, 171, 211}, and the edge angle from the left reference region {10, 15, 20, 86}. {L = -131.2 °, edge angle {D = -175.2 ° from lower reference region {1, 102, 15, 104}, edge angle {R} from right reference region {104, 215, 203, 219} = −141.0 °. The edge angle of the attention area Θ = −140.5 ° is compared with the edge angle of each reference area, and the number of reference areas whose difference is smaller than the threshold value Θth is counted as the angle reference number.
[0049]
In S67, the sum of the edge angle of the attention area and the edge angle of the reference area determined to be suitable for the edge direction estimation in S64 is calculated, and the average edge angle obtained by dividing the sum of the edge angles by the number of angle references is calculated. The estimated edge direction of the area is used. FIG. 8 is an explanatory diagram of an example of the estimated edge direction in the attention area shown in FIG. For example, in the above-described specific example, assuming that the difference from the edge angle of the attention area for all the reference areas is smaller than the threshold value Δth, the sum of the edge angles obtained from the attention area and the four reference areas is −737.3 °. By dividing by the angle reference number 5, the average edge angle can be obtained as -147.5 °. In this case as well, as in the case of the edge direction of the region of interest described above, for example, if the normalization is performed in any one of eight directions, −147.5 ° becomes the direction 1. This is defined as an estimated edge direction.
[0050]
In the above description, the case where the input image data is a grayscale image is described, but it is needless to say that the present invention is not limited to this. For example, in the case of a color image in the RGB color space, the color space data selected based on the strength of the edge angles Gr, Gg, and Gb in the data of each color component as described above in S32 of the flowchart of FIG. The above process may be performed. By doing so, it is possible to suppress a decrease in image quality such as a color shift at an edge portion of enlarged image data in a color image.
[0051]
In the above description, the edge angle is calculated using Equation (1) in the attention area and the reference area, and then normalized to any one of the eight directions. May be normalized to a larger number of directions such as 12 directions (every 15.0 °) and 16 directions (every 12.25 °).
[0052]
Next, the operation of the edge pattern selection unit 33 will be described in detail. FIG. 9 is an explanatory diagram of an example of the edge pattern table. The edge pattern selection unit 33 converts an edge pattern using, for example, an edge pattern table as shown in FIG. As shown in FIG. 9, in the edge pattern table, one or several first edge patterns corresponding to the pattern size of the attention area are registered for each edge direction (here, eight directions). A pattern having a pattern size larger than the pattern size of the first edge pattern is registered as a second edge pattern corresponding to the pattern.
[0053]
The edge pattern selecting unit 33 selects a first edge pattern corresponding to the edge direction of the region of interest estimated by the edge direction estimating unit 32 using, for example, an edge pattern table as shown in FIG. A second edge pattern corresponding to one edge pattern is determined.
[0054]
Specifically, in the case of the attention area and its surrounding area surrounded by the thick line frame shown in FIG. 5A, the estimated edge direction for the attention area is determined by the edge direction estimation unit 11 for all the reference areas as described above. If the difference from the edge angle of the region is smaller than the threshold value Δth, it is determined that the direction is direction 1. According to the estimated edge direction (direction 1) of the attention area, a pattern candidate corresponding to the edge pattern of the attention area is selected from the edge pattern table shown in FIG. In this case, four patterns from pattern 0 to pattern 3, which are the first edge patterns in the direction 1, are selected, and become the first edge pattern candidates for the attention area shown in FIG.
[0055]
Next, the edge pattern selection unit 33 selects any one of the patterns 0 to 3 as the first edge pattern for the attention area, as described below. FIG. 10 is an explanatory diagram of a specific example of the method of selecting the first edge pattern corresponding to the attention area shown in FIG. In this specific example, since the estimated edge direction is direction 1, four edge pattern candidates in the first edge pattern from the edge pattern table shown in FIG. 9 are determined as the edge patterns for the attention area shown in FIG. chosen. The selected edge pattern candidate is shown in FIG.
[0056]
Each of the edge pattern candidates is converted into a bit pattern as shown in FIG. Here, the white portion is set to 0, and the rest is set to 1 to form a bit pattern. However, the edge pattern table shown in FIG. 9 may be converted into a bit table and registered in advance. In this case, the bit pattern conversion process can be omitted.
[0057]
Next, according to equation (4), the average pixel value in the region of interest is calculated, the average value is subtracted from each pixel value in the region of interest, and the sign is used as the pixel value pattern of the region of interest.
Mean = (a + b + c + d) / 4
a_sign = a-Mean
b_sign = b-Mean
c_sign = c-Mean
d_sign = d-Mean (4)
In the case of the example shown in FIG. 5A, Mean = (15 + 104 + 86 + 203) / 4 = 102, a_sign = −87, b_sign = 2, c_sign = −16, d_sign = 101, and the sign is set to the pixel value pattern. Then, the result is as shown in FIG. Further, the pixel value pattern is converted into a bit pattern as shown in FIG.
[0058]
Next, pattern matching is performed between the bit pattern of each edge pattern candidate shown in FIG. 10B and the bit pattern of the attention area shown in FIG. Select one pattern. In this case, pattern 2 is selected as the first edge pattern for the region of interest (FIG. 10E).
[0059]
Finally, when the first edge pattern is selected, a second edge pattern prepared in advance so as to correspond to the first edge pattern is determined. In this case, a second edge pattern (direction 1, pattern 2) corresponding to pattern 2 in direction 1 of the first edge pattern is selected from the edge pattern table shown in FIG. 9 (FIG. 10F). The second edge pattern is used at the time of generating an enlarged image block for the attention area in the enlarged image block generation unit 2 described later.
[0060]
Note that the first and second edge patterns are not limited to those shown in FIG. 9. For example, an edge pattern different from that shown in FIG. 9 may be used depending on the type of input image data. The number of first and second edge pattern candidates at an angle may be increased or decreased. Of course, there is no need to configure a table, and it is sufficient that the second edge pattern can be derived from the specified first edge pattern.
[0061]
Next, the enlarged image block generation unit 13 will be described in detail. First, details of a process of generating an enlarged image area in the first generation unit 21 of the enlarged image block generation unit 13 will be described. The first generation unit 21 of the enlarged image block generation unit 13 first uses the image enhancement kernel set in the image block setting unit 11 to enhance the image as shown in FIG. The block setting unit 11 emphasizes the contrast of the image data of the region of interest and the peripheral region in the image block extracted by the block.
[0062]
FIG. 11 is an explanatory diagram of a specific example of the enhancement kernel used in the first generation unit 21 of the enlarged image block generation unit 13. FIG. 12 is an explanatory diagram in the case where the pixel P is enhanced by the enhancement kernel shown in FIG. The enhancement kernel (kernel 0) shown in FIG. 11 (A) has a magnification of 2 ×, and the enhancement kernel (kernel 1) shown in FIG. 11 (B) has a magnification of 4 ×, and the enhancement shown in FIG. 11 (C). The kernel (kernel 2) is used when the magnification is eight times. In the figure, the center pixel value and the hatched pixels arranged on the upper, lower, left and right sides of the pixel are used, and the emphasis processing is performed using the weight described below.
[0063]
In the case of performing the enlargement processing, when the processing of 4 times or 8 times is performed, the pixels having the characteristics of the original image are two pixels and pixels located at positions separated by four images. Therefore, as shown in FIG. 11, pixels that are farther away from each other are selected as the magnification is higher, and are used for the emphasis processing. Of course, the same applies to a magnification of 16 times or more. Further, the positions of the pixels to be referred to are not limited to the upper, lower, left, and right as shown in FIG. For example, elements of the kernel (pixels to be referred to) and elements such as including a pixel in an oblique direction, referring to a pixel further away, and changing a kernel to be used depending on the type and size of input image data, and the like. A different distance from the enhancement kernel shown in FIG. 11 may be used.
[0064]
For example, when an enhancement kernel as shown in FIG. 11A is used, and as shown in FIG. 12A, for example, when enhancement processing is performed on a central reference pixel P, pixels a, Reference is made to b, c, and d, and 1.6 is used as the weight for the central target pixel, and 0.15 is used for the peripheral reference pixels. Accordingly, the pixel value P ′ of the pixel P can be calculated according to the following equation (5).
Attention pixel value P ′ = 1.60 × P−0.15 × (a + b + c + d) (5)
[0065]
Note that, for example, even when the enhancement kernel as shown in FIG. 11B is used, similarly, when the enhancement processing of the reference pixel P is performed as shown in FIG. The same as the equation (5), referring to the existing pixels a, b, c, and d, using 1.2 as the weight for the target pixel of interest and 0.05 for the peripheral reference pixels. Then, the pixel value P ′ of the pixel P may be calculated.
[0066]
FIG. 13 is an explanatory diagram of the contrast enhancement processing by the enhancement kernel when the input image data is enlarged by 8 times. As will be described later, since the method of the enlargement process by the first generation unit 21 is performed every two times, in the case of performing the enlargement of eight times, the enlargement is first performed twice, and the image data that has been enlarged twice is used. The image data expanded four times is further expanded by two times to generate image data expanded four times, and the image data expanded four times is further expanded twice, and finally expanded to eight times. Obtained image data. The emphasis processing by the above-mentioned emphasis kernel is performed before each double enlargement.
[0067]
That is, when the input image data shown in FIG. 13A is enlarged twice, the contrast of the input image data is enhanced using the kernel 0 shown in FIG. Thus, the double enlarged data shown in FIG. 13B is generated. Next, when the image data that has been enlarged twice as shown in FIG. 13B is enlarged twice, contrast enhancement is performed on the twice enlarged image data using the kernel 1 shown in FIG. Thereafter, the data is enlarged by a factor of two to generate quadruple enlarged data shown in FIG. Further, contrast enhancement is performed on the quadrupled data shown in FIG. 13C by using the kernel 2 shown in FIG. 11C, and then the data is enlarged by 2 times and enlarged by 8 times shown in FIG. 13D. Generate data. The emphasis kernel shown in FIG. 11 is used in this way, and performs emphasis processing on the data at each enlargement stage.
[0068]
Next, the first generation unit 21 of the enlarged image block generation unit 13 actually generates an enlarged image block. The details of the process of generating the enlarged image block will be described. The first generation unit 21 of the enlarged image block generation unit 13 compares the second edge pattern obtained by the edge pattern selection unit 33 of the image block feature amount calculation unit 12 with the pixel value that has been contrast-enhanced in the above-described image enhancement processing. To generate an enlarged image block for the attention area.
[0069]
FIG. 14 is a flowchart illustrating an example of an enlarged image block generation process in the first generation unit 21 of the enlarged image block generation unit 13. In S71, an enlarged image block of 3 × 3 pixels is first used by using the attention area subjected to contrast enhancement by the image enhancement processing and the second edge pattern selected by the edge pattern selection unit 33 of the image block feature amount calculation unit 12. Generate FIG. 15 is an explanatory diagram of a specific example of a process of generating an enlarged image block of 3 × 3 pixels. FIG. 15A illustrates an example of the attention area and the peripheral area illustrated in FIG. Further, FIG. 15B shows the second edge pattern (the pattern 2 in the direction 1 in FIG. 9) obtained, for example, as described in FIG. 10 corresponding to the attention area. In FIG. 15B, pixels are denoted by p0 to p8. Based on the attention area {a, b, c, d} shown in FIG. 15A, the pixel values of the pixels p0 to p8 are calculated by the following equation.
p0 = a
p1 = (a + c) / 2
p2 = b
p3 = (a + c) / 2
p4 = (b + c) / 2
p5 = (b + d) / 2
p6 = c
p7 = (b + d) / 2
p8 = d
By performing such calculations, an enlarged image block of 3 × 3 pixels can be generated as shown in FIG.
[0070]
FIG. 16 is an explanatory diagram of an example of a calculation formula used when generating a second edge pattern and an enlarged image block of 3 × 3 pixels. As described above, when the second edge pattern as shown in FIG. 15B is selected, an enlarged image block of 3 × 3 pixels can be generated by the above equation, but this is used. The calculation formula is determined for each selected second edge pattern. The second edge pattern shown in FIG. 16A is the pattern 0 in the direction 1 shown in FIG.
p0 = a
p2 = b
p3 = (a + c) / 2
p4 = (b + c) / 2
p5 = (b + d) / 2
p6 = c
p7 = (c + d) / 2
p8 = d
p1 = 2 × p4-p7
Thus, an enlarged image block of 3 × 3 pixels can be generated.
[0071]
The second edge pattern shown in FIG. 16B is the pattern 1 in the direction 5 shown in FIG. 9, and in this case,
p0 = a
p1 = (a + c) / 2
p2 = b
p3 = (c + d) / 2
p4 = (a + d) / 2
p5 = (a + b) / 2
p6 = c
p7 = (c + d) / 2
p8 = d
Thus, an enlarged image block of 3 × 3 pixels can be generated.
[0072]
The second edge pattern shown in FIG. 16C is the pattern 0 in the direction 2 shown in FIG. 9, and in this case,
p0 = a
p1 = a
p2 = b
p3 = a
p4 = (b + c) / 2
p5 = (b + d) / 2
p6 = c
p7 = (c + d) / 2
p8 = d
Thus, an enlarged image block of 3 × 3 pixels can be generated.
[0073]
The second edge pattern shown in FIG. 16D is the pattern 0 in the direction 0 shown in FIG. 9, and in this case,
p0 = a
p1 = (a + b) / 2
p2 = b
p3 = (a + c) / 2
p5 = (b + d) / 2
p6 = c
p7 = (c + d) / 2
p8 = d
p4 = (p1 + p7) / 2
Thus, an enlarged image block of 3 × 3 pixels can be generated. In the case of other second edge patterns as well, an enlarged image block of 3 × 3 pixels can be generated by performing calculation in accordance with a calculation formula corresponding to each second edge pattern.
[0074]
Returning to FIG. 14, in S72, the estimated edge direction of the region of interest estimated by the edge direction estimating unit 32 of the image block feature amount calculating unit 12 is determined, and the estimated edge directions are directions 1 to 3 and directions 5 to 7 When the estimated edge direction is the direction 0 and the direction 4 (that is, when the edge direction is vertical or horizontal), the process proceeds to S73.
[0075]
In S73, when the estimated edge direction of the region of interest is direction 1 to direction 3 and direction 5 to direction 7, that is, when the edge direction is not vertical or horizontal, the 3 × 3 pixel enlarged image block generated in S71. To generate a 4 × 4 pixel enlarged image block. Here, an enlarged image block of 3 × 4 pixels is first generated from an enlarged image block of 3 × 3 pixels, a focused region of interest and its peripheral region, and then the generated enlarged image block of 3 × 4 pixels. Then, an enlarged image block of 4 × 4 pixels is generated from the attention area where the contrast is enhanced and the surrounding area.
[0076]
FIG. 17 is an explanatory diagram of a specific example of a process of generating an enlarged image block of 3 × 4 pixels. FIG. 17A shows an example of the attention area and the peripheral area shown in FIG. 5A as an example. Further, p0 to p8 in FIG. 17B show the enlarged image block of 3 × 3 pixels shown in FIG. 15C at the center.
[0077]
First, the reference image (r0 to r5) in the peripheral region in which the contrast is emphasized, which is indicated by a bold frame in FIG. 17A, is used together with the enlarged image block of 3 × 3 pixels shown in the center of FIG. Thus, an enlarged image block (q0 to q11) of 3 × 4 pixels shown in FIG. 17C is generated. Each pixel value q0 to q11 of the 3 × 4 pixel enlarged image block is determined by the following formula.
q0 = 0.2 × r0 + 0.8 × p0
q1 = 0.4 × p0 + 0.6 × p1
q2 = 0.6 × p1 + 0.4 × p2
q3 = 0.8 × p2 + 0.2 × r1
q4 = 0.2 × r2 + 0.8 × p3
q5 = 0.4 × p3 + 0.6 × p4
q6 = 0.6 × p4 + 0.4 × p5
q7 = 0.8 × p5 + 0.2 × r3
q8 = 0.2 × r4 + 0.8 × p6
q9 = 0.4 × p6 + 0.6 × p7
q10 = 0.6 × p7 + 0.4 × p8
q11 = 0.8 × p8 + 0.2 × r5
[0078]
FIG. 18 is an explanatory diagram of a method of selecting a reference pixel based on the estimated edge direction. In the example illustrated in FIG. 17, assuming that the estimated edge direction obtained by the image block feature amount calculation unit 12 from the attention area and the peripheral area illustrated in FIG. The positions are three pixels from the upper left to the lower part and three pixels from the lower right to the upper part as enclosed by a thick line frame in FIG. An example of this reference pixel is shown in FIG. 18A. A pixel at such a position is used as a reference pixel when the estimated edge direction of the attention area is from direction 1 (22.5 °) to direction 3 ( 67.5 °). When the estimated edge direction of the attention area is from the direction 5 (112.5 °) to the direction 7 (157.5 °), as shown by a thick line frame in FIG. And three pixels from the upper right to the lower. Thus, the reference pixel is selected according to the estimated edge direction in the attention area. Of course, the selection of the reference pixel is not limited to the selection from two patterns as shown in FIG. 18, and more reference pixel selection patterns may be prepared according to the estimated edge direction. Also, the reference pixel to be selected may be changed according to the estimated edge direction.
[0079]
FIG. 19 is an explanatory diagram of a specific example of the generation processing of the enlarged image block of 4 × 4 pixels. A 4 × 4 pixel enlarged image block is generated using the 3 × 4 pixel enlarged image block generated as described above and the reference pixels (r0 to r7) in the contrast-enhanced peripheral region. FIG. 19A shows the attention area and the reference area in which the contrast is enhanced, and the generated 3 × 4 pixel enlarged image block is shown in the center of FIG. 19B. Here, as the reference pixels r0 to r7, the lower four pixels and the upper four pixels of the contrast-enhanced reference region are used as shown by the thick line frame in FIG. Then, an enlarged image block (s0 to s15) of 4 × 4 pixels shown in FIG. 19C is generated according to the following calculation formula.
s0 = 0.2 × r0 + 0.8 × q0
s1 = 0.2 × r1 + 0.8 × q1
s2 = 0.2 × r2 + 0.8 × q2
s3 = 0.2 × r3 + 0.8 × q3
s4 = 0.4 × q0 + 0.6 × q4
s5 = 0.4 × q1 + 0.6 × q5
s6 = 0.4 × q2 + 0.6 × q6
s7 = 0.4 × q3 + 0.6 × q7
s8 = 0.6 × q4 + 0.4 × q8
s9 = 0.6 × q5 + 0.4 × q9
s10 = 0.6 × q6 + 0.4 × q10
s11 = 0.6 × q7 + 0.4 × q11
s12 = 0.8 × q8 + 0.2 × r4
s13 = 0.8 × q9 + 0.2 × r5
s14 = 0.8 × q10 + 0.2 × r6
s15 = 0.8 × q11 + 0.2 × r7
[0080]
In the above-described processing of generating an enlarged image block of 4 × 4 pixels in S73 of FIG. 14 described above, the enlargement processing is performed according to the flow of processing of 3 × 3 pixel blocks → 3 × 4 pixel blocks → 4 × 4 pixel blocks. Has been described, the processing flow may be from 3 × 3 pixel block → 4 × 3 pixel block → 4 × 4 pixel block, or a 4 × 4 pixel block may be generated from the 3 × 3 pixel block. . Of course, the selection of the reference pixel in these cases will be changed as appropriate.
[0081]
Returning to FIG. 14, in S74, when the estimated edge direction of the attention area is the direction 0 and the direction 4 (that is, in the vertical direction or the horizontal direction), the enlarged image block of 3 × 3 pixels generated in S71 is 4 × Generate an enlarged image block of 4 pixels. FIG. 20 is a diagram illustrating an example of a process of generating an enlarged image block of 4 × 4 pixels when the estimated edge direction is the direction 0 and the direction 4. When the estimated edge directions of the attention area are the directions 0 and 4, the pixels (A, B, C, D) in the contrast-enhanced peripheral area shown in FIG. The left and right reference pixels r0 to r5 are calculated using the following equations.
r0 = A
r1 = B
r2 = 0.5 × A + 0.5 × C
r3 = 0.5 × B + 0.5 × D
r4 = C
r5 = D
In the center of FIG. 20B, the enlarged image blocks p0 to p8 of 3 × 3 pixels generated in S71 of FIG. 14 are shown.
[0082]
When the enlarged image block of 3 × 3 pixels and the reference pixels r0 to r5 are obtained in this way, the enlarged image blocks q0 to q11 of 3 × 4 pixels are obtained by using these, by the calculation method described in FIG. Generate. This is shown in FIG. Further, the enlarged image blocks q0 to q11 of 3 × 4 pixels generated in this way and the upper and lower four pixels of the contrast-enhanced peripheral region shown in FIG. The enlarged image block (s0 to s15) of 4 × 4 pixels shown in FIG.
[0083]
As described above, by performing the processing of S71 to S74 shown in FIG. 14, an enlarged image of 4 × 4 pixels for the attention area for which the edge strength G is determined to be larger than the threshold Th in the image block feature amount calculation unit 12 Blocks (for example, s0 to s15 shown in FIG. 19C or FIG. 20D) are generated.
[0084]
Next, for the attention area for which the edge strength G is determined to be smaller than the threshold value Th in the image block feature quantity calculation unit 12, the second attention unit 22 of the enlarged image block generation unit 13 outputs the attention area as described above. Instead of the enlargement processing in the first generation unit 21 of the enlargement image block generation unit 13 that saves the image feature of, the processing load of the processing load is reduced and a simpler enlarged image block generation process is performed. For example, as an example, an enlarged image block of 4 × 4 pixels can be generated from a region of interest of 2 × 2 pixels by nearest neighbor interpolation. Of course, the enlargement method used in the second generation unit 22 is arbitrary, and any method may be used as long as the processing load is lighter than that of the first generation unit 21.
[0085]
As described above, the input image data can be enlarged with high image quality by selecting the enlargement processing performed in the enlarged image block generation unit 13 in accordance with the image feature amount calculated by the image block feature amount calculation unit 12. Processing load can also be reduced. Specifically, by using an enlargement method with a smaller processing load than the first generation unit 21 in the second generation unit 22, the processing load of the entire enlargement process is reduced, the processing time is shortened, and the high-speed enlargement process is performed. Can be realized. Here, it is assumed that the enlarged image block generation unit 13 has two enlargement methods, and either one is selectively used. However, a plurality of enlargement methods are provided, and the image block feature amount calculation is performed. It is also possible to adopt a configuration in which any one of a plurality of enlargement methods is selected according to various image feature amounts calculated by the unit 12 to perform enlargement processing.
[0086]
Next, the image block arrangement unit 14 will be described. The image block arranging unit 14 sequentially arranges the enlarged image blocks for the attention area generated by the enlarged image block generating unit 13 by a predetermined method. FIG. 21 is an explanatory diagram of a specific example in which an enlarged image block of 4 × 4 pixels generated by the enlarged image block generation unit 13 is arranged. In the example shown in FIG. 21, the enlarged image block 0 and the enlarged image block 1 sequentially generated are arranged so as to overlap. Each overlapping pixel is arranged so as to take the average of the previous pixel value. Alternatively, each pixel value may be calculated by calculating the sum of overlapping pixels and dividing the sum of the pixel values by the number of overlaps. In this case, the target pixel is selected while being shifted, for example, one pixel at a time, and the enlargement process is performed. Alternatively, they can be arranged side by side without overlapping. In this case, the attention areas may be selected so as not to overlap.
[0087]
Since the enlarged image block of 4 × 4 pixels is generated by either the first generation unit 21 or the second generation unit 22 in the enlarged image block generation unit 13, the image quality may be deteriorated due to the difference in the enlargement method. However, by performing the overlap and averaging as described above, the occurrence of such image quality deterioration can be suppressed.
[0088]
FIG. 22 is a block diagram showing a second embodiment of the image processing device and the image processing method of the present invention. In the figure, the same parts as those in FIG. 1 are denoted by the same reference numerals, and redundant description will be omitted. 13 'is an enlarged image block generating unit, 14' is an image block arranging unit, and 15 is an enlarged image generating unit. In the second embodiment, the image processing unit 1 includes an image block setting unit 11, an image block feature amount calculation unit 12, an enlarged image block generation unit 13 ', and an image block arrangement unit 14', together with an enlarged image generation unit. 15 are included. Note that the image block setting unit 11 and the image block feature amount calculation unit 12 have the same functions as those in the above-described first embodiment. Further, the enlarged image block generation unit 13 'and the image block arrangement unit 14' have a configuration corresponding to the enlarged image block generation unit 13 and the image block arrangement unit 14 in the above-described first embodiment. Among these, the enlarged image block generation unit 13 'has the same function as the first generation unit 21 of the enlarged image block generation unit 13 in the above-described first embodiment, and a description thereof will not be repeated.
[0089]
The image block arranging unit 14 ′ assigns an enlarged image block that has been enlarged by the enlarged image block generation unit 13 ′ to the attention area for which the edge strength G is determined to be greater than the threshold Th in the image block feature amount calculation unit 12. The image data is sequentially arranged at corresponding positions on the enlarged image output from the enlarged image generation unit 15 described later, and the image data whose resolution has been converted or enlarged is output to the image data storage unit 2. When sequentially arranging the enlarged image blocks at the corresponding positions on the enlarged image output from the enlarged image generating unit 15, the enlarged image blocks may be arranged so as to be replaced with the respective pixel values of the enlarged image block, or the enlarged image generation may be performed. It may be arranged so as to be superimposed on each pixel value at the corresponding position of the enlarged image output from the unit 15. When the enlarged image blocks are arranged to overlap each other, each pixel value is calculated by calculating the sum of the overlapping pixels and dividing the sum of the pixel values by the number of overlaps.
[0090]
The enlarged image generation unit 15 enlarges the input image data stored in the image data storage unit 2 and outputs the enlarged image to the image block arrangement unit 14 '. The enlargement processing in the enlarged image generation unit 15 is different from the enlargement processing in the enlarged image block generation unit 13 ′, and can perform enlargement processing with a smaller processing load, such as nearest neighbor interpolation enlargement and linear interpolation enlargement processing. Further, the processing can be performed not for each image block but for each input image or each input image line.
[0091]
FIG. 23 is a flowchart illustrating an example of the operation of the image processing apparatus and the image processing method according to the second embodiment of the present invention. Steps S81, S82, and steps S84 to S87 are the same as steps S41, S42, and steps S44 to S47 in the example of the process of the first embodiment shown in FIG.
[0092]
In S83, the image block feature amount calculation unit 12 calculates the feature amount of the attention area calculated in S82. Here, the edge strength G is calculated in the same manner as in the above-described example, and is compared with a predetermined threshold Th. Of course, also in the second embodiment, the feature amount calculated by the image block feature amount calculation unit 12 is not limited to the edge strength, as in the above-described first embodiment.
[0093]
Here, when the edge strength G is larger than the threshold Th, the attention area is an edge portion or a portion having a large change in the input image, and thus the enlargement processing for storing the image feature of such attention area is performed in S84 to S87. , To generate an enlarged image block. As described above, the description of the enlargement processing in S84 to S87 is omitted.
[0094]
If the edge strength G of the attention area is smaller than the threshold value Th, the processing proceeds to S81 without performing the processing of S84 to S87, and the next image block is set. That is, the enlarged image block generation unit 13 'does not generate an enlarged image block for the attention area.
[0095]
On the other hand, in parallel with or before or after such a process, a process of generating an enlarged image by the enlarged image generation unit 15 is performed. That is, in S88, the enlarged image generation unit 15 inputs the input image data stored in the image data storage unit 2 for each image or every several lines, performs the nearest neighbor interpolation enlargement process, and sends it to the image block arrangement unit 14 '. Output. Of course, the enlargement process performed in S88 is not limited to the nearest neighbor interpolation enlargement process, and various methods with a lighter processing load than the enlargement method in the enlarged image block generation unit 13 ', such as the linear interpolation enlargement process, can be performed at a processing speed. The present invention can be applied in consideration of a request and image quality required for output image data.
[0096]
In S89, the image block arrangement unit 14 'sequentially arranges the enlarged image blocks for the attention area generated by the enlarged image block generation unit 13' at corresponding positions on the enlarged image generated by the enlarged image generation unit 15. When the enlarged image blocks are arranged so as to overlap, the above-described averaging process is performed. The magnified image block or the magnified image of each line after all of these processes are output to the image data storage unit 2 and stored.
[0097]
In S90, it is determined whether or not the generation of enlarged image data to be output with respect to the input image data has been completed. If not completed, the process returns to S81, cuts out the next image block, and returns to S81. The processing up to S90 is repeated. If completed, the enlarged image data is output to a predetermined output destination, and the enlargement processing ends.
[0098]
By such processing, the input image data is subjected to high-speed enlargement processing by the enlarged image generation unit 15 by an enlargement method with a light processing load. However, blurring, jaggies, etc. may occur at the edge portion or the like as it is. On the other hand, according to the second embodiment of the present invention, an enlarged image block generation unit 13 'performs an enlargement process of preserving an image feature for an edge portion or a portion having a large change, thereby achieving high image quality. I have an enlarged image. Therefore, it is possible to obtain a high-speed enlarged image with high speed as a whole.
[0099]
FIG. 24 is an explanatory diagram of an example of a computer program and a storage medium storing the computer program when the functions or the image processing method of the image processing apparatus of the present invention are realized by a computer program. In the figure, 101 is a program, 102 is a computer, 111 is a magneto-optical disk, 112 is an optical disk, 113 is a magnetic disk, 114 is a memory, 121 is a magneto-optical disk device, 122 is an optical disk device, and 123 is a magnetic disk device.
[0100]
The functions of the image processing unit 1 described in each of the embodiments of the present invention described above can also be realized by a program 101 that can be executed by a computer. In that case, the program 101 and data used by the program can be stored in a computer-readable storage medium. A storage medium is a type of signal corresponding to a change in energy such as magnetism, light, electricity, etc., caused to a reading device provided in a hardware resource of a computer in accordance with a description content of a program. Thus, the program description can be transmitted to the reading device. For example, there are a magneto-optical disk 111, an optical disk 112 (including a CD and a DVD), a magnetic disk 113, and a memory 114 (including an IC card, a memory card, and the like). Of course, these storage media are not limited to portable types.
[0101]
By storing the program 101 in these storage media and mounting these storage media in, for example, the magneto-optical disk device 121, the optical disk device 122, the magnetic disk device 123, or a memory slot (not shown) of the computer 102, the computer 101 The program 101 can be read to execute the functions of the image processing apparatus of the present invention or the image processing method. Alternatively, a storage medium may be mounted on the computer 102 in advance, the program 101 may be transferred to the computer 102 via a network or the like, and the program 101 may be stored and executed on the storage medium. Note that the image data storage unit 2 can apply a memory in the computer 102, an attached magnetic disk device, or another storage medium. Of course, some of the functions of the present invention may be configured by hardware, or all functions may be configured by hardware.
[0102]
【The invention's effect】
As is apparent from the above description, according to the present invention, the feature amount of the image region having the predetermined size including the target pixel is calculated, and the image region of the predetermined size including the target pixel is calculated according to the calculated characteristic amount. The enlarged image area is generated by switching a plurality of enlargement methods for enlarging the image, and the obtained enlarged image area is arranged by a predetermined method to generate an enlarged output image. By such an enlargement process, for example, for a characteristic portion in the input image, an enlargement method for preserving the characteristic amount is applied, and a flat portion (an image portion such as a sky or a skin) in the input image is applied. By applying an enlargement method with a small processing load to non-characteristic parts, high-quality enlargement processing that suppresses blurring and jaggy image quality defects in characteristic parts is performed, and high-speed enlargement processing with a small processing load is performed. be able to.
[0103]
Further, a feature amount of an image region of a predetermined size including the target pixel is calculated, and an image region of a predetermined size including the specific target pixel is enlarged according to the calculated feature amount to generate an enlarged image region. Further, the input image is enlarged by an enlargement method different from the enlargement image area generation process regardless of the feature amount to generate an enlarged image, and the enlarged image area is arranged at a corresponding position on the enlarged image by a predetermined method. Thus, an enlarged output image can be generated. By such enlargement processing, the enlargement processing for each image area with a heavy processing load can be limited to only characteristic parts, and a high-quality enlarged image can be obtained, and the processing load is small and high-speed enlargement processing is realized. There is an effect that can be.
[Brief description of the drawings]
FIG. 1 is a block diagram illustrating a first embodiment of an image processing apparatus and an image processing method according to the present invention.
FIG. 2 is a flowchart illustrating an example of an operation in an embodiment of the image processing apparatus and the image processing method of the present invention.
FIG. 3 is an explanatory diagram of an image block to be set and cut out by an image block setting unit 11;
FIG. 4 is a block diagram illustrating a configuration example of an image block feature amount calculation unit 12.
FIG. 5 is a diagram illustrating a specific example of an attention area and a peripheral area and an example of an edge direction of the attention area.
FIG. 6 is a flowchart illustrating an example of an edge direction estimation process in an edge direction estimation unit 32.
FIG. 7 is an explanatory diagram of an example of a reference area used for estimating an edge direction.
8 is an explanatory diagram of an example of an estimated edge direction in a region of interest shown in FIG. 5;
FIG. 9 is an explanatory diagram of an example of an edge pattern table.
10 is an explanatory diagram of a specific example of a method for selecting a first edge pattern corresponding to a region of interest shown in FIG. 5;
11 is an explanatory diagram of a specific example of an enhancement kernel used in a first generation unit 21 of the enlarged image block generation unit 13. FIG.
12 is an explanatory diagram in the case where a pixel P is enhanced by the enhancement kernel shown in FIG. 11;
FIG. 13 is an explanatory diagram of contrast enhancement processing by an enhancement kernel when input image data is enlarged by 8 times.
14 is a flowchart illustrating an example of an enlarged image block generation process in a first generation unit 21 of the enlarged image block generation unit 13. FIG.
FIG. 15 is a diagram illustrating a specific example of a process of generating an enlarged image block of 3 × 3 pixels.
FIG. 16 is an explanatory diagram of an example of a calculation formula used when generating a second edge pattern and an enlarged image block of 3 × 3 pixels.
FIG. 17 is an explanatory diagram of a specific example of a process of generating an enlarged image block of 3 × 4 pixels.
FIG. 18 is an explanatory diagram of a method of selecting a reference pixel based on an estimated edge direction.
FIG. 19 is an explanatory diagram of a specific example of a process of generating an enlarged image block of 4 × 4 pixels.
FIG. 20 is a diagram illustrating an example of a process of generating an enlarged image block of 4 × 4 pixels when the estimated edge direction is direction 0 and direction 4.
21 is an explanatory diagram of a specific example in which an enlarged image block of 4 × 4 pixels generated by an enlarged image block generation unit 13 is arranged. FIG.
FIG. 22 is a block diagram illustrating a second embodiment of the image processing apparatus and the image processing method according to the present invention.
FIG. 23 is a flowchart illustrating an example of an operation of the image processing apparatus and the image processing method according to the second embodiment of the present invention.
FIG. 24 is an explanatory diagram of an example of a computer program and a storage medium storing the computer program when the functions or the image processing method of the image processing apparatus of the present invention are realized by the computer program.
[Explanation of symbols]
DESCRIPTION OF SYMBOLS 1 ... Image processing part, 2 ... Image data storage part, 11 ... Image block setting part, 12 ... Image block feature-value calculation part, 13, 13 '... Enlarged image block generation part, 14, 14' ... Image block arrangement part, 15 ... Enlarged image generation unit, 21 ... First generation unit, 22 ... Second generation unit, 31 ... Edge strength calculation unit, 32 ... Edge direction estimation unit, 33 ... Edge pattern selection unit, 101 ... Program, 102 ... Computer, 111: magneto-optical disk, 112: optical disk, 113: magnetic disk, 114: memory, 121: magneto-optical disk device, 122: optical disk device, 123: magnetic disk device.

Claims (23)

画像の拡大処理を行う画像処理装置において、注目画素を含む所定の大きさの画像領域の特徴量を算出する領域特徴量算出手段と、画像の拡大処理を行う複数の拡大手段を含み前記領域特徴量算出手段により算出された前記特徴量に従って前記複数の拡大手段を切り替えて前記画像領域に対応する拡大画像領域を生成する拡大画像領域生成手段と、前記拡大画像領域生成手段で生成された前記拡大画像領域を出力画像に配置する画像配置手段を有することを特徴とする画像処理装置。An image processing apparatus that performs image enlargement processing includes an area feature amount calculation unit that calculates a feature amount of an image region having a predetermined size including a pixel of interest, and a plurality of enlargement units that perform image enlargement processing. An enlarged image region generating unit that switches the plurality of enlarging units according to the feature amount calculated by the amount calculating unit to generate an enlarged image region corresponding to the image region; and the enlargement generated by the enlarged image region generating unit. An image processing apparatus comprising an image arranging means for arranging an image area in an output image. 前記領域特徴量算出手段は、前記画像領域内の各画素値から前記画像領域内の凹凸度合いを前記特徴量として算出することを特徴とする請求項1に記載の画像処理装置。The image processing apparatus according to claim 1, wherein the area feature amount calculation unit calculates a degree of unevenness in the image area as the feature amount from each pixel value in the image area. 前記領域特徴量算出手段は、前記画像領域内の各画素値から前記画像領域内の変化方向を前記特徴量として算出することを特徴とする請求項1に記載の画像処理装置。The image processing apparatus according to claim 1, wherein the area feature calculating unit calculates a change direction in the image area as the feature from each pixel value in the image area. 前記領域特徴量算出手段は、色空間におけるそれぞれの色成分毎に前記特徴量を算出し、算出した1つあるいは複数の前記特徴量をもとに前記色空間における1つの色成分のデータを選択し、該色成分のデータにおける前記画像領域の特徴量を前記画像領域の特徴量とすることを特徴とする請求項1に記載の画像処理装置。The area feature value calculation means calculates the feature value for each color component in a color space, and selects one color component data in the color space based on the calculated one or more feature values. The image processing apparatus according to claim 1, wherein a feature amount of the image region in the color component data is set as a feature amount of the image region. 前記拡大画像領域生成手段は、前記拡大手段の1つとして、前記領域特徴量算出手段で算出された前記特徴量が所定の条件を満たす画像領域に対して前記画像領域の特徴量とともに該画像領域の近傍領域の特徴量および近傍領域内の画素値を用いて前記拡大画像領域を生成する拡大手段を有することを特徴とする請求項1ないし請求項4のいずれか1項に記載の画像処理装置。The enlarged image area generating means includes, as one of the enlarging means, an image area in which the characteristic amount calculated by the area characteristic amount calculating means satisfies a predetermined condition together with the characteristic amount of the image area. 5. The image processing apparatus according to claim 1, further comprising an enlargement unit configured to generate the enlarged image area using a feature amount of the neighborhood area and a pixel value in the neighborhood area. 6. . 前記拡大画像領域生成手段は、前記領域特徴量算出手段で算出された前記特徴量が所定の条件を満たす画像領域に対して複数の前記拡大手段から処理負荷が軽い拡大手段を選択して前記拡大画像領域を生成することを特徴とする請求項1ないし請求項4のいずれか1項に記載の画像処理装置。The enlarged image area generation unit selects an enlargement unit with a light processing load from a plurality of the enlargement units for an image region in which the feature amount calculated by the area feature amount calculation unit satisfies a predetermined condition. The image processing apparatus according to claim 1, wherein an image area is generated. 前記画像配置手段は、前記領域特徴量算出手段で算出された前記特徴量が所定の条件を満たす画像領域に対して、順次生成される前記拡大画像領域を重なり合うように順次配置してゆくことを特徴とする請求項1ないし請求項6のいずれか1項に記載の画像処理装置。The image arranging unit sequentially arranges the enlarged image regions sequentially generated so as to overlap the image region in which the feature amount calculated by the area feature amount calculating unit satisfies a predetermined condition. The image processing apparatus according to any one of claims 1 to 6, wherein: 前記画像配置手段は、順次生成される前記拡大画像領域の重なり合う画素に対して、重なる画素値の総和を算出し、前記画素値の総和を重なった数で割ることにより前記拡大画像領域の画素値を算出することを特徴とする請求項7に記載の画像処理装置。The image arranging means calculates a sum of overlapping pixel values for overlapping pixels of the enlarged image area sequentially generated, and divides the sum of the pixel values by the number of overlaps to obtain a pixel value of the enlarged image area. The image processing apparatus according to claim 7, wherein is calculated. 前記画像配置手段は、前記領域特徴量算出手段で算出された前記特徴量が所定の条件を満たす画像領域に対して、順次生成される前記拡大画像領域を重なり合わないように順次配置してゆくことを特徴とする請求項1ないし請求項6のいずれか1項に記載の画像処理装置。The image arranging unit sequentially arranges the enlarged image regions that are sequentially generated so as not to overlap with the image region in which the feature amount calculated by the region feature amount calculating unit satisfies a predetermined condition. The image processing apparatus according to claim 1, wherein: 画像の拡大処理を行う画像処理装置において、注目画素を含む所定の大きさの画像領域の特徴量を算出する領域特徴量算出手段と、前記領域特徴量算出手段により算出された前記特徴量が所定の条件を満たす前記画像領域に対して拡大画像領域を生成する拡大画像領域生成手段と、入力画像を前記拡大画像領域生成手段とは異なる拡大手法で拡大して拡大画像を生成する拡大画像生成手段と、前記拡大画像領域生成手段で得られた前記拡大画像領域を前記拡大画像生成手段で得られた前記拡大画像上の対応する位置に配置する画像配置手段を有することを特徴とする画像処理装置。In an image processing apparatus that performs an image enlargement process, an area feature amount calculation unit that calculates a feature amount of an image area having a predetermined size including a target pixel, and the feature amount calculated by the area feature amount calculation unit is a predetermined amount. Enlarged image area generating means for generating an enlarged image area with respect to the image area satisfying the condition of the following, and an enlarged image generating means for generating an enlarged image by enlarging an input image by an enlarging method different from the enlarged image area generating means And an image processing means for arranging the enlarged image area obtained by the enlarged image area generating means at a corresponding position on the enlarged image obtained by the enlarged image generating means. . 前記領域特徴量算出手段は、前記画像領域内の各画素値から前記画像領域内の凹凸度合いを前記特徴量として算出することを特徴とする請求項10に記載の画像処理装置。The image processing apparatus according to claim 10, wherein the area feature amount calculation unit calculates a degree of unevenness in the image area as the feature amount from each pixel value in the image area. 前記領域特徴量算出手段は、前記画像領域内の各画素値から前記画像領域内の変化方向を前記特徴量として算出することを特徴とする請求項10に記載の画像処理装置。The image processing apparatus according to claim 10, wherein the area feature calculating unit calculates a change direction in the image area as the feature from each pixel value in the image area. 前記領域特徴量算出手段は、色空間におけるそれぞれの色成分毎に前記特徴量を算出し、算出した1つあるいは複数の前記特徴量をもとに前記色空間における1つの色成分のデータを選択し、該色成分のデータにおける前記画像領域の特徴量を前記画像領域の特徴量とすることを特徴とする請求項10に記載の画像処理装置。The area feature value calculation means calculates the feature value for each color component in a color space, and selects one color component data in the color space based on the calculated one or more feature values. The image processing apparatus according to claim 10, wherein a feature amount of the image region in the color component data is set as a feature amount of the image region. 前記拡大画像領域生成手段は、前記領域特徴量算出手段で算出された前記特徴量が所定の条件を満たす画像領域に対して前記画像領域の特徴量とともに該画像領域の近傍領域の特徴量および近傍領域内の画素値を用いて前記拡大画像領域を生成することを特徴とする請求項10ないし請求項13のいずれか1項に記載の画像処理装置。The enlarged image region generating unit includes, for an image region in which the characteristic amount calculated by the region characteristic amount calculating unit satisfies a predetermined condition, the characteristic amount of the image region and the characteristic amount of a region near the image region together with the characteristic amount of the image region 14. The image processing apparatus according to claim 10, wherein the enlarged image area is generated using a pixel value in the area. 前記拡大画像生成手段は、前記拡大画像領域生成手段における拡大手法に比べて処理負荷が軽い拡大手法により前記拡大画像を生成することを特徴とする請求項10ないし請求項14のいずれか1項に記載の画像処理装置。15. The enlarged image generation unit according to claim 10, wherein the enlarged image generation unit generates the enlarged image by an enlargement method with a lighter processing load than the enlargement method in the enlarged image region generation unit. An image processing apparatus as described in the above. 前記拡大画像生成手段は、入力画像毎あるいは入力画像中の数ライン毎に拡大画像を生成することを特徴とする請求項10ないし請求項15のいずれか1項に記載の画像処理装置。The image processing apparatus according to claim 10, wherein the enlarged image generation unit generates an enlarged image for each input image or every several lines in the input image. 前記画像配置手段は、前記拡大画像領域生成手段で順次生成される拡大画像領域をそれぞれが重なり合うように順次配置してゆくことを特徴とする請求項10ないし請求項16のいずれか1項に記載の画像処理装置。17. The image arranging unit according to claim 10, wherein the enlarged image regions sequentially generated by the enlarged image region generating unit are sequentially arranged so as to overlap each other. Image processing device. 前記画像配置手段は、順次生成される前記拡大画像領域の重なり合う画素に対して、重なる画素値の総和を算出し、前記画素値の総和を重なった数で割ることにより前記拡大画像領域の画素値を算出することを特徴とする請求項17に記載の画像処理装置。The image arranging means calculates a sum of overlapping pixel values for overlapping pixels of the enlarged image area sequentially generated, and divides the sum of the pixel values by the number of overlaps to obtain a pixel value of the enlarged image area. The image processing apparatus according to claim 17, wherein is calculated. 前記画像配置手段は、前記拡大画像領域生成手段で生成された前記拡大画像領域を、前記拡大画像生成手段で得られた拡大画像上の対応する位置に配置する際に、前記拡大画像上の各画素値を前記拡大画像領域の各画素値で置き換えることを特徴とする請求項10ないし請求項16のいずれか1項に記載の画像処理装置。The image arranging means, when arranging the enlarged image area generated by the enlarged image area generating means at a corresponding position on the enlarged image obtained by the enlarged image generating means, 17. The image processing apparatus according to claim 10, wherein a pixel value is replaced with each pixel value of the enlarged image area. 画像の拡大処理を行う画像処理方法において、注目画素を含む所定の大きさの画像領域の特徴量を算出し、算出された前記特徴量に従って複数の拡大手法を切り替えて前記画像領域に対応する拡大画像領域を生成し、得られた前記拡大画像領域を配置して出力画像を生成することを特徴とする画像処理方法。In an image processing method for performing image enlargement processing, a feature amount of an image region having a predetermined size including a pixel of interest is calculated, and a plurality of enlargement methods are switched according to the calculated feature amount to perform enlargement corresponding to the image region. An image processing method, comprising: generating an image area; and arranging the obtained enlarged image area to generate an output image. 画像の拡大処理を行う画像処理方法において、注目画素を含む所定の大きさの画像領域の特徴量を算出し、算出された前記特徴量が所定の条件を満たす前記画像領域に対応する拡大画像領域を生成し、さらに入力画像を前記画像領域の拡大手法とは異なる拡大手法で拡大して拡大画像を生成し、前記拡大画像領域を前記拡大画像上の対応する位置に配置することを特徴とする画像処理方法。In an image processing method for performing an image enlargement process, a feature amount of an image region having a predetermined size including a pixel of interest is calculated, and the calculated feature amount corresponds to the image region satisfying a predetermined condition. Generating an enlarged image by enlarging the input image by an enlargement method different from the enlargement method of the image region, and arranging the enlarged image region at a corresponding position on the enlarged image. Image processing method. 画像の拡大処理をコンピュータに実行させる画像処理プログラムであって、請求項1ないし請求項19のいずれか1項に記載の画像処理装置の機能あるいは請求項20または請求項21に記載の画像処理方法をコンピュータに実行させることを特徴とする画像処理プログラム。22. An image processing program for causing a computer to execute an image enlargement process, the function of the image processing apparatus according to claim 1 or the image processing method according to claim 20 or 21. An image processing program for causing a computer to execute the following. 画像の拡大処理をコンピュータに実行させるプログラムを格納したコンピュータ読取可能な記憶媒体において、請求項1ないし請求項19のいずれか1項に記載の画像処理装置の機能あるいは請求項20または請求項21に記載の画像処理方法をコンピュータに実行させるプログラムを格納したことを特徴とするコンピュータが読取可能な記憶媒体。The function of the image processing apparatus according to any one of claims 1 to 19 or a function of the image processing apparatus according to claim 20 or 21 in a computer-readable storage medium storing a program for causing a computer to execute image enlargement processing. A computer-readable storage medium storing a program for causing a computer to execute the image processing method described above.
JP2002346561A 2002-11-28 2002-11-28 Image processing apparatus, image processing method, image processing program, and storage medium Expired - Fee Related JP4126541B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002346561A JP4126541B2 (en) 2002-11-28 2002-11-28 Image processing apparatus, image processing method, image processing program, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002346561A JP4126541B2 (en) 2002-11-28 2002-11-28 Image processing apparatus, image processing method, image processing program, and storage medium

Publications (2)

Publication Number Publication Date
JP2004180171A true JP2004180171A (en) 2004-06-24
JP4126541B2 JP4126541B2 (en) 2008-07-30

Family

ID=32707393

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002346561A Expired - Fee Related JP4126541B2 (en) 2002-11-28 2002-11-28 Image processing apparatus, image processing method, image processing program, and storage medium

Country Status (1)

Country Link
JP (1) JP4126541B2 (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006054899A (en) * 2004-08-12 2006-02-23 Samsung Electronics Co Ltd Resolution conversion method and resolution conversion apparatus
JP2006174276A (en) * 2004-12-17 2006-06-29 Fuji Xerox Co Ltd Image processing apparatus, image processing method, and program thereof
JP2006174285A (en) * 2004-12-17 2006-06-29 Fuji Xerox Co Ltd Image processing apparatus, image processing method, and program thereof
JP2006252107A (en) * 2005-03-10 2006-09-21 Fuji Xerox Co Ltd Image processing device, image processing method, and its program
JP2006252108A (en) * 2005-03-10 2006-09-21 Fuji Xerox Co Ltd Image processing device, image processing method, and its program
JP2006350413A (en) * 2005-06-13 2006-12-28 Fuji Xerox Co Ltd Image processor, edge detecting device, image processing method, edge detecting method, and its program
JP2007141028A (en) * 2005-11-21 2007-06-07 Fuji Xerox Co Ltd Image analyzing device, image processor, image analyzing method, image analysis program and recording medium with the same recorded
WO2013005357A1 (en) * 2011-07-06 2013-01-10 パナソニック株式会社 Edge direction detection device, edge correction device, edge direction detection method and edge correction method
CN107330439A (en) * 2017-07-14 2017-11-07 腾讯科技(深圳)有限公司 A kind of determination method, client and the server of objects in images posture
JP2020064448A (en) * 2018-10-17 2020-04-23 株式会社アクセル Image processing device, image processing method, and image processing program

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10178539A (en) * 1996-12-17 1998-06-30 Fuji Xerox Co Ltd Image processing unit and image processing method
JP2000059606A (en) * 1998-08-12 2000-02-25 Minolta Co Ltd High definition image preparation system
JP2000099713A (en) * 1998-09-18 2000-04-07 Sharp Corp Image enlarging device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10178539A (en) * 1996-12-17 1998-06-30 Fuji Xerox Co Ltd Image processing unit and image processing method
JP2000059606A (en) * 1998-08-12 2000-02-25 Minolta Co Ltd High definition image preparation system
JP2000099713A (en) * 1998-09-18 2000-04-07 Sharp Corp Image enlarging device

Cited By (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7876979B2 (en) 2004-08-12 2011-01-25 Samsung Electronics Co., Ltd. Resolution-converting apparatus and method
JP2006054899A (en) * 2004-08-12 2006-02-23 Samsung Electronics Co Ltd Resolution conversion method and resolution conversion apparatus
JP4517288B2 (en) * 2004-12-17 2010-08-04 富士ゼロックス株式会社 Image processing apparatus, image processing method, and program thereof
JP2006174276A (en) * 2004-12-17 2006-06-29 Fuji Xerox Co Ltd Image processing apparatus, image processing method, and program thereof
JP2006174285A (en) * 2004-12-17 2006-06-29 Fuji Xerox Co Ltd Image processing apparatus, image processing method, and program thereof
JP4517287B2 (en) * 2004-12-17 2010-08-04 富士ゼロックス株式会社 Image processing apparatus, image processing method, and program thereof
JP2006252108A (en) * 2005-03-10 2006-09-21 Fuji Xerox Co Ltd Image processing device, image processing method, and its program
JP2006252107A (en) * 2005-03-10 2006-09-21 Fuji Xerox Co Ltd Image processing device, image processing method, and its program
JP2006350413A (en) * 2005-06-13 2006-12-28 Fuji Xerox Co Ltd Image processor, edge detecting device, image processing method, edge detecting method, and its program
JP4730525B2 (en) * 2005-06-13 2011-07-20 富士ゼロックス株式会社 Image processing apparatus and program thereof
JP2007141028A (en) * 2005-11-21 2007-06-07 Fuji Xerox Co Ltd Image analyzing device, image processor, image analyzing method, image analysis program and recording medium with the same recorded
JP4736121B2 (en) * 2005-11-21 2011-07-27 富士ゼロックス株式会社 Image analysis apparatus, image processing apparatus, image analysis method, image analysis program, and recording medium recording the same
WO2013005357A1 (en) * 2011-07-06 2013-01-10 パナソニック株式会社 Edge direction detection device, edge correction device, edge direction detection method and edge correction method
CN107330439A (en) * 2017-07-14 2017-11-07 腾讯科技(深圳)有限公司 A kind of determination method, client and the server of objects in images posture
JP2020064448A (en) * 2018-10-17 2020-04-23 株式会社アクセル Image processing device, image processing method, and image processing program
JP2021108222A (en) * 2018-10-17 2021-07-29 株式会社アクセル Image processing device, image processing method, and image processing program
JP7246103B2 (en) 2018-10-17 2023-03-27 株式会社アクセル Image processing device, image processing method, and image processing program

Also Published As

Publication number Publication date
JP4126541B2 (en) 2008-07-30

Similar Documents

Publication Publication Date Title
JP3915563B2 (en) Image processing apparatus and image processing program
EP2138975B1 (en) Apparatus, method and computer-readable recording medium for pixel interpolation
US9824431B2 (en) Image synthesis apparatus, image synthesis method, and recording medium
JP4126541B2 (en) Image processing apparatus, image processing method, image processing program, and storage medium
JP2000339449A (en) Picture processor and picture processing method
JP4623290B2 (en) Image processing apparatus, image processing method, image processing program, and storage medium
US11663698B2 (en) Signal processing method for performing iterative back projection on an image and signal processing device utilizing the same
JP2005326977A (en) Image magnification device and program
JP4716255B2 (en) Image processing apparatus, image processing method, and program thereof
JP4857975B2 (en) Image processing system and image processing program
Cho et al. Learning methodologies to generate kernel-learning-based image downscaler for arbitrary scaling factors
KR100587979B1 (en) Interpolation method for image enlargement based on edge and corner
JP4104475B2 (en) Contour correction device
CN113989114A (en) Image reduction processing method and device
JP4265363B2 (en) Image processing device
US10275854B2 (en) Signal processing device, signal processing method, solid-state image sensor, imaging device, and electronic device
JP3972625B2 (en) Image processing apparatus and image processing method
JP4730525B2 (en) Image processing apparatus and program thereof
CN111626935B (en) Pixel map scaling method, game content generation method and device
JP3462957B2 (en) Image processing method
JP2006050481A (en) Image processing apparatus, image processing method and program thereof
JP4265362B2 (en) Image processing device
JP4736121B2 (en) Image analysis apparatus, image processing apparatus, image analysis method, image analysis program, and recording medium recording the same
JP5013243B2 (en) Image processing apparatus, image processing method, image processing program, and recording medium recording the same
JP2006050480A (en) Image processing apparatus, image processing method and program thereof

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20051017

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20071127

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20071205

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20080121

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

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

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

Free format text: PAYMENT UNTIL: 20110523

Year of fee payment: 3

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

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20120523

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20130523

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20140523

Year of fee payment: 6

LAPS Cancellation because of no payment of annual fees