JP4186558B2 - Image processing method and apparatus - Google Patents

Image processing method and apparatus Download PDF

Info

Publication number
JP4186558B2
JP4186558B2 JP2002265798A JP2002265798A JP4186558B2 JP 4186558 B2 JP4186558 B2 JP 4186558B2 JP 2002265798 A JP2002265798 A JP 2002265798A JP 2002265798 A JP2002265798 A JP 2002265798A JP 4186558 B2 JP4186558 B2 JP 4186558B2
Authority
JP
Japan
Prior art keywords
image
photographic
parameter
brightness
edge
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2002265798A
Other languages
Japanese (ja)
Other versions
JP2004102819A (en
Inventor
祥一 中條
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Seiko Epson Corp
Original Assignee
Seiko Epson Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Seiko Epson Corp filed Critical Seiko Epson Corp
Priority to JP2002265798A priority Critical patent/JP4186558B2/en
Publication of JP2004102819A publication Critical patent/JP2004102819A/en
Application granted granted Critical
Publication of JP4186558B2 publication Critical patent/JP4186558B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Description

【0001】
【発明の属する技術分野】
本発明は、画像の処理を行なう技術に関し、詳しくは写真画像に対する2値化の処理を伴う画像処理を行なう技術に関する。
【0002】
【従来の技術】
近年、デジタルカメラの普及とデジタルカメラにより撮像した画像を取り扱う画像処理ソフトの低廉化とに伴い、専門的な知識を有しないものであっても、写真画像を修正したり、トリミングしたり、他の写真やクリップアートと合成するといった画像処理が行なえるようになってきた。
【0003】
また、写真画質の印刷を簡単に実現するプリンタも普及してきており、画像処理後の画像をそのまま印刷することも容易となっている。このため、こうした画像処理の分野では、写植やオフセット印刷といった印刷分野の専門職による画像処理ではなく、特別な知識のないユーザによる使用が広く行なわれている。例えば、年賀状に家族の写真と年賀の文字を合成したり、転居通知に写真と地図を掲載したりといった処理を目的とした一般向けのアプリケーションソフトが発売されている。こうした目的で、写真から画像を取り出す技術については、例えば以下の特許文献がある。
【特許文献1】
特開平10−243211号公報
【0004】
【発明が解決しようとする課題】
しかしながら、写真画像を用いたこうした画像処理も、当初は斬新に感じられたものの、広汎に普及するに従って、見る者に与える印象は薄くなっていく。むしろ、誰でも撮影できそうな写真よりも、絵手紙のさりげない絵や、ペン画によるイラストなどの方が、見る者に与える印象は強い場合がある。とはいえ、誰でも簡単にイラストなどを描くことはできなかった。
【0005】
そこで、従来から、デジタルカメラやスキャナで取り込んだ写真画像を、イラスト風に変換するフィルタなどが提案されているが、単純なエッジ抽出であったり、色数を減少する単純な処理(いわゆるポスタライズ)であったりするにとどまり、せいぜいイラストの下絵として利用できる程度であった。写真画像を変換したものを、そのままイラストとして用いることは到底できなかった。
【0006】
本発明の装置は、こうした問題を解決し、写真画像を処理してイラストとして利用可能な画像を得ることを目的とする。
【0007】
【課題を解決するための手段およびその作用・効果】
上記課題の少なくとも一部を解決する本発明の画像処理方法は、
写真画像を入力して、処理を行なう画像処理方法であって、
記録媒体に記録された写真画像の少なくとも一つを選択し、
該選択された写真画像を、明度と色相とが独立したパラメータによって表現し、
該明度を表すパラメータを、予め定めた閾値と比較して2値化し、
前記写真画像から、該画像に含まれるエッジを抽出し、
該2値化されたパラメータと前記色相を表すパラメータとから再現された画像に前記抽出されたエッジを重ねて表示することで、前記画像をイラスト化して表示すること
を要旨としている。
【0008】
なお、本発明は、この方法を実現するプログラムとして把握することができる。同様に、そのプログラムを記録した記録媒体としての把握することができる。更に、この方法に対応した装置の発明として把握することもできる。こうした装置の発明は、
写真画像を入力して、処理を行なう画像処理装置であって、
記録媒体に記録された写真画像の少なくとも一つを選択する画像選択手段と、
該選択された写真画像を、明度と色相とが独立したパラメータによって表現し、該明度を表すパラメータを、予め定めた閾値と比較して2値化する2値化手段と、
前記写真画像から、該画像に含まれるエッジを抽出するエッジ抽出手段と、
該2値化されたパラメータと前記色相を表すパラメータとから再現された画像に、前記抽出されたエッジを重ねて表示することで、前記画像をイラスト化して表示するイラスト化手段と
を添えたことを要旨としている。
【0009】
かかる画像処理方法や処理装置等によれば、記録媒体に記録された写真画像から選択されたの少なくとも一つの写真画像を、明度と色相とが独立したパラメータ、例えばYCrCbの色空間によって表現し、このうち、明度を表すパラメータを、予め定めた閾値と比較して2値化する。他方、写真画像からこれに含まれるエッジを抽出し、2値化されたパラメータと色相を表すパラメータとから再現された画像に抽出されたエッジを重ねて表示する。この結果、選択された写真画像はイラスト化されて表示される。
【0010】
こうした画像処理においては、写真画像は、RGBにより表現された画像であり、前記明度と色相が独立したパラメータによって表現された画像は、YCrCbによる画像であるものとすることができる。いずれの表現も、画像処理の分野で多用されており、取り扱うためのツール類も広く出回っている。従って、上記のフォーマットを利用すれば、イラスト化に伴う他の画像処理を容易に行なうことができる。
【0011】
明度を表すパラメータを比較して2値化する際の閾値の大きさによって、イラスト化は大きな影響をうける。明度を表すパラメータが8ビットで表現されている場合には、2値化のための閾値は、デフォルトで60ないし80の間の値とすることが望ましい。かかるデフォルトの閾値を72前後の値とし、更にこの閾値を40ないし110の範囲内で変更可能とすることも、イラスト化の雰囲気を、イラストとして違和感のない範囲で調整する上で有用である。
【0012】
明度を2値化した後のパラメータにより再現された画像に、抽出したエッジを重ね合わせる際、抽出されたエッジに対応する部位の画像を、輪郭線を示す色で表示するものとすることができる。輪郭線は通常は黒など、特定の色で表現されており、これを画像と重ね合わせることで、よりイラストの雰囲気を表現することができる。
【0013】
イラスト化して表示される画像の明度および/または彩度を、所定範囲で変更することができる構成も有用である。画面に明度や彩度を調整するスライドバーなどを表示し、これを修正することで、画像を表現するパラメータを、変更する者とすればよい。
【0014】
更に本発明の第2の画像処理装置は、
デジタルカメラにより撮像された写真画像に対して、一連の処理を行なった結果を出力する画像処理装置であって、
前記デジタルカメラにより撮像された写真画像の少なくとも一つを入力する画像入力手段と、
該入力された写真画像を、明度と色相とが独立したパラメータによって表現し、該明度を表すパラメータを、予め定めた閾値と比較して2値化する2値化手段と、
前記写真画像から、該画像に含まれるエッジを抽出するエッジ抽出手段と、
該2値化されたパラメータと前記色相を表すパラメータとから再現された画像に、前記抽出されたエッジを重ねて表示することで、前記画像をイラスト化して表示するイラスト化手段と、
該イラスト化された画像の少なくとも一部を、画像を構成する他の画像や文字と共に所定の領域内に配置する画像配置配置手段と、
該配置された各画像や文字を、多色の画像を形成可能なプリンタに出力する出力手段と
を備えたことを要旨とする。
【0015】
かかる画像処理装置では、第1の画像処理装置と同様に、写真画像に対してイラスト化する処理を行なうが、特にデジタルカメラにより撮像した画像の少なくとも一部を、これに画像を構成する他の画像や文字などを配置し、しかも、配置された画像を、プリンタに出力して、多色の画像を形成することができる。従って、デジタルカメラにより撮影した画像を元にイラスト化した画像を、年賀状やカード、作品、便せんなどの形態で出力することができる。
【0016】
【発明の実施の形態】
本発明の実施の形態について説明する。図1は、本発明の画像処理方法が実施される画像処理装置としてのコンピュータ20およびこのコンピュータ20に接続されたプリンタ30を示す説明図である。コンピュータ20には、メモリカードMCを読み書きするカードリーダライタ40が接続されている。デジタルカメラ50で撮像した画像は、デジタルカメラ50に内蔵されたメモリカードMCに書き込まれ、このメモリカードMCをデジタルカメラ50から抜いて、カードリーダライタ40に装着することで、デジタルカメラ50で撮像した画像を、コンピュータ20で扱うことができる。
【0017】
コンピュータ20は、周知のものであり、CPUやROM,RAM,あるいはビデオ信号の出力回路、カードリーダライタ40とのインタフェース、ハードディスクおよびその制御回路等を内蔵している。これらの回路については、説明は省略する。図2は、コンピュータ20において実現される画像処理関係の機能を説明するブロック図である。かかる機能ブロックは、実際には、コンピュータ20に内蔵したハードディスクからロードされた所定のプログラムが実行されることにより実現される。
【0018】
図2に示したように、画像処理装置として機能するコンピュータ20は、カードリーダライタ40に装着されたメモリカードMCから画像データを選択して読み出す機能を実現する画像データ読出部100、画像データ読出部100から読み出したデータの表現形式をRGB(各8ビット)からYCrCb(各8ビット)に変換する変換部110、変換された画像データのうち明度を表すパラメータであるY値を予め定めた閾値Yrと比較することで2値化を行なう2値化実行部120、明度についての2値化を行なった後のパラメータから画像を再現する画像再現部130、読み出した画像データのノイズを除去してからエッジを抽出して輪郭線とするエッジ抽出部140、この輪郭線と画像再現部130により再現された画像に重ね合わせて画像を形成する画像形成部150、などの機能部を実現する。
【0019】
ここで、画像データ読出部100は、メモリカードMCに保存された画像データを選択し、少なくともその一つを読み出すものである。具体的には、JPEGなどの形式でメモリカードMCに保存された画像データをファイルの形式で表示し、これを使用者に選択させる。選択画面の一例を図3に示した。この画面では、左側に実行する処理の一覧がボタンの形で示されており、このうちの「写真の選択」ボタンBL1操作すると、メモリカードMCやハードディスク内に存在する画像データが、画面右側に表示される。画像データは、欄CC1にはファイルの形態で表示され、その下部の欄CC2にはサムネイルの形態で表示される。いずれかの欄CC1,CC2で、ファイル名やサムネイルを選択する(例えばマウスなどでダブルクリックする)と、選択された画像データはメモリカードMCやハードディスクから読み出され、コンピュータ20のモニタ25に表示するため、RGB(各8ビット)の形式で、コンピュータ20内部の表示用メモリ(図示せず)などに展開される。展開された画像は、図3では、表示欄CC3に表示される。なお、こうして読み出された画像PHは、画面上部の「左回転」ボタンBB湾で左90度回転することができる。同様に「右回転」ボタンBB2では右90度の回転が可能である。「前処理」ボタンBB3を押すと、画像PHに対して、予め規定した前処理、例えば画像全体が暗い場合にこれを明るくするといった処理を行なうことができる。
【0020】
こうして読み出された画像データは、コンピュータ20の内部では、変換部110により、その表現形式が変換される。変換部110は、実施例では、RGB形式の画像データを、明度と色相が独立したパラメータとなっているYCrCbの形式に変換している。この変換は、周知の行列演算により容易に実現することができる。
【0021】
2値化実行部120は、YCrCbの形式で表された画像データを、画像の原点(例えば左上隅)から順次読み出し、2値化を行なう。この処理の詳細は後述するが、大まかに説明すれば、変換部110により変換された画像データのY値を、閾値Yrと比較して、閾値Yrより大きければ予め設定した上限値(Ymax )とし、閾値Yrより小さければ予め設定した下限値(Ymin )とすることになる。閾値Yrが小さな値に設定されれば画像は白っぽくなり影の範囲は狭くなり、大きな値に設定されれば画像は黒っぽくり影の範囲は広くなる。この2値化実行部120には、閾値設定部125が付属しており、2値化に用いる閾値Yrを変更することができる。この例では、閾値Yrのデフォルト値は72であり、これを最小値48から最大値108までの間で可変することができる。なお、明度Yについての2値化を行なった後は、明度Yhと表記する。画像再現部130は、画像データ(YCrCb)について、明度に関して2値化した後の画像データ(YhCrCb)をRGBの形式に逆変換し、これをモニタ25に表示する。
【0022】
メモリカードMC内に保存され、選択された画像に対しては、上述した明度の2値化の処理の他に、もう一つ、エッジの抽出処理が行なわれる。即ち、エッジ抽出部140は、まず画像データに含まれるノイズの除去を行ない、ノイズを除去した後のデータに含まれるエッジを抽出する。エッジの抽出では、エッジではないと判定した画素については元の画像の画像データをそのまま用い、エッジと判定した場合には、その画素のデータを黒に設定している。この結果、エッジと判定された画素は黒色に設定され、輪郭線として以後の処理では扱われる。ノイズ除去とエッジ抽出の手法については、後でまとめて詳述する。なお、エッジ抽出部140には、各種の指定を行なう指定部145が付属している。指定部145では、ノイズの除去に際してのノイズ除去の程度を指定と輪郭線の多寡の指定とを行なうことができる。
【0023】
こうしてエッジ抽出により輪郭線が形成された画像と、先に再現しておいた2値化画像とを重ね合わせるのが、画像形成部150である。この画像形成部150は、画像再現部130の出力とエッジ抽出部140の出力とを比べ、輪郭線に該当していればその画素を黒に設定し、輪郭線に該当していなければ画像再現部130の画像データをその画素のデータとして採用するのである。
【0024】
以上簡単に説明したように、この画像処理装置では、元の画像データから、明度の2値化とエッジの抽出とを行ない、両者から処理後の画像を形成している。かかる処理を行なうことにより、写真画像からイラスト化した画像を得ることができる。図3に示した画面で、左側の「イラスト化」のボタンBL2をクリックすると、上記のイラスト化の処理が行なわれ、図4に示すように、イラスト化された画像が、欄CL1に表示される。これらの処理は、予め設定した閾値Yrなどを用いて一律に行なわれるので、得られた画像が所望のものでない場合を想定し、既に説明した閾値設定部125や指定部145などが付属している。同様に画像形成部150の設定を変更する設定変更部155も設けられている。これらの閾値設定部125や指定部145、あるいは設定変更部155は、図4に示したように、実際には、イラスト化した画像を表示する欄CL3の隣に表示された5つのスライドバーSL1ないしSL5として構成されている。
【0025】
上部の3つのスライドバーSL1ないしSL3は、イラスト化された画像の色の調整に関するものであり、一番上のスライドバーSL1は、影の範囲を設定する閾値設定部125に相当している。このスライドバーSL1のスライダを移動することで、影(イラスト化された画像で黒い部分)の範囲を調整することができる。スライダを「狭い」の方に移動すると黒い部分が減り、「広い」の側に移動すると黒い部分か増える。こうしたスライダの移動は、他のスライドバーSL2ないしSL5も同様だが、直ちに欄CL1の画像に反映される。第2のスライドバーSL2は、イラスト化された画像の明るさを設定するものであり、第3のスライドバーSL3は、イラスト化された画像の鮮やかさ(彩度)を設定するものである。これらは、設定変更部155に相当している。
【0026】
下部の2つのスライドバーSL4,SL5は、輪郭線とノイズの調整に関するものであり、指定部145に相当している。スライドバーSL4は、輪郭線の多さを設定するものである。スライダを「少ない」の側に移動すると、イラストにおける輪郭線の数は減少する。他方、スライダを「多い」の側に移動すると、イラストにおける輪郭線の数を増加する。また、スライドバーSL5は、ノイズ除去の強さを設定するものであり、イラスト化された画像に残る細かな黒い点(ノイズ)の量を調整する。
【0027】
次に2値化実行部120などにおける処理の詳細について説明する。図5は、2値化の処理の概要を示すフローチャートである。図示するように、2値化の処理を行なう2値化実行部120では、まず、閾値Yrの設定を行なう(ステップS200)。閾値Yrは、画像処理としては、影の範囲を設定するものであり、使用者の側からは、図4に示したスライドバーSL1のスライダを操作することに相当する。この例では、Yrのデフォルト値は72であり、最小値(狭い)は48、最大値(広い)は108である。
【0028】
閾値Yrの設定を行なった後、写真画像について原点から順次各画素の画像データを読み込む(ステップS210)。次にその画素のY値が、設定された閾値Yrより大きいか否かの判断を行ない(ステップS220)、閾値Yrより大きければY値を上限値Ymax (本実施例では値255)に設定し(ステップS230)、閾値Yr以下であればY値を下限値Ymin (本実施例では値0)に設定する処理を行なう(ステップS240)。設定後のY値はYhとして表す。
【0029】
以上の処理の後、総ての画素について処理を終了したかを判断し(ステップS250)、処理が終了していなければ、着目する画素を一つ進めて(ステップS260)、ステップS210から上述した処理を繰り返す。総ての画素についての処理が完了すれば、得られた画像データ(YhCrCb)を、表示用のRGBの形式のデータに変換し(ステップS270)、その後、「END」に抜けて処理を終了する。以上の処理の結果、元の画像データに対して、明度Yのみ2値化した画像データ(YhCrCb)が得られる。
【0030】
図6は、スライドバーSL2よる画像の明るさの変更処理を示すフローチャートである。この処理は、スライドバーSL2により設定された明るさの補正値Cを読み込み(ステップS300)、この補正値を用いて、2値化された後のYh値を、補正量C分だけ補正するものである。補正量Cは、−32〜+32の値を取ることができ、スライダが「暗い」側に設定されていれば−32、「明るい」に設定されていれば+32となっている。この補正量Cを用いて、総ての画素の画像データ(YhCrCb)を補正する処理を行ない(ステップS310)、処理を終了する。なお、このフローチャートで示された処理は、実際には、スライドバーSL2のスライダが移動された時にのみ実行される。補正量Cが0の場合には元の画像は補正されない。
【0031】
次に彩度の変更処理について説明する。イラスト化された画像の彩度は、図4に示したスライドバーSL3のスライダを移動することにより補正される。この処理は、2値化の処理によりRGBのデータに変換された後の画像データ(RGB)に対して行なわれる。彩度の補正処理を図7のフローチャートに示した。彩度補正用のスライドバーSL3のスライダが変更されると、図7に示した処理が起動され、まず彩度の補正値kを読み出す(ステップS350)。次に、元の画像データ(RGB)を、一旦HSV(色相,彩度,明度)の形式の変換し(ステップS360)、この彩度値Sに係数kを乗算する処理を行なう(ステップS370)。スライドバーSL3により設定される係数kの範囲は、実施例では、0.25〜4.0とした。こうした彩度の補正を、すべての画素について行なった後、今度はHSV形式の画像データを、RGB形式に逆変換し(ステップS380)、処理を終了する。彩度の補正も明るさ補正と同様、スライドバーSL3のスライダを移動すると、その都度直ちに実施され、表示欄CL1に表示された画像の彩度が変更される。
【0032】
次に、エッジ抽出部140が行なうエッジ抽出の処理と指定部145の指定を受けて調整される輪郭線の多寡の変更について説明する。この処理は、図8に示したフローチャートに従って行なわれる。この処理が開始されると、まず指定部145による閾値Bの設定を行なう(ステップS400)。実際には、この指定は、図4に示したスライドバーSL4により行なわれる。エッジであるか否かの判断は、着目している画素の色と周りの画素の平均的な色との差が閾値B以上であるところをエッジと判定することで行なっており、その判断のための閾値Bは、本実施例では、デフォルトが値2、最小が値0、最大が値4である。即ち、図4に示したスライドバーSL4のスライダを「少ない」の側に持っていくと、閾値Bは値4の側に設定され、「多い」の側に持っていくと、閾値Bは値0の側に設定される。なお、各色について8ビットの画像データにより表現されている画像では、着目してる画素の画像データと、周辺の画素の平均値との差は、理論上は0から255まで取りうるが、写真などの自然画像では、そうした大きなデータの変化のみでエッジを形成していることはなく、0ないし4程度の範囲で閾値を設定すれば、イラスト化を図ることができる。
【0033】
次に、着目している画素Pの画像データSを読み出す処理を行なう(ステップS410)。このとき画像データはRGBの形式で読み出される。次に、着目している画素の周辺8画素の画像データ(色)の平均値Savを計算する処理を行なう(ステップS420)。実際には平均値Savは、RGBの各色について平均値が求められる。続いて、着目している画素Pの画像データSと平均値Savとの差が閾値B以上であるか否かを判定する(ステップS430)。この判定は、RGBの各色についてすべて閾値B以上であるとき、|S−Sav|>Bと判断しても良いし、RGBについての差分の平均値で判断しても良い。
【0034】
着目している画素Pの画像データSと周辺8画素の画像データの平均値Savとの差が閾値B以上であると判断された場合には、その画素をエッジと反対する(ステップS440)。エッジと判定した場合には、その点の画像データを黒に設定する。ステップS430での判断が成り立たない場合には、エッジではなく背景と判断し、その画素の画像データをそのまま保持する。以上の処理は、着目した一つの画素に関するものであるが、実際には、2値化実行部120で2値化され、RGB形式に戻された画像データの総ての画素について行なわれる。
【0035】
以上の処理が実行されると、結局着目している画素が周辺の8画素の平均的な画像データから見て閾値B以上変化している画素について、これをエッジだと判定し、輪郭線として黒の点に変更する処理が実行されることになる。エッジであるか否かの判定は、明度だけによるのではなく、RGB形式の画像データを用いて、色ごとに比較しているので、明るさが同じでも色相が変化する点は、エッジとして抽出される。閾値Bが小さくなれば、変化の小さな箇所でも輪郭線として拾い出されることになるから、輪郭線の数は増える。
【0036】
次に、輪郭線の抽出処理と同時に行なわれるノイズ除去の処理について説明する。ノイズ除去は、輪郭線として抽出されたエッジのうち、孤立した点を除く処理に該当する。この処理の概要を図9に示した。図示するように、この処理が開始されると、まずノイズ除去のための閾値Tに、指定部145により指定された閾値Tpを設定する処理を行なう(ステップS500)。閾値Tpは、実際には、図4に示したスライドバーSL5により指定される。スライドバーSL5のスライダを左に持っていくほどノイズの除去は弱くなり、つまりノイズのように見える孤立した輪郭線が増え、スライダを右に持っていくほど、ノイズの除去は強くなり、つまり輪郭線の数は一般に増加する。このノイズ除去の強さを設定する閾値Tpは、8ビットのデータにより指定されるので、内部的には値0ないし255まで理論上は指定できるが、本実施例では、デフォルトで値16、最小で値0(ノイズ除去なし)、最大で値56まで設定可能となっている。
【0037】
閾値Tを設定した後、着目画素Pmnの画像データSを読み込み処理を行なう(ステップS510)。着目画素Pは二次元の座標(m, n)を使ってその位置を特定することができるので、ココでは、X方向の座標をm、Y方向の座標をnとして表している。次に変数Nを値1に、画像データの計算用変数Lを値0に、それぞれ初期化し(ステップS520)、画素Pmnの近傍8画素の一つとその画像データを比較して(色単位)、差ΔSを求める処理を行なう(ステップS530)。変数Nは、近傍の画素を指定するのに用いている。次に、この画像データの差ΔSが先に設定した閾値T以下か否かの判断を行なう(ステップS540)。ここで、差ΔSが閾値T以下であれば、着目している画素Pmnについての画像データLにその画素自身の画像データをSを加える処理を行なう(ステップS4ー550)。差ΔSが閾値Tより大きければ、計算用変数Lには何も加えない。
【0038】
次に、変数Nを値1だけインクリメントし(ステップS560)、変数Nが値8より大きくなったか否かについて判定を行なう(ステップS570)。変数Nが値8より多くなければ(値8以下であれば)、着目画素Pmnの周辺の総ての画素との比較が終わっていないとして、ステップS530の処理に戻り、上記の処理を繰り返す。一方、周辺の8画素との比較がすべて終わっていれば、ステップS480に移行して、着目している画素について累積してきた計算用データLを8で乗算して、その画素についてのデータを求める処理を行なう(ステップS580)。この処理は、実際には、既に説明した輪郭線の抽出処理の後に行なわれる。即ち、輪郭線として抽出された画素が、いくつかの方向について同様に輪郭線として抽出された画素と隣接していれば(ΔS≦T)、その画素の画像データSは高い値に保持され(ステップS580)、隣接する位置に輪郭線がないか、少ない場合には、その画素の画像データは小さな値に修正され、ノイズとして消去されることになる。
【0039】
以上説明した本実施例によれば、写真画像から、極めて簡単に、イラスト化の処理を行なって、イラスト的な画像を得ることができる。特に、本実施例では、画像データを一旦明度と色相とがパラメータとして分離されている画像データの形式に変換し、その明度を表しているパラメータYについて、所定の閾値Yrとの比較を行なうという極めて単純な手法で、適切にイラスト化された画像を得ることができる。閾値Yrについてのデフォルト値72(8ビットで画像を表現している場合)は、試行錯誤のなかなか見い出された値であり、多くの写真画像を、適切にイラスト化できる閾値である。また、一旦イラスト化した画像を欄CL1に表示しつつ、スライドバーSL1ないしSL5を用いて、影の部分の大きさ、明度補正、鮮やかさの補正、更には輪郭線の多寡やノイズ除去の強さなどを極めて容易に変更することができる。しかも、それらの変更の結果は直ちに欄CL1に表示された画像に反映され、画像処理の結果を確認することができる。
【0040】
欄CL1に表示された画像が適正だと判断した場合には、図4に示した「保存」ボタンBL3を操作して、イラスト化した後の画像を保存することができる。また、イラスト化した画像に文字やクリップアートなどを加えて、所望の画像に調整し、これを年賀状やカード、カレンダなどとして印刷するものとしても良い。
【0041】
以上、本発明の実施の形態について説明したが、本発明はこうした実施の形態に何等限定されるものではなく、本発明の要旨を逸脱しない範囲内において、更に種々なる形態で実施し得ることは勿論である。例えば、本実施例の画像処理装置は、画像処理方法や、画像処理方法を記録した記録媒体、画像処理方法を実現するプログラムとして具現化することもできる。また、イラスト化した画像に対して、更に種々のフィルタを用意し、例えば一旦イラスト化した画像を再度水彩風に修正したり、○○画家風にアレンジするといった処理を付加することも差し支えない。また、この画像処理を、年賀状作成ソフトといった特定のアプリケーションに組み込むことも可能である。
【図面の簡単な説明】
【図1】 実施の形態における画像処理装置の概略構成を示す説明図である。
【図2】 画像処理装置の機能構成を示すブロック図である。
【図3】 画像を選択する様子を示す説明図である。
【図4】 イラスト化された画像に対して種々の設定を行なう様子を示す説明図である。
【図5】 2値化の処理ルーチンを示すフローチャートである。
【図6】 明るさ変更の処理ルーチンを示すフローチャートである。
【図7】 彩度変更を行なう処理ルーチンを示すフローチャートである。
【図8】 輪郭線を抽出するための輪郭処理ルーチンを示すフローチャートである。
【図9】 ノイズ除去の処理ルーチンを示すフローチャートである。
【符号の説明】
20…コンピュータ
25…モニタ
30…プリンタ
40…カードリーダライタ
50…デジタルカメラ
100…画像データ読出部
110…変換部
120…2値化実行部
125…閾値設定部
130…画像再現部
140…エッジ抽出部
145…指定部
150…画像形成部
155…設定変更部
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a technique for processing an image, and more particularly, to a technique for performing image processing that involves binarization processing for a photographic image.
[0002]
[Prior art]
In recent years, with the spread of digital cameras and the low cost of image processing software that handles images taken with digital cameras, photo images can be modified, trimmed, etc. Image processing, such as compositing with photos and clip art, has become possible.
[0003]
In addition, printers that easily realize photo-quality printing have become widespread, and it is easy to print an image after image processing as it is. For this reason, in the field of image processing, it is widely used by users without special knowledge, rather than image processing by professionals in the printing field such as photosetting and offset printing. For example, application software for the general public has been released for the purpose of composing a family photo and New Year's characters on a New Year's card or posting a photo and a map on a move notification. For such a purpose, there are, for example, the following patent documents regarding techniques for extracting an image from a photograph.
[Patent Document 1]
Japanese Patent Laid-Open No. 10-243211
[0004]
[Problems to be solved by the invention]
However, although such image processing using a photographic image was originally felt to be novel, the impression given to the viewer becomes thinner as it becomes widespread. Rather, the impression given to the viewer may be stronger than a casual picture of a picture letter or an illustration with a pen drawing than a picture that anyone can take. However, no one could easily draw illustrations.
[0005]
Therefore, filters that convert photographic images captured with digital cameras and scanners into illustrations have been proposed in the past, but simple edge extraction or simple processing to reduce the number of colors (so-called posterization) It was just enough to be used as a sketch for illustrations at best. It was impossible to use a photographic image converted as it is as an illustration.
[0006]
The apparatus of the present invention is intended to solve such problems and to process photographic images to obtain images that can be used as illustrations.
[0007]
[Means for solving the problems and their functions and effects]
An image processing method of the present invention that solves at least a part of the above problems is as follows.
An image processing method for inputting and processing a photographic image,
Select at least one of the photographic images recorded on the recording medium,
The selected photographic image is represented by parameters whose brightness and hue are independent,
The parameter representing the brightness is binarized by comparing with a predetermined threshold value,
Extracting the edge contained in the image from the photographic image,
By displaying the extracted edge superimposed on the image reproduced from the binarized parameter and the parameter representing the hue, the image is displayed as an illustration.
Is the gist.
[0008]
The present invention can be grasped as a program for realizing this method. Similarly, it can be grasped as a recording medium on which the program is recorded. Furthermore, it can be grasped as an invention of an apparatus corresponding to this method. The invention of such a device
An image processing apparatus for inputting and processing a photographic image,
Image selection means for selecting at least one of the photographic images recorded on the recording medium;
Binarizing means for representing the selected photographic image by a parameter whose brightness and hue are independent, and binarizing the parameter representing the brightness with a predetermined threshold;
Edge extraction means for extracting edges contained in the image from the photographic image;
Illustrator for displaying the image as an illustration by displaying the extracted edge superimposed on the image reproduced from the binarized parameter and the parameter representing the hue;
The gist is that.
[0009]
According to such an image processing method, a processing apparatus, or the like, at least one photographic image selected from photographic images recorded on a recording medium is expressed by a parameter whose brightness and hue are independent, for example, a YCrCb color space, Among these, a parameter representing brightness is binarized by comparing with a predetermined threshold value. On the other hand, an edge included in the image is extracted from the photographic image, and the extracted edge is superimposed and displayed on the image reproduced from the binarized parameter and the parameter representing the hue. As a result, the selected photographic image is displayed as an illustration.
[0010]
In such image processing, a photographic image is an image expressed by RGB, and an image expressed by parameters with independent brightness and hue can be an image by YCrCb. Both expressions are frequently used in the field of image processing, and tools for handling them are widely available. Therefore, if the above format is used, other image processing accompanying illustration can be easily performed.
[0011]
Illustration is greatly influenced by the magnitude of the threshold when binarizing the parameters representing brightness. When the parameter representing the brightness is expressed by 8 bits, the threshold value for binarization is desirably a value between 60 and 80 by default. Making the default threshold value around 72 and making this threshold value changeable within the range of 40 to 110 is also useful for adjusting the illustration atmosphere within a range that does not give a sense of incongruity as an illustration.
[0012]
When the extracted edge is superimposed on the image reproduced by the parameter after the brightness is binarized, an image of a part corresponding to the extracted edge can be displayed in a color indicating an outline. . The contour line is usually expressed in a specific color such as black, and the atmosphere of the illustration can be expressed more by superimposing it on the image.
[0013]
A configuration that can change the brightness and / or saturation of an image displayed as an illustration within a predetermined range is also useful. A slide bar or the like that adjusts the brightness or saturation is displayed on the screen, and by correcting the slide bar, the parameter representing the image may be changed.
[0014]
Furthermore, the second image processing apparatus of the present invention provides:
An image processing apparatus that outputs a result of a series of processing performed on a photographic image captured by a digital camera,
Image input means for inputting at least one of photographic images taken by the digital camera;
Binarization means for representing the input photographic image by a parameter whose brightness and hue are independent, and binarizing the parameter representing the brightness with a predetermined threshold;
Edge extraction means for extracting edges contained in the image from the photographic image;
Illustrating means for displaying the image as an illustration by displaying the extracted edge superimposed on the image reproduced from the binarized parameter and the parameter representing the hue;
Image arrangement arrangement means for arranging at least a part of the illustrated image in a predetermined area together with other images and characters constituting the image;
Output means for outputting the arranged images and characters to a printer capable of forming a multicolor image;
The main point is that
[0015]
In such an image processing apparatus, as in the first image processing apparatus, a process for making an illustration of a photographic image is performed. In particular, at least a part of an image captured by a digital camera is used to configure other images. Images, characters, and the like can be arranged, and the arranged images can be output to a printer to form a multicolor image. Therefore, it is possible to output an image that is illustrated based on an image taken by a digital camera in the form of a New Year's card, a card, a work, a stationery, or the like.
[0016]
DETAILED DESCRIPTION OF THE INVENTION
Embodiments of the present invention will be described. FIG. 1 is an explanatory diagram showing a computer 20 as an image processing apparatus in which the image processing method of the present invention is implemented and a printer 30 connected to the computer 20. A card reader / writer 40 for reading and writing the memory card MC is connected to the computer 20. An image captured by the digital camera 50 is written in a memory card MC built in the digital camera 50. The memory card MC is removed from the digital camera 50 and mounted on the card reader / writer 40, whereby the image is captured by the digital camera 50. The processed image can be handled by the computer 20.
[0017]
The computer 20 is a well-known computer, and incorporates a CPU, ROM, RAM, a video signal output circuit, an interface with the card reader / writer 40, a hard disk and its control circuit. Description of these circuits is omitted. FIG. 2 is a block diagram illustrating functions related to image processing realized in the computer 20. Such functional blocks are actually realized by executing a predetermined program loaded from a hard disk built in the computer 20.
[0018]
As shown in FIG. 2, the computer 20 functioning as an image processing apparatus has an image data reading unit 100 that realizes a function of selecting and reading image data from a memory card MC attached to the card reader / writer 40, and image data reading. A conversion unit 110 that converts an expression format of data read from the unit 100 from RGB (each 8 bits) to YCrCb (each 8 bits), and a threshold value that predetermines a Y value that is a parameter representing brightness in the converted image data A binarization execution unit 120 that performs binarization by comparing with Yr, an image reproduction unit 130 that reproduces an image from the parameters after binarization of brightness, and noise in the read image data are removed. An edge extraction unit 140 that extracts an edge from the image to obtain a contour line, and overlays the contour line and the image reproduced by the image reproduction unit 130 Implementing the function unit such as an image forming unit 150 for forming an image, Te.
[0019]
Here, the image data reading unit 100 selects image data stored in the memory card MC and reads at least one of them. Specifically, the image data stored in the memory card MC in a format such as JPEG is displayed in a file format, and the user is allowed to select it. An example of the selection screen is shown in FIG. On this screen, a list of processes to be executed on the left side is shown in the form of a button. When the “select photo” button BL1 is operated, the image data existing in the memory card MC or the hard disk is displayed on the right side of the screen. Is displayed. The image data is displayed in the form of a file in the column CC1, and is displayed in the form of a thumbnail in the column CC2 below it. When a file name or thumbnail is selected in any of the columns CC1 and CC2 (for example, double-clicked with a mouse or the like), the selected image data is read from the memory card MC or the hard disk and displayed on the monitor 25 of the computer 20. Therefore, it is expanded in a display memory (not shown) in the computer 20 in the RGB (8 bits each) format. The developed image is displayed in the display column CC3 in FIG. The image PH read out in this way can be rotated 90 degrees to the left by the “left rotation” button BB bay at the top of the screen. Similarly, the “right rotation” button BB2 can rotate 90 degrees right. When the “pre-process” button BB3 is pressed, a pre-process defined in advance for the image PH, for example, a process of brightening the entire image when it is dark can be performed.
[0020]
The image data read out in this manner is converted in its expression format by the conversion unit 110 inside the computer 20. In the embodiment, the conversion unit 110 converts RGB format image data into a YCrCb format in which brightness and hue are independent parameters. This conversion can be easily realized by a known matrix operation.
[0021]
The binarization execution unit 120 sequentially reads image data expressed in the YCrCb format from the image origin (for example, the upper left corner) and performs binarization. Although details of this processing will be described later, roughly speaking, the Y value of the image data converted by the conversion unit 110 is compared with the threshold value Yr, and if it is larger than the threshold value Yr, it is set as a preset upper limit value (Ymax). If it is smaller than the threshold value Yr, the lower limit value (Ymin) set in advance is set. If the threshold value Yr is set to a small value, the image becomes whitish and the shadow range becomes narrow. If the threshold value Yr is set to a large value, the image becomes blackish and the shadow range becomes wide. The binarization execution unit 120 is attached with a threshold setting unit 125, and the threshold Yr used for binarization can be changed. In this example, the default value of the threshold Yr is 72 and can be varied between the minimum value 48 and the maximum value 108. In addition, after binarization about the brightness Y, it describes with the brightness Yh. The image reproduction unit 130 inversely converts the image data (YhCrCb) after binarization with respect to the image data (YCrCb) into the RGB format, and displays this on the monitor 25.
[0022]
In addition to the lightness binarization process described above, another edge extraction process is performed on the image stored and selected in the memory card MC. That is, the edge extraction unit 140 first removes noise included in the image data, and extracts an edge included in the data after removing the noise. In the extraction of the edge, the image data of the original image is used as it is for the pixel determined not to be an edge, and when it is determined to be an edge, the data of the pixel is set to black. As a result, the pixel determined to be an edge is set to black, and is treated as a contour line in the subsequent processing. The noise removal and edge extraction methods will be described later in detail. The edge extraction unit 140 is attached with a designation unit 145 for performing various designations. The designation unit 145 can designate the degree of noise removal at the time of noise removal and designate the number of contour lines.
[0023]
The image forming unit 150 superimposes the image in which the contour line is formed by the edge extraction in this way and the binarized image reproduced in advance. The image forming unit 150 compares the output of the image reproduction unit 130 and the output of the edge extraction unit 140, sets the pixel to black if it corresponds to the contour, and reproduces the image if it does not correspond to the contour. The image data of the unit 130 is adopted as the pixel data.
[0024]
As described briefly above, in this image processing apparatus, binarization of brightness and extraction of edges are performed from original image data, and a processed image is formed from both. By performing such processing, it is possible to obtain an illustrated image from a photographic image. When the “illustration” button BL2 on the left side is clicked on the screen shown in FIG. 3, the above illustration processing is performed, and the illustrated image is displayed in the column CL1, as shown in FIG. The Since these processes are uniformly performed using a preset threshold value Yr and the like, assuming that the obtained image is not a desired one, the already described threshold setting unit 125, the specifying unit 145, etc. are attached. Yes. Similarly, a setting change unit 155 that changes the setting of the image forming unit 150 is also provided. As shown in FIG. 4, the threshold setting unit 125, the specifying unit 145, or the setting changing unit 155 actually has five slide bars SL1 displayed next to the column CL3 displaying the illustrated image. Or SL5.
[0025]
The upper three slide bars SL1 to SL3 relate to the adjustment of the color of the illustrated image, and the uppermost slide bar SL1 corresponds to the threshold setting unit 125 for setting a shadow range. By moving the slider of the slide bar SL1, it is possible to adjust the range of the shadow (the black portion in the illustrated image). Moving the slider toward “narrow” reduces the black area, and moving it toward the “wide” area increases the black area. This slider movement is also reflected in the image of the column CL1 immediately, as is the case with the other slide bars SL2 to SL5. The second slide bar SL2 is for setting the brightness of the illustrated image, and the third slide bar SL3 is for setting the vividness (saturation) of the illustrated image. These correspond to the setting change unit 155.
[0026]
The lower two slide bars SL4 and SL5 relate to the adjustment of the contour line and noise, and correspond to the designation unit 145. The slide bar SL4 sets the number of contour lines. When the slider is moved to the “less” side, the number of contour lines in the illustration decreases. On the other hand, moving the slider to the “large” side increases the number of contour lines in the illustration. The slide bar SL5 sets the strength of noise removal, and adjusts the amount of fine black dots (noise) remaining in the illustrated image.
[0027]
Next, details of processing in the binarization execution unit 120 and the like will be described. FIG. 5 is a flowchart showing an outline of binarization processing. As shown in the figure, the binarization execution unit 120 that performs binarization processing first sets a threshold value Yr (step S200). The threshold Yr sets a shadow range as image processing, and corresponds to operating the slider of the slide bar SL1 shown in FIG. 4 from the user side. In this example, the default value of Yr is 72, the minimum value (narrow) is 48, and the maximum value (wide) is 108.
[0028]
After setting the threshold value Yr, the image data of each pixel is sequentially read from the origin for the photographic image (step S210). Next, it is determined whether or not the Y value of the pixel is larger than the set threshold value Yr (step S220). If the Y value is larger than the threshold value Yr, the Y value is set to the upper limit value Ymax (value 255 in this embodiment). (Step S230) If the threshold value Yr or less, the Y value is set to the lower limit value Ymin (value 0 in this embodiment) (Step S240). The Y value after setting is represented as Yh.
[0029]
After the above processing, it is determined whether the processing has been completed for all the pixels (step S250). If the processing has not been completed, the pixel of interest is advanced by one (step S260), and the processing from step S210 to step S210 has been described above. Repeat the process. When the processing for all the pixels is completed, the obtained image data (YhCrCb) is converted into RGB format data for display (step S270), and then the process goes to “END” to end the processing. . As a result of the above processing, image data (YhCrCb) obtained by binarizing only the brightness Y with respect to the original image data is obtained.
[0030]
FIG. 6 is a flowchart showing a process for changing the brightness of an image by the slide bar SL2. In this process, the brightness correction value C set by the slide bar SL2 is read (step S300), and the binarized Yh value is corrected by the correction amount C using this correction value. It is. The correction amount C can take a value of −32 to +32, and is −32 if the slider is set to the “dark” side, and +32 if the slider is set to “bright”. Using this correction amount C, a process of correcting the image data (YhCrCb) of all the pixels is performed (step S310), and the process ends. Note that the processing shown in this flowchart is actually executed only when the slider of the slide bar SL2 is moved. When the correction amount C is 0, the original image is not corrected.
[0031]
Next, the saturation changing process will be described. The saturation of the illustrated image is corrected by moving the slider of the slide bar SL3 shown in FIG. This process is performed on the image data (RGB) after being converted into RGB data by the binarization process. The saturation correction process is shown in the flowchart of FIG. When the slider of the saturation correction slide bar SL3 is changed, the processing shown in FIG. 7 is started, and first, the saturation correction value k is read (step S350). Next, the original image data (RGB) is once converted into the HSV (hue, saturation, brightness) format (step S360), and the saturation value S is multiplied by a coefficient k (step S370). . In the embodiment, the range of the coefficient k set by the slide bar SL3 is 0.25 to 4.0. After such saturation correction is performed for all the pixels, this time, the image data in the HSV format is inversely converted into the RGB format (step S380), and the process is terminated. Similar to the brightness correction, the saturation correction is performed immediately each time the slider of the slide bar SL3 is moved, and the saturation of the image displayed in the display field CL1 is changed.
[0032]
Next, an edge extraction process performed by the edge extraction unit 140 and a change in the number of contour lines adjusted in response to the designation by the designation unit 145 will be described. This process is performed according to the flowchart shown in FIG. When this process is started, the threshold value B is first set by the designation unit 145 (step S400). Actually, this designation is performed by the slide bar SL4 shown in FIG. The determination as to whether or not the edge is an edge is made by determining that an edge is where the difference between the color of the pixel of interest and the average color of surrounding pixels is equal to or greater than a threshold value B. In the present embodiment, the threshold B for this is a value of 2 for the default, a value of 0 for the minimum, and a value of 4 for the maximum. That is, when the slider of the slide bar SL4 shown in FIG. 4 is brought to the “less” side, the threshold value B is set to the value 4 side, and when it is brought to the “more” side, the threshold value B is a value. Set to 0 side. Note that in an image represented by 8-bit image data for each color, the difference between the image data of the pixel of interest and the average value of surrounding pixels can theoretically take from 0 to 255, but a photograph or the like In such a natural image, an edge is not formed only by such a large change in data, and if a threshold value is set in a range of about 0 to 4, an illustration can be achieved.
[0033]
Next, a process of reading the image data S of the pixel P of interest is performed (step S410). At this time, the image data is read out in the RGB format. Next, a process of calculating an average value Sav of image data (color) of 8 pixels around the pixel of interest is performed (step S420). Actually, the average value Sav is obtained for each color of RGB. Subsequently, it is determined whether or not the difference between the image data S of the pixel P of interest and the average value Sav is greater than or equal to the threshold value B (step S430). This determination may be made as | S−Sav |> B when all the colors of RGB are equal to or greater than the threshold value B, or may be determined by an average value of differences for RGB.
[0034]
If it is determined that the difference between the image data S of the pixel P of interest and the average value Sav of the image data of the eight neighboring pixels is greater than or equal to the threshold B, that pixel is opposed to an edge (step S440). If it is determined as an edge, the image data at that point is set to black. If the determination in step S430 does not hold, it is determined that the background is not an edge, and the image data of the pixel is held as it is. The above processing relates to one focused pixel, but in practice, it is performed for all the pixels of the image data binarized by the binarization execution unit 120 and returned to the RGB format.
[0035]
When the above processing is executed, it is determined that the pixel in which the pixel of interest has changed by more than the threshold value B as seen from the average image data of the surrounding eight pixels is an edge, and is used as an outline. Processing to change to a black dot is executed. Judgment as to whether or not an edge is based not only on lightness but also on a color-by-color basis using image data in RGB format, the points where the hue changes even if the brightness is the same are extracted as edges Is done. If the threshold value B is small, even a portion with a small change is picked up as a contour line, so the number of contour lines increases.
[0036]
Next, the noise removal process performed simultaneously with the contour line extraction process will be described. Noise removal corresponds to a process of removing isolated points from the edges extracted as contour lines. An outline of this processing is shown in FIG. As shown in the figure, when this process is started, first, a process of setting the threshold value Tp specified by the specifying unit 145 to the threshold value T for noise removal is performed (step S500). The threshold value Tp is actually designated by the slide bar SL5 shown in FIG. As the slider of the slide bar SL5 is moved to the left, noise removal becomes weaker, that is, the number of isolated contour lines that look like noise increases, and as the slider is moved to the right, noise removal becomes stronger, that is, contour. The number of lines generally increases. Since the threshold value Tp for setting the noise removal strength is specified by 8-bit data, the value 0 to 255 can be theoretically specified internally. However, in this embodiment, the threshold value Tp is 16 by default. The value can be set to 0 (no noise removal) and up to 56.
[0037]
After setting the threshold value T, the image data S of the pixel of interest Pmn is read and processed (step S510). Since the position of the pixel of interest P can be specified using two-dimensional coordinates (m, n), the coordinates in the X direction are represented by m and the coordinates in the Y direction are represented by n. Next, the variable N is initialized to the value 1 and the image data calculation variable L is initialized to the value 0 (step S520), and one of the 8 neighboring pixels of the pixel Pmn is compared with the image data (color unit). Processing for obtaining the difference ΔS is performed (step S530). The variable N is used to designate neighboring pixels. Next, it is determined whether or not the difference ΔS of the image data is equal to or smaller than the previously set threshold value T (step S540). Here, if the difference ΔS is equal to or smaller than the threshold value T, a process of adding the image data of the pixel itself to the image data L of the pixel of interest Pmn is performed (steps S4 to 550). If the difference ΔS is larger than the threshold value T, nothing is added to the calculation variable L.
[0038]
Next, the variable N is incremented by 1 (step S560), and it is determined whether or not the variable N is greater than 8 (step S570). If the variable N is not greater than the value 8 (if the value is 8 or less), it is determined that comparison with all the pixels around the pixel of interest Pmn has not been completed, the process returns to step S530 and the above process is repeated. On the other hand, if all the comparisons with the surrounding eight pixels have been completed, the process proceeds to step S480, where the calculation data L accumulated for the pixel of interest is multiplied by 8, and data for that pixel is obtained. Processing is performed (step S580). This process is actually performed after the already described outline extraction process. That is, if a pixel extracted as a contour line is adjacent to a pixel extracted as a contour line in several directions (ΔS ≦ T), the image data S of the pixel is held at a high value ( In step S580), if there is no contour line in the adjacent position or there are few contour lines, the image data of the pixel is corrected to a small value and erased as noise.
[0039]
According to the present embodiment described above, an illustration-like image can be obtained from a photographic image by performing illustration processing very easily. In particular, in this embodiment, the image data is once converted into a format of image data in which the brightness and hue are separated as parameters, and the parameter Y representing the brightness is compared with a predetermined threshold Yr. An appropriately illustrated image can be obtained by a very simple method. The default value 72 for the threshold value Yr (when an image is expressed by 8 bits) is a value that has been found through trial and error, and is a threshold value that can appropriately illustrate many photographic images. In addition, while displaying the image once illustrated in the column CL1, using the slide bars SL1 to SL5, the shadow portion size, brightness correction, vividness correction, contour line depth and noise removal strength are enhanced. It is very easy to change the size. In addition, the results of those changes are immediately reflected in the image displayed in the column CL1, and the results of the image processing can be confirmed.
[0040]
When it is determined that the image displayed in the column CL1 is appropriate, the “save” button BL3 shown in FIG. 4 can be operated to save the image after the illustration. Moreover, it is good also as what adds a character, clip art, etc. to the illustrated image, adjusts to a desired image, and prints this as a New Year's card, a card, a calendar, etc.
[0041]
As mentioned above, although embodiment of this invention was described, this invention is not limited to such embodiment at all, and in the range which does not deviate from the summary of this invention, it can implement with a various form. Of course. For example, the image processing apparatus of the present embodiment can also be embodied as an image processing method, a recording medium on which the image processing method is recorded, and a program that realizes the image processing method. Further, various filters may be prepared for the illustrated image, and for example, the once illustrated image may be modified again in a watercolor style, or may be added with a process such as arranging in an OO painter style. It is also possible to incorporate this image processing into a specific application such as New Year's card creation software.
[Brief description of the drawings]
FIG. 1 is an explanatory diagram illustrating a schematic configuration of an image processing apparatus according to an embodiment.
FIG. 2 is a block diagram illustrating a functional configuration of the image processing apparatus.
FIG. 3 is an explanatory diagram showing how an image is selected.
FIG. 4 is an explanatory diagram showing how various settings are made for an illustrated image.
FIG. 5 is a flowchart showing a binarization processing routine;
FIG. 6 is a flowchart showing a brightness change processing routine;
FIG. 7 is a flowchart showing a processing routine for changing saturation.
FIG. 8 is a flowchart showing a contour processing routine for extracting a contour line;
FIG. 9 is a flowchart showing a noise removal processing routine;
[Explanation of symbols]
20 ... Computer
25 ... Monitor
30 ... Printer
40: Card reader / writer
50 ... Digital camera
100: Image data reading unit
110: Conversion unit
120... Binarization execution unit
125: Threshold setting unit
130: Image reproduction unit
140. Edge extraction unit
145 ... Designation part
150: Image forming unit
155 ... Setting change section

Claims (10)

写真画像を入力して、処理を行なう画像処理方法であって、
記録媒体に記録された写真画像の少なくとも一つを選択し、
該選択された写真画像を、明度と色相とが独立したパラメータによって表現し、
該明度を表すパラメータを、予め定めた閾値と比較して2値化し、
前記写真画像から、該画像に含まれるエッジを抽出し、
該2値化されたパラメータと前記色相を表すパラメータとから再現された画像に前記抽出されたエッジを重ねて表示することで、前記画像をイラスト化して表示する
画像処理方法。
An image processing method for inputting and processing a photographic image,
Select at least one of the photographic images recorded on the recording medium,
The selected photographic image is represented by parameters whose brightness and hue are independent,
The parameter representing the brightness is binarized by comparing with a predetermined threshold value,
Extracting the edge contained in the image from the photographic image,
An image processing method for displaying the image as an illustration by superimposing the extracted edge on an image reproduced from the binarized parameter and the parameter representing the hue.
請求項1記載の画像処理方法であって、
前記写真画像は、RGBにより表現された画像であり、
前記明度と色相が独立したパラメータによって表現された画像は、YCrCbによる画像である
画像処理方法。
The image processing method according to claim 1,
The photographic image is an image expressed in RGB,
The image processing method, wherein the image in which the brightness and the hue are expressed by independent parameters is an image by YCrCb.
請求項1記載の画像処理方法であって、
前記パラメータが8ビットで表現されており、
前記2値化のための閾値は、デフォルトで60ないし80の間の値である
画像処理方法。
The image processing method according to claim 1,
The parameter is expressed in 8 bits;
The threshold value for binarization is an image processing method having a value between 60 and 80 by default.
請求項3記載の画像処理方法であって、
前記デフォルトの閾値は72前後の値であり、該閾値が40ないし110の範囲内で変更可能な
画像処理方法。
The image processing method according to claim 3,
The default threshold value is a value around 72, and the threshold value can be changed within a range of 40 to 110.
前記エッジが抽出された場合には、該エッジに対応する部位の画像を、輪郭線を示す色で表示する請求項1記載の画像処理方法。  The image processing method according to claim 1, wherein when the edge is extracted, an image of a part corresponding to the edge is displayed in a color indicating an outline. 前記イラスト化して表示される画像の明度および/または彩度を、所定範囲で変更する請求項1記載の画像処理方法。  The image processing method according to claim 1, wherein the brightness and / or saturation of the image displayed as an illustration is changed within a predetermined range. 写真画像を入力して、処理を行なう画像処理装置であって、
記録媒体に記録された写真画像の少なくとも一つを選択する画像選択手段と、
該選択された写真画像を、明度と色相とが独立したパラメータによって表現し、該明度を表すパラメータを、予め定めた閾値と比較して2値化する2値化手段と、
前記写真画像から、該画像に含まれるエッジを抽出するエッジ抽出手段と、
該2値化されたパラメータと前記色相を表すパラメータとから再現された画像に、前記抽出されたエッジを重ねて表示することで、前記画像をイラスト化して表示するイラスト化手段と
を備えた画像処理装置。
An image processing apparatus for inputting and processing a photographic image,
Image selection means for selecting at least one of the photographic images recorded on the recording medium;
Binarizing means for representing the selected photographic image by a parameter whose brightness and hue are independent, and binarizing the parameter representing the brightness with a predetermined threshold;
Edge extraction means for extracting edges contained in the image from the photographic image;
An image provided with an illustration means for displaying the extracted image by displaying the extracted edge on the image reproduced from the binarized parameter and the parameter representing the hue. Processing equipment.
コンピュータに読み込まれ、写真画像に対して行なう画像処理をコンピュータにより実現させるためのプログラムであって、
記録媒体に記録された写真画像の少なくとも一つを選択する機能と、
該選択された写真画像を、明度と色相とが独立したパラメータによって表現し、該明度を表すパラメータを、予め定めた閾値と比較して2値化する機能と、
前記写真画像から、該画像に含まれるエッジを抽出する機能と、
該2値化されたパラメータと前記色相を表すパラメータとから再現された画像に前記抽出されたエッジを重ねて表示することで、前記画像をイラスト化して表示する機能と
コンピュータにより実現させるプログラム。
A program that is read by a computer and performs image processing on a photographic image by the computer,
A function for selecting at least one of photographic images recorded on a recording medium;
A function of expressing the selected photographic image by a parameter whose brightness and hue are independent, and binarizing the parameter representing the brightness with a predetermined threshold;
A function of extracting an edge included in the image from the photographic image;
A computer that realizes, by a computer, a function of displaying the image as an illustration by superimposing the extracted edge on an image reproduced from the binarized parameter and the parameter representing the hue.
請求項8記載のプログラムを記録した記録媒体。  A recording medium on which the program according to claim 8 is recorded. デジタルカメラにより撮像された写真画像に対して、一連の処理を行なった結果を出力する画像処理装置であって、
前記デジタルカメラにより撮像された写真画像の少なくとも一つを入力する画像入力手段と、
該入力された写真画像を、明度と色相とが独立したパラメータによって表現し、該明度を表すパラメータを、予め定めた閾値と比較して2値化する2値化手段と、
前記写真画像から、該画像に含まれるエッジを抽出するエッジ抽出手段と、
該2値化されたパラメータと前記色相を表すパラメータとから再現された画像に、前記抽出されたエッジを重ねて表示することで、前記画像をイラスト化して表示するイラスト化手段と、
該イラスト化された画像の少なくとも一部を、画像を構成する他の画像や文字と共に所定の領域内に配置する画像配置配置手段と、
該配置された各画像や文字を、多色の画像を形成可能なプリンタに出力する出力手段と
を備えた画像処理装置。
An image processing apparatus that outputs a result of a series of processing performed on a photographic image captured by a digital camera,
Image input means for inputting at least one of photographic images taken by the digital camera;
Binarization means for representing the input photographic image by a parameter whose brightness and hue are independent, and binarizing the parameter representing the brightness with a predetermined threshold;
Edge extraction means for extracting edges contained in the image from the photographic image;
Illustrating means for displaying the image as an illustration by displaying the extracted edge superimposed on the image reproduced from the binarized parameter and the parameter representing the hue;
Image arrangement arrangement means for arranging at least a part of the illustrated image in a predetermined area together with other images and characters constituting the image;
An image processing apparatus comprising output means for outputting the arranged images and characters to a printer capable of forming a multicolor image.
JP2002265798A 2002-09-11 2002-09-11 Image processing method and apparatus Expired - Fee Related JP4186558B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002265798A JP4186558B2 (en) 2002-09-11 2002-09-11 Image processing method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002265798A JP4186558B2 (en) 2002-09-11 2002-09-11 Image processing method and apparatus

Publications (2)

Publication Number Publication Date
JP2004102819A JP2004102819A (en) 2004-04-02
JP4186558B2 true JP4186558B2 (en) 2008-11-26

Family

ID=32264827

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002265798A Expired - Fee Related JP4186558B2 (en) 2002-09-11 2002-09-11 Image processing method and apparatus

Country Status (1)

Country Link
JP (1) JP4186558B2 (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4853305B2 (en) * 2007-01-26 2012-01-11 富士ゼロックス株式会社 Image processing apparatus and method
JP4775598B2 (en) * 2007-05-24 2011-09-21 富士ゼロックス株式会社 Image processing apparatus and image processing program
US8189236B2 (en) 2007-05-24 2012-05-29 Fuji Xerox Co., Ltd. Image processing apparatus, image processing method and computer-readable medium
JP4863011B2 (en) * 2007-08-24 2012-01-25 富士ゼロックス株式会社 Image processing apparatus and image processing program
JP5589660B2 (en) * 2010-08-12 2014-09-17 株式会社ニコン Image processing apparatus, imaging apparatus, and image processing program
JP6028485B2 (en) * 2012-09-19 2016-11-16 カシオ計算機株式会社 Image generating apparatus, image generating method, and program
JP6796277B2 (en) 2016-05-23 2020-12-09 大日本印刷株式会社 Image processing equipment, image processing methods, and programs
JP7325751B2 (en) 2019-09-02 2023-08-15 シヤチハタ株式会社 Stamp image processing device and stamp processing machine
US11625886B2 (en) 2020-03-30 2023-04-11 Brother Kogyo Kabushiki Kaisha Storage medium storing program, training method of machine learning model, and image generating apparatus

Also Published As

Publication number Publication date
JP2004102819A (en) 2004-04-02

Similar Documents

Publication Publication Date Title
JP4926568B2 (en) Image processing apparatus, image processing method, and image processing program
JP4772888B2 (en) Image processing apparatus, image forming apparatus, image processing method, program, and recording medium thereof
KR100374019B1 (en) Image processing method and apparatus, image processing system, and storage medium
JP4421761B2 (en) Image processing method and apparatus, and recording medium
EP0949585B1 (en) Apparatus and method for image data interpolation
US20090027732A1 (en) Image processing apparatus, image processing method, and computer program
JP4368513B2 (en) Image processing method and apparatus, and recording medium
JP2008011269A (en) Image processor, image processing method, image processing program, and storage medium
JP2010074405A (en) Image processing apparatus and method
JP4186558B2 (en) Image processing method and apparatus
US20120081725A1 (en) Image processing apparatus, image processing method, print order receiving apparatus, and print order receiving method
JP2010056827A (en) Apparatus and program for processing image
JP4379460B2 (en) Image forming system, image forming program, and recording medium
US8633943B2 (en) Image display apparatus, image display method, and program storage medium for arranging and displaying images of a plurality of tones
JP4926589B2 (en) Image composition apparatus, image composition method, and program
JP2002281306A (en) Method and apparatus for forming image, and recording medium
JP3970465B2 (en) Image output method and apparatus, and recording medium
JP2003219180A (en) Image processing method, image processing device, recording medium capable of reading computer and computer program
JP3673675B2 (en) Image processing method, image processing apparatus, and recording medium
JPH11134491A (en) Image processor and its method
KR20020084321A (en) real-time character composition method using template
JP4742642B2 (en) Image processing apparatus, printing apparatus, image processing method, and image processing program
JP2005235238A (en) Method and apparatus of image processing and storage medium
JP2009081631A (en) Image processing apparatus, method and program
JPH10143639A (en) Image processor

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20050815

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20080520

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20080722

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

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20080901

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

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20120919

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20130919

Year of fee payment: 5

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees