JP2000285232A5 - - Google Patents

Download PDF

Info

Publication number
JP2000285232A5
JP2000285232A5 JP1999093776A JP9377699A JP2000285232A5 JP 2000285232 A5 JP2000285232 A5 JP 2000285232A5 JP 1999093776 A JP1999093776 A JP 1999093776A JP 9377699 A JP9377699 A JP 9377699A JP 2000285232 A5 JP2000285232 A5 JP 2000285232A5
Authority
JP
Japan
Prior art keywords
image
image data
area
sharpening
sharp
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP1999093776A
Other languages
Japanese (ja)
Other versions
JP2000285232A (en
JP4019239B2 (en
Filing date
Publication date
Application filed filed Critical
Priority to JP09377699A priority Critical patent/JP4019239B2/en
Priority claimed from JP09377699A external-priority patent/JP4019239B2/en
Publication of JP2000285232A publication Critical patent/JP2000285232A/en
Publication of JP2000285232A5 publication Critical patent/JP2000285232A5/ja
Application granted granted Critical
Publication of JP4019239B2 publication Critical patent/JP4019239B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Description

【発明の名称】画像鮮鋭化プログラムを記録した媒体、画像鮮鋭化装置および
画像鮮鋭化方法
【特許請求の範囲】
【請求項1】画像をドットマトリクス状の画素で多階調表現した画像データに基づいて元画像の非鮮鋭領域を検出する非鮮鋭領域検出工程と、
上記画像データにおける上記非鮮鋭領域と検出された部位について相対的に強く鮮鋭化する画像鮮鋭化工程と、
鮮鋭化された画像データを肘力する画像データ出力工程とを具備することを特徴とする画像鮮鋭化方法。
【請求項2】上記非鮮鋭領域検出工程では、人力された原画像データと、この画像データに対して平滑化処理をかけた平滑化画像データとの差分が小さい領域を非鮮鋭領域として検出することを特徴とする上記請求項1に記載の画像鮮鋭化方法。
【請求項3】上記非鮮鋭領域検出工程では、上記原画像データと上記平滑化画像データとの差分値についてトーンカーブ補正して非鮮鋭領域の検出範囲を調整することを特徴とする上記請求項2に記載の画像鮮鋭化方法。
【請求項4】上記非鮮鋭領域検出工程では、上記原画像データと上記平滑化画像データとの差分が大きい領域を鮮鋭領域として検出するとともに、上記画像鮮鋭化工程では、同鮮鋭領域を反転させて非鮮銃領域としつつこの非鮮鋭領域をマスクとして上記原画像データを平滑化処理した上で、元の原画像データとの差に基づいて画像を鮮鋭化させることを特徴とする上記請求項1〜請求項3のいずれかに記載の画像鮮鋭化方法。
【請求項5】上記非鮮鋭領域検出工程では、上記検出された鮮鋭領域を縮小化してから反転することを特徴とする上記請求項4に記載の画像鮮鋭化方法。
【請求項6】上記非鮮鋭領域検出工程では、上記非鮮鋭領域の縁部に平滑化処理をかけることを特徴とする上記請求項1〜請求項5のいずれかに記載の画像鮮鋭化方法。
【請求項7】上記非鮮鋭領域検出工程では、上記原画像データに対して予めトーンカーブ補正しておいて上記非鮮鋭領域の検出に利用することを特徴とする上記請求項1〜請求項6のいずれかに記載の画像鮮鋭化方法。
【請求項8】上記画像鮮鋭化工程では、鮮鋭領域についても上記非鮮鋭領域よりも弱めに鮮鋭化することを特徴とする上記請求項1〜請求項7のいずれかに記載の画像鮮鋭化方法。
【請求項9】上記画像鮮鋭化工程では、鮮鋭化でざらつく色領域について鮮鋭化度合いを低減化させることを特徴とする上記請求項1〜請求項8のいずれかに記載の画像鮮鋭化方法。
【請求項10】画像をドットマトリクス状の画素で多階調表現した画像デー夕に基づいて元画像の非鮮鋭領域を検出する非鮮鋭領域検出手段と、
上記画像データにおける上記非鮮鋭領域と検出された部位について相対的に強く鮮鋭化する画像鮮鋭化手段と、
鮮鋭化された画像データを出力する画像データ出力手段とを具備することを特徴とする画像鮮鋭化装置。
【請求項11】上記非鮮鋭領域検出手段では、人力された原画像データと、この画像データに対して平滑化処理をかけた平滑化画像データとの差分が小さい領域を非鮮鋭領域として検出することを特徴とする上記請求項10に記載の画像鮮鋭化装置。
【請求項12】上記非鮮鋭領域検出手段では、上記原画像データと上記平滑化画像データとの差分値についてトーンカーブ補正して非鮮鋭領域の検出範囲を調整することを特徴とする上記請求項11に記載の画像鮮鋭化装置。
【請求項13】上記非鮮鋭領域検出手段では、上記原画像データと上記平滑化画像データとの差分が大きい領域を鮮鋭領域として検出するとともに、上記画像鮮鋭化手段では、同鮮鋭領域を反転させて非鮮銃領域としつつこの非鮮鋭領域をマスクとして上記原画像データを平滑化処理した上で、元の原画像データとの差に基づいて画像を鮮鋭化させることを特徴とする上記請求項10〜請求項12のいずれかに記載の画像鮮鋭化装置。
【請求項14】上記非鮮鋭領域検出手段では、上記検出された鮮鋭領域を縮小化してから反転することを特徴とする上記請求項13に記載の画像鮮鋭化装置。
【請求項15】上記非鮮鋭領域検出手段では、上記非鮮鋭領域の縁部に平滑化処理をかけることを特徴とする上記請求項10〜請求項14のいずれかに記載の画像鮮鋭化装置。【請求項16】上記非鮮鋭領域検出手段では、上記原画像データに対して予めトーンカーブ補正しておいて上記非鮮鋭領域の検出に利用することを特徴とする上記請求項10〜請求項15のいずれかに記載の画像鮮鋭化装置。
【請求項17】上記画像鮮鋭化手段では、鮮鋭領域についても上記非鮮鋭領域よりも弱めに鮮鋭化することを特徴とする上記請求項10〜請求項16のいずれかに記載の画像鮮鋭化装置。
【請求項18】上記画像鮮鋭化手段では、鮮鋭化でざらつく色領域について鮮鋭化度合いを低減化させることを特徴とする上記請求項10〜請求項17のいずれかに記載の画像鮮鋭化装置。
【請求項19】画像をドットマトリクス状の画素で多階調表現した画像データに基づいてコンピュータにて画像を鮮鋭化させる画像鮮鋭化処理プログラムを記録した媒体であって、
上記画像データに基づいて元画像の非鮮鋭領域を検出する非鮮鋭領域検出ステップと、
上記画像データにおける上記非鮮鋭領域と検出された部位について相対的に強く鮮鋭化する画像鮮鋭化ステップと、
鮮鋭化された画像データを出力する画像データ出力ステップとをコンピュータに実行させることを特徴とする画像鮮鋭化プログラムを記録した媒体。
【発明の詳細な説明】
【0001】
【発明の属する技術分野】
本発明は、画像を鮮鋭化させる画像鮮鋭化プログラムを記録した媒体、画像鮮鋭化装置および画像鮮鋭化方法に関する。
【0002】
【従来の技術】
コンピュータなどで画像を扱う際には、画像をドットマトリクス状の画素で表現し、各画素を階調値で表している。例えば、コンピュータの画面で水平方向に640ドット、垂直方向に480ドットの画素で写真を表示することが多い。
【0003】
また、各画素ごとに色や明るさを表すデータを持つことになるため、このデータを変化させて画像処理することが行われている。この際、ぼけた感じの画像をシャープに見せる鮮鋭化処理も広く行われており、画像全体に対して一律に鮮鋭化処理をかけている。
【0004】
【発明が解決しようとする課題】
上述した従来の画像鮮鋭化装置においては、画像全体に対して一律に鮮鋭化処理をかけているが、もともと鮮鋭なエッジ部分などは過度にシャープになりすぎ、生成された画像には妙に作り物の感じが強く表れてしまうという課題があった。
【0005】
本発明は、上記課題にかんがみてなされたもので、より自然な感じで鮮鋭化させることが可能な画像鮮鋭化プログラムを記録した媒体、画像鮮鋭化装置および画像鮮鋭化方法の提供を目的とする。
【0006】
【課題を解決するための手段】
上記目的を達成するため、請求項1にかかる発明は、画像をドットマトリクス状の画素で多階調表現した画像データに基づいて元画像の非鮮鋭領域を検出する非鮮鋭領域検出工程と、
上記画像データにおける上記非鮮鋭領域と検出された部位について相対的に強く鮮鋭化する画像鮮鋭化工程と、
鮮鋭化された画像データを肘力する画像データ出力工程とを具備する構成としてある。【0007】
上記のように構成した請求項1にかかる発明においては、画像をドットマトリクス状の画素で多階調表現した画像データに対して、まず、非鮮鋭領域検出工程で同画像データに基づいて元画像の非鮮鋭領域を検出し、続いて画像鮮鋭化工程で上記画像データにおける上記非鮮鋭領域と検出された部位について相対的に強く鮮鋭化する。そして、鮮鋭化された画像データを画像データ出力工程で出力する。
【0008】
すなわち、非鮮鋭領域を検出してその領域について鮮鋭化している。
画像データは、既に記憶領域に保存されている画像データを取得して対象とするものであっても良いし、カメラのように逐次入力されてくる画像データを取得して対象とするものであるなど、適宜変形可能である。
また、画像データ出力工程についても同様であり、出力先が具体的な記録媒体であるほか、メモリなどの一時的な記憶領域であるとか、ネットワークなどの通信回線を介した出力先であっても良い。
【0009】
さらに、この画像鮮鋭化処理自体が、画像処理における複数の処理のうちの一つであってもよく、その場合には実質的には他の処理が取得した画像データに対して読み書きすることになる。
すなわち、画像データの入出力は以下の非鮮鋭化領域検出工程と画像鮮鋭化工程で処理できるようにするものであればいかなる態様のものであっても構わない。また、画像データについても、画像をドットマトリクス状の画素で多階調表現したものであればよく、モノクロの画像でもカラーの画像でも良いし、カラー画像の場合には表色空間における座標系の取り方であるとか、階調範囲などについても特に限定されるものではない。
【0010】
非鮮鋭領域検出工程では、元画像の非鮮鋭領域を検出するが、その具体的手法はさまざまであり、その一例として、請求項2にかかる発明は、請求項1に記載の画像鮮鋭化方法において、上記非鮮鋭領域検出工程では、人力された原画像データと、この画像データに対して平滑化処理をかけた平滑化画像データとの差分が小さい領域を非鮮鋭領域として検出する構成としてある。
【0011】
上記のように構成した請求項2にかかる発明においては、入力された画像データを原画像データとして残しつつ、この画像データに対して平滑化処理をかけることによって平滑化画像データを生成させ、その上で、上記非鮮鋭領域検出工程は、原画像データと平滑化画像データとの差分が小さい領域を非鮮鋭領域として検出する。
平滑化処理は対象となる中心画素の周りの画素との平均化した画素を生成することになるが、これは周辺画素から見た場合の当該中心画素における期待値ともいえる。だとすると、この中心画素での具体的な値との差分を求めるのであれば、その期待値との差が小さいほど当該画素での変化具合が小さいといえ、いわゆるエッジ分あるいは周波数の高い画素を除いた非鮮鋭な領域を表すことになる。
【0012】
ただ、以上のようにして非鮮鋭な領域が分かるにしてもその差分値自体が以降の処理において利用しやすいとは限らない。このため、請求項3にかかる発明は、請求項2に記載の画像鮮鋭化方法において、上記非鮮鋭領域検出工程では、上記原画像データと上記平滑化画像データとの差分値についてトーンカーブ補正して非鮮鋭領域の検出範囲を調整する構成としてある。
【0013】
上記のように構成した請求項3にかかる発明においては、上記原画像データと上記平滑化画像データとの差分値についてトーンカーブ補正する。そのままの差分値を用いた場合は、あるしきい値を境に大きく意味内容が異なる場合が考えられる。こうした場合でもトーンカーブを使用して差分値の意味に軽重を付けることにより、非鮮鋭領域の検出範囲を調整できる。
非鮮鋭領域を検出することと鮮鋭領域を検出することとは表と裏の関係にあるから、検出する領域は必ずしも非鮮鋭領域そのものに限られないと考えるべきである。その一例として、請求項4にかかる発明は、請求項1〜請求項3のいずれかに記載の画像鮮鋭化方法において、上記非鮮鋭領域検出工程では、上記原画像データと上記平滑化画像データとの差分が大きい領域を鮮鋭領域として検出するとともに、上記画像鮮鋭化工程では、同鮮鋭領域を反転させて非鮮銃領域としつつこの非鮮鋭領域をマスクとして上記原画像データを平滑化処理した上で、元の原画像データとの差に基づいて画像を鮮鋭化させる構成としてある。
【0014】
上記のように構成した請求項4にかかる発明においては、上記原画像データと上記平滑化画像データとの差分が大きい領域を鮮鋭領域として検出する。従って、表面的には非鮮鋭領域を検出していないようにも見えるが、実は残りの領域が非鮮鋭領域であるのであるから、上記非鮮鋭領域検出工程は非鮮鋭領域を検出していることになる。この反転状態は、上記画像鮮鋭化工程で解消する。
すなわち、同画像鮮鋭化工程では上記鮮鋭領域を反転させ、これによって非鮮鋭領域としつつこの非鮮鋭領域をマスクとして上記原画像データを平滑化処理する。さらに、平滑化した画像を元の画像から引けば高周波成分が残って鮮鋭化されることになる。
【0015】
鮮鋭領域と非鮮鋭領域との境界の調整は上述したトーンカーブ補正に限られるものではなく、その一例として、請求項5にかかる発明は、請求項4に記載の画像鮮鋭化方法において、上記非鮮鋭領域検出工程では、上記検出された鮮鋭領域を縮小化してから反転する構成としてある。
上記のように構成した請求項5にかかる発明においては、検出された鮮鋭領域を最初に縮小化するので、シャープに鮮鋭領域を検出することになる。この後、反転するが、シャープさは非鮮鋭領域の外縁を広げるように作用する。
【0016】
同様に、鮮鋭領域と非鮮鋭領域との境界を調整する他の一例として、請求項6にかかる発明は、請求項1〜請求項5のいずれかに記載の画像鮮鋭化方法において、上記非鮮鋭領域検出工程では、上記非鮮鋭領域の縁部に平滑化処理をかける構成としてある。
上記のように構成した請求項6にかかる発明においては、非鮮鋭領域の縁部に平滑化処理をかけるため、このかけ方によっては縁部が多少なりとも内外に移動し、調整されることになる。この場合、必ずしも縁部だけに平滑化処理をかける必要はなく、画像全体に平滑化処理をかけても同様といえるし、逆に縁部だけにかけることでも可能である。
【0017】
原画像データの値によっては同じ鮮鋭さを備えていても判断が変化してくることがある。例えば、全体的に暗い場合と全体的に明るい場合とでは、明暗の変化度合いが比例していると考えると、暗い方について非鮮鋭な領域が大きいと判断するはずである。しかし、このような結果となるのは妥当ではなく、その対策の好適な一例として、請求項7にかかる発明は、請求項1〜請求項6のいずれかに記載の画像鮮鋭化方法において、上記非鮮鋭領域検出工程では、上記原画像データに対して予めトーンカーブ補正しておいて上記非鮮鋭領域の検出に利用する構成としてある。
【0018】
上記のように構成した請求項7にかかる発明においては、原画像データに対して予めトーンカーブ補正しておくので、上記非鮮鋭領域を検出するにあたって妥当な領域を得られるようになる。また、かかる明暗に対する調整目的に限らず、意識的に調整を加えたいということも当然に可能である。
非鮮鋭領域を鮮鋭化させることによって従来技術の不具合が解消されるものの、これは鮮鋭領域の鮮鋭化を必ずしも排斥するものではなく、その一例として、請求項8にかかる発明は、請求項1〜請求項7のいずれかに記載の画像鮮鋭化方法において、上記画像鮮鋭化工程では、鮮鋭領域についても上記非鮮鋭領域よりも弱めに鮮鋭化する構成としてある。
【0019】
上記のように構成した請求項8にかかる発明においては、非鮮鋭領域を鮮鋭化させる画像鮮鋭化工程で、鮮鋭領域についても鮮鋭化する。鮮鋭領域についての鮮鋭化が、非鮮鋭領域についての鮮鋭化よりも強いようであれば、従来技術と異なるところはないから、非鮮鋭領域よりも弱めにしておく。
非鮮鋭領域についての鮮鋭化によって元もとの鮮鋭領域とのバランスが崩れるような場合には、このようにすることが有効といえる。鮮鋭化の度合いは非鮮鋭領域と鮮鋭領域とで予め一定の割合を定めておいても良いし、具体的状況に応じて適宜鮮鋭領域についての鮮鋭度を調整するようにしても良い。
【0020】
一方、特定の被写体によっては観察者の視線が集中してざらついた感じが表れることがある。特に肌色の領域については、本来の被写体であることも手伝って感覚が鋭敏になるが故に画像データとしては良好な感じであるにもかかわらず、不快に思いかねない。このような場合に好適な一例として、請求項9にかかる発明は、請求項1〜請求項8のいずれかに記載の画像鮮鋭化方法において、上記画像鮮鋭化工程では、鮮鋭化でざらつく色領域について鮮鋭化度合いを低減化させる構成としてある。
【0021】
上記のように構成した請求項9にかかる発明においては、鮮鋭化でざらつく色領域である肌色や空色などについて鮮鋭化度合いを低減化させるため、ざらつき間を低減させることになる。色領域は色度で判断すればよく、色度であれば輝度の影響も受けないので明るく写っていても暗く写っていても人の肌を検知できる。なお、色領域は肌色や空色以外であってもよく、適宜調整可能である。
【0022】
このように、非鮮鋭領域についての鮮鋭化する手法は実体のある装置において実現され、その意味で本発明を実体のある装置としても適用可能であることは容易に理解できる。このため、請求項10にかかる発明は、画像をドットマトリクス状の画素で多階調表現した画像デー夕に基づいて元画像の非鮮鋭領域を検出する非鮮鋭領域検出手段と、上記画像データにおける上記非鮮鋭領域と検出された部位について相対的に強く鮮鋭化する画像鮮鋭化手段と、鮮鋭化された画像データを出力する画像データ出力手段とを具備する構成としてある。
すなわち、実体のある装置としても有効であることに相違はない。このような画像鮮鋭化装置は単独で実施される場合もあるし、ある機器に組み込まれた状態で他の方法とともに実施されることもあるなど、発明の思想としてはこれに限らず、各種の態様を含むものである。従って、ソフトウェアであったりハードウェアであったりするなど、適宜、変更可能である。
【0023】
発明の思想の具現化例として画像鮮鋭化方法を実施するソフトウェアとなる場合には、かかるソフトウェアを記録した記録媒体上においても当然に存在し、利用されるといわざるをえない。
その一例として、請求項19にかかる発明は、画像をドットマトリクス状の画素で多階調表現した画像データに基づいてコンピュータにて画像を鮮鋭化させる画像鮮鋭化処理プログラムを記録した媒体であって、上記画像データに基づいて元画像の非鮮鋭領域を検出する非鮮鋭領域検出ステップと、上記画像データにおける上記非鮮鋭領域と検出された部位について相対的に強く鮮鋭化する画像鮮鋭化ステップと、鮮鋭化された画像データを出力する画像データ出力ステップとをコンピュータに実行させる構成としてある。
むろん、その記録媒体は、磁気記録媒体であってもよいし光磁気記録媒体であってもよいし、今後開発されるいかなる記録媒体においても全く同様に考えることができる。また、一次複製品、二次複製品などの複製段階については全く問う余地無く同等である。
さらに、一部がソフトウェアであって、一部がハードウェアで実現されている場合においても発明の思想において全く異なるものではなく、一部を記録媒体上に記憶しておいて必要に応じて適宜読み込まれるような形態のものとしてあってもよい。むろん、このプログラム自体に発明の思想が反映されていることはいうまでもない。
【0024】
むろん、このような画像鮮鋭化方法は単独で実施される場合もあるし、ある機器に組み込まれた状態で他の方法とともに実施されることもあるなど、発明の思想としてはこれに限らず、各種の態様を含むものであって、適宜、変更可能である。
【0025】
【発明の効果】
以上説明したように本発明は、自然な感じで画像をシャープにさせることが可能な画像鮮鋭化方法を提供することができる。
また、請求項2にかかる発明によれば、比較的容易に非鮮鋭領域を検出することができる。
さらに、請求項3にかかる発明によれば、非鮮鋭領域の検出範囲の調整が容易になる。【0026】
さらに、請求項4にかかる発明によれば、非鮮鋭領域を直に検出するのではなく、鮮鋭領域を検出する反射的効果として非鮮鋭領域を検出できるので、より柔軟な処理が可能となる。
さらに、請求項5と請求項6にかかる発明によれば、非鮮鋭領域と鮮鋭領域の境界に対する調整が柔軟に行える。
さらに、請求項7にかかる発明によれば、非鮮鋭領域の検出を良好に行うための調整手法を提供することができる。
【0027】
さらに、請求項8にかかる発明によれば、非鮮鋭領域だけを鮮鋭化させることによる不具合を調整することができる。
さらに、請求項9にかかる発明によれば、特定の色領域について鮮鋭化を弱めることにより、肌の部分などでざらつき感を低減させることができる。
さらに、請求項10〜請求項18にかかる発明によれば、同様の効果を奏する画像鮮鋭化装置を提供でき、請求項19にかかる発明によれば、画像鮮鋭化プログラムを記録した媒体を提供できる。
【0028】
【発明の実施の形態】
図1は本発明の一実施形態にかかる画像鮮鋭化装置をクレーム対応図により示しており、図2は同画像鮮鋭化装置を実現するハードウェアの一例としてのコンピュータシステム10をブロック図により示している。まず、このコンピュータシステム10について説明する。
本コンピュータシステム10は、画像データを直接的に入力する画像入力デバイスとして、スキャナ11aとデジタルスチルカメラ11bとビデオカメラ11cとを備えており、コンピュータ本体12に接続されている。それぞれの入力デバイスは画像をドットマトリクス状の画素で表現した画像データを生成してコンピュータ本体12に出力可能となっており、ここで同画像データはRGBの三原色においてそれぞれ256階調表示することにより、約1670万色を表現可能となっている。
【0029】
コンピュータ本体12には、外部補助記憶装置としてのフロッピーディスクドライブ13aとハードディスク13bとCD−ROMドライブ13cとが接続されており、ハードディスク13bにはシステム関連の主要プログラムが記録されており、フロッピーディスクやCD−ROMなどから適宜必要なプログラムなどを読み込み可能となっている。
また、コンピュータ本体12を外部のネットワークなどに接続するための通信デバイスとしてモデム14aが接続されており、外部のネットワークに同公衆通信回線を介して接続し、ソフトウェアやデータをダウンロードして導入可能となっている。この例ではモデム14aにて電話回線を介して外部にアクセスするようにしているが、LANアダプタを介してネットワークに対してアクセスする構成とすることも可能である。この他、コンピュータ本体12の操作用にキーボード15aやポインティングデバイスとしてのマウス15bも接続されている。
【0030】
さらに、画像出力デバイスとして、ディスプレイ17aとカラープリンタ17bとを備えている。ディスプレイ17aについては水平方向に800画素と垂直方向に600画素の表示エリアを備えており、各画素毎に上述した1670万色の表示が可能となっている。むろん、この解像度は一例に過ぎず、640×480画素であったり、1024×768画素であるなど、適宜、変更可能である。
【0031】
また、カラープリンタ17bはインクジェットプリンタであり、CMYKの四色の色インクを用いて記録媒体たる印刷用紙上にドットを付して画像を印刷可能となっている。画像密度は360×360DPIや720×720DPIといった高密度印刷が可能となっているが、諧調表限については色インクを付すか否かといった2階調表現となっている。
一方、このような画像入力デバイスを使用して画像を入力しつつ、画像出力デバイスに表示あるいは出力するため、コンピュータ本体12内では所定のプログラムが実行されることになる。そのうち、基本プログラムとして稼働しているのはオペレーティングシステム(OS)12aであり、このオペレーティングシステム12aにはディスプレイ17aでの表示を行わせるディスプレイドライバ(DSP DRV)12bとカラープリンタ17bに印刷出力を行わせるプリンタドライバ(PRT DRV)12cが組み込まれている。これらのドライバ12b,12cの類はディスプレイ17aやカラープリンタ17bの機種に依存しており、それぞれの機種に応じてオペレーティングシステム12aに対して追加変更可能である。また、機種に依存して標準処理以上の付加機能を実現することもできるようになっている。すなわち、オペレーティングシステム12aという標準システム上で共通化した処理体系を維持しつつ、許容される範囲内での各種の追加的処理を実現できる。
【0032】
この基本プログラムとしてのオペレーティングシステム12a上でアプリケーション12dが実行される。アプリケーション12dの処理内容は様々であり、操作デバイスとしてのキーボード15aやマウス15bの操作を監視し、操作された場合には各種の外部機器を適切に制御して対応する演算処理などを実行し、さらには、処理結果をディスプレイ17aに表示したり、カラープリンタ17bに出力したりすることになる。
【0033】
ところで、デジタルスチルカメラ11bで撮影した画像は画像データとなり、アプリケーション12dにて各種の画像処理を実行後、ディスプレイ17aに表示したり、カラープリンタ17bに出力できる。このような画像処理の一例として強調処理(鮮鋭化処理のことを以後、このように呼ぶことにする)があり、本実施形態においては、アプリケーション12dが最適な結果を得られる強調処理を実行するものとして、以下に説明していく。
【0034】
以上において、画像入力デバイスなどから画像データを取得する処理が図1に示す画像データ取得手段A1を構成することになり、これに関連するハードウェア及びソフトウェアが実際には該当する。また、非鮮鋭領域検出手段A2はこのように取得される画像データのうちで比較的鮮鋭度が高くない領域を検出する処理に該当し、アプリケーション12dが具体的に実施する。また、アプリケーション12dはこの検出結果を利用して上記画像データにおける非鮮鋭領域の鮮鋭化処理をも実施するため、画像鮮鋭化手段A3も構成する。
【0035】
本実施形態においては、アプリケーション12dが画像処理を実施しているが、ディスプレイドライバ12bやプリンタドライバ12cが画像出力する際に自動的に鮮鋭化処理を実現するような構成とすることも当然に可能である。
むろん、かかる処理を実行するアプリケーション12dやディスプレイドライバ12bやプリンタドライバ12cは、ハードディスク13bに記憶されており、適宜、コンピュータ本体12にて読み込まれて稼働する。また、導入時にはCD−ROMであるとかフロッピーディスクなどの媒体に記録されてインストールされる。従って、これらの媒体は画像鮮鋭化プログラムを記録した媒体を構成する。
【0036】
アプリケーション12dは画像処理した画像データをファイル形式で以降の処理プロセスに委ねるが、このように画像データをファイル形式で出力する過程が画像データ出力手段A4を構成する。なお、上述したようにディスプレイドライバ12bやプリンタドライバ12cが画像出力する際に鮮鋭化処理を実現する場合にはその出力段が画像データ出力手段A4を構成するといえる。 本実施形態においては、画像鮮鋭化装置をコンピュータシステム10として実現しているが、必ずしもかかるコンピュータシステムを必要とするわけではなく、同様の画像データに対して補間処理が必要なシステムであればよい。例えば、図3に示すようにデジタルスチルカメラ11b1内に強調処理する画像鮮鋭化装置を組み込み、強調処理した画像データを用いてディスプレイ17a1に表示させたりカラープリンタ17b1に印字させるようなシステムであっても良い。また、図4に示すように、コンピュータシステムを介することなく画像データを入力して印刷するカラープリンタ17b2においては、スキャナ11a2やデジタルスチルカメラ11b2あるいはモデム14a2等を介して入力される画像データについて自動的に強調処理するように構成することも可能である。このようなカラープリンタ17b2は、近年、ビデオプリンタとして家庭用テレビやビデオに接続して一場面をハードコピー化するのに使用されることも多く、着脱可能な記録メディアから画像データを取得しつつ解像度変換において最適な強調処理を実行すればよい。
【0037】
この他、図5に示すようなカラーファクシミリ装置18aや図6に示すようなカラーコピー装置18bといった画像データを扱う各種の装置においても当然に適用可能である。
上述した強調処理は、具体的には上記コンピュータ本体12内にて図7〜図9に示すフローチャートに対応した画像処理プログラムで行っている。また、図10は画像処理プログラム中での処理対象の変化を概略的に示している。なお、図10は画像処理プログラムの中でのワークエリアを示しており、RGBの3要素色のデータからなる各画像データはレイヤと呼ぶ個別のプレーンを想定したワークエリアを使用して処理対象となり、さらに各画像処理を制御するために演算結果などを格納するためにチャンネルというワークエリアを使用している。
【0038】
図7〜図9に示すフローチャートにおいて、ステップ100では画像データを入力する。この画像データはオペレーティングシステム12aを介してスキャナ11a2やデジタルスチルカメラ11b2あるいはモデム14a2等から取り込まれ、取り込んだ画像データは上述したレイヤにおけるオリジナル画像レイヤに格納される。
次に、オリジナル画像を残して処理を進めるためにオリジナル画像レイヤの画像データを背景レイヤと複製レイヤにコピーする(ステップ102、ステップ104)。本実施形態においては、この背景レイヤの画像データに対して最終的な強調処理を加えることとし、複製レイヤについてマスクを生成していくための画像処理を実施する。
【0039】
画像処理の最初に行なうのはトーンカーブ補正であり(ステップ106)、図12に示すトーンカーブを利用して複製レイヤに格納されている画像データのコントラストを上げている。ここでコントラストを上げる処理を行う意義については、後述することにする。
コントラストを上げた画像データについて、ステップ108では硬調複製レイヤにコピーしてオリジナルを残しておき、ステップ110では硬調複製レイヤの画像データに平滑化処理を実施する。平滑化処理は注目画素を中心とする所定領域について画像データの平均化を行なうものであり、図13に示すフィルタマスクを利用してフィルタ処理する。このフィルタ処理では、注目画素に隣接する8画素と注目画素の画像データを全て加え、画素数で除算するため、平均値を求めることに他ならない。図示するフィルタマスクは3×3画素の9画素であるが5×5画素というようなサイズの異なるフィルタマスクを使用しても良いし、周辺画素の重み付けを減らすような平滑化を行っても良い。
【0040】
平滑化した画像データは硬調複製レイヤに格納され、ステップ112では、硬調複製レイヤの画像データと複製レイヤの画像データとの差の絶対値を演算し、演算結果をアルファチャンネル1に格納する。
図14は、この一連の処理の意味するところを説明するための参考図であり、本来、二次元的な画像データを分かりやすく一次元的に並べ直したものである。複製レイヤの画像データが同図(a)に示すとおりであるとすると、平滑化することによって同図(b)に示すように段差部分が滑らかになる。次いで、両者の差分を演算すると同図(c)に示すように平滑化して変化した画素において差分値が生じ、かつ、その絶対値(図中一点鎖線で表れたもの)が大きくなるのは複製レイヤの画像データが大きく変化しているところである。この絶対値が大きい部分こそ画像が大きく変化しているところであり、この一連の処理は画像の鮮鋭領域を検出することに他ならない。また、ステップ106で複製レイヤの画像データのコントラストを上げたのは、上述した差分値を大きくすることに貢献し、鮮鋭領域の検出を行いやすくしている。この点、最初に鮮鋭領域を検出できれば以降においてその調整は任意に行えるが、鮮鋭領域を検出する段階で対象外となってしまうと調整の余地が小さくなる。従って、このように広めに鮮鋭領域を検出するようにしている。
【0041】
また、図15は具体的な画像イメージで上述した処理の意味するところをを説明している。同図(a)がオリジナルの画像であるとすると、平滑化処理することによって同図(b)に示すように輪郭部分の画像データに変化が表れ、それ以外の部分は元の色のままとなる。従って、オリジナルの画像との差分値を求めると、同図(c)に示すように元の画像の輪郭を中心とする領域だけが残るのである。
【0042】
アルファチャンネル1は汎用的なチャンネルであるので、差分値の絶対値を保存するためにアンシャープマスクオリジナルチャンネルとアンシャープマスク硬調化チャンネルとに格納しておき(ステップ114とステップ116)、以下に、具体的な演算結果を良好とするためのアンシャープマスク硬調化チャンネルに調整を行っていく。
まず、ステップ118では図16に示すトーンカーブを利用してトーンカーブ補正を行う。図14(c)に示すようにして画像の鮮鋭化に対応する差分値を得られても、このデータそのものが演算に利用しやすいとは限らない。特に、かかる差分値の絶対値自身は小さな値にしかならないので、より大きな値にする必要もある。図15に示すものでは、小さな絶対値を比例的に大きくさせることを目的としているが、あるしきい値を設定してそれ以下のものは余り変化させないような急峻なS字カーブを採用することも可能である。【0043】
次に、ステップ120ではアンシャープマスク硬調化チャンネルの縮小化処理を実施する。縮小化処理は実際のイメージとして線の幅を狭めるような処理であり、図17に示すように1画素(1ピクセル)分だけ領域を狭める。上述したように、ステップ118ではしきい値の設定次第で脱落してしまいかねない画素を拾い上げている関係上、ステップ120では適度な範囲とするためにこのような縮小化を行っている。具体的な画像のイメージは図15(c)から同図(d)へと変化する。むろん、これはチューニングの範囲であり、適宜変更可能である。
【0044】
以上によって、鮮鋭な領域についての調整を行ったが、本発明で主に求めようとしているのは非鮮鋭領域であるから、ステップ122ではアンシャープマスク硬調化チャンネルを反転処理する。反転処理は単純に画像データの値を255から引いたものとする。従って、「255」は「0」に、「200」は「55」に「1」は「254」にというように変化する。反転した状態は図15(e)に示すようになり、当初の同図(a)において輪郭だった部分以外の領域に何らかの値を持つマスクが形成されたことになる。そして、マスクとしての処理の最後のものとして、ステップ124ではこのアンシャープマスク硬調化チャンネルに平滑化処理を施す。これにより、図15(e)に示すマスク画像での境界部分が滑らかになり、次に実施する強調処理で画像にジャンプが生じないようにすることを期待できる。
【0045】
そして、この完成したマスクを完成アンシャープマスク1チャンネルと完成アンシャープマスク2チャンネルにコピーし(ステップ126、ステップ128)、さらに完成アンシャープマスク2チャンネルについては反転処理を実施する(ステップ130)。このように反転処理を実施することにより、鮮鋭な領域を再度検出することになる。本実施形態においては、非鮮鋭領域について強い強調処理を行う一方、非鮮鋭領域についても弱い強調処理を行うため、敢えて完成アンシャープマスク2チャンネルとして鮮鋭領域を再度検出するようにしている。
【0046】
強調処理では図18〜図19に示すアンシャープマスクを使用する。ここで、ステップ132とステップ134で実施する強調処理について輝度を例として説明する。
強調前の各画素の輝度Yに対して強調後の輝度Y’は、
Y’=Y+Eenhance ・(Y−Yunsharp )
として演算される。このYunsharp は各画素の画像データに対してアンシャープマスク処理を施したものであり、強調係数Eenhance は上記完成アンシャープマスク1チャンネルと完成アンシャープマスク2チャンネルを「255」で除算して正規化した値である。
【0047】
ここでアンシャープマスク処理について説明する。図18〜図20は三つの大きさの異なるアンシャープマスク41〜43を示している。このアンシャープマスク41〜43は、中央の「100」の値をマトリクス状の画像データにおける処理対象画素Y(x,y)の重み付けとし、その周縁画素に対して同マスクの升目における数値に対応した重み付けをして積算するのに利用される。今、図19に示すアンシャープマスク42を利用するのであれば、
【0048】
【数1】

Figure 2000285232
なる演算式に基づいて積算する。同式において、「632」とは重み付け係数の合計値であり、むろんサイズの異なる三つのアンシャープマスク41〜43においては、それぞれ「396」、「632」「2516」というような値となる。また、Mijはアンシャープマスクの升目に記載されている重み係数であり、Y(x,y)は各画素の画像データである。なお、ijについては異なる縦横サイズの三つのアンシャープマスク41〜43に対して横列と縦列の座標値で示している。
【0049】
このような演算の意味するところは次のようになる。Yunsharp (x,y)は注目画素に対して周縁画素の重み付けを低くして加算したものであるから、いわゆる「なまった(アンシャープ)」画像データとしていることになる。このようにしてなまらせたものはいわゆるローパスフィルタをかけたものと同様の意味あいを持つ。従って、「Y(x,y)−Yunsharp (x,y)」とは本来の全成分から低周波成分を引いたことになってハイパスフィルタをかけたものと同様の意味あいを持つ。そして、ハイパスフィルタを通過したこの高周波成分に対して強調係数Eenhance を乗算して「Y(x,y)」に加えれば同強調係数Eenhance に比例して高周波成分を増したことになり、エッジが強調される結果となる。
【0050】
また、エッジの強調度合いは、アンシャープマスクの大きさによっても変化する。縦横の升目数の異なる三つのアンシャープマスク41〜43であれば、大きなマスクほど注目画素の近隣の画素に対する重み付けが大きく、遠くの画素にいたるまでの距離の中で徐々に重み付けが減っていっている。これは言い換えればよりローパスフィルタとしての性格が強くなり、高周波成分を生成しやすくなるからである。
【0051】
従って、強調係数Eenhance による強調度合いの調整に加えて、大きなサイズのアンシャープマスク43を利用すれば強い強調処理を行うことになり、小さなサイズのアンシャープマスク41を利用すれば弱い強調処理を行うことになる。むろん、中間的な強さの強調処理を行うのであれば中間サイズのアンシャープマスク42を利用すればよくなる。
図9のフローチャートによれば、ステップ132にて非鮮鋭領域に強い強調処理を行うにはアンシャープマスク43を使用しつつ完成アンシャープマスク1チャンネルを強調係数として使用して演算を行うし、ステップ134にて鮮鋭領域に弱い強調処理を行うにはアンシャープマスク41を使用しつつ完成アンシャープマスク2チャンネルを強調係数として使用して演算を行うことになる。なお、アンシャープマスク41〜43のフィルタマスクは一例に過ぎず、適宜変更することも可能である。また、図19を参照すると分かるように、最外周のパラメータは「0」または「1」であり、画素の画像データに乗算しても「632」で除算した場合の影響度を考えると殆ど無意味である。このため、最外周のパラメータを無視して5×5画素としたアンシャープマスク44のフィルタマスクを使用すれば、除算の演算回数「49(=7×7)」回から「25(=5×5)」回へと半減し、演算処理時間を短縮化させることもできる。
【0052】
以上のような処理を経ることにより、デジタルスチルカメラ11b2あるいはモデム14a2等を介して取り込んだディジタルの画像データであっても、もともと鮮鋭なエッジ部分が過度にシャープになりすぎたり、妙に作り物の感じが強く表れてしまうということがなくなる。
このようにして得られた画像データ自体は背景レイヤに格納されており、この画像データをディスプレイドライバ12bやプリンタドライバ12cを介してディスプレイ17aやカラープリンタ17bに出力すると、綺麗な画像となっている。
【0053】
一般的にはこの強調処理で概ね自然な感じで画像の鮮鋭度が上がるが、人の肌が鮮鋭化してざらついた感じに見えることもあり得る。人自体が写真のオブジェクトであるため、特にその部分を注目してしまうためである。同様なことは、写真の中で広い面積を占める空の部分についても生じる。このような場合は、各画素が肌色や空色であるか否かを判断し、肌色や空色であったら強調処理を弱めるようにすればよい。ここで、各画素が肌色や空色であるか否かを判断する手法について説明する。
【0054】
各画素の画像データが(R,G,B)で表されるとすると、色度は、
r=R/(R+G+B)
b=B/(R+G+B)
として表される。
図21は人間の肌を表す画像データのサンプリング結果を示している。すなわち、左側の三つのデータは肌を構成する画素の(R,G,B)の値であり、その右方に(R+G+B)の合計(sum_rgb)を示し、その右方に上記計算に基づく色度r,bと輝度Yとを示している。また、図22は各画素についてrb空間にプロットした場合のグラフを示している。同図に示すように、RGBデータとしては統一性を見出しにくいようでも、色度としてグラフにプロットしてみると規則性があることが見出される。すなわち、人の肌であれば暗く写っているときも明るく写っているときもあり得るが、それにもかかわらず、図11に示すように直線状に分布しているのである。同図に示す直線状の分布は、
0.33<r<0.51
|0.74r+b−0.57|<0.1
なる関係式が成立しているといえるから、各画素についてこの条件があてはめられれば肌色領域に属するものといえる。
【0055】
また、図23は同様にして青空を表す画像データのサンプリング結果を示しているとともに図24は各画素についてrb空間にプロットした場合のグラフを示しており、この場合は肌色の場合よりも変動幅が大きいことを考慮すると、
0.17<r<0.30
|1.11r+b−0.70|<0.2
なる関係式が成立しているといえる。
図25は、ステップ132の内部でこのような処理を実行するフローチャートを示しており、ステップ132aにて色度を計算し、ステップ132bとステップ132cとで肌色や空色であるかを判断し、いずれにも引っかからなければステップ132dで強い強調処理を実行する。しかし、ステップ132bとステップ132cのいずれかで肌色や空色であると判断されると、ステップ132eで弱い強調処理を実行する。例えば、強調係数Eenhance として完成アンシャープマスク2チャンネルのものを利用しても良いし、小さいサイズのアンシャープマスク41を使用しても良い。
【0056】
ところで、以上の処理はコンピュータシステム10を使用しつつ主にソフトウェア的な処理で実現している。しかしながら、本発明は必ずしもソフトウェア的な構成に限るものではなく、ハードウェアによるワイヤロジックで実現することもできる。
図26は具体的なブロック回路を示しており、入力画像データは平滑化回路51に入力されてぼかしの処理を経たものと経ていないものとを差分絶対値回路52に入力し、両者の差分値の絶対値を演算し、トーンカーブ補正回路53で図16に示すようなトーンカーブ補正を実施する。次いで、縮小化回路54では外縁部を狭める処理を実行し、反転回路55で反転させた後、平滑化回路56で最後の平滑化処理を実施する。この後、生成されたマスクデータを使用して第一の強調化回路57で強い強調化を施し、反転回路58を経たマスクデータを使用して第二の強調化回路59で弱い強調化を施す。
【0057】
各回路ではロジック回路でディジタル的に処理すればよいが、一部ではアナログ化して処理しても良い。
このように、デジタルスチルカメラ11b2等を介して取り込んだディジタルの画像データは、平滑化してぼかしたものと元のものとの差を演算し(ステップ112)て鮮鋭化領域を検出した後、トーンカーブ補正や縮小や反転や平滑化処理の各処理(ステップ118〜122)を経て非鮮鋭領域のマスクデータを完成アンシャープマスク1チャンネルに形成し、同マスクデータを使用して元の画像データに強い強調処理を施すようにした(ステップ132)ため、もともと鮮鋭なエッジ部分が過度にシャープになりすぎたり、妙に作り物の感じが強く表れてしまうということがなくなる。この場合、画像調整のための処理も含まれるし、鮮鋭な領域に対して弱い強調処理(ステップ134)を実施したりしている。
【図面の簡単な説明】
【図1】本発明の一実施形態にかかる画像鮮鋭化装置のクレーム対応図である。
【図2】本発明の一実施形態にかかる画像鮮鋭化装置が適用されるコンピュータシステ
ムのブロック図である。
【図3】本発明の画像鮮鋭化装置の他の適用例を示す概略ブロック図である。
【図4】本発明の画像鮮鋭化装置の他の適用例を示す概略ブロック図である。
【図5】本発明の画像鮮鋭化装置の他の適用例を示す概略ブロック図である。
【図6】本発明の画像鮮鋭化装置の他の適用例を示す概略ブロック図である。
【図7】本発明の一実施形態にかかる画像鮮鋭化装置のフローチャートの一部である。
【図8】同フローチャートの一部である。
【図9】同フローチャートの一部である。
【図10】処理の全体を示す概略ブロック図である。
【図11】データの格納状態を示す概念図である。
【図12】トーンカーブの一例を示す図である。
【図13】平滑化処理に使用するフィルタマスクを示す図である。
【図14】画像データの変化過程を示す概念図である。
【図15】画像の変化過程を示す概念図である。
【図16】トーンカーブの一例を示す図である。
【図17】縮小化処理の過程を示す図である。
【図18】小サイズのアンシャープマスクを示す図である。
【図19】中サイズのアンシャープマスクを示す図である。
【図20】大サイズのアンシャープマスクを示す図である。
【図21】肌色の画素の画像データと色度と輝度を示す図である。
【図22】肌色の画素を色度のグラフで示す図である。
【図23】空色の画素の画像データと色度と輝度を示す図である。
【図24】空色の画素を色度のグラフで示す図である。
【図25】強調処理の変形例を示すフローチャートの一部である。
【図26】ハードウェアロジックで実現した画像鮮鋭化装置のブロック図である。
【符号の説明】
10…コンピュータシステム
11a…スキャナ
11a2…スキャナ
11b…デジタルスチルカメラ
11b1…デジタルスチルカメラ
11b2…デジタルスチルカメラ
11c…ビデオカメラ
12…コンピュータ本体
12a…オペレーティングシステム
12b…ディスプレイドライバ
12b…ドライバ
12c…プリンタドライバ
12d…アプリケーション
13a…フロッピーディスクドライブ
13b…ハードディスク
13c…CD−ROMドライブ
14a…モデム
14a2…モデム
15a…キーボード
15b…マウス
17a…ディスプレイ
17a1…ディスプレイ
17b…カラープリンタ
17b1…カラープリンタ
17b2…カラープリンタ
18a…カラーファクシミリ装置
18b…カラーコピー装置
41〜43…アンシャープマスク
51…平滑化回路
52…差分絶対値回路
53…トーンカーブ補正回路
54…縮小化回路
55…反転回路
56…平滑化回路
57…第一の強調化回路
58…反転回路
59…第二の強調化回路Patent application title: Medium recording image sharpening program, image sharpening device and
Image sharpening method
[Claims]
A non-sharp area detecting step of detecting a non-sharp area of an original image based on image data in which an image is expressed by multi-gradation using dot matrix pixels;
An image sharpening step of relatively sharpening the non-sharp area and the detected part in the image data,
An image data output step of elbowing the sharpened image data.
2. The non-sharp area detecting step detects, as a non-sharp area, an area having a small difference between original image data obtained by manual input and smoothed image data obtained by subjecting the image data to a smoothing process. The image sharpening method according to claim 1, wherein:
3. The non-sharp area detecting step, wherein a tone curve correction is performed on a difference value between the original image data and the smoothed image data to adjust a detection range of the non-sharp area. 3. The image sharpening method according to 2.
4. The non-sharp area detecting step detects an area where a difference between the original image data and the smoothed image data is large as a sharp area, and in the image sharpening step, reverses the sharp area. Wherein the original image data is smoothed by using the non-sharp area as a mask while making the non-sharp gun area, and then the image is sharpened based on a difference from the original original image data. The image sharpening method according to claim 1.
5. The image sharpening method according to claim 4, wherein in the non-sharp area detecting step, the detected sharp area is reduced and then inverted.
6. The image sharpening method according to claim 1, wherein in the non-sharp area detecting step, an edge of the non-sharp area is subjected to a smoothing process.
7. The non-sharp area detecting step, wherein the tone curve correction is performed on the original image data in advance, and the corrected original image data is used for detecting the non-sharp area. The image sharpening method according to any one of the above.
8. The image sharpening method according to claim 1, wherein in the image sharpening step, a sharp area is also sharpened slightly less than the non-sharp area. .
9. The image sharpening method according to claim 1, wherein in the image sharpening step, the degree of sharpening is reduced for a color region which is rough due to sharpening.
10. A non-sharp area detecting means for detecting a non-sharp area of an original image based on image data in which an image is represented by multi-gradation using pixels in a dot matrix.
Image sharpening means for relatively sharpening the non-sharp area and the detected part in the image data,
An image sharpening device, comprising: image data output means for outputting sharpened image data.
11. The non-sharp area detecting means detects an area having a small difference between original image data obtained by manual input and smoothed image data obtained by applying a smoothing process to the image data as an unsharp area. The image sharpening device according to claim 10, wherein:
12. The non-sharp area detecting means adjusts the detection range of the non-sharp area by performing tone curve correction on a difference value between the original image data and the smoothed image data. 12. The image sharpening device according to 11.
13. The non-sharp area detecting means detects an area where a difference between the original image data and the smoothed image data is large as a sharp area, and the image sharpening means reverses the sharp area. Wherein the original image data is smoothed by using the non-sharp area as a mask while making the non-sharp gun area, and then the image is sharpened based on a difference from the original original image data. The image sharpening device according to claim 10.
14. The image sharpening apparatus according to claim 13, wherein said non-sharp area detecting means reduces the detected sharp area before inverting it.
15. An image sharpening apparatus according to claim 10, wherein said non-sharp area detecting means performs a smoothing process on an edge of said non-sharp area. 16. The non-sharp area detecting means according to claim 10, wherein the tone curve of the original image data is corrected in advance and used for detecting the non-sharp area. The image sharpening device according to any one of the above.
17. The image sharpening device according to claim 10, wherein said image sharpening means sharpens even a sharp area to be weaker than said non-sharp area. .
18. An image sharpening apparatus according to claim 10, wherein said image sharpening means reduces the degree of sharpening in a color region which is rough due to sharpening.
19. A medium in which an image sharpening processing program for sharpening an image by a computer based on image data in which an image is expressed by multi-gradation using dot matrix pixels is recorded.
A non-sharp area detecting step of detecting a non-sharp area of the original image based on the image data,
An image sharpening step of relatively sharpening the non-sharp area and the detected part in the image data;
An image data output step of outputting the sharpened image data.
DETAILED DESCRIPTION OF THE INVENTION
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a medium on which an image sharpening program for sharpening an image is recorded, an image sharpening apparatus, and an image sharpening method.
[0002]
[Prior art]
When an image is handled by a computer or the like, the image is represented by dot matrix pixels, and each pixel is represented by a gradation value. For example, photographs are often displayed on a computer screen with 640 dots in the horizontal direction and 480 dots in the vertical direction.
[0003]
Further, since each pixel has data representing color and brightness, image processing is performed by changing this data. At this time, sharpening processing for making a blurred image look sharp is also widely performed, and the entire image is uniformly sharpened.
[0004]
[Problems to be solved by the invention]
In the conventional image sharpening apparatus described above, the entire image is uniformly sharpened.However, originally sharp edges and the like are excessively sharp, and the generated image is strangely shaped. There was a problem that the feeling of appears strongly.
[0005]
The present invention has been made in view of the above problems, and has as its object to provide a medium, an image sharpening device, and an image sharpening method on which an image sharpening program capable of sharpening with a more natural feeling is recorded. .
[0006]
[Means for Solving the Problems]
In order to achieve the above object, the invention according to claim 1 includes a non-sharp area detecting step of detecting a non-sharp area of an original image based on image data in which an image is expressed in multiple gradations by dot matrix pixels,
An image sharpening step of relatively sharpening the non-sharp area and the detected part in the image data,
And an image data output step of elbowing the sharpened image data. [0007]
In the invention according to claim 1 configured as described above, first, in the non-sharp area detection step, the original image is generated based on the image data in the non-sharp area detection step. , And then, in an image sharpening step, the portion of the image data detected as the unsharp area is sharpened relatively strongly. Then, the sharpened image data is output in an image data output step.
[0008]
That is, a non-sharp area is detected and the area is sharpened.
The image data may be obtained by acquiring the image data already stored in the storage area, or may be obtained by sequentially acquiring image data such as a camera. For example, it can be appropriately modified.
The same applies to the image data output step, in which the output destination is a specific recording medium, a temporary storage area such as a memory, or an output destination via a communication line such as a network. good.
[0009]
Further, the image sharpening process itself may be one of a plurality of processes in the image processing, and in that case, it is substantially necessary to read and write image data obtained by another process. Become.
That is, input and output of image data may be in any form as long as they can be processed in the following unsharpened area detection step and image sharpening step. Also, the image data may be any data as long as the image is expressed in multiple gradations using dot matrix pixels, and may be a monochrome image or a color image. In the case of a color image, the coordinate system in the color space may be used. There is no particular limitation on the method of taking or the gradation range.
[0010]
In the non-sharp area detection step, the non-sharp area of the original image is detected. The specific method is various, and as an example, the invention according to claim 2 is based on the image sharpening method according to claim 1. In the non-sharp area detecting step, an area in which the difference between the manually input original image data and the smoothed image data obtained by applying a smoothing process to the image data is small is detected as a non-sharp area.
[0011]
In the invention according to claim 2 configured as described above, the input image data is left as original image data, and the image data is subjected to a smoothing process to generate smoothed image data. In the above, the unsharp area detection step detects an area where the difference between the original image data and the smoothed image data is small as an unsharp area.
The smoothing process generates a pixel averaged with a pixel around the target central pixel, which can be said to be an expected value of the central pixel as viewed from peripheral pixels. If the difference with the specific value at the center pixel is obtained, the smaller the difference from the expected value, the smaller the change in the pixel. Represents an unsharp area.
[0012]
However, even if an unsharp area is known as described above, the difference value itself is not always easy to use in subsequent processing. Therefore, the invention according to claim 3 is the image sharpening method according to claim 2, wherein in the unsharp area detection step, a tone curve is corrected for a difference value between the original image data and the smoothed image data. To adjust the detection range of the non-sharp area.
[0013]
In the invention according to claim 3 configured as described above, tone curve correction is performed on a difference value between the original image data and the smoothed image data. When the difference value is used as it is, it is conceivable that the meaning content is greatly different from a certain threshold. Even in such a case, it is possible to adjust the detection range of the non-sharp area by giving a light weight to the meaning of the difference value using the tone curve.
Since the detection of a non-sharp area and the detection of a sharp area have a front-to-back relationship, it should be considered that the area to be detected is not necessarily limited to the non-sharp area itself. As an example, the invention according to claim 4 is an image sharpening method according to any one of claims 1 to 3, wherein in the unsharp area detecting step, the original image data and the smoothed image data are compared with each other. In the image sharpening step, the original image data is smoothed by using the non-sharp area as a mask while inverting the sharp area to form a non-gun area. Thus, the image is sharpened based on the difference from the original original image data.
[0014]
In the invention according to claim 4 configured as described above, an area where the difference between the original image data and the smoothed image data is large is detected as a sharp area. Therefore, it seems that the non-sharp area is not detected on the surface, but the remaining area is actually a non-sharp area, so that the non-sharp area detection step detects the non-sharp area. become. This reversal state is eliminated in the image sharpening step.
That is, in the same image sharpening step, the sharp area is inverted, thereby smoothing the original image data using the non-sharp area as a mask while making it a non-sharp area. Further, if the smoothed image is subtracted from the original image, the high-frequency component remains and the image is sharpened.
[0015]
The adjustment of the boundary between the sharp area and the non-sharp area is not limited to the above-described tone curve correction. As an example, the invention according to claim 5 is based on the image sharpening method according to claim 4, In the sharp area detecting step, the detected sharp area is reduced and then inverted.
In the invention according to claim 5 configured as described above, since the detected sharp area is reduced first, the sharp area is detected sharply. After this, it is inverted, but the sharpness acts to widen the outer edge of the unsharp area.
[0016]
Similarly, as another example of adjusting the boundary between the sharp area and the non-sharp area, the invention according to claim 6 is the image sharpening method according to any one of claims 1 to 5, wherein In the region detection step, the edge of the non-sharp region is subjected to a smoothing process.
In the invention according to claim 6 configured as described above, since the edge of the non-sharp area is subjected to the smoothing process, the edge moves in and out more or less depending on the manner of application, and is adjusted. Become. In this case, it is not always necessary to apply the smoothing processing only to the edge, and the same can be said for applying the smoothing processing to the entire image, or conversely, it is also possible to apply the smoothing only to the edge.
[0017]
Depending on the value of the original image data, the determination may change even if the sharpness is the same. For example, when it is considered that the degree of change in lightness and darkness is proportional between the case where the image is entirely dark and the case where the image is entirely bright, it should be determined that the non-sharp area is large for the dark side. However, it is not appropriate that such a result is obtained, and as a preferable example of the countermeasure, the invention according to claim 7 is based on the image sharpening method according to any one of claims 1 to 6. In the non-sharp area detection step, the original image data is subjected to tone curve correction in advance and used for detecting the non-sharp area.
[0018]
In the invention according to claim 7 configured as described above, since the tone curve correction is performed on the original image data in advance, a proper area can be obtained when detecting the unsharp area. Further, it is naturally possible not only to adjust the light and darkness but also to consciously make an adjustment.
Although the disadvantages of the prior art are eliminated by sharpening the non-sharp area, this does not necessarily exclude the sharpening of the sharp area. 8. The image sharpening method according to claim 7, wherein in the image sharpening step, a sharp area is also sharpened to be weaker than the non-sharp area.
[0019]
In the invention according to claim 8 configured as described above, the sharp area is also sharpened in the image sharpening step for sharpening the non-sharp area. If the sharpening of the sharp area is stronger than the sharpening of the non-sharp area, there is no difference from the prior art, so that the sharpening is made weaker than the non-sharp area.
In a case where the balance with the original sharp region is lost due to the sharpening of the non-sharp region, it can be said that this is effective. The degree of sharpening may be determined in advance at a fixed ratio between the non-sharpened area and the sharpened area, or the sharpness of the sharpened area may be appropriately adjusted according to the specific situation.
[0020]
On the other hand, an observer's line of sight may be concentrated and rough, depending on a specific subject. In particular, a flesh-colored area may be uncomfortable even though it feels good as image data because the sensation is sharpened with the help of the original subject. As a preferred example in such a case, the invention according to claim 9 is the image sharpening method according to any one of claims 1 to 8, wherein in the image sharpening step, a color region roughened by sharpening is provided. Is configured to reduce the degree of sharpening.
[0021]
In the invention according to claim 9 configured as described above, since the sharpening degree is reduced for the skin color, the sky color, and the like, which are the color regions that are rough due to the sharpening, the interval between roughness is reduced. The color area may be determined by the chromaticity. If the chromaticity is not affected by the luminance, the human skin can be detected whether the image is bright or dark. The color area may be other than the skin color or the sky color, and can be adjusted as appropriate.
[0022]
As described above, it can be easily understood that the method of sharpening the non-sharp region is realized in a substantial device, and in that sense, the present invention is also applicable to a substantial device. For this reason, the invention according to claim 10 is a non-sharp area detecting means for detecting a non-sharp area of an original image based on image data in which an image is expressed in multiple gradations by dot matrix pixels, and It is configured to include an image sharpening unit that relatively strongly sharpens a portion detected as the non-sharp region, and an image data output unit that outputs the sharpened image data.
In other words, there is no difference that the device is effective as a substantial device. Such an image sharpening device may be implemented alone, or may be implemented together with another method while being incorporated in a certain device. Embodiments are included. Therefore, it can be changed as appropriate, such as software or hardware.
[0023]
In the case of software that implements the image sharpening method as an example of realizing the idea of the present invention, the software naturally exists on a recording medium on which such software is recorded, and must be used.
As an example, the invention according to claim 19 is a medium in which an image sharpening processing program for sharpening an image by a computer based on image data in which an image is expressed by multi-gradation using dot matrix pixels is recorded. A non-sharp area detection step of detecting a non-sharp area of the original image based on the image data, and an image sharpening step of relatively sharpening the unsharp area and the detected part in the image data, And an image data output step of outputting the sharpened image data.
Of course, the recording medium may be a magnetic recording medium or a magneto-optical recording medium, and any recording medium to be developed in the future can be considered in the same manner. Further, the duplication stages of the primary duplicated product, the secondary duplicated product and the like are equivalent without any question.
Further, even when a part is implemented by software and a part is implemented by hardware, the concept of the present invention is not completely different, and a part is stored on a recording medium and appropriately It may be in a form that can be read. It goes without saying that the idea of the invention is reflected in this program itself.
[0024]
Of course, such an image sharpening method may be performed alone, or may be performed together with another method while being incorporated in a certain device. It includes various aspects and can be appropriately changed.
[0025]
【The invention's effect】
As described above, the present invention can provide an image sharpening method capable of sharpening an image with a natural feeling.
According to the second aspect of the present invention, it is possible to relatively easily detect a non-sharp area.
Further, according to the third aspect of the invention, it is easy to adjust the detection range of the non-sharp area. [0026]
Furthermore, according to the fourth aspect of the present invention, the non-sharp area can be detected as a reflection effect of detecting the sharp area instead of directly detecting the non-sharp area, so that more flexible processing can be performed.
Further, according to the fifth and sixth aspects of the present invention, it is possible to flexibly adjust the boundary between the non-sharp area and the sharp area.
Further, according to the seventh aspect of the present invention, it is possible to provide an adjustment method for satisfactorily detecting an unsharp area.
[0027]
Further, according to the invention according to claim 8, it is possible to adjust a problem caused by sharpening only the non-sharp area.
Further, according to the ninth aspect of the present invention, by reducing the sharpening of a specific color region, it is possible to reduce roughness in a skin portion or the like.
Further, according to the tenth to eighteenth aspects of the invention, it is possible to provide an image sharpening device having the same effect, and according to the nineteenth aspect, it is possible to provide a medium on which an image sharpening program is recorded. .
[0028]
BEST MODE FOR CARRYING OUT THE INVENTION
FIG. 1 shows an image sharpening device according to an embodiment of the present invention in a claim correspondence diagram, and FIG. 2 shows a computer system 10 as an example of hardware for realizing the image sharpening device in a block diagram. I have. First, the computer system 10 will be described.
The computer system 10 includes a scanner 11a, a digital still camera 11b, and a video camera 11c as image input devices for directly inputting image data, and is connected to a computer main body 12. Each input device is capable of generating image data representing an image by dot matrix pixels and outputting the image data to the computer main unit 12. Here, the image data is displayed in 256 gradations in three primary colors of RGB. , About 16.7 million colors can be expressed.
[0029]
The computer main body 12 is connected to a floppy disk drive 13a, a hard disk 13b, and a CD-ROM drive 13c as external auxiliary storage devices. The hard disk 13b stores main programs related to the system. Necessary programs and the like can be appropriately read from a CD-ROM or the like.
Also, a modem 14a is connected as a communication device for connecting the computer main body 12 to an external network or the like. The modem 14a is connected to the external network via the same public communication line, and software and data can be downloaded and introduced. Has become. In this example, the modem 14a accesses the outside through a telephone line. However, a configuration in which a network is accessed through a LAN adapter is also possible. In addition, a keyboard 15a for operating the computer body 12 and a mouse 15b as a pointing device are also connected.
[0030]
Further, a display 17a and a color printer 17b are provided as image output devices. The display 17a has a display area of 800 pixels in the horizontal direction and 600 pixels in the vertical direction, and can display the above-mentioned 16.7 million colors for each pixel. Of course, this resolution is merely an example, and can be changed as appropriate, such as 640 × 480 pixels or 1024 × 768 pixels.
[0031]
The color printer 17b is an ink jet printer, and is capable of printing an image with dots on printing paper as a recording medium using four color inks of CMYK. The image density can be printed at a high density of 360 × 360 DPI or 720 × 720 DPI, but the gradation table is expressed in two gradations such as whether or not to apply color ink.
On the other hand, a predetermined program is executed in the computer main body 12 in order to display or output an image output device while inputting an image using such an image input device. Of these, an operating system (OS) 12a is operating as a basic program, and the operating system 12a performs a print output to a display driver (DSP DRV) 12b for displaying on a display 17a and a color printer 17b. A printer driver (PRT DRV) 12c to be installed is incorporated. These drivers 12b and 12c depend on the model of the display 17a and the color printer 17b, and can be additionally changed to the operating system 12a according to each model. In addition, additional functions beyond standard processing can be realized depending on the model. That is, it is possible to realize various additional processes within an allowable range while maintaining a common processing system on the standard system of the operating system 12a.
[0032]
The application 12d is executed on the operating system 12a as the basic program. The processing contents of the application 12d are various, monitor the operation of the keyboard 15a and the mouse 15b as operation devices, and when operated, appropriately control various external devices to execute corresponding arithmetic processing, Further, the processing result is displayed on the display 17a or output to the color printer 17b.
[0033]
By the way, an image photographed by the digital still camera 11b becomes image data, which can be displayed on the display 17a or output to the color printer 17b after executing various image processing by the application 12d. An example of such image processing is an enhancement process (the sharpening process is hereinafter referred to as such). In the present embodiment, the application 12d executes an enhancement process that can obtain an optimal result. This will be described below.
[0034]
In the above, the process of acquiring image data from an image input device or the like constitutes the image data acquiring unit A1 shown in FIG. 1, and hardware and software related to this actually correspond. The non-sharp area detection means A2 corresponds to a process of detecting an area having relatively low sharpness in the image data thus obtained, and the application 12d specifically executes the processing. In addition, the application 12d also performs image sharpening processing on an unsharp area in the image data using the detection result, and thus also includes an image sharpening unit A3.
[0035]
In the present embodiment, the application 12d performs image processing. However, it is naturally possible to adopt a configuration in which the display driver 12b or the printer driver 12c automatically realizes sharpening processing when outputting an image. It is.
Of course, the application 12d, the display driver 12b, and the printer driver 12c that execute such processing are stored in the hard disk 13b, and are read and operated by the computer body 12 as appropriate. At the time of introduction, it is recorded on a medium such as a CD-ROM or a floppy disk and installed. Therefore, these media constitute the media on which the image sharpening program is recorded.
[0036]
The application 12d entrusts the image data subjected to the image processing to a subsequent processing process in a file format, and the process of outputting the image data in the file format constitutes the image data output unit A4. As described above, when the display driver 12b or the printer driver 12c realizes a sharpening process when outputting an image, it can be said that the output stage constitutes the image data output means A4. In the present embodiment, the image sharpening device is realized as the computer system 10, but such a computer system is not necessarily required, and any system that requires interpolation processing for similar image data may be used. . For example, as shown in FIG. 3, an image sharpening device for emphasizing processing is incorporated in the digital still camera 11b1, and the image is displayed on the display 17a1 or printed on the color printer 17b1 using the image data after emphasizing. Is also good. As shown in FIG. 4, in a color printer 17b2 that inputs and prints image data without going through a computer system, image data input via a scanner 11a2, a digital still camera 11b2, a modem 14a2, or the like is automatically processed. It is also possible to configure so as to perform the emphasis processing. In recent years, such a color printer 17b2 is often used as a video printer for connecting to a home television or video to make a hard copy of one scene, and while acquiring image data from a removable recording medium. What is necessary is just to perform the optimal emphasis processing in resolution conversion.
[0037]
In addition, the present invention can be naturally applied to various devices that handle image data, such as a color facsimile device 18a as shown in FIG. 5 and a color copying device 18b as shown in FIG.
The above-described emphasis processing is specifically performed in the computer main body 12 by an image processing program corresponding to the flowcharts shown in FIGS. FIG. 10 schematically shows a change in a processing target in the image processing program. FIG. 10 shows a work area in the image processing program, and each image data composed of RGB three-element color data is processed using a work area that assumes an individual plane called a layer. In addition, a work area called a channel is used to store calculation results and the like for controlling each image processing.
[0038]
In the flowcharts shown in FIGS. 7 to 9, in step 100, image data is input. This image data is fetched from the scanner 11a2, the digital still camera 11b2, the modem 14a2, or the like via the operating system 12a, and the fetched image data is stored in the above-described original image layer.
Next, in order to proceed with the process while leaving the original image, the image data of the original image layer is copied to the background layer and the duplicate layer (steps 102 and 104). In the present embodiment, final emphasis processing is performed on the image data of the background layer, and image processing for generating a mask for the duplicate layer is performed.
[0039]
The first step of the image processing is the tone curve correction (step 106), and the contrast of the image data stored in the copy layer is increased using the tone curve shown in FIG. The significance of performing the process of increasing the contrast will be described later.
In step 108, the image data with the increased contrast is copied to a high-contrast duplication layer to keep the original, and in step 110, smoothing processing is performed on the image data of the high-contrast duplication layer. The smoothing process is for averaging the image data in a predetermined area centered on the pixel of interest, and performs a filtering process using a filter mask shown in FIG. In this filter processing, eight pixels adjacent to the target pixel and the image data of the target pixel are all added, and the result is divided by the number of pixels. Although the illustrated filter mask is 9 pixels of 3 × 3 pixels, a filter mask having a different size such as 5 × 5 pixels may be used, or smoothing may be performed to reduce the weight of peripheral pixels. .
[0040]
The smoothed image data is stored in the high-contrast duplication layer. In step 112, the absolute value of the difference between the image data of the high-contrast duplication layer and the image data of the duplication layer is calculated, and the calculation result is stored in the alpha channel 1.
FIG. 14 is a reference diagram for explaining the meaning of this series of processing, and is essentially one-dimensionally rearranged two-dimensional image data. Assuming that the image data of the copy layer is as shown in FIG. 11A, the smoothed portion makes the step portion smooth as shown in FIG. Next, when the difference between the two is calculated, a difference value is generated in the pixel that has been smoothed and changed as shown in FIG. 9C, and the absolute value (indicated by a dashed line in the figure) is large. The image data of the layer is changing significantly. The part where the absolute value is large is where the image changes greatly, and this series of processing is nothing but the detection of a sharp area of the image. In addition, the fact that the contrast of the image data of the copy layer is increased in step 106 contributes to increasing the difference value described above, and makes it easy to detect a sharp area. In this regard, if the sharp area can be detected first, the adjustment can be arbitrarily performed thereafter. However, if the sharp area is not detected at the stage of detecting the sharp area, there is less room for adjustment. Therefore, the sharp region is detected in such a wide manner.
[0041]
FIG. 15 illustrates what the above-described processing means with a specific image. Assuming that FIG. 7A is an original image, the image data of the outline portion changes as shown in FIG. 8B by performing the smoothing process, and the other portions remain in the original color. Become. Therefore, when the difference value from the original image is obtained, only the area centered on the contour of the original image remains as shown in FIG.
[0042]
Since the alpha channel 1 is a general-purpose channel, it is stored in the unsharp mask original channel and the unsharp mask hardened channel in order to store the absolute value of the difference value (steps 114 and 116). Then, adjustment is made to the unsharp mask hardened channel to improve the specific calculation result.
First, in step 118, tone curve correction is performed using the tone curve shown in FIG. Even if a difference value corresponding to sharpening of an image can be obtained as shown in FIG. 14C, this data itself is not always easy to use for calculation. In particular, since the absolute value of the difference value itself can be only a small value, it is necessary to make the absolute value larger. Although the purpose shown in FIG. 15 is to increase the small absolute value proportionally, it is necessary to set a certain threshold value and adopt a steep S-shaped curve so that the value below the threshold value does not change much. Is also possible. [0043]
Next, in step 120, a reduction process of the unsharp mask high contrast channel is performed. The reduction processing is processing for reducing the width of a line as an actual image, and as shown in FIG. 17, the area is reduced by one pixel (one pixel). As described above, in step 118, since pixels that may fall off depending on the setting of the threshold value are picked up, in step 120, such reduction is performed in order to set a proper range. The specific image changes from FIG. 15 (c) to FIG. 15 (d). Of course, this is the range of tuning and can be changed as appropriate.
[0044]
Although the sharp area has been adjusted as described above, since the present invention mainly seeks the non-sharp area, in step 122, the unsharp mask enhanced channel is inverted. In the inversion process, the value of the image data is simply subtracted from 255. Therefore, "255" changes to "0", "200" changes to "55", "1" changes to "254", and so on. The inverted state is as shown in FIG. 15E, which means that a mask having a certain value is formed in a region other than the outline portion in FIG. Then, as the last of the processing as a mask, in step 124, smoothing processing is performed on the unsharp mask high contrast channel. As a result, it is expected that the boundary portion in the mask image shown in FIG. 15E will be smooth, and that no jump will occur in the image in the enhancement processing performed next.
[0045]
Then, the completed mask is copied to the completed unsharp mask 1 channel and the completed unsharp mask 2 channel (steps 126 and 128), and the completed unsharp mask 2 channel is subjected to inversion processing (step 130). By performing the inversion processing in this way, a sharp area is detected again. In the present embodiment, since the strong emphasis processing is performed on the non-sharp area and the weak emphasis processing is also performed on the non-sharp area, the sharp area is detected again as the completed unsharp mask 2 channel.
[0046]
In the emphasis processing, the unsharp mask shown in FIGS. 18 to 19 is used. Here, the emphasis processing performed in steps 132 and 134 will be described using luminance as an example.
The luminance Y ′ after emphasis with respect to the luminance Y of each pixel before emphasis is
Y ′ = Y + Enhance (Y−Yunsharp)
Is calculated as This Yunsharp is obtained by performing unsharp mask processing on the image data of each pixel, and the enhancement coefficient Eenhance is normalized by dividing the above-mentioned completed unsharp mask 1 channel and completed unsharp mask 2 channel by "255". Value.
[0047]
Here, the unsharp mask processing will be described. 18 to 20 show three unsharp masks 41 to 43 having different sizes. The unsharp masks 41 to 43 use the value of “100” at the center as the weight of the pixel Y (x, y) to be processed in the matrix image data, and the peripheral pixels correspond to the numerical values in the cells of the same mask. It is used for weighting and integrating. Now, if the unsharp mask 42 shown in FIG. 19 is used,
[0048]
(Equation 1)
Figure 2000285232
Integration is performed based on the following arithmetic expression. In the formula, “632” is the total value of the weighting coefficients, and of course, for the three unsharp masks 41 to 43 having different sizes, the values are “396”, “632”, and “2516”, respectively. Mij is a weight coefficient described in a cell of the unsharp mask, and Y (x, y) is image data of each pixel. Note that ij is indicated by horizontal and vertical coordinate values for three unsharp masks 41 to 43 having different vertical and horizontal sizes.
[0049]
The meaning of such an operation is as follows. Since Yunsharp (x, y) is obtained by lowering the weight of the peripheral pixel with respect to the pixel of interest and adding it, the image data is so-called "unsharp" image data. What has been blunted in this way has the same meaning as that obtained by applying a so-called low-pass filter. Therefore, “Y (x, y) −Yunsharp (x, y)” has the same meaning as that obtained by subtracting a low-frequency component from all original components and applying a high-pass filter. Then, by multiplying the high-frequency component that has passed through the high-pass filter by the enhancement coefficient Eenhance and adding it to “Y (x, y)”, the high-frequency component is increased in proportion to the enhancement coefficient Eenhance, and the edge is increased. The result is emphasized.
[0050]
In addition, the degree of edge enhancement changes depending on the size of the unsharp mask. In the case of three unsharp masks 41 to 43 having different numbers of vertical and horizontal cells, the larger the mask, the greater the weight of the target pixel with respect to the neighboring pixels, and the lower the weight gradually in the distance to the farthest pixel. You. This is because, in other words, the character as a low-pass filter becomes stronger, and it becomes easier to generate a high-frequency component.
[0051]
Therefore, in addition to adjusting the degree of emphasis by the emphasis coefficient Eenhance, a strong emphasis process is performed by using a large-size unsharp mask 43, and a weak emphasis process is performed by using a small-size unsharp mask 41. Will be. Of course, if the emphasis processing of the intermediate strength is performed, it is sufficient to use the unsharp mask 42 of the intermediate size.
According to the flowchart of FIG. 9, in order to perform strong emphasis processing on an unsharp area in step 132, an operation is performed by using one channel of the completed unsharp mask as an emphasis coefficient while using the unsharp mask 43. In order to perform a weak emphasis process on a sharp area at 134, an operation is performed using the completed unsharp mask 2 channel as an emphasis coefficient while using the unsharp mask 41. Note that the filter masks of the unsharp masks 41 to 43 are merely examples, and can be appropriately changed. As can be seen from FIG. 19, the outermost parameter is “0” or “1”, and even if the image data of the pixel is multiplied and divided by “632”, there is almost no influence. Meaning. For this reason, if the filter mask of the unsharp mask 44 in which the outermost parameter is ignored and the pixel is 5 × 5 pixels is used, the number of division operations “49 (= 7 × 7)” to “25 (= 5 × 5) 5) It is also possible to reduce the number of times to half, and to shorten the calculation processing time.
[0052]
Through the above processing, even with digital image data captured via the digital still camera 11b2 or the modem 14a2, originally sharp edges are excessively sharp or strangely shaped. The feeling does not appear strongly.
The image data itself obtained in this way is stored in the background layer, and when this image data is output to the display 17a or the color printer 17b via the display driver 12b or the printer driver 12c, a beautiful image is obtained. .
[0053]
Generally, the sharpness of an image is increased by this emphasizing process with a generally natural feeling, but human skin may appear sharp and rough. This is because a person himself is an object of a photograph, and he / she pays particular attention to that part. A similar situation occurs with a sky portion occupying a large area in a photograph. In such a case, it is determined whether or not each pixel is a flesh color or sky blue, and if it is a flesh color or sky blue, the emphasis processing may be weakened. Here, a method of determining whether or not each pixel is a skin color or a sky blue will be described.
[0054]
If the image data of each pixel is represented by (R, G, B), the chromaticity is
r = R / (R + G + B)
b = B / (R + G + B)
It is expressed as
FIG. 21 shows a sampling result of image data representing human skin. That is, the three data on the left side are the values of (R, G, B) of the pixels constituting the skin, and the right side thereof indicates the sum (sum_rgb) of (R + G + B), and the right side thereof is the color based on the above calculation. The degrees r and b and the luminance Y are shown. FIG. 22 shows a graph when each pixel is plotted in the rb space. As shown in the figure, even if it is difficult to find uniformity as RGB data, plotting it as a chromaticity on a graph shows that it has regularity. In other words, if it is a human skin, it may appear dark or bright, but nevertheless, it is distributed linearly as shown in FIG. The linear distribution shown in FIG.
0.33 <r <0.51
| 0.74r + b-0.57 | <0.1
It can be said that the following relational expression holds, so that if this condition is applied to each pixel, it can be said that the pixel belongs to the skin color area.
[0055]
FIG. 23 similarly shows a sampling result of image data representing a blue sky, and FIG. 24 shows a graph in a case where each pixel is plotted in the rb space. Is large,
0.17 <r <0.30
| 1.11r + b−0.70 | <0.2
It can be said that the following relational expression holds.
FIG. 25 shows a flowchart for executing such a process in step 132. In step 132a, the chromaticity is calculated, and in step 132b and step 132c, it is determined whether the color is flesh color or sky blue. If not, a strong emphasis process is executed in step 132d. However, if it is determined in any of steps 132b and 132c that the color is flesh color or sky blue, weak enhancement processing is executed in step 132e. For example, as the enhancement coefficient Eenhance, a completed unsharp mask of two channels may be used, or an unsharp mask 41 of a small size may be used.
[0056]
Incidentally, the above processing is realized mainly by software processing while using the computer system 10. However, the present invention is not necessarily limited to a software configuration, and can be realized by wire logic using hardware.
FIG. 26 shows a specific block circuit. The input image data is input to a smoothing circuit 51, and the input image data is input to a difference absolute value circuit 52. Is calculated, and the tone curve correction circuit 53 performs tone curve correction as shown in FIG. Next, the reducing circuit 54 executes a process of narrowing the outer edge portion, and after inverting by the inverting circuit 55, performs the final smoothing process by the smoothing circuit 56. Thereafter, strong emphasis is performed in the first emphasis circuit 57 using the generated mask data, and weak emphasis is performed in the second emphasis circuit 59 using the mask data that has passed through the inversion circuit 58. .
[0057]
Each circuit may be processed digitally by a logic circuit, but some may be processed in analog form.
As described above, the digital image data captured via the digital still camera 11b2 or the like is calculated by calculating the difference between the smoothed and blurred digital image data and the original image data (step 112), and after detecting the sharpened area, The mask data of the non-sharp area is formed into one channel of the completed unsharp mask through the respective processes (steps 118 to 122) of the curve correction, reduction, inversion, and smoothing processing, and the original image data is formed using the mask data. Since the strong emphasis processing is performed (step 132), the sharp edges originally do not become excessively sharp and the feeling of artifacts does not appear strongly. In this case, processing for image adjustment is included, and weak emphasis processing (step 134) is performed on a sharp area.
[Brief description of the drawings]
FIG. 1 is a view corresponding to a claim of an image sharpening apparatus according to an embodiment of the present invention.
FIG. 2 is a computer system to which the image sharpening device according to one embodiment of the present invention is applied;
FIG.
FIG. 3 is a schematic block diagram showing another application example of the image sharpening device of the present invention.
FIG. 4 is a schematic block diagram showing another application example of the image sharpening device of the present invention.
FIG. 5 is a schematic block diagram showing another application example of the image sharpening device of the present invention.
FIG. 6 is a schematic block diagram showing another application example of the image sharpening device of the present invention.
FIG. 7 is a part of a flowchart of the image sharpening apparatus according to the embodiment of the present invention;
FIG. 8 is a part of the flowchart.
FIG. 9 is a part of the flowchart.
FIG. 10 is a schematic block diagram showing the entire processing.
FIG. 11 is a conceptual diagram showing a storage state of data.
FIG. 12 is a diagram illustrating an example of a tone curve.
FIG. 13 is a diagram showing a filter mask used for a smoothing process.
FIG. 14 is a conceptual diagram showing a change process of image data.
FIG. 15 is a conceptual diagram showing a process of changing an image.
FIG. 16 is a diagram illustrating an example of a tone curve.
FIG. 17 is a diagram showing a process of a reduction process.
FIG. 18 is a diagram showing a small-sized unsharp mask.
FIG. 19 is a diagram showing a medium-sized unsharp mask.
FIG. 20 is a diagram showing a large-size unsharp mask.
FIG. 21 is a diagram illustrating image data, chromaticity, and luminance of a skin color pixel.
FIG. 22 is a diagram showing skin color pixels in a chromaticity graph.
FIG. 23 is a diagram illustrating image data, chromaticity, and luminance of sky blue pixels.
FIG. 24 is a diagram showing sky blue pixels in a chromaticity graph.
FIG. 25 is a part of a flowchart showing a modification of the emphasis processing.
FIG. 26 is a block diagram of an image sharpening device realized by hardware logic.
[Explanation of symbols]
10. Computer system
11a ... Scanner
11a2 ... Scanner
11b Digital still camera
11b1: Digital still camera
11b2 ... Digital still camera
11c ... Video camera
12 ... Computer body
12a: Operating system
12b ... display driver
12b ... driver
12c: Printer driver
12d… Application
13a: Floppy disk drive
13b ... Hard disk
13c: CD-ROM drive
14a… Modem
14a2 ... Modem
15a ... Keyboard
15b… Mouse
17a ... Display
17a1 ... Display
17b ... Color printer
17b1 ... Color printer
17b2 ... Color printer
18a ... Color facsimile machine
18b: color copying machine
41-43 ... Unsharp mask
51 ... Smoothing circuit
52 ... Difference absolute value circuit
53 ... Tone curve correction circuit
54 ... Reduction circuit
55 ... inverting circuit
56 ... Smoothing circuit
57 ... First emphasis circuit
58 ... inversion circuit
59: Second emphasis circuit

JP09377699A 1999-03-31 1999-03-31 Image sharpening method and image sharpening device Expired - Fee Related JP4019239B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP09377699A JP4019239B2 (en) 1999-03-31 1999-03-31 Image sharpening method and image sharpening device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP09377699A JP4019239B2 (en) 1999-03-31 1999-03-31 Image sharpening method and image sharpening device

Publications (3)

Publication Number Publication Date
JP2000285232A JP2000285232A (en) 2000-10-13
JP2000285232A5 true JP2000285232A5 (en) 2004-10-14
JP4019239B2 JP4019239B2 (en) 2007-12-12

Family

ID=14091836

Family Applications (1)

Application Number Title Priority Date Filing Date
JP09377699A Expired - Fee Related JP4019239B2 (en) 1999-03-31 1999-03-31 Image sharpening method and image sharpening device

Country Status (1)

Country Link
JP (1) JP4019239B2 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6223041B2 (en) * 2013-07-29 2017-11-01 株式会社堀場製作所 Liquid metering device and water quality analyzer
JP6417851B2 (en) * 2014-10-28 2018-11-07 ブラザー工業株式会社 Image processing apparatus and computer program
KR101617551B1 (en) * 2014-12-18 2016-05-03 재단법인 다차원 스마트 아이티 융합시스템 연구단 Image processing method and system for improving face detection
KR102087681B1 (en) 2015-09-17 2020-03-11 삼성전자주식회사 Image processing device, method for processing image and computer-readable recording medium
CN111080535A (en) * 2019-11-05 2020-04-28 浙江大华技术股份有限公司 Image enhancement method and computer storage medium

Similar Documents

Publication Publication Date Title
JP4492704B2 (en) Edge enhancement processing device, output device, edge enhancement processing method, and computer-readable recording medium
JP4902837B2 (en) How to convert to monochrome image
US6822762B2 (en) Local color correction
JP4707830B2 (en) A method for improving digital images with noise-dependent control of textures
US6813041B1 (en) Method and apparatus for performing local color correction
KR20040044556A (en) Image processing method, apparatus, and program
JP6417851B2 (en) Image processing apparatus and computer program
JP4262151B2 (en) Image processing method, image processing apparatus, computer program, and storage medium
JP4064023B2 (en) Digital image halftone processing method and apparatus, and recording medium on which digital image halftone processing program is recorded
US6115078A (en) Image sharpness processing method and apparatus, and a storage medium storing a program
JP3689607B2 (en) Image processing method, apparatus, and storage medium
JP2008011286A (en) Image processing program and image processor
Watanabe et al. An adaptive multi-scale retinex algorithm realizing high color quality and high-speed processing
JP4243362B2 (en) Image processing apparatus, image processing method, and recording medium recording image processing program
JP4019239B2 (en) Image sharpening method and image sharpening device
JP2000285232A5 (en)
JP4164215B2 (en) Image processing method, apparatus, and recording medium
JP4161141B2 (en) Edge enhancement processing apparatus, edge enhancement processing method, and computer-readable recording medium recording an edge enhancement processing program
JPH10340332A (en) Image processor, image processing method and medium recording image processing control program
JP3981785B2 (en) Medium storing image sharpening program, image sharpening device, and image sharpening method
JP2007272878A (en) Image processing program and image processing device
JP4081628B2 (en) Image data interpolation method, image data interpolation device, and computer readable recording medium recording image data interpolation program
JP2000285231A5 (en)
JP2008059307A (en) Image processor and image processing program
JP2017130721A (en) Image processing apparatus and program