JP3791420B2 - Image processing method, image processing program, and computer-readable recording medium recording the program - Google Patents

Image processing method, image processing program, and computer-readable recording medium recording the program Download PDF

Info

Publication number
JP3791420B2
JP3791420B2 JP2002010070A JP2002010070A JP3791420B2 JP 3791420 B2 JP3791420 B2 JP 3791420B2 JP 2002010070 A JP2002010070 A JP 2002010070A JP 2002010070 A JP2002010070 A JP 2002010070A JP 3791420 B2 JP3791420 B2 JP 3791420B2
Authority
JP
Japan
Prior art keywords
pixel
value
change amount
pixel value
center
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
JP2002010070A
Other languages
Japanese (ja)
Other versions
JP2003219177A (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 JP2002010070A priority Critical patent/JP3791420B2/en
Publication of JP2003219177A publication Critical patent/JP2003219177A/en
Application granted granted Critical
Publication of JP3791420B2 publication Critical patent/JP3791420B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Landscapes

  • Image Processing (AREA)
  • Facsimile Image Signal Circuits (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、デジタル画像データに対して、鮮鋭化処理を行なうための画像処理方法に関するものである。
【0002】
【従来の技術】
従来、写真などの画像を印画紙に焼き付ける写真焼付装置として、写真画像が記録されたネガフィルムを介して印画紙を露光するアナログプリンタや、ネガフィルムに記録された画像をスキャナ等で読み取った画像データ、およびデジタルカメラなどによって撮影された画像データに基づいて印画紙を露光するデジタルプリンタが種々提案されている。特に、デジタルプリンタは、画像データに対して色補正や濃度補正等の画像処理をおこなう画像処理装置と組み合わせて用いることで、アナログプリンタでは実現できないような色補正や濃度補正等を行なうことができると共に、顧客の要望に応じた画像を容易にかつ迅速に得ることができるという利点があり、現在広く用いられている。
【0003】
また、コンパクトカメラや使い捨てカメラなどの普及によって、一般の人でもカラー写真を撮影する機会が多くなっている。最近のカメラには、オートフォーカス機能や自動発光機能などが備えられており、写真撮影に不慣れな人でも、ある程度のクォリティで写真撮影を行なうことが可能となっている。しかしながら、オートフォーカス機能では、どこにピントが合うことになるのかが撮影者にとってわかりづらく、主要な被写体がフレームの中央にないときなどは、その主要な被写体にピントが合っていない状態で撮影が行われてしまうこともある。また、自動発光機能によって、逆光撮影時などにおいても、ある程度の写真を撮影することが可能となっているが、それでも不自然な写真画像となることもある。さらに、撮影時の僅かな手ぶれが原因で、全体がぼけた感じの写真画像になることもある。
【0004】
以上のように、撮影された画像には、種々の原因によってぼけが生じている場合がある。そこで、上記の画像処理装置において、入力されたデジタル画像データにぼけが生じている場合には、鮮鋭化処理と呼ばれる画像処理を行なうことがある。鮮鋭化処理とは、ぼけによる画像の劣化を復元させたり、あるいは目的に応じて画像を見やすくしたりために、画像におけるエッジを強調する処理のことである。鮮鋭化処理の具体的な方法としては、1次微分演算による強調や2次微分演算(ラプラシアン)による強調などがあるが、比較的自然な強調処理を行なうことができることから、ラプラシアンによる強調が広く用いられている。
【0005】
ラプラシアンによる処理は、原画像の画像データにおける各画素値から、その画像データの各画素におけるラプラシアンを減算することによってエッジの強調が行われる。原画像の画像データにおける各画素値、すなわち原信号をf(i,j)(i,j は座標を表す)、ラプラシアンによる処理が施された後の各画素値、すなわち処理済信号をF(i,j)とすると、上記の処理は、次の式で表される。
F(i,j)=f(i,j)-∇2f(i,j) (1)
以上の処理を図12(a)ないし(d)に基づいて説明すれば次のようになる。図12(a)は、横方向に各画素の位置、縦方向に画素値をとった原信号の概略を示しており、同図(b)は、原信号の一次微分、同図(c)は、原信号のラプラシアン、同図(d)は、上記の(1)式で求められる、(原信号)−(ラプラシアン)をそれぞれ示している。
【0006】
図12(a)に示す原信号は、左側で画素値が低く、右側で画素値が高くなっており、中央付近に境界領域が存在している。この境界領域での画素値の変化は、ややなだらかになっており、多少エッジがぼやけている状態となっている。
【0007】
この原信号に対して一次微分を行なうと、図12(b)に示すように、境界領域の中央部分で極大値をとる分布となる。そして、さらに微分を行なうことによってラプラシアンを求めると、図12(c)に示すように、境界領域の左側に極大値、右側に極小値をとる分布となる。このラプラシアンを、原信号から減算すると、原信号において、左側の画素値が低い領域から境界領域に変化する部分の値は、ラプラシアンにおける左側の極大値が減算されることによって、さらに低くなる。また、原信号において、境界領域から右側の画素値が高い領域に変化する部分の値は、ラプラシアンにおける右側の極小値が減算される(極小値が負の値であるので、実質的に加算される)ことによって、さらに高くなる。したがって、図12(d)に示すように、境界領域の画素値の変化が、原信号に比べて急峻となり、ぼけが抑制され、エッジが強調されることになる。
【0008】
図12(a)ないし(d)において示した処理を、数式に基づいて説明すれば以下のようになる。上記の(1)式の右辺は、次のように変形することができる。
【0009】
【数1】

Figure 0003791420
【0010】
なお、上記の(2)式は、説明の便宜上、注目画素を中心とする3×3のマトリクスを想定した式となっている。この(2)式において、座標(i,j) にある画素が、画素値変化における傾斜の中央付近、すなわち傾斜の変化がほとんどない領域や、画素値変化がほとんどない領域にある場合には、∇2f(i,j)=0 であり、F(i,j)=f(i,j)-∇2f(i,j) からF(i,j)=f(i,j) となり、画素値の変化はほとんどないことになる。
【0011】
一方、座標(i,j) にある画素が、画素値変化における傾斜の下部、すなわち、エッジにおける画素値の低い側にある場合には、座標(i,j) の周囲には、f(i,j)よりも画素値の大きい画素が多く存在することになる。よって、(2)式右辺の第2項以降の、座標(i,j) の周囲の8つの画素の画素値の総和は、f(i,j)の8倍よりも大きくなる。したがって、f(i,j)- ∇2f(i,j)<f(i,j)となり、画素値が若干小さくなる。
【0012】
また、座標(i,j) にある画素が、画素値変化における傾斜の上部、すなわち、エッジにおける画素値の高い側にある場合には、座標(i,j) の周囲には、f(i,j)よりも画素値の小さい画素が多く存在することになる。よって、(2)式右辺の第2項以降の、座標(i,j) の周囲の8つの画素の画素値の総和は、f(i,j)の8倍よりも小さくなる。したがって、f(i,j)- ∇2f(i,j)>f(i,j)となり、画素値が若干大きくなる。
【0013】
このように、ラプラシアン演算による画像処理を行なうことによって、画像のエッジにおいて、画素値が低い側はより低く、画素値が高い側はより高くなるような処理が行われるので、エッジが強調されることになる。
【0014】
【発明が解決しようとする課題】
上記のように、ラプラシアン演算による画像処理を行なえば、画像のエッジを強調することによって、画像のぼけを抑制することが可能となるが、同時に、ノイズが増幅されるという問題や、オーバーシュート、アンダーシュートが生じるという問題も発生することになる。
【0015】
まず、ノイズが増幅されることについて以下に説明する。図13(a)は、ノイズが発生している画像における、横方向に各画素の位置、縦方向に画素値をとった原信号を示しており、同図(b)は、上記の(1)式で求められる、(原信号)−(ラプラシアン)を示している。図13(a)と(b)とを比較すればわかるように、ラプラシアンによる画像処理を行なうことによってノイズが増幅されてしまっている。このことについて、具体的な数値を使って以下に説明する。
【0016】
【表1】
Figure 0003791420
【0017】
表1において、1行目の各数字は、一次元上に並んだ原信号における各画素値を示しており、画素値が100で均一な画像データ中に、画素値が125となるノイズが1か所含まれている状態を示している。2行目の各数字は、1行目の原信号に対応するラプラシアンを示しており、画素値の変化が無い画素では0であるが、ノイズが生じている画素の両隣の画素で25、ノイズが生じている画素で−50となっている。3行目の各数字は、(原信号)−(ラプラシアン)を示しており、画素値の変化が無い画素では、原信号と同じ100となっているが、ノイズが生じている画素の両隣の画素で75に減少し、ノイズが生じている画素で175に増大している。
【0018】
このように、原信号において、画素値が125であったノイズが、ラプラシアンによる画像処理を行なうことによって、画素値で175に増大しており、著しくノイズが増幅されていることがわかる。また、ノイズが生じている画素の両隣の画素の画素値が若干減少しているので、ノイズが余計に目立つような状態になっている。
【0019】
次に、オーバーシュート、アンダーシュートが生じることについて以下に説明する。図14(a)は、エッジが比較的明確となっている画像における、横方向に各画素の位置、縦方向に画素値をとった原信号を示しており、同図(b)は、原信号のラプラシアン、同図(c)は、上記の(1)式で求められる、(原信号)−(ラプラシアン)をそれぞれ示している。図14(c)に示すように、エッジが比較的明確となっている画像に対してラプラシアンによる画像処理を行なうと、エッジを中心にして、画素値が低い側はより低い値に、画素値が高い側はより高い値に画素値が変換されており、アンダーシュートおよびオーバーシュートが生じていることがわかる。このことについて、具体的な数値を使って以下に説明する。
【0020】
【表2】
Figure 0003791420
【0021】
表2において、1行目の各数字は、一次元上に並んだ原信号における各画素値を示しており、画素値が100の画素領域と、画素値が150の画素領域とが隣接した状態、すなわち、エッジにおいて急激に値が変化している状態を示している。2行目の各数字は、1行目の原信号に対応するラプラシアンを示しており、画素値の変化が無い画素では0であるが、画素値が150の画素に隣接している、画素値が100の画素では、ラプラシアンが50となっており、画素値が100の画素に隣接している、画素値が150の画素では、ラプラシアンが−50となっている。3行目の各数字は、(原信号)−(ラプラシアン)を示しており、画素値の変化が無い画素では、原画像画素データと同じ画素値となっているが、画素値が150の画素に隣接している、画素値が100の画素では、画素値が50に減少しており、画素値が100の画素に隣接している、画素値が150の画素では、画素値が200に上昇している。
【0022】
このように、エッジが比較的明確となっている画像に対してラプラシアンによる画像処理を行なうと、エッジの近傍でオーバーシュートおよびアンダーシュートが生じていることがわかる。このような処理が行われると、例えば、暗い背景の中に明るい被写体が写っている写真画像において、被写体の周縁部分が必要以上に明るくなったり、被写体の周囲の背景に暗い縁が生じたりすることになり、不自然な写真画像となってしまう。
【0023】
また、ラプラシアン演算による処理以外の鮮鋭化処理としては、フーリエ変換などにより画像を周波数レベルに変換し、周波数に応じた鮮鋭化を行なうものがある。画像を周波数レベルに変換すると、画像の輪郭が周波数に対応することになる。これを利用して、変換された周波数から、画像の輪郭が特定され、該輪郭に対して鮮鋭化処理が行なわれる。
【0024】
これにより、絵柄に応じたきめ細かい鮮鋭化処理が可能であり、鮮鋭化処理によりノイズが増幅されたり、オーバーシュートやアンダーシュートが生じることがない。
【0025】
しかしながら、この周波数変換を利用した鮮鋭化処理では、画像の輪郭を特定するために、広い画素領域(例えば、1024×1024画素領域)に対して鮮鋭化処理を行なう必要があり、計算の規模が大きくなるという問題点がある。
【0026】
本発明は、上記の問題点を解決するためになされたもので、その目的は、デジタル画像データに対して、鮮鋭化処理を行なう際に、ノイズの強調や、オーバーシュート・アンダーシュートの発生などの問題が生じない画像処理方法、画像処理プログラム、および該プログラムを記録した記録媒体を提供することにある。
【0027】
【課題を解決するための手段】
一般に、鮮鋭化処理を行なうべき画像の境界領域では、連続する複数の画素の画素値は、単調増加または単調減少している。一方、ノイズが発生している画素は、その周囲の画素に比べて画素値が大きく異なるため、図13に示すような極大点となるか、あるいは極小点となっている。
【0028】
従って、ノイズが発生している画素を中心画素とする画素群の中から第1の画素を選択し、中心画素に対して第1の画素と対称位置にある画素を第2の画素ととして、中心画素を通る直線上に順に並ぶ第1の画素、中心画素および第2の画素について画素値の変化を調べると、第1の画素の画素値に対して中心画素の画素値が増加している場合には、中心画素の画素値に対して第2の画素の画素値が減少し、第1の画素の画素値に対して中心画素の画素値が減少している場合には、中心画素の画素値に対して第2の画素の画素値が増加することになる。
【0029】
すなわち、第1の画素の画素値に対する中心画素の画素値の変化量である第1の変化量が正である場合には、中心画素の画素値に対する第2の画素の画素値の変化量である第2の変化量が負となり、第1の変化量が負である場合には、第2の変化量が正となる。
【0030】
従って、上記の方法によると、第1の変化量および第2の変化量の一方が正であり他方が負である場合には、少なくとも、第1の画素、中心画素および第2の画素の並びに関しては、中心画素にノイズが発生していると判断でき、このため、前記画素群において鮮鋭化処理を行なう際に、第1の画素の画素値および第2の画素の画素値を利用しないことにより、ノイズの増幅を防止することができる。
【0031】
請求項1に記載の画像処理方法は、上記の課題を解決するために、原画像の画像データに関して、画素ごとに、該画素を中心とした所定範囲の画素群の画素値を利用して前記画素の画素値を変更することにより鮮鋭化処理を行なう画像処理方法において、前記画素群に含まれる第1の画素と、前記画素群において中心とされた中心画素とに関して、第1の画素の画素値に対する前記中心画素の画素値の変化量である第1の変化量を求め、前記中心画素と、前記中心画素に対して第1の画素と対称位置にある第2の画素とに関して、前記中心画素の画素値に対する第2の画素の画素値の変化量である第2の変化量を求め、第1の変化量および第2の変化量の両方が、正および負の何れか一方である場合には、第1の変化量および第2の変化量の大小関係に応じて、第1の画素および第2の画素の何れか一方の画素値に前記中心画素の画素値を変更することにより、鮮鋭化処理が行なわれることを特徴とする画像処理方法であって、第1の変化量の絶対値の方が第2の変化量の絶対値よりも小さい場合には、第1の画素の画素値に前記中心画素の画素値を変更し、第1の変化量の絶対値の方が第2の変化量の絶対値よりも大きい場合には、第1の画素の画素値と前記中心画素の画素値との間の値に前記中心画素の画素値を変更することを特徴としている。
【0032】
ここで、第1の画素の画素値と前記中心画素の画素値との間の値の例としては、前記中心画素の画素値から第2の変化量だけ減算した値が挙げられる。
【0033】
第1の変化量の絶対値の方が第2の変化量の絶対値よりも小さい場合は、第1の画素の画素値から中心画素の画素値への変化の方が、中心画素の画素値から第2の画素の画素値への変化よりも緩慢である。このとき、中心画素の画素値は、第1の画素の画素値の方が、第2の画素の画素値よりも近くなる。
【0034】
従って、上記の方法のように、第1の画素の画素値に中心画素の画素値を変更する方が、第2の画素の画素値に中心画素の画素値を変更するよりも、前記境界領域における画素値の変化が小さくなる。
【0035】
また、第1の変化量の絶対値の方が第2の変化量の絶対値よりも大きい場合は、第1の画素の画素値から中心画素の画素値への変化の方が、中心画素の画素値から第2の画素の画素値への変化よりも急激である。
【0036】
従って、上記の方法のように、第1の画素の画素値と前記中心画素の画素値との間の値に前記中心画素の画素値を変更することにより、第1の画素の画素値から中心画素の画素値への変化が緩和される。
【0037】
その結果、上記の方法によると、前記鮮鋭化処理により前記境界領域が狭くなっても、前記境界領域における画素値の変化を自然なものとすることができる。
【0038】
また、請求項2に記載の画像処理方法は、原画像の画像データに関して、画素ごとに、該画素を中心とした所定範囲の画素群の画素値を利用して前記画素の画素値を変更することにより鮮鋭化処理を行なう画像処理方法において、前記画素群に含まれる第1の画素と、前記画素群において中心とされた中心画素とに関して、第1の画素の画素値に対する前記中心画素の画素値の変化量である第1の変化量を求め、前記中心画素と、前記中心画素に対して第1の画素と対称位置にある第2の画素とに関して、前記中心画素の画素値に対する第2の画素の画素値の変化量である第2の変化量を求め、第1の変化量および第2の変化量の両方が、正および負の何れか一方である場合には、第1の変化量および第2の変化量の大小関係に応じて、第1の画素および第2の画素の何れか一方の画素値に前記中心画素の画素値を変更することにより、鮮鋭化処理が行なわれることを特徴とする画像処理方法であって、第1の変化量および第2の変化量の両方が正であるときには、第1の変化量の絶対値の方が第2の変化量の絶対値よりも小さい場合に、第1の画素の画素値に前記中心画素の画素値を変更し、第1の変化量の絶対値の方が第2の変化量の絶対値よりも大きい場合に、第1の画素の画素値と前記中心画素の画素値との間の値に前記中心画素の画素値を変更する一方、第1の変化量および第2の変化量の両方が負であるときには、第1の変化量の絶対値の方が第2の変化量の絶対値よりも小さい場合に、前記中心画素の画素値と第2の画素の画素値との間の値に前記中心画素の画素値を変更し、第1の変化量の絶対値の方が第2の変化量の絶対値よりも大きい場合に、第2の画素の画素値に前記中心画素の画素値を変更することを特徴としている。
【0039】
ここで、前記中心画素の画素値と第2の画素の画素値との間の値の例としては、前記中心画素の画素値から第1の変化量の絶対値だけ減算した値が挙げられる。
【0040】
上記の方法では、第1の変化量および第2の変化量の両方が正であるとき、すなわち、第1の画素、中心画素および第2の画素の順に画素値が増加するときには、上記請求項4と同様の鮮鋭化処理が行なわれる。一方、第1の変化量および第2の変化量の両方が負であるとき、すなわち、第1の画素、中心画素および第2の画素の順に画素値が減少するときには、以下のような鮮鋭化処理が行なわれる。
【0041】
すなわち、第1の変化量の絶対値の方が第2の変化量の絶対値よりも小さい場合は、第1の画素の画素値から中心画素の画素値への変化よりも、中心画素の画素値から第2の画素の画素値への変化の方が急激である。
【0042】
従って、上記の方法のように、前記中心画素の画素値と第2の画素の画素値の間の値に前記中心画素の画素値を変更することにより、中心画素の画素値から第2の画素の画素値への変化が緩和される。
【0043】
また、第1の変化量の絶対値の方が第2の変化量の絶対値よりも大きい場合は、第1の画素の画素値から中心画素の画素値への変化よりも、中心画素の画素値から第2の画素の画素値への変化の方が緩慢である。このとき、中心画素の画素値は、第1の画素の画素値よりも、第2の画素の画素値の方が近くなる。
【0044】
従って、上記の方法のように、第1の画素の画素値に中心画素の画素値を変更するよりも、第2の画素の画素値に中心画素の画素値を変更する方が、前記境界領域における画素値の変化が小さくなる。
【0045】
その結果、上記の方法によると、請求項1に記載の画像処理方法と同様に、前記鮮鋭化処理により前記境界領域が狭くなっても、前記境界領域における画素値の変化を自然なものとすることができる。
【0046】
また、上記の方法では、中心画素の画素値を小さくする方へ変更しているから、鮮鋭化処理された画像の境界領域部分は、原画像に比べて暗くなる。従って、上記の方法は、例えば、露光過多などにより、ハレーションの発生している画像に対して好適である。
【0047】
また、請求項3に記載の画像処理方法は、原画像の画像データに関して、画素ごとに、該画素を中心とした所定範囲の画素群の画素値を利用して前記画素の画素値を変更することにより鮮鋭化処理を行なう画像処理方法において、前記画素群に含まれる第1の画素と、前記画素群において中心とされた中心画素とに関して、第1の画素の画素値に対する前記中心画素の画素値の変化量である第1の変化量を求め、前記中心画素と、前記中心画素に対して第1の画素と対称位置にある第2の画素とに関して、前記中心画素の画素値に対する第2の画素の画素値の変化量である第2の変化量を求め、第1の変化量および第2の変化量の両方が、正および負の何れか一方である場合には、第1の変化量および第2の変化量の大小関係に応じて、第1の画素および第2の画素の何れか一方の画素値に前記中心画素の画素値を変更することにより、鮮鋭化処理が行なわれることを特徴とする画像処理方法であって、第1の変化量および第2の変化量の両方が正であり、かつ、前記中心画素の画像値が中間値よりも小さいとき、もしくは、第1の変化量および第2の変化量の両方が負であり、かつ、前記中心画素の画像値が中間値以上であるときには、第1の変化量の絶対値の方が第2の変化量の絶対値よりも小さい場合に、第1の画素の画素値に前記中心画素の画素値を変更し、第1の変化量の絶対値の方が第2の変化量の絶対値よりも大きい場合に、第1の画素の画素値と前記中心画素の画素値との間の値に前記中心画素の画素値を変更する一方、第1の変化量および第2の変化量の両方が正であり、かつ、前記中心画素の画像値が中間値以上であるとき、もしくは、第1の変化量および第2の変化量の両方が負であり、かつ、前記中心画素の画像値が中間値よりも小さいときには、第1の変化量の絶対値の方が第2の変化量の絶対値よりも小さい場合に、前記中心画素の画素値と第2の画素の画素値の間の値に前記中心画素の画素値を変更し、第1の変化量の絶対値の方が第2の変化量の絶対値よりも大きい場合に、第2の画素の画素値に前記中心画素の画素値を変更することにより行なわれることを特徴としている。
【0048】
ここで、中間値とは、画素値の最大値の半分のことである。
【0049】
上記の方法において、まず、第1の画素、中心画素および第2の画素の順に画素値が増加するときを考える。前記中心画素の画像値が中間値よりも小さいときには、請求項1に記載の画像処理方法と同様の鮮鋭化処理が行なわれることにより、前記境界領域が狭くなるとともに、前記境界領域における画素値の変化を自然なものとすることができる。
【0050】
また、前記中心画素の画像値が中間値よりも大きいときには、請求項2に記載の画像処理方法において第1の画素、中心画素および第2の画素の順に画素値が減少するときに行なわれる鮮鋭化処理と同様の鮮鋭化処理が行なわれることにより、前記境界領域が狭くなるとともに、前記境界領域における画素値の変化を自然なものとすることができる。
【0051】
次に、第1の画素、中心画素および第2の画素の順に画素値が減少するときを考える。前記中心画素の画像値が中間値よりも大きいときには、請求項1に記載の画像処理方法と同様の鮮鋭化処理が行なわれることにより、前記境界領域が狭くなるとともに、前記境界領域における画素値の変化を自然なものとすることができる。
【0052】
また、前記中心画素の画像値が中間値よりも小さいときには、請求項2に記載の画像処理方法において第1の画素、中心画素および第2の画素の順に画素値が減少するときに行なわれる鮮鋭化処理と同様の鮮鋭化処理が行なわれることにより、前記境界領域が狭くなるとともに、前記境界領域における画素値の変化を自然なものとすることができる。
【0053】
従って、上記の方法によると、1回の鮮鋭化処理で、請求項1またはよりも前記境界領域を狭くすることができる。
【0054】
また、請求項4に記載の画像処理方法は、請求項1〜3に記載の画像処理方法において、第1の変化量および第2の変化量の一方が正であり他方が負である場合には、前記中心画素の画素値を変更しないことを特徴としている。
【0055】
上記の方法によると、第1の変化量および第2の変化量の一方が正であり他方が負である場合には、上述のように、少なくとも、第1の画素、中心画素および第2の画素の並びに関しては、中心画素にノイズが発生していると判断でき、このため、前記画素群において鮮鋭化処理を行なう際に、前記中心画素の画素値を変更しないことにより、ノイズの増幅を防止することができる。
【0056】
また、請求項5に記載の画像処理方法は、請求項1からまでの何れか1項に記載の画像処理方法において、前記中心画素の画素値を変更することは、前記画像群における第1の画素および第2の画素の全組合せについて、前記中心画素の画素値を変更する場合の変更すべき画素値と、変更しない場合の前記中心画素の画素値とを足し合わせ、組合せ数で割ることにより算出した平均値に、前記中心画素の画素値を変更することにより行なわれることを特徴としている。
【0057】
これにより、前記画素群に含まれる全ての画素の画素値に基づいて、中心画素の画素値を変更することができる。
【0058】
なお、請求項1からの何れか1項に記載の画像処理方法により行なわれる前記鮮鋭化処理を、画像処理プログラムによりコンピュータ上で実行させることができる。さらに、前記画像処理プログラムをコンピュータ読み取り可能な記録媒体に記憶させることにより、任意のコンピュータ上で前記鮮鋭化処理を実行させることができる。
【0059】
【発明の実施の形態】
〔実施の形態1〕
以下、本発明の実施の一形態について図1〜図3に基づいて説明する。
【0060】
図2は、本発明の実施の形態に係る画像出力システムの概略構成を示すブロック図である。該画像出力システムは、フィルムスキャナ1と、画像処理装置2と、写真焼付装置3とを備えた構成となっている。
【0061】
フィルムスキャナ1は、例えば、光源からの光を、写真フィルムであるネガフィルムに照射し、その透過光をCCD(Charge Coupled Device) 等で受光することにより、ネガフィルムに記録された画像を読み取るものである。このフィルムスキャナ1は、読み取った画像データを赤色成分、緑色成分、青色成分ごとに画像処理装置2に出力する。
【0062】
写真焼付装置3は、画像処理装置2によって処理がなされた画像データに基づいて感光材料である印画紙を露光することにより、印画紙上に画像を焼き付けるものである。デジタル画像データに応じた光を印画紙に照射するヘッドとしては、デジタル画像データに応じて各画素毎に印画紙への照射光を変調可能な光変調素子が用いられる。この光変調素子としては、例えばPLZT露光ヘッド、DMD(デジタル・マイクロミラー・デバイス)、LCD(液晶表示装置)、LED(Light Emitting Diode)パネル、レーザー、FOCRT(Fiber Optic Cathode Ray Tube)、CRT(Cathode Ray Tube)等が挙げられる。
【0063】
なお、写真焼付装置3は、ネガフィルムのスキャニングと印画紙の露光とを両方行なうことができるオートプリンタとして構成してもよい。この場合、写真処理装置を、画像の読み取りから焼付けまでを行なうオートプリンタと、PC(Personal Computer) などによって構成される画像処理装置2とを接続した構成とすることにより、システムの簡素化を図ることができる。
【0064】
画像処理装置2は、フィルムスキャナ1から送られた画像データに対して、鮮鋭化処理を行い、鮮鋭化が行われた画像データを写真焼付装置3に供給するものである。以下、画像処理装置2における鮮鋭化の処理方法について図1および図3に基づいて説明する。
【0065】
まず、図3に示すように、注目画素と、該注目画素を中心画素とする画素群を設定する(ステップ10、以降、S10と称する)。該画素群に含まれる画素の占める領域の形状は、中心画素に対して点対称な画素どうしが前記画素群に含まれるような形状であれば、正方形、長方形、ひし形、十字形など、任意の形状およびサイズを選択することができる。
【0066】
しかしながら、サイズが大きくなれば、計算処理が増加するから、前記画素群としては、3行3列の画素領域に含まれる9個の画素や、5行5列の画素領域に含まれる25個の画素を使用することが望ましい。
【0067】
次に、設定された画素群に対して鮮鋭化処理が行なわれる(S11)。この鮮鋭化処理の詳細については後述する。そして、全画素について鮮鋭化処理が終了したか否かが判断され(S12)、終了していない場合には、S10に戻って前記の処理を繰り返す。
【0068】
次に、前記鮮鋭化処理(S11)について図1に基づいて説明する。まず、図3に示すS10にて設定された画素群の中から第1の画素および第2の画素を選択する(S20)。第1の画素は、前記画素群の中から任意の画素を選択できる。また、第2の画素は、中心画素に対して第1の画素と対称位置にある画素である。従って、第1の画素が選択されれば、第2の画素が自動的に選択される。
【0069】
なお、第1の画素は、前記画素群の中から中心画素以外の画素を選択することが望ましい。また、第1の画素および第2の画素を重複して選択することを防ぐため、第1の画素は、前記画素群が存在する領域のうち、例えば上半分の領域といった、半分の領域を特定し、特定された該領域に存在する画素の中から選択することが望ましい。
【0070】
次に、中心画素の画素値f0、第1の画素の画素値f1、および第2の画素の画素値f2を用いて、以下の式から第1の変化量v1および第2の変化量v2を求める(S21)。
【0071】
v1=f0−f1、v2=f2−f0 (3)
次に、第1の変化量v1および第2の変化量v2は、何れか一方が0以上であり、かつ他方が0以下であるか否かを判断する(S22)。この条件を満たす場合には、第1の画素および第2の画素を無視して、中心画素に対して鮮鋭化処理を行なう(S23)。一方、この条件を満たさない場合、すなわち、第1の変化量v1および第2の変化量v2の両方が、正および負の何れか一方である場合には、第1の画素および第2の画素を考慮して、中心画素に対して鮮鋭化処理を行なう(S24)。
【0072】
なお、本実施形態における鮮鋭化処理は、前述のようなラプラシアン演算を利用した鮮鋭化処理でもよいし、後述する鮮鋭化処理でもよい。
【0073】
次に、画素群内の中心画素を除く全ての画素を、第1の画素または第2の画素として選択したか否かを判断する(S25)。この条件を満たさない場合には、S20に戻って上記の処理を繰り返す。一方、この条件を満たす場合には、鮮鋭化処理された注目画素(中心画素)について画素値を算出して(S26)、鮮鋭化処理のルーチンが終了し、図3に示すS12に進む。
【0074】
なお、S23またはS24の鮮鋭化処理において、式(2)のような、逐次演算により中心画素の画素値が算出できる場合には、前記S26は不要である。
【0075】
上記の鮮鋭化処理において第1の画素および第2の画素を無視する場合には、第1の変化量v1が正でありかつ第2の変化量v2が負である場合、すなわち、第1の画素の画素値に対して中心画素の画素値が増加し、中心画素の画素値に対して第2の画素の画素値が減少する場合が含まれる。
【0076】
ところで、第2の画素が中心画素に対して第1の画素と対称位置にあることから、第1の画素、中心画素および第2の画素は、同一の直線上にこの順序で並ぶことになる。従って、上記の場合は、図13に示すような極大点となるノイズが中心画素に発生している場合であると考えることができる。
【0077】
同様に、上記の鮮鋭化処理において第1の画素および第2の画素を無視する場合には、第1の変化量v1が負でありかつ第2の変化量v2が正である場合、すなわち、第1の画素の画素値に対して中心画素の画素値が減少し、中心画素の画素値に対して第2の画素の画素値が増加する場合が含まれる。そして、この場合は、極小点となるノイズが中心画素に発生している場合であると考えることができる。
【0078】
従って、上記の鮮鋭化処理においては、中心画素にノイズが発生している場合には、鮮鋭化処理を行なわないから、鮮鋭化処理によるノイズの増幅を防止することができる。
【0079】
また、上記の鮮鋭化処理において第1の画素および第2の画素を無視する場合には、第1の変化量v1が0である場合、すなわち、第1の画素の画素値に対して中心画素の画素値が等しい場合と、第2の変化量v2が0である場合、すなわち、中心画素の画素値に対して第2の画素の画素値が等しい場合とが含まれる。
【0080】
図14を参照すると、ラプラシアン演算による鮮鋭化処理において発生するオーバーシュートまたはアンダーシュートは、ほぼ一定の原信号が増加または減少に転じる場合、または、増加または減少している原信号がほぼ一定に転じる場合に生じていることが理解できる。これらの場合は、第1の変化量v1が0でありかつ第2の変化量v2が正または負である場合と、第1の変化量v1が正または負でありかつ第2の変化量v2が0である場合とに相当する。
【0081】
従って、上記の鮮鋭化処理を、ラプラシアン演算による鮮鋭化処理に適用すると、オーバーシュートまたはアンダーシュートが生じる画素を中心画素とする場合には鮮鋭化処理を行なわないことから、鮮鋭化処理の際にオーバーシュートまたはアンダーシュートが発生することを防止することができる。
【0082】
なお、上記の鮮鋭化処理において第1の画素および第2の画素を無視する他の場合には、第1の変化量v1および第2の変化量v2が0である場合、すなわち、第1の画素、中心画素および第2の画素の画素値が等しい場合が含まれる。この場合は、鮮鋭化処理を行なっても、処理後の中心画素の画素値に影響を与えないから、鮮鋭化処理を行なわなくても差し支えがない。
【0083】
〔実施の形態2〕
次に、本発明の他の実施の形態について説明する。なお、前記した実施の形態で説明したステップと同様の作用を有するステップには、同一の符号を付して、その説明を省略する。
【0084】
本実施形態の画像出力システムは、図2に示す画像出力システムに新たな鮮鋭化処理の方法を適用したものである。以下、本実施形態における鮮鋭化処理を図4に基づいて説明する。なお、この鮮鋭化処理を開始する前に、後記する積算値sを初期化しておく。
【0085】
まず、第1実施形態と同様に、画素群の中から第1の画素および第2の画素を選択し(S20)、式(3)を用いて、第1の変化量v1および第2の変化量v2を求める(S21)。
【0086】
次に、第1の変化量v1および第2の変化量v2は、何れか一方が0以上であり、かつ他方が0以下であるか否かを判断する(S22)。この条件を満たす場合には、第1の画素および第2の画素を無視して、中心画素の画素値f0を積算値sに加算する(S30)。
【0087】
一方、この条件を満たさない場合、すなわち、第1の変化量v1および第2の変化量v2の両方が、正および負の何れか一方である場合には、第1の変化量の絶対値|v1|が、第2の変化量の絶対値|v2|よりも小さいか否かを判断する(S31)。この条件を満たす場合には、第1の画素の画素値f1を積算値sに加算する(S32)。一方、この条件を満たさない場合には、中心画素の画素値f0から第2の変化量v2を減算した値を、積算値sに加算する(S33)。
【0088】
次に、画素群内の中心画素を除く全ての画素を、第1の画素または第2の画素として選択したか否かを判断する(S25)。この条件を満たさない場合には、S20に戻って上記の処理を繰り返す。
【0089】
一方、この条件を満たす場合には、積算値sを、選択された第1の画素の総数で除算した値に中心画素の画素値f0を変更して(S34)、鮮鋭化処理のルーチンを終了し、図3に示すS12に進む。
【0090】
上記の鮮鋭化処理において、第1の変化量v1および第2の変化量v2の何れか一方が0以上であり、かつ他方が0以下である条件を満たす場合には、上述のように、ノイズの増幅等を防止するため、中心画素の元の画素値f0を積算する。
【0091】
一方、この条件を満たさない場合とは、第1の変化量v1および第2の変化量v2の両方が、正および負の何れか一方である場合であり、すなわち、同一直線上に並ぶ第1の画素、中心画素および第2の画素の画素値が、この順序で単調増加または単調減少する場合である。この場合は、画像の境界領域と考えられるので、以下のような鮮鋭化処理が行なわれる。
【0092】
ここで、本実施形態における鮮鋭化処理について、より具体的な場合について説明する。なお、本実施形態および後記の実施形態において説明する図7〜図11では、横方向は各画素の位置を示し、縦方向は各画素の画素値を示している。
【0093】
また、図7〜図11では、理解を容易にするために、1次元の画像について示している。また、図7〜図11における鮮鋭化処理では、画素群が、連続する3つの画素により構成され、中心画素の左側に隣り合う画素を第1の画素として選択するものとする。従って、中心画素の右側に隣り合う画素が第2の画素となる。
【0094】
図7は、鮮鋭化処理前の画像データを示している。同図において、画素P1から画素P4までは、画素値が単調増加しており、画素P5から画素P8までは、画素値が単調減少している。従って、画素P1から画素P4までの領域と、画素P5から画素P8までの領域とが画像の境界領域となる。
【0095】
図8は、本実施形態における鮮鋭化処理が行なわれた画像データを示している。また、図9は、画素P2・P3の順番で、本実施形態における鮮鋭化処理が行なわれる様子を示している。以下、本実施形態における鮮鋭化処理を説明する。なお、図7〜図9の場合では、選択可能な第1の画素は1つのみであるので、鮮鋭化処理により、S32におけるf1に、またはS33におけるf0−v2に、中心画素の画素値が変更されることになる。
【0096】
図9(a)は、鮮鋭化処理前の画素値を示している。まず、画素P2を中心画素とし、画素P1を第1の画素、画素P3を第2の画素とする。このとき、第1の変化量v1、すなわち、画素P1の画素値に対する画素P2の変化量は、第2の変化量v2、すなわち、画素P2の画素値に対する画素P3の変化量よりも小さいから、同図(b)に示すように、S32の処理により、画素P2の画素値が画素P1の画素値に変更される。
【0097】
次に、画素P3を中心画素とし、画素P2を第1の画素、画素P4を第2の画素とする。このとき、第1の変化量v1、すなわち、画素P2の画素値に対する画素P3の変化量は、第2の変化量v2、すなわち、画素P3の画素値に対する画素P4の変化量よりも大きいから、同図(c)に示すように、S33の処理により、画素P3の画素値が第2の変化量v2だけ減少される。
【0098】
同様に、画素P5〜P8に対して、本実施形態の鮮鋭化処理を行なう。まず、画素P6を中心画素とし、画素P5を第1の画素、画素P7を第2の画素とする。このとき、第1の変化量の絶対値|v1|、すなわち、画素P5の画素値に対する画素P6の変化量の絶対値は、第2の変化量の絶対値|v2|、すなわち、画素P2の画素値に対する画素P3の変化量の絶対値よりも小さいから、S32の処理により、画素P6の画素値が、画素P5の画素値に変更される。
【0099】
次に、画素P7を中心画素とし、画素P6を第1の画素、画素P8を第2の画素とする。このとき、第1の変化量の絶対値|v1|、すなわち、画素P6の画素値に対する画素P7の変化量の絶対値は、第2の変化量の絶対値|v2|、すなわち、画素P7の画素値に対する画素P8の変化量の絶対値よりも大きいから、S33の処理により、画素P7の画素値が、第2の変化量v2だけ減少されて、鮮鋭化処理が終了する。なお、第2の変化量v2は負であるから、画素P7の画素値は、実際には増加することになる。
【0100】
従って、図7に示す画像データは、本実施形態の鮮鋭化処理により、図8に示す画像データとなる。図7と図8とを比較すると、画像の境界領域は、鮮鋭化処理前には、画素P1から画素P4までと、画素P5から画素P8までとであったのに対し、鮮鋭化処理後には、画素P2から画素P4までと、画素P6から画素P8までとなっており、境界領域の幅が減少していることが理解できる。従って、上記の処理により画像が鮮鋭化されたことが理解できる。
【0101】
また、画素P3の画素値が減少し、画素P7の画素値が増加することにより、画素P2の画素値から画素P3の画素値への変化と、画素P6の画素値から画素P7の画素値への変化とが緩和されるから、上記の鮮鋭化処理により境界領域が狭くなっても、境界領域における画素値の変化を自然なものとすることができる。
【0102】
また、本実施形態における鮮鋭化処理では、中心画素の画素値は、第1の画素の画素値から第2の画素の画素値までの範囲内にのみ変更され、該範囲からはみ出すことはないから、ラプラシアン演算による鮮鋭化処理において発生するオーバーシュートおよびアンダーシュートが発生することがない。
【0103】
〔実施の形態3〕
次に、本発明のさらに他の実施の形態について説明する。なお、前記した実施の形態で説明したステップと同様の作用を有するステップには、同一の符号を付して、その説明を省略する。
【0104】
本実施形態の画像出力システムは、第2実施形態の画像出力システムにおける鮮鋭化処理の方法を一部変更したものである。以下、本実施形態における鮮鋭化処理を図5に基づいて説明する。なお、この鮮鋭化処理を開始する前に、積算値sを初期化しておく。
【0105】
まず、上記の実施形態と同様に、画素群の中から第1の画素および第2の画素を選択し(S20)、式(3)を用いて、第1の変化量v1および第2の変化量v2を求める(S21)。
【0106】
次に、第1の変化量v1および第2の変化量v2は、何れか一方が0以上であり、かつ他方が0以下であるか否かを判断する(S22)。この条件を満たす場合には、第2実施形態と同様に、第1の画素および第2の画素を無視して、中心画素の画素値f0を積算値sに加算する(S30)。
【0107】
一方、この条件を満たさない場合には、第1の変化量v1および第2の変化量v2の両方が、正および負の何れであるかを判断する(S40)。両方とも正である場合には、第2実施形態と同様の処理S31〜S33が行なわれる。一方、両方とも負である場合には、第1の変化量の絶対値|v1|が、第2の変化量の絶対値|v2|よりも大きいか否かを判断する(S41)。この条件を満たす場合には、第2の画素の画素値f2を積算値sに加算する(S42)。一方、この条件を満たさない場合には、中心画素の画素値f0から第1の変化量の絶対値|v1|を減算した値を、積算値sに加算する(S43)。以降の処理は、第2実施形態の処理S25・S34と同様である。
【0108】
上記の鮮鋭化処理において、上記の実施形態と同様に、同一直線上に並ぶ第1の画素、中心画素および第2の画素の画素値が、この順序で単調増加または単調減少する場合には、以下の鮮鋭化処理が行なわれ、これ以外の場合では、ノイズの増幅等を防止するため、積算値sに中心画素の元の画素値f0が加算される。
【0109】
ここで、本実施形態における鮮鋭化処理について、より具体的な場合について図7および図10を参照して説明する。なお、図7および図10の場合では、選択可能な第1の画素は1つのみであるので、鮮鋭化処理により、S32におけるf1、S33におけるf0−v2、S42におけるf2、および、S43におけるf0−|v1|の中の何れか1つに、中心画素の画素値が変更されることになる。
【0110】
まず、画素P1〜P4に対しては、第2実施形態と同様の鮮鋭化処理S31〜S33が行なわれるから、その説明を省略する。
【0111】
次に、画素P5〜P8に対して、本実施形態の鮮鋭化処理を行なう。まず、画素P6を中心画素とし、画素P5を第1の画素、画素P7を第2の画素とする。このとき、第1の変化量の絶対値|v1|、すなわち、画素P5の画素値に対する画素P6の変化量の絶対値は、第2の変化量の絶対値|v2|、すなわち、画素P6の画素値に対する画素P7の変化量の絶対値よりも小さいから、S43の処理により、画素P6の画素値が、第1の変化量の絶対値|v1|だけ減少される。
【0112】
次に、画素P7を中心画素とし、画素P6を第1の画素、画素P8を第2の画素とする。このとき、第1の変化量の絶対値|v1|、すなわち、画素P6の画素値に対する画素P7の変化量の絶対値は、第2の変化量の絶対値|v2|、すなわち、画素P7の画素値に対する画素P8の変化量の絶対値よりも大きいから、S42の処理により、画素P7の画素値が、画素P8の画素値に変更されて、鮮鋭化処理が終了する。
【0113】
従って、図7に示す画像データは、本実施形態の鮮鋭化処理により、図10に示す画像データとなる。図7と図10とを比較すると、第2実施形態と同様に、本実施形態の鮮鋭化処理により、境界領域の幅が減少しているから、画像が鮮鋭化されたことが理解できる。
【0114】
また、画素P3および画素P6の画素値が減少することにより、画素P2の画素値から画素P3の画素値への変化と、画素P6の画素値から画素P7の画素値への変化とが緩和されるから、上記の鮮鋭化処理により境界領域が狭くなっても、境界領域における画素値の変化を自然なものとすることができる。
【0115】
また、本実施形態における鮮鋭化処理では、中心画素の画素値は、第1の画素の画素値から第2の画素の画素値までの範囲内にのみ変更され、該範囲からはみ出すことはないから、ラプラシアン演算による鮮鋭化処理において発生するオーバーシュートおよびアンダーシュートが発生することがない。
【0116】
また、本実施形態における鮮鋭化処理では、図10に示すように、中心画素の画素値を小さくする方へ変更しているから、鮮鋭化処理された画像の境界領域部分は、原画像に比べて暗くなる。従って、本実施形態における鮮鋭化処理は、例えば、露光過多などにより、ハレーションの発生している画像に対して好適である。
【0117】
〔実施の形態4〕
次に、本発明のさらに他の実施の形態について説明する。なお、前記した実施の形態で説明したステップと同様の作用を有するステップには、同一の符号を付して、その説明を省略する。
【0118】
本実施形態の画像出力システムは、第3実施形態の画像出力システムにおける鮮鋭化処理の方法を一部変更したものである。以下、本実施形態における鮮鋭化処理を図6に基づいて説明する。なお、この鮮鋭化処理を開始する前に、積算値sを初期化しておく。
【0119】
まず、S40以前の処理S20・S21・S22は、第3実施形態と同様である。S40において、第1の変化量v1および第2の変化量v2の両方が正である場合には、中心画素f0の画素値が中間の画素値よりも小さいか否かを判断する(S50)。ここで、中間の画素値とは、画素値として取り得る最大値の半分であり、例えば、画素値が256階調となる場合には、中間の画素値は128である。
【0120】
中心画素f0の画素値が中間の画素値よりも小さい場合には、第2実施形態と同様の処理S31〜S33が行なわれる。一方、中心画素f0の画素値が中間の画素値以上である場合には、第3実施形態と同様の処理S41〜S43が行なわれる。
【0121】
一方、S40において、第1の変化量v1および第2の変化量v2の両方が負である場合にも、S50と同様に、中心画素f0の画素値が中間の画素値よりも小さいか否かを判断する(S51)。しかしながら、S50と異なり、S51では、中心画素f0の画素値が中間の画素値よりも小さい場合には、第3実施形態と同様の処理S41〜S43が行なわれる一方、中心画素f0の画素値が中間の画素値以上である場合には、第2実施形態と同様の処理S31〜S33が行なわれる。
【0122】
上記の鮮鋭化処理において、上記の実施形態と同様に、同一直線上に並ぶ第1の画素、中心画素および第2の画素の画素値が、この順序で単調増加または単調減少する場合には、以下の鮮鋭化処理が行なわれ、これ以外の場合では、ノイズの増幅等を防止するため、積算値sに中心画素の元の画素値f0が加算される。
【0123】
ここで、本実施形態における鮮鋭化処理について、より具体的な場合について図7および図11を参照して説明する。なお、図7および図11の場合では、選択可能な第1の画素は1つのみであるので、鮮鋭化処理により、S32におけるf1、S33におけるf0−v2、S42におけるf2、および、S43におけるf0−|v1|の中の何れか1つに、中心画素の画素値が変更されることになる。
【0124】
まず、画素P2を中心画素とし、画素P1を第1の画素、画素P3を第2の画素とする。このとき、第1の変化量v1、すなわち、画素P1の画素値に対する画素P2の変化量と、第2の変化量v2、すなわち、画素P2の画素値に対する画素P3の変化量とは、ともに正であり、かつ、中心画素P2は中間値よりも小さいから、S50の処理によって、第2実施形態と同様の鮮鋭化処理S31〜S33が行なわれる。すなわち、中心画素P2の画素値は、第1の画素P1の画素値に変更される。
【0125】
次に、画素P3を中心画素とし、画素P2を第1の画素、画素P4を第2の画素とする。このとき、第1の変化量v1、すなわち、画素P2の画素値に対する画素P3の変化量と、第2の変化量v2、すなわち、画素P3の画素値に対する画素P4の変化量とは、ともに正であり、かつ、中心画素P3は中間値よりも大きいから、S50の処理によって、第3実施形態と同様の鮮鋭化処理S41〜S43が行なわれる。すなわち、第1の変化量の絶対値|v1|が第2の変化量の絶対値|v2|よりも大きくなるから、中心画素P3の画素値は、第2の画素P4の画素値に変更される。
【0126】
次に、画素P6を中心画素とし、画素P5を第1の画素、画素P7を第2の画素とする。このとき、第1の変化量v1、すなわち、画素P5の画素値に対する画素P6の変化量と、第2の変化量v2、すなわち、画素P6の画素値に対する画素P7の変化量とは、ともに負であり、かつ、中心画素P6は中間値よりも大きいから、S51の処理によって、第2実施形態と同様の鮮鋭化処理S31〜S33が行なわれる。すなわち、中心画素P6の画素値は、第1の画素P5の画素値に変更される。
【0127】
次に、画素P7を中心画素とし、画素P6を第1の画素、画素P8を第2の画素とする。このとき、第1の変化量v1、すなわち、画素P6の画素値に対する画素P7の変化量と、第2の変化量v2、すなわち、画素P7の画素値に対する画素P8の変化量とは、ともに負であり、かつ、中心画素P7は中間値よりも小さいから、S51の処理によって、第3実施形態と同様の鮮鋭化処理S41〜S43が行なわれる。すなわち、中心画素P7の画素値は、第2の画素P8の画素値に変更されて、鮮鋭化処理が終了する。
【0128】
従って、図7に示す画像データは、本実施形態の鮮鋭化処理により、図11に示す画像データとなる。図11を、第2実施形態による図8、および第3実施形態による図10と比較すると、本実施形態の鮮鋭化処理により、境界領域の幅がさらに減少しているから、画像がさらに鮮鋭化されたことが理解できる。
【0129】
また、本実施形態における鮮鋭化処理では、中心画素の画素値は、第1の画素の画素値から第2の画素の画素値までの範囲内にのみ変更され、該範囲からはみ出すことはないから、ラプラシアン演算による鮮鋭化処理において発生するオーバーシュートおよびアンダーシュートが発生することがない。
【0130】
なお、第2〜第4実施形態における鮮鋭化処理は、繰り返し行なうことができる。鮮鋭化処理を繰り返すことにより、境界領域の幅が狭くなるから、画像がより鮮鋭化されることになる。
【0131】
また、第2〜第4実施形態では、S32におけるf1、S33におけるf0−v2、S42におけるf2、および、S43におけるf0−|v1|を積算しているが、中心画素と第1の画素との位置関係に応じた重みを付加してもよい。
【0132】
また、第2〜第4実施形態では、S33においてf0−v2を計算し、S43においてf0−|v1|を計算しているが、これらの計算は、S32およびS42における鮮鋭化処理によって生じる画素値の急激な変化を自然なものとするためのものである。
【0133】
従って、S33は、第1の画素の画素値f1と中心画素の画素値f0との間の画素値を算出するものであれば、任意の計算を行なうことができ、S43は、中心画素の画素値f0と第2の画素の画素値f2との間の画素値を算出するものであれば、任意の計算を行なうことができる。
【0134】
また、以上説明した画像の鮮鋭化処理を機能させるためのプログラムで実現することが可能である。このプログラムはコンピュータで読み取り可能な記録媒体に格納されている。この場合、図2で示した画像処理装置2は、コンピュータによって構成されることになる。そして、上記の記録媒体として、画像処理装置2を構成するコンピュータが備えるマイクロコンピュータで処理が行われるために必要なメモリ、例えばROMのようなものそのものがプログラムメディアであってもよいし、また外部記憶装置としてプログラム読み取り装置が設けられ、そこに記録媒体を挿入することで読み取り可能なプログラムメディアであってもよい。
【0135】
いずれの場合においても、格納されているプログラムは、上記コンピュータが備えるマイクロプロセッサがアクセスして実行させる構成であってもよいし、あるいはいずれの場合もプログラムを読み出し、読み出されたプログラムは、マイクロコンピュータのプログラム記憶エリアにダウンロードされて、そのプログラムが実行される方式であってもよい。このダウンロード用のプログラムは予め本体装置に格納されているものとする。
【0136】
ここで上記プログラムメディアは、本体と分離可能に構成される記録媒体であり、磁気テープやカセットテープ等のテープ系、フロッピーディスクやハードディスク等の磁気ディスクやCD−ROM/MO/MD/DVD等の光ディスクのディスク系、ICカード(メモリカードを含む)/光カード等のカード系、あるいはマスクROM、EPROM、EEPROM、フラッシュROM等による半導体メモリを含めた固定的にプログラムを担持する媒体であってもよい。
【0137】
また、本発明においてはインターネットを含む通信ネットワークと接続可能なシステム構成とすることも可能であり、通信ネットワークからプログラムをダウンロードするように流動的にプログラムを担持する媒体であってもよい。尚、このように通信ネットワークからプログラムをダウンロードする場合には、そのダウンロード用プログラムは予め本体装置に格納しておくか、あるいは別な記録媒体からインストールされるものであってもよい。
【0138】
尚、記録媒体に格納されている内容としてはプログラムに限定されず、データであってもよい。
【0139】
【発明の効果】
請求項1に記載の画像処理方法は、以上のように、原画像の画像データに関して、画素ごとに、該画素を中心とした所定範囲の画素群について鮮鋭化処理を行なう画像処理方法において、前記画素群に含まれる第1の画素と、前記画素群において中心とされた中心画素とに関して、第1の画素の画素値に対する前記中心画素の画素値の変化量である第1の変化量を求め、前記中心画素と、前記中心画素に対して第1の画素と対称位置にある第2の画素とに関して、前記中心画素の画素値に対する第2の画素の画素値の変化量である第2の変化量を求め、第1の変化量および第2の変化量の両方が、正および負の何れか一方である場合には、第1の変化量および第2の変化量の大小関係に応じて、第1の画素および第2の画素の何れか一方の画素値に前記中心画素の画素値を変更することにより、鮮鋭化処理が行なわれることを特徴とする画像処理方法であって、第1の変化量の絶対値の方が第2の変化量の絶対値よりも小さい場合には、第1の画素の画素値に前記中心画素の画素値を変更し、第1の変化量の絶対値の方が第2の変化量の絶対値よりも大きい場合には、第1の画素の画素値と前記中心画素の画素値との間の値に前記中心画素の画素値を変更する方法である。
【0140】
これにより、前記鮮鋭化処理により前記境界領域が狭くなっても、前記境界領域における画素値の変化を自然なものにできるという効果を奏する。
【0141】
また、請求項2に記載の画像処理方法は、以上のように、原画像の画像データに関して、画素ごとに、該画素を中心とした所定範囲の画素群について鮮鋭化処理を行なう画像処理方法において、前記画素群に含まれる第1の画素と、前記画素群において中心とされた中心画素とに関して、第1の画素の画素値に対する前記中心画素の画素値の変化量である第1の変化量を求め、前記中心画素と、前記中心画素に対して第1の画素と対称位置にある第2の画素とに関して、前記中心画素の画素値に対する第2の画素の画素値の変化量である第2の変化量を求め、第1の変化量および第2の変化量の両方が、正および負の何れか一方である場合には、第1の変化量および第2の変化量の大小関係に応じて、第1の画素および第2の画素の何れか一方の画素値に前記中心画素の画素値を変更することにより、鮮鋭化処理が行なわれることを特徴とする画像処理方法であって、前記鮮鋭化処理は、第1の変化量および第2の変化量の両方が正であるときには、第1の変化量の絶対値の方が第2の変化量の絶対値よりも小さい場合に、第1の画素の画素値に前記中心画素の画素値を変更し、第1の変化量の絶対値の方が第2の変化量の絶対値よりも大きい場合に、第1の画素の画素値と前記中心画素の画素値との間の値に前記中心画素の画素値を変更する一方、第1の変化量および第2の変化量の両方が負であるときには、第1の変化量の絶対値の方が第2の変化量の絶対値よりも小さい場合に、前記中心画素の画素値と第2の画素の画素値との間の値に前記中心画素の画素値を変更し、第1の変化量の絶対値の方が第2の変化量の絶対値よりも大きい場合に、第2の画素の画素値に前記中心画素の画素値を変更する方法である。
【0142】
これにより、請求項1に記載の画像処理方法と同様に、前記鮮鋭化処理により前記境界領域が狭くなっても、前記境界領域における画素値の変化を自然なものにできるという効果を奏する。また、上記の方法は、例えば、露光過多などにより、ハレーションの発生している画像に対して好適である。
【0143】
また、請求項3に記載の画像処理方法は、以上のように、原画像の画像データに関して、画素ごとに、該画素を中心とした所定範囲の画素群について鮮鋭化処理を行なう画像処理方法において、前記画素群に含まれる第1の画素と、前記画素群において中心とされた中心画素とに関して、第1の画素の画素値に対する前記中心画素の画素値の変化量である第1の変化量を求め、前記中心画素と、前記中心画素に対して第1の画素と対称位置にある第2の画素とに関して、前記中心画素の画素値に対する第2の画素の画素値の変化量である第2の変化量を求め、第1の変化量および第2の変化量の両方が、正および負の何れか一方である場合には、第1の変化量および第2の変化量の大小関係に応じて、第1の画素および第2の画素の何れか一方の画素値に前記中心画素の画素値を変更することにより、鮮鋭化処理が行なわれることを特徴とする画像処理方法であって、第1の変化量および第2の変化量の両方が正であり、かつ、前記中心画素の画像値が中間値よりも小さいとき、もしくは、第1の変化量および第2の変化量の両方が負であり、かつ、前記中心画素の画像値が中間値以上であるときには、第1の変化量の絶対値の方が第2の変化量の絶対値よりも小さい場合に、第1の画素の画素値に前記中心画素の画素値を変更し、第1の変化量の絶対値の方が第2の変化量の絶対値よりも大きい場合に、第1の画素の画素値と前記中心画素の画素値との間の値に前記中心画素の画素値を変更する一方、第1の変化量および第2の変化量の両方が正であり、かつ、前記中心画素の画像値が中間値以上であるとき、もしくは、第1の変化量および第2の変化量の両方が負であり、かつ、前記中心画素の画像値が中間値よりも小さいときには、第1の変化量の絶対値の方が第2の変化量の絶対値よりも小さい場合に、前記中心画素の画素値と第2の画素の画素値の間の値に前記中心画素の画素値を変更し、第1の変化量の絶対値の方が第2の変化量の絶対値よりも大きい場合に、第2の画素の画素値に前記中心画素の画素値を変更することにより行なわれる方法である。
【0144】
これにより、1回の鮮鋭化処理で、請求項1またはよりも前記境界領域を狭くできるという効果を奏する。
【0145】
また、請求項4に記載の画像処理方法は、以上のように、請求項1〜3のいずれか1項に記載の画像処理方法において、第1の変化量および第2の変化量の一方が正であり他方が負である場合には、前記中心画素の画素値を変更しない方法である。
【0146】
これにより、ノイズの増幅を防止できる効果を奏する。
【0147】
また、請求項5に記載の画像処理方法は、以上のように、請求項1から4までの何れか1項に記載の画像処理方法において、前記中心画素の画素値を変更することは、前記画像群における第1の画素および第2の画素の全組合せについて、前記中心画素の画素値を変更する場合の変更すべき画素値と、変更しない場合の前記中心画素の画素値とを足し合わせ、組合せ数で割ることにより算出した平均値に、前記中心画素の画素値を変更することにより行なわれる方法である。
【0148】
これにより、前記画素群に含まれる全ての画素の画素値に基づいて、中心画素の画素値を変更できるという効果を奏する。
【0149】
なお、請求項1からの何れか1項に記載の画像処理方法により行なわれる前記鮮鋭化処理を、画像処理プログラムによりコンピュータ上で実行させることができる。さらに、前記画像処理プログラムをコンピュータ読み取り可能な記録媒体に記憶させることにより、任意のコンピュータ上で前記鮮鋭化処理を実行させることができる。
【図面の簡単な説明】
【図1】 本発明の実施の一形態における鮮鋭化処理の詳細を示すフローチャートである。
【図2】 本実施形態における画像出力システムの概略構成を示すブロック図である。
【図3】 本実施形態における鮮鋭化処理の概要を示すフローチャートである。
【図4】 本発明の他の実施の形態における鮮鋭化処理の詳細を示すフローチャートである。
【図5】 本発明のさらに他の実施の形態における鮮鋭化処理の詳細を示すフローチャートである。
【図6】 本発明のさらに他の実施の形態における鮮鋭化処理の詳細を示すフローチャートである。
【図7】 画像処理装置に入力された1次元の画像データを示すグラフである。
【図8】 図7に示す画像データを図4に示す鮮鋭化処理を用いて処理した画像データを示すグラフである。
【図9】 図7に示す画像データを図4に示す鮮鋭化処理を用いて処理する過程を示すグラフである。
【図10】 図7に示す画像データを図5に示す鮮鋭化処理を用いて処理した画像データを示すグラフである。
【図11】 図7に示す画像データを図6に示す鮮鋭化処理を用いて処理した画像データを示すグラフである。
【図12】 同図(a)は、横方向に各画素の位置、縦方向に画素値をとった原画像画素データの概略、同図(b)は、原画像の画素データの一次微分値、同図(c)は、原画像の画素データのラプラシアン値、同図(d)は、(原画像画素データ)−(ラプラシアン値)をそれぞれ示すグラフである。
【図13】 同図(a)は、ノイズが発生している画像における、横方向に各画素の位置、縦方向に画素値をとった原画像画素データ、同図(b)は、(原画像画素データ)−(ラプラシアン値)をそれぞれ示すグラフである。
【図14】 同図(a)は、エッジが比較的明確となっている画像における、横方向に各画素の位置、縦方向に画素値をとった原画像画素データ、同図(b)は、原画像の画素データのラプラシアン値、同図(c)は、(原画像画素データ)−(ラプラシアン値)をそれぞれ示すグラフである。
【符号の説明】
1 フィルムスキャナ
2 画像処理装置
3 写真焼付装置
f0 中心画素の画素値
f1 第1の画素の画素値
f2 第2の画素の画素値
v1 第1の変化量
v2 第2の変化量[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an image processing method for performing sharpening processing on digital image data.
[0002]
[Prior art]
Conventionally, as a photographic printing apparatus for printing an image such as a photograph on photographic paper, an analog printer that exposes the photographic paper through a negative film on which a photographic image is recorded, or an image obtained by reading an image recorded on the negative film with a scanner or the like Various digital printers that expose photographic paper based on data and image data taken by a digital camera or the like have been proposed. In particular, a digital printer can perform color correction, density correction, and the like that cannot be realized by an analog printer, by using it in combination with an image processing apparatus that performs image processing such as color correction and density correction on image data. In addition, there is an advantage that an image according to the customer's request can be obtained easily and quickly, and it is currently widely used.
[0003]
In addition, with the spread of compact cameras, disposable cameras, etc., there are increasing opportunities for ordinary people to take color photographs. Recent cameras are equipped with an autofocus function, an automatic light emitting function, etc., and even a person unfamiliar with photography can take a picture with a certain quality. However, with the autofocus function, it is difficult for the photographer to know where the subject is in focus, and when the main subject is not in the center of the frame, shooting is performed with the main subject out of focus. Sometimes it breaks. In addition, although the automatic light emitting function allows taking a certain amount of photos even during backlight shooting, it may still result in unnatural photographic images. Furthermore, the image may be blurred as a whole due to slight camera shake during shooting.
[0004]
As described above, a photographed image may be blurred due to various causes. Therefore, in the above-described image processing apparatus, when the input digital image data is blurred, image processing called sharpening processing may be performed. The sharpening process is a process for emphasizing an edge in an image in order to restore degradation of the image due to blurring or to make the image easier to see according to the purpose. Specific methods of sharpening processing include emphasis by primary differential operation and emphasis by secondary differential operation (Laplacian). Since relatively natural enhancement processing can be performed, enhancement by Laplacian is widely used. It is used.
[0005]
In the Laplacian processing, edge enhancement is performed by subtracting the Laplacian of each pixel of the image data from each pixel value of the image data of the original image. Each pixel value in the image data of the original image, that is, the original signal is represented by f (i, j) (i, j represents coordinates), and each pixel value after being processed by Laplacian, that is, the processed signal is represented by F ( If i, j), the above processing is expressed by the following equation.
F (i, j) = f (i, j) -∇2f (i, j) (1)
The above process will be described with reference to FIGS. 12 (a) to 12 (d). FIG. 12A shows an outline of the original signal in which the position of each pixel is taken in the horizontal direction and the pixel value is taken in the vertical direction, and FIG. 12B shows the first derivative of the original signal. Indicates the Laplacian of the original signal, and FIG. 4D shows (original signal) − (Laplacian) obtained by the above equation (1).
[0006]
The original signal shown in FIG. 12A has a low pixel value on the left side and a high pixel value on the right side, and a boundary region exists near the center. The change in the pixel value in the boundary region is slightly smooth, and the edge is slightly blurred.
[0007]
When the primary differentiation is performed on the original signal, as shown in FIG. 12B, a distribution having a maximum value is obtained at the central portion of the boundary region. When the Laplacian is obtained by further differentiating, as shown in FIG. 12C, a distribution having a maximum value on the left side of the boundary region and a minimum value on the right side is obtained. When this Laplacian is subtracted from the original signal, the value of the portion of the original signal where the pixel value on the left side changes from the low region to the boundary region is further reduced by subtracting the maximum value on the left side in the Laplacian. In the original signal, the value of the portion where the pixel value on the right side changes from the boundary region to the region where the right pixel value is high is subtracted from the right minimum value in Laplacian (because the minimum value is a negative value, it is substantially added). It will be even higher. Therefore, as shown in FIG. 12D, the change in the pixel value of the boundary region becomes steep compared to the original signal, blur is suppressed, and the edge is emphasized.
[0008]
The processing shown in FIGS. 12A to 12D will be described as follows based on mathematical expressions. The right side of the above equation (1) can be modified as follows.
[0009]
[Expression 1]
Figure 0003791420
[0010]
The above formula (2) is a formula assuming a 3 × 3 matrix centered on the pixel of interest for convenience of explanation. In this equation (2), if the pixel at the coordinates (i, j) is in the vicinity of the center of the gradient in the pixel value change, that is, in the region where there is almost no change in the tilt, or in the region where there is almost no change in the pixel value, ∇2f (i, j) = 0, F (i, j) = f (i, j) -∇2f (i, j) to F (i, j) = f (i, j) There will be almost no change in value.
[0011]
On the other hand, if the pixel at the coordinate (i, j) is on the lower part of the gradient in the pixel value change, i.e., on the lower pixel value side at the edge, f (i, , j) there are many pixels having a larger pixel value than j). Therefore, the sum of the pixel values of the eight pixels around the coordinate (i, j) after the second term on the right side of the equation (2) is larger than eight times f (i, j). Therefore, f (i, j)-∇2f (i, j) <f (i, j) and the pixel value becomes slightly smaller.
[0012]
In addition, when the pixel at the coordinate (i, j) is on the upper part of the gradient in the pixel value change, that is, on the higher pixel value side at the edge, f (i, j , j) there are many pixels with smaller pixel values. Therefore, the sum of the pixel values of the eight pixels around the coordinate (i, j) after the second term on the right side of the equation (2) is smaller than eight times f (i, j). Therefore, f (i, j) −∇2f (i, j)> f (i, j), and the pixel value is slightly increased.
[0013]
In this way, by performing image processing by Laplacian calculation, the edge of the image is emphasized because processing is performed such that the lower pixel value is lower and the higher pixel value is higher on the edge of the image. It will be.
[0014]
[Problems to be solved by the invention]
As described above, if image processing by Laplacian calculation is performed, it is possible to suppress blurring of the image by enhancing the edge of the image, but at the same time, the problem that noise is amplified, overshoot, The problem of undershoot will also occur.
[0015]
First, the noise amplification will be described below. FIG. 13A shows an original signal in which the position of each pixel is taken in the horizontal direction and the pixel value is taken in the vertical direction in an image in which noise is generated, and FIG. 13B shows the above (1). ) (Original signal) − (Laplacian) obtained by the equation (1). As can be seen by comparing FIGS. 13A and 13B, noise is amplified by performing image processing using Laplacian. This will be described below using specific numerical values.
[0016]
[Table 1]
Figure 0003791420
[0017]
In Table 1, each number in the first row indicates each pixel value in the original signal lined up one-dimensionally. In the uniform image data with a pixel value of 100, noise with a pixel value of 125 is 1 The state where the place is included is shown. Each number in the second row indicates a Laplacian corresponding to the original signal in the first row, and is 0 for a pixel having no change in pixel value, but 25 for a pixel adjacent to the pixel in which noise occurs, It is −50 in the pixel in which is generated. Each number in the third row indicates (original signal)-(Laplacian). In a pixel where the pixel value does not change, the number is 100, which is the same as the original signal, but adjacent to the pixel where noise occurs. The pixel decreases to 75, and the pixel where noise occurs increases to 175.
[0018]
Thus, in the original signal, the noise having the pixel value of 125 is increased to 175 in terms of the pixel value by performing image processing using Laplacian, and it can be seen that the noise is remarkably amplified. Further, since the pixel values of the pixels adjacent to the pixel where the noise is generated are slightly reduced, the noise is in a more conspicuous state.
[0019]
Next, the occurrence of overshoot and undershoot will be described below. FIG. 14A shows an original signal in which the position of each pixel is taken in the horizontal direction and the pixel value taken in the vertical direction in an image with relatively clear edges, and FIG. 14B shows the original signal. The signal Laplacian, (c) in the figure, shows (original signal)-(Laplacian) obtained by the above equation (1). As shown in FIG. 14 (c), when image processing by Laplacian is performed on an image having a relatively clear edge, the pixel value is lower when the pixel value is lower with the edge as the center. On the higher side, the pixel value is converted to a higher value, and it can be seen that undershoot and overshoot occur. This will be described below using specific numerical values.
[0020]
[Table 2]
Figure 0003791420
[0021]
In Table 2, each number in the first row indicates each pixel value in the original signal lined up one-dimensionally, and a pixel region having a pixel value of 100 and a pixel region having a pixel value of 150 are adjacent to each other That is, it shows a state in which the value suddenly changes at the edge. Each number in the second row indicates a Laplacian corresponding to the original signal in the first row, and is 0 for a pixel having no change in pixel value, but is adjacent to a pixel having a pixel value of 150. For a pixel with 100, the Laplacian is 50, and for a pixel with a pixel value of 150 adjacent to the pixel with a pixel value of 150, the Laplacian is -50. Each number in the third row indicates (original signal) − (Laplacian), and a pixel having no change in pixel value has the same pixel value as the original image pixel data, but a pixel having a pixel value of 150 Is adjacent to the pixel value of 100, the pixel value is reduced to 50, and the pixel value adjacent to the pixel of 100 and the pixel value is 150 is increased to 200. is doing.
[0022]
Thus, when image processing by Laplacian is performed on an image having a relatively clear edge, it can be seen that overshoot and undershoot occur in the vicinity of the edge. When such processing is performed, for example, in a photographic image in which a bright subject is reflected in a dark background, the peripheral portion of the subject becomes brighter than necessary, or a dark edge occurs in the background around the subject. This will result in an unnatural photographic image.
[0023]
As sharpening processing other than processing by Laplacian calculation, there is a method of converting an image into a frequency level by Fourier transformation or the like and performing sharpening according to the frequency. When the image is converted to a frequency level, the contour of the image corresponds to the frequency. Using this, the contour of the image is specified from the converted frequency, and the sharpening process is performed on the contour.
[0024]
Thereby, fine sharpening processing according to the pattern is possible, and noise is not amplified by the sharpening processing, and overshoot and undershoot do not occur.
[0025]
However, in the sharpening process using this frequency conversion, it is necessary to perform the sharpening process on a wide pixel area (for example, 1024 × 1024 pixel area) in order to specify the contour of the image, and the scale of calculation is large. There is a problem of becoming larger.
[0026]
The present invention has been made to solve the above-described problems, and its purpose is to enhance noise, generate overshoot / undershoot, etc. when sharpening processing is performed on digital image data. An image processing method, an image processing program, and a recording medium on which the program is recorded are provided.
[0027]
[Means for Solving the Problems]
In general, in the boundary region of an image to be sharpened, the pixel values of a plurality of consecutive pixels are monotonously increased or monotonously decreased. On the other hand, a pixel in which noise is generated has a maximum value as shown in FIG. 13 or a minimum point because the pixel value is significantly different from the surrounding pixels.
[0028]
Accordingly, the first pixel is selected from the pixel group having the pixel in which noise is generated as the central pixel, and the pixel in the symmetrical position with respect to the central pixel is defined as the second pixel. When the change in the pixel value of the first pixel, the central pixel, and the second pixel that are sequentially arranged on a straight line passing through the central pixel is examined, the pixel value of the central pixel increases with respect to the pixel value of the first pixel. In this case, when the pixel value of the second pixel decreases with respect to the pixel value of the central pixel and the pixel value of the central pixel decreases with respect to the pixel value of the first pixel, The pixel value of the second pixel increases with respect to the pixel value.
[0029]
That is, when the first change amount, which is the change amount of the pixel value of the center pixel with respect to the pixel value of the first pixel, is positive, the change amount of the pixel value of the second pixel with respect to the pixel value of the center pixel. When a certain second change amount is negative and the first change amount is negative, the second change amount is positive.
[0030]
Therefore, according to the above method, when one of the first change amount and the second change amount is positive and the other is negative, at least the arrangement of the first pixel, the central pixel, and the second pixel. Therefore, it can be determined that noise is generated in the central pixel, and therefore, the pixel value of the first pixel and the pixel value of the second pixel are not used when performing the sharpening process in the pixel group. Thus, noise amplification can be prevented.
[0031]
Claim 1 In order to solve the above-described problem, the image processing method described in 1) uses the pixel value of a pixel group in a predetermined range centered on the pixel for each pixel of the image data of the original image. In the image processing method for performing a sharpening process by changing a value, the first pixel included in the pixel group and the central pixel centered in the pixel group are compared with the pixel value of the first pixel. A first change amount that is a change amount of a pixel value of the central pixel is obtained, and the pixel of the central pixel is related to the central pixel and the second pixel that is symmetrical to the first pixel with respect to the central pixel. When the second change amount that is the change amount of the pixel value of the second pixel with respect to the value is obtained, and both the first change amount and the second change amount are either positive or negative, Magnitude relationship between the first change amount and the second change amount Accordingly, the image processing method is characterized in that the sharpening process is performed by changing the pixel value of the central pixel to the pixel value of one of the first pixel and the second pixel, When the absolute value of the first change amount is smaller than the absolute value of the second change amount, the pixel value of the central pixel is changed to the pixel value of the first pixel, and the first change amount When the absolute value is larger than the absolute value of the second change amount, the pixel value of the center pixel is changed to a value between the pixel value of the first pixel and the pixel value of the center pixel. It is characterized by.
[0032]
Here, an example of a value between the pixel value of the first pixel and the pixel value of the central pixel is a value obtained by subtracting the second change amount from the pixel value of the central pixel.
[0033]
When the absolute value of the first change amount is smaller than the absolute value of the second change amount, the change from the pixel value of the first pixel to the pixel value of the center pixel is the pixel value of the center pixel. It is slower than the change from 2 to the pixel value of the second pixel. At this time, the pixel value of the first pixel is closer to the pixel value of the first pixel than the pixel value of the second pixel.
[0034]
Therefore, as in the above method, changing the pixel value of the central pixel to the pixel value of the first pixel is more effective than changing the pixel value of the central pixel to the pixel value of the second pixel. The change in the pixel value at is small.
[0035]
Further, when the absolute value of the first change amount is larger than the absolute value of the second change amount, the change from the pixel value of the first pixel to the pixel value of the center pixel is greater than that of the center pixel. It is more rapid than the change from the pixel value to the pixel value of the second pixel.
[0036]
Therefore, by changing the pixel value of the center pixel to a value between the pixel value of the first pixel and the pixel value of the center pixel as in the above method, the center value is changed from the pixel value of the first pixel to the center value. The change to the pixel value of the pixel is alleviated.
[0037]
As a result, according to the above method, even if the boundary region is narrowed by the sharpening process, the change in the pixel value in the boundary region can be made natural.
[0038]
Also, Claim 2 In the image processing method described in the above, sharpening processing is performed on the image data of the original image by changing the pixel value of the pixel by using the pixel value of a pixel group in a predetermined range centered on the pixel for each pixel. In the image processing method for performing the above, with respect to the first pixel included in the pixel group and the central pixel centered in the pixel group, the change amount of the pixel value of the central pixel with respect to the pixel value of the first pixel A first change amount is obtained, and a pixel value of a second pixel with respect to a pixel value of the center pixel with respect to the center pixel and a second pixel that is symmetrical to the first pixel with respect to the center pixel The second change amount that is a change amount of the first change amount is obtained, and when both the first change amount and the second change amount are either positive or negative, the first change amount and the second change amount Depending on the magnitude relationship of the change amount, the first pixel and the first pixel A sharpening process is performed by changing the pixel value of the central pixel to one of the pixel values of the first pixel, and the first change amount and the second change amount When both of the amounts are positive, the pixel value of the central pixel is changed to the pixel value of the first pixel when the absolute value of the first change amount is smaller than the absolute value of the second change amount. When the absolute value of the first change amount is larger than the absolute value of the second change amount, the center pixel is set to a value between the pixel value of the first pixel and the pixel value of the center pixel. When the first change amount and the second change amount are both negative while the absolute value of the first change amount is smaller than the absolute value of the second change amount And changing the pixel value of the central pixel to a value between the pixel value of the central pixel and the pixel value of the second pixel, If towards the absolute value of the change amount is larger than the absolute value of the second variation is characterized by changing the pixel value of the central pixel in the pixel value of the second pixel.
[0039]
Here, as an example of a value between the pixel value of the central pixel and the pixel value of the second pixel, a value obtained by subtracting the absolute value of the first change amount from the pixel value of the central pixel can be cited.
[0040]
In the above method, when both the first change amount and the second change amount are positive, that is, when the pixel value increases in the order of the first pixel, the center pixel, and the second pixel, the above claims The sharpening process similar to 4 is performed. On the other hand, when both the first change amount and the second change amount are negative, that is, when the pixel value decreases in the order of the first pixel, the center pixel, and the second pixel, the following sharpening is performed. Processing is performed.
[0041]
That is, when the absolute value of the first change amount is smaller than the absolute value of the second change amount, the pixel of the central pixel is more than the change from the pixel value of the first pixel to the pixel value of the central pixel. The change from the value to the pixel value of the second pixel is more rapid.
[0042]
Accordingly, by changing the pixel value of the central pixel to a value between the pixel value of the central pixel and the pixel value of the second pixel as in the above method, the second pixel is changed from the pixel value of the central pixel. The change to the pixel value is reduced.
[0043]
Further, when the absolute value of the first change amount is larger than the absolute value of the second change amount, the pixel of the central pixel is more than the change from the pixel value of the first pixel to the pixel value of the central pixel. The change from the value to the pixel value of the second pixel is slower. At this time, the pixel value of the center pixel is closer to the pixel value of the second pixel than the pixel value of the first pixel.
[0044]
Therefore, as in the above method, it is more preferable to change the pixel value of the central pixel to the pixel value of the second pixel than to change the pixel value of the central pixel to the pixel value of the first pixel. The change in the pixel value at is small.
[0045]
As a result, according to the above method, Claim 1 As in the image processing method described in (1), even if the boundary region is narrowed by the sharpening process, a change in pixel value in the boundary region can be made natural.
[0046]
Further, in the above method, since the pixel value of the center pixel is changed to be smaller, the boundary region portion of the sharpened image becomes darker than the original image. Therefore, the above method is suitable for an image in which halation occurs due to, for example, overexposure.
[0047]
Also, Claim 3 In the image processing method described in the above, sharpening processing is performed on the image data of the original image by changing the pixel value of the pixel by using the pixel value of a pixel group in a predetermined range centered on the pixel for each pixel. In the image processing method for performing the above, with respect to the first pixel included in the pixel group and the central pixel centered in the pixel group, the change amount of the pixel value of the central pixel with respect to the pixel value of the first pixel A first change amount is obtained, and a pixel value of a second pixel with respect to a pixel value of the center pixel with respect to the center pixel and a second pixel that is symmetrical to the first pixel with respect to the center pixel The second change amount that is a change amount of the first change amount is obtained, and when both the first change amount and the second change amount are either positive or negative, the first change amount and the second change amount Depending on the magnitude relationship of the change amount, the first pixel and the first pixel A sharpening process is performed by changing the pixel value of the central pixel to one of the pixel values of the first pixel, and the first change amount and the second change amount Both of the quantities are positive and the image value of the central pixel is less than the intermediate value, or both the first variation and the second variation are negative, and the central pixel When the image value is equal to or greater than the intermediate value, when the absolute value of the first change amount is smaller than the absolute value of the second change amount, the pixel value of the central pixel is set as the pixel value of the first pixel. If the absolute value of the first change amount is greater than the absolute value of the second change amount, the center value is changed to a value between the pixel value of the first pixel and the pixel value of the center pixel. While changing the pixel value of the pixel, both the first change amount and the second change amount are positive, and When the image value of the center pixel is greater than or equal to the intermediate value, or when both the first change amount and the second change amount are negative and the image value of the center pixel is smaller than the intermediate value, When the absolute value of the first change amount is smaller than the absolute value of the second change amount, the pixel value of the center pixel is set to a value between the pixel value of the center pixel and the pixel value of the second pixel. And when the absolute value of the first change amount is larger than the absolute value of the second change amount, the pixel value of the central pixel is changed to the pixel value of the second pixel. It is characterized by that.
[0048]
Here, the intermediate value is half of the maximum pixel value.
[0049]
In the above method, first, consider a case where the pixel value increases in the order of the first pixel, the center pixel, and the second pixel. When the image value of the central pixel is smaller than the intermediate value, Claim 1 When the sharpening process similar to the image processing method described in the above is performed, the boundary area is narrowed, and the change in the pixel value in the boundary area can be made natural.
[0050]
Further, when the image value of the central pixel is larger than the intermediate value, Claim 2 In the image processing method described in 1), the sharpening process similar to the sharpening process performed when the pixel value decreases in the order of the first pixel, the central pixel, and the second pixel is performed, thereby narrowing the boundary region. In addition, the change of the pixel value in the boundary region can be made natural.
[0051]
Next, consider a case where the pixel value decreases in the order of the first pixel, the center pixel, and the second pixel. When the image value of the central pixel is larger than the intermediate value, Claim 1 When the sharpening process similar to the image processing method described in the above is performed, the boundary area is narrowed, and the change in the pixel value in the boundary area can be made natural.
[0052]
When the image value of the central pixel is smaller than the intermediate value, Claim 2 In the image processing method described in 1), the sharpening process similar to the sharpening process performed when the pixel value decreases in the order of the first pixel, the central pixel, and the second pixel is performed, thereby narrowing the boundary region. In addition, the change of the pixel value in the boundary region can be made natural.
[0053]
Therefore, according to the above method, with one sharpening process, Claim 1 Or 2 The boundary region can be made narrower.
[0054]
Also, Claim 4 The image processing method described in Claims 1-3 In the image processing method described in (1), when one of the first change amount and the second change amount is positive and the other is negative, the pixel value of the central pixel is not changed.
[0055]
According to the above method, when one of the first change amount and the second change amount is positive and the other is negative, as described above, at least the first pixel, the center pixel, and the second change amount With regard to the pixel arrangement, it can be determined that noise is generated in the central pixel. Therefore, when sharpening processing is performed in the pixel group, the pixel value of the central pixel is not changed, thereby amplifying the noise. Can be prevented.
[0056]
Also, Claim 5 The image processing method according to claim 1 starts from claim 1. 4 The image processing method according to any one of the preceding claims, wherein changing the pixel value of the central pixel is the pixel value of the central pixel for all combinations of the first pixel and the second pixel in the image group. By changing the pixel value of the central pixel to the average value calculated by adding the pixel value to be changed when changing the pixel value and the pixel value of the central pixel when not changing and dividing by the number of combinations It is characterized by being performed.
[0057]
Thereby, the pixel value of the center pixel can be changed based on the pixel values of all the pixels included in the pixel group.
[0058]
From claim 1 5 The sharpening process performed by the image processing method according to any one of the above can be executed on a computer by an image processing program. Furthermore, the sharpening process can be executed on any computer by storing the image processing program in a computer-readable recording medium.
[0059]
DETAILED DESCRIPTION OF THE INVENTION
[Embodiment 1]
Hereinafter, an embodiment of the present invention will be described with reference to FIGS.
[0060]
FIG. 2 is a block diagram showing a schematic configuration of the image output system according to the embodiment of the present invention. The image output system includes a film scanner 1, an image processing device 2, and a photographic printing device 3.
[0061]
The film scanner 1 reads an image recorded on a negative film by, for example, irradiating a negative film as a photographic film with light from a light source and receiving the transmitted light with a CCD (Charge Coupled Device) or the like. It is. The film scanner 1 outputs the read image data to the image processing apparatus 2 for each of the red component, the green component, and the blue component.
[0062]
The photographic printing apparatus 3 prints an image on the photographic paper by exposing the photographic paper as a photosensitive material based on the image data processed by the image processing apparatus 2. As the head for irradiating the printing paper with light corresponding to the digital image data, a light modulation element capable of modulating the irradiation light to the printing paper for each pixel according to the digital image data is used. Examples of the light modulation element include a PLZT exposure head, DMD (digital micromirror device), LCD (liquid crystal display), LED (light emitting diode) panel, laser, FOCRT (Fiber Optic Cathode Ray Tube), CRT ( Cathode Ray Tube).
[0063]
Note that the photographic printing apparatus 3 may be configured as an auto printer capable of performing both negative film scanning and photographic paper exposure. In this case, the photographic processing apparatus is configured by connecting an auto printer that performs from image reading to printing and an image processing apparatus 2 constituted by a PC (Personal Computer) or the like, thereby simplifying the system. be able to.
[0064]
The image processing apparatus 2 performs a sharpening process on the image data sent from the film scanner 1 and supplies the sharpened image data to the photographic printing apparatus 3. Hereinafter, a sharpening processing method in the image processing apparatus 2 will be described with reference to FIGS. 1 and 3.
[0065]
First, as shown in FIG. 3, a target pixel and a pixel group having the target pixel as a central pixel are set (step 10, hereinafter referred to as S10). The shape of the area occupied by the pixels included in the pixel group may be any shape such as a square, a rectangle, a rhombus, a cross, etc., as long as the pixels are symmetrical with respect to the center pixel. The shape and size can be selected.
[0066]
However, since the calculation process increases as the size increases, the pixel group includes nine pixels included in the pixel region of 3 rows and 3 columns and 25 pixels included in the pixel region of 5 rows and 5 columns. It is desirable to use pixels.
[0067]
Next, a sharpening process is performed on the set pixel group (S11). Details of the sharpening process will be described later. Then, it is determined whether or not the sharpening process has been completed for all pixels (S12). If not, the process returns to S10 and the above process is repeated.
[0068]
Next, the sharpening process (S11) will be described with reference to FIG. First, the first pixel and the second pixel are selected from the pixel group set in S10 shown in FIG. 3 (S20). As the first pixel, an arbitrary pixel can be selected from the pixel group. In addition, the second pixel is a pixel that is symmetrical to the first pixel with respect to the center pixel. Therefore, if the first pixel is selected, the second pixel is automatically selected.
[0069]
As the first pixel, it is desirable to select a pixel other than the central pixel from the pixel group. In addition, in order to prevent the first pixel and the second pixel from being selected redundantly, the first pixel specifies a half region, for example, the upper half region of the region where the pixel group exists. It is desirable to select from the pixels existing in the specified area.
[0070]
Next, using the pixel value f0 of the center pixel, the pixel value f1 of the first pixel, and the pixel value f2 of the second pixel, the first change amount v1 and the second change amount v2 are obtained from the following equations. Obtain (S21).
[0071]
v1 = f0-f1, v2 = f2-f0 (3)
Next, it is determined whether one of the first change amount v1 and the second change amount v2 is 0 or more and the other is 0 or less (S22). When this condition is satisfied, the first pixel and the second pixel are ignored, and the sharpening process is performed on the center pixel (S23). On the other hand, when this condition is not satisfied, that is, when both the first change amount v1 and the second change amount v2 are either positive or negative, the first pixel and the second pixel In consideration of the above, sharpening processing is performed on the center pixel (S24).
[0072]
The sharpening process in the present embodiment may be a sharpening process using Laplacian calculation as described above, or a sharpening process described later.
[0073]
Next, it is determined whether or not all pixels except the central pixel in the pixel group have been selected as the first pixel or the second pixel (S25). If this condition is not satisfied, the process returns to S20 and the above processing is repeated. On the other hand, if this condition is satisfied, a pixel value is calculated for the target pixel (center pixel) subjected to the sharpening process (S26), the sharpening process routine ends, and the process proceeds to S12 shown in FIG.
[0074]
Note that in the sharpening process of S23 or S24, when the pixel value of the center pixel can be calculated by sequential calculation as in Expression (2), S26 is not necessary.
[0075]
When ignoring the first pixel and the second pixel in the sharpening process, the first change amount v1 is positive and the second change amount v2 is negative. The case where the pixel value of the center pixel increases with respect to the pixel value of the pixel and the pixel value of the second pixel decreases with respect to the pixel value of the center pixel is included.
[0076]
By the way, since the second pixel is symmetric with respect to the first pixel with respect to the center pixel, the first pixel, the center pixel, and the second pixel are arranged in this order on the same straight line. . Therefore, it can be considered that the above case is a case where noise having a maximum point as shown in FIG. 13 is generated in the central pixel.
[0077]
Similarly, when the first pixel and the second pixel are ignored in the sharpening process, the first change amount v1 is negative and the second change amount v2 is positive. The case where the pixel value of the center pixel decreases with respect to the pixel value of the first pixel and the pixel value of the second pixel increases with respect to the pixel value of the center pixel is included. In this case, it can be considered that the noise that is the minimum point is generated in the central pixel.
[0078]
Therefore, in the above sharpening process, if noise is generated in the center pixel, the sharpening process is not performed, and therefore, amplification of noise due to the sharpening process can be prevented.
[0079]
Further, when the first pixel and the second pixel are ignored in the sharpening process, the first pixel v1 is 0, that is, the center pixel with respect to the pixel value of the first pixel. And the case where the second change amount v2 is 0, that is, the case where the pixel value of the second pixel is equal to the pixel value of the center pixel.
[0080]
Referring to FIG. 14, the overshoot or undershoot that occurs in the sharpening process by Laplacian calculation is caused when the substantially constant original signal starts to increase or decrease, or the increasing or decreasing original signal turns almost constant. It can be understood that it occurs in some cases. In these cases, the first variation v1 is 0 and the second variation v2 is positive or negative, and the first variation v1 is positive or negative and the second variation v2. Is equivalent to 0.
[0081]
Therefore, when the above-described sharpening process is applied to the sharpening process by the Laplacian calculation, the sharpening process is not performed when the pixel in which overshoot or undershoot occurs is used as the central pixel. Overshoot or undershoot can be prevented from occurring.
[0082]
In other cases where the first pixel and the second pixel are ignored in the sharpening process, the first change amount v1 and the second change amount v2 are 0, that is, the first change amount The case where the pixel values of the pixel, the center pixel, and the second pixel are equal is included. In this case, even if the sharpening process is performed, the pixel value of the center pixel after the process is not affected. Therefore, there is no problem even if the sharpening process is not performed.
[0083]
[Embodiment 2]
Next, another embodiment of the present invention will be described. In addition, the same code | symbol is attached | subjected to the step which has the effect | action similar to the step demonstrated in above-described embodiment, and the description is abbreviate | omitted.
[0084]
The image output system of the present embodiment is obtained by applying a new sharpening processing method to the image output system shown in FIG. Hereinafter, the sharpening process in the present embodiment will be described with reference to FIG. Note that an integrated value s described later is initialized before the sharpening process is started.
[0085]
First, similarly to the first embodiment, the first pixel and the second pixel are selected from the pixel group (S20), and the first change amount v1 and the second change are calculated using Expression (3). The amount v2 is obtained (S21).
[0086]
Next, it is determined whether one of the first change amount v1 and the second change amount v2 is 0 or more and the other is 0 or less (S22). When this condition is satisfied, the first pixel and the second pixel are ignored, and the pixel value f0 of the center pixel is added to the integrated value s (S30).
[0087]
On the other hand, when this condition is not satisfied, that is, when both the first change amount v1 and the second change amount v2 are either positive or negative, the absolute value of the first change amount | It is determined whether or not v1 | is smaller than the absolute value | v2 | of the second change amount (S31). If this condition is satisfied, the pixel value f1 of the first pixel is added to the integrated value s (S32). On the other hand, when this condition is not satisfied, a value obtained by subtracting the second change amount v2 from the pixel value f0 of the central pixel is added to the integrated value s (S33).
[0088]
Next, it is determined whether or not all pixels except the central pixel in the pixel group have been selected as the first pixel or the second pixel (S25). If this condition is not satisfied, the process returns to S20 and the above processing is repeated.
[0089]
On the other hand, if this condition is satisfied, the pixel value f0 of the central pixel is changed to a value obtained by dividing the integrated value s by the total number of the selected first pixels (S34), and the sharpening processing routine is completed. Then, the process proceeds to S12 shown in FIG.
[0090]
In the above sharpening process, when one of the first change amount v1 and the second change amount v2 is 0 or more and the other is 0 or less, as described above, the noise In order to prevent amplification and the like, the original pixel value f0 of the center pixel is integrated.
[0091]
On the other hand, the case where this condition is not satisfied is a case where both of the first change amount v1 and the second change amount v2 are either positive or negative, that is, the first changes arranged on the same straight line. This is a case where the pixel values of the first pixel, the center pixel, and the second pixel monotonously increase or decrease monotonously in this order. In this case, since it is considered as the boundary region of the image, the following sharpening process is performed.
[0092]
Here, a more specific case of the sharpening process in the present embodiment will be described. 7 to 11 described in the present embodiment and the embodiments described later, the horizontal direction indicates the position of each pixel, and the vertical direction indicates the pixel value of each pixel.
[0093]
7 to 11 show a one-dimensional image for easy understanding. In the sharpening process in FIGS. 7 to 11, the pixel group includes three consecutive pixels, and a pixel adjacent to the left side of the center pixel is selected as the first pixel. Therefore, the pixel adjacent to the right side of the center pixel is the second pixel.
[0094]
FIG. 7 shows image data before the sharpening process. In the figure, the pixel value monotonically increases from pixel P1 to pixel P4, and the pixel value monotonously decreases from pixel P5 to pixel P8. Accordingly, the region from the pixel P1 to the pixel P4 and the region from the pixel P5 to the pixel P8 are image boundary regions.
[0095]
FIG. 8 shows image data that has been subjected to the sharpening process in the present embodiment. FIG. 9 shows how the sharpening process in this embodiment is performed in the order of the pixels P2 and P3. Hereinafter, the sharpening process in the present embodiment will be described. In the case of FIG. 7 to FIG. 9, since there is only one selectable first pixel, the pixel value of the central pixel is set to f1 in S32 or f0-v2 in S33 by the sharpening process. Will be changed.
[0096]
FIG. 9A shows a pixel value before the sharpening process. First, the pixel P2 is a central pixel, the pixel P1 is a first pixel, and the pixel P3 is a second pixel. At this time, the first change amount v1, that is, the change amount of the pixel P2 with respect to the pixel value of the pixel P1, is smaller than the second change amount v2, ie, the change amount of the pixel P3 with respect to the pixel value of the pixel P2. As shown in FIG. 5B, the pixel value of the pixel P2 is changed to the pixel value of the pixel P1 by the process of S32.
[0097]
Next, the pixel P3 is a central pixel, the pixel P2 is a first pixel, and the pixel P4 is a second pixel. At this time, the first change amount v1, that is, the change amount of the pixel P3 with respect to the pixel value of the pixel P2, is larger than the second change amount v2, ie, the change amount of the pixel P4 with respect to the pixel value of the pixel P3. As shown in FIG. 10C, the pixel value of the pixel P3 is decreased by the second change amount v2 by the process of S33.
[0098]
Similarly, the sharpening process of the present embodiment is performed on the pixels P5 to P8. First, the pixel P6 is a central pixel, the pixel P5 is a first pixel, and the pixel P7 is a second pixel. At this time, the absolute value | v1 | of the first change amount, that is, the absolute value of the change amount of the pixel P6 with respect to the pixel value of the pixel P5 is the absolute value | v2 | of the second change amount, that is, the pixel P2 Since it is smaller than the absolute value of the change amount of the pixel P3 with respect to the pixel value, the pixel value of the pixel P6 is changed to the pixel value of the pixel P5 by the process of S32.
[0099]
Next, the pixel P7 is a central pixel, the pixel P6 is a first pixel, and the pixel P8 is a second pixel. At this time, the absolute value | v1 | of the first change amount, that is, the absolute value of the change amount of the pixel P7 with respect to the pixel value of the pixel P6 is the absolute value | v2 | of the second change amount, that is, the pixel P7. Since it is larger than the absolute value of the change amount of the pixel P8 with respect to the pixel value, the pixel value of the pixel P7 is decreased by the second change amount v2 by the process of S33, and the sharpening process is ended. Since the second change amount v2 is negative, the pixel value of the pixel P7 actually increases.
[0100]
Therefore, the image data shown in FIG. 7 becomes the image data shown in FIG. 8 by the sharpening process of the present embodiment. Comparing FIG. 7 and FIG. 8, the boundary region of the image was from pixel P1 to pixel P4 and from pixel P5 to pixel P8 before the sharpening process, but after the sharpening process, From pixel P2 to pixel P4 and from pixel P6 to pixel P8, it can be understood that the width of the boundary region is reduced. Therefore, it can be understood that the image has been sharpened by the above processing.
[0101]
Further, the pixel value of the pixel P3 decreases, and the pixel value of the pixel P7 increases, so that the pixel value of the pixel P2 changes to the pixel value of the pixel P3, and the pixel value of the pixel P6 changes to the pixel value of the pixel P7. Therefore, even if the boundary region is narrowed by the sharpening process, the pixel value change in the boundary region can be made natural.
[0102]
Further, in the sharpening process in the present embodiment, the pixel value of the central pixel is changed only within the range from the pixel value of the first pixel to the pixel value of the second pixel, and does not protrude from the range. The overshoot and undershoot that occur in the sharpening process by Laplacian calculation do not occur.
[0103]
[Embodiment 3]
Next, still another embodiment of the present invention will be described. In addition, the same code | symbol is attached | subjected to the step which has the effect | action similar to the step demonstrated in above-described embodiment, and the description is abbreviate | omitted.
[0104]
The image output system of the present embodiment is obtained by partially changing the sharpening processing method in the image output system of the second embodiment. Hereinafter, the sharpening process in the present embodiment will be described with reference to FIG. Note that the integrated value s is initialized before the sharpening process is started.
[0105]
First, as in the above-described embodiment, the first pixel and the second pixel are selected from the pixel group (S20), and the first change amount v1 and the second change are calculated using Expression (3). The amount v2 is obtained (S21).
[0106]
Next, it is determined whether one of the first change amount v1 and the second change amount v2 is 0 or more and the other is 0 or less (S22). When this condition is satisfied, similarly to the second embodiment, the first pixel and the second pixel are ignored, and the pixel value f0 of the center pixel is added to the integrated value s (S30).
[0107]
On the other hand, when this condition is not satisfied, it is determined whether both the first change amount v1 and the second change amount v2 are positive or negative (S40). If both are positive, the same processes S31 to S33 as in the second embodiment are performed. On the other hand, if both are negative, it is determined whether or not the absolute value | v1 | of the first change amount is larger than the absolute value | v2 | of the second change amount (S41). If this condition is satisfied, the pixel value f2 of the second pixel is added to the integrated value s (S42). On the other hand, when this condition is not satisfied, a value obtained by subtracting the absolute value | v1 | of the first change amount from the pixel value f0 of the center pixel is added to the integrated value s (S43). The subsequent processes are the same as the processes S25 and S34 of the second embodiment.
[0108]
In the sharpening process, as in the above-described embodiment, when the pixel values of the first pixel, the central pixel, and the second pixel arranged on the same line monotonically increase or decrease in this order, The following sharpening process is performed. In other cases, the original pixel value f0 of the central pixel is added to the integrated value s in order to prevent noise amplification and the like.
[0109]
Here, the sharpening process in the present embodiment will be described with reference to FIGS. 7 and 10 in a more specific case. In the case of FIGS. 7 and 10, since only one first pixel can be selected, f1 in S32, f0-v2 in S33, f2 in S42, and f0 in S43 by sharpening processing. The pixel value of the central pixel is changed to any one of − | v1 |.
[0110]
First, since the sharpening processes S31 to S33 similar to those of the second embodiment are performed on the pixels P1 to P4, description thereof is omitted.
[0111]
Next, the sharpening process of the present embodiment is performed on the pixels P5 to P8. First, the pixel P6 is a central pixel, the pixel P5 is a first pixel, and the pixel P7 is a second pixel. At this time, the absolute value | v1 | of the first change amount, that is, the absolute value of the change amount of the pixel P6 with respect to the pixel value of the pixel P5 is the absolute value | v2 | of the second change amount, that is, the pixel P6. Since it is smaller than the absolute value of the change amount of the pixel P7 with respect to the pixel value, the pixel value of the pixel P6 is decreased by the absolute value | v1 | of the first change amount by the process of S43.
[0112]
Next, the pixel P7 is a central pixel, the pixel P6 is a first pixel, and the pixel P8 is a second pixel. At this time, the absolute value | v1 | of the first change amount, that is, the absolute value of the change amount of the pixel P7 with respect to the pixel value of the pixel P6 is the absolute value | v2 | of the second change amount, that is, the pixel P7. Since it is larger than the absolute value of the change amount of the pixel P8 with respect to the pixel value, the pixel value of the pixel P7 is changed to the pixel value of the pixel P8 by the process of S42, and the sharpening process ends.
[0113]
Therefore, the image data shown in FIG. 7 becomes the image data shown in FIG. 10 by the sharpening process of the present embodiment. When FIG. 7 is compared with FIG. 10, it can be understood that the image is sharpened because the width of the boundary region is reduced by the sharpening process of the present embodiment, as in the second embodiment.
[0114]
Further, the pixel values of the pixel P3 and the pixel P6 are reduced, so that the change from the pixel value of the pixel P2 to the pixel value of the pixel P3 and the change from the pixel value of the pixel P6 to the pixel value of the pixel P7 are alleviated. Therefore, even if the boundary region is narrowed by the sharpening process, the change in the pixel value in the boundary region can be natural.
[0115]
Further, in the sharpening process in the present embodiment, the pixel value of the central pixel is changed only within the range from the pixel value of the first pixel to the pixel value of the second pixel, and does not protrude from the range. The overshoot and undershoot that occur in the sharpening process by Laplacian calculation do not occur.
[0116]
Further, in the sharpening process in the present embodiment, as shown in FIG. 10, since the pixel value of the central pixel is changed to be smaller, the boundary area portion of the sharpened image is compared with the original image. It becomes dark. Therefore, the sharpening process in the present embodiment is suitable for an image in which halation occurs due to, for example, overexposure.
[0117]
[Embodiment 4]
Next, still another embodiment of the present invention will be described. In addition, the same code | symbol is attached | subjected to the step which has the effect | action similar to the step demonstrated in above-described embodiment, and the description is abbreviate | omitted.
[0118]
The image output system of the present embodiment is obtained by partially changing the sharpening processing method in the image output system of the third embodiment. Hereinafter, the sharpening process in the present embodiment will be described with reference to FIG. Note that the integrated value s is initialized before the sharpening process is started.
[0119]
First, the processes S20, S21, and S22 before S40 are the same as those in the third embodiment. In S40, if both the first change amount v1 and the second change amount v2 are positive, it is determined whether or not the pixel value of the center pixel f0 is smaller than the intermediate pixel value (S50). Here, the intermediate pixel value is half of the maximum value that can be taken as the pixel value. For example, when the pixel value is 256 gradations, the intermediate pixel value is 128.
[0120]
When the pixel value of the center pixel f0 is smaller than the intermediate pixel value, the same processes S31 to S33 as in the second embodiment are performed. On the other hand, when the pixel value of the center pixel f0 is greater than or equal to the intermediate pixel value, the same processes S41 to S43 as in the third embodiment are performed.
[0121]
On the other hand, whether or not the pixel value of the center pixel f0 is smaller than the intermediate pixel value is the same as in S50 when both the first change amount v1 and the second change amount v2 are negative in S40. Is determined (S51). However, unlike S50, in S51, when the pixel value of the center pixel f0 is smaller than the intermediate pixel value, the same processes S41 to S43 as in the third embodiment are performed, while the pixel value of the center pixel f0 is If it is greater than or equal to the intermediate pixel value, the same processes S31 to S33 as in the second embodiment are performed.
[0122]
In the sharpening process, as in the above embodiment, when the pixel values of the first pixel, the center pixel, and the second pixel arranged on the same line monotonically increase or decrease in this order, The following sharpening process is performed. In other cases, the original pixel value f0 of the central pixel is added to the integrated value s in order to prevent noise amplification and the like.
[0123]
Here, the sharpening process in the present embodiment will be described with reference to FIGS. 7 and 11 for a more specific case. In the case of FIGS. 7 and 11, only one first pixel can be selected. Therefore, by sharpening processing, f1 in S32, f0-v2 in S33, f2 in S42, and f0 in S43. The pixel value of the central pixel is changed to any one of − | v1 |.
[0124]
First, the pixel P2 is a central pixel, the pixel P1 is a first pixel, and the pixel P3 is a second pixel. At this time, the first change amount v1, that is, the change amount of the pixel P2 with respect to the pixel value of the pixel P1, and the second change amount v2, that is, the change amount of the pixel P3 with respect to the pixel value of the pixel P2, are both positive. Since the center pixel P2 is smaller than the intermediate value, sharpening processes S31 to S33 similar to those in the second embodiment are performed by the process of S50. That is, the pixel value of the center pixel P2 is changed to the pixel value of the first pixel P1.
[0125]
Next, the pixel P3 is a central pixel, the pixel P2 is a first pixel, and the pixel P4 is a second pixel. At this time, the first change amount v1, that is, the change amount of the pixel P3 with respect to the pixel value of the pixel P2, and the second change amount v2, that is, the change amount of the pixel P4 with respect to the pixel value of the pixel P3 are both positive. Since the center pixel P3 is larger than the intermediate value, sharpening processes S41 to S43 similar to those in the third embodiment are performed by the process of S50. That is, since the absolute value | v1 | of the first change amount is larger than the absolute value | v2 | of the second change amount, the pixel value of the center pixel P3 is changed to the pixel value of the second pixel P4. The
[0126]
Next, the pixel P6 is a central pixel, the pixel P5 is a first pixel, and the pixel P7 is a second pixel. At this time, the first change amount v1, that is, the change amount of the pixel P6 with respect to the pixel value of the pixel P5, and the second change amount v2, that is, the change amount of the pixel P7 with respect to the pixel value of the pixel P6 are both negative. Since the center pixel P6 is larger than the intermediate value, the sharpening processes S31 to S33 similar to those of the second embodiment are performed by the process of S51. That is, the pixel value of the center pixel P6 is changed to the pixel value of the first pixel P5.
[0127]
Next, the pixel P7 is a central pixel, the pixel P6 is a first pixel, and the pixel P8 is a second pixel. At this time, the first change amount v1, that is, the change amount of the pixel P7 with respect to the pixel value of the pixel P6, and the second change amount v2, that is, the change amount of the pixel P8 with respect to the pixel value of the pixel P7 are both negative. Since the center pixel P7 is smaller than the intermediate value, sharpening processes S41 to S43 similar to those in the third embodiment are performed by the process of S51. That is, the pixel value of the center pixel P7 is changed to the pixel value of the second pixel P8, and the sharpening process ends.
[0128]
Therefore, the image data shown in FIG. 7 becomes the image data shown in FIG. 11 by the sharpening process of the present embodiment. When FIG. 11 is compared with FIG. 8 according to the second embodiment and FIG. 10 according to the third embodiment, the width of the boundary region is further reduced by the sharpening processing of the present embodiment, so that the image is further sharpened. I can understand that
[0129]
Further, in the sharpening process in the present embodiment, the pixel value of the central pixel is changed only within the range from the pixel value of the first pixel to the pixel value of the second pixel, and does not protrude from the range. The overshoot and undershoot that occur in the sharpening process by Laplacian calculation do not occur.
[0130]
In addition, the sharpening process in 2nd-4th embodiment can be performed repeatedly. By repeating the sharpening process, the width of the boundary region is narrowed, so that the image is sharpened.
[0131]
In the second to fourth embodiments, f1 in S32, f0-v2 in S33, f2 in S42, and f0- | v1 | in S43 are integrated, but the center pixel and the first pixel are integrated. A weight corresponding to the positional relationship may be added.
[0132]
In the second to fourth embodiments, f0-v2 is calculated in S33, and f0- | v1 | is calculated in S43. These calculations are pixel values generated by the sharpening process in S32 and S42. This is to make the sudden change of the natural.
[0133]
Accordingly, S33 can be arbitrarily calculated as long as it calculates a pixel value between the pixel value f1 of the first pixel and the pixel value f0 of the central pixel, and S43 can be a pixel of the central pixel. Any calculation can be performed as long as the pixel value between the value f0 and the pixel value f2 of the second pixel is calculated.
[0134]
Further, it can be realized by a program for causing the above-described image sharpening processing to function. This program is stored in a computer-readable recording medium. In this case, the image processing apparatus 2 shown in FIG. 2 is configured by a computer. Further, as the recording medium, a memory necessary for processing performed by a microcomputer included in the computer constituting the image processing apparatus 2, for example, a ROM itself may be a program medium, or an external device. A program reading device may be provided as a storage device, and a program medium that can be read by inserting a recording medium therein may be used.
[0135]
In any case, the stored program may be configured to be accessed and executed by a microprocessor included in the computer. Alternatively, in any case, the program may be read and the read program may be It may be downloaded to a program storage area of a computer and the program may be executed. It is assumed that this download program is stored in the main device in advance.
[0136]
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 disk or a hard disk, or a CD-ROM / MO / MD / DVD. Even a medium carrying a fixed program, including a disk system of an optical disk, a card system such as an IC card (including a memory card) / optical card, or a semiconductor memory such as a mask ROM, EPROM, EEPROM, flash ROM, etc. Good.
[0137]
Further, in the present invention, a system configuration that can be connected to a communication network including the Internet is possible, and a medium that fluidly carries a program so as to download the program from the communication network may be used. When the program is downloaded from the communication network in this way, the download program may be stored in the main device in advance or may be installed from another recording medium.
[0138]
Note that the content stored in the recording medium is not limited to a program, and may be data.
[0139]
【The invention's effect】
Claim 1 As described above, the image processing method described in the above item is an image processing method in which sharpening processing is performed on a pixel group in a predetermined range centered on the pixel for each pixel with respect to the image data of the original image. A first change amount that is a change amount of a pixel value of the central pixel with respect to a pixel value of the first pixel is obtained for the first pixel included and the central pixel that is centered in the pixel group, and the center A second change amount, which is a change amount of a pixel value of the second pixel with respect to a pixel value of the center pixel, with respect to a pixel and a second pixel that is symmetrical to the first pixel with respect to the center pixel. When both the first change amount and the second change amount are either positive or negative, the first change amount and the second change amount are determined according to the magnitude relationship between the first change amount and the second change amount. Before the pixel value of either the second pixel or the second pixel An image processing method characterized in that a sharpening process is performed by changing a pixel value of a central pixel, wherein the absolute value of the first change amount is greater than the absolute value of the second change amount If the absolute value of the first change amount is larger than the absolute value of the second change amount, the pixel value of the center pixel is changed to the pixel value of the first pixel. In this method, the pixel value of the central pixel is changed to a value between the pixel value of one pixel and the pixel value of the central pixel.
[0140]
Thereby, even if the boundary region is narrowed by the sharpening process, there is an effect that a change in pixel value in the boundary region can be made natural.
[0141]
Also, Claim 2 As described above, the image processing method described in the above item is an image processing method in which sharpening processing is performed on a pixel group in a predetermined range centered on the pixel for each pixel with respect to the image data of the original image. A first change amount that is a change amount of a pixel value of the central pixel with respect to a pixel value of the first pixel is obtained for the first pixel included and the central pixel that is centered in the pixel group, and the center A second change amount, which is a change amount of a pixel value of the second pixel with respect to a pixel value of the center pixel, with respect to a pixel and a second pixel that is symmetrical to the first pixel with respect to the center pixel. When both the first change amount and the second change amount are either positive or negative, the first change amount and the second change amount are determined according to the magnitude relationship between the first change amount and the second change amount. Before the pixel value of either the second pixel or the second pixel An image processing method characterized in that a sharpening process is performed by changing a pixel value of a central pixel, wherein both the first change amount and the second change amount are positive. When the absolute value of the first change amount is smaller than the absolute value of the second change amount, the pixel value of the central pixel is changed to the pixel value of the first pixel, When the absolute value of the change amount is larger than the absolute value of the second change amount, the pixel value of the center pixel is changed to a value between the pixel value of the first pixel and the pixel value of the center pixel. On the other hand, when both the first change amount and the second change amount are negative, the central pixel is determined when the absolute value of the first change amount is smaller than the absolute value of the second change amount. The pixel value of the central pixel is changed to a value between the pixel value of the second pixel and the pixel value of the second pixel, and the absolute value of the first change amount If the direction of greater than the absolute value of the second variation, a method of changing the pixel value of the central pixel in the pixel value of the second pixel.
[0142]
This Claim 1 As in the image processing method described in (1), even if the boundary region is narrowed by the sharpening process, the change in the pixel value in the boundary region can be made natural. Further, the above method is suitable for an image in which halation occurs due to, for example, overexposure.
[0143]
Also, Claim 3 As described above, the image processing method described in the above item is an image processing method in which sharpening processing is performed on a pixel group in a predetermined range centered on the pixel for each pixel with respect to the image data of the original image. A first change amount that is a change amount of a pixel value of the central pixel with respect to a pixel value of the first pixel is obtained for the first pixel included and the central pixel that is centered in the pixel group, and the center A second change amount, which is a change amount of a pixel value of the second pixel with respect to a pixel value of the center pixel, with respect to a pixel and a second pixel that is symmetrical to the first pixel with respect to the center pixel. When both the first change amount and the second change amount are either positive or negative, the first change amount and the second change amount are determined according to the magnitude relationship between the first change amount and the second change amount. Before the pixel value of either the second pixel or the second pixel An image processing method characterized in that a sharpening process is performed by changing a pixel value of a central pixel, wherein both the first change amount and the second change amount are positive, and When the image value of the center pixel is smaller than the intermediate value, or when both the first change amount and the second change amount are negative and the image value of the center pixel is greater than or equal to the intermediate value, When the absolute value of the change amount of 1 is smaller than the absolute value of the second change amount, the pixel value of the central pixel is changed to the pixel value of the first pixel, and the absolute value of the first change amount When is greater than the absolute value of the second change amount, the pixel value of the central pixel is changed to a value between the pixel value of the first pixel and the pixel value of the central pixel, while the first Both the amount of change and the second amount of change are positive, and the image value of the central pixel is less than or equal to the intermediate value. Or when both the first change amount and the second change amount are negative and the image value of the central pixel is smaller than the intermediate value, the absolute value of the first change amount Is smaller than the absolute value of the second change amount, the pixel value of the center pixel is changed to a value between the pixel value of the center pixel and the pixel value of the second pixel, and the first change amount This is a method performed by changing the pixel value of the central pixel to the pixel value of the second pixel when the absolute value is larger than the absolute value of the second change amount.
[0144]
Thereby, in one sharpening process, Claim 1 Or 2 As a result, the boundary region can be narrowed.
[0145]
Also, Claim 4 As described above, the image processing method described in Claims 1-3 In the image processing method according to any one of the above, when one of the first change amount and the second change amount is positive and the other is negative, the pixel value of the central pixel is not changed. is there.
[0146]
As a result, there is an effect that noise amplification can be prevented.
[0147]
Further, as described above, in the image processing method according to claim 5, in the image processing method according to any one of claims 1 to 4, changing the pixel value of the central pixel includes: For all combinations of the first pixel and the second pixel in the image group, the pixel value to be changed when changing the pixel value of the central pixel and the pixel value of the central pixel when not changing are added, This is a method performed by changing the pixel value of the central pixel to the average value calculated by dividing by the number of combinations.
[0148]
Accordingly, there is an effect that the pixel value of the central pixel can be changed based on the pixel values of all the pixels included in the pixel group.
[0149]
From claim 1 5 The sharpening process performed by the image processing method according to any one of the above can be executed on a computer by an image processing program. Furthermore, the sharpening process can be executed on any computer by storing the image processing program in a computer-readable recording medium.
[Brief description of the drawings]
FIG. 1 is a flowchart showing details of a sharpening process according to an embodiment of the present invention.
FIG. 2 is a block diagram showing a schematic configuration of an image output system in the present embodiment.
FIG. 3 is a flowchart showing an outline of a sharpening process in the present embodiment.
FIG. 4 is a flowchart showing details of a sharpening process in another embodiment of the present invention.
FIG. 5 is a flowchart showing details of a sharpening process according to still another embodiment of the present invention.
FIG. 6 is a flowchart showing details of a sharpening process in still another embodiment of the present invention.
FIG. 7 is a graph showing one-dimensional image data input to the image processing apparatus.
8 is a graph showing image data obtained by processing the image data shown in FIG. 7 using the sharpening process shown in FIG.
9 is a graph showing a process of processing the image data shown in FIG. 7 using the sharpening process shown in FIG.
10 is a graph showing image data obtained by processing the image data shown in FIG. 7 using the sharpening process shown in FIG.
11 is a graph showing image data obtained by processing the image data shown in FIG. 7 using the sharpening process shown in FIG. 6;
12A is an outline of original image pixel data in which the position of each pixel is taken in the horizontal direction and the pixel value is taken in the vertical direction, and FIG. 12B is a primary differential value of the pixel data of the original image. FIG. 4C is a graph showing the Laplacian value of the pixel data of the original image, and FIG. 4D is a graph showing (original image pixel data) − (Laplacian value).
FIG. 13A shows original image pixel data obtained by taking the position of each pixel in the horizontal direction and the pixel value in the vertical direction in an image in which noise is generated, and FIG. It is a graph which respectively shows (image pixel data)-(Laplacian value).
FIG. 14A shows original image pixel data in which the position of each pixel is taken in the horizontal direction and the pixel value is taken in the vertical direction in an image with relatively clear edges, and FIG. FIG. 4C is a graph showing (original image pixel data) − (Laplacian value), respectively.
[Explanation of symbols]
1 Film scanner
2 Image processing device
3 Photo printing device
f0 Pixel value of the center pixel
f1 Pixel value of the first pixel
f2 Pixel value of the second pixel
v1 First change amount
v2 Second change amount

