JP3971614B2 - Image data transmission method and image data transmission apparatus - Google Patents
Image data transmission method and image data transmission apparatus Download PDFInfo
- Publication number
- JP3971614B2 JP3971614B2 JP2002012451A JP2002012451A JP3971614B2 JP 3971614 B2 JP3971614 B2 JP 3971614B2 JP 2002012451 A JP2002012451 A JP 2002012451A JP 2002012451 A JP2002012451 A JP 2002012451A JP 3971614 B2 JP3971614 B2 JP 3971614B2
- Authority
- JP
- Japan
- Prior art keywords
- color
- representative
- block
- group
- image
- 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
Links
Images
Description
【0001】
【発明の属する技術分野】
本発明は、色データを圧縮、復元する画像データ送信方法及び画像データ送信装置に関するものである。
【0002】
【従来の技術】
カラー画像は色についてのデータ量が膨大である。このため、画像の表示や転送を行う際には元の色データの色数をより少数の色数で近似してデータ量の削減を図ることがよく行われている。
【0003】
このようなカラー画像の圧縮方法として、例えば特開昭61−252792号に記載されている手法が知られている。この手法では、レッド信号R、グリーン信号G、ブルー信号Bが、各々独立に扱われる。この手法について、図28および24を用いて概要を説明する。この手法を採用する画像処理装置では、図29に示すように、画像情報の各色で独立して入力手段2300a、2300b、2300cが設けられている。入力手段2300a、2300b、2300cを介して入力された各色データは、前段符号化手段2301a、2301b、2301cに与えられる。前段符号化手段2301a、2301b、2301cは、それぞれ色データの平均値を求める。この平均値に基づいてカラー画像の特定ブロックは2つの領域に分割される。さらに、それぞれの分割領域に含まれる画素のデータを平均することで2つの代表値が算出される。以上の処理で、ブロック内の各色は2つの領域に分割され、各色で2つの代表値が求められる。RGBの3色の組み合わせによって、領域は計2の3乗=8つ得られる。そして、分割された8つの領域を代表する8つの代表色が得られる。後段符号化手段2302は、この8色の上記ブロックにおける出現頻度を検出することで代表色として2色を選択し、このブロック内の色データの代表色とする。得られた2色の代表色とこの代表色で画像内の画素データを近似するための位置情報は、インターネット等の通信媒体やインターフェースを介して復号化手段2303に送られる。復号化手段2303では、所定の画素座標に代表色を埋めることで復元画像が作成され、復元画像は、出力手段2304a、2304b、2304cによって出力される。
【0004】
また、他の手法として、RGB信号の主成分分析を行うことで近似データを求める手法(例えば、特開平1−264092号)が知られている。これは、特定のブロックを代表する色(主成分色)を、RGB信号の相関を考慮して決定し、この主成分色に基づいて上記ブロックの分割を行って、このブロック内の色を所定数の色により近似する手法である。
【0005】
【発明が解決しようとする課題】
しかし、上記特開昭61−252792号に記載されているような手法では、RGB信号が各々独立に扱われ、各色の相関が全く考慮されないため、復元画像における歪みを生じやすく、歪み程度を定量評価するSN比(Signal to Noise Ratio)も良好な結果は得られないことがしばしば指摘されていた。
【0006】
また、上記特開平1−264092号で使用した主成分分析は、RGB信号の相関を求めるために多次元の行列演算を必要とするので処理量が多くなるとともに、処理回路等のハードウェア規模の増大化を招く恐れがあった。さらに、CPU等のソフトウェア処理の場合も、処理時間を多く要することが問題であった。
【0007】
本発明は、このような従来の技術における課題を鑑みてなされたのもであり、小領域内の色データの近似を高精度かつ高速に行う画像処理方法及び画像処理装置を提供することを目的とするものである。
【0008】
【課題を解決するための手段】
上記目的を達成するために、本発明は、以下の手段を採用している。
【0009】
本発明において、領域分割手段は、入力された画像を複数の小領域に分割する。参照色テーブルセットは、予め用意された参照色セットを有しており、色データ分類手段は、小領域内の色データとテーブル内の参照色をもとに小領域内の色データを所定数のグループに分割する。代表色決定手段は、得られた各グループ内の色データの代表色を求める。そして、対象領域近似手段は、得られた所定数の代表色を使って各小領域の色データを近似する。
【0010】
このようにして所定数の代表色が求められる場合、所定数のグループが、小領域内の色データとテーブル内の参照色をもとに得られるから、小領域内の色データの近似は高速に行われる。
【0011】
代表色決定手段は、例えば総和分散計算手段の計算結果を使ってグループ内の色データの代表色を求める。総和分散計算手段は、色データ分類手段によって得られた各グループにおける色データの平均値からの分散の総和を計算する。この場合、分散の総和が小さい代表色が求められることによって、近似の精度が確保される。
【0012】
もっとも、予め用意された参照色セットでは、近似の精度が十分に確保できない可能性もある。このため、代表色決定手段とは別に逐次的代表色決定手段を設け、逐次分割判定値計算手段が分割判定値を計算し、逐次分割判定手段はこの分割判定値をもとに逐次的代表色決定手段により代表色を決定するかどうかを判定するようにしてもよい。
【0013】
逐次分割判定値計算手段は、色データ分類手段によって得られた各グループにおける色データの平均値と色データ分類手段で使用された参照色より分割判定値を計算する。逐次分割判定手段は、分割判定値をもとに逐次的代表色決定手段により代表色を決定するかどうかを判定する。
【0014】
逐次分割判定手段の判定に従い、逐次的代表色決定手段により代表色が決定される場合には、対象領域近似手段は、代表色決定手段ではなく、逐次的代表色決定手段で得られた所定数の代表色を使って各小領域の色データを近似する。
【0015】
逐次的代表色決定手段は、対象グループ内の色データの分布をもとに選択された分割着目成分に関する基準をもとに対象グループを複数のグループに分割し、得られた各グループの代表色を決定する処理を、代表色が所定数得られるまで繰り返す。このため、対象領域に合った近似が行われ、近似の精度は向上する。逐次的に代表色を求める処理が行われるのは、予め用意された参照色セットで近似の精度が十分に確保できない箇所だけであるから、全体としては高速且つ高精度の近似が行われる。
【0016】
また、参照色を利用しないで近似の高速化及び高精度化を図ることも可能である。例えば、初期設定手段は、小領域に対して初期のグループを設定し、小領域内の色データ全てを初期のグループに分類し、初期のグループの代表色を求める。着目成分選択手段は、対象グループ内に属する色データの分布をもとに、対象とするグループに分割時に着目する分割着目成分を複数選択する。グループ分割手段は、得られた複数の分割着目成分に従い、対象とするグループを複数に分割するとともに、対象グループに属する色データを分割後に得られたグループに振り分ける。この場合、代表色抽出手段は、グループ分割手段によって得られた各グループに属する色データの代表色を求める。終了判定手段は、代表色が所定数得られたかどうかの判定を行う。代表色が所定数得られるまで分割着目成分の選択から代表色の抽出が繰り返され、終了判定手段により代表色が所定数得られたと判定された場合には、対象領域近似手段は、得られた所定数の代表色を使って各小領域の色データを近似する。
【0017】
このように逐次的に所定数の代表色が求められる場合でも、複数の分割着目成分に従いグループが分割されるから、繰り返しの回数がその分だけ少なくなる。その結果、近似は高精度且つ高速に行われる。
【0018】
着目成分選択手段が複数の分割着目成分を選択する場合には、例えば成分別分散計算手段が、対象グループ内の色データの代表色と色データの各成分の分散を計算する。また、分割成分決定手段は、各成分のうち成分別計算手段で得られた分散値が大きい成分から順番に分割着目成分を選択する。
【0019】
分散値の大きい成分について順次グループの分割が行われることになるから、近似の精度は高い。もっとも、ユーザは常に高精度の近似を求めるとは限らない。例えばユーザは精度よりも速度を求める場合もあれば、サムネイル画像のように画像を識別するのに十分なだけの精度しか求めない場合もある。この場合には、逐次的に得られる代表色を利用することができる。
【0020】
このために、保持判断手段は、所定数に複数設定された各段階の代表色が得られたかどうかの判断を行う。段階符号化保持手段は、保持手段で代表色が得られたと判断された場合に、各段階での代表色と当該代表色を使用して小領域内の色データを近似するための位置情報を保持する。ユーザ画質選択手段は、複数の画質モードのうちユーザがいずれかの画質モードを選択するために用いられる。適切代表色読出手段は、ユーザ画質選択手段を用いた選択結果に従い、段階符号化保持手段より選択モードに応じた代表色と位置情報を呼び出す。この場合、終了判定手段は、代表色が最大所定数得られたかどうかの判定を行い、対象領域近似手段は、終了判定手段で代表色が最大所定数得られたと判定された場合、適切代表色読出手段により得られた代表色を使って各小領域の色データを近似する。
【0021】
これによって、例えばサムネイルモード、高速モード、高精細モードなど、伝送先のユーザにより指示された画質モードに合わせた近似が行われる。その結果、高いユーザフレキシビリティが確保される。
【0022】
また、代表色を逐次的に求める場合に、近似の高精度化及び高速化を図るために、第2グループ分割手段を設けるようにしてもよい。この場合、着目成分選択手段は、複数の分割着目成分を選択する必要はない。
【0023】
第2グループ分割手段は、グループ分割手段によって得られた各グループ内の色データをもとに各グループをさらに複数のグループに分割するとともに、各グループ内の色データを分割後に得られたグループに振り分ける。
【0024】
代表色抽出手段は、グループ分割手段ではなく第2グループ分割手段で得られた各グループに属する色データの代表色を求める。
【0025】
この場合、グループ分割手段によって得られた各グループ内の色データをもとに各グループがさらに複数のグループに分割されるため、その分だけ繰り返し回数が少なくなる。このため、近似は高精度且つ高速に行われる。第2グループ分割手段による分割によって、グループ分割手段による分割が1回しか行われない場合もある。
【0026】
第2グループ分割手段は、例えば補助分割基準計算手段と再グループ分割手段とを備える。補助分割基準計算手段は、グループ分割手段で得られた各グループ内の色データの原点からのユークリッド距離を計算する。再グループ分割手段は、補助分割基準計算手段の計算結果をもとに、グループ分割手段で得られたグループをさらに細分化するとともに、対象グループ内の色データを分割後に得られたグループに振り分ける。
【0027】
このように各グループ内の色データの原点からのユークリッド距離を利用することによって、近似の精度は確保される。
【0028】
また、上述のように代表色を逐次的に求める場合でも、一部の小領域についてのみ代表色が逐次的に求められるのであれば、全体として近似は高精度且つ高速に行われる。
【0029】
このために、色データ統計量算出手段は、小領域内の色データの統計的分布を求める。既代表色利用判定手段は、色データの統計的分布を既に代表色が抽出された抽出済み領域より得られた統計的分布と比較して、抽出済み領域の代表色を利用するかどうかを判定する。類似領域決定手段は、小領域と最も類似度の高い抽出済み領域を選択する。色データ分類手段は、小領域内の色データと選択された抽出済み領域内の代表色をもとに小領域内の色データを所定数のグループに分割する。簡易代表抽出手段は、色データ分類手段によって得られた各グループに属する色データの代表色を求める。既定代表色利用判定手段により抽出済み領域の代表色を利用するとの判定がされた場合には、代表色決定手段ではなく簡易代表抽出手段で得られた所定数の代表色を使って各小領域の色データを近似する。
【0030】
このように、統計的分布がよく似ている抽出済み領域があれば、その抽出済み領域の代表色を利用して所定数の代表色を求めることも可能である。これによって、全体として近似は高精度且つ高速に行われる。統計的分布がよく似ている領域が連続するような場合には、近似速度の高速化が著しくなる。
【0031】
なお、小領域内の色データの統計的分布は、例えばヒストグラムによって表される。
【0032】
また、抽出済み領域を適当に設定するようにしてもよい。このために、逐次分割対象決定手段は、小領域のうち代表色決定手段により代表色が決定される領域を選択する。逐次分割対象決定手段で選択された領域については逐次的に代表色が求められる。逐次分割対象決定手段で選択された領域は、抽出済み領域となる。近接類似領域決定手段は、抽出済み領域のうち、逐次分割対象決定手段で選択されていない小領域に近接する抽出済み領域より得られた統計量と小領域の統計量を比較して、最も類似度の高い抽出済み領域を選択する。この場合、簡易代表抽出手段は、近接類似領域決定手段で選択された抽出済み領域の代表色をもとに、対象小領域内の色データを所定数のグループに分割し各グループに属する代表色を求める。そして、対象領域近似手段は、逐次分割対象決定手段で選択されていない小領域については、簡易代表色抽出手段で得られた所定数の代表色を使って各小領域の色データを近似する。
【0033】
このように予め定めた領域について逐次的に代表色を求めておき、それ以外の領域については、近接する抽出済み領域の代表色を利用して代表色を求めることによって、全体として近似は高精度且つ高速に行われる。なお、精度のばらつきを抑えるためには、逐次的に代表色を求める領域を画像から均等に選択するのが好ましい。
【0034】
【発明の実施の形態】
以下、本発明の実施の形態について図面を参照しながら説明する。なお、各実施の形態において色データとは、画素におけるカラー信号を表すものであり、RGB表色系ではレッド、グリーン、ブルーの3成分からなるデータを表すものとする。また、各実施の形態における画像処理装置の構成図の各図において、同一部には同じ番号を付している。
【0035】
(第1の実施の形態)
まず、本発明の第1の実施の形態における画像処理方法及び画像処理装置について説明する。図2に示すように、画像処理装置において、領域分割手段21は、入力画像20を微小なブロック領域に分割する。初期設定手段22は、対象とするブロック領域内の色データを逐次的にグループ分割する際の初期グループ設定を行う。着目成分選択手段23は、分割対象グループ内の色データの分布をもとに、このグループの分割時の着目成分を決定する。グループ分割手段24は、上記着目成分に従い対象グループを複数に分割するとともに、対象グループに属する色データを分割後に得られたグループに振り分ける。代表色抽出手段25は、上記グループ分割手段24で得られた各グループに属する色データの代表色を求める。終了判定手段26は、代表色が予め設定された所定数得られたかどうかの判定を行う。対象領域近似手段27は、得られた所定数の代表色を使って各ブロック領域内の色データを近似する。
【0036】
そして、初期設定手段22は、対象ブロック領域に属する色データの原点からのユークリッド距離を求める距離計算手段29と、上記ユークリッド距離をもとに領域内の全色データを複数のグループに分類する初期グループ分割手段30と、上記手段で得られた各グループ内に属する色データの平均色をそのグループの代表色とする初期代表抽出手段31より構成されている。また、着目成分選択手段23は、対象グループに属する色データの代表色と属する色データの各成分の分散を計算する成分別分散計算手段32と、上記成分別分散計算手段で得られた分散値より大きい成分から順番に選び出し、グループ分割時における分割着目成分とする分割成分決定手段33より構成される。
【0037】
以上のように構成された第1の実施の形態における画像処理装置の動作及び画像処理方法について図1をもとに説明する。図1に示すように、入力されたカラー画像20は領域分割手段21で微小なブロック領域に分割される(S1)。これは、微小領域内にある色データ数はある程度限られるため、少ない色データで表現しても精度の悪化はそれほど大きくないであろうことを利用したものである。そして、以降の代表色抽出処理はブロック領域ごとに処理が実行される。この処理方法では、以降説明するように近似画像の高精度化を実現するために、対象ブロック領域内の色データの統計的分布をもとに逐次的にグループ化と各グループを代表とする代表色抽出が行われる。
【0038】
まず初期設定手段22では、逐次的に分割処理を行う際の初期グループとその代表色が設定される(S2)。設定の方法には、例えば図5(a)に示すように、対象ブロック内の全データが1つのグループに属するとして1つの初期グループが設定される方法や、図5(b)に示すように、対象ブロック内の全色データの原点からのユークリッド距離を求め、複数の初期グループに分類設定する方法等がある。図2に示すブロック構成は、図5(b)に示す方法を前提としている。距離計算手段29で対象ブロックBk内の色データcIj( rj, gj, bj )( j = 0,…,pxl_k )の原点からのユークリッド距離length_k[j]が計算される。初期グループ分割手段30は、(数1)に従って、初期グループを2つのグループに分割する。ここで、ave_length_kは対象ブロックk内の距離length_k[j]の平均値を示し、t_k_pixはk内の全画素数を示す。また、‖cIj‖は色データcIjをベクトルと見なした場合のベクトルの長さ(ノルム)を表す。
【0039】
【数1】
【0040】
初期代表抽出手段31では、このグループ0と1に属する各色データの平均値が、このグループの代表色として求められる。なお、初期グループ分割手段30では初期グループが2つに設定されたが、この数は一意ではなく、もっと多くすることも可能である。精度よくブロック内データをグループ分割するためには2つ程度が好ましい。また、図5(a)に示すように1つの初期グループ設定も可能であり、この場合には、図2において距離計算手段29と初期グループ分割手段30の処理は省くことができる。この時、所定数の代表色を求めるまでの逐次処理回数が増大するため、処理時間の短縮化にならないが、最終的に代表色抽出精度とそれを使用して得られる近似画像の精度は図5(b)に示す方法よりも高くなる。
【0041】
この初期グループをもとに着目成分選択手段23、グループ分割手段24、代表色抽出手段25、終了判定手段26が、対象ブロック内の色データを逐次的にグループ分割し代表色を抽出する処理を行う。その処理の具体例を図3に模式的に示す。なお、この具体例では、分割対象グループSは4個に分割されるものとする。
【0042】
図3(a)は、r、g、b軸から構成される空間における対象グループS、代表色RIs、入力画素の色データIs[j]を表す。ここでは、現在の分割対象グループSをグループ1(S=1)に設定し、現在の分割対象グループSを代表する代表色RIs( Rrs, Rgs, Rbs )を代表色RI1 kに設定したものとする。また、現在の代表クラスタベクトル数numはnum=1とし、テンポラリ変数tnumはtnum=1とする。
【0043】
成分別分散計算手段32は、現在の分割対象グループS内に所属するNs個の画素色データIs[j]( rs[j], gs[j], bs[j] )に対して、図3(b)に示すように、r、g、b軸各々独立に代表色RIsに対する偏差絶対値の総和(分散値)δrs、δgs、δbsを求める(S3)。
【0044】
分割成分決定手段33は、上記により得られた代表色RIs に対する偏差絶対値の総和δrs、δgs、δbsを大きい順番に並べ、最大値を持つ軸Amax1と次に大きな分散値を持つ軸Amax2を選択する(S4)。図3(b)の例では、最大値を持つ軸Amax1は、r軸であり、次に大きな分散値を持つ軸Amax2は、g軸である。
【0045】
図3(c)は、図3(a)、図3(b)をb軸よりみたものである。図3(c)に示すように、グループ分割手段24は、現グループS内のNs個の画素色データIs[j]をAmax1方向に2つのグループに分割し、Amax2方向にも2つのグループに分割する(S5)。これにより、グループSは計4個のグループに分割されることとなる。
【0046】
グループ分割の処理は、代表色RIsのAmax1成分とグループSに属する各画素色データIs[j]のAmax1成分、そして代表色RIsのAmax2成分とグループSに属する各画素色データIs[j]のAmax2成分を比較しその大小関係をもとに行われる。図3(c)の例では、(数2)のよう、グループ分割が行われる。
【0047】
【数2】
【0048】
代表色抽出手段25は、図3(d)に示すように、上記で得られた4つのグループS、num+1、num+2、num+3の各重心を、新しい代表色RIs( Rrs, Rgs, Rbs )、RInum+1( Rrnum+1, Rgnum+1, Rbnum+1 )、RInum+2( Rrnum+2, Rgnum+2, Rbnum+2 )、RInum+3( Rrnum+3, Rgnum+3, Rbnum+3 )とする(S6)。そして、代表色数numをnum=num+3とする。
【0049】
また、代表色抽出手段25は、得られた代表色とブロック内画素をどの代表色で近似するかを表す位置情報を一時保持する。この代表色は再度分割する際に、成分別分散計算手段32での各成分の分散値計算に使用される。図4はその際に保持される情報を表す。
【0050】
Sがtnumに到達しておらず必要な代表色が抽出されていなければ(S7)、現在の分割対象グループを表す番号SをS=S+1に設定して対象グループを変更し(S8)、手順S3からの処理が繰り返される。
【0051】
そして、numが予め設定した代表色数c_numに達したかどうかを判定し(S9)、達していない場合には、S=1、tnum=numと設定する。そして、手順S2からの処理が行われる。このような終了判定を、終了判定手段26が行う。
【0052】
以上の処理により抽出された所定数c_numの代表色と、その内のどの代表色でブロック内画素の色データを近似するかを表す位置情報が保持される。そして、この保持情報を使って、近似・復元先にある対象領域近似手段27が各ブロック領域内の画素データを近似復元する(S10)。これは、図4のように位置情報( i, j )が対象ブロック内の画素座標( i, j )に対応しており、この位置情報座標に埋め込まれた代表色を対応する画素座標に埋め込むことで近似画像が生成され、出力画像28を得ることができるのである。なお、ここでは分割対象グループSを4個に分割する例で説明したが、最大分散値を持つ軸Amax1のみを分割する(2個に分割する)ことも考えられる。この場合、抽出される代表色の精度は4個分割の場合よりも向上することが期待され、最終的に得られる出力画像の高精度化にもつながる。しかし、逐次分割のための処理回数が増えるため、処理速度は多少遅くなる。また、分割対象グループを8個に分割することも可能であるが、この場合は、成分別分散計算手段32及び分割成分決定手段33の処理が省かれ、高速な代表色抽出が可能となるが、抽出精度が劣化する可能性が大きいので、目的に応じて分割対象グループを分割する数を制御する手段を加えることが考えられる。また、対象ブロック領域内の色データの分布を求め、その分布変動に応じて上記対象グループの分割数を制御することも同様に考えられる。
【0053】
以上のように、本実施の形態によれば、細分化された領域内の色データの平均値や平均値からの分散の大きい色方向から順次複数のグループに分割し各グループを代表する代表色抽出を行うため、高精度でかつ高速な領域分割と各領域内を代表する代表色を抽出することができる。
【0054】
なお、これらの処理は本発明の第1の実施の形態における画像処理方法に従いコンピュータ等に使用される中央演算処理装置(CPU)及びデジタルシグナルプロセッサ(DSP)等を使ったソフトウェア処理でも同様に実現することができる。さらに、これらの処理は本発明の第1の実施の形態における画像処理方法に従って作成された半導体チップを使うことでも同様に実現することができる。
【0055】
(第2の実施の形態)
次に、本発明の第2の実施の形態における画像処理方法及び画像処理装置について説明する。図7に示すように、画像処理装置において、第2グループ分割手段70はグループ分割手段24で得られた複数のグループを色データによりさらに複数グループに分割するとともに、対象グループ内の色データを分割後に得られたグループに振り分ける。
【0056】
そして、第2グループ分割手段70は、グループ分割手段24で得られたグループ内の画素色データの原点からのユークリッド距離を計算する補助分割基準計算手段71と、上記補助分割基準値をもとに、グループ分割手段24で得られたグループをさらに細分化するとともに、対象グループ内の色データを分割後に得られたグループに振り分ける再グループ分割手段72より構成される。
【0057】
以上のように構成された第2の実施の形態における画像処理装置の動作及び画像処理方法について図6のフローチャート図をもとに説明する。また、図8はこの実施の形態におけるグループ分割の様子を模式的に表す。本発明の第1の実施の形態における画像処理方法及び画像処理装置と同様に、入力画像20を複数のブロックに分割してから(S1)、初期設定手段22は、初期グループとその代表色をいくつか設定する(S2)。この後、成分別分散計算手段32が、図8(a)に示すような分割対象グループSに対して、図8(b)に示すように、グループS内の色データの代表色からの分散値δrs、δgs、δbsの計算を行う(S3)。分割成分決定手段33は、各r、g、b軸における分散値の最大値をもつAmax成分を分割着目成分として選択する(S21)。図8(b)の例では、分割着目成分としてr軸が選択されている。図8(c)に示すように、グループ分割手段24は、Amax成分に沿って対象グループを2つに分割し、代表色のAmax成分とグループSに属する各画素色データIs[j]のAmax成分を比較してその大小関係で2つのグループ分割する処理を行う(S22)。ここで得られたグループを改めてグループSとグループnum+1とする。なおnumは分割する前のグループ数を示す。
【0058】
次に、第2グループ分割手段70は、図8(d)に示すように、このグループSとグループnum+1を各々さらに2つのグループに分割する処理を行う。この際、まず、補助分割基準計算手段71でグループSとnum+1内に属する画素色データの原点からのユークリッド距離lenが求められる(S23)。そして、再グループ分割手段72において、グループS内の画素色データの距離の平均値をもとにグループSがグループSとnum+2に分割され、各色データが振り分けられる。同様に、グループnum+1はグループnum+1とnum+3に分割され、グループnum+1の色データが分類される(S24)。こうすることで、グループを分割する処理回数を減らすことができ、高速なグループ分割を行うことができる。
【0059】
そして、代表色抽出手段25は、この時点で得られたグループ内の色データの平均値を求め、そのグループの代表色とする(S6)。終了判定手段26は、所定の代表色数が抽出されたかどうかの判定を行い(S7)、得られていない場合には、対象グループが変更されてから(S8)、成分別分散計算手段32による手順S3からの処理が繰り返される。一方、代表色抽出が終了したと判定された場合には、全ブロックの処理が終了していれば(S9)、画像近似する時点において、対象領域近似手段27が得られた代表色と各画素色データを近似する際の位置情報をもとに、入力画像の近似画像を作成し、出力画像28を得る(S10)。
【0060】
以上のように、本実施の形態によれば、細分化された領域内の色データの平均値や平均値からの分散の最も大きい色方向で2つにグループ分割を行った後、改めて所属するグループ内の色データの原点からの距離をもとに複数分割を行うことで、グループ分割を行う処理回数を減らすことができる。
【0061】
なお、これらの処理は本発明の第2の実施の形態における画像処理方法に従いコンピュータ等に使用される中央演算処理装置(CPU)及びデジタルシグナルプロセッサ(DSP)等を使ったソフトウェア処理でも同様に実現することができる。さらに、これらの処理は本発明の第2の実施の形態における画像処理方法に従って作成された半導体チップを使うことでも同様に実現することができる。
【0062】
(第3の実施の形態)
次に本発明の第3の実施の形態における画像処理方法及び画像処理装置について説明する。図10は第3の実施の形態における画像処理装置の構成を表す。図10に示す画像処理装置において、参照色テーブルセット100は予め用意された参照色セットを持つ。色データ分類手段101は、対象ブロック領域内の色データと参照色テーブルセット内の参照色セットをもとに小領域内の色データを所定数のグループに分割する。総和分散計算手段102は、各グループにおける平均値からの分散の総和を計算する。代表色決定手段103は、色データ分類手段101で得られた複数のグループ分割結果より1つの分割結果を選び出し、その際に得られたグループ内色データの代表色を求める。
【0063】
以上のように構成された第3の実施の形態における画像処理装置の動作及び画像処理方法について図9のフローチャートをもとに説明する。
【0064】
入力画像20は領域分割手段21で複数の微小ブロック領域に分割される(S1)。そして、各ブロック領域ごとに代表色抽出されるのは本発明の第1の実施の形態と同様である。しかし、第3の実施の形態では、対象ブロック内にまず初期グループを設定し、逐次的にグループ分割を繰り返す処理が行われない。第3の実施の形態では、予め用意されたテーブルセットより適切な1組のn個の参照色が選択され、その参照色をもとに対象ブロック内の画素色データがn個のグループに分類され、各グループを代表する代表色が抽出される。
【0065】
参照色テーブルセット100の作成には、例えば第1の実施の形態における画像処理が利用される。この場合、多くの画像サンプルについて予め第1の実施の形態における画像処理が行われ、所定数nの代表色のセットがKK個求められる。このKK個をそのままKK個の参照色セットとしてテーブル化してもよい。また、このKK個のnの代表色で構成されるベクトルにベクトル量子化手法のような統計的手法を適用して、LL個のnの参照色を持つセットを作成することも考えられる。統計的手法の代わりに、コホーネンの自己組織化ニューラルネットワークのような手法を適用することも可能である。
【0066】
代表色のセットを用意するために、例えばテクスチャ、文字、比較的平坦な画像など特徴的な画像の平均画像が利用されることがある。この場合、各画像の平均画像が生成されてから、各平均画像に第1の実施の形態における画像処理が施され、代表色のセットが用意される。この場合でも、代表色のセットは、同じ個数の参照色セットとしてテーブル化してもよいし、ベクトル量子化手法などにより異なる個数の参照色セットとしてテーブル化してもよい。さらに、別途画像を用意せずとも、同じ画像について既に処理されたブロックの代表色を参照色セットに利用することも可能である。
【0067】
人物の肌、植物、空などの各分類対象について代表色のセットを用意するために、予め用意された複数の画像を細分化して得られたブロックが利用されることもある。この場合、各ブロックは、各分類対象が占める割合で分類され、分類されたブロックについて代表色抽出処理が行われる。これによって求められた代表色のセットは、対応する分類対象についての参照色としてそのままテーブル化してもよいし、その他の例と同様、ベクトル量子化手法などを利用してテーブル化してもよい。
【0068】
また、1セット内の代表色数は一律nにする必要はなく、可変にすることも可能である。その場合は、多くの画像サンプルから得られたn段階の代表色セットを同様にKK個用意し、各段階におけるKK個の代表色セットから、上記のような手法で複数個の参照色セットを求めテーブル化することで参照色テーブルセット100が用意される。
【0069】
色データ分類手段101は、まず参照色テーブルセット100内からm番目のn個の参照色セットdRIt_m ( t = 0,…,n-1 )を選択する(S31)。次に、図11に示すように、この参照色セットでブロック内kの画素データI_k[j]がn個のグループに分類される(S32)。その分類は、例えば参照色セットdRIt_m ( t = 0,…,n-1)と画素データI_k[j]の距離をもとに行われ、画素データI_k[j]は、最も距離の小さい参照色のグループtに分類される。その後、n個のグループ内での平均値が求められる(S33)。各グループ内での平均値からの分散値が求められ、m番目の参照色セットを用いた際の各グループ平均値からの分散値の総和δ_mが計算される(S34)。この処理がすべての参照色セットに対して行われると(S35、S36)、代表色決定手段103は、この分散値の総和が最小となる参照色セットmより得られた平均値を対象ブロック領域kに対して得られた代表色として決定する(S37)。そして、この時のブロック内画素データに対する位置情報も合わせて保持され、全ブロックの処理が終了していれば(S9)、画像復元時にこの代表色と位置情報を用いることで、対象領域近似手段27は、出力画像28を生成する(S10)。
【0070】
こうすることで、本発明の第1や第2の実施の形態における画像処理方法及び画像処理装置のように、いちいち逐次的にグループ分割を行うことなく、高速に対象領域内の色データの分割と代表色抽出ができる。そして、予め多くの画像サンプルより用意された精度の高い参照色セットを複数用意してやることで、入力画像にあまり影響されることなく精度のよい代表色抽出が行え、復元近似された画像の精度の劣化を抑えることができる。
【0071】
なお、これらの処理は本発明の第3の実施の形態における画像処理方法に従いコンピュータ等に使用される中央演算処理装置(CPU)及びデジタルシグナルプロセッサ(DSP)等を使ったソフトウェア処理でも同様に実現することができる。さらに、これらの処理は本発明の第3の実施の形態における画像処理方法に従って作成された半導体チップを使うことでも同様に実現することができる。
【0072】
(第4の実施の形態)
次に本発明の第4の実施の形態における画像処理方法及び画像処理装置について説明する。図13に示す画像処理装置において、逐次分割判定値計算手段130は色データ分類手段101で得られた各グループ内における平均値と上記色データ分類手段101で使用された参照色より分割判定値を計算する。逐次分割判定手段131は、分割判定値をもとにここで得られた平均値より代表色を選ぶかどうかの判定を行う。逐次的代表色決定手段132は、逐次分割判定手段131で逐次分割を行うと判定された場合には、小領域内の色データを逐次的にグループ分割し各グループに所属する色データの代表色を求める。
【0073】
以上のように構成された第4の実施の形態における画像処理装置及び画像処理方法では、図12のフローチャートのように処理が行われる。本発明の第3の実施の形態と同様に、領域分割手段21で入力画像20がブロック領域に分割される(S1)、分割されたブロック領域kに対して、色データ分類手段101は、予め用意されたm番目の参照色セットdRIt_m ( t = 0,…,n-1 )によりグループ分割を行い、各グループにおける平均値eRIt_m ( t = 0,…,n-1 )を求める(S31、S32、S33)。
【0074】
【数3】
【0075】
次に、逐次分割判定値計算手段130は、(数3)のようにm番目の参照色セットと101で得られた各グループの平均値eRIt_m 間のずれの総和b_thres_mを求める(S41)。この処理を用意されたKK個の参照色セット全てに対して行い(S35、S36)、逐次分割判定手段131がこの総和b_thres_mの最小値を予め設定された基準値BThresholdと比較する(S42)。そして、その値より小さければ、代表色決定手段103は、KK個の参照色セットに対するずれの総和b_thres_mの最小値を得る参照色セットmbにより得られた各グループ内の平均値eRIt_mをそのブロックより得られる代表色とする(S37)。なお、代表色決定手段103は、次のように代表色を求めることも可能である。まず、m番目の参照色セットにより分割された際のグループtの平均値eRIt_mに対して、グループtに属するnt個の画素値データIt[j]の偏差絶対値の総和をr、g、b軸で求め、各軸の結果の2乗平均値を算出する。そして、この値を全てのグループtで総和した値(平均値からの分散量)δ_mを求め、分散量δ_mの最小値を与える参照色セットmbdを用いたグループ分割を行い、その際に得られた各グループ内の平均値eRIt_mbをそのブロックより得られる代表色とする。
【0076】
一方、逐次分割判定手段131で予め設定された基準値BThresholdよりb_thres_mの最小値が大きければ逐次的代表色決定手段132による逐次的代表色決定処理が行われる(S43)。
【0077】
逐次的代表色決定手段132には、例えば、本発明の第1の実施の形態における初期設定手段22、着目成分選択手段23、グループ分割手段24、代表色抽出手段25、終了判定手段26が設けられ、逐次的代表色決定手段132では、第1の実施の形態と同様の処理が行われる。また、逐次的代表色決定手段132に、本発明の第2の実施の形態における初期設定手段22、着目成分選択手段23、グループ分割手段24、第2グループ分割手段70、代表色抽出手段25、終了判定手段26が設けられ、逐次的代表色決定手段132で第2の実施の形態と同様の処理が行われてもよい。
【0078】
全ブロックの処理が終了すると(S9)、最後に、代表色決定手段103もしくは逐次的代表色決定手段132で得られた代表色とその位置情報が27の対象領域近似手段27で用いられることで、近似出力画像28が得られる(S10)。
【0079】
以上のように第4の実施の形態では、入力画像より得られたブロック領域内画素色データを近似する際に、用意されたテーブル内の参照色に比較的一致するような場合には、その参照色を使って簡単にグループ分割と各グループ内の代表色を求めることができるので、処理の削減につながる。一方、第3の実施の形態のように、一律にテーブル際の参照色を用いた場合に、参照色とそれをもとにしたグループ内の平均値の間が大きくずれるような場合に代表色抽出精度が低下する恐れがあるが、本発明のようにそのような場合には、本発明の第1もしくは第2のように実際の領域内の色データの分布に従いグループ分割を行うことで代表色抽出精度を改善することができる。
【0080】
なお、これらの処理は本発明の第4の実施の形態における画像処理方法に従いコンピュータ等に使用される中央演算処理装置(CPU)及びデジタルシグナルプロセッサ(DSP)等を使ったソフトウェア処理でも同様に実現することができる。さらに、これらの処理は本発明の第4の実施の形態における画像処理方法に従って作成された半導体チップを使うことでも同様に実現することができる。
【0081】
(第5の実施の形態)
次に本発明の第5の実施の形態における画像処理方法及び画像処理装置について説明する。図15は第5の実施の形態における画像処理装置装置の構成を表し、図14は第5の実施の形態における画像処理方法における処理のフローチャートを表す。図15に示す画像処理装置において、色データ統計量算出手段150は、対象領域内の色データの統計的分布を求める。既代表色利用判定手段151は、色データ統計量算出手段150で得られた色データ統計量を既に代表色抽出済み領域より得られた統計量と比較してこの処理済領域の代表色を用いるかどうかの判定を行う。類似領域決定手段152は、既代表色利用判定手段151で用いると判断された場合には、最も類似度の高い処理済領域を選択する。簡易代表抽出手段153は、類似領域決定手段152で選択された代表色をもとに色データ分類手段101がグループ分割を行った際に得られた各グループ内色データの代表色を求める。
【0082】
以上のように構成された第5の実施の形態における画像処理方法及び画像処理装置の動作について図14のフローチャートをもとに説明する。本発明の第4の実施の形態では、予め用意された複数の参照色セットテーブルとの比較をしていたのに対し、ここでは対象ブロック領域kの以前に代表色抽出処理が完了した領域で得られた代表色との比較を行うことで、グループ分割処理の簡略化が図られている。
【0083】
色データ統計量算出手段150は、対象ブロック内kの色データI_k[i,j]をすでに処理済みの領域p内の色データI_p[i,j]と比較するための色データ統計量Lenを求める(S51)。この統計量の例として、互いに対応する画素色データ間の2乗誤差平均や、ブロック内色データのヒストグラム頻度の絶対差分値の平均がある。しかし、この統計量はこの値に一意に決まるものではなく、これ以外にも多くの手法があり得る。(数4)に、画素色データ間の2乗誤差平均を表し、(数5)に、ブロック内色データのヒストグラム頻度の絶対差分値の平均を表す。
【0084】
【数4】
【0085】
【数5】
【0086】
画素色データ間の2乗誤差平均が統計量Lenに用いられる場合、図16に示すように、対象ブロック内色データに対応する比較対象ブロック内色データが用意され、両者の2乗誤差を画素数で平均した値によって類似度がはかられる。また、ブロック内色データのヒストグラム頻度の絶対差分値の平均が統計量Lenに用いられる場合、対象ブロック内色データのヒストグラムと、比較対象ブロック内色データのヒストグラムが用意され、ヒストグラム頻度の差の絶対値を画素数で平均した値によって類似度がはかられる。前者の場合には、色データ値そのものが基準となり、後者の場合には、色としての頻度が基準になる。より精度を必要とする場合は、前者の基準値の方が好ましいが、微小ブロック内での色データ数が限られることから後者の基準値でも十分であると考える。
【0087】
色データ統計量算出手段150は、このように対象ブロック領域kと処理済領域pより選ばれた1つの領域内の色データの分布の類似度Lenをはかるための値を求める(S52)。既代表色利用判定手段151は、この値をもとに、既に抽出された代表色を用いるべきかどうかの判定を行う(S53)。この判定のために、先ほど得られた統計量が各処理済みブロックに対して算出され、その統計量の最も小さい値が予め設定された判定値PThresholdと比較される。その値より小さければ、処理済領域内より得られた代表色が使用される。その際、使用される処理済領域及び代表色の選択は類似領域決定手段152で行われるが、ここでは色データ統計量の最小値を持つ処理済ブロック領域PPを選択し(S54)、そのブロックより得られた代表色を用いて、第3の実施の形態のように、色データ分類手段101が対象ブロック領域内の色データのグループ分割を行う。簡易代表抽出手段153は、この色データ分類手段101の結果を受けて得られた各グループ内に属する色データの平均値を求め、そのグループの代表色とする(S55)。
【0088】
一方、既代表色利用判定手段151で、対象ブロックと処理済領域間の色データ統計量が予め設定された判定値PThresholdより大きな値であると判定された場合には、それまで代表色抽出処理された領域とは色データ分布的に異なるブロック領域を対象としている可能性がある。従って、この場合は逐次的代表色決定手段132を用いて、逐次的にグループ分割と各グループの代表色を求める(S43)。こうすることで、このような領域より代表色抽出における精度の低下を抑制することができる。
【0089】
このような処理構成をとることで、本発明の第4の画像処理方法と同様に不要な逐次グループ分割を避けることができ、より高速な画像近似が可能となる。しかも、本発明の第3や第4の画像処理方法のように予め複数の画像より求めた参照色セットを含むテーブルを用意することなく、画像自体の処理済み領域をテーブルに用いるため、逐次処理をしない領域からもより高精度な代表色抽出が可能であるという効果を持つ。
【0090】
なお、これらの処理は本発明の第5の実施の形態における画像処理方法に従いコンピュータ等に使用される中央演算処理装置(CPU)及びデジタルシグナルプロセッサ(DSP)等を使ったソフトウェア処理でも同様に実現することができる。さらに、これらの処理は本発明の第5の実施の形態における画像処理方法に従って作成された半導体チップを使うことでも同様に実現することができる。
【0091】
(第6の実施の形態)
次に本発明の第6の実施の形態における画像処理方法及び画像処理装置について説明する。図19は第6の実施の形態における画像処理装置の構成を表し、図18は第6の実施の形態における画像処理方法を説明するためのフローチャートである。
【0092】
図19に示す画像処理装置において、逐次分割対象決定手段180は、領域分割手段21で細分化された複数のブロック領域より逐次分割処理を行う複数の領域を選択する。近接類似領域決定手段181は、逐次分割対象決定手段180で選択されていない領域に関しては、色データ統計量算出手段150で得られた色データ統計量をもとに対象領域に近接している複数の逐次分割対象領域から最も類似度の高い処理済領域を選択する。
【0093】
この実施の形態では、まず画像全体をブロック化して得られた複数のブロック領域のうち、本発明の第1の実施の形態もしくは第2の実施の形態と同様に、逐次的代表色抽出処理が行われる。その後、残りのブロック領域から代表色を抽出する際に、先ほど逐次的代表色抽出処理をされたブロックのうちで、対象ブロックに近接している複数のものが選び出される。そして、その近接した逐次的処理済みブロック領域の中から対象ブロック領域内の色データ分布に最も類似したブロック領域が選び出され、その際の代表色で対象ブロック領域内の色データがグループ分割されることによって、代表色抽出が行われる。
【0094】
以上のように構成された第6の実施の形態における画像処理装置の動作及び画像処理方法について図18のフローチャートに従い説明する。まず入力画像20は領域分割手段21で複数の微小領域に分割される(S1)。次に、逐次分割対象決定手段180でその複数のブロックs領域より、本発明の第1もしくは第2で説明したような逐次的代表色抽出処理を行う領域が決定される(S61)。この場合、どのような選択でも可能であるが、画像全域にできるだけ均等になるように選択する方が、逐次的代表色抽出をしない領域における代表色抽出精度を保つためにも望ましい。そこで、領域分割手段21でブロック分割された領域に画像先端から番号がつけられ、その奇数番号が逐次分割対象決定手段180で対象領域に選択される。逐次分割対象決定手段180で選択された領域に対しては逐次的代表色決定手段132による逐次的代表色決定処理が行われる(S43、S62)。ここで、第1の実施の形態で示した方法が用いられる場合、逐次的代表色決定手段132には、初期設定手段22、着目成分選択手段23、グループ分割手段24、代表色抽出手段25、終了判定手段26が設けられ、第1の実施の形態と同様の処理が実行される。第2の実施の形態で示した方法が用いられる場合、逐次的代表色決定手段132に第2グループ分割手段70がさらに加えられる。
【0095】
一方、逐次分割対象決定手段180で選択されていないブロック領域に関しては、色データ統計量手段150でブロック内の色データ分布を示す統計量が計算される(S63、64)。この値としては、第5の実施の形態で説明された量(図16、図17)を用いることもできるし、それ以外の基準量でも構わない。そして、近接類似領域決定手段181は、対象ブロック領域とそのブロックに近接し逐次的代表色抽出処理されたブロック領域から算出されるこの統計量より適切な処理済みブロック領域を選択する(S65)。色データ分類手段101はこの選択された代表色をもとに、対象ブロック領域内の色データについてグループ分割を行う。簡易代表抽出手段153は、各グループに属する色データの平均値をそのグループの代表色とする(S66)。逐次分割対象決定手段180で選択されていないブロック領域の処理が終了した後(S67)、画像復元に関しては、これまでの実施の形態と同様であるので説明を省略する。
【0096】
以上のように、このような処理や構成をとることで、予め複数の画像より求めた参照色セットを含むテーブルを用意する必要がない。また、第5の実施の形態と比較してテーブルとする処理済み領域を探す手間も減らすことができるという効果を持つ。
【0097】
なお、これらの処理は第6の実施の形態における画像処理方法に従いコンピュータ等に使用される中央演算処理装置(CPU)及びデジタルシグナルプロセッサ(DSP)等を使ったソフトウェア処理でも同様に実現することができる。さらに、これらの処理は本発明の第6の実施の形態における画像処理方法に従って作成された半導体チップを使うことでも同様に実現することができる。
【0098】
(第7の実施の形態)
本発明の第7の実施の形態における画像処理方法及び画像処理装置について説明する。図21は第7の実施の形態における画像処理装置の構成を表し、図20は第7の実施の形態における画像処理装置を説明するためのフローチャートを表す。
【0099】
図21に示す画像処理装置において、保持判断手段200は、得られた現在の分割数が保持分割数を満足するかどうかの判断を行う。段階符号化保持手段201は、保持判断手段200で保持すると決定された場合に、この段階での代表色と、小領域内をこの代表色で近似する際の位置情報を保持する。最大終了判定手段202は、得られた代表色が最大所定数得られたどうかの判定を行い、得られていない場合には上記分割基準計算手段へ処理が移る。ユーザ画質選択手段203は、ユーザにより画像を近似する際の画質モードを選択する。適切代表色読出手段204は上記最大終了判定手段202で終了したと判定された場合には、ユーザ画質選択手段203の結果に従い、段階符号化保持手段201よりユーザ選択モードに応じた代表色と位置情報を呼び出す。この第7の実施の形態では、代表色を抽出する際に、最大代表色数と、それに至るまでの段階ごとの代表色数を設定しておいて、その設定された段階ごとの代表色と位置情報が保持される。そしてユーザが指定するモードに応じて、保持されたデータから、そのモードに応じた数の代表色と位置情報を使って即座に画像近似が行われる。
【0100】
第7の実施の形態における画像処理方法及び画像処理装置の動作について図20のフローチャートに従い説明する。まず、入力画像20をブロック分割し(S1)、各ブロック領域内を逐次的にグループ分割・代表色抽出を行う処理は第1の実施の形態と同様である(S2からS6)。ここで異なるのは、最終的に得られた代表色のみが保持されるのではなく、それまでに至るいくつかの段階での代表色と位置情報も保持されることである。この場合、たとえば、最終代表色数までに至る段階が3段階であった場合に段階符号化保持手段201で保持されるデータは図22のようになる。保持判断手段200は、代表色数が最大数に至るまでに設定された段階で設定された色数分だけ得られたかどうかをチェックし(S71)、その段階での代表色数に達した時点での結果を段階符号化保持手段201が保持する(S72)。
【0101】
一方、最大終了判定手段202で設定された最大代表色数が全てのブロックについて得られた時点で(S73、S8、S9)、ユーザに全ての保持情報が送信される。扱う画質モードとして、たとえば、高速で画質はあまり気にしないモード、高精細モード、中間モード等が用意されており、ユーザはユーザ画質選択手段203によって、これらから画質モードを選択する(S74)。この選択結果に応じて、たとえば高速モードの場合、できるだけ少ない代表色で構わないので、最低段階レベルでの代表色数が選ばれ画像復元が行われる(S75)。一方、高精細モードでは、最大代表色数が選択され画像復元が行われる。この読み出しと代表色の判断を適切代表色読出手段204が担当する。
【0102】
なお、ここでは定性的表示モードで説明したが、直接に近似する代表色数を選択させることも可能である。また、最大終了判定手段202で全てが終了した時点でユーザに送られ、その時点でのユーザ画質選択手段203における選択をもとに適切代表色読出手段204が適切な代表色数を選択するように説明したが、これに限られるものではない。段階符号化保持手段201で保持された段階的データは常にユーザに送信され、送信された時点で復元された画像をユーザが観察しながら、さらなる代表色数での表示を要望し得るようにしてもよい。また、現在の対象ブロックで最大代表色数に達していないが現在の画質で十分であれば、そのブロックでの代表色抽出を停止されるように指示するように構成することも可能である。
【0103】
このように圧縮された画像は、通常ユーザに送られたデータをもとに1度画像復元され、それから所望の画質や解像度に応じて改めてフィルタ処理等による画像処理が行われることが多い。JPEG圧縮された画像データを扱う場合は特にそうである。しかしながら、この実施の形態のように多段階における代表色とその代表色で領域近似を行う際の位置情報が保持されることで、複数の画質モードの指示が画像符号化時点で予め明確でないような場合(例えば、インターネットでの画像の配信)でも即座に対応することができる。さらに、このような非可逆圧縮された画像の復元画像に対して、フィルタ処理等を行うと圧縮時に発生した歪みも増大させる可能性があるが、ここでは元画像より全て得たデータを使用しているのでそのような影響が抑えられる。
【0104】
なお、これらの処理は本発明の第7の実施の形態における画像処理方法に従いコンピュータ等に使用される中央演算処理装置(CPU)及びデジタルシグナルプロセッサ(DSP)等を使ったソフトウェア処理でも同様に実現することができる。さらに、これらの処理は本発明の第7の実施の形態における画像処理方法に従って作成された半導体チップを使うことでも同様に実現することができる。
【0105】
また、本発明の第1から第7の実施の形態において、微少分割する際に、各ブロックサイズは固定である必要はなく画像に応じて可変であっても構わない。また、各ブロック領域から抽出される代表色数も固定である必要はなく、可変であっても本発明で説明した内容は同様に成立する。本発明の第1から第7の実施の形態における画像処理方法及び画像処理装置は、リアルタイムに画像を授受する機器などに応用される。そのような応用対象として、例えばモバイルスキャナ等の画像読み取り機器や、監視カメラやTV会議システム、遠隔医療監視システム等のネットワークカメラを介したシステムがある。さらに、本発明の第1から第7の実施の形態における画像処理方法及び画像処理装置は、携帯電話やPDAのような携帯端末での固定色数を使った高速表示に利用したり、パソコンからインクジェットプリンタやカラーレーザープリンタなどの印刷装置に送られる印字画像データの固定長圧縮に利用することも可能である。
【0106】
ところで、上述のように代表色を使って色データを近似する画像処理は、人間の視覚特性を応用したものである。人間の視覚特性を考慮すると、近似の精度を確保する上で、ブロックの大きさや代表色の数は重要である。
【0107】
適当なブロックの大きさや代表色の数は、画像によって変化する。例えば画像の解像度とブロックの大きさとの関係が適当でないと、近似の精度は悪化し、復元画像の画質は劣化してしまう。スキャナなどの画像入力装置からパーソナルコンピュータに画像が供給されるような場合に、画像入力装置側で近似が行われてから、パーソナルコンピュータ側で画像の解像度が他の解像度に変換されることがある。このような場合、パーソナルコンピュータ側で出力される画像の画質は低下してしまう可能性がある。ここでの解像度変換には、画像の拡大や縮小に伴うものも含まれる。
【0108】
このため、ブロックの大きさは、画像が所定の解像度に変換されてから、その解像度に応じて決定されるのが好ましい。所定の解像度が解像度の変換前と変換後との変換率で表される場合には、解像度の変換率の設定に応じて、ブロックの大きさを変更すればよい。解像度が高い時は大きなブロックを対象にし、解像度が低いときは小さいブロックを対象にすることで、視覚的な劣化を抑えることができる。このような画像処理について図23、図24、図25を用いて説明する。
【0109】
図23に示す画像処理装置において、解像度変換回路1002は、カラー画像を所定の解像度に変換する解像度変換手段として用いられる。例えば解像度変換回路1002は、入力回路1003から取り込んだ画像を高解像度から低解像度に解像度を変換する。解像度設定回路1004は解像度設定を信号1401によって、解像度変換回路1002、代表色抽出回路1001に与える。代表色抽出回路1は、所定の解像度に応じて、代表色を抽出する小領域の大きさを決定する領域決定手段と、決定された小領域から複数の代表色を抽出する代表色抽出手段として用いられる。
【0110】
例えば400DPIから200DPIに解像度の設定が変更されたとすると、図24に示すように、解像度変換回路2は2個の画素を単位として隣接画素を同じ値に変換する。代表色抽出回路1は、この解像度の設定に応じて、ブロックの大きさを半分に設定する。400DPIのときブロックの大きさが4画素×4画素である場合には、200DPIのときブロックの大きさは2画素×2画素に決定される。これによって、原稿濃度の変化が粗くなった分、処理精度をあげることになり、画質劣化を抑えることができる。代表色抽出回路1は、例えば各実施の形態で上述したように、決定されたブロックの代表色を抽出し、インターフェース1007(以下、I/F1007と記す)に画像データを出力する。
【0111】
ここで、解像度変換処理について図24を用いて、詳細に説明する。図24に示すように、400DPIを200DPIに変更する場合は、信号(データ)300と信号(データ)301のいずれかの値を、隣接画素に複写する。例えば、信号301を信号302と信号303に複写する。これによって、400DPIの白黒パターンは解像度の低下によって消えてしまう。実際の処理では、信号302と信号303は同じ値なので、いずれか一方を残すように間引き処理される。これは、縮小処理となる。すなわち、解像度変換と拡大縮小は、回路的には近い処理(又は、同じ処理)として扱われる。従って、解像度変換は、処理前と処理後とで画素数が変わらない場合に用いられることも多いが、ここでは解像度変換に画素数が変わる拡大や縮小に伴うものも含めている。
【0112】
拡大処理や縮小処理が行われる場合には、解像度の代わりに倍率を設定すればよい。この場合、解像度変換回路1002は、画像を所定の場合に拡大又は縮小する変倍処理手段として用いられることになる。また、解像度設定回路1004は、倍率を設定することになる。この倍率に応じて、解像度変換回路1002は、画素補間法、ニアレストネイバー法、バイリニア法、バイキュービック法、直交変換法(DCT変換法、ウェーブレット変換法)等を用いて画素数の増減を行い、拡大処理、縮小処理を実行する。
【0113】
図25を用いて、原稿画像を拡大処理、縮小処理した場合の説明を行う。例えば図25(c)に示すように、3画素×3画素の原画の隣接画素間に1画素を挿入して原画を2倍に拡大すると、画素数は9から25に増大する。この場合は、画素数の増大に合わせて、より大きなブロックから代表色を抽出しても画像劣化は少ない。よって、代表色抽出回路1001は、拡大率に応じて、ブロックの大きさを増大させる。より大きな領域から代表色が抽出されることになるから、圧縮率を稼ぐことができる。一方、図25(a)に示すように、縮小処理の場合には画素数が減少する。よって、原画上のパターンの空間周波数は高くなるので、解像度を高くした処理が必要となる。そのために、ブロックの大きさを、より小さく設定することが望ましい。すなわち、代表色抽出回路1001は、縮小率に応じて、ブロックの大きさを小さく設定する。これによって、空間周波数の高いパターンも保持できるので、画質を向上できる。
【0114】
このように、解像度に応じて代表色を抽出する領域の大きさを変更すれば、高周波のパターンがあっても、それを保持して画質劣化を抑えることができる。また、画質を維持しながら、圧縮率を向上できる。
【0115】
なお、例えば写真原稿、文字原稿、文字・写真原稿など、原稿の特徴に応じて適当な解像度は異なる。このため、原稿の特徴に応じて適当なブロックの大きさや代表色の数を分類することができる。原稿の特徴が処理モードとして設定される場合、代表色抽出回路1001は、解像度の代わりに、原稿の特徴を表す処理モードに応じて、ブロックの大きさ、又は代表色の数を決定するようにしてもよい。
【0116】
図26に示す画像処理装置において、処理モード設定回路1005は、対象となる原稿によって処理モードを設定するモード設定手段として用いられる。処理モード設定回路1005は、処理モードを代表色抽出回路1001に与える。
【0117】
例えば図27に示すように、処理モードとして「写真モード」と「文字モード」が用意されているものとする。この例では、各処理モードは、圧縮率によって2つの設定モードにそれぞれ細分化されている。各設定モードには、適当なブロックの大きさと代表色の数が対応付けられている。代表色抽出回路1001は、例えば図27に示されるようなテーブルを用いてブロックの大きさや代表色の数を決定する。処理モード設定回路1005によって設定される設定モードが1であれば、ブロックの大きさは4画素×4画素に、代表色の数は2に決定される。
【0118】
これによって、原稿毎に必要な処理解像が自動的に確保され、高品位な画質が得られる。
【0119】
このように、ブロックの大きさを決定する画像処理装置も、専用のハードウェアによって実現するだけでなく、CPUやDSPによるソフトウェア処理によって実現することができる。
【0120】
ソフトウェア処理によって実現される場合、CPUやDSPを備えたコンピュータは、画像を所定の解像度に変換するステップを行うと、所定の解像度に応じて、代表色を抽出する小領域の大きさを決定するステップを行い、その後、決定された小領域から複数の代表色を抽出するステップを行うことになる。
【0121】
画像を所定の倍率に拡大又は縮小するのであれば、画像を所定の倍率に拡大又は縮小するステップが行われた後、コンピュータは、所定の倍率に応じて、代表色を抽出する小領域の大きさを決定するステップを行う。
【0122】
さらに、処理モードを利用する場合には、対象となる原稿によって処理モードを設定するステップが行われてから、コンピュータは、処理モードに応じて、代表色を抽出する小領域の大きさ又は代表色数を決定するステップを行う。
【0123】
なお、図27の例では、処理モードとして、「文字モード」、「写真モード」が用意されていたが、これに限られるものではない。例えば混在画像の「文字写真モード」、さらには「地図モード」や「拡大縮小モード」などの他の処理モードを用意してもよい。
【0124】
【発明の効果】
以上説明したように、本発明では、所定数のグループが、小領域内の色データと参照色セットテーブル内の参照色をもとに得られるから、逐次的なグループ分割が省略され、その結果、小領域内の色データの近似は高精度且つ高速に行われる。さらに、適当な参照色セットテーブルが用意されていない領域では、逐次的なグループ分割によって代表色を求めれば、精度の劣化を抑えながら画像全体としては高速に近似を行うことが可能となる。
【0125】
また、分割着目成分を複数選択し、選択された複数の分割着目成分に関する基準をもとにグループ分割が行われる場合、グループ分割が逐次的に行われても、繰り返し回数は減少するから、近似は高精度且つ高速に行われる。
【0126】
また、選択された分割着目成分に関する基準をもとにグループ分割が行われてから、各グループ内の色データをもとに各グループがさらに複数のグループに分割される場合も、グループ分割を行う処理回数が減少するから、近似は高精度且つ高速に行われる。
【0127】
さらに、逐次的にグループ分割が行われる場合でも、既に代表色が抽出された抽出済み領域の代表色を利用して小領域の代表色を求めれば、逐次的にグループ分割が行われるのが一部の小領域だけになり、画像全体として近似は高精度且つ高速に行われる。
【図面の簡単な説明】
【図1】本発明の第1の実施の形態における画像処理方法を説明するためのフローチャート
【図2】本発明の第1の実施の形態における画像処理装置の構成を表すブロック図
【図3】本発明の第1の実施の形態における画像処理装置の代表色抽出手段による処理を模式的に表す概念図
【図4】本発明の第1の実施の形態における画像処理装置で各小領域を近似するために必要な情報を表す概念図
【図5】本発明の第1の実施の形態における画像処理装置の初期設定手段による処理を模式的に表す概念図
【図6】本発明の第2の実施の形態における画像処理方法を説明するためのフローチャート
【図7】本発明の第2の実施の形態における画像処理装置の構成を表すブロック図
【図8】本発明の第2の実施の形態における画像処理装置の第2グループ分割手段による処理を模式的に表す概念図
【図9】本発明の第3の実施の形態における画像処理方法を説明するためのフローチャート
【図10】本発明の第3の実施の形態における画像処理装置の構成を表すブロック図
【図11】本発明の第3の実施の形態における画像処理装置の色データ分類手段による処理を模式的に表す概念図
【図12】本発明の第4の実施の形態における画像処理方法を説明するためのフローチャート
【図13】本発明の第4の実施の形態における画像処理装置の構成を表すブロック図
【図14】本発明の第5の実施の形態における画像処理方法を説明するためのフローチャート
【図15】本発明の第5の実施の形態における画像処理装置の構成を表すブロック図
【図16】本発明の第5の実施の形態における画像処理装置で扱われる色データ統計量の一例を表す図
【図17】本発明の第5の実施の形態における画像処理装置で扱われる色データ統計量の一例を表す図
【図18】本発明の第6の実施の形態における画像処理方法を説明するためのフローチャート
【図19】本発明の第6の実施の形態における画像処理装置の構成を表すブロック図
【図20】本発明の第7の実施の形態における画像処理方法を説明するためのフローチャート
【図21】本発明の第7の実施の形態における画像処理装置の構成を表すブロック図
【図22】本発明の第7の実施の形態における画像処理装置の段階符号化保持手段が保持する保持情報を表す概念図
【図23】解像度変換回路を備えた画像処理装置の簡易的な構成を表すブロック図
【図24】解像度変換処理を説明するための図
【図25】拡大・縮小処理を説明するための図
【図26】モード設定手段を備えた画像処理装置の簡易的な構成を示すブロック図
【図27】処理モードを説明するための図
【図28】従来の画像処理方法を説明するためのフローチャート
【図29】従来の画像処理装置の構成を表すブロック図
【符号の説明】
20 入力画像
21 領域分割手段
22 初期設定手段
23 着目成分選択手段
24 グループ分割手段
25 代表色抽出手段
26 終了判定手段
27 対象領域近似手段
28 出力画像
29 距離計算手段
30 初期グループ分割手段
31 初期代表抽出手段
32 成分別分散計算手段
33 分割成分決定手段
70 第2グループ分割手段
71 補助分割基準計算手段
72 再グループ分割手段
100 参照色テーブルセット
101 色データ分類手段
102 総和分散計算手段
103 代表色決定手段
130 逐次分割判定値計算手段
131 逐次分割判定手段
132 逐次的代表色決定手段
150 色データ統計量算出手段
151 既代表色利用判定手段
152 類似領域決定手段
153 簡易代表抽出手段
180 逐次分割対象決定手段
181 近接類似領域決定手段
200 保持判断手段
201 段階符号化保持手段
202 最大終了判定手段
203 ユーザ画質選択手段
204 適切代表色読出手段
2300a 入力手段r
2300b 入力手段g
2300c 入力手段b
2301a 前段符号化手段r
2301b 前段符号化手段g
2301c 前段符号化手段b
2302 後段符号化手段
2303 復号化手段
2304a 出力手段r
2304b 出力手段g
2304c 出力手段b[0001]
BACKGROUND OF THE INVENTION
The present invention provides an image for compressing and restoring color data.Data transmissionMethods and imagesData transmissionIt relates to the device.
[0002]
[Prior art]
A color image has an enormous amount of color data. For this reason, when displaying or transferring an image, it is often performed to reduce the data amount by approximating the number of colors of the original color data with a smaller number of colors.
[0003]
As such a color image compression method, for example, a method described in JP-A-61-252792 is known. In this method, the red signal R, the green signal G, and the blue signal B are each handled independently. An outline of this method will be described with reference to FIGS. In an image processing apparatus that employs this method, as shown in FIG. 29, input means 2300a, 2300b, and 2300c are provided independently for each color of image information. Each color data input via the input means 2300a, 2300b, 2300c is given to the pre-encoding means 2301a, 2301b, 2301c. The
[0004]
As another method, a method for obtaining approximate data by performing principal component analysis of RGB signals (for example, Japanese Patent Laid-Open No. 1-264092) is known. In this method, a color representing a specific block (principal component color) is determined in consideration of the correlation of RGB signals, and the block is divided based on the principal component color to determine a color in the block. This is a method of approximating by the number of colors.
[0005]
[Problems to be solved by the invention]
However, in the method described in the above-mentioned Japanese Patent Application Laid-Open No. 61-252792, the RGB signals are handled independently and the correlation between the colors is not considered at all. It has often been pointed out that good signal-to-noise ratio (Signal to Noise Ratio) is not obtained.
[0006]
In addition, the principal component analysis used in Japanese Patent Laid-Open No. 1-264092 requires a multidimensional matrix operation to obtain a correlation between RGB signals, so that the processing amount increases and the hardware scale of a processing circuit or the like increases. There was a risk of increase. Further, in the case of software processing such as a CPU, a problem is that a long processing time is required.
[0007]
The present invention has been made in view of such problems in the conventional technology, and an object thereof is to provide an image processing method and an image processing apparatus that perform high-precision and high-speed approximation of color data in a small region. Is.
[0008]
[Means for Solving the Problems]
In order to achieve the above object, the present invention employs the following means.
[0009]
In the present invention, the area dividing means divides the input image into a plurality of small areas. The reference color table set has a reference color set prepared in advance, and the color data classification means generates a predetermined number of color data in the small area based on the color data in the small area and the reference color in the table. Divide into groups. The representative color determining means obtains a representative color of the obtained color data in each group. Then, the target area approximating means approximates the color data of each small area using the predetermined number of representative colors obtained.
[0010]
When a predetermined number of representative colors are obtained in this way, a predetermined number of groups are obtained based on the color data in the small area and the reference color in the table, so the approximation of the color data in the small area is fast. To be done.
[0011]
The representative color determining unit obtains a representative color of the color data in the group using, for example, the calculation result of the total variance calculating unit. The total variance calculation means calculates the total variance from the average value of the color data in each group obtained by the color data classification means. In this case, the accuracy of approximation is ensured by obtaining a representative color having a small total dispersion.
[0012]
However, there is a possibility that the accuracy of approximation cannot be sufficiently secured with a reference color set prepared in advance. Therefore, a sequential representative color determination unit is provided separately from the representative color determination unit, and the sequential division determination value calculation unit calculates the division determination value. The sequential division determination unit calculates the sequential representative color based on the division determination value. You may make it determine whether a representative color is determined by a determination means.
[0013]
The sequential division determination value calculation means calculates a division determination value from the average value of the color data in each group obtained by the color data classification means and the reference color used by the color data classification means. The sequential division determination unit determines whether the representative color is determined by the sequential representative color determination unit based on the division determination value.
[0014]
When the representative color is determined by the sequential representative color determining unit according to the determination by the sequential division determining unit, the target area approximating unit is not the representative color determining unit but the predetermined number obtained by the sequential representative color determining unit. The color data of each small area is approximated using the representative colors.
[0015]
The sequential representative color determining means divides the target group into a plurality of groups based on the criteria related to the divided component of interest selected based on the distribution of the color data in the target group, and obtains the representative colors of each group obtained. Is repeated until a predetermined number of representative colors are obtained. For this reason, approximation suitable for the target region is performed, and the accuracy of approximation is improved. The processing for obtaining the representative color sequentially is performed only in a portion where the accuracy of approximation cannot be sufficiently secured with a reference color set prepared in advance, and therefore high-speed and high-precision approximation is performed as a whole.
[0016]
It is also possible to achieve approximate speeding up and high accuracy without using a reference color. For example, the initial setting means sets an initial group for the small area, classifies all the color data in the small area into the initial group, and obtains a representative color of the initial group. The focused component selection means selects a plurality of divided focused components to be focused on when dividing into target groups based on the distribution of color data belonging to the target group. The group dividing means divides the target group into a plurality of groups according to the obtained plurality of divided components, and distributes the color data belonging to the target group to the groups obtained after the division. In this case, the representative color extracting unit obtains the representative color of the color data belonging to each group obtained by the group dividing unit. The end determination means determines whether a predetermined number of representative colors have been obtained. When the representative color extraction is repeated from the selection of the divided component of interest until a predetermined number of representative colors are obtained, and it is determined by the end determination means that the predetermined number of representative colors have been obtained, the target area approximating means is obtained. The color data of each small area is approximated using a predetermined number of representative colors.
[0017]
Even when a predetermined number of representative colors are sequentially obtained in this way, the group is divided according to a plurality of divided components of interest, so that the number of repetitions is reduced accordingly. As a result, the approximation is performed with high accuracy and high speed.
[0018]
When the target component selection unit selects a plurality of divided target components, for example, the component-specific variance calculation unit calculates the variance of the representative color of the color data in the target group and each component of the color data. Further, the divided component determining unit selects the divided component of interest in order from the component having the large variance value obtained by the component-specific calculating unit among the components.
[0019]
Since the group is sequentially divided for components having a large variance value, the approximation accuracy is high. However, the user does not always seek a high-precision approximation. For example, the user may require speed rather than accuracy, or may require only accuracy sufficient to identify an image, such as a thumbnail image. In this case, representative colors obtained sequentially can be used.
[0020]
For this purpose, the holding judgment means judges whether or not a plurality of representative colors set at a predetermined number have been obtained. The stage encoding holding means, when it is determined that the representative color is obtained by the holding means, uses the representative color at each stage and position information for approximating the color data in the small area using the representative color. Hold. The user image quality selection means is used for the user to select one of the image quality modes from among the plurality of image quality modes. The appropriate representative color reading unit calls the representative color and the position information corresponding to the selection mode from the step encoding holding unit according to the selection result using the user image quality selection unit. In this case, the end determination means determines whether or not the maximum predetermined number of representative colors has been obtained, and the target area approximating means determines that the appropriate representative color is determined when the end determination means determines that the maximum predetermined number of representative colors has been obtained. The color data of each small area is approximated using the representative color obtained by the reading means.
[0021]
As a result, approximation in accordance with the image quality mode instructed by the transmission destination user, such as the thumbnail mode, the high speed mode, and the high definition mode, is performed. As a result, high user flexibility is ensured.
[0022]
In addition, when the representative color is obtained sequentially, a second group dividing unit may be provided in order to achieve approximate high accuracy and high speed. In this case, the component-of-interest selection means need not select a plurality of divided components of interest.
[0023]
The second group dividing means further divides each group into a plurality of groups based on the color data in each group obtained by the group dividing means, and converts the color data in each group into groups obtained after the division. Distribute.
[0024]
The representative color extracting means obtains the representative color of the color data belonging to each group obtained by the second group dividing means instead of the group dividing means.
[0025]
In this case, since each group is further divided into a plurality of groups based on the color data in each group obtained by the group dividing means, the number of repetitions is reduced accordingly. For this reason, the approximation is performed with high accuracy and at high speed. There is a case where the division by the group dividing unit is performed only once by the division by the second group dividing unit.
[0026]
The second group dividing unit includes, for example, an auxiliary division reference calculating unit and a regroup dividing unit. The auxiliary division criterion calculation means calculates the Euclidean distance from the origin of the color data in each group obtained by the group division means. The regroup division unit further subdivides the group obtained by the group division unit based on the calculation result of the auxiliary division reference calculation unit and distributes the color data in the target group to the group obtained after the division.
[0027]
Thus, the accuracy of approximation is ensured by using the Euclidean distance from the origin of the color data in each group.
[0028]
Further, even when the representative colors are sequentially obtained as described above, if the representative colors are obtained sequentially for only some small regions, the approximation as a whole is performed with high accuracy and high speed.
[0029]
For this purpose, the color data statistic calculating means obtains a statistical distribution of the color data in the small area. The existing representative color use determination means compares the statistical distribution of the color data with the statistical distribution obtained from the extracted area from which the representative color has already been extracted, and determines whether to use the representative color of the extracted area. To do. The similar region determining means selects the extracted region having the highest similarity with the small region. The color data classification means divides the color data in the small area into a predetermined number of groups based on the color data in the small area and the representative color in the selected extracted area. The simple representative extraction means obtains representative colors of the color data belonging to each group obtained by the color data classification means. When it is determined that the representative color of the extracted area is to be used by the predetermined representative color usage determining means, each small area is obtained using a predetermined number of representative colors obtained by the simple representative extracting means instead of the representative color determining means. Approximate color data.
[0030]
As described above, if there is an extracted region having a similar statistical distribution, a predetermined number of representative colors can be obtained using the representative color of the extracted region. Thereby, the approximation is performed with high accuracy and high speed as a whole. When regions having similar statistical distributions are continuous, the approximation speed is significantly increased.
[0031]
Note that the statistical distribution of the color data in the small region is represented by a histogram, for example.
[0032]
Further, the extracted area may be set appropriately. For this purpose, the sequential division target determining means selects an area in which the representative color is determined by the representative color determining means from among the small areas. A representative color is sequentially obtained for the region selected by the sequential division target determining means. The area selected by the sequential division target determining means is the extracted area. The proximity similarity area determination means compares the statistics obtained from the extracted areas close to the small areas not selected by the sequential division target determination means among the extracted areas, and compares the statistics of the small areas with the most similar. Select a highly extracted region. In this case, the simple representative extracting unit divides the color data in the target small region into a predetermined number of groups based on the representative color of the extracted region selected by the proximity similar region determining unit, and represents the representative color belonging to each group. Ask for. Then, the target area approximating means approximates the color data of each small area using a predetermined number of representative colors obtained by the simple representative color extracting means for the small areas not selected by the sequential division target determining means.
[0033]
In this manner, the representative color is obtained sequentially for the predetermined area, and for the other areas, the representative color is obtained using the representative color of the adjacent extracted area, so that the approximation as a whole is highly accurate. And it is performed at high speed. In order to suppress the variation in accuracy, it is preferable to select a region for obtaining the representative color sequentially from the image.
[0034]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, embodiments of the present invention will be described with reference to the drawings. In each embodiment, color data represents a color signal in a pixel, and in the RGB color system, represents data composed of three components of red, green, and blue. Further, in each diagram of the configuration diagram of the image processing apparatus in each embodiment, the same number is assigned to the same part.
[0035]
(First embodiment)
First, an image processing method and an image processing apparatus according to the first embodiment of the present invention will be described. As shown in FIG. 2, in the image processing apparatus, the
[0036]
Then, the initial setting means 22 is a distance calculation means 29 for obtaining the Euclidean distance from the origin of the color data belonging to the target block area, and an initial stage for classifying all the color data in the area into a plurality of groups based on the Euclidean distance. The group dividing means 30 and the initial representative extracting means 31 which uses the average color of the color data belonging to each group obtained by the above means as the representative color of the group. In addition, the target component selecting unit 23 includes a component-specific
[0037]
The operation of the image processing apparatus and the image processing method in the first embodiment configured as described above will be described with reference to FIG. As shown in FIG. 1, the
[0038]
First, the initial setting means 22 sets an initial group and its representative color when performing division processing sequentially (S2). As a setting method, for example, as shown in FIG. 5A, one initial group is set assuming that all data in the target block belong to one group, or as shown in FIG. 5B. There is a method in which the Euclidean distance from the origin of all the color data in the target block is obtained and classified into a plurality of initial groups. The block configuration shown in FIG. 2 is based on the method shown in FIG. The distance calculation means 29 calculates the Euclidean distance length_k [j] from the origin of the color data cIj (rj, gj, bj) (j = 0,..., Pxl_k) in the target block Bk. The initial group dividing means 30 divides the initial group into two groups according to (Equation 1). Here, ave_length_k indicates the average value of the distance length_k [j] in the target block k, and t_k_pix indicates the total number of pixels in k. Further, ‖cIj‖ represents a vector length (norm) when the color data cIj is regarded as a vector.
[0039]
[Expression 1]
[0040]
In the initial representative extraction means 31, an average value of the color data belonging to the
[0041]
Based on the initial group, the target component selecting unit 23, the
[0042]
FIG. 3A shows the target group S, the representative color RIs, and the input pixel color data Is [j] in a space composed of the r, g, and b axes. Here, the current division target group S is set to group 1 (S = 1), and the representative colors RIs (Rrs, Rgs, Rbs) representing the current division target group S are set as the representative colors RI.1 kShall be set to. Further, the current representative cluster vector number num is set to num = 1, and the temporary variable tnum is set to tnum = 1.
[0043]
The component-based variance calculation means 32 applies the Ns pieces of pixel color data Is [j] (rs [j], gs [j], bs [j]) belonging to the current division target group S to FIG. As shown in (b), the sum (dispersion values) δrs, δgs, and δbs of absolute deviation values with respect to the representative color RIs are independently obtained for each of the r, g, and b axes (S3).
[0044]
The divided component determination means 33 arranges the sums δrs, δgs and δbs of the absolute deviation values with respect to the representative color RIs obtained as described above in the descending order, and selects the axis Amax1 having the largest value and the axis Amax2 having the next largest variance value. (S4). In the example of FIG. 3B, the axis Amax1 having the maximum value is the r axis, and the axis Amax2 having the next largest variance value is the g axis.
[0045]
FIG. 3C is a view of FIG. 3A and FIG. 3B viewed from the b-axis. As shown in FIG. 3C, the group dividing means 24 divides the Ns pixel color data Is [j] in the current group S into two groups in the Amax1 direction and also into two groups in the Amax2 direction. Divide (S5). As a result, the group S is divided into a total of four groups.
[0046]
The group division processing includes the Amax1 component of the representative color RIs and the Amax1 component of each pixel color data Is [j] belonging to the group S, and the Amax2 component of the representative color RIs and each pixel color data Is [j] belonging to the group S. The Amax2 component is compared and based on the magnitude relationship. In the example of FIG. 3C, group division is performed as in (Equation 2).
[0047]
[Expression 2]
[0048]
As shown in FIG. 3D, the representative
[0049]
The representative
[0050]
If S has not reached tnum and the necessary representative color has not been extracted (S7), the target group is changed by setting the number S representing the current division target group to S = S + 1 (S8). The process from step S3 is repeated.
[0051]
Then, it is determined whether or not num has reached a preset representative color number c_num (S9). If not, S = 1 and tnum = num are set. And the process from procedure S2 is performed. Such end determination is performed by the end determination means 26.
[0052]
The predetermined number c_num of representative colors extracted by the above processing and position information indicating which representative color of the representative colors approximates the color data of the pixels in the block are held. Then, using this stored information, the target area approximating means 27 at the approximation / restoration destination approximates and restores the pixel data in each block area (S10). As shown in FIG. 4, the position information (i, j) corresponds to the pixel coordinates (i, j) in the target block, and the representative color embedded in the position information coordinates is embedded in the corresponding pixel coordinates. Thus, an approximate image is generated, and the
[0053]
As described above, according to the present embodiment, the average value of the color data in the subdivided area and the representative color representing each group by sequentially dividing the color data into a plurality of groups from the color direction having a large variance from the average value. Since extraction is performed, it is possible to extract a representative color representing each region and high-precision and high-speed region division.
[0054]
These processes are similarly realized by software processing using a central processing unit (CPU) and a digital signal processor (DSP) used in a computer or the like according to the image processing method in the first embodiment of the present invention. can do. Furthermore, these processes can be similarly realized by using a semiconductor chip created according to the image processing method in the first embodiment of the present invention.
[0055]
(Second Embodiment)
Next, an image processing method and an image processing apparatus according to the second embodiment of the present invention will be described. As shown in FIG. 7, in the image processing apparatus, the second group dividing unit 70 further divides the plurality of groups obtained by the
[0056]
Then, the second group dividing means 70 is based on the auxiliary division reference calculating means 71 for calculating the Euclidean distance from the origin of the pixel color data in the group obtained by the group dividing means 24 and the auxiliary division reference value. The group obtained by the
[0057]
The operation of the image processing apparatus and the image processing method in the second embodiment configured as described above will be described with reference to the flowchart of FIG. FIG. 8 schematically shows the state of group division in this embodiment. Similar to the image processing method and the image processing apparatus according to the first embodiment of the present invention, after the
[0058]
Next, as shown in FIG. 8D, the second group dividing means 70 performs a process of further dividing the group S and the group num + 1 into two groups. At this time, first, the Euclidean distance len from the origin of the pixel color data belonging to the groups S and num + 1 is obtained by the auxiliary division criterion calculation means 71 (S23). Then, in the regroup dividing means 72, the group S is divided into the group S and num + 2 based on the average value of the distances of the pixel color data in the group S, and each color data is distributed. Similarly, the group num + 1 is divided into groups num + 1 and num + 3, and the color data of the group num + 1 is classified (S24). By doing so, the number of times of group division can be reduced, and high-speed group division can be performed.
[0059]
Then, the representative
[0060]
As described above, according to the present embodiment, the color data in the subdivided area is divided into two groups in the color direction having the largest variance from the average value and the average value, and then belong again. By performing multiple division based on the distance from the origin of the color data in the group, the number of times of group division processing can be reduced.
[0061]
These processes are similarly realized by software processing using a central processing unit (CPU) and a digital signal processor (DSP) used in a computer or the like according to the image processing method in the second embodiment of the present invention. can do. Further, these processes can be similarly realized by using a semiconductor chip produced according to the image processing method in the second embodiment of the present invention.
[0062]
(Third embodiment)
Next, an image processing method and an image processing apparatus according to the third embodiment of the present invention will be described. FIG. 10 shows the configuration of the image processing apparatus according to the third embodiment. In the image processing apparatus shown in FIG. 10, the reference color table set 100 has a reference color set prepared in advance. The color
[0063]
The operation of the image processing apparatus and the image processing method in the third embodiment configured as described above will be described with reference to the flowchart of FIG.
[0064]
The
[0065]
For creating the reference color table set 100, for example, the image processing in the first embodiment is used. In this case, image processing in the first embodiment is performed in advance for many image samples, and a predetermined number n of representative color sets are obtained. These KK pieces may be tabulated as KK reference color sets. It is also conceivable to create a set having LL n reference colors by applying a statistical method such as a vector quantization method to the vectors composed of the KK n representative colors. Instead of the statistical method, it is possible to apply a method such as Kohonen's self-organizing neural network.
[0066]
In order to prepare a set of representative colors, an average image of characteristic images such as textures, characters, and relatively flat images may be used. In this case, after the average image of each image is generated, the image processing in the first embodiment is performed on each average image, and a set of representative colors is prepared. Even in this case, the representative color sets may be tabulated as the same number of reference color sets, or may be tabulated as different numbers of reference color sets by a vector quantization method or the like. Furthermore, it is possible to use a representative color of a block already processed for the same image as a reference color set without preparing a separate image.
[0067]
In order to prepare a set of representative colors for each classification target such as a person's skin, a plant, and the sky, a block obtained by subdividing a plurality of images prepared in advance may be used. In this case, each block is classified by the ratio occupied by each classification target, and representative color extraction processing is performed on the classified block. The set of representative colors obtained in this way may be directly tabulated as a reference color for the corresponding classification target, or may be tabulated using a vector quantization method or the like as in other examples.
[0068]
Further, the number of representative colors in one set need not be uniform n, and can be varied. In that case, prepare KK representative color sets of n stages obtained from many image samples in the same way, and use the KK representative color sets at each stage to create a plurality of reference color sets using the above method. A reference color table set 100 is prepared by obtaining a table.
[0069]
First, the color
[0070]
By doing so, the color data in the target area can be divided at high speed without sequentially performing group division like the image processing method and image processing apparatus in the first and second embodiments of the present invention. And representative colors can be extracted. By preparing a plurality of highly accurate reference color sets prepared in advance from a large number of image samples, accurate representative color extraction can be performed without much influence on the input image, and the accuracy of the restored approximate image can be improved. Deterioration can be suppressed.
[0071]
These processes are similarly realized by software processing using a central processing unit (CPU) and a digital signal processor (DSP) used in a computer or the like according to the image processing method in the third embodiment of the present invention. can do. Further, these processes can be similarly realized by using a semiconductor chip created according to the image processing method in the third embodiment of the present invention.
[0072]
(Fourth embodiment)
Next, an image processing method and an image processing apparatus according to the fourth embodiment of the present invention will be described. In the image processing apparatus shown in FIG. 13, the sequential division determination
[0073]
In the image processing apparatus and the image processing method according to the fourth embodiment configured as described above, processing is performed as shown in the flowchart of FIG. As in the third embodiment of the present invention, the
[0074]
[Equation 3]
[0075]
Next, the sequential division determination value calculation means 130 obtains the sum b_thres_m of deviation between the m-th reference color set and the average value eRIt_m of each group obtained in 101 as shown in (Equation 3) (S41). This process is performed for all the KK reference color sets prepared (S35, S36), and the sequential division determination means 131 compares the minimum value of the sum b_thres_m with a preset reference value BThreshold (S42). If it is smaller than the value, the representative color determining means 103 obtains the average value eRIt_m in each group obtained from the reference color set mb that obtains the minimum value of the total sum b_thres_m of deviations from the KK reference color sets from the block. The obtained representative color is set (S37). The representative
[0076]
On the other hand, if the minimum value of b_thres_m is larger than the reference value BThreshold set in advance by the sequential division determination means 131, the sequential representative color determination process by the sequential representative color determination means 132 is performed (S43).
[0077]
The sequential representative
[0078]
When the processing of all the blocks is completed (S9), finally, the representative color obtained by the representative color determining means 103 or the sequential representative
[0079]
As described above, in the fourth embodiment, when the pixel color data in the block area obtained from the input image is approximated, if the reference color in the prepared table relatively matches, Since the group division and the representative colors in each group can be easily obtained using the reference color, the processing is reduced. On the other hand, as in the third embodiment, when the reference color at the time of the table is used uniformly, the representative color is used when the reference color and the average value in the group based on the reference color are greatly shifted. Although the extraction accuracy may be reduced, in such a case as in the present invention, a representative example is obtained by performing group division according to the distribution of color data in the actual area as in the first or second aspect of the present invention. Color extraction accuracy can be improved.
[0080]
These processes are similarly realized by software processing using a central processing unit (CPU) and a digital signal processor (DSP) used in a computer or the like according to the image processing method in the fourth embodiment of the present invention. can do. Furthermore, these processes can be similarly realized by using a semiconductor chip created according to the image processing method in the fourth embodiment of the present invention.
[0081]
(Fifth embodiment)
Next, an image processing method and an image processing apparatus according to the fifth embodiment of the present invention will be described. FIG. 15 shows a configuration of an image processing apparatus according to the fifth embodiment, and FIG. 14 shows a flowchart of processing in the image processing method according to the fifth embodiment. In the image processing apparatus shown in FIG. 15, the color data
[0082]
The operation of the image processing method and the image processing apparatus in the fifth embodiment configured as described above will be described with reference to the flowchart of FIG. In the fourth embodiment of the present invention, the comparison is made with a plurality of reference color set tables prepared in advance, but here, in the area where the representative color extraction processing has been completed before the target block area k. The group division process is simplified by comparing the obtained representative color.
[0083]
The color data statistic calculation means 150 calculates a color data statistic Len for comparing the color data I_k [i, j] in the target block k with the color data I_p [i, j] in the already processed region p. Obtain (S51). Examples of this statistic include an average of square errors between pixel color data corresponding to each other and an average of absolute difference values of histogram frequencies of intra-block color data. However, this statistic is not uniquely determined by this value, and there can be many other methods. (Equation 4) represents the mean square error between the pixel color data, and (Equation 5) represents the average of absolute difference values of the histogram frequencies of the intra-block color data.
[0084]
[Expression 4]
[0085]
[Equation 5]
[0086]
When the mean square error between the pixel color data is used for the statistic Len, as shown in FIG. 16, the color data in the comparison target block corresponding to the color data in the target block is prepared, and the square error between the two is calculated. The degree of similarity is determined by the value averaged by the number. In addition, when the average absolute difference value of the histogram frequency of the intra-block color data is used as the statistic Len, a histogram of the target block color data and a histogram of the comparison target block color data are prepared, and the difference in histogram frequency is prepared. The degree of similarity is determined by the value obtained by averaging the absolute values by the number of pixels. In the former case, the color data value itself is the reference, and in the latter case, the frequency as the color is the reference. When higher accuracy is required, the former reference value is preferable, but the latter reference value is considered sufficient because the number of color data in a minute block is limited.
[0087]
The color data statistic calculating means 150 thus obtains a value for measuring the similarity Len of the distribution of color data in one area selected from the target block area k and the processed area p (S52). Based on this value, the already-represented color usage determining means 151 determines whether to use the already extracted representative color (S53). For this determination, the previously obtained statistic is calculated for each processed block, and the smallest value of the statistic is compared with a preset determination value PThreshold. If it is smaller than that value, the representative color obtained from within the processed area is used. At this time, the processed region and the representative color to be used are selected by the similar
[0088]
On the other hand, if the existing representative color
[0089]
By adopting such a processing configuration, unnecessary sequential group division can be avoided as in the fourth image processing method of the present invention, and faster image approximation is possible. Moreover, since the processed region of the image itself is used for the table without preparing a table including a reference color set obtained from a plurality of images in advance as in the third and fourth image processing methods of the present invention, sequential processing is performed. This has the effect that more accurate representative color extraction can be performed from a region that does not perform color correction.
[0090]
These processes are similarly realized by software processing using a central processing unit (CPU) and a digital signal processor (DSP) used in a computer or the like according to the image processing method in the fifth embodiment of the present invention. can do. Further, these processes can be similarly realized by using a semiconductor chip created according to the image processing method in the fifth embodiment of the present invention.
[0091]
(Sixth embodiment)
Next, an image processing method and an image processing apparatus according to the sixth embodiment of the present invention will be described. FIG. 19 shows a configuration of an image processing apparatus according to the sixth embodiment, and FIG. 18 is a flowchart for explaining an image processing method according to the sixth embodiment.
[0092]
In the image processing apparatus shown in FIG. 19, the sequential division
[0093]
In this embodiment, among the plurality of block regions obtained by first blocking the entire image, the sequential representative color extraction process is performed as in the first embodiment or the second embodiment of the present invention. Done. Thereafter, when extracting representative colors from the remaining block regions, a plurality of blocks close to the target block are selected from the blocks subjected to the sequential representative color extraction processing. Then, a block area most similar to the color data distribution in the target block area is selected from the adjacent sequentially processed block areas, and the color data in the target block area is divided into groups by the representative colors at that time. Thus, representative color extraction is performed.
[0094]
The operation of the image processing apparatus and the image processing method in the sixth embodiment configured as described above will be described with reference to the flowchart of FIG. First, the
[0095]
On the other hand, for the block area not selected by the sequential division
[0096]
As described above, it is not necessary to prepare a table including a reference color set obtained in advance from a plurality of images by taking such processing and configuration. Further, compared with the fifth embodiment, there is an effect that it is possible to reduce the trouble of searching for a processed area as a table.
[0097]
These processes can be similarly realized by software processing using a central processing unit (CPU) and a digital signal processor (DSP) used in a computer or the like according to the image processing method in the sixth embodiment. it can. Furthermore, these processes can be similarly realized by using a semiconductor chip created according to the image processing method in the sixth embodiment of the present invention.
[0098]
(Seventh embodiment)
An image processing method and an image processing apparatus according to the seventh embodiment of the present invention will be described. FIG. 21 shows the configuration of the image processing apparatus in the seventh embodiment, and FIG. 20 shows a flowchart for explaining the image processing apparatus in the seventh embodiment.
[0099]
In the image processing apparatus shown in FIG. 21, the holding
[0100]
The operation of the image processing method and the image processing apparatus in the seventh embodiment will be described with reference to the flowchart of FIG. First, the process of dividing the
[0101]
On the other hand, when the maximum number of representative colors set by the maximum
[0102]
Although the qualitative display mode has been described here, it is also possible to select a representative color number that is directly approximated. In addition, it is sent to the user when the maximum
[0103]
The image compressed in this way is usually restored once based on data sent to the user, and then image processing such as filter processing is performed again according to desired image quality and resolution. This is especially true when handling JPEG-compressed image data. However, as shown in this embodiment, the representative colors in multiple stages and the position information when performing area approximation with the representative colors are retained, so that instructions for a plurality of image quality modes are not clear at the time of image encoding. In such a case (for example, distribution of an image on the Internet), it can be dealt with immediately. In addition, if a filter process or the like is performed on a restored image of such an irreversibly compressed image, there is a possibility that distortion generated at the time of compression will increase, but here, all data obtained from the original image is used. Therefore, such influence is suppressed.
[0104]
These processes are similarly realized by software processing using a central processing unit (CPU) and a digital signal processor (DSP) used in a computer or the like according to the image processing method in the seventh embodiment of the present invention. can do. Further, these processes can be similarly realized by using a semiconductor chip created according to the image processing method in the seventh embodiment of the present invention.
[0105]
In the first to seventh embodiments of the present invention, when performing fine division, each block size does not have to be fixed and may be variable according to the image. Further, the number of representative colors extracted from each block area does not need to be fixed, and even if it is variable, the contents described in the present invention are similarly established. The image processing methods and image processing apparatuses according to the first to seventh embodiments of the present invention are applied to devices that exchange images in real time. Such applications include, for example, image reading devices such as mobile scanners, and systems via network cameras such as surveillance cameras, TV conference systems, and telemedicine surveillance systems. Furthermore, the image processing method and the image processing apparatus according to the first to seventh embodiments of the present invention can be used for high-speed display using a fixed number of colors in a mobile terminal such as a mobile phone or a PDA, or from a personal computer. It can also be used for fixed-length compression of print image data sent to a printing apparatus such as an ink jet printer or a color laser printer.
[0106]
By the way, as described above, the image processing that approximates the color data using the representative color applies human visual characteristics. Considering human visual characteristics, the size of the block and the number of representative colors are important in ensuring the accuracy of approximation.
[0107]
The appropriate block size and the number of representative colors vary depending on the image. For example, if the relationship between the image resolution and the block size is not appropriate, the approximation accuracy deteriorates and the quality of the restored image deteriorates. When an image is input from an image input device such as a scanner to a personal computer, the image input device side may approximate the image and then the image resolution may be converted to another resolution on the personal computer side. . In such a case, the image quality of the image output on the personal computer side may be degraded. The resolution conversion here includes those accompanying enlargement or reduction of an image.
[0108]
Therefore, the block size is preferably determined according to the resolution after the image is converted to a predetermined resolution. When the predetermined resolution is expressed by the conversion rate before and after the resolution conversion, the block size may be changed according to the setting of the resolution conversion rate. Visual degradation can be suppressed by targeting large blocks when the resolution is high and targeting small blocks when the resolution is low. Such image processing will be described with reference to FIGS. 23, 24, and 25. FIG.
[0109]
In the image processing apparatus shown in FIG. 23, the
[0110]
For example, if the resolution setting is changed from 400 DPI to 200 DPI, as shown in FIG. 24, the
[0111]
Here, the resolution conversion process will be described in detail with reference to FIG. As shown in FIG. 24, when 400 DPI is changed to 200 DPI, the value of either signal (data) 300 or signal (data) 301 is copied to adjacent pixels. For example, the
[0112]
When enlargement processing or reduction processing is performed, a magnification may be set instead of resolution. In this case, the
[0113]
With reference to FIG. 25, a description will be given of a case where an original image is enlarged and reduced. For example, as shown in FIG. 25C, when one pixel is inserted between adjacent pixels of the original image of 3 pixels × 3 pixels and the original image is enlarged twice, the number of pixels increases from 9 to 25. In this case, even if a representative color is extracted from a larger block in accordance with the increase in the number of pixels, image degradation is small. Therefore, the representative
[0114]
In this way, if the size of the region from which the representative color is extracted is changed according to the resolution, even if there is a high-frequency pattern, it can be maintained and image quality deterioration can be suppressed. In addition, the compression rate can be improved while maintaining the image quality.
[0115]
Note that, for example, an appropriate resolution varies depending on the characteristics of the original such as a photo original, a text original, and a text / photo original. Therefore, it is possible to classify an appropriate block size and number of representative colors according to the characteristics of the original. When the feature of the document is set as the processing mode, the representative
[0116]
In the image processing apparatus shown in FIG. 26, the processing
[0117]
For example, as shown in FIG. 27, it is assumed that “photo mode” and “text mode” are prepared as processing modes. In this example, each processing mode is subdivided into two setting modes according to the compression rate. Each setting mode is associated with an appropriate block size and the number of representative colors. The representative
[0118]
As a result, necessary processing resolution is automatically ensured for each document, and high-quality image quality is obtained.
[0119]
As described above, the image processing apparatus that determines the block size can be realized not only by dedicated hardware but also by software processing by a CPU or DSP.
[0120]
When implemented by software processing, a computer equipped with a CPU or DSP determines the size of a small area from which a representative color is extracted according to the predetermined resolution when performing a step of converting the image to a predetermined resolution. Steps are performed, and then a step of extracting a plurality of representative colors from the determined small area is performed.
[0121]
If the image is enlarged or reduced to a predetermined magnification, after the step of enlarging or reducing the image to the predetermined magnification is performed, the computer determines the size of the small area from which the representative color is extracted according to the predetermined magnification. The step of determining the length is performed.
[0122]
Further, when the processing mode is used, after the step of setting the processing mode is performed according to the target document, the computer selects the size of the small area or the representative color from which the representative color is extracted according to the processing mode. Perform the step of determining the number.
[0123]
In the example of FIG. 27, “text mode” and “photo mode” are prepared as processing modes, but the present invention is not limited to this. For example, “text / photo mode” of mixed images, and other processing modes such as “map mode” and “enlargement / reduction mode” may be prepared.
[0124]
【The invention's effect】
As described above, in the present invention, since a predetermined number of groups are obtained based on the color data in the small area and the reference colors in the reference color set table, sequential group division is omitted, and as a result, The approximation of the color data in the small area is performed with high accuracy and high speed. Further, in a region where an appropriate reference color set table is not prepared, if a representative color is obtained by sequential group division, the entire image can be approximated at high speed while suppressing deterioration in accuracy.
[0125]
In addition, when multiple divisional components of interest are selected and group division is performed based on the criteria for the selected multiple divisional components of interest, the number of iterations is reduced even if group division is performed sequentially. Is performed with high accuracy and high speed.
[0126]
In addition, group division is also performed when each group is further divided into a plurality of groups based on the color data in each group after group division is performed based on the selected criterion for the component of interest. Since the number of processes is reduced, the approximation is performed with high accuracy and high speed.
[0127]
Furthermore, even when group division is performed sequentially, group division is performed sequentially if the representative color of the small area is obtained using the representative color of the extracted area from which the representative color has already been extracted. Only the small area of the part is included, and the approximation of the entire image is performed with high accuracy and high speed.
[Brief description of the drawings]
FIG. 1 is a flowchart for explaining an image processing method according to a first embodiment of the present invention;
FIG. 2 is a block diagram showing the configuration of the image processing apparatus according to the first embodiment of the invention.
FIG. 3 is a conceptual diagram schematically showing processing by a representative color extracting unit of the image processing apparatus according to the first embodiment of the present invention.
FIG. 4 is a conceptual diagram showing information necessary for approximating each small area in the image processing apparatus according to the first embodiment of the present invention.
FIG. 5 is a conceptual diagram schematically showing processing by an initial setting unit of the image processing apparatus according to the first embodiment of the present invention.
FIG. 6 is a flowchart for explaining an image processing method according to the second embodiment of the present invention;
FIG. 7 is a block diagram illustrating a configuration of an image processing apparatus according to a second embodiment of the present invention.
FIG. 8 is a conceptual diagram schematically showing processing by a second group dividing unit of the image processing apparatus according to the second embodiment of the present invention.
FIG. 9 is a flowchart for explaining an image processing method according to the third embodiment of the present invention;
FIG. 10 is a block diagram illustrating a configuration of an image processing apparatus according to a third embodiment of the present invention.
FIG. 11 is a conceptual diagram schematically showing processing by color data classification means of an image processing apparatus according to a third embodiment of the present invention.
FIG. 12 is a flowchart for explaining an image processing method according to the fourth embodiment of the present invention;
FIG. 13 is a block diagram illustrating a configuration of an image processing apparatus according to a fourth embodiment of the present invention.
FIG. 14 is a flowchart for explaining an image processing method according to the fifth embodiment of the invention;
FIG. 15 is a block diagram showing the configuration of an image processing apparatus according to a fifth embodiment of the invention.
FIG. 16 is a diagram illustrating an example of color data statistics handled by the image processing apparatus according to the fifth embodiment of the present invention.
FIG. 17 is a diagram illustrating an example of color data statistic handled by the image processing apparatus according to the fifth embodiment of the present invention.
FIG. 18 is a flowchart for explaining an image processing method according to the sixth embodiment of the present invention;
FIG. 19 is a block diagram illustrating a configuration of an image processing apparatus according to a sixth embodiment of the present invention.
FIG. 20 is a flowchart for explaining an image processing method according to the seventh embodiment of the invention;
FIG. 21 is a block diagram showing a configuration of an image processing apparatus according to a seventh embodiment of the present invention.
FIG. 22 is a conceptual diagram showing retained information retained by the staged encoding retaining unit of the image processing apparatus according to the seventh embodiment of the present invention.
FIG. 23 is a block diagram illustrating a simple configuration of an image processing apparatus including a resolution conversion circuit.
FIG. 24 is a diagram for explaining resolution conversion processing;
FIG. 25 is a diagram for explaining enlargement / reduction processing;
FIG. 26 is a block diagram showing a simple configuration of an image processing apparatus including mode setting means.
FIG. 27 is a diagram for explaining a processing mode;
FIG. 28 is a flowchart for explaining a conventional image processing method;
FIG. 29 is a block diagram illustrating a configuration of a conventional image processing apparatus.
[Explanation of symbols]
20 input images
21 Area dividing means
22 Initial setting means
23 Component of interest selection means
24 Group division means
25 Representative color extraction means
26 End determination means
27 Target area approximation means
28 Output image
29 Distance calculation means
30 Initial group dividing means
31 Initial representative extraction means
32 Means of variance calculation by component
33 Dividing component determining means
70 Second group dividing means
71 Auxiliary division criterion calculation means
72 Regrouping means
100 reference color table set
101 Color data classification means
102 Total variance calculation means
103 representative color determining means
130 Sequential division determination value calculation means
131 Sequential division determination means
132 Sequential representative color determining means
150 color data statistic calculation means
151 Existing color use determination means
152 Similar region determining means
153 Simple representative extraction means
180 Sequential division target determination means
181 Proximity similar region determination means
200 Retention determination means
201 stage encoding holding means
202 Maximum end determination means
203 User image quality selection means
204 Appropriate representative color readout means
2300a Input means r
2300b Input means g
2300c Input means b
2301a Pre-encoding means r
2301b Pre-stage encoding means g
2301c Pre-encoding means b
2302 Subsequent encoding means
2303 Decryption means
2304a Output means r
2304b Output means g
2304c Output means b
Claims (6)
画像データをブロックに分割するステップと、Dividing the image data into blocks;
ブロックに対し第1の所定数の第1代表色を決定するステップと、Determining a first predetermined number of first representative colors for the block;
前記ブロックに含まれる画素の座標位置と前記第1代表色の中での代表色との対応である第1位置情報を決定するステップと、Determining first position information corresponding to a coordinate position of a pixel included in the block and a representative color among the first representative colors;
前記ブロックに対し前記第1の所定数より多い第2の所定数の第2代表色を決定するステップと、Determining a second predetermined number of second representative colors greater than the first predetermined number for the block;
前記画素の座標位置と、前記第2代表色の中での代表色との第2の対応である第2位置情報を決定するステップと、Determining second position information which is a second correspondence between the coordinate position of the pixel and a representative color among the second representative colors;
前記第1位置情報と前記第2位置情報とを共に保持するステップと、Holding both the first position information and the second position information;
画質選択モードの指定を受け付けるステップと、A step of accepting designation of the image quality selection mode;
指定された前記画質選択モードに応じて、事前に保持された前記第1位置情報または前記第2位置情報のいずれかを用いて、前記ブロックに含まれる画素値を近似するステップと、Approximating a pixel value included in the block using either the first position information or the second position information held in advance according to the designated image quality selection mode;
近似されたブロック毎のデータを用いて画像データを送信するステップと、Transmitting image data using approximated block-by-block data;
を含む画像データ送信方法。Including image data transmission method.
前記着目成分に従い、前記第1の所定数のグループを前記第2の所定数のグループに分割するステップとをさらに含み、Dividing the first predetermined number of groups into the second predetermined number of groups according to the component of interest;
前記第2の所定数の各グループに属する色データから前記第2代表色を決定する請求項1記載の画像データ送信方法。The image data transmitting method according to claim 1, wherein the second representative color is determined from color data belonging to each of the second predetermined number of groups.
画像データの解像度を設定した値に変換するステップと、Converting the resolution of the image data to a set value;
前記ブロックのサイズを決定するステップとをさらに含み、Determining the size of the block;
決定されたサイズのブロックに前記画像データを分割する請求項1記載の画像データ送信方法。The image data transmission method according to claim 1, wherein the image data is divided into blocks of a determined size.
指定された処理モードに応じて、前記第1の所定数または第2の所定数、およびブロックのサイズを決定するステップとをさらに含む請求項1記載の画像データ送信方法。The image data transmitting method according to claim 1, further comprising: determining a size of the first predetermined number or the second predetermined number and a block according to a designated processing mode.
画像データをブロックに分割する領域分割部と、An area dividing unit for dividing image data into blocks;
ブロックに対し第1の所定数の第1代表色を決定し、Determining a first predetermined number of first representative colors for the block;
前記ブロックに含まれる画素の座標位置と前記第1代表色の中での代表色との対応である第1位置情報を決定し、Determining first position information corresponding to a coordinate position of a pixel included in the block and a representative color among the first representative colors;
前記ブロックに対し、前記第1の所定数より多い第2の所定数の、第2代表色を決定し、Determining a second predetermined number of second representative colors greater than the first predetermined number for the block;
前記画素の座標位置と、前記第2代表色の中での代表色との第2の対応である第2位置A second position that is a second correspondence between the coordinate position of the pixel and a representative color among the second representative colors 情報を決定する代表色抽出部と、A representative color extraction unit for determining information;
前記第1位置情報と前記第2位置情報とを共に保持する段階符号化保持手段と、Stage encoding holding means for holding both the first position information and the second position information;
画質選択モードの指定を受け付ける画質選択部と、An image quality selection unit that accepts specification of an image quality selection mode;
指定された前記画質選択モードに応じて、事前に保持された前記第1位置情報または前記第2位置情報のいずれかを選択する適切代表色読出部と、An appropriate representative color reading unit for selecting either the first position information or the second position information held in advance according to the designated image quality selection mode;
選択された前記第1位置情報または前記第2位置情報を用いて前記ブロックに含まれる画素値を近似する対象領域近似部と、A target area approximating unit that approximates a pixel value included in the block using the selected first position information or second position information;
近似されたブロック毎のデータを用いて画像データを送信する送信部と、A transmission unit that transmits image data using approximated data for each block;
を含む画像データ送信装置。An image data transmitting apparatus including:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2002012451A JP3971614B2 (en) | 2001-01-22 | 2002-01-22 | Image data transmission method and image data transmission apparatus |
Applications Claiming Priority (5)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2001-12757 | 2001-01-22 | ||
JP2001012757 | 2001-01-22 | ||
JP2001-12756 | 2001-01-22 | ||
JP2001012756 | 2001-01-22 | ||
JP2002012451A JP3971614B2 (en) | 2001-01-22 | 2002-01-22 | Image data transmission method and image data transmission apparatus |
Publications (3)
Publication Number | Publication Date |
---|---|
JP2002290763A JP2002290763A (en) | 2002-10-04 |
JP2002290763A5 JP2002290763A5 (en) | 2005-06-30 |
JP3971614B2 true JP3971614B2 (en) | 2007-09-05 |
Family
ID=27345776
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2002012451A Expired - Fee Related JP3971614B2 (en) | 2001-01-22 | 2002-01-22 | Image data transmission method and image data transmission apparatus |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP3971614B2 (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP4725336B2 (en) * | 2006-01-30 | 2011-07-13 | ブラザー工業株式会社 | Image processing apparatus and image processing program |
JP6003126B2 (en) * | 2012-03-16 | 2016-10-05 | コニカミノルタ株式会社 | Data processing method, data processing program, and data processing apparatus |
US9418296B1 (en) * | 2015-03-17 | 2016-08-16 | Netflix, Inc. | Detecting segments of a video program |
CN112652024B (en) * | 2020-12-11 | 2023-05-05 | 浙江工商大学 | Method for replacing colors of images based on color harmony |
-
2002
- 2002-01-22 JP JP2002012451A patent/JP3971614B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2002290763A (en) | 2002-10-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US6961462B2 (en) | Image processing method and image processor | |
EP0235456B1 (en) | Image processing apparatus and method with blocks of compressed data | |
Battiato et al. | A locally adaptive zooming algorithm for digital images | |
US6757431B2 (en) | Resolution conversion for anti-aliased images using loose gray scale template matching | |
US6356668B1 (en) | Method for efficient rate control | |
EP0874330A2 (en) | Area based interpolation for image enhancement | |
US20030103680A1 (en) | Block boundary artifact reduction for block-based image compression | |
JP4045913B2 (en) | Image coding apparatus, image coding method, and image processing apparatus | |
US5172237A (en) | High quality color image compression system | |
JP2007536774A (en) | System and method for estimating compression noise of an image | |
EP1462991A2 (en) | Apparatus and method for processing an image | |
Dixit | Quantization of color images for display/printing on limited color output devices | |
US20020067864A1 (en) | Image processing device and image processing method | |
Kapah et al. | Demosaicking using artificial neural networks | |
Miyata et al. | Novel inverse colorization for image compression | |
JP3971614B2 (en) | Image data transmission method and image data transmission apparatus | |
JP3814921B2 (en) | Grayscale image halftoning method and apparatus having grayscale image halftoning means | |
JP3960210B2 (en) | Image processing device | |
JPH0974488A (en) | Image processing method and device | |
JP3724525B2 (en) | Image processing method and image processing apparatus | |
JP3647071B2 (en) | Image processing apparatus and method | |
US8532404B2 (en) | Image processing apparatus, image processing method and computer-readable medium | |
JP2919236B2 (en) | Image coding device | |
JPH11127339A (en) | Image processor | |
Freisleben et al. | Color quantization with a hybrid genetic algorithm |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20041008 |
|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20041008 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20061122 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20070214 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20070416 |
|
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: 20070516 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20070608 |
|
R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 Ref document number: 3971614 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100615 Year of fee payment: 3 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110615 Year of fee payment: 4 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120615 Year of fee payment: 5 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120615 Year of fee payment: 5 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130615 Year of fee payment: 6 |
|
LAPS | Cancellation because of no payment of annual fees |