JP3671270B2 - Image processing device - Google Patents

Image processing device Download PDF

Info

Publication number
JP3671270B2
JP3671270B2 JP35052296A JP35052296A JP3671270B2 JP 3671270 B2 JP3671270 B2 JP 3671270B2 JP 35052296 A JP35052296 A JP 35052296A JP 35052296 A JP35052296 A JP 35052296A JP 3671270 B2 JP3671270 B2 JP 3671270B2
Authority
JP
Japan
Prior art keywords
image
processing
size
edge enhancement
coefficient
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
JP35052296A
Other languages
Japanese (ja)
Other versions
JPH10191029A (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.)
Casio Computer Co Ltd
Original Assignee
Casio Computer Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Casio Computer Co Ltd filed Critical Casio Computer Co Ltd
Priority to JP35052296A priority Critical patent/JP3671270B2/en
Publication of JPH10191029A publication Critical patent/JPH10191029A/en
Application granted granted Critical
Publication of JP3671270B2 publication Critical patent/JP3671270B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Television Signal Processing For Recording (AREA)
  • Processing Of Color Television Signals (AREA)
  • Facsimile Transmission Control (AREA)
  • Editing Of Facsimile Originals (AREA)
  • Facsimile Image Signal Circuits (AREA)
  • Image Processing (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、外部機器から入力される画像情報にエッジ強調処理を施して出力する画像処理装置に関する。
【0002】
【従来の技術】
近年、ディジタルスチルカメラが普及している。このディジタルスチルカメラは、撮影した画像データをディジタルデータとして記憶ディスク装置に格納している。その画像データは、外部の又は内蔵の表示装置に表示され、あるいはインタフェースを介して接続される印刷装置で印刷して、随時鑑賞することができる。そして、その印刷出力装置としてのプリンタの需要が高まってきている。
【0003】
プリンタは、データ用メモリ、ワーク用メモリ、印刷用メモリ等を有してカメラとの通信制御、画像処理、印刷制御などプリンタ全体を制御する制御装置を備えている。プリンタは、印刷の際にはシリアルI/F(インタフェース)を介してディジタルスチルカメラ(以下、単にカメラという)に接続される。一般に、カメラから送信される画像データはJPEGなどで圧縮されており、この圧縮画像データがそのままの形式でプリンタ側に送信される。プリンタは、その圧縮画像データをデータ用メモリに格納して画像処理と印刷処理を行う。
【0004】
図20は、そのようなプリンタによる印刷処理の動作を示すフローチャートである。同図に示すように、印刷スタートキーが入力操作されると(ステップS1)、カメラとの通信を開始し、カメラから画像データ(JPEG圧縮データ)を受信してデータ用メモリに格納する(ステップS2)。そして、その画像データに対してJPEG伸長を行う(ステップS3)。この処理では、JPEG伸長処理により生成された輝度及び色差データ(Y,Cb,Crデータ)は、ワーク用メモリ上に展開される。
【0005】
次に、その「Y、Cb、Cr」データを分光データの「R、G、B」データに変換する(ステップS4)。この変換した「R、G、B」データ(以下、RGBデータと記載)もワーク用メモリに格納される。続いて、このRGBデータに対して、画像の拡大縮小や、減法混色の三原色によるフルカラー印刷のための印刷データ「Y、M、C」への色変換処理等を行い、このように画像処理をした1画面分の画像データを印刷用メモリに格納する(ステップS5)。
【0006】
この画像の拡大縮小などの処理が終了した一画面分の画像データの印刷用メモリ上への格納が終わると、この印刷用メモリ上の一画面分の画像データ全体に対して一様にエッジ強調処理を行う(ステップS6)。そして、このエッジ強調処理の終了した画像データを印刷用メモリから読み出して印刷を行う(ステップS7)。
【0007】
図21(a),(b) は、上記の印刷処理に使用されるテーブルであり、同図(c),(d) は、それらテーブルによって指定される画像のサイズと印刷用メモリ上のアドレスを模式的に示す図である。同図(a) のテーブルは、ROM等に格納されており、拡大縮小後の画像のサイズ情報と印刷用メモリ上のアドレスを示している。同図(a) の最上行から順に示す「0、0」、「1、0」、「1、240」・・・の各行の第1要素「0」、「1」、「1」・・・は、画像の拡大縮小処理後のサイズ情報であり、同図(b) に示すように、「0」はサイズ「640×480」、「1」はサイズ「320×240」、「2」(同図(a) には図示していない)は「160×120」を夫々示している。このテーブルを参照することで、上記のサイズ情報「0」、「1」、「2」・・・から実際の画像サイズを得ることができる。
【0008】
そして、各行の第2要素「0」、「0」、「240」・・・は、画像処理において最初に書き込みが行われる印刷用メモリ上のアドレスを示している。したがって、同図(a) のテーブルの1行目の「0、0」は、サイズが「640×480」であり最初の画素のアドレスが「0」であることを示している。また、2行目の「1、0」は、サイズが「320×240」であり最初の画素のアドレスが「0」であることを示している。そして、3目の「1、240」は、サイズが「320×240」であり最初の画素のアドレスが「240」であることを示している。3行目以下も同様である。
【0009】
同図(c) は、640×480ドット構成の画面G0の画素の書き込みアドレスの印刷用メモリ上の配置を示したものであり、左上の最初の画素は、印刷用メモリ上のアドレス「0」に配置される。この画面G0は、同図(a) のテーブルの1行目のデータ「0、0」によって指定される画面構成を示している。
【0010】
この640×480ドット構成の画面G0は、左上のアドレス「0」から480個の画素が順次左下に配置される。これら480個の画素のアドレスは、それぞれ「0」、「1」、「2」、・・・、「479」である。したがって同図(c) の640×480ドット構成の画面を同図(d) に示すように4分割して320×240ドット構成の画面G1、G2、G3及びG4としたとき、左下の分割画面G2の最初の画素P1の書き込みアドレスは「240」である。この分割画面G2は、同図(a) のテーブルの3行目のデータ「1、240」によって指定される画面構成を示している。また、左上の分割画面G1は、同図(a) のテーブルの2行目のデータ「1、0」によって指定される画面構成を示している。
【0011】
同図(c),(d) のアドレス「0」の右隣の画素のアドレスは「480」であり、それから下方へ「481」、「482」、・・・、「959」まで480個の画素のアドレスが続いている。これを右方へ順次繰り返して右上のアドレスは「306720」、これから右下へアドレス「307199」まで最終の480個の画素が配置される。これによって、同図(d) の右上の分割画面G3の最初の画素P2の書き込みアドレスは「15360」であり、右下の分割画面G4の最初の画素P3の書き込みアドレスは「153840」である。上記の分割画面G3は、同図(a) のテーブルの4行目のデータ「1、15360」によって指定される画面構成を示しており、分割画面G4は、同図(a) のテーブルの5行目のデータ「1、153840」によって指定される画面構成を示している。
【0012】
【発明が解決しようとする課題】
ところで、エッジ強調処理は、前述したようにホスト機器(この場合はカメラ)からの入力画像のサイズや画像処理後の印刷画像のサイズによらず、いずれに対しても同じように行われる。しかしながら、このように一律にエッジ強調処理を行うと、一つの画像を拡大した場合と縮小した場合とでは、拡大した方の画像はボケたように見え、縮小した方の画像はシャープに見える。すなわち、上記のように、拡大、縮小、いずれの画像に対しても、同じ度合いでエッジ強調処理を行うと、拡大したものにはシャープさが足りないという不満が生じ、縮小したものにはシャープ過ぎるという問題が発生する。また、画像処理後の印刷画像のサイズが同じ大きさであっても、入力画像のサイズが異なると、同様の問題が発生する。
【0013】
本発明の課題は、入力画像のサイズや印刷画像のサイズに対応して適正なエッジ強調処理を行う画像処理装置を提供することである。
【0014】
【課題を解決するための手段】
以下に、本発明の画像処理装置の構成を述べる。
本発明の画像処理装置は、外部機器からの一画面分の入力画像のデータをエッジ強調処理して出力画像のデータを作成するためのエッジ強調度合を示すエッジ処理テーブルと、一画面内に存在する複数の画像領域毎に基準座標情報とサイズ情報を対応させた画像領域テーブルと、前記エッジ処理テーブル及び前記画像領域テーブルを格納したメモリと、該メモリから読み出した前記エッジ処理テーブルと前記画像領域テーブルとに基づいて一画面内に存在するサイズの異なる画像領域に異なるエッジ強調処理を行う画像処理部とを備えて構成される。
【0015】
例えば請求項 2 記載のように、前記画像領域テーブルは、更に前記画像領域毎の回転有無情報を含み、前記画像処理部は、前記画像領域テーブルにより選択した処理領域の画像が回転していることを認識したときは該回転画像に応じたエッジ強調処理を行うように構成される
【0016】
また、請求項 3 記載のように、前記エッジ処理テーブルには、処理を行うべく所定のメモリ領域に画像を横向き又は縦向きのいずれかで格納したときの該画像に対するエッジ強調係数が予め設定されており、前記画像処理部は、前記所定のメモリ領域内に横向き又は縦向きで格納される画像の向きが前記エッジ処理テーブルのエッジ強調係数が対応する画像の向きと異なる向きの場合には、前記エッジ強調係数の上下の値と左右の値を入れ替え、前記サイズ情報から得られるy方向のサイズとx方向のサイズとを入れ替えて用いるように構成される。
【0017】
また、請求項4記載のように、前記エッジ処理テーブルは、入力画像のサイズに一対一に対応する係数列を備え、前記画像処理部は、出力画像に応じてエッジ強調処理を行うか否かを示すエッジ強調処理可否テーブルを備えて、該エッジ強調処理可否テーブルと前記エッジ処理テーブルとにより出力画像に対しエッジ強調処理を実行または非実行とするように構成される。
【0018】
また、請求項5記載のように、前記エッジ処理テーブルは、外部機器の機種毎に対応する係数列を有して構成される。
【0019】
また、例えば請求項6記載のように、前記画像処理部は、前記外部機器から送信される画像処理用の係数データを格納するメモリ領域を更に備え、前記外部機器から送信される画像処理用の係数データが送信されてきたとき前記エッジ強調処理前の画像処理を前記送信された係数データを用いて行うと共に前記各テーブルの係数を前記送信された係数と入れ替えて処理を行うように構成される。
【0020】
また、本発明の画像処理装置は、処理対象の画像のサイズ情報、該画像を処理するべく所定のメモリ領域に格納したときの該画像の所定の向きに対応して予め設定されるエッジ強調係数及び前記所定のメモリ領域に格納される処理対象の画像の回転有無情報を格納するメモリと、該メモリに格納される回転有無情報により処理対象の画像の回転が認識されたときには、前記エッジ強調係数及び前記サイズ情報を画像の回転に応じて変換して用いることにより該回転画像に応じたエッジ強調処理を行う画像処理部とを備えて構成される。また、この画像処理装置において、前記エッジ強調係数は、前記所定のメモリ領域に画像を横向き又は縦向きのいずれかで格納したときの該画像に対するエッジ強調度合を示し、前記画像処理部は、前記所定のメモリ領域内に横向き又は縦向きで格納される画像の向きが前記エッジ強調係数が対応する画像の向きと異なる向きの場合には、前記エッジ強調係数の上下の値と左右の値を入れ替え、前記サイズ情報から得られるy方向のサイズとx方向のサイズとを入れ替えて用いるように構成される。
【0021】
【発明の実施の形態】
以下、本発明の実施の形態を図面を参照しながら説明する。
図1は、第1の実施の形態における画像処理装置の構成を示すブロック図である。同図に示す画像処理装置1は、例えばプリンタのインタフェースコントローラ部であり、印刷制御回路2は、例えばプリンタのエンジンコントローラ部である。上記の画像処理装置1には、外部のホスト機器であるディジタルカメラ(以下、単にカメラという)3がシリアルインタフェース(I/F)を介して接続される。
【0022】
画像処理装置1は、CPU4を備え、CPU4にはユーザが印刷開始を指示するための印刷スタートキー5、カメラ3から入力される画像データを格納するデータ用メモリ6、その画像データの拡大・縮小と拡大・縮小後のデータから印刷用データへの変換と変換後のデータへのエッジ強調処理等の画像処理をするために一時的に使用するワーク用メモリ7、画像処理後の一画面分の印刷画像データを格納する印刷用メモリ8、処理プログラムと係数を格納したROM9等が接続されている。印刷制御回路2は、印刷用メモリ8から読み出した印刷画像データに基づきプリンタエンジン部を制御して印刷を実行する。
【0023】
本実施の形態においては、詳しくは後述するが、カメラ3から入力される入力画像データ(以下、単に入力画像ともいう)のサイズ、および画像処理後の印刷画像データ(以下、単に印刷画像ともいう)に応じて、エッジ強調の度合(係数)を変更して画像処理を行う。
【0024】
図2(a),(b) は、本実施の形態において、外部機器として用いられるカメラ3の入力画像のサイズを示す図である。最近のディジタルカメラは、撮影時に画像のサイズ(画素数)を、例えば640×480ドット(以下、VGAサイズという)と320×240ドット(以下、QVGAサイズという)の2種類の内から選択できるようになっている。一方、プリンタの印刷画像の解像度は、同図(c) に示すように通常は一種頬である。同図(c) は、図21(c) に示した画像構成と同様の640×480ドットの解像度を示している。
【0025】
このようにプリンタの解像度が1種類であるため、プリンタでは、カメラからの入力画像を印刷する際に、プリンタの解像度に合わせるように画像サイズの変換を行っている。この場合、上記のVGAサイズとQVGAサイズの2つの撮影モードがある場合、どちらか一方の入力画像に対しては、画像サイズの変換をしなくて済むような解像度でプリンタの設計を行うのが効率的である。
【0026】
本実施の形態では説明の便宜上、カメラ3の撮影モードを図2(a) に示すVGAサイズと同図(b) に示すQVGAサイズの2種とし、プリンタの解像度を同図(c) に示す640×480ドットとする。つまり入力画像がVGAサイズのときは画像サイズの変換が不要であり、入力画像がQVGAサイズのとき画像サイズの変換が必要な構成とする。
【0027】
図3(a) は、本実施の形態において使用されるエッジ強調係数のテーブル(エッジ処理テーブル)の例を示す図であり。同図(b),(c),(d) は、そのエッジ処理テーブルの内容を説明する図である。同図(a) に示すように、エッジ処理テーブルは3つの係数「a,b,c」を1組として構成される。そして、VGAサイズの入力画像に対応するエッジ強調係数「a,b,c」として例えば「−1,−1,5」が用意され、QVGAサイズの入力画像に対応するエッジ強調係数「a,b,c」として例えば「−1/8,−1/8,3/2」が用意される。このエッジ強調係数「a,b,c」は着目画素データに対してエッジ強調の演算をする際の「重み」データであり、同図(b) に示すように、着目画素を中心にした9個の画素に対して、中心の着目画素には係数「c」、左右の画素には夫々係数「a」、そして上下の画素には夫々係数「b」が割り当てられる。斜め方向の4個の画素には常に係数「0」が割り当てられるため、同図(a) のエッジ処理テーブルへの格納は省略される。これらの係数は夫々割り当てられた位置の画素データに掛けられ、掛けた値全体を合算した値が着目画素の値とされる。
【0028】
この同図(b) の係数割り当て配置に基づいて、VGAサイズ用のエッジ強調係数「−1,−1,5」は、同図(c) のように着目画素P11を中心にして配分され、QVGAサイズ用のエッジ強調係数「−1/8,−1/8,3/2」は、同図(d) のように着目画素P12を中心にして配分される。VGAサイズ用のエッジ強調係数「−1,−1,5」は強めのエッジ強調係数であり、大型画面となるVGAサイズの画像の輪郭をボケないように強目に強調する。一方、QVGAサイズ用のエッジ強調係数「−1/8,−1/8,3/2」は、弱めのエッジ強調係数であり、小型画面となるQVGAサイズの画像の輪郭がキツ目にならないように控え目に強調する。これらのエッジ強調係数の画像サイズに対応する値は実験値に基づいて経験的に設定される。
【0029】
図4は、上記の構成において画像処理装置1のCPU4により行われる処理の動作を示すフローチャートである。この処理は、印刷スタートキー5が押されることにより開始される(ステップS10)。
【0030】
先ず、CPU4はカメラ3と通信を行い、印刷する画像データを受信し、データ用メモリ6に格納する(ステップS11)。カメラ3内部での画像データはJPEGで圧縮されたものでありプリンタ側へはそのままの形式で送信される。
【0031】
CPU4は、上記のJPEG圧縮された入力画像データを受信すると、この受信画像データのJPEG伸長後のサイズ(以下、入力画像サイズという)を求める(ステップS12)。この入力画像サイズは、JPEG圧縮された入力画像データのヘッダ部分を解析することで得ることができる。本実施の形態においては入力画像のサイズは、前述したように、VGAサイズとQVGAサイズの2種類のみである。
【0032】
次に上記の解析結果を参照し(ステップS13)、VGAサイズなら(S13がY)、CPU4の内部レジスタに「1」を格納する(ステップS14)。また、QVGAサイズなら(S13がN)、内部レジスタに「0」を格納する(ステップS15)。
【0033】
この解析処理が終わると、CPU4は、入力画像データのJPEG伸長を行い更に「Y、Cb、Cr」データを「R、G、B」データに変換する処理を行い、その結果をワーク用メモリ7に格納する(ステップS16)。
【0034】
そして、先に内部レジスタに格納した値を参照し、その値が「0」か否かを判別する(ステップS17)。この処理は、入力画像がQVGAサイズの画像であるか否(VGAサイズ)かを判別する処理である。
【0035】
この判別で内部レジスタの値が「0」すなわち入力画像がQVGAサイズのときには(S17がY)、図2(b) の画像サイズから図2(c) の画像サイズに変換する画像の拡大処理を行って(ステップS18)、「Y、M、C」データへ変換する色変換処理等を行い、この変換後の画像データ(以下、出力画像という)を印刷用メモリ8に格納する(ステップS19)。一方、内部レジスタの値が「1」すなわち入力画像がVGAサイズのときには直ちにステップS19を行う。
【0036】
このように、本実施の形態においては、ステップS13で判別した入力画像のサイズによって、画像処理を異ならせている。すなわち、入力画像がQVGAサイズのときのみ、サイズ変換のための拡大処理を行っている。ところで、このような画像の拡大処理は拡大後の画像のボケを発生させる。このボケを除去するために、図3(c) に示したようなエッジ強調係数を用いて強めのエッジ強調処理を行う。但し、拡大処理を行っていない画像に対して上記と同じエッジ強調処理をしてしまうと、ザラついた印象の画像になってしまうから、入力画像サイズによってエッジ強調係数を変えるようにしている。
【0037】
すなわち、本実施例では、上記処理に続いて再び内部レジスタに格納されている値を参照し、その値が「0」か否かを、つまり入力画像がQVGAサイズ画像であるか否かを判別する(ステップS20)。そして、内部レジスタの値が「0」すなわち入力画像が小さなQVGAサイズの画像であった場合には(S20がY)、この画像は拡大処理がなされているので、図3(c) の強めのエッジ強調係数をROM9から読みだして(ステップS21)、この読み出した強めのエッジ強調係数を用いて、印刷用メモリ8上の1画面の画像全面に対して一様にエッジ強調処理を行う(ステップS23)。このエッジ強調処理が終わると、印刷制御回路2が印刷用メモリ8から上記の処理済みの印刷画像データを読み出して印刷を行う(ステップS24)。
【0038】
一方、ステップS20の判別で、内部レジスタの値が「1」の場合は(S20がN)、この入力画像はVGAサイズであって、そのままのサイズが維持されている。したがって、この場合は図3(d) の弱めのエッジ強調係数をROM9から読み出して(ステップS22)、ステップS23、S24の処理を行う。
【0039】
このように、本実施の形態においては、入力画像サイズと画像処理後の印刷画像サイズとの関係に対応する複数のエッジ強調係数を予めエッジ処理テーブルとして設定しておき、拡大処理した画像と拡大処理を行っていない画像とを弁別し、この拡大又は非拡大の画像に応じたエッジ強調係数を用いてエッジ強調処理に強弱の差をもたせ、これによって、画像の拡大又は非拡大に拘らず適正なエッジ強調処理のなされた良質の印刷画像を得るようにしている。
【0040】
尚、上述の第1の実施の形態では、画像処理後の印刷画像のサイズをVGAサイズのみとして説明しているが、一般に、ディジタルカメラ用のプリンタでは、同一画像を複数並べたパターンを印字するミニラベル印刷機能を持っている場合が多い。
【0041】
図5(a),(b) は、そのようなミニラベル印刷の印刷画面の例を示す図であり、同図(a) はQVGAサイズの同一画像が4枚の場合、同図(b) は160×120サイズの同一画像が16枚の場合を示している。同図(a) に示す同一画像が4枚の場合は、VGAサイズの入力画像を縮小してQVGAサイズにする。或は、QVGAサイズの入力画像をサイズ変換しないでそのまま用いる。このようなときは、入力画像サイズと画像処理後の印刷画像サイズによって、エッジ強調度合を変えればよい。勿論、一画面内の個々の画像が小さくなることに応じて、そのような画像に合わせたエッジ強調係数を用いるようにする。
【0042】
図6は、そのようなミニラベル印刷の場合にも対応できるエッジ強調係数のテーブルである。この図6に示すエッジ処理テーブル10には、入力画像をVGAサイズとQVGAサイズの2種類とし、画像処理後の出力画像をVGAサイズ、QVGAサイズ、及び160×120サイズの3種類として、「2種類」×「3種類」、合計「6種類」の組み合わせ(入力画像サイズと出力画像サイズの組み合わせ)に対応する6組の係数列が格納されている。
【0043】
これら係数列の内、入力画像のサイズと出力画像のサイズが同一の場合の係数列11及び係数列15は、夫々図3(a) に示したQVGA用の係数列と同一であり、入力画像を拡大して出力画像をVGAサイズとする場合の係数列14は、図3(a) のVGA用の係数列と同一である。また、入力画像のサイズに対して出力画像サイズを縦横1/2(面積で1/4)に縮小する場合の係数列12及び係数列16は夫々上記とは異なる共通の係数列を用いている。そして、入力画像VGA用の出力画像サイズ160×120に対応する係数列13は「0、0、1」となっており、結果としてエッジ強調処理が行わなれない係数である。これは、図5(b) に示すように、サイズ160×120の画像は極めて小さいのでエッジの強調を行わなくても見た目には輪郭が充分明瞭に見えるからである。このように、入力画像と出力画像のサイズによって細かく複数の係数列を設定して処理を行うようにすると、ミニラベル印刷の場合にも対応できる。
【0044】
図7及び図8(a),(b) は、上記のエッジ処理テーブルを用いて動作するミニラベル印刷の場合にも対応できるエッジ強調処理のフローチャートである。先ず、図7に示すメインフローチャートの処理において、ステップS30〜S37の処理は、図4に示した処理のステップS10〜S17の処理と同一である。この処理の例では、ステップS37より後の処理が図4の場合と異なる。
【0045】
すなわち、ステップS37で、先に内部レジスタに格納した値が「0」すなわち入力画像がQVGAサイズのときには(S37がY)、詳しくは後述するQVGAサイズ処理を行い(ステップS38)、一方、内部レジスタの値が「1」すなわち入力画像がVGAサイズのときには(S37がN)、これも詳しくは後述するVGAサイズ処理を行う(ステップS39)。そして、それらQVGAサイズ処理又はVGAサイズ処理いずれかの処理の後、「Y、M、C」データへ変換する色変換処理等を行い、この変換後の画像データ(出力画像)を印刷用メモリ8に格納し(ステップS40)、この後、エッジ強調処理を行う(ステップS41)。
【0046】
このエッジ強調処理では、上記QVGAサイズ処理又はVGAサイズ処理で拡大又は縮小の処理と共に、ROM9のエッジ処理テーブルから読み出されたエッジ強調係数が用いられる。このQVGAサイズ処理及びVGAサイズ処理を、図8(a),(b) のサブフローチャートを用いて説明する。
【0047】
図8(a) に示すQVGAサイズ処理において、先ず画像処理後の出力画像サイズにVGAサイズが指定されているか否かを判別する(ステップS38−1)。そして、出力画像サイズにVGAサイズが指定されていれば(S38−1がY)、入力画像がQVGAサイズであるので、320×240ドットの画像データを640×430ドットに拡大する画像拡大処理を行い(ステップS38−2)、この入力画像のサイズと出力画像のサイズに対応する係数「−1,−1,5」をROM9から読み出して(ステップS38−3)、メインフローチャートの処理に戻る。
【0048】
また、上記ステップS38−1の判別で、出力画像サイズがVGAサイズでない場合は(S38−1がN)、続いて更に、出力画像サイズにQVGAサイズが指定されているか否かを判別する(ステップS38−4)。そして、出力画像サイズにQVGAサイズが指定されていれば(S38−4がY)、入力画像がQVGAサイズであるので、この場合は入出力画像が同一サイズであり、したがって画像拡大・縮小等は行わず直ちに入出力画像が同一サイズの場合の係数「−1/8、−1/8、3/2」をROM9から読み出して(ステップS38−3)、メインフローチャートの処理に戻る。
【0049】
また、出力画像サイズが、上記ステップS38−1の判別でVGAサイズでなく上記ステップS38−4の判別でQVGAサイズでもない場合は(S38−4がN)、出力画像サイズに160×120のサイズが指定されているのであり、この場合は、320×240のQVGAサイズの入力画像を、160×120の16枚物の出力画像に縮小する画像縮小処理を行った後(ステップS38−6)、この縮小処理に対応する係数「−1/16、−1/16、5/4」をROM9から読み出して(ステップS38−3)、メインフローチャートの処理に復帰する。
【0050】
次に、図8(b) に示すVGAサイズ処理において、この場合も先ず画像処理後の出力画像サイズにVGAサイズが指定されているか否かを判別する(ステップS39−1)。そして、出力画像サイズにVGAサイズが指定されていれば(S39−1がY)、入力画像がVGAサイズであるので、この場合は入出力画像が同一サイズであり、したがって画像拡大・縮小等は行わず直ちに入出力画像が同一サイズの場合の係数「−1/8、−1/8、3/2」をROM9から読み出して(ステップS39−2)、メインフローチャートの処理に戻る。
【0051】
また、上記ステップS38−1の判別で、出力画像サイズがVGAサイズでない場合は(S39−1がN)、続いて、出力画像サイズにQVGAサイズが指定されているか否かを判別し(ステップS39−3)、QVGAサイズが指定されていれば(S39−3がY)、入力画像がVGAサイズであるので、この640×430ドットの画像データをQVGAサイズの320×240ドットに縮小する画像縮小処理を行い(ステップS39−4)、この入力画像のサイズと出力画像のサイズに対応する係数「−1/16,−1/16,5/4」をROM9から読み出して(ステップS39−5)、メインフローチャートの処理に戻る。
【0052】
また、出力画像サイズが、上記ステップS39−1の判別でVGAサイズでなく上記ステップS39−3の判別でQVGAサイズでもない場合は(S39−3がN)、出力画像サイズには160×120のサイズが指定されている。この場合は、640×480のVGAサイズの入力画像を、160×120の16枚物の出力画像に縮小する画像縮小処理を行った後(ステップS39−6)、この処理に対応する係数「0、0、1」をROM9から読み出して(ステップS39−7)、メインフローチャートの処理に戻る。
【0053】
このように、入力画像のサイズと出力画像のサイズとに応じて夫々にエッジ強調係数を異ならせてエッジ強調処理を行うので、図2(a),(b) の入力画像を同図(c) の出力画像にする場合は勿論、更に、図5(a),(b) に示すミニラベル印刷用の画像にも適切なエッジ強調処理を施して出力することができる。
【0054】
尚、上述の処理では、合計6種類の組み合わせに対応して処理を行っているが、入力画像のサイズが3種類以上の場合は、図7のメインフローチャートのステップS37からの分岐をサイズの種類に合わせて3つ以上に増やせばよく、出力画像の種類が4種類以上の場合は、図8の各サブフローチャートにおいて、サイズの種類に合わせて判別処理を増加させていけばよい。
【0055】
また、入力画像サイズと出力画像サイズに応じてエッジ強調係数を変更しているが、これに限ることなく、入力画像サイズに対する出力画像サイズの拡大(縮小)率を求めて、その値によりエッジ強調係数を変えるように構成してもよい。また、拡大又は縮小処理後にエッジ強調処理をしているが、これに限ることなく、拡大又は縮小前に、例えば、Y(輝度)信号に、エッジ強調処理を行うようにしてもよい。
【0056】
ところで、上述した第1の実施の形態では、印刷用メモリ8上に存在する一画面分の画像は、入力画像のサイズは2種類のサイズの内のいずれか1つであり、画像処理後の出力画像のサイズも複数種類のサイズの内のいずれか1つである。したがって、それらの入力画像と出力画像との組み合わせに応じて選択された係数「a、b、c」によって、印刷用メモリ8上の一画面分の画像全面に一様にエッジ強調処理を行っている。しかし、印刷画面には必ずしも同一サイズの画像のみが印刷されるとは限らず、サイズの異なる画像が一画面に混在する形式の画面が印刷される場合も考えられる。このようなとき、一画面の画像全体に一様なエッジ強調処理を行うと問題があることは前述した。しかし、このような場合にも本発明は対処できるようになっている。以下。これを第2の実施の形態として説明する。
図9(a) は、第2の実施の形態において処理される出力画像の例を示す図であり、同図(b) は、同図(a) の画面構成の各画像が、印刷用メモリ8上に書き込まれる際の画像領域番号とアドレスとの関係を模式的に示す図であり、同図(c) は、それら画像領域番号とその画像領域に書き込まれる各画像のサイズ情報及び書き込み開始アドレスを示すテーブル(画像領域テーブル)である。
【0057】
上記の図9(b) に示す一画面分の画面領域全体のアドレス構成は、図21(c) で説明した画素配分のアドレス構成と同一である。また、図9(c) のテーブルに上記の画像領域番号に夫々対応して示される各画像のサイズ情報と書込み開始アドレスは、図21(a) で説明したサイズ情報及び書込み開始アドレスと同一である。
【0058】
本実施の形態においては、指定された例えば図9(a) の出力画像に対して同図(b) 、(c) に示すテーブルを用いて画像領域毎にエッジ強調処理を行いながら出力画像を印刷用メモリ8上に展開する。
【0059】
図10は、そのような第2の実施の形態における異なるサイズの画像が一画面に混在する出力画像の処理のフローチャートである。尚、この処理では、CPU内蔵の画像領域カウンタi及びアドレスレジスタadr(以下、単にアドレスadrと記載する)が使用される。
【0060】
同図のフローチャートに示すように、先ず画像領域カウンタiを「0」に初期設定する(ステップS50)。これにより、図9(a) に示す一画面分の各画像において、同図(b) に示す画像領域番号の「0」番から昇順に順次画像処理を進めていく準備がなされる。
【0061】
続いて、画像領域番号iに対応するサイズ情報と書き込みアドレスをROM9から読み出す(ステップS51)。この処理は、図9(c) のテーブルからサイズ情報と書込み開始アドレスを読み出す処理であり、最初は画像領域番号が「0」であるので、この「0」番に対応するサイズ情報とアドレス「1、0」が読み出される。
【0062】
上記に続き、その読み出した書き込みアドレス(この場合は「0」)をアドレスadrに設定する(ステップS52)。これにより、処理すべき画像領域の基準座標が設定される。
【0063】
次に、上記のサイズ情報に基づいて実際のサイズを読み出す(ステップS53)。この処理は、上記ステップS51で読み出したサイズ情報とアドレス(この場合は「1、0」)の中のサイズ情報(この場合は「1」)に基づいて、図21(b) に示したようなサイズ情報と実際のサイズとが対応するテーブルから、実際のサイズを読み出す処理である。図21(b) に示すように、サイズ情報「1」が示す実際のサイズは320×240であり、これは図9(a),(b) に示すように、全体の1/4の大きさの画像領域「0」番のサイズである。ここで表現を変えて再度説明すれば、上記のサイズ320×240は、図9(b) においてx方向のドット数が320個、y方向のドット数が240個の範囲の大きさであることを示している。
【0064】
上記に続いて、エッジ強調係数を読み出す(ステップS54)。このエッジ強調係数の読み出しに用いられるテーブルは、図6に示したテーブルであり、入力画像のサイズと上記サイズ情報から得られた出力画像のサイズとに基づいて得られる。
【0065】
以下、この読み出したエッジ強調係数に基づいて、エッジ強調処理を順次行う。すなわち、先ずアドレスadrの示すドット(画素データ)のエッジ強調処理を行う(ステップS55)。これにより、先ず基準位置となる書込み開始位置のドットからエッジ強調処理が開始される。
【0066】
続いて、yドット分(この場合は240ドット分)のエッジ強調処理が終了しているか否かを判別し(ステップS56)、まだ終了していなければ(S56がN)、アドレスadrを「1」インクリメントして(ステップS59)、上記ステップS55、S56を繰り返す。これにより、エッジ強調処理がy方向に進行する。
【0067】
そして、上記ステップS56で、yドット分のエッジ強調処理が終了したことを確認したときは(S56がY)、次に、上記yドット分のエッジ強調処理がx回行われたか、すなわち縦240ドット×横320ドット分のエッジ強調処理が終了したか否かを判別する(ステップS57)。そして、まだx回のエッジ強調処理が終了していないときは(S57がN)、アドレスadrの値を式「adr=adr+480−(y−1)」によって演算してジャンプする(ステップS60)。この処理は、y方向の処理が終了しているので次の(隣接する)y方向の処理を行うべく、そのy方向の最初のドットのアドレスを指定する(算出する)処理である。すなわち、いま終了したアドレスに全一画面の縦方向のドット数「480」を加算すると、その終了したアドレスの隣のアドレスになる。これから更にいま処理中のサイズの縦方向のドット数yよりも「1」少ないドット数を減算すると、アドレスが上に移動して丁度、直前のy方向の処理開始アドレスのx方向へ隣接するアドレス(次の処理開始アドレス)となる。
【0068】
例えば、上記画像領域「0」番の最初のy方向の処理終了アドレスは「239」である。したがって、上記の式は「adr=239+480−(240−1)」となり、ジャンプすべき新たなアドレスadrは「480」となり、これは最初の処理開始アドレス「0」のx方向に隣接するアドレスである。
【0069】
このアドレスジャンプ処理の後、再び上記ステップS55〜S59を繰り返し、そのy方向が終了すれば上記ステップS57、S60によりアドレスをジャンプするということを繰り返す。これにより、1つの画像領域内の全ドットに対するエッジ強調処理が進行する。そして、ステップS57で、yドット分のエッジ強調処理がx回行われたことが確認されると、全ての画像領域(この例では「0」番から「9」番まで)についてエッジ強調処理が終了しているか否かを判別し(ステップS58)、未だであれば(S58がN)、画像領域カウンタiを「1」インクリメントする(ステップS61)。これにより、次の画像領域がエッジ強調処理の処理対象として指定される。
【0070】
このように、次の画像領域が指定されたときは、ステップS51に戻って、上述したステップS51〜S61の処理を繰り返す。そして、ステップS58で全ての画像領域についてエッジ強調処理が終了したことを確認して(S58がY)、処理を終了する。
【0071】
このように、画像の拡大・縮小などの画像処理をした後にエッジ強調処理を行う場合に、画像処理後の異なるサイズの出力画像が一画面分のメモリ上に混在しているときでも、各画像領域毎に処理領域を選択して、画像サイズに適したエッジ強調処理を行うことができる。
【0072】
尚、上述の第2の実施の形態においては、すべての画像を印刷用メモリ8に展開した後にエッジ強調処理を行っているが、例えば、画像領域番号0の画像データを印刷メモリ8上に置いたら、すぐにそれについてのエッジ強調処理を行うというようにして、色変換処理等の画像処理とエッジ強調処理を交互に繰り返すようにしてもよい。
【0073】
ところで、上記第1及び第2の実施の形態においては、すべての画像が横向きであるが。画像が90度回転した状態で出力指定される場合もある。このような場合でも、エッジ強調係数が、図3(c),(d) に示したように上下左右の隣接ドットに対して同一である場合は、単に画像領域のサイズデータ(x,y)のxとyの値を入れ替えるだけで処理すればよい。ところが、エッジ強調係数が上下左右の隣接ドットに対して異なる場合がある。
【0074】
図11(a),(b) は、夫々画像が互いに回転した状態を示す図である。以下同図(a) を横向きの画像、同図(b) を縦向きの画像という。同図(a) から見ると同図(b) は90度回転している。このとき、同図(a) の画像のエッジ強調係数が、同図(c) に示すように着目ドットの左右に隣接するドットのみに係数「−2」の重みが付けられ、上下に隣接するドットには係数「0」で重み付けがなされない画像であるとすると、同図(a) の画像が同図(b) に示すように90度回転したとき、同図(b) の画像を同図(a) と同様に表現しようとすると、そのエッジ強調処理係数も、同図(d) に示すように90度回転した配置で各ドットに割り当てられていなければならない。通常では、この処理は面倒である。
【0075】
本発明は、このような場合でも容易に適切なエッジ強調処理を行うことができる。以下、これについて第3の実施の形態として説明する。
図12(a) は、第3の実施の形態における処理画像(回転画像21)のサイズ及び書き込みアドレスを示す図であり、同図(b) は、色変換処理等の画像処理後の出力画像の領域番号、サイズ、印刷用メモリヘの書き込みアドレス、及び回転の有無を示すテーブル(回転データテーブル)であり、同図(c) は、着目ドットの上下及び左右のエッジ強調係数が異なる場合のエッジ処理テーブルの例を示している。
【0076】
同図(a) の書き込みアドレス(書き込み開始のアドレス)は、いままでのように左上隅ではなく左下隅を指定される。また、x方向の320ドットが縦方向になり、y方向の240ドットが横方向になっている。これは画像が回転していることを受けて、この画像データが印刷用メモリ8ヘ書き込される際に左下隅が最初に書き込まれるためである。
【0077】
また、同図(b) の回転データテーブルは、第1及び第2の実施の形態で示した画像領域テーブルに、回転の有無(0:回転無し、1:回転有り)を示す第3の要素が加わったものであり、同図(a) の回転画像を処理するためのテーブルである。画像領域番号は「0」、サイズ情報は「1」(320×240ドット)、アドレスは「96400」(回転画像の左下隅のアドレス)、及び回転の有無は「1」(回転有り)を示している。
【0078】
また、同図(c) のエッジ処理テーブルは回転前の横向き画像のエッジ強調係数をそのまま格納している。すなわち、各係数列の3つの要素は左から右へ夫々回転前の画像(横向き画像)の着目ドットの左右用の係数a、着目ドットの上下用の係数b、着目ドット自身用の係数cを示している。
【0079】
図13は、そのようなエッジ強調テーブルと上記の回転データテーブルとを用いて着目ドットの上下及び左右のエッジ強調係数が異なる回転画像のエッジ強調処理の手順を説明するフローチャートである。同フローチャートのステップS70〜S74は、図10に示したフローチャートのステップS50〜S54と同様の処理であり、この間やや図10の場合と異なるのは、ステップS71では画像領域カウンタiの指示する画像領域番号に対応するデータが図12(b) に示す回転データテーブルから読み出されることである。
【0080】
回転データテーブルには、図10の場合と異なり、上述したようにサイズ情報と書き込みアドレスの他に回転の有無情報も含まれている。この回転有無情報が、上記ステップS70〜S74に続く処理で参照され、回転の有無に応じて処理が行われる。
【0081】
すなわち、上記の回転有無情報を取り出し(ステップS75)、続いて、その回転情報が回転有りを示す「1」であるか否かを判別する(ステップS75)。そして、回転有無情報が回転有りを示す「1」であれば(S75がY)、この場合は、先ず、アドレスadrからサイズx分をを引く(ステップS77)。これにより、図12(a) に示す回転画像の左下の書き込みアドレス「96400」が「96400−320=96080」に変更されて画像の左上隅に移動する。
【0082】
次に、サイズxとサイズyを入れ替える(ステップS78)。これにより、図12(a) に示す回転画像21のサイズ240がサイズxとなり、サイズ320がサイズyに変更され、回転状態のまま画像の全ドットの座標が図12(a) の印刷画面のx,y座標で表現される。
【0083】
上記に続いてエッジ強調係数のaとbを入れ替える(ステップS79)。これにより、図12(c) のエッジ処理テーブルのサイズ情報「0」に対応して読み出されたエッジ強調係数「−2,0,5」のa及びbが入れ代わり、エッジ強調係数「0,−2,5」に変換される。すなわち、図11(a) の横向き画像に対する同図(c) のエッジ強調係数が、同図(b) の回転画像(縦向き画像)に対する同図(d) のエッジ強調係数に変換される。
【0084】
このように、サイズxとサイズyを入れ替え、上下と左右のエッジ強調係数を入れ替えた後、ステップS80以下の処理を行う。尚、ステップS76の判別で回転情報が回転無しを示す「0」であれば(S75がN)、この場合は直ちにステップS80以下の処理に移行する。
【0085】
ステップS80〜S86の各処理は、図10のステップS55〜S61の各処理と夫々同一である。但し、回転有りの場合は、x、yが入れ代わっているので、図10ではy方向へ240ドット分の処理をx方向へ320回繰り返していた処理が、図13ではy方向へ320ドット分の処理をx方向へ240回繰り返えすことになるだけである。また、回転無しの場合は、図10の場合の処理と同様である。
【0086】
このように、画像が回転している場合は、サイズx,yの入れ替えを行っているので、回転の無い場合と同様にyドット分の処理をx回行えばよいことになり、回転の有無に拘らず処理手順を統一的に扱うことができる。また、処理手順の僅かの増加のみで、画像の回転に応じた最適なエッジ強調処理ができるようになる。
【0087】
尚、ROM9に格納するエッジ処理テーブルの係数の設定値を、画像を横向きにおいたときにそのまま使用できる値を設定しているが、この初期設定値を縦向き画像用に設定しておき、画像が縦向きのときは係数をそのまま使用し、画像が横向きのとき係数a及びbの入れ替えを行って使用するようにしてもよい。
【0088】
ところで、上述の第1〜第3の実施の形態では、出力画像のサイズの種類が増加するに伴い、エッジ強調係数用のエッジ処理テーブルの容量が増加する。さらに、それぞれのサイズに対する最適なエッジ強調係数を決めるための設定作業も、この作業が試行錯誤的な実験によってなされるものであるため、多大な労力を要してしまう。このような場合に備えて本発明は更なる手順を用意している。これについて第4の実施の形態として以下に説明する。
【0089】
この第4の実施の形態においては、1種類の入力画像サイズに対してエッジ強調係数を1種類のみ設定し、この設定した1種類のエッジ強調係数によってエッジ強調処理を行うか否かを制御するようにする。経験的に見ると、このように1つのエッジ強調係数で、エッジ強調処理を行うか否かで画像処理を制御しても、出力画像のサイズが入力画像のサイズよりも小さい場合には、画像品質に大きな問題はないことが多い。したがって、このように画像処理を制御することによりエッジ強調係数が1種類のみである場合に発生する先行技術の項で述べたような問題を解消することができる。
【0090】
図14は、参考のため出力画像の各サイズの例を示す図であり、説明の便宜上、8種類のみを示している。図は上にサイズ680×480、サイズ480×360、及びサイズ384×248を示し、下にサイズ320×240、サイズ256×192、サイズ240×180、サイズ213×160、及びサイズ160×120を示している。いずれも同一の縮尺である。尚、入力画像サイズについては簡単のためVGAサイズのみとして以下説明する。
【0091】
図15(a) は、夫々異なるサイズの画像配置の例を示す図であり、同図(b) はその画像配置に対応する画像領域テーブルの例を示す図であり、同図(c) は、サイズ情報に対応する実際のサイズを示すサイズテーブルである。同図(b) の画像領域テーブル上段の、画像領域番号「0」は同図(a) に示す印刷画面の出力画像22の画像領域番号であり、これに対応するサイズ情報及び書き込みアドレス「3、11618」のサイズ情報「3」は出力画像22のサイズ情報であり、書き込みアドレス「11618」は出力画像22の左上隅23のアドレスである。出力画像22の実サイズは同図(c) のサイズテーブルのデータ欄24から320×240ドットであることが読み出されるようになっている。他の出力画像25及び26についても同様であり、出力画像25は、画像領域番号が「1」、左上隅27の書き出しアドレスは「187698」、そして、サイズ情報「7」に対応する実サイズは同図(c) のデータ欄28から160×120ドットである。また、出力画像26は、画像領域番号が「2」、左上隅29の書き出しアドレスは「184594」、そして、サイズ情報「5」に対応する実サイズは同図(c) のデータ欄31から240×180ドットである。
【0092】
図16は、VGAサイズの入力画像に対して画像処理されて上記のように出力される出力画像の各種サイズに対し、エッジ強調処理の可否を決定するためのテーブルである。同図に示すように、このエッジ強調処理可否テーブルは、サイズ情報とテーブル値からなり、サイズ情報は図15(c) に示すサイズテーブルのサイズ情報に対応しており、この各サイズ情報に「1」又は「0」の2種類のテーブル値のいずれかが夫々対応している。テーブル値「1」はエッジ強調処理の「可」を示し、テーブル値の「0」はエッジ強調処理の「否」を示している。
【0093】
この図16の例ではサイズ情報「0」〜「4」までにテーブル値「1」が対応しており、これは実サイズ640×480〜実サイズ256×192の出力画像にエッジ強調処理を行うことを示している。また、サイズ情報「5」〜「7」にテーブル値「0」が対応しており、これは実サイズ240×180〜実サイズ160×120の出力画像にはエッジ強調処理を行わないことを示している。
【0094】
図17は、上記の各テーブルを用いて出力画像のサイズに応じてエッジ強調処理を選択的に行う処理のフローチャートである。同図のフローチャートにおいて、ステップS100〜ステップS102の処理は図10に示したフローチャートのステップS50〜S52の処理と同一である。但しこの場合は、ステップS101で読み出される画像領域テーブルは図15(b) に示した画像領域テーブルである。
【0095】
上記の処理に続いて、画像領域テーブルから読み出したサイズ情報に基づいてエッジ強調制御用ROMテーブル、すなわちROM9に格納されている図16に示すエッジ強調処理可否テーブルを読み出す(ステップS103)。そして、エッジ強調処理を行うか否かを判別する(ステップS104)。処理開始の初めは画像領域番号「0」の画像22であり、したがって、図15(b) の例ではサイズ情報が「3」、これに対応するエッジ強調処理可否テーブルのテーブル値は図16の例では「1」である。
【0096】
このように、エッジ強調処理可否テーブルのテーブル値がエッジ強調処理を指示する「1」であるときは(S104がY)、サイズ情報から実際のサイズを読み出す(ステップS105)。これにより、図15(c) のサイズテーブルの例では上記のサイズ情報「3」に対応する実サイズ「320×240」が読み出される。
【0097】
続いて、アドレスadrで示されるドットのエッジ強調処理を行う(ステップS106)。以下ステップS106からステップS112までの処理は、図10のステップS55〜S61の処理と同一である。但し処理に用いられるエッジ強調係数がVGAサイズの入力画像に対応する値の固定した(つまり1種類の)エッジ強調係数である点が、他の実施の形態の場合と異なる。このように、出力画像のサイズが比較的大きいものにはエッジ強調処理を行うことが指示されて、エッジ強調処理が実行される。
【0098】
また、続く画像領域番号「1」の画像25の処理では、上記のステップS103で読み出されたエッジ強調処理可否テーブルのサイズ情報「7」に対応するテーブル値は「0」であるので、ステップS104の判別は「N」であり、この場合は直ちにステップS109の処理に移行する。これにより、出力画像のサイズが比較的小さいものにはエッジ強調処理を行わないことが指示されて、エッジ強調処理が無視される
なお、上記の実施の形態では入力画像サイズをVGAサイズのみとし、これに対応して出力画像のエッジ強調係数を1種類に固定しているが、これに限ることなく、複数サイズの入力画像に対応して入力画像サイズ毎のエッジ強調係数のテーブルを用意しておき、出力画像のサイズを読み出した後に、そのサイズに対応するエッジ強調処理の可否を調べて、エッジ強調係数を設定するようにしてもよい。
【0099】
ところで、上述したようにディジタルカメラ用のプリンタは、カメラと直接接続して画像信号の受信を行いながら印刷を実行する。ところが、プリンタに接続されるカメラには複数の機種が存在する。そして、それぞれの機種毎にカメラ内部の画像処理等が異なるのが普通であり、機種によって一様ではない。例えば、YCbCr信号からRGB信号に変換する式が特殊であったり、或る種のカメラのみに特有なノイズが画像に重畳したり、または、カメラによっては画像のボケるものがあったりする。
【0100】
画像がボケるものについては上述してきた出力画像のサイズに応じて使い分けるエッジ強調処理とは別な対応が必要であり、その他の不具合については、JPEG伸長から印刷用メモリヘ書き込むまでの画像処理で修正する必要がある。すなわち、接続されたカメラの種類に応じて、YCbCr信号からRGB信号への変換の式を使い分け、ノイズ除去のためのフィルタリングを行い、エッジ強調係数を変更するいうことが必要になる。本発明は、このような場合にも対応できる用意がなされている。以下これについて第5の実施の形態として説明する。
【0101】
図18(a) は、本実施の形態においてプリンタに接続されるカメラの機種に対応するフィルタ用テーブルであり、同図(a) に示す例では、カメラA、カメラB、カメラCの3機種を想定している。フィルタ用テーブルはROM9に予め格納されており、カメラ毎にフィルタリングするか否かのデータが設定される。この例では「1」がフィルタリングをすることを示し、「0」がフィルタリングをしないことを示している。
【0102】
なお、説明の便宜上、これらのカメラは全てVGAサイズのみの撮影が可能、すなわちプリンタへの入力画像のサイズはVGAサイズのみとする。また、カメラAの出力にはノイズがあり、このカメラAの画像のみY(輝度)信号へのノイズ除去のためにフィルタリングが必要であるとする。また、カメラBには画像がボケやすい特性があるとする。そして、各カメラA、B、Cに対して理想的なYCbCr信号からRGB信号への変換式は、
カメラA,Cについては、
R=Y+1.402*Cr
G=Y−0.344*Cb−0.714*Cr
B=Y+1.772*Cb ・・・(1)
カメラBについては、
R=Y+Cr
G=Y−0.508*Cr−0.1864*Cb
B=Y+Cb ・・・(2)
であるとする。
【0103】
また、同図(b) は、各カメラA、B、C毎のエッジ強調係数を示すテーブルである。同図のテーブルに示すエッジ強調係数の各要素は、左から順に、図3(b) に示したドットa,b,c用である。これらの係数は、カメラAはローパスフィルタ処理を行う必要があるので少し強めの係数とし、カメラBは受信した画像がボケる傾向にあるので更に強めの係数とし、カメラCはプリンタにとってほとんど不具合のない特性であるので余りエッジ強調しない係数として設定されている。なお、この例では、これも説明の便宜上、プリンタの出力画像のサイズもVGAサイズのみとする。つまり、拡大縮小処理が必要ないものとする。
【0104】
図19は、上記のように設定される各種データに基づいて、第5の実施の形態において、カメラの機種毎に対応して選択的に行われる処理のフローチャートである。同図のフローチャートに示すように、印刷スタートキー5が入力操作されると(ステップS120)、画像処理装置1のCPU4は、接続されているカメラ3との通信を開始し(ステップS121)、先ず、プロダクトコードを要求するコマンドをカメラ3に送信する(ステップS122)。これにより、カメラ3からプロダクトコードがプリタンに送信され、プリンタはこれを受信して、これを例えばCPU4内蔵のレジスタ等に保管する(ステップS123)。プロダクトコードは、カメラの機種毎に持っている固有の値であり、このプロダクトコードによりCPU4は接続されているカメラ3の機種を認識できる。
【0105】
続いてカメラ3から、印刷する画像データを受信する(ステップS124)。画像データを受信すると、CPU4は、先ずその受信データの伸長を行い、ワーク用メモリ7に格納する(ステップS125)。そして、上記取得しているプロダクトコードを参照して、カメラ3がフィルタリングが必要である機種(この例ではカメラA)であるか否かを判別する(ステップS126)。そして、カメラ3の機種がカメラAであれば、上記伸長により生成したY(輝度)信号に対して、ノイズ除去のフィルタリングを行う(ステップS127)。この処理には、ローパスフィルタが用いられる。また、このフィルタリングを行う場合は、ワーク用メモリ7上で行い、結果をフィルタリング前のデータに上書きで格納する。
【0106】
次に、再び、すでに取得しているプロダクトコードを参照し、カメラ3の機種がカメラBであるか否かを判別する(ステップS128)。なお、上記ステップS126で、カメラ3の機種がカメラAでないときは(S126がN)、直ちにこのステップS128の処理に移行する。
【0107】
そして、カメラBであれば(S128がY)、前述の式(2)を用いてYCbCr信号をRGB信号に変換する(ステップS129)。また、機種がカメラBでなければ(S128がN)、前述の式(1)を用いてYCbCr信号をRGB信号に変換する(ステップS130)。これにより、接続しているカメラの特性に合った適正な「YCbCr→RGB」変換が実行される。なお、このRGB信号(データ)もワーク用メモリ7に格納される。
【0108】
上記処理に続いて色変換処理を行って、このデータを印刷用メモリ8に格納する(ステップS131)。そして、この印刷用メモリ8の全画像データ(一画面分の画像データ)に対してエッジ強調処理を行う(ステップS132)。このエッジ強調処理に用いられるエッジ強調係数は、図18(b) のカメラA、B、C毎のエッジ強調係数を示すテーブルから読み出される。そして、上記のエッジ強調処理が終わって、印刷を実行する(ステップS133)。
【0109】
尚、上記第5の実施の形態では、接続されているカメラの機種により変更される処理は、Y(輝度)信号へのフィルタリングと、YCbCr→RGB変換式、エッジ強調処理であるが、CbCr信号へのフィルタリングや色変換処理についても同様にプロダクトコードで機種を分別して行うようにしてもよい。
【0110】
また、カメラの機種毎に分岐して行う処理の中で、第1〜第4の実施の形態で述べた出力画像のサイズに対応する処理を行うようにすれば、エッジ強調処理ををさらに最適に行うことができる。
【0111】
また、既に登録されているカメラ以外のカメラが接続された場合には、新機種であると判断して、カメラ側から画像処理テーブルのデータを例えばプリンタ側に用意されているEPROM等に送って書き込むようにし、プリンタ側でこのデータを用いて上述の処理を行うようにするとよい。
【0112】
また、プロダクトコードによって処理を変更するのではなく、入力画像の圧縮形式によって処理を変更するようにしてもよい。圧縮データのヘッダには、それぞれの圧縮形式による識別コードが含まれているから、その識別コードによって処理を変更するようにするとよい。
【0113】
【発明の効果】
以上詳細に説明したように、本発明によれば、一画面内の複数の画像領域毎に選択的にエッジ強調処理を行うので、一画面内に異なるサイズの画像が混在している場合でも各画像のサイズに適応したエッジ強調処理を行うことができ、したがって、全体として画像の輪郭に均整のとれた混在画像の印刷を行うことが可能となる。
【0114】
また、テーブルにサイズ情報と書き込みアドレス情報の他に回転有無情報を備えるので、処理画像が回転しているときでもサイズ及びエッジ強調係数を入れ替えるだけで正しいエッジ強調処理ができ、これにより、処理手順が大きく増加することがなく、したがって、低廉でエッジ強調処理機能の豊富な画像処理装置を提供することが可能となる。
【0115】
また、エッジ強調係数を入力画像のサイズに一対一に対応させて固定するので、エッジ強調係数を入力画像のサイズの種類に対応する数に限定することができ、一方では出力画像のサイズに応じてエッジ強調処理の可否を決定するので、出力画像のサイズが大小異なって混在しても適正なエッジ強調処理を行うことができ、したがって、エッジ強調係数用のROMの容量を削減できると共に軽減された作業量で適正なエッジ強調係数を設定することができて経済的である。
【0116】
また、本発明によれば、回転有無情報により処理対象の画像の回転が認識されたときには、予め画像の向きに対応して設定されたエッジ強調係数を画像の回転に応じて変換して用いることにより画像の回転に応じた最適なエッジ強調処理ができるようになる。
【図面の簡単な説明】
【図1】第1の実施の形態における画像処理装置の構成を示すブロック図である。
【図2】 (a),(b) は第1の実施の形態において外部機器として用いられるカメラの入力画像のサイズを示す図、(c) は印刷画像の解像度を示す図である。
【図3】 (a) は第1の実施の形態において使用されるエッジ強調係数のテーブル(エッジ処理テーブル)の例を示す図、(b),(c),(d) はそのテーブルの内容を説明する図である。
【図4】第1の実施の形態における構成において画像処理装置のCPUにより行われる処理の動作を示すフローチャートである。
【図5】 (a),(b) はミニラベル印刷の印刷画面の例を2例示す図である。
【図6】ミニラベル印刷の場合にも対応できるエッジ強調係数のテーブルの例を示す図である。
【図7】第1の実施の形態においてミニラベル印刷の場合にも対応できるエッジ強調処理のメインフローチャートである。
【図8】 (a),(b) は第1の実施の形態におけるミニラベル印刷対応のエッジ強調処理のサブフローチャートである。
【図9】 (a) は第2の実施の形態において処理される出力画像の例を示す図、(b) はその画面構成の各画像の画像領域番号と印刷用メモリ上のアドレスとの関係を模式的に示す図、(c) はそれら画像領域番号とその画像領域に書き込まれる各画像のサイズ情報及び書き込み開始アドレス情報との対応関係を示すテーブル(領域テーブル)である。
【図10】第2の実施の形態における異なるサイズの画像が一画面に混在する出力画像の処理のフローチャートである。
【図11】 (a),(b) は第3の実施の形態における夫々画像が互いに回転した状態を示す図、(c),(d) は(a),(b) の画像に対応するエッジ強調係数を示す図である。
【図12】 (a) は第3の実施の形態における回転画像のサイズ及び書き込みアドレスの例を示す図、(b) は、出力画像の回転データテーブルの例を示す図、(c) は着目ドットの上下及び左右のエッジ強調係数が異なる場合のエッジ処理テーブルの例を示す図である。
【図13】第3の実施の形態における縦横でエッジ強調係数が異なる回転した出力画像の処理のフローチャートである。
【図14】第4の実施の形態において参考のため出力画像の各サイズの例を8種類示す図である。
【図15】 (a) は第4の実施の形態における異なるサイズの画像配置の例を示す図、(b) はその画像配置に対応する領域テーブルの例を示す図、(c) はサイズ情報に対応する実際のサイズを示すテーブルの例を示す図である。
【図16】第4の実施の形態における出力画像の各サイズ毎にエッジ強調処理の可否を決定するためのテーブルである。
【図17】第4の実施の形態における出力画像のサイズに応じてエッジ強調処理を選択的に行う処理のフローチャートである。
【図18】 (a) は第5の実施の形態においてプリンタに接続されるカメラの機種に対応するフィル用テーブルを示す図、(b) は各カメラ毎のエッジ強調係数を示すテーブルである。
【図19】第5の実施の形態におけるカメの機種毎に対応して選択的に行う処理のフローチャートである。
【図20】従来のプリンタによるカメラ画像の印刷処理の動作を示すフローチャートである。
【図21】 (a),(b) は従来のカメラ画像の印刷処理に使用されるテーブルを示す図、(c),(d) はそれらのテーブルによって指定される画像のサイズと印刷用メモリ上のアドレスを模式的に示す図である。
【符号の説明】
1 画像処理装置
2 印刷制御回路
3 ディジタルカメラ(カメラ)
4 CPU
5 印刷スタートキー
6 データ用メモリ
7 ワーク用メモリ
8 印刷用メモリ
9 ROM
P11,P12 着目画素
10 ミニラベル印刷にも対応できる係数テーブル
11〜16 係数列
21 回転画像
22、25、26 出力画像
23、27、29 書き込みアドレスの位置
24、28、31 サイズテーブルのデータ欄
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an image processing apparatus that performs edge enhancement processing on image information input from an external device and outputs the image information.
[0002]
[Prior art]
In recent years, digital still cameras have become widespread. This digital still camera stores captured image data as digital data in a storage disk device. The image data can be displayed on an external or built-in display device or printed on a printing device connected via an interface and viewed at any time. And the demand of the printer as the printing output apparatus is increasing.
[0003]
The printer includes a data memory, a work memory, a printing memory, and the like, and includes a control device that controls the entire printer, such as communication control with a camera, image processing, and printing control. The printer is connected to a digital still camera (hereinafter simply referred to as a camera) via a serial I / F (interface) at the time of printing. In general, image data transmitted from a camera is compressed by JPEG or the like, and the compressed image data is transmitted to the printer in the same format. The printer stores the compressed image data in a data memory and performs image processing and printing processing.
[0004]
FIG. 20 is a flowchart showing the operation of the printing process by such a printer. As shown in the figure, when the print start key is input (step S1), communication with the camera is started, image data (JPEG compressed data) is received from the camera and stored in the data memory (step S1). S2). Then, JPEG decompression is performed on the image data (step S3). In this process, the luminance and color difference data (Y, Cb, Cr data) generated by the JPEG decompression process is developed on the work memory.
[0005]
Next, the “Y, Cb, Cr” data is converted into spectral data “R, G, B” data (step S4). The converted “R, G, B” data (hereinafter referred to as RGB data) is also stored in the work memory. Subsequently, the RGB data is subjected to image enlargement / reduction, color conversion processing to print data “Y, M, C” for full-color printing using the three primary colors of subtractive color mixing, and the like. The image data for one screen is stored in the printing memory (step S5).
[0006]
When the image data for one screen on which processing such as enlargement / reduction of the image has been completed is stored in the print memory, edge enhancement is uniformly applied to the entire image data for one screen on the print memory. Processing is performed (step S6). Then, the image data that has been subjected to the edge enhancement processing is read from the printing memory and printed (step S7).
[0007]
FIGS. 21A and 21B are tables used for the above-described print processing. FIGS. 21C and 21D show the image size specified by these tables and the addresses on the printing memory. FIG. The table in FIG. 5A is stored in a ROM or the like, and shows the size information of the image after enlargement / reduction and the address on the printing memory. The first elements “0”, “1”, “1” in each row of “0, 0”, “1, 0”, “1,240”... Shown in order from the top row in FIG. Is the size information after the enlargement / reduction processing of the image. As shown in FIG. 5B, “0” is the size “640 × 480”, “1” is the size “320 × 240”, “2”. (Not shown in FIG. 5A) indicates “160 × 120”. By referring to this table, the actual image size can be obtained from the size information “0”, “1”, “2”.
[0008]
The second elements “0”, “0”, “240”,... In each row indicate addresses on the print memory where writing is first performed in image processing. Therefore, “0, 0” in the first row of the table of FIG. 5A indicates that the size is “640 × 480” and the address of the first pixel is “0”. “1, 0” in the second row indicates that the size is “320 × 240” and the address of the first pixel is “0”. The third “1,240” indicates that the size is “320 × 240” and the address of the first pixel is “240”. The same applies to the third and subsequent lines.
[0009]
FIG. 4C shows the arrangement of the write address of the pixel of the screen G0 having a 640 × 480 dot configuration on the print memory. The first pixel on the upper left is the address “0” on the print memory. Placed in. This screen G0 shows the screen configuration designated by the data “0, 0” in the first row of the table of FIG.
[0010]
In the screen G0 having the 640 × 480 dot configuration, 480 pixels from the upper left address “0” are sequentially arranged on the lower left. The addresses of these 480 pixels are “0”, “1”, “2”,..., “479”, respectively. Therefore, when the screen having the 640 × 480 dot configuration shown in FIG. 5C is divided into four as shown in FIG. 4D to obtain the screens G1, G2, G3, and G4 having the 320 × 240 dot configuration, the lower left split screen is displayed. The write address of the first pixel P1 of G2 is “240”. This divided screen G2 shows the screen configuration designated by the data “1, 240” in the third row of the table of FIG. The upper left divided screen G1 shows the screen configuration designated by the data “1, 0” in the second row of the table of FIG.
[0011]
The address of the pixel on the right side of the address “0” in FIGS. 4C and 4D is “480”, and then downwards to “481”, “482”,. The pixel address continues. This is sequentially repeated to the right, and the last 480 pixels from the upper right address “306720” to the lower right address “307199” are arranged. As a result, the write address of the first pixel P2 in the upper right divided screen G3 in FIG. 4D is “15360”, and the write address of the first pixel P3 in the lower right divided screen G4 is “153840”. The above-mentioned divided screen G3 shows the screen configuration designated by the data “1, 15360” in the fourth row of the table of FIG. 10A, and the divided screen G4 is 5 of the table of FIG. The screen configuration specified by the data “1, 153840” on the line is shown.
[0012]
[Problems to be solved by the invention]
By the way, as described above, the edge enhancement processing is performed in the same manner for both the input image from the host device (in this case, the camera) and the size of the print image after the image processing. However, when edge enhancement processing is uniformly performed in this way, the enlarged image looks blurred and the reduced image looks sharp when the one image is enlarged or reduced. In other words, as described above, if edge enhancement processing is performed to the same extent for both enlarged and reduced images, there is a complaint that the enlarged image is not sharp enough, and the reduced image is sharp. The problem of passing too much occurs. Even if the size of the print image after image processing is the same, the same problem occurs if the size of the input image is different.
[0013]
An object of the present invention is to provide an image processing apparatus that performs appropriate edge enhancement processing corresponding to the size of an input image and the size of a print image.
[0014]
[Means for Solving the Problems]
The configuration of the image processing apparatus of the present invention will be described below.
An image processing apparatus according to the present invention includes an edge processing table that indicates the degree of edge enhancement for generating edge data by performing edge enhancement processing on input image data for one screen from an external device.And an image area table in which reference coordinate information and size information are associated with each other for each of a plurality of image areas existing in one screen,Edge processing tableAnd the image area tableRead out from the memorySaidEdge processing tableAnd the image area tableOn the basis of theDifferent image areas of different sizes existing in one screenAnd an image processing unit that performs edge enhancement processing.
[0015]
For example, claims 2 As described, the image area table further includes rotation presence / absence information for each image area, and the image processing unit recognizes that the image of the processing area selected by the image area table is rotated. Is configured to perform edge enhancement processing according to the rotated image .
[0016]
Claims Three As described, in the edge processing table, an edge enhancement coefficient for an image when the image is stored in a predetermined memory area in either a horizontal direction or a vertical direction for processing is set in advance. When the orientation of the image stored horizontally or vertically in the predetermined memory area is different from the orientation of the image corresponding to the edge enhancement coefficient of the edge processing table, the processing unit The upper and lower values and the left and right values are interchanged, and the y-direction size and the x-direction size obtained from the size information are interchanged for use.
[0017]
According to a fourth aspect of the present invention, the edge processing table includes a coefficient sequence having a one-to-one correspondence with the size of the input image, and the image processing unit determines whether or not to perform edge enhancement processing according to the output image. The edge emphasis process availability table is provided, and the edge enhancement process availability table and the edge process table are configured to execute or not execute the edge enhancement process on the output image.
[0018]
According to a fifth aspect of the present invention, the edge processing table includes a coefficient sequence corresponding to each model of the external device.
[0019]
In addition, for example, the image processing unit further includes a memory area for storing coefficient data for image processing transmitted from the external device, and for image processing transmitted from the external device. When coefficient data is transmitted, image processing before the edge enhancement processing is performed using the transmitted coefficient data, and processing is performed by replacing the coefficient in each table with the transmitted coefficient. .
[0020]
The image processing apparatus according to the present invention also includes an edge enhancement coefficient set in advance corresponding to the size information of the image to be processed and a predetermined direction of the image when the image is stored in a predetermined memory area. And a memory for storing the rotation presence / absence information of the processing target image stored in the predetermined memory area, and the edge enhancement coefficient when the rotation of the processing target image is recognized by the rotation presence / absence information stored in the memory. And an image processing unit that performs edge enhancement processing according to the rotated image by converting the size information according to the rotation of the image. In the image processing apparatus, the edge enhancement coefficient indicates the degree of edge enhancement with respect to the image when the image is stored in the predetermined memory area in either the horizontal direction or the vertical direction. When the orientation of the image stored horizontally or vertically in the predetermined memory area is different from the orientation of the image corresponding to the edge enhancement coefficient, the upper and lower values and the left and right values of the edge enhancement coefficient are exchanged. The y-direction size and the x-direction size obtained from the size information are used interchangeably.
[0021]
DETAILED DESCRIPTION OF THE INVENTION
Embodiments of the present invention will be described below with reference to the drawings.
FIG. 1 is a block diagram illustrating a configuration of an image processing apparatus according to the first embodiment. The image processing apparatus 1 shown in FIG. 1 is an interface controller unit of a printer, for example, and the print control circuit 2 is an engine controller unit of a printer, for example. A digital camera (hereinafter simply referred to as a camera) 3 that is an external host device is connected to the image processing apparatus 1 via a serial interface (I / F).
[0022]
The image processing apparatus 1 includes a CPU 4. The CPU 4 includes a print start key 5 for a user to give an instruction to start printing, a data memory 6 for storing image data input from the camera 3, and enlargement / reduction of the image data. The work memory 7 temporarily used to perform image processing such as conversion from the enlarged / reduced data to print data and edge enhancement processing to the converted data, for one screen after image processing A print memory 8 for storing print image data, a ROM 9 for storing processing programs and coefficients, and the like are connected. The print control circuit 2 controls the printer engine unit based on the print image data read from the print memory 8 and executes printing.
[0023]
In this embodiment, as will be described in detail later, the size of input image data (hereinafter also simply referred to as an input image) input from the camera 3 and print image data after image processing (hereinafter also simply referred to as a print image). ) To change the degree of edge enhancement (coefficient) and perform image processing.
[0024]
FIGS. 2A and 2B are diagrams showing the size of the input image of the camera 3 used as an external device in the present embodiment. In recent digital cameras, the size (number of pixels) of an image can be selected from two types, for example, 640 × 480 dots (hereinafter referred to as VGA size) and 320 × 240 dots (hereinafter referred to as QVGA size) at the time of shooting. It has become. On the other hand, the resolution of the print image of the printer is usually a kind of cheek as shown in FIG. FIG. 7C shows a resolution of 640 × 480 dots similar to the image configuration shown in FIG.
[0025]
As described above, since the printer has only one resolution, the printer converts the image size so as to match the resolution of the printer when printing an input image from the camera. In this case, when there are two shooting modes of the VGA size and the QVGA size, the printer should be designed with a resolution that does not require image size conversion for one of the input images. Efficient.
[0026]
In this embodiment, for convenience of explanation, the photographing mode of the camera 3 is set to two types, that is, the VGA size shown in FIG. 2A and the QVGA size shown in FIG. 2B, and the printer resolution is shown in FIG. 640 × 480 dots. That is, when the input image is VGA size, image size conversion is not necessary, and when the input image is QVGA size, image size conversion is required.
[0027]
FIG. 3A is a diagram showing an example of an edge enhancement coefficient table (edge processing table) used in the present embodiment. (B), (c), and (d) in the figure are diagrams for explaining the contents of the edge processing table. As shown in FIG. 6A, the edge processing table is composed of a set of three coefficients “a, b, c”. Then, for example, “−1, −1, 5” is prepared as the edge enhancement coefficient “a, b, c” corresponding to the VGA size input image, and the edge enhancement coefficient “a, b” corresponding to the QVGA size input image is prepared. , C ", for example," -1/8, -1/8, 3/2 "is prepared. This edge enhancement coefficient “a, b, c” is “weight” data when performing edge enhancement on the pixel-of-interest data, and as shown in FIG. For each pixel, a coefficient “c” is assigned to the center pixel of interest, a coefficient “a” is assigned to each of the left and right pixels, and a coefficient “b” is assigned to each of the upper and lower pixels. Since the coefficient “0” is always assigned to the four pixels in the oblique direction, the storage in the edge processing table of FIG. These coefficients are multiplied by the pixel data at the assigned positions, and the value obtained by adding up all the multiplied values is the value of the pixel of interest.
[0028]
Based on the coefficient allocation arrangement of FIG. 6B, the edge enhancement coefficients “−1, −1, 5” for the VGA size are distributed around the pixel of interest P11 as shown in FIG. The edge enhancement coefficients “−1/8, −1/8, 3/2” for the QVGA size are distributed around the pixel of interest P12 as shown in FIG. The edge enhancement coefficients “−1, −1, 5” for VGA size are strong edge enhancement coefficients, and strongly emphasize the outline of the VGA size image that becomes a large screen so as not to blur. On the other hand, the edge enhancement coefficients “−1/8, −1/8, 3/2” for the QVGA size are weak edge enhancement coefficients so that the outline of the QVGA size image that is a small screen does not become tight. Emphasis on modestly. Values corresponding to the image sizes of these edge enhancement coefficients are set empirically based on experimental values.
[0029]
FIG. 4 is a flowchart showing an operation of processing performed by the CPU 4 of the image processing apparatus 1 in the above configuration. This process is started when the print start key 5 is pressed (step S10).
[0030]
First, the CPU 4 communicates with the camera 3, receives image data to be printed, and stores it in the data memory 6 (step S11). The image data inside the camera 3 is compressed by JPEG and transmitted to the printer in the same format.
[0031]
When receiving the JPEG-compressed input image data, the CPU 4 obtains the JPEG decompressed size (hereinafter referred to as input image size) of the received image data (step S12). This input image size can be obtained by analyzing the header portion of the input image data compressed with JPEG. In the present embodiment, as described above, there are only two types of input image sizes, VGA size and QVGA size.
[0032]
Next, referring to the analysis result (step S13), if the size is VGA (S13 is Y), "1" is stored in the internal register of the CPU 4 (step S14). If the size is QVGA (S13 is N), “0” is stored in the internal register (step S15).
[0033]
When this analysis processing is completed, the CPU 4 performs JPEG decompression of the input image data, further performs processing to convert the “Y, Cb, Cr” data into “R, G, B” data, and the result is stored in the work memory 7. (Step S16).
[0034]
Then, the value stored in the internal register is referred to and it is determined whether or not the value is “0” (step S17). This processing is processing for determining whether or not the input image is a QVGA size image (VGA size).
[0035]
If the value of the internal register is “0” in this determination, that is, the input image is QVGA size (Y in S17), the image enlargement process for converting the image size in FIG. 2B to the image size in FIG. (Step S18), color conversion processing to convert the data into “Y, M, C” data is performed, and the converted image data (hereinafter referred to as an output image) is stored in the printing memory 8 (step S19). . On the other hand, when the value of the internal register is “1”, that is, the input image is VGA size, step S19 is immediately performed.
[0036]
Thus, in the present embodiment, the image processing is varied depending on the size of the input image determined in step S13. That is, enlargement processing for size conversion is performed only when the input image is QVGA size. By the way, such enlargement processing of the image generates blurring of the enlarged image. In order to remove this blur, a strong edge enhancement process is performed using an edge enhancement coefficient as shown in FIG. However, if the same edge enhancement processing as described above is performed on an image that has not been subjected to the enlargement processing, an image having a rough impression is produced. Therefore, the edge enhancement coefficient is changed depending on the input image size.
[0037]
That is, in this embodiment, the value stored in the internal register is referred again after the above processing, and it is determined whether or not the value is “0”, that is, whether or not the input image is a QVGA size image. (Step S20). If the value of the internal register is “0”, that is, if the input image is a small QVGA size image (Y in S20), this image has been enlarged, so the stronger one in FIG. The edge enhancement coefficient is read from the ROM 9 (step S21), and the edge enhancement process is uniformly performed on the entire image of one screen on the printing memory 8 by using the read strong edge enhancement coefficient (step S21). S23). When this edge emphasis processing is completed, the print control circuit 2 reads out the processed print image data from the print memory 8 and performs printing (step S24).
[0038]
On the other hand, if it is determined in step S20 that the value of the internal register is “1” (N in S20), this input image has the VGA size and is maintained as it is. Therefore, in this case, the weak edge enhancement coefficient shown in FIG. 3D is read from the ROM 9 (step S22), and the processes of steps S23 and S24 are performed.
[0039]
As described above, in the present embodiment, a plurality of edge enhancement coefficients corresponding to the relationship between the input image size and the print image size after image processing are set in advance as an edge processing table, and the enlarged image and the enlarged image are processed. Distinguish the image from the unprocessed image, and use the edge enhancement coefficient corresponding to the enlarged or non-enlarged image to make a difference between the strength and weakness of the edge enhancement process. A high-quality printed image that has undergone an edge enhancement process is obtained.
[0040]
In the first embodiment described above, the size of the print image after image processing is described as being only the VGA size, but in general, a printer for a digital camera prints a pattern in which a plurality of the same images are arranged. Often has a mini-label printing function.
[0041]
FIGS. 5 (a) and 5 (b) are diagrams showing examples of printing screens for such mini-label printing. FIG. 5 (a) shows the case where four QVGA size images are the same, FIG. 5 (b). Indicates a case where there are 16 identical images of 160 × 120 size. If there are four identical images shown in FIG. 5A, the VGA size input image is reduced to the QVGA size. Alternatively, an input image of QVGA size is used as it is without size conversion. In such a case, the edge enhancement degree may be changed depending on the input image size and the print image size after image processing. Of course, as each image in one screen becomes smaller, an edge enhancement coefficient adapted to such an image is used.
[0042]
FIG. 6 is a table of edge enhancement coefficients that can be applied to such mini-label printing. The edge processing table 10 shown in FIG. 6 includes two types of input images, VGA size and QVGA size, and three types of output images after image processing: VGA size, QVGA size, and 160 × 120 size. Six sets of coefficient sequences corresponding to combinations of “type” × “3 types” and a total of “6 types” (combination of input image size and output image size) are stored.
[0043]
Among these coefficient sequences, the coefficient sequence 11 and the coefficient sequence 15 in the case where the size of the input image and the size of the output image are the same are the same as the coefficient sequence for QVGA shown in FIG. Is the same as the coefficient sequence for VGA shown in FIG. 3A. Further, the coefficient sequence 12 and the coefficient sequence 16 when the output image size is reduced to 1/2 in the vertical and horizontal directions (1/4 in area) with respect to the size of the input image use a common coefficient sequence different from the above. . The coefficient sequence 13 corresponding to the output image size 160 × 120 for the input image VGA is “0, 0, 1”, and as a result, the coefficient is not subjected to edge enhancement processing. This is because, as shown in FIG. 5 (b), the image of size 160 × 120 is extremely small, so that the outline can be seen clearly even without edge enhancement. As described above, when processing is performed by finely setting a plurality of coefficient sequences according to the sizes of the input image and the output image, it is possible to cope with the case of mini-label printing.
[0044]
7 and 8 (a) and 8 (b) are flowcharts of edge enhancement processing that can be applied to the case of mini-label printing that operates using the above-described edge processing table. First, in the process of the main flowchart shown in FIG. 7, the processes of steps S30 to S37 are the same as the processes of steps S10 to S17 of the process shown in FIG. In the example of this process, the process after step S37 is different from the case of FIG.
[0045]
That is, in step S37, when the value stored in the internal register is “0”, that is, when the input image is QVGA size (Y in S37), QVGA size processing described in detail later is performed (step S38). When the value of “1”, that is, the input image is VGA size (N in S37), VGA size processing described later in detail is also performed (step S39). Then, after either the QVGA size processing or the VGA size processing, color conversion processing to convert the data into “Y, M, C” data is performed, and the converted image data (output image) is stored in the printing memory 8. (Step S40), and thereafter edge enhancement processing is performed (step S41).
[0046]
In this edge enhancement process, the edge enhancement coefficient read from the edge processing table of the ROM 9 is used together with the enlargement or reduction process in the QVGA size process or the VGA size process. The QVGA size processing and VGA size processing will be described with reference to the sub-flow charts of FIGS. 8 (a) and 8 (b).
[0047]
In the QVGA size processing shown in FIG. 8A, first, it is determined whether or not the VGA size is designated as the output image size after image processing (step S38-1). If the VGA size is specified as the output image size (Y in S38-1), the input image is the QVGA size, and therefore image enlargement processing for enlarging the image data of 320 × 240 dots to 640 × 430 dots is performed. (Step S38-2), the coefficients "-1, -1, 5" corresponding to the size of the input image and the size of the output image are read from the ROM 9 (Step S38-3), and the process returns to the main flowchart.
[0048]
If it is determined in step S38-1 that the output image size is not the VGA size (N in S38-1), it is further determined whether the QVGA size is designated as the output image size (step S38-1). S38-4). If the QVGA size is specified as the output image size (Y in S38-4), the input image is the QVGA size. In this case, the input / output images are the same size. Immediately, the coefficients “−1/8, −1/8, 3/2” when the input and output images have the same size are read from the ROM 9 (step S38-3), and the process returns to the main flowchart.
[0049]
If the output image size is not the VGA size in the determination in step S38-1 and not the QVGA size in the determination in step S38-4 (S38-4 is N), the output image size is 160 × 120. In this case, after performing an image reduction process for reducing an input image of 320 × 240 QVGA size to an output image of 16 sheets of 160 × 120 (step S38-6), The coefficients “−1/16, −1/16, 5/4” corresponding to the reduction processing are read from the ROM 9 (step S38-3), and the processing returns to the main flowchart.
[0050]
Next, in the VGA size processing shown in FIG. 8B, in this case as well, it is first determined whether or not the VGA size is designated as the output image size after the image processing (step S39-1). If the VGA size is designated as the output image size (Y in S39-1), the input image is the VGA size. In this case, the input / output images are the same size. Immediately, the coefficients “−1/8, −1/8, 3/2” when the input / output images have the same size are read from the ROM 9 (step S39-2), and the process returns to the main flowchart.
[0051]
If it is determined in step S38-1 that the output image size is not the VGA size (N in S39-1), it is subsequently determined whether the QVGA size is designated as the output image size (step S39). -3) If the QVGA size is specified (Y in S39-3), the input image is the VGA size, so the image reduction for reducing the image data of 640 × 430 dots to 320 × 240 dots of the QVGA size Processing is performed (step S39-4), and the coefficients “−1/16, −1/16, 5/4” corresponding to the size of the input image and the size of the output image are read from the ROM 9 (step S39-5). The process returns to the main flowchart.
[0052]
If the output image size is not the VGA size in the determination in step S39-1 and is not the QVGA size in the determination in step S39-3 (S39-3 is N), the output image size is 160 × 120. A size is specified. In this case, after performing an image reduction process for reducing an input image having a VGA size of 640 × 480 to an output image of 16 sheets of 160 × 120 (step S39-6), a coefficient “0” corresponding to this process is set. , 0, 1 ”is read from the ROM 9 (step S39-7), and the process returns to the main flowchart.
[0053]
As described above, since the edge enhancement processing is performed by changing the edge enhancement coefficient according to the size of the input image and the size of the output image, the input images shown in FIGS. In addition to the output image shown in FIG. 5A, the image for mini-label printing shown in FIGS. 5A and 5B can also be output with appropriate edge enhancement processing.
[0054]
In the above-described processing, processing is performed corresponding to a total of six types of combinations. However, when the size of the input image is three or more types, the branch from step S37 in the main flowchart of FIG. The number of output images may be increased to three or more. If the number of output image types is four or more, the determination process may be increased in accordance with the size type in each sub-flowchart of FIG.
[0055]
In addition, the edge enhancement coefficient is changed according to the input image size and the output image size. However, the present invention is not limited to this. You may comprise so that a coefficient may be changed. Further, although the edge enhancement processing is performed after the enlargement or reduction processing, the edge enhancement processing may be performed on, for example, a Y (luminance) signal before the enlargement or reduction without being limited thereto.
[0056]
By the way, in the first embodiment described above, the image for one screen existing on the printing memory 8 has one of the two sizes of the input image, and the image after the image processing is processed. The size of the output image is one of a plurality of sizes. Therefore, the edge enhancement processing is uniformly performed on the entire image of one screen on the printing memory 8 by the coefficients “a, b, c” selected according to the combination of the input image and the output image. Yes. However, not only images of the same size are always printed on the print screen, but also a case where a screen of a format in which images of different sizes are mixed on one screen is conceivable. In such a case, as described above, there is a problem if uniform edge enhancement processing is performed on the entire image of one screen. However, the present invention can cope with such a case. Less than. This will be described as a second embodiment.
FIG. 9A is a diagram showing an example of the output image processed in the second embodiment, and FIG. 9B shows each image of the screen configuration of FIG. 8 is a diagram schematically showing the relationship between the image area number and the address when written on the image 8, and FIG. 8C shows the image area number, the size information of each image written in the image area, and the start of writing. It is a table (image area table) showing addresses.
[0057]
The address configuration of the entire screen area for one screen shown in FIG. 9 (b) is the same as the address configuration of the pixel allocation described in FIG. 21 (c). Further, the size information and the write start address of each image shown in the table of FIG. 9C corresponding to the image area numbers are the same as the size information and the write start address described in FIG. is there.
[0058]
In the present embodiment, for example, an output image is displayed while performing edge enhancement processing for each image area using the tables shown in FIGS. 9B and 9C for the designated output image of FIG. The data is expanded on the print memory 8.
[0059]
FIG. 10 is a flowchart of processing of an output image in which images of different sizes are mixed on one screen in the second embodiment. In this process, an image area counter i and an address register adr (hereinafter simply referred to as an address adr) built in the CPU are used.
[0060]
As shown in the flowchart of FIG. 6, first, an image area counter i is initially set to “0” (step S50). As a result, in each image for one screen shown in FIG. 9 (a), preparations are made to sequentially advance image processing in ascending order from the image area number “0” shown in FIG. 9 (b).
[0061]
Subsequently, the size information and the write address corresponding to the image area number i are read from the ROM 9 (step S51). This process is a process of reading the size information and the write start address from the table of FIG. 9C. Since the image area number is “0” at the beginning, the size information corresponding to this “0” number and the address “ “1, 0” is read out.
[0062]
Following the above, the read write address (in this case, “0”) is set to the address adr (step S52). Thereby, the reference coordinates of the image area to be processed are set.
[0063]
Next, the actual size is read based on the size information (step S53). This process is based on the size information read in step S51 and the size information (in this case, “1”) in the address (in this case “1, 0”) as shown in FIG. This is a process of reading the actual size from the table in which the size information corresponds to the actual size. As shown in FIG. 21 (b), the actual size indicated by the size information “1” is 320 × 240, which is ¼ of the entire size as shown in FIGS. 9 (a) and 9 (b). This is the size of the image area “0”. If the expression is changed again here, the size 320 × 240 is a size in the range of 320 dots in the x direction and 240 dots in the y direction in FIG. 9B. Is shown.
[0064]
Following the above, an edge enhancement coefficient is read (step S54). The table used for reading out the edge enhancement coefficient is the table shown in FIG. 6 and is obtained based on the size of the input image and the size of the output image obtained from the size information.
[0065]
Thereafter, edge enhancement processing is sequentially performed based on the read edge enhancement coefficient. That is, first, edge enhancement processing of the dot (pixel data) indicated by the address adr is performed (step S55). As a result, the edge emphasis process is started from the dot at the writing start position that is the reference position.
[0066]
Subsequently, it is determined whether or not the edge enhancement processing for y dots (240 dots in this case) has been completed (step S56). If not yet completed (N in S56), the address adr is set to “1”. "Is incremented (step S59), and the above steps S55 and S56 are repeated. As a result, the edge enhancement process proceeds in the y direction.
[0067]
When it is confirmed in step S56 that the edge enhancement processing for y dots has been completed (S56 is Y), whether the edge enhancement processing for y dots has been performed x times, that is, the vertical 240 It is determined whether or not the edge enhancement processing for dot × horizontal 320 dots is completed (step S57). If x edge enhancement processing has not been completed yet (S57 is N), the value of the address adr is calculated by the expression “adr = adr + 480− (y−1)” and jumped (step S60). This process is a process of designating (calculating) the address of the first dot in the y direction in order to perform the next (adjacent) y direction process since the process in the y direction has been completed. That is, when the number of vertical dots “480” in the entire screen is added to the address that has just ended, the address next to the completed address is obtained. If the number of dots smaller by “1” than the number of vertical dots y of the size being processed is further subtracted from this, the address moves upward and is just an address adjacent in the x direction of the immediately preceding processing start address in the y direction. (Next processing start address).
[0068]
For example, the first y-direction processing end address of the image area “0” is “239”. Therefore, the above formula becomes “adr = 239 + 480− (240-1)”, and the new address adr to be jumped becomes “480”, which is an address adjacent to the first processing start address “0” in the x direction. is there.
[0069]
After this address jump processing, the above steps S55 to S59 are repeated again, and when the y direction is completed, the address jump is repeated at steps S57 and S60. As a result, the edge enhancement process for all dots in one image area proceeds. When it is confirmed in step S57 that the edge enhancement processing for y dots has been performed x times, the edge enhancement processing is performed for all image regions (from “0” to “9” in this example). It is determined whether or not the process has been completed (step S58). If it has not been completed (N in S58), the image area counter i is incremented by "1" (step S61). As a result, the next image area is designated as the processing target of the edge enhancement process.
[0070]
Thus, when the next image area is designated, the process returns to step S51, and the processes of steps S51 to S61 described above are repeated. In step S58, it is confirmed that edge enhancement processing has been completed for all image regions (Y in S58), and the processing is terminated.
[0071]
In this way, when performing edge enhancement after image processing such as image enlargement / reduction, each image is processed even when output images of different sizes after image processing are mixed in one screen of memory. A processing region can be selected for each region, and edge enhancement processing suitable for the image size can be performed.
[0072]
In the second embodiment described above, edge enhancement processing is performed after all images have been developed in the print memory 8. For example, image data of image area number 0 is placed on the print memory 8. Then, image enhancement such as color conversion processing and edge enhancement processing may be alternately repeated so that the edge enhancement processing is immediately performed.
[0073]
By the way, in the first and second embodiments, all images are in landscape orientation. In some cases, the output is designated in a state where the image is rotated 90 degrees. Even in such a case, if the edge emphasis coefficient is the same for the upper, lower, left, and right adjacent dots as shown in FIGS. 3C and 3D, the image area size data (x, y) is simply used. It is sufficient to perform processing only by exchanging the values of x and y. However, the edge emphasis coefficient may be different for the upper, lower, left, and right adjacent dots.
[0074]
FIGS. 11A and 11B are diagrams showing a state in which the images are rotated with respect to each other. The figure (a) is referred to as a landscape image, and the figure (b) is referred to as a portrait image. When viewed from (a) of the same figure, (b) of the same figure is rotated 90 degrees. At this time, the edge emphasis coefficient of the image in FIG. 9A is weighted with a coefficient “−2” only to the dots adjacent to the left and right of the target dot as shown in FIG. Assuming that the dot is an image that is not weighted with a coefficient of “0”, when the image in FIG. 10 (a) is rotated 90 degrees as shown in FIG. If it is to be expressed in the same manner as in FIG. (A), the edge emphasis processing coefficient must also be assigned to each dot in an arrangement rotated by 90 degrees as shown in FIG. Normally, this process is troublesome.
[0075]
The present invention can easily perform appropriate edge enhancement processing even in such a case. Hereinafter, this will be described as a third embodiment.
FIG. 12A shows the size and write address of the processed image (rotated image 21) in the third embodiment, and FIG. 12B shows the output image after image processing such as color conversion processing. Is a table (rotation data table) showing the area number, size, write address to the memory for printing, and the presence / absence of rotation. (C) in the figure shows the edge when the vertical and horizontal edge enhancement coefficients of the target dot are different An example of a processing table is shown.
[0076]
The write address (write start address) in FIG. 5A is designated not at the upper left corner but at the lower left corner as before. Also, 320 dots in the x direction are in the vertical direction, and 240 dots in the y direction are in the horizontal direction. This is because the lower left corner is written first when the image data is written into the printing memory 8 in response to the rotation of the image.
[0077]
In addition, the rotation data table in FIG. 7B is a third element indicating whether or not there is rotation (0: no rotation, 1: rotation) in the image area table shown in the first and second embodiments. Is a table for processing the rotated image of FIG. The image area number is “0”, the size information is “1” (320 × 240 dots), the address is “96400” (address in the lower left corner of the rotated image), and the presence / absence of rotation is “1” (with rotation). ing.
[0078]
In addition, the edge processing table in FIG. 3C stores the edge enhancement coefficient of the horizontally oriented image before rotation as it is. That is, the three elements of each coefficient row include the left-right coefficient a for the target dot in the image (horizontal image) before rotation from left to right, the vertical coefficient b for the target dot, and the coefficient c for the target dot itself. Show.
[0079]
FIG. 13 is a flowchart for explaining the procedure of edge enhancement processing of a rotated image using different edge enhancement coefficients for the upper and lower and left and right of the target dot, using such an edge enhancement table and the above rotation data table. Steps S70 to S74 in the flowchart are the same processing as steps S50 to S54 in the flowchart shown in FIG. 10, and during this time, a little different from the case in FIG. 10 is that the image area indicated by the image area counter i is in step S71. That is, the data corresponding to the number is read from the rotation data table shown in FIG.
[0080]
Unlike the case of FIG. 10, the rotation data table includes rotation information as well as the size information and the write address as described above. This rotation presence / absence information is referred to in the processing following steps S70 to S74, and processing is performed according to the presence / absence of rotation.
[0081]
That is, the above rotation presence / absence information is extracted (step S75), and then it is determined whether or not the rotation information is “1” indicating the presence of rotation (step S75). If the rotation presence / absence information is “1” indicating that there is rotation (Y in S75), first, in this case, the size x is subtracted from the address adr (step S77). As a result, the lower left writing address “96400” of the rotated image shown in FIG. 12A is changed to “96400−320 = 96080” and moved to the upper left corner of the image.
[0082]
Next, the size x and the size y are exchanged (step S78). As a result, the size 240 of the rotated image 21 shown in FIG. 12A is changed to the size x, the size 320 is changed to the size y, and the coordinates of all the dots of the image remain in the rotated state in the print screen of FIG. Expressed in x and y coordinates.
[0083]
Following the above, the edge enhancement coefficients a and b are switched (step S79). Thereby, a and b of the edge enhancement coefficient “−2, 0, 5” read corresponding to the size information “0” in the edge processing table of FIG. 12C are replaced, and the edge enhancement coefficient “0, -2,5 ". That is, the edge enhancement coefficient of FIG. 11C for the horizontally oriented image of FIG. 11A is converted to the edge enhancement coefficient of FIG. 11D for the rotated image (vertically oriented image) of FIG.
[0084]
As described above, after the size x and the size y are exchanged, and the edge enhancement coefficients on the upper and lower sides and the left and right sides are exchanged, the processing from step S80 is performed. If it is determined in step S76 that the rotation information is "0" indicating no rotation (S75 is N), the process immediately proceeds to step S80 and subsequent steps.
[0085]
Steps S80 to S86 are the same as steps S55 to S61 in FIG. However, since x and y are interchanged when there is rotation, the process of repeating 240 dots in the y direction 320 times in the x direction in FIG. 10 is 320 dots in the y direction in FIG. This process is repeated 240 times in the x direction. Further, when there is no rotation, the processing is the same as that in the case of FIG.
[0086]
As described above, when the image is rotated, the sizes x and y are exchanged. Therefore, as in the case where there is no rotation, the processing for y dots may be performed x times. Regardless of the procedure, the procedure can be handled uniformly. Further, an optimum edge enhancement process corresponding to the rotation of the image can be performed with only a slight increase in the processing procedure.
[0087]
Note that the edge processing table coefficient values stored in the ROM 9 are set to values that can be used as they are when the image is placed in landscape orientation. The coefficient may be used as it is when the image is in the portrait orientation, and the coefficients a and b may be exchanged when the image is in the landscape orientation.
[0088]
By the way, in the first to third embodiments described above, the capacity of the edge processing table for the edge enhancement coefficient increases as the type of size of the output image increases. Further, the setting work for determining the optimum edge enhancement coefficient for each size is a laborious work because this work is performed by trial and error experiments. In preparation for such a case, the present invention provides a further procedure. This will be described below as a fourth embodiment.
[0089]
In the fourth embodiment, only one type of edge enhancement coefficient is set for one type of input image size, and whether or not edge enhancement processing is performed is controlled by the set one type of edge enhancement coefficient. Like that. Empirically, even if image processing is controlled by whether or not edge enhancement processing is performed with one edge enhancement coefficient in this way, if the size of the output image is smaller than the size of the input image, There are often no major problems with quality. Therefore, by controlling the image processing in this way, the problem described in the section of the prior art that occurs when there is only one type of edge enhancement coefficient can be solved.
[0090]
FIG. 14 is a diagram showing an example of each size of the output image for reference, and only eight types are shown for convenience of explanation. The figure shows size 680x480, size 480x360, and size 384x248 above, and size 320x240, size 256x192, size 240x180, size 213x160, and size 160x120 below. Show. Both are the same scale. The input image size will be described below assuming that only the VGA size is used for simplicity.
[0091]
FIG. 15 (a) is a diagram showing an example of image layouts of different sizes, FIG. 15 (b) is a diagram showing an example of an image area table corresponding to the image layout, and FIG. The size table showing the actual size corresponding to the size information. In the upper part of the image area table in FIG. 6B, the image area number “0” is the image area number of the output image 22 of the print screen shown in FIG. , 11618 ”is the size information of the output image 22, and the write address“ 11618 ”is the address of the upper left corner 23 of the output image 22. The actual size of the output image 22 is read out to be 320 × 240 dots from the data column 24 of the size table in FIG. The same applies to the other output images 25 and 26. The output image 25 has the image area number “1”, the write address of the upper left corner 27 is “187698”, and the actual size corresponding to the size information “7” is It is 160 × 120 dots from the data column 28 in FIG. In the output image 26, the image area number is “2”, the write address of the upper left corner 29 is “184594”, and the actual size corresponding to the size information “5” is from the data columns 31 to 240 in FIG. × 180 dots.
[0092]
FIG. 16 is a table for determining whether or not edge enhancement processing is possible for various sizes of an output image that has been subjected to image processing on an input image of VGA size and output as described above. As shown in the figure, this edge emphasis processing availability table is composed of size information and table values. The size information corresponds to the size information of the size table shown in FIG. One of two types of table values “1” and “0” corresponds to each. The table value “1” indicates “Yes” for the edge enhancement process, and the table value “0” indicates “No” for the edge enhancement process.
[0093]
In the example of FIG. 16, the table value “1” corresponds to the size information “0” to “4”, and this performs edge enhancement processing on the output image of the actual size 640 × 480 to the actual size 256 × 192. It is shown that. Further, the table value “0” corresponds to the size information “5” to “7”, which indicates that the edge enhancement processing is not performed on the output images of the actual size 240 × 180 to the actual size 160 × 120. ing.
[0094]
FIG. 17 is a flowchart of processing for selectively performing edge enhancement processing according to the size of the output image using each of the above tables. In the flowchart shown in the figure, the processing in steps S100 to S102 is the same as the processing in steps S50 to S52 in the flowchart shown in FIG. However, in this case, the image area table read in step S101 is the image area table shown in FIG.
[0095]
Following the above processing, the edge enhancement control ROM table, that is, the edge enhancement process availability table shown in FIG. 16 stored in the ROM 9 is read based on the size information read from the image area table (step S103). Then, it is determined whether or not to perform edge enhancement processing (step S104). The start of processing is the image 22 with the image area number “0”. Therefore, in the example of FIG. 15B, the size information is “3”, and the table value of the edge enhancement process availability table corresponding to this is shown in FIG. In the example, it is “1”.
[0096]
Thus, when the table value of the edge enhancement process availability table is “1” instructing the edge enhancement process (Y in S104), the actual size is read from the size information (step S105). Thereby, in the example of the size table of FIG. 15C, the actual size “320 × 240” corresponding to the size information “3” is read out.
[0097]
Subsequently, edge enhancement processing of the dot indicated by the address adr is performed (step S106). The processing from step S106 to step S112 is the same as the processing from steps S55 to S61 in FIG. However, it differs from the other embodiments in that the edge enhancement coefficient used in the process is a fixed (that is, one type) edge enhancement coefficient having a value corresponding to an input image of VGA size. As described above, an edge enhancement process is instructed for a relatively large output image, and the edge enhancement process is executed.
[0098]
Further, in the subsequent processing of the image 25 having the image area number “1”, the table value corresponding to the size information “7” in the edge emphasis processing availability table read out in step S103 is “0”. The determination in S104 is “N”. In this case, the process immediately proceeds to step S109. As a result, it is instructed not to perform edge enhancement processing for an output image having a relatively small size, and the edge enhancement processing is ignored.
In the above embodiment, the input image size is set to only the VGA size, and the edge enhancement coefficient of the output image is fixed to one type corresponding to this, but the present invention is not limited to this. Correspondingly, prepare an edge enhancement coefficient table for each input image size, read the output image size, check the possibility of edge enhancement processing corresponding to that size, and set the edge enhancement coefficient. May be.
[0099]
By the way, as described above, a printer for a digital camera directly connects to the camera and executes printing while receiving an image signal. However, there are a plurality of models of cameras connected to the printer. The image processing inside the camera is usually different for each model, and is not uniform depending on the model. For example, the formula for converting the YCbCr signal to the RGB signal is special, noise specific to only a certain type of camera is superimposed on the image, or some cameras have blurry images.
[0100]
If the image is blurred, it needs to be handled differently from the edge enhancement processing that is used depending on the size of the output image described above, and other problems are corrected by image processing from JPEG decompression to writing to the print memory. There is a need to. That is, according to the type of camera connected, it is necessary to use different conversion formulas from YCbCr signals to RGB signals, perform filtering for noise removal, and change edge enhancement coefficients. The present invention is prepared to cope with such a case. This will be described below as a fifth embodiment.
[0101]
FIG. 18A is a filter table corresponding to the model of the camera connected to the printer in this embodiment. In the example shown in FIG. 18A, three models of camera A, camera B, and camera C are shown. Is assumed. The filter table is stored in advance in the ROM 9, and data indicating whether or not to filter is set for each camera. In this example, “1” indicates that filtering is performed, and “0” indicates that filtering is not performed.
[0102]
For convenience of explanation, all these cameras can shoot only the VGA size, that is, the size of the input image to the printer is only the VGA size. Further, it is assumed that there is noise in the output of the camera A, and only the image of the camera A needs to be filtered in order to remove noise from the Y (luminance) signal. Further, it is assumed that the camera B has a characteristic that an image is easily blurred. The ideal conversion formula from YCbCr signal to RGB signal for each camera A, B, C is:
For cameras A and C,
R = Y + 1.402 * Cr
G = Y−0.344 * Cb−0.714 * Cr
B = Y + 1.772 * Cb (1)
For camera B,
R = Y + Cr
G = Y−0.508 * Cr−0.1864 * Cb
B = Y + Cb (2)
Suppose that
[0103]
FIG. 4B is a table showing edge enhancement coefficients for the cameras A, B, and C. Each element of the edge enhancement coefficient shown in the table of FIG. 3 is for dots a, b, and c shown in FIG. 3B in order from the left. These coefficients are a little stronger because the camera A needs to perform low-pass filter processing, the camera B is a stronger coefficient because the received image tends to be blurred, and the camera C has almost no problem with the printer. Since it has no characteristics, it is set as a coefficient that does not emphasize edge too much. In this example, for convenience of explanation, the output image size of the printer is only VGA size. That is, it is assumed that enlargement / reduction processing is not necessary.
[0104]
FIG. 19 is a flowchart of processing selectively performed corresponding to each camera model in the fifth embodiment based on various data set as described above. As shown in the flowchart of FIG. 6, when the print start key 5 is input (step S120), the CPU 4 of the image processing apparatus 1 starts communication with the connected camera 3 (step S121). Then, a command for requesting the product code is transmitted to the camera 3 (step S122). As a result, the product code is transmitted from the camera 3 to the printer, and the printer receives it and stores it in, for example, a register built in the CPU 4 (step S123). The product code is a unique value for each camera model, and the CPU 4 can recognize the model of the camera 3 connected to the product code.
[0105]
Subsequently, image data to be printed is received from the camera 3 (step S124). When the image data is received, the CPU 4 first decompresses the received data and stores it in the work memory 7 (step S125). Then, referring to the acquired product code, it is determined whether or not the camera 3 is a model that requires filtering (camera A in this example) (step S126). If the model of the camera 3 is the camera A, noise removal filtering is performed on the Y (luminance) signal generated by the expansion (step S127). A low-pass filter is used for this process. Further, when this filtering is performed, it is performed on the work memory 7 and the result is stored by overwriting the data before filtering.
[0106]
Next, the product code already acquired is referred again, and it is determined whether or not the model of the camera 3 is the camera B (step S128). If the model of the camera 3 is not the camera A in step S126 (N in S126), the process immediately proceeds to step S128.
[0107]
If it is camera B (S128 is Y), the YCbCr signal is converted into an RGB signal using the above-described equation (2) (step S129). If the model is not the camera B (S128 is N), the YCbCr signal is converted into an RGB signal using the above-described equation (1) (step S130). Thereby, an appropriate “YCbCr → RGB” conversion suitable for the characteristics of the connected camera is executed. This RGB signal (data) is also stored in the work memory 7.
[0108]
Following the above processing, color conversion processing is performed, and this data is stored in the printing memory 8 (step S131). Then, edge enhancement processing is performed on all the image data (image data for one screen) in the printing memory 8 (step S132). The edge enhancement coefficient used for the edge enhancement processing is read from the table indicating the edge enhancement coefficient for each of the cameras A, B, and C in FIG. Then, after the edge enhancement process is finished, printing is executed (step S133).
[0109]
In the fifth embodiment, the processing changed depending on the connected camera model is filtering to Y (luminance) signal, YCbCr → RGB conversion formula, and edge enhancement processing. Similarly, the filtering and color conversion processing may be performed by classifying models by product code.
[0110]
Furthermore, if processing corresponding to the size of the output image described in the first to fourth embodiments is performed among the processing performed for each camera model, the edge enhancement processing is further optimized. Can be done.
[0111]
Also, when a camera other than a registered camera is connected, it is determined that the camera is a new model, and the image processing table data is sent from the camera side to, for example, an EPROM prepared on the printer side. It is preferable to perform writing and to perform the above-described processing using this data on the printer side.
[0112]
Further, the processing may be changed according to the compression format of the input image instead of changing the processing according to the product code. Since the compressed data header includes an identification code in each compression format, the processing may be changed according to the identification code.
[0113]
【The invention's effect】
As explained in detail above, according to the present invention,Since edge enhancement processing is selectively performed for each of multiple image areas in one screen, edge enhancement processing adapted to the size of each image can be performed even when images of different sizes are mixed in one screen. Therefore, it is possible to print a mixed image in which the contour of the image is balanced as a whole.
[0114]
In addition to size information and write address information, the table includes rotation presence / absence information, so that even when the processed image is rotated, correct edge enhancement processing can be performed simply by replacing the size and edge enhancement coefficient. Therefore, it is possible to provide an image processing apparatus that is inexpensive and rich in edge enhancement processing functions.
[0115]
In addition, since the edge enhancement coefficient is fixed in one-to-one correspondence with the size of the input image, the edge enhancement coefficient can be limited to a number corresponding to the type of the size of the input image. Therefore, it is possible to perform appropriate edge enhancement processing even if the output image sizes are mixed in different sizes. Therefore, the capacity of the ROM for the edge enhancement coefficient can be reduced and reduced. It is economical to set an appropriate edge enhancement coefficient with a large amount of work.
[0116]
Further, according to the present invention, when the rotation of the image to be processed is recognized by the rotation presence / absence information, the edge emphasis coefficient set corresponding to the orientation of the image is converted and used according to the rotation of the image. As a result, an optimum edge enhancement process according to the rotation of the image can be performed.
[Brief description of the drawings]
FIG. 1 is a block diagram illustrating a configuration of an image processing apparatus according to a first embodiment.
2A and 2B are diagrams showing the size of an input image of a camera used as an external device in the first embodiment, and FIG. 2C is a diagram showing the resolution of a print image.
3A is a diagram showing an example of an edge enhancement coefficient table (edge processing table) used in the first embodiment, and FIG. 3B, FIG. 3C, and FIG. FIG.
FIG. 4 is a flowchart showing processing operations performed by the CPU of the image processing apparatus in the configuration according to the first embodiment;
5A and 5B are diagrams showing two examples of a print screen for mini label printing. FIG.
FIG. 6 is a diagram showing an example of an edge enhancement coefficient table that can be applied to mini-label printing.
FIG. 7 is a main flowchart of edge emphasis processing that can cope with mini-label printing in the first embodiment;
FIGS. 8A and 8B are sub-flowcharts of edge enhancement processing corresponding to mini-label printing in the first embodiment.
9A is a diagram showing an example of an output image processed in the second embodiment, and FIG. 9B is a relationship between an image area number of each image of the screen configuration and an address on a printing memory. FIG. 6C is a table (area table) showing the correspondence between the image area numbers and the size information and write start address information of each image written in the image area.
FIG. 10 is a flowchart of processing of an output image in which images of different sizes are mixed on one screen in the second embodiment.
FIGS. 11A and 11B are diagrams showing a state in which images are rotated with respect to each other in the third embodiment, and FIGS. 11C and 11D correspond to the images of FIGS. It is a figure which shows an edge emphasis coefficient.
12A is a diagram showing an example of the size and write address of a rotated image in the third embodiment, FIG. 12B is a diagram showing an example of a rotated data table of an output image, and FIG. It is a figure which shows the example of an edge process table when the up-and-down and right-and-left edge emphasis coefficient of a dot differs.
FIG. 13 is a flowchart of processing of a rotated output image having different edge enhancement coefficients in the vertical and horizontal directions according to the third embodiment.
FIG. 14 is a diagram showing eight examples of output image sizes for reference in the fourth embodiment.
FIGS. 15A and 15B are diagrams showing examples of image arrangements of different sizes in the fourth embodiment, FIG. 15B is a diagram showing an example of an area table corresponding to the image arrangements, and FIG. 15C is size information; It is a figure which shows the example of the table which shows the actual size corresponding to.
FIG. 16 is a table for determining whether or not edge enhancement processing is possible for each size of an output image in the fourth embodiment.
FIG. 17 is a flowchart of processing for selectively performing edge enhancement processing according to the size of an output image in the fourth embodiment.
FIG. 18A is a diagram showing a fill table corresponding to the model of a camera connected to a printer in the fifth embodiment, and FIG. 18B is a table showing an edge enhancement coefficient for each camera.
FIG. 19 is a flowchart of processing selectively performed corresponding to each turtle model according to the fifth embodiment;
FIG. 20 is a flowchart illustrating an operation of camera image printing processing by a conventional printer.
FIGS. 21A and 21B are diagrams showing tables used in conventional camera image printing processing, and FIGS. 21C and 21D are image sizes and printing memories specified by these tables. It is a figure which shows the upper address typically.
[Explanation of symbols]
1 Image processing device
2 Print control circuit
3 Digital camera (camera)
4 CPU
5 Print start key
6 Data memory
7 Work memory
8 Print memory
9 ROM
P11, P12 Pixel of interest
10 Coefficient table for mini label printing
11-16 Coefficient sequence
21 Rotation image
22, 25, 26 Output image
23, 27, 29 Write address location
24, 28, 31 Size table data field

Claims (8)

外部機器からの一画面分の入力画像のデータをエッジ強調処理して出力画像のデータを作成するためのエッジ強調度合を示すエッジ処理テーブルと、
一画面内に存在する複数の画像領域毎に基準座標情報とサイズ情報を対応させた画像領域テーブルと、
前記エッジ処理テーブル及び前記画像領域テーブルを格納したメモリと、
該メモリから読み出した前記エッジ処理テーブルと前記画像領域テーブルとに基づいて一画面内に存在するサイズの異なる画像領域に異なるエッジ強調処理を行う画像処理部と、
を備えたことを特徴とする画像処理装置。
An edge processing table indicating the degree of edge enhancement for edge enhancement processing of input image data for one screen from an external device to create output image data;
An image area table that associates reference coordinate information and size information for each of a plurality of image areas existing in one screen;
A memory for storing the edge processing table and the image area table,
An image processing unit that performs different edge enhancement processing on image regions of different sizes existing in one screen based on the edge processing table and the image region table read from the memory;
An image processing apparatus comprising:
前記画像領域テーブルは、更に前記画像領域毎の回転有無情報を含み、前記画像処理部は、前記画像領域テーブルにより選択した処理領域の画像が回転していることを認識したときは該回転画像に応じたエッジ強調処理を行うことを特徴とする請求項記載の画像処理装置。The image area table further includes rotation presence / absence information for each image area, and when the image processing unit recognizes that the image of the processing area selected by the image area table is rotated, the image processing apparatus according to claim 1, wherein the performing the corresponding edge enhancement processing. 前記エッジ処理テーブルは、処理を行うべく所定のメモリ領域に画像を横向き又は縦向きのいずれかで格納したときの該画像に対するエッジ強調係数が予め設定されており、前記画像処理部は、前記所定のメモリ領域内に横向き又は縦向きで格納される画像の向きが前記エッジ処理テーブルのエッジ強調係数が対応する画像の向きと異なる向きの場合には、前記エッジ強調係数の上下の値と左右の値を入れ替え、前記サイズ情報から得られるy方向のサイズとx方向のサイズとを入れ替えて用いることを特徴とする請求項1又は2記載の画像処理装置。Wherein the edge processing table, the processing and the edge enhancement coefficient is set in advance with respect to the image at the time of storing one image in a predetermined memory area of the landscape or portrait orientation in order to perform at the image processing unit, the When the orientation of the image stored horizontally or vertically in the predetermined memory area is different from the orientation of the corresponding image in the edge processing table, the upper and lower values of the edge enhancement factor are the replacement value, the image processing apparatus according to claim 1, wherein the use interchanging the size of the size and the x-direction in the y direction obtained from the size information. 前記エッジ処理テーブルは、入力画像のサイズに一対一に対応する係数列を備え、前記画像処理部は、出力画像に応じてエッジ強調処理を行うか否かを示すエッジ強調処理可否テーブルを備えて、該エッジ強調処理可否テーブルと前記エッジ処理テーブルとにより出力画像に対しエッジ強調処理を実行または非実行とすることを特徴とする請求項1ないし3記載の画像処理装置。The edge processing table includes a coefficient sequence that corresponds to the size of an input image on a one-to-one basis, and the image processing unit includes an edge enhancement processing availability table that indicates whether or not to perform edge enhancement processing according to an output image. the image processing apparatus according to claim 1 to 3, wherein the to perform or not perform edge enhancement processing to the output image by said edge processing table and the edge enhancement processing propriety table. 前記エッジ処理テーブルは、外部機器の機種毎に対応する係数列を有して構成されることを特徴とする請求項1ないし4記載の画像処理装置。The edge processing table, the image processing apparatus of claims 1, characterized in that it is configured with a coefficient sequence that corresponds to each type of the external device 4 according. 前記画像処理部は、前記外部機器から送信される画像処理用の係数データを格納するメモリ領域を更に備え、前記外部機器から送信される画像処理用の係数データが送信されてきたとき前記エッジ強調処理前の画像処理を前記送信された係数データを用いて行うと共に前記各テーブルの係数を前記送信された係数と入れ替えて処理を行うことを特徴とする請求項1ないし5記載の画像処理装置。The image processing unit further includes a memory area for storing coefficient data for image processing transmitted from the external device, and the edge enhancement is performed when the coefficient data for image processing transmitted from the external device is transmitted. the image processing apparatus according to claim 1 to 5, wherein the coefficient of each table and performing the processing by replacing said transmission coefficient processing image processing before performs by using the coefficient data in which the transmitted. 処理対象の画像のサイズ情報、該画像を処理するべく所定のメモリ領域に格納したときの該画像の所定の向きに対応して予め設定されるエッジ強調係数及び前記所定のメモリ領域に格納される処理対象の画像の回転有無情報を格納するメモリと、
該メモリに格納される回転有無情報により処理対象の画像の回転が認識されたときには、前記エッジ強調係数及び前記サイズ情報を画像の回転に応じて変換して用いることにより該回転画像に応じたエッジ強調処理を行う画像処理部と
を備えることを特徴とする画像処理装置。
The size information of the image to be processed, the edge enhancement coefficient set in advance corresponding to the predetermined orientation of the image when the image is stored in the predetermined memory area to be processed, and the predetermined memory area A memory for storing rotation information of the image to be processed;
When the rotation of the image to be processed is recognized by the rotation presence / absence information stored in the memory, the edge corresponding to the rotated image is converted by using the edge enhancement coefficient and the size information according to the rotation of the image. An image processing unit for performing enhancement processing ;
An image processing apparatus comprising:
前記エッジ強調係数は、前記所定のメモリ領域に画像を横向き又は縦向きのいずれかで格納したときの該画像に対するエッジ強調度合を示し、前記画像処理部は、前記所定のメモリ領域内に横向き又は縦向きで格納される画像の向きが前記エッジ強調係数が対応する画像の向きと異なる向きの場合には、前記エッジ強調係数の上下の値と左右の値を入れ替え、前記サイズ情報から得られるy方向のサイズとx方向のサイズとを入れ替えて用いることを特徴とする請求項7記載の画像処理装置。The edge enhancement coefficient indicates the degree of edge enhancement for an image when the image is stored in the predetermined memory area in either landscape or portrait orientation, and the image processing unit When the orientation of the image stored in the portrait orientation is different from the orientation of the image corresponding to the edge enhancement coefficient, the upper and lower values and the left and right values of the edge enhancement coefficient are exchanged, and y obtained from the size information 8. The image processing apparatus according to claim 7, wherein the size in the direction and the size in the x direction are used interchangeably.
JP35052296A 1996-12-27 1996-12-27 Image processing device Expired - Fee Related JP3671270B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP35052296A JP3671270B2 (en) 1996-12-27 1996-12-27 Image processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP35052296A JP3671270B2 (en) 1996-12-27 1996-12-27 Image processing device

Publications (2)

Publication Number Publication Date
JPH10191029A JPH10191029A (en) 1998-07-21
JP3671270B2 true JP3671270B2 (en) 2005-07-13

Family

ID=18411076

Family Applications (1)

Application Number Title Priority Date Filing Date
JP35052296A Expired - Fee Related JP3671270B2 (en) 1996-12-27 1996-12-27 Image processing device

Country Status (1)

Country Link
JP (1) JP3671270B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW502532B (en) 1999-12-24 2002-09-11 Sanyo Electric Co Digital still camera, memory control device therefor, apparatus and method for image processing
JP4862372B2 (en) * 2005-11-30 2012-01-25 ブラザー工業株式会社 Image processing program and image processing apparatus

Also Published As

Publication number Publication date
JPH10191029A (en) 1998-07-21

Similar Documents

Publication Publication Date Title
US7916973B2 (en) Image processing apparatus, an image processing method, and a computer readable medium having recorded thereon a processing program for permitting a computer to perform image processing routines
JP4935868B2 (en) Image processing device
CN101860654B (en) Image processing apparatus, image forming apparatus and image processing method
US20050008254A1 (en) Image generation from plurality of images
JP2002027260A (en) Gray converting method for color picture and device for the same
EP1922693A2 (en) Image processing apparatus and image processing method
EP0982933A2 (en) Printer
JP3671270B2 (en) Image processing device
JP4293261B2 (en) Image shooting device
JP2002118737A (en) Image converter and image conversion method
JP3253536B2 (en) Electronic still camera
JP3503136B2 (en) Pixel interpolation device and pixel interpolation method
JP2002330322A (en) Electronic camera
KR100919979B1 (en) Method and apparatus retouching an photographed image
JP4125080B2 (en) Image processing apparatus, image processing method, and recording medium
JP3456169B2 (en) Digital camera
JPH0690501B2 (en) Layout equipment for printing plate making
JPH0690496B2 (en) Solid mesh film making device
JP2003244583A (en) Printing system, imaging equipment, printer equipment, image processing equipment and image processing method
JPH07131635A (en) Color printer
JPH0698349A (en) Color picture processing system and electronic device being component of the system
JPH07131666A (en) Image forming device
WO1998042125A1 (en) Image pick-up system
JPH0872328A (en) Printer
JPH11196428A (en) Image pickup device and its control method

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20050225

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20050404

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

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20090428

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20100428

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20110428

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20120428

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20120428

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20130428

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20130428

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20140428

Year of fee payment: 9

LAPS Cancellation because of no payment of annual fees