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

JP3922136B2 - Image processing method, image processing program, and recording medium on which image processing program is recorded - Google Patents

Image processing method, image processing program, and recording medium on which image processing program is recorded Download PDF

Info

Publication number
JP3922136B2
JP3922136B2 JP2002234877A JP2002234877A JP3922136B2 JP 3922136 B2 JP3922136 B2 JP 3922136B2 JP 2002234877 A JP2002234877 A JP 2002234877A JP 2002234877 A JP2002234877 A JP 2002234877A JP 3922136 B2 JP3922136 B2 JP 3922136B2
Authority
JP
Japan
Prior art keywords
image
interpolation
pixel
image data
image processing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
JP2002234877A
Other languages
Japanese (ja)
Other versions
JP2004078357A (en
Inventor
耕一 久後
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Noritsu Koki Co Ltd
Original Assignee
Noritsu Koki 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 Noritsu Koki Co Ltd filed Critical Noritsu Koki Co Ltd
Priority to JP2002234877A priority Critical patent/JP3922136B2/en
Publication of JP2004078357A publication Critical patent/JP2004078357A/en
Application granted granted Critical
Publication of JP3922136B2 publication Critical patent/JP3922136B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/40Scaling of whole images or parts thereof, e.g. expanding or contracting
    • G06T3/4007Scaling of whole images or parts thereof, e.g. expanding or contracting based on interpolation, e.g. bilinear interpolation

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Image Processing (AREA)
  • Picture Signal Circuits (AREA)
  • Editing Of Facsimile Originals (AREA)
  • Facsimile Image Signal Circuits (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、デジタル画像データに対して、補間演算処理を行うことによって補間画素を生成する画像処理方法に関するものである。
【0002】
【従来の技術】
昨今、写真処理の分野では、写真フィルムに記録された画像から取り込んだデジタル画像データに基づいて、写真画像のプリントを行う、いわゆるデジタル露光が普及されている。ここで、デジタル画像データから構成される画像のサイズを拡大縮小する場合、線形内挿法により補間画素の画素値を求めることによって、画素数を変化させる手法が広く行われている。線形内挿法は、補間対象の画素のデータを、周囲の4個の画素のデータに基づいて線形補間によって算出する手法である。この線形内挿法は、エッジのシャープネスについてやや難があるものの、計算が簡単なわりには画質が良好で、最もよく用いられている。
【0003】
ここで、この線形内挿法について説明する。元画像の画素値がP(i,j)(i,jは座標値)で表されており、この元画像をr倍した拡大(縮小)画像の画素値Q(x,y)を計算する。なお、r>1のときには拡大処理、0<r<1のときには縮小処理となる。このとき、Q(x,y)は次に示す式によって求められる。
Q(x,y)=(1-t){(1-s)P(i,j)+sP(i+1,j) } +t{(1-s)P(i,j+1)+sP(i+1,j+1) }
なお、上式において、i=[x/r],j=[y/r]([a]は、a以下で最大の整数を表す),s=x/r−i,t=y/r−jである。
【0004】
上式の関係を示したものが図14である。上記の線形内挿法において、Q(x,y)に相当する画素の位置が、元画像における点P(i,j)に一致するような場合(s=t=0)、P(i,j)の画素値がそのままQ(x,y)の画素値に用いられる。一方、Q(x,y)に相当する画素の位置が、元画像における4点P(i,j),P(i+1,j),P(i,j+1),P(i+1,j+1)を結ぶ四角形の内部領域における中心点に位置する場合(s=t=0.5)、これら4点の画素値を25%ずつ足し合わせた値がQ(x,y)の画素値となる。
【0005】
ここで、Q(x,y)に相当する補間画素の位置が、元画像における格子点座標P(i,j),P(i+1,j),P(i,j+1),P(i+1,j+1)のいずれかに近ければ近いほど、Q(x,y)の画素値が、その近い点の画素値の割合が高い値となるので、鮮鋭度の変化は少ないことになる。一方、Q(x,y)に相当する補間画素の位置が、元画像における上記格子点座標を結ぶ四角形の内部領域の中心位置に近ければ近いほど、Q(x,y)の画素値が、元画像におけるより多くの画素の画素値の影響を受けた値となるので、このような処理は、画像を平滑化する処理に相当することになり、鮮鋭度が若干落ちた画像となる。
【0006】
以上のように、線形内挿法によって拡大(縮小)処理された画像は、各画素の位置に応じて鮮鋭度が異なっていることになる。特にノイズや細かい模様などを含む画像に対しては、鮮鋭度が低くなった部分において画像が平滑化されてしまうので、残ったノイズや細かい模様などがムラとして画像中に現れ、画質が著しく低下することになる。
【0007】
【発明が解決しようとする課題】
ところで、このようなムラを解消する手段として、線形内挿法により作成される拡大(縮小)画像に対し、図15に示すような平滑化フィルタによって、画素ごとの鮮鋭度を変化させる方法が提案されている。ここで、平滑化フィルタに用いられる関数u(s,r)およびv(t,r)は、補間画素の位置および、上記拡大(縮小)処理における拡大(縮小)率に応じて変化する関数である。つまり、拡大(縮小)画像に上記関数を挿入した平滑化フィルタをかけることによって、補間処理により鮮鋭度の変化の少ない補間画素(いずれかの格子点座標に近い補間画素)に対しては鮮鋭度を下げ、補間処理により鮮鋭度の変化の大きい補間画素(各格子点座標の中間位置に近い補間画素)に対しては鮮鋭度を維持する処理を行うことが可能となる。これによって拡大(縮小)画像の鮮鋭度のばらつきを小さくできるので画像中のノイズムラを解消することができる。
【0008】
しかしながら、線形内挿法により作成された拡大(縮小)画像に対して、平滑化フィルタ用いて平滑化処理を行えば、補間処理の後に平滑化処理を行う必要がある。すなわち、補間画素を生成する処理と、各補間画素の画像データの鮮鋭度のばらつきを小さくする処理を別々に行わなければならず、処理に時間がかかってしまうという問題が生じていた。
【0009】
本発明は、上記問題点を解決するためになされたものであり、補間演算によって生じる補間演算済画像データから構成される画像の鮮鋭度のばらつきを小さくして、ノイズのムラを発生させることなく、従来よりも処理時間を短縮できる画像処理方法を提供することにある。
【0010】
【課題を解決するための手段】
本発明の画像処理方法は、上記課題を解決するために、デジタル画像データに対して、補間演算処理を行うことによって補間画素および補間演算済画像データを生成する画像処理方法において、補間画素を生成するために必要な格子点画素に平滑化処理を施してから、上記格子点画素から補間画素を生成することにより、上記補間演算済画像データの鮮鋭度のばらつきを小さくするステップを備え、上記平滑化処理は、上記格子点画素およびその周囲の画素に対し、所定の係数をかけるフィルタ処理であり、上記所定の係数は、上記格子点画素から生成される補間画素の位置に応じて変化する重み関数であることを特徴とする。
【0011】
補間画素を生成する処理は、複数の格子点画素から画像データを生成する処理であり、このような処理は画像の平滑化処理(鮮鋭度を低下させる)に該当する。また、補間演算処理で生じる補間画素の鮮鋭度の低下量は、格子点画素からの補間画素の位置によって変化する。したがって、補間演算処理により生成される補間演算済画像データの鮮鋭度にはばらつきがあり、画像にノイズのムラが生じることがある。
【0012】
この点、上記手順では、補間画素を生成するために必要な格子点画素に平滑化処理を施してから、上記格子点画素から補間画素を生成することとしている。また、上記平滑化処理は、上記格子点画素およびその周囲の画素に対し、所定の係数をかけるフィルタ処理であって、上記所定の係数は、上記格子点画素から生成される補間画素の位置に応じて変化する重み関数である。
【0013】
つまり、上記平滑化処理によれば、上記格子点画素から生成される補間画素の位置に応じて、上記格子点画素に対しての平滑化の強度を調整することが可能となる。このような平滑化処理により鮮鋭度を変化させた格子点画素から補間画素を生成することにより、補間演算済画像データの鮮鋭度のばらつきを小さくでき、補間演算済画像データから構成される画像にノイズのムラを発生させることもない。
【0014】
さらに、上記手順は、まず、格子点画素とその周囲の画素から、格子点画素の画像データを生成し、さらに、各格子点画素の画像データから補間画素の画像データを生成する処理である。つまり、この処理は、補間画素の画素値を生成するために、格子点画素のみならず、格子点画素の周囲の画素をも参照しているので、全体で3次内挿計算に該当する。したがって、上記手順によれば、補間画素の画像データを生成する処理と、上記重み関数を用いた補間画素の画像データの鮮鋭度のばらつきを小さくする処理とを一連の計算で同時に行うことができるので、補間演算済画像データから構成される画像にノイズのムラを発生させることなく、従来よりも処理時間の短縮化を図ることができる。
【0015】
本発明の画像処理方法は、上記手順に加えて、上記重み関数が、補間演算済画像データの分散が一定となるように設定されることを特徴としてもよい。
【0016】
上記重み関数を設定するには、サンプルとしての複数の補間処理対象画像に対して上記重み関数を変化させて補間演算処理を行い、最も画像の状態が好ましいと判断される上記重み関数をプロットすることにより、上記重み関数を設定する手段が考えられる。ところが、このような手段を実行するには、手間のかかる実験を行わなければならない。
【0017】
そこで、画像全体で画像データの鮮鋭度のばらつきが小さい場合、各画素の高周波成分の大きさはほぼ等しく、各画素の高周波成分の散らばり具合は同一となり、画像データの分散が一定となることに着目する。そして、補間演算済の画像データの分散が一定になるように上記重み関数を設定すれば、補間演算済画像データの鮮鋭度のばらつきを小さくすることができ、結果として、上記格子点画素から生成される補間画素の位置に応じて変化する重み関数を設定することが可能となる。すなわち、理論的に上記重み関数を与えることができるので、上述した手間を省くことができる。
【0018】
本発明の画像処理方法は、上記手順に加えて、上記補間画素を算出する演算式を、
【0019】
【数3】

Figure 0003922136
【0020】
として表す場合、
【0021】
【数4】
Figure 0003922136
【0022】
となるように、上記重み関数を設定することを特徴としてもよい。
【0023】
上記平滑化処理を含めた補間画素を生成する処理は、全体として3次内挿法による補間演算処理であるといえるので、補間画素の画像データを算出する処理は、数3に示した式で表すことができる。
【0024】
ここで、説明の便宜のために、1次元の画像データD(i+k)のみに着目することとする。まず、1次元データに対して3次内挿法による補間演算を行う場合、補間画素の周囲の4画素が参照されることになるので、1次元データ上の4画素の画像データの分布D〔i−1〕,D〔i〕,D〔i+1〕,D〔i+2〕に着目する。そして、それぞれの画素値の分散および、隣り合う画素間の画素値の共分散から、上記4個の画像データの和の分散は、
【0025】
【数5】
Figure 0003922136
【0026】
で表すことができる。
【0027】
一方、1次元のデータに対し3次内挿法による補間計算を行うと、補間画素の画像データO〔x〕は、
【0028】
【数6】
Figure 0003922136
【0029】
になるので、O〔x〕の分散を求めると、
【0030】
【数7】
Figure 0003922136
【0031】
を得ることができる。
【0032】
さらに、上記元画像の画像データにノイズが付加されているものと仮定すると、D〔i−1〕,D〔i〕,D〔i+1〕,D〔i+2〕の間には相関がないと考えられるので、数7の共分散項を無視することができ、
【0033】
【数8】
Figure 0003922136
【0034】
を得ることができる。
【0035】
ここで、元画像の画像データの分散をVとすると、
【0036】
【数9】
Figure 0003922136
【0037】
であるので、数8および数9から、数10を得ることができる。
【0038】
【数10】
Figure 0003922136
【0039】
なお、Voutは、補間演算済画像データの分散である。
【0040】
さらに、補間演算済画像データの分散(Voutとする)を一定にできれば、補間演算済画像データの鮮鋭度のばらつきを小さくすることができるので、
【0041】
【数11】
Figure 0003922136
【0042】
となるようにする。これにより、
【0043】
【数12】
Figure 0003922136
【0044】
を得ることができる。そして、これを2次元の画像データD(i+k,j+l)に拡張すると、数4の関係を得ることができる。したがって、数4の関係になるように、上記重み関数を設定すれば、補間演算済画像データの鮮鋭度のばらつきを小さくすることができる。
【0045】
また、上記画像処理方法をコンピュータに実行させるための画像処理プログラムとしても構わない。さらに、上記画像処理プログラムをコンピュータに読み取り可能に記録してなることを特徴とする画像処理プログラムを記録した記録媒体としても構わない。
【0046】
【発明の実施の形態】
本発明の実施の一形態について図1ないし図13に基づいて説明すれば、以下のとおりである。本発明の実施形態は、写真処理の分野において、3次内挿法(補間演算処理)による画像の拡大(縮小)処理を行う場合に、拡大(縮小)画像の画像データ(補間演算済画像データ)の鮮鋭度のばらつきを小さくするための重み関数を導入している点と、この重み関数を設定する手順に特徴がある。したがって、以下では、▲1▼上記拡大(縮小)処理が実行される写真処理システムの構成、▲2▼重み関数を導入した3次内挿法、▲3▼重み関数の設定手順を順に説明する。
<写真処理システムの構成>
図2は、本発明の実施の形態に係る写真処理システムの概略を示すブロック図である。同図に示すように、該写真処理システムは、画像処理装置1と、画像処理装置1にデジタル画像データを入力するデジタルカメラ2、およびスキャナ3と、画像処理装置1において処理された画像データに基づいて、各種用紙に画像をプリントするプリンタ4とを備えた構成となっている。
【0047】
デジタルカメラ2は、例えばCCD(Charge Coupled Device)などの撮像素子を用いて写真撮影を行い、これをデジタル画像データとして記録するものである。このデジタルカメラ2によって撮影された画像データは、フラッシュメモリーなどの各種記憶手段に記録される。
【0048】
スキャナ3は、元画像としての各種アナログ画像をCCDなどによって読み取り、これをデジタル画像データに変換するものである。このスキャナ3としては、ネガフィルムなどの写真フィルムに記録されている画像を読み取るフィルムスキャナでもよいし、例えばプリント済の銀塩写真や、その他紙状媒体に記録された画像などを読み取るスキャナでもよい。
【0049】
プリンタ4は、画像処理装置1から送られてくる画像データをプリントすることが可能なものであれば、どのようなものを用いてもよい。このプリンタ4としては、例えば、インクジェット方式のプリンタやレーザプリンタ、あるいは、LCD(Liquid Crystal Display)、DMD(Digital Micromirror Device)、PLZTなどの光変調素子を用い、印画紙などの感光材料を感光させることによって焼付を行うデジタルプリンタなどが挙げられる。
【0050】
画像処理装置1は、例えばPC(Personal Computer)ベースの装置によって構成され、図示はしないが、PC本体、モニターなどの表示手段、キーボード、マウスなどの入力手段などによって構成されている。そして、この画像処理装置1は、デジタルカメラ2およびスキャナ3からデジタル画像データを取り込む画像入力部5と、画像入力部5において取り込まれたデジタル画像データに対して種々の画像処理を行う画像処理部6と、画像処理部6において画像処理されたデジタル画像データをプリンタ4に対して出力する画像出力処理部7とを備えている。
【0051】
画像入力部5は、上記のように、デジタルカメラ2およびスキャナ3と、画像処理装置1とのインターフェースとなる部分である。接続形態は特に限定されるものではないが、例えばデジタルカメラ2との接続は、RS-232C などによるシリアル接続、USB(Universal Serial Bus)接続、などが挙げられ、スキャナ3との接続は、SCSI(Small Computer System Interface)接続、パラレル接続、USB接続などが挙げられる。なお、図2に示す例では、画像データの入力手段として、デジタルカメラ2とスキャナ3とを挙げているが、これに限定されるものではなく、例えば、画像データが記録されたハードディスクドライブや各種リムーバブルメディアドライブなどから画像データを入力するシステムとすることも可能である。
【0052】
画像処理部6は、例えば、PCにおいて動作する画像処理プログラムによって動作するものである。この画像処理部6における処理の詳細については後述する。
【0053】
画像出力処理部7は、画像処理部6において画像処理がなされた画像データを、プリンタ4で出力するのに最適なデータ形式に変換し、これをプリンタ4に送信するものである。データ形式の変換は、例えばプリンタドライバと呼ばれるプログラムによって行われることになる。また、プリンタ4との接続形態は特に限定されるものではないが、例えば、パラレル接続、USB接続などが挙げられる。
【0054】
次に、画像処理部6の構成について説明する。図3は、該画像処理部6の概念的な構成を示すブロック図である。同図に示すように、画像処理部6は、変更倍率設定手段8、補間演算部9、およびメモリ部10を備えている。また、メモリ部10には、入力画像用メモリ10A、および出力画像用メモリ10Bが設けられている。
【0055】
変更倍率設定手段8は、各種入力手段、例えばマウスやキーボードなどによるオペレータからの指示に従って、入力された画像データのサイズ(画素数)の変更倍率、すなわち拡大率あるいは縮小率を設定するブロックである。
【0056】
補間演算部9は、画像入力部5によって入力された画像データをバッファする入力画像用メモリ10Aのデータを参照しながら、変更倍率設定手段8において設定されている変更倍率に基づいて、補間演算を行うブロックである。この補間演算部9によって演算が行われた画像データは、出力画像用メモリ10Bにバッファされ、上記した画像出力処理部7に出力される。
【0057】
次に、画像処理部6における処理の流れについて、図8に示すフローチャートを参照しながら説明する。まず、ステップ1(以下、S1のように称する)において、元画像の画像データが入力され、入力画像用メモリ10Aにバッファされる。ここで、この入力された元画像を、モニターなどの表示手段に表示するようにしてもよい。
【0058】
次に、入力された元画像をどのようなサイズに変更するかが、オペレータによって指示され、変更倍率設定手段8において設定される(S2)。ここで、オペレータによるサイズの変更の指示は、拡大(縮小)倍率を直接指定してもよいし、サイズ変更後の画像の大きさあるいは画素数を指定してもよい。後者の場合には、指定された画像の大きさあるいは画素数と、元画像の大きさあるいは画素数との比較を行って、変更倍率(拡大(縮小)倍率)が算出される。
【0059】
変更倍率が設定されると、この変更倍率に応じた画像サイズとなるように画素数を変更するために、補間演算部9によって補間演算が行われ、各補間画素の画素値(画像データ)が算出される(S3)。ここでの補間演算は、(1)式に示すような3次内挿法による補間演算が行われる。
【0060】
【数13】
Figure 0003922136
【0061】
このようにして補間演算された補間演算済画像が、拡大(縮小)画像として表示手段によって表示され(S4)、拡大(縮小)処理が終了する。
<3次内挿法>
つぎに、画像処理部6において実行される、3次内挿法による補間演算について説明する。まず、元画像の格子点画素の画素値はD〔i,j〕(i,jは座標値)で表されており、この元画像をr倍した拡大(縮小)画像の画素値O〔x,y〕を計算するものとする。なお、r>1のときには拡大処理、0<r<1のときには縮小処理となる。このとき、O〔x,y〕は(1)式で求めることができる。
【0062】
ここで、(1)式の導出方法について説明する。なお、(1)式は、2次元のデータ(行および列からなる画像データ)に対して、3次内挿法による補間演算を行うことにより、補間画素の画素値を算出する式であるが、以下では説明の便宜のために、1次元のデータ(行のみの画像データ)を用いて(1)の導出方法を説明する。
【0063】
まず、補間画素の座標を〔x〕とすると、元画像の一方の格子点画素の座標は、〔i〕=[x/r]となる([a]は、a以下で最大の整数を表す)。なお、格子点画素とは、補間画素の周囲に存在し、補間画素を生成するために参照される画素をいう。そして、線形内挿法により座標xの画素値を算出すると、
O〔x〕=(1−s)D〔i〕+sD〔i+1〕…(2)
なお、s=(x/r)−iとなる。また、(2)式の関係を示したものが図4である。
【0064】
ここで、図5に示すように、〔x〕が、〔i〕または〔i+1〕に近ければ近いほど(sが0または1に近い場合)、その近い格子点画素の画素値の割合が高くなるので、補間画素の鮮鋭度の変化(低下量)は少なくなる。一方で、〔x〕が、〔i〕と〔i+1〕との中間点に近ければ近いほど(sが0.5に近い場合)、両方の格子点画素の画素値の影響を受けるので、補間画素の鮮鋭度の低下量は大きくなる。したがって、格子点画素〔i〕および〔i+1〕に対して、格子点画素およびその周囲の2画素を参照し(図7参照)、図6に示すような重み関数u(s)を係数とした平滑化処理を行うと、上記線形内挿法による補間処理のみでは鮮鋭度の変化が少ない補間画素(いずれかの格子点座標に近い補間画素)に対しては平滑化が行われ、上記補間処理のみで鮮鋭度の変化の大きい補間画素(いずれかの格子点座標に近い補間画素)に対しては鮮鋭度を維持できる。これにより、上記線形補間処理により得られる画像の鮮鋭度のばらつきを小さくすることができる。すなわち、u(s)は、格子点画素から生成される補間画素の位置に応じて変化する重み関数であると共に、拡大(縮小)画像の鮮鋭度のばらつきを小さくするための重み関数である。
【0065】
そこで、上記平滑化処理の演算を数14に示すと、
【0066】
【数14】
Figure 0003922136
【0067】
ここで、上記演算において、u(s)=0の場合、D´〔i〕=D〔i〕となる。また、u(s)=1/3の場合、D´〔i〕は、D〔i−1〕,D〔i〕,D〔i+1〕の平均となる。このように、u(s)の値が大きいほど平滑化の度合いが大きくなるので、上記補間処理のみでは鮮鋭度の変化が少ない補間画素(sが0または1に近い)に対しては平滑化が行われ、上記補間処理のみで鮮鋭度の変化の大きい補間画素(sが0.5に近い)に対しては鮮鋭度を維持できる。ここで、上記平滑化処理は、数14からも明らかであるが、格子点画素およびその周囲の画素に対し、係数をかけることにより、格子点画素の画素値を算出する処理であり、このような処理はフィルタ演算処理に相当するものである。
【0068】
そして、D´〔i〕,D´〔i+1〕を用いて、(2)式の線形内挿法による補間演算を行うと、(3)式が得られる。
【0069】
【数15】
Figure 0003922136
【0070】
ここで、2つの格子点画素の画素値は、それぞれの格子点画素と、その周囲の2画素を参照して得られるので、2つの格子点座標から求められる補間画素の画素値は、結果として周囲の4つの画素の画素値から算出されることになる。このように、1次元のデータにおいて、4つの画素を参照して、補間画素を生成する処理は3次内挿計算に該当する。
【0071】
したがって、(3)式は1次元のデータに対して3次内挿法による補間演算を行っているものであるから、これを2次元のデータ(行および列からなる画像データ)に対する式に拡張すると、(1)式を得ることができる。なお、v(t)は列方向のデータにおける重み関数である。すなわち、(1)式は、2次元のデータに対して3次内挿法による補間演算を行っているものであり、4×4=16画素を参照した補間演算である。
【0072】
また、(1)式により元画像を拡大(縮小)したイメージを図1に示す。ここで、O〔x,y〕は、補間演算により生成される補間画素であり、D〔i,j〕,D〔i,j+1〕,D〔i+1,j〕,D〔i+1,j+1〕は格子点画素を示す。
<重み関数を設定する手順>
上述した重み関数u(s),v(t)は、サンプルとしての複数の補間処理対象画像に対してu(s)およびv(t)を変化させて3次内挿法による補間演算により拡大(縮小)処理を行い、最も画像の状態が好ましいと判断されるu(s)およびv(t)の値をプロットすることにより得ることができる。しかし、この方法では重み関数u(s)およびv(t)を実験により与えなければならず手間が生じることになる。
【0073】
ところが、上記重み関数を理論的に与えることも可能であり、上述した実験による手間を省くことができる。ここで、以下では、理論的に与えることができる重み関数をw(α),z(β)として、これらを設定する手順について説明する。
【0074】
通常、デジタル画像において画像全体の鮮鋭度のバラツキが大きい場合、図9(a)に示すように、各画素の高周波成分(画像データ)にはばらつきがある。従って、各画素の画像データは周辺画素の画像データと相関関係がなく、この画像の画像データの分散は一定でないと考えることができる。
【0075】
一方、デジタル画像において画像全体の鮮鋭度のばらつきが小さい場合、図9(b)に示すように、各画素の高周波成分は、ほぼ一定である。従って、この画像の画像データの分散は一定であると考えることができる。
【0076】
そこで、拡大(縮小)処理の対象となる元画像を、画素値の分散をVと仮定する。そして、式(1)に示す3次内挿法において、s,tの値に関わらず拡大(縮小)画像の画素値の分散Voutが一定になるように、上記重み関数を設定すれば、鮮鋭度が均一な拡大(縮小)画像を得ることができる。
【0077】
以下、重み関数w(α),z(β)を導く演算を説明するが、説明の便宜のために、1次元のデータ(行のみの画像データ)を用いることにする。これは、1次元のデータ(行のみの画像データ)に対して鮮鋭度のばらつきを小さくできれば、同じ処理を別方向の1次元のデータ(列のみの画像データ)に対して行うことにより、2次元の画像データ(行および列からなる画像データ)に対しても鮮鋭度のばらつきを小さくできるからである。
【0078】
まず、元画像において、1次元のデータ上の4個の画素の画素値の分布D〔i−1〕,D〔i〕,D〔i+1〕,D〔i+2〕に着目する。そして、それぞれの画素値の分散および、隣り合う画素間の画素値の共分散から、上記4個の画素値の和の分散は、(4)式で表すことができる。ここで、4個の画素に着目しているのは、1次元データにおける3次内挿法では、元画像の4個の画素を参照して、補間画素の画素値を算出するからである。
【0079】
一方、1次元のデータに対し3次内挿法による補間計算を行うと、補間画素の画素値O〔x〕は(3)式により求めることができる。従って、(4)式を用いて、O〔x〕の分散を求めると、(5)式を得ることができる。
【0080】
さらに、元画像は鮮鋭度が均一でないものと仮定すると、D〔i−1〕,D〔i〕,D〔i+1〕,D〔i+2〕はノイズデータと考えられるので、(5)式の共分散項を無視することができ、(6)式を得ることができる。なお、ノイズデータとは、周辺画素のデータ(画素値)とは相関関係を持たない画素のデータ(画素値)をいう。
【0081】
ここで、元画像の画素値の分散Vは、(7)式で表すことができる。そして、(6)式および(7)式から、(8)式を得ることができる。なお、Voutは、拡大(縮小)画像の画素値の分散である。
【0082】
さらに、拡大(縮小)画像の画素値の分散Voutを一定にできれば、拡大(縮小)画像の鮮鋭度のばらつきを小さくすることができるので、(9)式のように設定する。
【0083】
ここで、(3)式に示すp-1,p0,p1,p2について、α=s−1/2,w(α)=u(s)と置き換えると、(10)式および(10a)〜(10d)式を得ることができる。
【0084】
【数16】
Figure 0003922136
【0085】
-1,p0,p1,p2をこのように変形したのは、後の計算を簡単にするためである。つぎに、(10a)〜(10d)式を(9)式に代入して、w(α)について計算すると、式(11)が得られる。
【0086】
【数17】
Figure 0003922136
【0087】
このようにして得られたw(α)をプロットすると、図10に示す関数が得られることになる。ここで、根号部が正の関数は無視して、根号部が負の関数(式(11´))に着目すると、sが0または1に近づくにつれて(補間画素がいずれかの格子点画素に近づくにつれて)、w(α)が大きくなっている。一方、sが0.5に近づくにつれて(補間画素が格子点画素間の中間点に近づくにつれて)、w(α)が小さくなっている。
【0088】
したがって、1次元データにおいて、式(11´)に示す関数を重み関数として、式(10a)〜(10d)に示すp-1,p0,p1,p2を求めて、(10)式に示す3次内挿法の補間演算により拡大(縮小)処理を行えば、拡大(縮小)画像の画像データの鮮鋭度のばらつきを小さくすることができる。これは、式(11´)に示す重み関数により、いずれかの格子点画素に近い補間画素に対しては、平滑化の重みを与えることができ、各格子点画素の中間点に近い補間画素に対しては、平滑化の重みを与えることなく鮮鋭度を維持できるからである。
【0089】
さらに、(10)式および(11´)式を、2次元の平面画像データ(行および列からなる画像データ)に適用すると、
【0090】
【数18】
Figure 0003922136
【0091】
となる。すなわち数18は、p-1 2+p0 2+p1 2+p2 2=一定、q-1 2+q0 2+q1 2+q2 2=一定となるように、重み関数w(α),z(β)を設定したものである。
【0092】
このようにして、重み関数w(α),z(β)を3次内挿法による補間演算に導入することで、拡大(縮小)画像の画像データの鮮鋭度のばらつきを小さくすることができるので、ノイズのムラの発生を抑制することができる。
【0093】
ここで、ある元画像を拡大した場合の拡大画像を図11ないし図13に示す。図11(a)は、従来の線形内挿法により拡大した画像を示し、図11(b)は図11(a)のある部分におけるビットマップを示す。図12(a)は、実験により設定した重み関数u(s),v(t)を導入した3次内挿法により拡大した画像を示し、図12(b)は図12(a)のある部分におけるビットマップを示す。図13(a)は、重み関数w(α),z(β)を導入した3次内挿法により拡大した画像を示し、図13(b)は図13(a)のある部分におけるビットマップを示す。各ビットマップを対比すれば、重み関数u(s),v(t)を導入した3次内挿法、あるいは重み関数w(α),z(β)を導入した3次内挿法により拡大した画像のほうが、従来の線形内挿法により拡大した画像よりもノイズが少ないことがわかる。
【0094】
通常、補間画素を生成する処理は、複数の格子点画素から画素値を生成する処理であり、このような処理は画像の平滑化処理(鮮鋭度を低下させる)に該当する。また、補間演算処理で生じる補間画素の鮮鋭度の低下量は、格子点画素からの補間画素の位置によって変化する。したがって、補間演算処理により生成される拡大(縮小)画像の画像データの鮮鋭度のばらつきは大きく、画像にノイズのムラが生じることがある。
【0095】
この点、本実施形態では、補間画素を生成するために必要な格子点画素に平滑化処理を施してから、上記格子点画素から補間画素を生成することとしている。また、上記平滑化処理は、上記格子点画素およびその周囲の画素に対し、所定の係数をかけるフィルタ処理であって、上記所定の係数は、上記格子点画素から生成される補間画素の位置に応じて変化する重み関数である。
【0096】
つまり、上記平滑化処理によれば、上記格子点画素から生成される補間画素の位置に応じて、上記格子点画素に対しての平滑化の強度を調整することが可能となる。このような平滑化処理により鮮鋭度を変化させた格子点画素から補間画素を生成することにより、拡大(縮小)画像データの鮮鋭度のばらつきを小さくすることができ、補間演算済画像データから構成される画像にノイズのムラを発生させることもない。
【0097】
さらに、上記手順は、まず、格子点画素とその周囲の画素から、格子点画素の画素値を生成し、さらに、各格子点画素の画素値から補間画素の画素値を生成する処理である。つまり、この処理は、補間画素の画素値を生成するために、格子点画素のみならず、格子点画素の周囲の画素をも参照しているので、全体で3次内挿計算に該当する。したがって、上記手順によれば、補間画素の画像データを生成する処理と、上記重み関数を用いた補間画素の画像データの鮮鋭度を小さくする処理とを一連の計算で同時に行うことができるので、拡大(縮小)画像にノイズのムラを発生させることなく、従来よりも拡大(縮小)処理時間の短縮化を図ることができる。
【0098】
また、上記重み関数を設定するには、サンプルとしての複数の補間処理対象画像に対して上記重み関数を変化させて補間演算処理を行い、最も画像の状態が好ましいと判断される上記重み関数をプロットすることにより、上記重み関数を設定する手段が考えられる。ところが、このような手段を実行するには、手間のかかる実験を行わなければならない。
【0099】
そこで、本実施の形態では、画像全体で画像データの鮮鋭度のばらつきが小さい場合、各画素の高周波成分の大きさはほぼ等しく、各画素の高周波成分の散らばり具合は同一となり、画像データの分散が一定となることに着目する。そして、補間演算済の画像データの分散が一定になるように上記重み関数を設定すれば、補間演算済画像データの鮮鋭度のばらつきを小さくすることができ、結果として、上記格子点画素から生成される補間画素の位置に応じて変化する重み関数を設定することが可能となる。
【0100】
また、本実施の形態では、上記重み関数を導入した3次内挿法による補間演算を、画像の拡大(縮小)処理に適用しているが、これに限定されるものではなく、回転処理,平行移動処理等にも適用可能である。
【0101】
ところで、以上の実施の形態で説明した処理は、プログラムで実現することが可能である。このプログラムはコンピュータで読み取り可能な記録媒体に格納されている。本発明では、この記録媒体として、画像処理部2で処理が行われるために必要な図示していないメモリー(例えばROMそのもの)であってもよいし、また図示していないが外部記憶装置としてプログラム読み取り装置が設けられ、そこに記録媒体を挿入することで読み取り可能なプログラムメディアであっても構わない。
【0102】
上記いずれの場合においても、格納されているプログラムはマイクロプロセッサ(図示せず)のアクセスにより実行される構成であってもよいし、格納されているプログラムを読み出し、読み出したプログラムを図示されていないプログラム記憶エリアにダウンロードすることにより、そのプログラムが実行される構成であってもよい。この場合、ダウンロード用のプログラムは予め本体装置に格納されているものとする。
【0103】
ここで、上記プログラムメディアは、本体と分離可能に構成される記録媒体であり、磁気テープやカセットテープ等のテープ系、フロッピー(登録商標)ディスクやハードディスク等の磁気ディスクやCD−ROM/MO/MD/DVD等の光ディスクのディスク系、ICカード(メモリーカードを含む)/光カードのカード系、あるいはマスクROM、EPROM、フラッシュROM等による半導体メモリーを含めた固定的にプログラムを担持する媒体であってもよい。
【0104】
最後に、上述した各実施の形態は、本発明の範囲を限定するものではなく、本発明の範囲内で種々の変更が可能である。
【0105】
【発明の効果】
本発明の画像処理方法は、以上のように、デジタル画像データに対して、補間演算処理を行うことによって補間画素および補間演算済画像データを生成する画像処理方法において、補間画素を生成するために必要な格子点画素に平滑化処理を施してから、上記格子点画素から補間画素を生成することにより、上記補間演算済画像データの鮮鋭度のばらつきを小さくするステップを備え、上記平滑化処理は、上記格子点画素およびその周囲の画素に対し、所定の係数をかけるフィルタ処理であり、上記所定の係数は、上記格子点画素から生成される補間画素の位置に応じて変化する重み関数であることを特徴とする。
【0106】
これにより、補間画素の画像データを生成する処理と、上記重み関数を用いた補間画素の画像データの鮮鋭度のばらつきを小さくする処理とを一連の計算で同時に行うことができるので、補間演算済画像データから構成される画像にノイズのムラを発生させることなく、従来よりも処理時間の短縮化を図ることができるという効果を奏する。
【0107】
本発明の画像処理方法は、上記手順に加えて、上記重み関数が、補間演算済画像データの分散が一定となるように設定されることを特徴としてもよい。
【0108】
これにより、補間演算済画像データの鮮鋭度のばらつきを小さくすることができ、結果として、上記格子点画素から生成される補間画素の位置に応じて変化する重み関数を設定することが可能となるという効果を奏する。すなわち、理論的に上記重み関数を与えることができるので、上述した手間を省くことができる。
【0109】
本発明の画像処理方法は、上記手順に加えて、上記補間画素を算出する演算式を、
【0110】
【数19】
Figure 0003922136
【0111】
として表す場合、
【0112】
【数20】
Figure 0003922136
【0113】
となるように、上記重み関数を設定してもよい。
【0114】
これにより、補間演算済画像データの鮮鋭度のばらつきを小さくできるという効果を奏する。
【0115】
また、上記画像処理方法をコンピュータに実行させるための画像処理プログラムとしても構わない。さらに、上記画像処理プログラムをコンピュータに読み取り可能に記録してなることを特徴とする画像処理プログラムを記録した記録媒体としても構わない。
【図面の簡単な説明】
【図1】本発明の実施の一形態に係る補間演算による画像の拡大(縮小)処理のイメージを示した説明図である。
【図2】上記実施の一形態に係る写真処理システムの概略構成を示すブロック図である。
【図3】上記写真処理システムの構成要素の画像処理部の構成を示したブロック図である。
【図4】1次元のデータに対して線形内挿法による補間を行う場合における、補間画素と格子点画素との位置関係を示した説明図である。
【図5】補間画素の位置を示すパラメータsと、該補間画素の鮮鋭度の低下量との関係を示したグラフである。
【図6】上記実施の一形態に係る補間演算に導入される重み関数u(s),v(t)を示したグラフである。
【図7】1次元のデータに対しての補間に用いられる格子点画素において、該格子点画素とその周囲の2画素とを参照した平滑化処理を示した説明図である。
【図8】上記画像処理部における処理の流れを示したフローチャートである。
【図9】デジタル画像における高周波成分を示した説明図であって、(a)は鮮鋭度のばらつきが大きい場合を示し、(b)は鮮鋭度のばらつきが小さい場合を示したものである。
【図10】上記実施の一形態において、理論的に設定される重み関数w(α)を示したグラフである。
【図11】ある元画像を拡大した場合の拡大画像を示したイメージ図であって、(a)は線形内挿法により拡大した画像を示し、(b)は、(a)の画像におけるある部分のビットマップを示す。
【図12】ある元画像を拡大した場合の拡大画像を示したイメージ図であって、(a)は重み関数u(s),v(t)を導入した3次内挿法により拡大した画像を示し、(b)は、(a)の画像におけるある部分のビットマップを示す。
【図13】ある元画像を拡大した場合の拡大画像を示したイメージ図であって、(a)は重み関数w(α),z(β)を導入した3次内挿法により拡大した画像を示し、(b)は、(a)の画像におけるある部分のビットマップを示す。
【図14】2次元の画像データに対しての線形内挿法における、補間画素と格子点画素との位置関係を示した説明図である。
【図15】平滑化フィルタの一例を示した説明図である。
【符号の説明】
1 画像処理装置
2 デジタルカメラ
3 スキャナ
4 プリンタ
5 画像入力部
6 画像処理部
7 画像出力処理部
8 変更倍率設定手段
9 補間演算部
10 メモリ[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an image processing method for generating an interpolation pixel by performing an interpolation calculation process on digital image data.
[0002]
[Prior art]
In recent years, in the field of photographic processing, so-called digital exposure, in which a photographic image is printed based on digital image data taken from an image recorded on a photographic film, has become widespread. Here, in the case of enlarging or reducing the size of an image composed of digital image data, a method of changing the number of pixels by obtaining a pixel value of an interpolation pixel by a linear interpolation method is widely performed. The linear interpolation method is a method of calculating pixel data to be interpolated by linear interpolation based on data of four surrounding pixels. This linear interpolation method has some difficulty in the sharpness of the edge, but it is most commonly used because it is easy to calculate but has good image quality.
[0003]
Here, this linear interpolation method will be described. The pixel value of the original image is represented by P (i, j) (i, j are coordinate values), and the pixel value Q (x, y) of the enlarged (reduced) image obtained by multiplying the original image by r is calculated. . When r> 1, enlargement processing is performed, and when 0 <r <1, reduction processing is performed. At this time, Q (x, y) is obtained by the following equation.
Q (x, y) = (1-t) {(1-s) P (i, j) + sP (i + 1, j)} + t {(1-s) P (i, j + 1) + sP (i + 1, j + 1)}
In the above equation, i = [x / r], j = [y / r] ([a] represents a maximum integer equal to or smaller than a), s = x / ri, t = y / r -J.
[0004]
FIG. 14 shows the relationship of the above equation. In the above linear interpolation method, when the position of the pixel corresponding to Q (x, y) coincides with the point P (i, j) in the original image (s = t = 0), P (i, The pixel value of j) is used as it is as the pixel value of Q (x, y). On the other hand, the position of the pixel corresponding to Q (x, y) connects four points P (i, j), P (i + 1, j), P (i, j + 1), and P (i + 1, j + 1) in the original image. When located at the center point in the rectangular inner region (s = t = 0.5), the pixel value of Q (x, y) is obtained by adding the pixel values of these four points by 25%.
[0005]
Here, the position of the interpolation pixel corresponding to Q (x, y) is the lattice point coordinates P (i, j), P (i + 1, j), P (i, j + 1), P (i + 1, j + 1) in the original image. ), The closer the pixel value of Q (x, y) is, the higher the ratio of the pixel values of the close points is, and therefore, the sharpness change is smaller. On the other hand, the closer the position of the interpolated pixel corresponding to Q (x, y) is to the center position of the rectangular internal region connecting the grid point coordinates in the original image, the more the pixel value of Q (x, y) is Since the value is influenced by the pixel values of more pixels in the original image, such a process corresponds to a process of smoothing the image, resulting in an image with slightly reduced sharpness.
[0006]
As described above, the image that has been enlarged (reduced) by the linear interpolation method has different sharpness in accordance with the position of each pixel. Especially for images that contain noise or fine patterns, the image will be smoothed in areas with low sharpness, so the remaining noise or fine patterns will appear in the image as unevenness, and the image quality will be significantly reduced. Will do.
[0007]
[Problems to be solved by the invention]
By the way, as a means for eliminating such unevenness, a method of changing the sharpness of each pixel by using a smoothing filter as shown in FIG. 15 for an enlarged (reduced) image created by linear interpolation is proposed. Has been. Here, the functions u (s, r) and v (t, r) used for the smoothing filter are functions that change according to the position of the interpolation pixel and the enlargement (reduction) rate in the enlargement (reduction) process. is there. In other words, by applying a smoothing filter in which the above function is inserted to an enlarged (reduced) image, the sharpness of an interpolation pixel (an interpolation pixel close to one of the grid point coordinates) whose sharpness changes little by interpolation processing Thus, it is possible to perform a process for maintaining the sharpness of an interpolation pixel (an interpolation pixel close to the intermediate position of each grid point coordinate) whose sharpness changes greatly by the interpolation process. As a result, variation in sharpness of the enlarged (reduced) image can be reduced, so that noise unevenness in the image can be eliminated.
[0008]
However, if a smoothing process is performed on the enlarged (reduced) image created by the linear interpolation method using a smoothing filter, the smoothing process needs to be performed after the interpolation process. That is, there has been a problem that processing for generating interpolation pixels and processing for reducing the variation in sharpness of image data of each interpolation pixel must be performed separately, which takes time.
[0009]
The present invention has been made to solve the above-described problems, and reduces the variation in the sharpness of the image composed of the interpolated image data generated by the interpolation operation without causing noise unevenness. Another object of the present invention is to provide an image processing method capable of shortening the processing time as compared with the prior art.
[0010]
[Means for Solving the Problems]
In order to solve the above problems, an image processing method of the present invention generates an interpolation pixel in an image processing method for generating an interpolation pixel and interpolated image data by performing an interpolation calculation process on digital image data. Smoothing the lattice point pixels necessary for performing the interpolation, and generating interpolation pixels from the lattice point pixels, thereby reducing the variation in the sharpness of the interpolated image data. The conversion process is a filter process for applying a predetermined coefficient to the lattice point pixel and surrounding pixels, and the predetermined coefficient is a weight that varies depending on the position of the interpolation pixel generated from the lattice point pixel. It is a function.
[0011]
The process for generating the interpolation pixel is a process for generating image data from a plurality of grid point pixels, and such a process corresponds to an image smoothing process (reducing sharpness). Further, the amount of reduction in the sharpness of the interpolation pixel that occurs in the interpolation calculation process varies depending on the position of the interpolation pixel from the lattice point pixel. Therefore, the sharpness of the interpolation-calculated image data generated by the interpolation calculation processing varies, and noise unevenness may occur in the image.
[0012]
In this regard, in the above-described procedure, the interpolation pixel is generated from the lattice point pixel after smoothing the lattice point pixel necessary for generating the interpolation pixel. Further, the smoothing process is a filter process for applying a predetermined coefficient to the lattice point pixel and surrounding pixels, and the predetermined coefficient is located at a position of an interpolation pixel generated from the lattice point pixel. It is a weighting function that changes accordingly.
[0013]
That is, according to the smoothing process, it is possible to adjust the strength of smoothing for the grid point pixel according to the position of the interpolation pixel generated from the grid point pixel. By generating interpolated pixels from grid point pixels whose sharpness has been changed by such smoothing processing, variation in sharpness of image data that has been interpolated can be reduced, and an image composed of image data that has been interpolated can be reduced. It does not cause noise unevenness.
[0014]
Further, the above procedure is a process of first generating image data of lattice point pixels from the lattice point pixels and surrounding pixels, and further generating image data of interpolation pixels from the image data of each lattice point pixel. That is, this process refers to not only the lattice point pixels but also the pixels around the lattice point pixels in order to generate the pixel values of the interpolation pixels, and thus corresponds to the cubic interpolation calculation as a whole. Therefore, according to the above procedure, the process of generating the image data of the interpolation pixel and the process of reducing the variation in the sharpness of the image data of the interpolation pixel using the weight function can be simultaneously performed by a series of calculations. Therefore, the processing time can be shortened as compared with the prior art without causing noise unevenness in the image composed of the interpolated image data.
[0015]
In addition to the above procedure, the image processing method of the present invention may be characterized in that the weighting function is set so that the variance of the interpolated image data is constant.
[0016]
To set the weighting function, the interpolation processing is performed by changing the weighting function for a plurality of interpolation processing target images as samples, and the weighting function that is determined to have the best image state is plotted. Thus, a means for setting the weight function can be considered. However, in order to carry out such means, laborious experiments must be performed.
[0017]
Therefore, when the variation in the sharpness of the image data in the entire image is small, the magnitude of the high-frequency component of each pixel is almost equal, the dispersion degree of the high-frequency component of each pixel is the same, and the dispersion of the image data is constant. Pay attention. If the weight function is set so that the variance of the interpolated image data is constant, the variation in the sharpness of the interpolated image data can be reduced and, as a result, generated from the lattice point pixels. It is possible to set a weighting function that changes according to the position of the interpolation pixel to be set. That is, since the weight function can be theoretically given, the above-described trouble can be saved.
[0018]
In addition to the above procedure, the image processing method of the present invention includes an arithmetic expression for calculating the interpolation pixel,
[0019]
[Equation 3]
Figure 0003922136
[0020]
As
[0021]
[Expression 4]
Figure 0003922136
[0022]
The weight function may be set so that
[0023]
Since it can be said that the process of generating the interpolation pixel including the smoothing process is an interpolation calculation process by a cubic interpolation method as a whole, the process of calculating the image data of the interpolation pixel is expressed by the equation shown in Equation 3. Can be represented.
[0024]
Here, for convenience of explanation, attention is focused only on the one-dimensional image data D (i + k). First, when an interpolation operation is performed on the one-dimensional data by the cubic interpolation method, four pixels around the interpolation pixel are referred to. Therefore, the distribution D [ Pay attention to i-1], D [i], D [i + 1], D [i + 2]. And from the variance of each pixel value and the covariance of pixel values between adjacent pixels, the variance of the sum of the four image data is:
[0025]
[Equation 5]
Figure 0003922136
[0026]
Can be expressed as
[0027]
On the other hand, when interpolation calculation is performed on the one-dimensional data by cubic interpolation, the image data O [x] of the interpolation pixel is
[0028]
[Formula 6]
Figure 0003922136
[0029]
Therefore, when the variance of O [x] is obtained,
[0030]
[Expression 7]
Figure 0003922136
[0031]
Can be obtained.
[0032]
Further, assuming that noise is added to the image data of the original image, there is a correlation between D [i-1], D [i], D [i + 1], and D [i + 2]. Since the covariance term in Equation 7 can be ignored,
[0033]
[Equation 8]
Figure 0003922136
[0034]
Can be obtained.
[0035]
Here, when the distribution of the image data of the original image is V,
[0036]
[Equation 9]
Figure 0003922136
[0037]
Therefore, Equation 10 can be obtained from Equation 8 and Equation 9.
[0038]
[Expression 10]
Figure 0003922136
[0039]
VoutIs the variance of the interpolated image data.
[0040]
Further, the variance of the interpolated image data (Vout)) Can be made constant, the variation in sharpness of the interpolated image data can be reduced.
[0041]
## EQU11 ##
Figure 0003922136
[0042]
To be. This
[0043]
[Expression 12]
Figure 0003922136
[0044]
Can be obtained. When this is expanded to two-dimensional image data D (i + k, j + 1), the relationship of Equation 4 can be obtained. Therefore, if the weight function is set so as to satisfy the relationship of Equation 4, the variation in the sharpness of the interpolated image data can be reduced.
[0045]
The image processing method may be an image processing program for causing a computer to execute the image processing method. Furthermore, the image processing program may be recorded on a computer so as to be readable, and the image processing program may be recorded as a recording medium.
[0046]
DETAILED DESCRIPTION OF THE INVENTION
An embodiment of the present invention will be described with reference to FIGS. 1 to 13 as follows. The embodiment of the present invention provides an image data of an enlarged (reduced) image (interpolated image data) when performing an image enlargement (reduction) process by a cubic interpolation method (interpolation operation process) in the field of photo processing. ) Is characterized by the introduction of a weight function for reducing variation in sharpness and the procedure for setting this weight function. Therefore, in the following, (1) the configuration of the photographic processing system in which the above enlargement (reduction) processing is executed, (2) the cubic interpolation method introducing the weight function, and (3) the weight function setting procedure will be described in order. .
<Photo processing system configuration>
FIG. 2 is a block diagram showing an outline of the photographic processing system according to the embodiment of the present invention. As shown in FIG. 1, the photographic processing system includes an image processing apparatus 1, a digital camera 2 that inputs digital image data to the image processing apparatus 1, a scanner 3, and image data processed by the image processing apparatus 1. Based on this, the printer 4 for printing images on various papers is provided.
[0047]
The digital camera 2 takes a picture using an imaging device such as a CCD (Charge Coupled Device), and records this as digital image data. Image data photographed by the digital camera 2 is recorded in various storage means such as a flash memory.
[0048]
The scanner 3 reads various analog images as original images with a CCD or the like and converts them into digital image data. The scanner 3 may be a film scanner that reads an image recorded on a photographic film such as a negative film, or may be a scanner that reads, for example, a printed silver salt photograph or an image recorded on another paper-like medium. .
[0049]
The printer 4 may be any printer that can print the image data sent from the image processing apparatus 1. As the printer 4, for example, an ink jet printer, a laser printer, or a light modulation element such as an LCD (Liquid Crystal Display), DMD (Digital Micromirror Device), or PLZT is used to expose a photosensitive material such as photographic paper. For example, a digital printer that performs printing is used.
[0050]
The image processing apparatus 1 is configured by, for example, a PC (Personal Computer) -based apparatus, and is configured by a PC body, a display unit such as a monitor, an input unit such as a keyboard and a mouse, although not illustrated. The image processing apparatus 1 includes an image input unit 5 that captures digital image data from the digital camera 2 and the scanner 3, and an image processing unit that performs various image processes on the digital image data captured by the image input unit 5. 6 and an image output processing unit 7 for outputting the digital image data processed by the image processing unit 6 to the printer 4.
[0051]
As described above, the image input unit 5 is a part serving as an interface between the digital camera 2 and the scanner 3 and the image processing apparatus 1. The connection form is not particularly limited. For example, the connection with the digital camera 2 includes serial connection by RS-232C, USB (Universal Serial Bus) connection, etc. The connection with the scanner 3 is SCSI. (Small Computer System Interface) connection, parallel connection, USB connection, and the like. In the example shown in FIG. 2, the digital camera 2 and the scanner 3 are cited as image data input means, but the present invention is not limited to this. For example, a hard disk drive in which image data is recorded, A system for inputting image data from a removable media drive or the like is also possible.
[0052]
The image processing unit 6 is operated by an image processing program that operates on a PC, for example. Details of the processing in the image processing unit 6 will be described later.
[0053]
The image output processing unit 7 converts the image data that has been subjected to image processing in the image processing unit 6 into a data format that is optimal for output by the printer 4, and transmits the data to the printer 4. The data format conversion is performed by a program called a printer driver, for example. The connection form with the printer 4 is not particularly limited, and examples thereof include parallel connection and USB connection.
[0054]
Next, the configuration of the image processing unit 6 will be described. FIG. 3 is a block diagram showing a conceptual configuration of the image processing unit 6. As shown in the figure, the image processing unit 6 includes a change magnification setting means 8, an interpolation calculation unit 9, and a memory unit 10. The memory unit 10 is provided with an input image memory 10A and an output image memory 10B.
[0055]
The change magnification setting means 8 is a block for setting a change magnification of the size (number of pixels) of input image data, that is, an enlargement ratio or reduction ratio, in accordance with instructions from an operator using various input means such as a mouse and a keyboard. .
[0056]
The interpolation calculation unit 9 performs interpolation calculation based on the change magnification set in the change magnification setting means 8 while referring to the data in the input image memory 10A that buffers the image data input by the image input unit 5. The block to perform. The image data calculated by the interpolation calculation unit 9 is buffered in the output image memory 10B and output to the image output processing unit 7 described above.
[0057]
Next, the flow of processing in the image processing unit 6 will be described with reference to the flowchart shown in FIG. First, in step 1 (hereinafter referred to as S1), the image data of the original image is input and buffered in the input image memory 10A. Here, the input original image may be displayed on a display means such as a monitor.
[0058]
Next, the size of the input original image to be changed is instructed by the operator and set by the change magnification setting means 8 (S2). Here, the size change instruction by the operator may directly specify the enlargement (reduction) magnification, or may specify the size of the image or the number of pixels after the size change. In the latter case, the change magnification (enlargement (reduction) magnification) is calculated by comparing the size or number of pixels of the designated image with the size or number of pixels of the original image.
[0059]
When the change magnification is set, an interpolation operation is performed by the interpolation operation unit 9 in order to change the number of pixels so as to obtain an image size corresponding to the change magnification, and the pixel value (image data) of each interpolation pixel is set. Calculated (S3). The interpolation calculation here is performed by a cubic interpolation method as shown in the equation (1).
[0060]
[Formula 13]
Figure 0003922136
[0061]
The interpolated image that has been interpolated in this way is displayed as an enlarged (reduced) image by the display means (S4), and the enlargement (reduction) process ends.
<Cubic interpolation method>
Next, an interpolation calculation performed by the image processing unit 6 using a cubic interpolation method will be described. First, the pixel value of the lattice point pixel of the original image is represented by D [i, j] (i, j are coordinate values), and the pixel value O [x] of the enlarged (reduced) image obtained by r-folding this original image. , Y]. When r> 1, enlargement processing is performed, and when 0 <r <1, reduction processing is performed. At this time, O [x, y] can be obtained by equation (1).
[0062]
Here, a method for deriving the expression (1) will be described. Note that equation (1) is an equation for calculating the pixel value of the interpolated pixel by performing an interpolation operation by three-dimensional interpolation on two-dimensional data (image data composed of rows and columns). Hereinafter, for convenience of explanation, the derivation method of (1) will be described using one-dimensional data (row-only image data).
[0063]
First, if the coordinate of the interpolation pixel is [x], the coordinate of one grid point pixel of the original image is [i] = [x / r] ([a] represents the maximum integer below a. ). The lattice point pixel is a pixel that exists around the interpolation pixel and is referred to for generating the interpolation pixel. And when calculating the pixel value of the coordinate x by linear interpolation,
O [x] = (1-s) D [i] + sD [i + 1] (2)
Note that s = (x / r) -i. FIG. 4 shows the relationship of equation (2).
[0064]
Here, as shown in FIG. 5, the closer the [x] is to [i] or [i + 1] (when s is close to 0 or 1), the higher the ratio of the pixel values of the close lattice point pixels. Therefore, the change (decrease amount) in the sharpness of the interpolation pixel is reduced. On the other hand, as [x] is closer to the intermediate point between [i] and [i + 1] (when s is closer to 0.5), it is affected by the pixel values of both grid point pixels, so interpolation is performed. The amount of reduction in pixel sharpness increases. Therefore, with respect to the lattice point pixels [i] and [i + 1], the lattice point pixel and the surrounding two pixels are referred to (see FIG. 7), and the weight function u (s) as shown in FIG. 6 is used as a coefficient. When smoothing processing is performed, smoothing is performed on interpolation pixels (interpolation pixels close to one of the grid point coordinates) whose sharpness change is small only by the interpolation processing by the linear interpolation method. Therefore, the sharpness can be maintained for the interpolation pixel having only a large change in sharpness (interpolation pixel close to any grid point coordinate). Thereby, the variation in the sharpness of the image obtained by the linear interpolation process can be reduced. That is, u (s) is a weighting function that changes according to the position of the interpolation pixel generated from the lattice point pixel and a weighting function for reducing the variation in sharpness of the enlarged (reduced) image.
[0065]
Therefore, the calculation of the smoothing process is shown in Equation 14,
[0066]
[Expression 14]
Figure 0003922136
[0067]
Here, in the above calculation, when u (s) = 0, D ′ [i] = D [i]. When u (s) = 1/3, D ′ [i] is an average of D [i−1], D [i], and D [i + 1]. As described above, since the degree of smoothing increases as the value of u (s) increases, smoothing is performed for interpolated pixels (s is close to 0 or 1) with little change in sharpness only by the interpolation process. The sharpness can be maintained for the interpolation pixel (s is close to 0.5) having a large sharpness change only by the interpolation process. Here, the smoothing process is apparent from Equation 14, but is a process of calculating the pixel value of the grid point pixel by applying a coefficient to the grid point pixel and surrounding pixels. This process corresponds to a filter calculation process.
[0068]
When D ′ [i] and D ′ [i + 1] are used to perform an interpolation calculation by the linear interpolation method of Equation (2), Equation (3) is obtained.
[0069]
[Expression 15]
Figure 0003922136
[0070]
Here, since the pixel values of the two grid point pixels are obtained by referring to the respective grid point pixels and the two surrounding pixels, the pixel value of the interpolation pixel obtained from the two grid point coordinates is obtained as a result. It is calculated from the pixel values of the surrounding four pixels. As described above, in the one-dimensional data, the process of generating the interpolation pixel with reference to the four pixels corresponds to the cubic interpolation calculation.
[0071]
Therefore, since the equation (3) is an interpolation operation by a cubic interpolation method for one-dimensional data, this is expanded to an equation for two-dimensional data (image data consisting of rows and columns). Then, equation (1) can be obtained. Note that v (t) is a weight function in the data in the column direction. In other words, the expression (1) is an interpolation calculation that refers to 4 × 4 = 16 pixels by performing an interpolation calculation by two-dimensional interpolation on two-dimensional data.
[0072]
FIG. 1 shows an image obtained by enlarging (reducing) the original image according to the equation (1). Here, O [x, y] is an interpolation pixel generated by the interpolation operation, and D [i, j], D [i, j + 1], D [i + 1, j], D [i + 1, j + 1] are A lattice point pixel is shown.
<Procedure for setting weight function>
The above-described weighting functions u (s) and v (t) are expanded by interpolating by a cubic interpolation method by changing u (s) and v (t) for a plurality of interpolation target images as samples. It can be obtained by performing (reduction) processing and plotting the values of u (s) and v (t) at which the state of the image is determined to be most preferable. However, in this method, the weight functions u (s) and v (t) must be given by experiment, resulting in trouble.
[0073]
However, it is possible to theoretically give the weight function, and it is possible to save time and effort by the above-described experiment. Here, the following describes a procedure for setting these weighting functions that can be theoretically given as w (α) and z (β).
[0074]
Usually, when the variation in the sharpness of the whole image is large in a digital image, as shown in FIG. 9A, the high-frequency component (image data) of each pixel varies. Accordingly, the image data of each pixel has no correlation with the image data of the surrounding pixels, and it can be considered that the dispersion of the image data of this image is not constant.
[0075]
On the other hand, when the variation in the sharpness of the entire image is small in the digital image, as shown in FIG. 9B, the high frequency component of each pixel is substantially constant. Therefore, it can be considered that the dispersion of the image data of this image is constant.
[0076]
Therefore, it is assumed that the variance of pixel values is V for the original image to be enlarged (reduced). In the cubic interpolation method shown in Expression (1), the variance V of the pixel values of the enlarged (reduced) image regardless of the values of s and t.outIf the weighting function is set so that is constant, an enlarged (reduced) image with uniform sharpness can be obtained.
[0077]
Hereinafter, the calculation for deriving the weighting functions w (α) and z (β) will be described. For convenience of description, one-dimensional data (row-only image data) will be used. If the variation in sharpness can be reduced with respect to one-dimensional data (row-only image data), the same processing is performed on one-dimensional data (column-only image data) in another direction. This is because the variation in sharpness can be reduced even for two-dimensional image data (image data composed of rows and columns).
[0078]
First, attention is paid to pixel value distributions D [i−1], D [i], D [i + 1], and D [i + 2] of four pixels on one-dimensional data in the original image. Then, from the variance of the respective pixel values and the covariance of the pixel values between adjacent pixels, the variance of the sum of the four pixel values can be expressed by equation (4). Here, the four pixels are focused because the pixel value of the interpolation pixel is calculated by referring to the four pixels of the original image in the cubic interpolation method in the one-dimensional data.
[0079]
On the other hand, when the interpolation calculation is performed on the one-dimensional data by the cubic interpolation method, the pixel value O [x] of the interpolation pixel can be obtained by Expression (3). Therefore, when the variance of O [x] is obtained using equation (4), equation (5) can be obtained.
[0080]
Further, assuming that the original image has non-uniform sharpness, D [i-1], D [i], D [i + 1], and D [i + 2] are considered to be noise data. ) Equation can be ignored, and equation (6) can be obtained. Noise data refers to pixel data (pixel value) that has no correlation with peripheral pixel data (pixel value).
[0081]
Here, the variance V of the pixel values of the original image can be expressed by equation (7). And (8) Formula can be obtained from (6) Formula and (7) Formula. VoutIs the variance of the pixel values of the enlarged (reduced) image.
[0082]
Further, the variance V of the pixel values of the enlarged (reduced) imageoutCan be made constant, the variation in sharpness of the enlarged (reduced) image can be reduced. Therefore, the equation (9) is set.
[0083]
Here, p shown in equation (3)-1, P0, P1, P2Is replaced by α = s−1 / 2, w (α) = u (s), the equations (10) and (10a) to (10d) can be obtained.
[0084]
[Expression 16]
Figure 0003922136
[0085]
p-1, P0, P1, P2Is modified in order to simplify later calculations. Next, by substituting the equations (10a) to (10d) into the equation (9) and calculating w (α), the equation (11) is obtained.
[0086]
[Expression 17]
Figure 0003922136
[0087]
When w (α) obtained in this way is plotted, the function shown in FIG. 10 is obtained. Here, ignoring a function having a positive root part and focusing on a function having a negative root part (formula (11 ′)), as s approaches 0 or 1, the interpolation pixel is at any grid point. As it approaches the pixel, w (α) increases. On the other hand, as s approaches 0.5 (as the interpolated pixel approaches the intermediate point between the lattice point pixels), w (α) decreases.
[0088]
Therefore, in the one-dimensional data, the function shown in Expression (11 ′) is used as a weight function, and p shown in Expressions (10a) to (10d)-1, P0, P1, P2And the enlargement (reduction) processing is performed by the interpolation operation of the cubic interpolation method shown in the equation (10), the variation in the sharpness of the image data of the enlargement (reduction) image can be reduced. This is because a smoothing weight can be given to an interpolation pixel close to any one of the grid point pixels by the weight function shown in Expression (11 ′), and the interpolation pixel close to the intermediate point of each grid point pixel. This is because the sharpness can be maintained without giving a smoothing weight.
[0089]
Further, when the expressions (10) and (11 ′) are applied to two-dimensional planar image data (image data composed of rows and columns),
[0090]
[Expression 18]
Figure 0003922136
[0091]
It becomes. That is, Equation 18 is p-1 2+ P0 2+ P1 2+ P2 2= Constant, q-1 2+ Q0 2+ Q1 2+ Q2 2= Weighting functions w (α) and z (β) are set so as to be constant.
[0092]
In this way, by introducing the weight functions w (α) and z (β) into the interpolation calculation by the cubic interpolation method, it is possible to reduce the variation in the sharpness of the image data of the enlarged (reduced) image. Therefore, occurrence of noise unevenness can be suppressed.
[0093]
Here, FIGS. 11 to 13 show enlarged images when a certain original image is enlarged. FIG. 11A shows an image enlarged by a conventional linear interpolation method, and FIG. 11B shows a bitmap in a certain part of FIG. FIG. 12A shows an image enlarged by a cubic interpolation method in which weight functions u (s) and v (t) set by experiments are introduced, and FIG. 12B shows FIG. 12A. The bitmap in the part is shown. FIG. 13A shows an image enlarged by a cubic interpolation method in which weight functions w (α) and z (β) are introduced, and FIG. 13B is a bitmap in a certain part of FIG. Indicates. If each bitmap is contrasted, it is expanded by a cubic interpolation method introducing weight functions u (s) and v (t) or by a cubic interpolation method introducing weight functions w (α) and z (β). It can be seen that the obtained image has less noise than the image enlarged by the conventional linear interpolation method.
[0094]
Usually, the process of generating the interpolation pixel is a process of generating a pixel value from a plurality of grid point pixels, and such a process corresponds to an image smoothing process (reducing sharpness). Further, the amount of reduction in the sharpness of the interpolation pixel that occurs in the interpolation calculation process varies depending on the position of the interpolation pixel from the lattice point pixel. Therefore, the variation in the sharpness of the image data of the enlarged (reduced) image generated by the interpolation calculation process is large, and noise unevenness may occur in the image.
[0095]
In this regard, in the present embodiment, the interpolation pixel is generated from the lattice point pixel after smoothing the lattice point pixel necessary for generating the interpolation pixel. Further, the smoothing process is a filter process for applying a predetermined coefficient to the lattice point pixel and surrounding pixels, and the predetermined coefficient is located at a position of an interpolation pixel generated from the lattice point pixel. It is a weighting function that changes accordingly.
[0096]
That is, according to the smoothing process, it is possible to adjust the strength of smoothing for the grid point pixel according to the position of the interpolation pixel generated from the grid point pixel. By generating interpolated pixels from grid point pixels whose sharpness has been changed by such smoothing processing, variation in sharpness of enlarged (reduced) image data can be reduced, and it is composed of interpolated image data. Noise unevenness is not generated in the image to be displayed.
[0097]
Further, the above procedure is a process of first generating a pixel value of a grid point pixel from the grid point pixel and surrounding pixels, and further generating a pixel value of an interpolation pixel from the pixel value of each grid point pixel. That is, this process refers to not only the lattice point pixels but also the pixels around the lattice point pixels in order to generate the pixel values of the interpolation pixels, and thus corresponds to the cubic interpolation calculation as a whole. Therefore, according to the above procedure, the process of generating the image data of the interpolation pixel and the process of reducing the sharpness of the image data of the interpolation pixel using the weight function can be performed simultaneously in a series of calculations. The enlargement (reduction) processing time can be shortened as compared with the prior art without causing noise unevenness in the enlargement (reduction) image.
[0098]
Further, in order to set the weight function, the weight function is changed for a plurality of interpolation target images as samples, the interpolation calculation process is performed, and the weight function that is determined to have the best image state is obtained. A means for setting the weight function by plotting can be considered. However, in order to carry out such means, laborious experiments must be performed.
[0099]
Therefore, in the present embodiment, when the variation in the sharpness of the image data is small in the entire image, the magnitude of the high-frequency component of each pixel is substantially equal, the dispersion degree of the high-frequency component of each pixel is the same, and the dispersion of the image data Note that is constant. If the weight function is set so that the variance of the interpolated image data is constant, the variation in the sharpness of the interpolated image data can be reduced and, as a result, generated from the lattice point pixels. It is possible to set a weighting function that changes according to the position of the interpolation pixel to be set.
[0100]
Further, in the present embodiment, the interpolation calculation by the cubic interpolation method introducing the weight function is applied to the image enlargement (reduction) process. However, the present invention is not limited to this. It can also be applied to parallel movement processing.
[0101]
Incidentally, the processing described in the above embodiments can be realized by a program. This program is stored in a computer-readable recording medium. In the present invention, the recording medium may be a memory (not shown) required for processing by the image processing unit 2 (for example, a ROM itself) or a program as an external storage device (not shown). It may be a program medium provided with a reading device and readable by inserting a recording medium therein.
[0102]
In any of the above cases, the stored program may be executed by accessing a microprocessor (not shown), or the stored program is read and the read program is not shown. The program may be executed by downloading to the program storage area. In this case, it is assumed that the download program is stored in the main device in advance.
[0103]
Here, the program medium is a recording medium configured to be separable from the main body, such as a tape system such as a magnetic tape or a cassette tape, a magnetic disk such as a floppy (registered trademark) disk or a hard disk, or a CD-ROM / MO /. It is a medium that carries a fixed program, including a disk system of an optical disk such as MD / DVD, an IC card (including a memory card) / optical card system, or a semiconductor memory such as a mask ROM, EPROM, or flash ROM. May be.
[0104]
Finally, the above-described embodiments do not limit the scope of the present invention, and various modifications can be made within the scope of the present invention.
[0105]
【The invention's effect】
As described above, the image processing method of the present invention is for generating interpolation pixels in an image processing method for generating interpolation pixels and interpolated image data by performing interpolation calculation processing on digital image data. A smoothing process is performed on necessary grid point pixels, and then an interpolation pixel is generated from the grid point pixels, thereby reducing a variation in sharpness of the interpolated image data. Filter processing for applying a predetermined coefficient to the lattice point pixel and surrounding pixels, and the predetermined coefficient is a weighting function that changes according to the position of the interpolation pixel generated from the lattice point pixel. It is characterized by that.
[0106]
As a result, the process of generating the image data of the interpolation pixel and the process of reducing the variation in the sharpness of the image data of the interpolation pixel using the weight function can be performed simultaneously by a series of calculations. There is an effect that the processing time can be shortened as compared with the prior art without causing noise unevenness in an image composed of image data.
[0107]
In addition to the above procedure, the image processing method of the present invention may be characterized in that the weighting function is set so that the variance of the interpolated image data is constant.
[0108]
As a result, it is possible to reduce the variation in the sharpness of the interpolation-calculated image data, and as a result, it is possible to set a weighting function that changes according to the position of the interpolation pixel generated from the lattice point pixel. There is an effect. That is, since the weight function can be theoretically given, the above-described trouble can be saved.
[0109]
In addition to the above procedure, the image processing method of the present invention includes an arithmetic expression for calculating the interpolation pixel,
[0110]
[Equation 19]
Figure 0003922136
[0111]
As
[0112]
[Expression 20]
Figure 0003922136
[0113]
The weight function may be set so that
[0114]
As a result, it is possible to reduce the variation in the sharpness of the interpolated image data.
[0115]
The image processing method may be an image processing program for causing a computer to execute the image processing method. Furthermore, the image processing program may be recorded on a computer so as to be readable, and the image processing program may be recorded as a recording medium.
[Brief description of the drawings]
FIG. 1 is an explanatory diagram showing an image of image enlargement (reduction) processing by interpolation calculation according to an embodiment of the present invention.
FIG. 2 is a block diagram showing a schematic configuration of a photographic processing system according to the embodiment.
FIG. 3 is a block diagram showing a configuration of an image processing unit as a component of the photographic processing system.
FIG. 4 is an explanatory diagram showing a positional relationship between an interpolation pixel and a grid point pixel when interpolation is performed on one-dimensional data by linear interpolation.
FIG. 5 is a graph showing a relationship between a parameter s indicating the position of an interpolation pixel and a sharpness reduction amount of the interpolation pixel.
FIG. 6 is a graph showing weight functions u (s) and v (t) introduced in the interpolation calculation according to the embodiment.
FIG. 7 is an explanatory diagram showing a smoothing process referring to a lattice point pixel and two surrounding pixels in a lattice point pixel used for interpolation with respect to one-dimensional data.
FIG. 8 is a flowchart showing a flow of processing in the image processing unit.
9A and 9B are explanatory diagrams showing high-frequency components in a digital image, where FIG. 9A shows a case where the variation in sharpness is large, and FIG. 9B shows a case where the variation in sharpness is small.
FIG. 10 is a graph showing a weight function w (α) that is theoretically set in the embodiment.
FIGS. 11A and 11B are image diagrams showing an enlarged image when an original image is enlarged, in which FIG. 11A shows an image enlarged by a linear interpolation method, and FIG. 11B shows a part of the image of FIG. Shows the bitmap.
FIG. 12 is an image diagram showing an enlarged image when an original image is enlarged, and (a) shows an image enlarged by a cubic interpolation method in which weight functions u (s) and v (t) are introduced. (B) shows a bit map of a certain part in the image of (a).
FIG. 13 is an image diagram showing an enlarged image when a certain original image is enlarged, and (a) shows an image enlarged by a cubic interpolation method in which weight functions w (α) and z (β) are introduced. (B) shows a bit map of a certain part in the image of (a).
FIG. 14 is an explanatory diagram showing a positional relationship between an interpolation pixel and a lattice point pixel in a linear interpolation method for two-dimensional image data.
FIG. 15 is an explanatory diagram showing an example of a smoothing filter.
[Explanation of symbols]
1 Image processing device
2 Digital camera
3 Scanner
4 Printer
5 Image input section
6 Image processing unit
7 Image output processor
8 Change magnification setting means
9 Interpolation calculator
10 memory

Claims (5)

デジタル画像データに対して、補間演算処理を行うことによって補間画素および補間演算済画像データを生成する画像処理方法において、
補間画素を生成するために必要な格子点画素に平滑化処理を施してから、上記格子点画素から補間画素を生成することにより、上記補間演算済画像データの鮮鋭度のばらつきを小さくするステップを備え、
上記平滑化処理は、上記格子点画素およびその周囲の画素に対し、所定の係数をかけるフィルタ処理であり、
上記所定の係数は、上記格子点画素から生成される補間画素の位置に応じて変化する重み関数であることを特徴とする画像処理方法。
In an image processing method for generating interpolation pixels and interpolation-calculated image data by performing interpolation calculation processing on digital image data,
Smoothing the lattice point pixels necessary for generating the interpolation pixel, and then generating the interpolation pixel from the lattice point pixel, thereby reducing the variation in the sharpness of the interpolated image data. Prepared,
The smoothing process is a filter process that applies a predetermined coefficient to the lattice point pixel and surrounding pixels.
The image processing method according to claim 1, wherein the predetermined coefficient is a weighting function that changes in accordance with a position of an interpolation pixel generated from the lattice point pixel.
上記重み関数は、補間演算済画像データの分散が一定となるように設定されることを特徴とする請求項1に記載の画像処理方法。The image processing method according to claim 1, wherein the weighting function is set so that the variance of the interpolated image data is constant. 上記補間画素を算出する演算式を、
Figure 0003922136
として表す場合、
Figure 0003922136
となるように、上記重み関数を設定することを特徴とする請求項2に記載の画像処理方法。
An arithmetic expression for calculating the interpolation pixel is
Figure 0003922136
As
Figure 0003922136
The image processing method according to claim 2, wherein the weighting function is set so that
請求項1ないし3に記載の画像処理方法をコンピュータに実行させるための画像処理プログラム。An image processing program for causing a computer to execute the image processing method according to claim 1. 請求項4に記載の画像処理プログラムをコンピュータに読み取り可能に記録してなることを特徴とする画像処理プログラムを記録した記録媒体。A recording medium on which an image processing program according to claim 4 is recorded so as to be readable by a computer.
JP2002234877A 2002-08-12 2002-08-12 Image processing method, image processing program, and recording medium on which image processing program is recorded Expired - Lifetime JP3922136B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002234877A JP3922136B2 (en) 2002-08-12 2002-08-12 Image processing method, image processing program, and recording medium on which image processing program is recorded

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002234877A JP3922136B2 (en) 2002-08-12 2002-08-12 Image processing method, image processing program, and recording medium on which image processing program is recorded