Claims (7)

原画像の画像データに関して、画素ごとに、該画素を中心とした所定範囲の画素群について鮮鋭化処理を行なう画像処理方法において、
前記画素群に含まれる第1の画素と、前記画素群において中心とされた中心画素とに関して、第1の画素の画素値に対する前記中心画素の画素値の変化量である第1の変化量を求め、
前記中心画素と、前記中心画素に対して第1の画素と対称位置にある第2の画素とに関して、前記中心画素の画素値に対する第2の画素の画素値の変化量である第2の変化量を求め、
第1の変化量および第2の変化量の両方が、正および負の何れか一方である場合には、第1の変化量および第2の変化量の大小関係に応じて、第1の画素および第2の画素の何れか一方の画素値に前記中心画素の画素値を変更することにより、鮮鋭化処理が行なわれることを特徴とする画像処理方法であって、
第1の変化量の絶対値の方が第2の変化量の絶対値よりも小さい場合には、第1の画素の画素値に前記中心画素の画素値を変更し、第1の変化量の絶対値の方が第2の変化量の絶対値よりも大きい場合には、第1の画素の画素値と前記中心画素の画素値との間の値に前記中心画素の画素値を変更することを特徴とする画像処理方法。
With respect to image data of an original image, in an image processing method for performing a sharpening process on a pixel group in a predetermined range centered on the pixel for each pixel ,
With respect to a first pixel included in the pixel group and a center pixel centered in the pixel group, a first change amount that is a change amount of the pixel value of the center pixel with respect to the pixel value of the first pixel is determined. Seeking
A second change that is a change amount of a pixel value of the second pixel with respect to a pixel value of the center pixel with respect to the center pixel and a second pixel that is symmetrical to the first pixel with respect to the center pixel Find the quantity
When both the first change amount and the second change amount are either positive or negative, the first pixel is set according to the magnitude relationship between the first change amount and the second change amount. And a sharpening process is performed by changing the pixel value of the central pixel to a pixel value of any one of the second pixel and the second pixel,
When the absolute value of the first change amount is smaller than the absolute value of the second change amount, the pixel value of the central pixel is changed to the pixel value of the first pixel, and the first change amount When the absolute value is larger than the absolute value of the second change amount, the pixel value of the center pixel is changed to a value between the pixel value of the first pixel and the pixel value of the center pixel. An image processing method characterized by the above.
原画像の画像データに関して、画素ごとに、該画素を中心とした所定範囲の画素群について鮮鋭化処理を行なう画像処理方法において、
前記画素群に含まれる第1の画素と、前記画素群において中心とされた中心画素とに関して、第1の画素の画素値に対する前記中心画素の画素値の変化量である第1の変化量を求め、
前記中心画素と、前記中心画素に対して第1の画素と対称位置にある第2の画素とに関して、前記中心画素の画素値に対する第2の画素の画素値の変化量である第2の変化量を求め、
第1の変化量および第2の変化量の両方が、正および負の何れか一方である場合には、第1の変化量および第2の変化量の大小関係に応じて、第1の画素および第2の画素の何れか一方の画素値に前記中心画素の画素値を変更することにより、鮮鋭化処理が行なわれることを特徴とする画像処理方法であって、
第1の変化量および第2の変化量の両方が正であるときには、第1の変化量の絶対値の方が第2の変化量の絶対値よりも小さい場合に、第1の画素の画素値に前記中心画素の画素値を変更し、第1の変化量の絶対値の方が第2の変化量の絶対値よりも大きい場合に、第1の画素の画素値と前記中心画素の画素値との間の値に前記中心画素の画素値を変更する一方、
第1の変化量および第2の変化量の両方が負であるときには、第1の変化量の絶対値の方が第2の変化量の絶対値よりも小さい場合に、前記中心画素の画素値と第2の画素の画素値との間の値に前記中心画素の画素値を変更し、第1の変化量の絶対値の方が第2の変化量の絶対値よりも大きい場合に、第2の画素の画素値に前記中心画素の画素値を変更することを特徴とする画像処理方法。
With respect to image data of an original image, in an image processing method for performing a sharpening process on a pixel group in a predetermined range centered on the pixel for each pixel,
With respect to a first pixel included in the pixel group and a center pixel centered in the pixel group, a first change amount that is a change amount of the pixel value of the center pixel with respect to the pixel value of the first pixel is determined. Seeking
A second change that is a change amount of a pixel value of the second pixel with respect to a pixel value of the center pixel with respect to the center pixel and a second pixel that is symmetrical to the first pixel with respect to the center pixel Find the quantity
When both the first change amount and the second change amount are either positive or negative, the first pixel is set according to the magnitude relationship between the first change amount and the second change amount. And a sharpening process is performed by changing the pixel value of the central pixel to a pixel value of any one of the second pixel and the second pixel ,
When both the first change amount and the second change amount are positive, the pixel of the first pixel when the absolute value of the first change amount is smaller than the absolute value of the second change amount. When the pixel value of the center pixel is changed to a value, and the absolute value of the first change amount is larger than the absolute value of the second change amount, the pixel value of the first pixel and the pixel of the center pixel While changing the pixel value of the central pixel to a value between
When both the first change amount and the second change amount are negative, the pixel value of the central pixel is obtained when the absolute value of the first change amount is smaller than the absolute value of the second change amount. When the pixel value of the central pixel is changed to a value between the pixel value of the second pixel and the second pixel, and the absolute value of the first change amount is larger than the absolute value of the second change amount, An image processing method, wherein the pixel value of the central pixel is changed to a pixel value of two pixels.
原画像の画像データに関して、画素ごとに、該画素を中心とした所定範囲の画素群について鮮鋭化処理を行なう画像処理方法において、With respect to image data of an original image, in an image processing method for performing a sharpening process on a pixel group in a predetermined range centered on the pixel for each pixel,
前記画素群に含まれる第1の画素と、前記画素群において中心とされた中心画素とに関して、第1の画素の画素値に対する前記中心画素の画素値の変化量である第1の変化量を求め、With respect to a first pixel included in the pixel group and a center pixel centered in the pixel group, a first change amount that is a change amount of the pixel value of the center pixel with respect to the pixel value of the first pixel is determined. Seeking
前記中心画素と、前記中心画素に対して第1の画素と対称位置にある第2の画素とに関して、前記中心画素の画素値に対する第2の画素の画素値の変化量である第2の変化量を求め、A second change that is a change amount of a pixel value of the second pixel with respect to a pixel value of the center pixel with respect to the center pixel and a second pixel that is symmetrical to the first pixel with respect to the center pixel Find the quantity
第1の変化量および第2の変化量の両方が、正および負の何れか一方である場合には、第1の変化量および第2の変化量の大小関係に応じて、第1の画素および第2の画素の何れか一方の画素値に前記中心画素の画素値を変更することにより、鮮鋭化処理が行なわれることを特徴とする画像処理方法であって、When both the first change amount and the second change amount are either positive or negative, the first pixel is set according to the magnitude relationship between the first change amount and the second change amount. And a sharpening process is performed by changing the pixel value of the central pixel to a pixel value of any one of the second pixel and the second pixel,
第1の変化量および第2の変化量の両方が正であり、かつ、前記中心画素の画像値が中間値よりも小さいとき、もしくは、第1の変化量および第2の変化量の両方が負であり、かつ、前記中心画素の画像値が中間値以上であるときには、第1の変化量の絶対値の方が第2の変化量の絶対値よりも小さい場合に、第1の画素の画素値に前記中心画素の画素値を変更し、第1の変化量の絶対値の方が第2の変化量の絶対値よりも大きい場合に、第1の画素の画素値と前記中心画素の画素値との間の値に前記中心画素の画素値を変更する一方、When both the first change amount and the second change amount are positive and the image value of the central pixel is smaller than the intermediate value, or both the first change amount and the second change amount are When it is negative and the image value of the central pixel is equal to or greater than the intermediate value, the absolute value of the first change amount is smaller than the absolute value of the second change amount. When the pixel value of the center pixel is changed to a pixel value, and the absolute value of the first change amount is larger than the absolute value of the second change amount, the pixel value of the first pixel and the center pixel While changing the pixel value of the central pixel to a value between the pixel values,
第1の変化量および第2の変化量の両方が正であり、かつ、前記中心画素の画像値が中間値以上であるとき、もしくは、第1の変化量および第2の変化量の両方が負であり、かつ、前記中心画素の画像値が中間値よりも小さいときには、第1の変化量の絶対値の方が第2の変化量の絶対値よりも小さい場合に、前記中心画素の画素値と第2の画素の画素値との間の値に前記中心画素の画素値を変更し、第1の変化量の絶対値の方が第2の変化量の絶対値よりも大きい場合に、第2の画素の画素値に前記中心画素の画素値を変更することにより行なわれることを特徴とする画像処理方法。When both the first change amount and the second change amount are positive and the image value of the central pixel is equal to or greater than the intermediate value, or both the first change amount and the second change amount are When the image value of the center pixel is negative and smaller than the intermediate value, the pixel of the center pixel is obtained when the absolute value of the first change amount is smaller than the absolute value of the second change amount. When the pixel value of the central pixel is changed to a value between the value and the pixel value of the second pixel, and the absolute value of the first change amount is larger than the absolute value of the second change amount, An image processing method, comprising: changing a pixel value of the central pixel to a pixel value of a second pixel.
第1の変化量および第2の変化量の一方が正であり他方が負である場合には、前記中心画素の画素値を変更しないことを特徴とする請求項1〜3の何れか1項に記載の画像処理方法。The pixel value of the center pixel is not changed when one of the first change amount and the second change amount is positive and the other is negative. An image processing method described in 1. 前記中心画素の画素値を変更することは、前記画像群における第1の画素および第2の画素の全組合せについて、前記中心画素の画素値を変更する場合の変更すべき画素値と、変更しない場合の前記中心画素の画素値とを足し合わせ、組合せ数で割ることにより算出した平均値に、前記中心画素の画素値を変更することにより行なわれることを特徴とする請求項1から4までの何れか1項に記載の画像処理方法。Changing the pixel value of the central pixel does not change the pixel value to be changed when changing the pixel value of the central pixel for all combinations of the first pixel and the second pixel in the image group. 5. The method according to claim 1, wherein the pixel value of the central pixel is changed to an average value calculated by adding together the pixel value of the central pixel and dividing by the number of combinations. The image processing method according to claim 1. 原画像の画像データに関して、画素ごとに、該画素を中心とした所定範囲の画素群について鮮鋭化処理を行なう画像処理をコンピュータに実行させるための画像処理プログラムであって、請求項1から5の何れか1項に記載の画像処理方法により行なわれる前記鮮鋭化処理をコンピュータに実行させることを特徴とする画像処理プログラム。6. An image processing program for causing a computer to perform image processing for performing sharpening processing on a pixel group in a predetermined range centered on each pixel with respect to image data of an original image. An image processing program for causing a computer to execute the sharpening process performed by the image processing method according to any one of the preceding claims. 請求項6に記載した画像処理プログラムを記録したコンピュータ読み取り可能な記録媒体。A computer-readable recording medium on which the image processing program according to claim 6 is recorded.
JP2002010070A 2002-01-18 2002-01-18 Image processing method, image processing program, and computer-readable recording medium recording the program Expired - Lifetime JP3791420B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002010070A JP3791420B2 (en) 2002-01-18 2002-01-18 Image processing method, image processing program, and computer-readable recording medium recording the program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002010070A JP3791420B2 (en) 2002-01-18 2002-01-18 Image processing method, image processing program, and computer-readable recording medium recording the program