Publications (2)

Publication Number Publication Date
JP2004078357A JP2004078357A (en) 2004-03-11
JP3922136B2 true JP3922136B2 (en) 2007-05-30

Family

ID=32019557

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002234877A Expired - Lifetime JP3922136B2 (en) 2002-08-12 2002-08-12 Image processing method, image processing program, and recording medium on which image processing program is recorded

Country Status (1)

Country Link
JP (1) JP3922136B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008067230A (en) * 2006-09-08 2008-03-21 Sony Corp Image processing apparatus, image processing method, and program
JP4911065B2 (en) * 2008-02-22 2012-04-04 富士ゼロックス株式会社 Image processing apparatus and program
JP6160264B2 (en) * 2013-05-31 2017-07-12 株式会社リコー Image processing apparatus and image processing method

Also Published As

Publication number Publication date
JP2004078357A (en) 2004-03-11

Similar Documents

Publication Publication Date Title
US6724941B1 (en) Image processing method, image processing device, and recording medium
US7756343B2 (en) Image processing method, image processing apparatus, and computer-readable recording medium storing image processing program
US7751640B2 (en) Image processing method, image processing apparatus, and computer-readable recording medium storing image processing program
US20020141005A1 (en) Image processing program and image processing apparatus
US7269300B2 (en) Sharpening a digital image in accordance with magnification values
JP3075269B2 (en) Image data interpolation method, image data interpolation device, and medium recording image data interpolation program
JP5388559B2 (en) Image processing apparatus, image processing method, program for executing image processing method, and storage medium
JP6355315B2 (en) Image processing apparatus, image processing method, and program
JP3922136B2 (en) Image processing method, image processing program, and recording medium on which image processing program is recorded
JP4501959B2 (en) Image processing apparatus and image processing method
JP2001101430A (en) CAD drawing creation support method and apparatus
JP2001160142A (en) Image sharpness determination method, recording medium storing program for performing processing for determining image sharpness, image processing apparatus, and photographic printing apparatus
JP2004054898A (en) Print data generation device, print data generation method, and program therefor
US7167601B2 (en) Image processing device, image processing method, image processing program, and storage medium storing image processing program
JP2001167265A (en) Medium recording image processing program, image processing apparatus, and image processing method
JP2002051210A (en) Image processing method and recording medium recording image processing program
CN112005542B (en) Image layout size calculation device and method, and recording medium
JP4087807B2 (en) Image processing method, apparatus, and program
JP4337386B2 (en) Image processing method, image processing apparatus, image processing program, and image recording apparatus
JP4267159B2 (en) Image processing method and apparatus, and recording medium
JP3063754B2 (en) Image data interpolation device, image data interpolation method, medium recording image data interpolation program
JP2004326325A (en) Method, device and program for processing image and image recording device
JP2004253909A (en) Image processing method
JP4752690B2 (en) Print control apparatus and print control method
JPH10187965A (en) Image processing apparatus and image processing method

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20061013

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20061017

RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20061215

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20070212

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

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20120302

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20120302

Year of fee payment: 5

S801 Written request for registration of abandonment of right

Free format text: JAPANESE INTERMEDIATE CODE: R311801

ABAN Cancellation due to abandonment
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120302

Year of fee payment: 5

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350