Publications (2)

Publication Number Publication Date
JP2003219177A JP2003219177A (en) 2003-07-31
JP3791420B2 true JP3791420B2 (en) 2006-06-28

Family

ID=27647901

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002010070A Expired - Lifetime JP3791420B2 (en) 2002-01-18 2002-01-18 Image processing method, image processing program, and computer-readable recording medium recording the program

Country Status (1)

Country Link
JP (1) JP3791420B2 (en)

Also Published As

Publication number Publication date
JP2003219177A (en) 2003-07-31

Similar Documents

Publication Publication Date Title
US6724941B1 (en) Image processing method, image processing device, and recording medium
JP4585456B2 (en) Blur conversion device
JP3766308B2 (en) Camera and image forming system
JP2001186353A (en) Picture processing method and medium recording picture processing program
JP2002044473A (en) Image-processing method, image-processing device, and record medium with program for executing image- processing method stored thereon
JP2004038728A (en) Image processing method, image processing program, and recording medium recording image processing program
JP2000083157A (en) Image processing method and image processing unit
US11792513B2 (en) Apparatus and method for detecting an edge in an image
EP1376469A2 (en) Method and system for providing a soft tone effect to a digital or digitised image
JP2010010976A (en) Photographic image processing method, photographic image processing program, and photographic image processing device
CN1321519C (en) Image processor, method and program and recording medium of recording such program
JP3791420B2 (en) Image processing method, image processing program, and computer-readable recording medium recording the program
JP4366634B2 (en) Noise pixel map creation method, apparatus and program for implementing the method, and photo print apparatus
JP3631370B2 (en) Image processing method and image processing apparatus
JP2003132352A (en) Image processing method, image processor, image processing program and computer-readable recording medium recording it
JP2003317095A (en) Method and program for image sharpening processing, recording medium where the image sharpening processing program is recorded, and image output device
JP2004133551A (en) Image processing method, image processor, image processing program and recording medium having image processing program recorded thereon
JP2001086332A (en) Image processor
JP2000324339A (en) Picture processing method and its device
JP2001160142A (en) Method for judging image sharpness, recording medium having program for performing processing deciding image sharpness recorded thereon, image processor and photographic printer
JPH06311425A (en) Image correcting device
JP4091220B2 (en) Image processing method and apparatus, and recording medium
JP2003069818A (en) Image processing method, image processing program and recording medium recorded with image processing program
JP3819194B2 (en) Image processing device
US20030133622A1 (en) Image processing device, image processing method, image processing program, and storage medium storing image processing program

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20051115

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20051122

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20060123

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20060327

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

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20120414

Year of fee payment: 6

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

Year of fee payment: 6

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350