[go: up one dir, main page]

JP2002290763A - Image processing method and image processing apparatus - Google Patents

Image processing method and image processing apparatus

Info

Publication number
JP2002290763A
JP2002290763A JP2002012451A JP2002012451A JP2002290763A JP 2002290763 A JP2002290763 A JP 2002290763A JP 2002012451 A JP2002012451 A JP 2002012451A JP 2002012451 A JP2002012451 A JP 2002012451A JP 2002290763 A JP2002290763 A JP 2002290763A
Authority
JP
Japan
Prior art keywords
color
representative
group
color data
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2002012451A
Other languages
Japanese (ja)
Other versions
JP3971614B2 (en
JP2002290763A5 (en
Inventor
Tatsumi Watanabe
辰巳 渡辺
Akio Kojima
章夫 小嶋
Yasuhiro Kuwabara
康浩 桑原
Toshiharu Kurosawa
俊晴 黒沢
Yuusuke Monobe
祐亮 物部
Hirotaka Oku
博隆 奥
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP2002012451A priority Critical patent/JP3971614B2/en
Publication of JP2002290763A publication Critical patent/JP2002290763A/en
Publication of JP2002290763A5 publication Critical patent/JP2002290763A5/ja
Application granted granted Critical
Publication of JP3971614B2 publication Critical patent/JP3971614B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Image Processing (AREA)
  • Facsimile Image Signal Circuits (AREA)
  • Color Image Communication Systems (AREA)
  • Image Analysis (AREA)

Abstract

(57)【要約】 【課題】 カラー画像を複数の小領域に分割して、各小
領域を高精度に近似する代表色を抽出するための画像処
理方法及び画像処理装置を提供する。 【解決手段】 入力画像20は複数の小領域に分割され
る。各小領域内の色データは現時点でのグループに分類
され、着目成分選択手段23が各グループより得られた
代表色からの分散の大きい成分を大きい順にいくつか選
び出す。そして、グループ分割手段24が選択された成
分方向に対象グループ内の色データを複数に分割し、代
表色抽出手段25が各グループの代表色を求める。この
ような逐次的なグループ分割と代表色抽出処理を所定の
代表色数が得られるまで行うことで画像の高精度な圧縮
近似を実現する。
(57) Abstract: An image processing method and an image processing apparatus for dividing a color image into a plurality of small areas and extracting a representative color that approximates each small area with high accuracy. An input image is divided into a plurality of small areas. The color data in each small area is classified into the current group, and the target component selection unit 23 selects some components having a large variance from the representative color obtained from each group in descending order. Then, the group dividing unit 24 divides the color data in the target group into a plurality in the selected component direction, and the representative color extracting unit 25 obtains the representative color of each group. By performing such sequential group division and representative color extraction processing until a predetermined number of representative colors is obtained, highly accurate compression approximation of an image is realized.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、色データを圧縮、
復元する画像処理方法及び画像処理装置に関するもので
ある。
The present invention relates to a method for compressing color data,
The present invention relates to an image processing method and an image processing apparatus for restoring.

【0002】[0002]

【従来の技術】カラー画像は色についてのデータ量が膨
大である。このため、画像の表示や転送を行う際には元
の色データの色数をより少数の色数で近似してデータ量
の削減を図ることがよく行われている。
2. Description of the Related Art A color image has a huge amount of data about colors. Therefore, when displaying or transferring an image, it is common practice to reduce the data amount by approximating the number of colors of the original color data with a smaller number of colors.

【0003】このようなカラー画像の圧縮方法として、
例えば特開昭61−252792号に記載されている手
法が知られている。この手法では、レッド信号R、グリ
ーン信号G、ブルー信号Bが、各々独立に扱われる。この
手法について、図28および24を用いて概要を説明す
る。この手法を採用する画像処理装置では、図29に示
すように、画像情報の各色で独立して入力手段2300
a、2300b、2300cが設けられている。入力手
段2300a、2300b、2300cを介して入力さ
れた各色データは、前段符号化手段2301a、230
1b、2301cに与えられる。前段符号化手段230
1a、2301b、2301cは、それぞれ色データの
平均値を求める。この平均値に基づいてカラー画像の特
定ブロックは2つの領域に分割される。さらに、それぞ
れの分割領域に含まれる画素のデータを平均することで
2つの代表値が算出される。以上の処理で、ブロック内
の各色は2つの領域に分割され、各色で2つの代表値が
求められる。RGBの3色の組み合わせによって、領域
は計2の3乗=8つ得られる。そして、分割された8つ
の領域を代表する8つの代表色が得られる。後段符号化
手段2302は、この8色の上記ブロックにおける出現
頻度を検出することで代表色として2色を選択し、この
ブロック内の色データの代表色とする。得られた2色の
代表色とこの代表色で画像内の画素データを近似するた
めの位置情報は、インターネット等の通信媒体やインタ
ーフェースを介して復号化手段2303に送られる。復
号化手段2303では、所定の画素座標に代表色を埋め
ることで復元画像が作成され、復元画像は、出力手段2
304a、2304b、2304cによって出力され
る。
As a compression method of such a color image,
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 handled independently. An outline of this technique will be described with reference to FIGS. In an image processing apparatus employing this method, as shown in FIG. 29, input means 2300 is independently provided for each color of image information.
a, 2300b and 2300c are provided. Each color data input through the input units 2300a, 2300b, and 2300c is converted into the pre-encoding units 2301a and 2301a.
1b, 2301c. Pre-stage encoding means 230
Each of 1a, 2301b, and 2301c calculates an average value of color data. The specific block of the color image is divided into two regions based on the average value. Furthermore, two representative values are calculated by averaging the data of the pixels included in each divided area. Through the above processing, each color in the block is divided into two regions, and two representative values are obtained for each color. By the combination of three colors of RGB, a total of 2 to the third power = 8 are obtained. Then, eight representative colors representing the eight divided areas are obtained. The latter-stage encoding unit 2302 selects two colors as representative colors by detecting the appearance frequency of the eight colors in the block, and sets the two colors as representative colors of the color data in this block. The obtained two representative colors and the positional information for approximating the pixel data in the image with the representative colors are sent to the decoding unit 2303 via a communication medium such as the Internet or an interface. The decoding unit 2303 creates a restored image by embedding a representative color in predetermined pixel coordinates, and outputs the restored image to the output unit 2.
It is output by 304a, 2304b, and 2304c.

【0004】また、他の手法として、RGB信号の主成
分分析を行うことで近似データを求める手法(例えば、
特開平1−264092号)が知られている。これは、
特定のブロックを代表する色(主成分色)を、RGB信
号の相関を考慮して決定し、この主成分色に基づいて上
記ブロックの分割を行って、このブロック内の色を所定
数の色により近似する手法である。
As another method, a method of obtaining approximate data by performing a principal component analysis of an RGB signal (for example,
Japanese Patent Application Laid-Open No. 1-264092) is known. this is,
A color (principal component color) representative of a specific block is determined in consideration of the correlation of the RGB signals, and the block is divided based on the principal component color, and the color in this block is determined by a predetermined number of colors. This is a method that approximates the following.

【0005】[0005]

【発明が解決しようとする課題】しかし、上記特開昭6
1−252792号に記載されているような手法では、
RGB信号が各々独立に扱われ、各色の相関が全く考慮
されないため、復元画像における歪みを生じやすく、歪
み程度を定量評価するSN比(Signal to Noise Rati
o)も良好な結果は得られないことがしばしば指摘され
ていた。
However, Japanese Patent Application Laid-Open No.
In the technique as described in 1-225792,
Since the RGB signals are handled independently of each other and the correlation of each color is not considered at all, distortion in the restored image is likely to occur, and the S / N ratio (Signal to Noise Rati) for quantitatively evaluating the degree of distortion is considered.
o) was often pointed out that good results were not obtained.

【0006】また、上記特開平1−264092号で使
用した主成分分析は、RGB信号の相関を求めるために
多次元の行列演算を必要とするので処理量が多くなると
ともに、処理回路等のハードウェア規模の増大化を招く
恐れがあった。さらに、CPU等のソフトウェア処理の
場合も、処理時間を多く要することが問題であった。
The principal component analysis used in the above-mentioned Japanese Patent Application Laid-Open No. 1-264092 requires a multi-dimensional matrix operation to obtain the correlation between the RGB signals. There is a risk that the scale of the wear will increase. Further, in the case of software processing of a CPU or the like, there is a problem that a long processing time is required.

【0007】本発明は、このような従来の技術における
課題を鑑みてなされたのもであり、小領域内の色データ
の近似を高精度かつ高速に行う画像処理方法及び画像処
理装置を提供することを目的とするものである。
SUMMARY OF THE INVENTION The present invention has been made in view of such problems in the prior art, and provides an image processing method and an image processing apparatus for approximating color data in a small area with high accuracy and high speed. It is the purpose.

【0008】[0008]

【課題を解決するための手段】上記目的を達成するため
に、本発明は、以下の手段を採用している。
In order to achieve the above object, the present invention employs the following means.

【0009】本発明において、領域分割手段は、入力さ
れた画像を複数の小領域に分割する。参照色テーブルセ
ットは、予め用意された参照色セットを有しており、色
データ分類手段は、小領域内の色データとテーブル内の
参照色をもとに小領域内の色データを所定数のグループ
に分割する。代表色決定手段は、得られた各グループ内
の色データの代表色を求める。そして、対象領域近似手
段は、得られた所定数の代表色を使って各小領域の色デ
ータを近似する。
In the present invention, the area dividing means divides an 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 classifying means determines 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. Divided 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 obtained predetermined number of representative colors.

【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 colors in the table. The approximation is fast.

【0011】代表色決定手段は、例えば総和分散計算手
段の計算結果を使ってグループ内の色データの代表色を
求める。総和分散計算手段は、色データ分類手段によっ
て得られた各グループにおける色データの平均値からの
分散の総和を計算する。この場合、分散の総和が小さい
代表色が求められることによって、近似の精度が確保さ
れる。
The representative color determining means obtains a representative color of the color data in the group using, for example, the calculation result of the total variance calculating means. The total variance calculating means calculates the total variance from the average value of the color data in each group obtained by the color data classifying means. In this case, approximation accuracy is ensured by obtaining a representative color having a small total variance.

【0012】もっとも、予め用意された参照色セットで
は、近似の精度が十分に確保できない可能性もある。こ
のため、代表色決定手段とは別に逐次的代表色決定手段
を設け、逐次分割判定値計算手段が分割判定値を計算
し、逐次分割判定手段はこの分割判定値をもとに逐次的
代表色決定手段により代表色を決定するかどうかを判定
するようにしてもよい。
However, with the reference color set prepared in advance, there is a possibility that the approximation accuracy cannot be sufficiently secured. For this reason, a sequential representative color determining means is provided separately from the representative color determining means, a sequential division determination value calculating means calculates a division determination value, and the sequential division determining means calculates a sequential representative color based on the division determination value. The determination unit may determine whether to determine the representative color.

【0013】逐次分割判定値計算手段は、色データ分類
手段によって得られた各グループにおける色データの平
均値と色データ分類手段で使用された参照色より分割判
定値を計算する。逐次分割判定手段は、分割判定値をも
とに逐次的代表色決定手段により代表色を決定するかど
うかを判定する。
The sequential division judgment value calculation means calculates a division judgment 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 determining unit determines whether the representative color is determined by the sequential representative color determining unit based on the division determination value.

【0014】逐次分割判定手段の判定に従い、逐次的代
表色決定手段により代表色が決定される場合には、対象
領域近似手段は、代表色決定手段ではなく、逐次的代表
色決定手段で得られた所定数の代表色を使って各小領域
の色データを近似する。
When the representative color is determined by the sequential representative color determining means according to the determination of the sequential division determining means, the target area approximating means is obtained by the sequential representative color determining means instead of the representative color determining means. The color data of each small area is approximated using the predetermined number of representative colors.

【0015】逐次的代表色決定手段は、対象グループ内
の色データの分布をもとに選択された分割着目成分に関
する基準をもとに対象グループを複数のグループに分割
し、得られた各グループの代表色を決定する処理を、代
表色が所定数得られるまで繰り返す。このため、対象領
域に合った近似が行われ、近似の精度は向上する。逐次
的に代表色を求める処理が行われるのは、予め用意され
た参照色セットで近似の精度が十分に確保できない箇所
だけであるから、全体としては高速且つ高精度の近似が
行われる。
The sequential representative color determining means divides the target group into a plurality of groups based on a criterion relating to the component of interest selected based on the distribution of the color data in the target group. Is repeated until a predetermined number of representative colors are obtained. Therefore, approximation suitable for the target area is performed, and the accuracy of approximation is improved. Since the process of sequentially obtaining the representative color is performed only at a portion where the approximation accuracy cannot be sufficiently ensured by the reference color set prepared in advance, the high-speed and high-precision approximation is performed as a whole.

【0016】また、参照色を利用しないで近似の高速化
及び高精度化を図ることも可能である。例えば、初期設
定手段は、小領域に対して初期のグループを設定し、小
領域内の色データ全てを初期のグループに分類し、初期
のグループの代表色を求める。着目成分選択手段は、対
象グループ内に属する色データの分布をもとに、対象と
するグループに分割時に着目する分割着目成分を複数選
択する。グループ分割手段は、得られた複数の分割着目
成分に従い、対象とするグループを複数に分割するとと
もに、対象グループに属する色データを分割後に得られ
たグループに振り分ける。この場合、代表色抽出手段
は、グループ分割手段によって得られた各グループに属
する色データの代表色を求める。終了判定手段は、代表
色が所定数得られたかどうかの判定を行う。代表色が所
定数得られるまで分割着目成分の選択から代表色の抽出
が繰り返され、終了判定手段により代表色が所定数得ら
れたと判定された場合には、対象領域近似手段は、得ら
れた所定数の代表色を使って各小領域の色データを近似
する。
Also, it is possible to speed up approximation and increase accuracy without using a reference color. For example, the initial setting means sets an initial group for the small area, classifies all color data in the small area into an initial group, and obtains a representative color of the initial group. The target component selection means selects a plurality of target components of interest at the time of division into the target group based on the distribution of the color data belonging to the target group. The group dividing means divides the target group into a plurality of groups in accordance with the obtained plurality of divided components of interest, 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 a 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. The extraction of the representative color is repeated from the selection of the divided component of interest until the predetermined number of representative colors is obtained, and when the end determination unit determines that the predetermined number of representative colors has been obtained, the target area approximation unit outputs 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 as described above, a group is divided according to a plurality of 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 focused component selecting means selects a plurality of divided focused components, for example, the component-specific variance calculating means calculates the variance of the representative color of the color data and the components of the color data in the target group. The divided component determining means selects the component of interest in order from the component having the largest variance value obtained by the component-specific calculating means among the components.

【0019】分散値の大きい成分について順次グループ
の分割が行われることになるから、近似の精度は高い。
もっとも、ユーザは常に高精度の近似を求めるとは限ら
ない。例えばユーザは精度よりも速度を求める場合もあ
れば、サムネイル画像のように画像を識別するのに十分
なだけの精度しか求めない場合もある。この場合には、
逐次的に得られる代表色を利用することができる。
Since the group division is performed sequentially on the components having large variance values, the approximation accuracy is high.
However, the user does not always seek a high-precision approximation. For example, a user may require speed over accuracy, or may require only enough accuracy 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 judging means judges whether or not a plurality of representative colors set in a predetermined number have been obtained. The step encoding holding means, when it is determined that the representative color is obtained by the holding means, uses the representative color in each step and position information for approximating the color data in the small area using the representative color. Hold. The user image quality selecting means is used by the user to select any one of a plurality of image quality modes. The appropriate representative color reading means calls the representative color and the position information according to the selection mode from the step encoding holding means according to the selection result using the user image quality selecting means.
In this case, the end determining means determines whether or not the maximum predetermined number of representative colors has been obtained, and the target area approximating means determines whether or not the end determining means has determined 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】これによって、例えばサムネイルモード、
高速モード、高精細モードなど、伝送先のユーザにより
指示された画質モードに合わせた近似が行われる。その
結果、高いユーザフレキシビリティが確保される。
Thus, for example, the thumbnail mode,
Approximation is performed in accordance with an image quality mode specified by a transmission destination user, such as a high-speed mode or a high-definition mode. As a result, high user flexibility is ensured.

【0022】また、代表色を逐次的に求める場合に、近
似の高精度化及び高速化を図るために、第2グループ分
割手段を設けるようにしてもよい。この場合、着目成分
選択手段は、複数の分割着目成分を選択する必要はな
い。
Further, when the representative colors are sequentially obtained, a second group dividing means may be provided in order to increase the accuracy and speed of approximation. In this case, the target component selection means does not need to select a plurality of divided target components.

【0023】第2グループ分割手段は、グループ分割手
段によって得られた各グループ内の色データをもとに各
グループをさらに複数のグループに分割するとともに、
各グループ内の色データを分割後に得られたグループに
振り分ける。
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,
The color data in each group is allocated to the group obtained after the division.

【0024】代表色抽出手段は、グループ分割手段では
なく第2グループ分割手段で得られた各グループに属す
る色データの代表色を求める。
The representative color extracting means obtains a representative color of the color data belonging to each group obtained by the second group dividing means instead of the group dividing means.

【0025】この場合、グループ分割手段によって得ら
れた各グループ内の色データをもとに各グループがさら
に複数のグループに分割されるため、その分だけ繰り返
し回数が少なくなる。このため、近似は高精度且つ高速
に行われる。第2グループ分割手段による分割によっ
て、グループ分割手段による分割が1回しか行われない
場合もある。
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. Therefore, the approximation is performed with high accuracy and at high speed. In some cases, the division by the second group dividing unit is performed only once by the group dividing unit.

【0026】第2グループ分割手段は、例えば補助分割
基準計算手段と再グループ分割手段とを備える。補助分
割基準計算手段は、グループ分割手段で得られた各グル
ープ内の色データの原点からのユークリッド距離を計算
する。再グループ分割手段は、補助分割基準計算手段の
計算結果をもとに、グループ分割手段で得られたグルー
プをさらに細分化するとともに、対象グループ内の色デ
ータを分割後に得られたグループに振り分ける。
The second group dividing means includes, for example, an auxiliary dividing reference calculating means and a re-group dividing means. 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 regrouping means further subdivides the group obtained by the grouping means on the basis of the calculation result of the auxiliary division criterion calculating means and distributes the color data in the target group to the group obtained after the division.

【0027】このように各グループ内の色データの原点
からのユークリッド距離を利用することによって、近似
の精度は確保される。
By utilizing the Euclidean distance from the origin of the color data in each group, approximation accuracy is ensured.

【0028】また、上述のように代表色を逐次的に求め
る場合でも、一部の小領域についてのみ代表色が逐次的
に求められるのであれば、全体として近似は高精度且つ
高速に行われる。
Even when the representative colors are sequentially obtained as described above, if the representative colors are sequentially obtained only for some of the small areas, the approximation is performed with high accuracy and high speed as a whole.

【0029】このために、色データ統計量算出手段は、
小領域内の色データの統計的分布を求める。既代表色利
用判定手段は、色データの統計的分布を既に代表色が抽
出された抽出済み領域より得られた統計的分布と比較し
て、抽出済み領域の代表色を利用するかどうかを判定す
る。類似領域決定手段は、小領域と最も類似度の高い抽
出済み領域を選択する。色データ分類手段は、小領域内
の色データと選択された抽出済み領域内の代表色をもと
に小領域内の色データを所定数のグループに分割する。
簡易代表抽出手段は、色データ分類手段によって得られ
た各グループに属する色データの代表色を求める。既定
代表色利用判定手段により抽出済み領域の代表色を利用
するとの判定がされた場合には、代表色決定手段ではな
く簡易代表抽出手段で得られた所定数の代表色を使って
各小領域の色データを近似する。
For this purpose, the color data statistic calculation means includes:
The statistical distribution of the color data in the small area is obtained. The already-represented color use determining unit 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. I do. The similar area determining means selects an extracted area having the highest similarity to the small area. 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 extracting means obtains a representative color of the color data belonging to each group obtained by the color data classifying means. If the predetermined representative color use determining means determines that the representative color of the extracted area is to be used, each small area is determined using a predetermined number of representative colors obtained by the simple representative extracting means instead of the representative color determining means. Approximate the color data.

【0030】このように、統計的分布がよく似ている抽
出済み領域があれば、その抽出済み領域の代表色を利用
して所定数の代表色を求めることも可能である。これに
よって、全体として近似は高精度且つ高速に行われる。
統計的分布がよく似ている領域が連続するような場合に
は、近似速度の高速化が著しくなる。
As described above, if there is an extracted area having a similar statistical distribution, a predetermined number of representative colors can be obtained by using the representative colors of the extracted area. As a result, 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】なお、小領域内の色データの統計的分布
は、例えばヒストグラムによって表される。
The statistical distribution of the color data in the small area is represented by a histogram, for example.

【0032】また、抽出済み領域を適当に設定するよう
にしてもよい。このために、逐次分割対象決定手段は、
小領域のうち代表色決定手段により代表色が決定される
領域を選択する。逐次分割対象決定手段で選択された領
域については逐次的に代表色が求められる。逐次分割対
象決定手段で選択された領域は、抽出済み領域となる。
近接類似領域決定手段は、抽出済み領域のうち、逐次分
割対象決定手段で選択されていない小領域に近接する抽
出済み領域より得られた統計量と小領域の統計量を比較
して、最も類似度の高い抽出済み領域を選択する。この
場合、簡易代表抽出手段は、近接類似領域決定手段で選
択された抽出済み領域の代表色をもとに、対象小領域内
の色データを所定数のグループに分割し各グループに属
する代表色を求める。そして、対象領域近似手段は、逐
次分割対象決定手段で選択されていない小領域について
は、簡易代表色抽出手段で得られた所定数の代表色を使
って各小領域の色データを近似する。
The extracted area may be set appropriately. For this purpose, the sequential division target determination means
An area in which the representative color is determined by the representative color determining means is selected from the small areas. For the area selected by the sequential division target determination means, representative colors are sequentially obtained. The area selected by the sequential division target determining means is an extracted area.
The close similar area determination means compares the statistics obtained from the extracted area close to the small area not selected by the sequential division target determination means with the statistics of the small area, and determines the most similar area. Select a highly extracted area. In this case, the simplified representative extracting means divides the color data in the target small area into a predetermined number of groups based on the representative colors of the extracted areas selected by the close similar area determining means, and Ask for. Then, the target area approximating means approximates the color data of each small area using the 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】このように予め定めた領域について逐次的
に代表色を求めておき、それ以外の領域については、近
接する抽出済み領域の代表色を利用して代表色を求める
ことによって、全体として近似は高精度且つ高速に行わ
れる。なお、精度のばらつきを抑えるためには、逐次的
に代表色を求める領域を画像から均等に選択するのが好
ましい。
As described above, a representative color is sequentially obtained for a predetermined area, and for other areas, a representative color is obtained using a representative color of an adjacent extracted area. Is performed with high precision and at high speed. Note that, in order to suppress variations in accuracy, it is preferable to sequentially and uniformly select areas for obtaining the representative colors from the image.

【0034】[0034]

【発明の実施の形態】以下、本発明の実施の形態につい
て図面を参照しながら説明する。なお、各実施の形態に
おいて色データとは、画素におけるカラー信号を表すも
のであり、RGB表色系ではレッド、グリーン、ブルー
の3成分からなるデータを表すものとする。また、各実
施の形態における画像処理装置の構成図の各図におい
て、同一部には同じ番号を付している。
Embodiments of the present invention will be described below with reference to the drawings. In each of the embodiments, the color data represents a color signal of a pixel, and in the RGB color system, represents data including three components of red, green, and blue. In the drawings of the configuration of the image processing apparatus in each embodiment, the same parts are denoted by the same reference numerals.

【0035】(第1の実施の形態)まず、本発明の第1
の実施の形態における画像処理方法及び画像処理装置に
ついて説明する。図2に示すように、画像処理装置にお
いて、領域分割手段21は、入力画像20を微小なブロ
ック領域に分割する。初期設定手段22は、対象とする
ブロック領域内の色データを逐次的にグループ分割する
際の初期グループ設定を行う。着目成分選択手段23
は、分割対象グループ内の色データの分布をもとに、こ
のグループの分割時の着目成分を決定する。グループ分
割手段24は、上記着目成分に従い対象グループを複数
に分割するとともに、対象グループに属する色データを
分割後に得られたグループに振り分ける。代表色抽出手
段25は、上記グループ分割手段24で得られた各グル
ープに属する色データの代表色を求める。終了判定手段
26は、代表色が予め設定された所定数得られたかどう
かの判定を行う。対象領域近似手段27は、得られた所
定数の代表色を使って各ブロック領域内の色データを近
似する。
(First Embodiment) First, the first embodiment of the present invention will be described.
An image processing method and an image processing apparatus according to the embodiment will be described. As shown in FIG. 2, in the image processing apparatus, the area dividing means 21 divides the input image 20 into minute block areas. The initial setting unit 22 performs an initial group setting when the color data in the target block area is sequentially divided into groups. Attention component selection means 23
Determines the target component at the time of division of this group based on the distribution of color data within the group to be divided. The group dividing means 24 divides the target group into a plurality of groups according to the target component, and allocates the color data belonging to the target group to the groups obtained after the division. The representative color extracting unit 25 obtains a representative color of the color data belonging to each group obtained by the group dividing unit 24. The end determination unit 26 determines whether or not a predetermined number of representative colors has been obtained. The target area approximating means 27 approximates the color data in each block area using the obtained predetermined number of representative colors.

【0036】そして、初期設定手段22は、対象ブロッ
ク領域に属する色データの原点からのユークリッド距離
を求める距離計算手段29と、上記ユークリッド距離を
もとに領域内の全色データを複数のグループに分類する
初期グループ分割手段30と、上記手段で得られた各グ
ループ内に属する色データの平均色をそのグループの代
表色とする初期代表抽出手段31より構成されている。
また、着目成分選択手段23は、対象グループに属する
色データの代表色と属する色データの各成分の分散を計
算する成分別分散計算手段32と、上記成分別分散計算
手段で得られた分散値より大きい成分から順番に選び出
し、グループ分割時における分割着目成分とする分割成
分決定手段33より構成される。
The initial setting means 22 includes a distance calculating means 29 for obtaining a Euclidean distance from the origin of the color data belonging to the target block area, and all color data in the area based on the Euclidean distance into a plurality of groups. It comprises an initial group dividing means 30 for classifying, and an initial representative extracting means 31 which uses the average color of the color data belonging to each group obtained by the above means as a representative color of the group.
The target component selecting unit 23 includes a component-specific variance calculating unit 32 for calculating the variance of each component of the color data belonging to the representative color of the color data belonging to the target group, and a variance value obtained by the component-specific variance calculating unit. It is composed of divided component determining means 33 which selects the components in order from the larger components and sets them as the components of interest for division at the time of group division.

【0037】以上のように構成された第1の実施の形態
における画像処理装置の動作及び画像処理方法について
図1をもとに説明する。図1に示すように、入力された
カラー画像20は領域分割手段21で微小なブロック領
域に分割される(S1)。これは、微小領域内にある色
データ数はある程度限られるため、少ない色データで表
現しても精度の悪化はそれほど大きくないであろうこと
を利用したものである。そして、以降の代表色抽出処理
はブロック領域ごとに処理が実行される。この処理方法
では、以降説明するように近似画像の高精度化を実現す
るために、対象ブロック領域内の色データの統計的分布
をもとに逐次的にグループ化と各グループを代表とする
代表色抽出が行われる。
The operation of the image processing apparatus and the image processing method according to the first embodiment configured as described above will be described with reference to FIG. As shown in FIG. 1, the input color image 20 is divided into small block areas by the area dividing means 21 (S1). This is based on the fact that the number of color data in a minute area is limited to a certain extent, so that even if expressed with a small amount of color data, the deterioration in accuracy will not be so large. The subsequent representative color extraction processing is executed for each block area. In this processing method, as described below, in order to realize high accuracy of an approximate image, grouping is sequentially performed based on a statistical distribution of color data in a target block area, and a representative is represented by each group. Color extraction is performed.

【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]が計算される。初期グループ分割手段3
0は、(数1)に従って、初期グループを2つのグルー
プに分割する。ここで、ave_length_kは対象ブロック
k内の距離length_k[j]の平均値を示し、t_k_pixはk
内の全画素数を示す。また、‖cIj‖は色データcIjをベ
クトルと見なした場合のベクトルの長さ(ノルム)を表
す。
First, the initial setting means 22 sets an initial group and its representative color when performing the division process 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 belongs to one group, or as shown in FIG. There is a method of obtaining the Euclidean distance from the origin of all the color data in the target block, and classifying and setting it into a plurality of initial groups. The block configuration shown in FIG. 2 is based on the method shown in FIG. The color data cIj (rj, gj,
The Euclidean distance length_k [j] from the origin of bj) (j = 0,..., pxl_k) is calculated. Initial group division means 3
0 divides the initial group into two groups according to (Equation 1). Here, ave_length_k is the target block
Indicates the average value of distance length_k [j] in k, and t_k_pix is k
Indicates the total number of pixels in the box. {CIj} represents the length (norm) of the vector when the color data cIj is regarded as a vector.

【0039】[0039]

【数1】 (Equation 1)

【0040】初期代表抽出手段31では、このグループ
0と1に属する各色データの平均値が、このグループの代
表色として求められる。なお、初期グループ分割手段3
0では初期グループが2つに設定されたが、この数は一
意ではなく、もっと多くすることも可能である。精度よ
くブロック内データをグループ分割するためには2つ程
度が好ましい。また、図5(a)に示すように1つの初
期グループ設定も可能であり、この場合には、図2にお
いて距離計算手段29と初期グループ分割手段30の処
理は省くことができる。この時、所定数の代表色を求め
るまでの逐次処理回数が増大するため、処理時間の短縮
化にならないが、最終的に代表色抽出精度とそれを使用
して得られる近似画像の精度は図5(b)に示す方法よ
りも高くなる。
In the initial representative extracting means 31, this group
The average value of each color data belonging to 0 and 1 is obtained as a representative color of this group. The initial group dividing means 3
At 0, the initial group is set to two, but this number is not unique and can be more. In order to divide data in a block into groups with high accuracy, it is preferable to use about two. In addition, as shown in FIG. 5A, one initial group can be set. In this case, the processing of the distance calculating unit 29 and the initial group dividing unit 30 in FIG. 2 can be omitted. At this time, since the number of sequential processes until a predetermined number of representative colors is obtained increases, the processing time does not decrease. However, the accuracy of the representative color extraction and the accuracy of the approximate image obtained by using the final color are ultimately shown in FIG. It becomes higher than the method shown in FIG.

【0041】この初期グループをもとに着目成分選択手
段23、グループ分割手段24、代表色抽出手段25、
終了判定手段26が、対象ブロック内の色データを逐次
的にグループ分割し代表色を抽出する処理を行う。その
処理の具体例を図3に模式的に示す。なお、この具体例
では、分割対象グループSは4個に分割されるものとす
る。
Based on the initial group, the target component selecting means 23, the group dividing means 24, the representative color extracting means 25,
The end determination unit 26 performs a process of sequentially dividing the color data in the target block into groups and extracting a representative color. FIG. 3 schematically shows a specific example of the processing. In this specific example, it is assumed that the division target group S is divided into four.

【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とする。
FIG. 3A shows a target group S, a representative color RIs, and input pixel color data Is [j] in a space formed by the r, g, and b axes. Here, the current division target group S is set to group 1 (S = 1), and the representative color RIs (Rrs, Rgs, Rbs) representing the current division target group S is set to the representative color RI 1 k. And The current representative cluster vector number num is num = 1, and the temporary variable tnum
Is set to tnum = 1.

【0043】成分別分散計算手段32は、現在の分割対
象グループS内に所属するNs個の画素色データIs[j]( rs
[j], gs[j], bs[j] )に対して、図3(b)に示すよう
に、r、g、b軸各々独立に代表色RIsに対する偏差絶対値
の総和(分散値)δrs、δgs、δbsを求める(S3)。
The component-based variance calculation means 32 calculates Ns pixel color data Is [j] (rs) belonging to the current group S to be divided.
[j], gs [j], bs [j]), as shown in FIG. 3B, the sum (variance) of deviation absolute values for the representative color RIs independently for each of the r, g, and b axes. δrs, δgs, δbs are obtained (S3).

【0044】分割成分決定手段33は、上記により得ら
れた代表色RIs に対する偏差絶対値の総和δrs、δgs、
δbsを大きい順番に並べ、最大値を持つ軸Amax1と次に
大きな分散値を持つ軸Amax2を選択する(S4)。図3
(b)の例では、最大値を持つ軸Amax1は、r軸であり、
次に大きな分散値を持つ軸Amax2は、g軸である。
The divided component determining means 33 calculates the sums of the absolute differences δrs, δgs,
δbs are arranged in descending order, and an axis Amax1 having the maximum value and an axis Amax2 having the next largest variance value are selected (S4). FIG.
In the example of (b), the axis Amax1 having the maximum value is the r axis,
The axis Amax2 having the next largest variance is the g-axis.

【0045】図3(c)は、図3(a)、図3(b)を
b軸よりみたものである。図3(c)に示すように、グ
ループ分割手段24は、現グループS内のNs個の画素色
データIs[j]をAmax1方向に2つのグループに分割し、Ama
x2方向にも2つのグループに分割する(S5)。これに
より、グループSは計4個のグループに分割されること
となる。
FIG. 3 (c) is a view similar to FIG. 3 (a) and FIG. 3 (b).
It is viewed from the b axis. As shown in FIG. 3C, the group dividing unit 24 divides the Ns pixel color data Is [j] in the current group S into two groups in the Amax1 direction, and
It is also divided into two groups in the x2 direction (S5). As a result, the group S is divided into a total of four groups.

【0046】グループ分割の処理は、代表色RIsのAmax1
成分とグループSに属する各画素色データIs[j]のAmax1
成分、そして代表色RIsのAmax2成分とグループSに属す
る各画素色データIs[j]のAmax2成分を比較しその大小関
係をもとに行われる。図3(c)の例では、(数2)の
よう、グループ分割が行われる。
The processing of group division is performed using Amax1 of the representative color RIs.
Amax1 of the component and each pixel color data Is [j] belonging to group S
The Amax2 component of the representative color RIs and the Amax2 component of each pixel color data Is [j] belonging to the group S are compared, and the comparison is performed based on the magnitude relation. In the example of FIG. 3C, group division is performed as in (Equation 2).

【0047】[0047]

【数2】 (Equation 2)

【0048】代表色抽出手段25は、図3(d)に示す
ように、上記で得られた4つのグループS、num+1、num
+2、num+3の各重心を、新しい代表色RIs( Rrs, Rgs, Rb
s )、RInum+1( Rrnum+1, Rgnum+1, Rbnum+1 )、RInum+2
( Rrnum+2, Rgnum+2, Rbnum+2 )、RInum+3( Rrnum+3, R
gnum+3, Rbnum+3 )とする(S6)。そして、代表色数n
umをnum=num+3とする。
As shown in FIG. 3D, the representative color extracting means 25 outputs the four groups S, num + 1, num
+2 and num + 3 as the new representative colors RIs (Rrs, Rgs, Rb
s), RInum + 1 (Rrnum + 1, Rgnum + 1, Rbnum + 1), RInum + 2
(Rrnum + 2, Rgnum + 2, Rbnum + 2), RInum + 3 (Rrnum + 3, R
gnum + 3, Rbnum + 3) (S6). And the representative color number n
um is set to num = num + 3.

【0049】また、代表色抽出手段25は、得られた代
表色とブロック内画素をどの代表色で近似するかを表す
位置情報を一時保持する。この代表色は再度分割する際
に、成分別分散計算手段32での各成分の分散値計算に
使用される。図4はその際に保持される情報を表す。
The representative color extracting means 25 temporarily retains the obtained representative color and positional information indicating which representative color approximates the pixel in the block. This representative color is used for the variance value calculation of each component by the component-specific variance calculation means 32 when dividing again. FIG. 4 shows information held at that time.

【0050】Sがtnumに到達しておらず必要な代表色が
抽出されていなければ(S7)、現在の分割対象グルー
プを表す番号SをS=S+1に設定して対象グループを変更し
(S8)、手順S3からの処理が繰り返される。
If S has not reached tnum and the required representative color has not been extracted (S7), the number S representing the current division target group is set to S = S + 1, and the target group is changed. (S8) The processing from step S3 is repeated.

【0051】そして、numが予め設定した代表色数c_nu
mに達したかどうかを判定し(S9)、達していない場
合には、S=1、tnum=numと設定する。そして、手順S2
からの処理が行われる。このような終了判定を、終了判
定手段26が行う。
Num is a preset representative number of colors c_nu
It is determined whether m has been reached (S9), and if not, S = 1 and tnum = num are set. Then, step S2
Is performed. The end determination means 26 performs such an end determination.

【0052】以上の処理により抽出された所定数c_num
の代表色と、その内のどの代表色でブロック内画素の色
データを近似するかを表す位置情報が保持される。そし
て、この保持情報を使って、近似・復元先にある対象領
域近似手段27が各ブロック領域内の画素データを近似
復元する(S10)。これは、図4のように位置情報(
i, j )が対象ブロック内の画素座標( i, j )に対応して
おり、この位置情報座標に埋め込まれた代表色を対応す
る画素座標に埋め込むことで近似画像が生成され、出力
画像28を得ることができるのである。なお、ここでは
分割対象グループSを4個に分割する例で説明したが、
最大分散値を持つ軸Amax1のみを分割する(2個に分割
する)ことも考えられる。この場合、抽出される代表色
の精度は4個分割の場合よりも向上することが期待さ
れ、最終的に得られる出力画像の高精度化にもつなが
る。しかし、逐次分割のための処理回数が増えるため、
処理速度は多少遅くなる。また、分割対象グループを8
個に分割することも可能であるが、この場合は、成分別
分散計算手段32及び分割成分決定手段33の処理が省
かれ、高速な代表色抽出が可能となるが、抽出精度が劣
化する可能性が大きいので、目的に応じて分割対象グル
ープを分割する数を制御する手段を加えることが考えら
れる。また、対象ブロック領域内の色データの分布を求
め、その分布変動に応じて上記対象グループの分割数を
制御することも同様に考えられる。
The predetermined number c_num extracted by the above processing
, And positional information indicating which of the representative colors approximates the color data of the pixels in the block. Then, using the held information, the target area approximating means 27 at the approximation / restoration destination approximates and restores the pixel data in each block area (S10). This is, as shown in FIG.
i, j) corresponds to the pixel coordinates (i, j) in the target block, and an approximate image is generated by embedding the representative color embedded in the position information coordinates in the corresponding pixel coordinates. Can be obtained. Here, the example has been described in which the division target group S is divided into four.
It is also conceivable to divide only the axis Amax1 having the maximum variance (divide into two). In this case, the accuracy of the extracted representative colors is expected to be higher than that in the case of division into four, and this also leads to higher accuracy of the finally obtained output image. However, since the number of processes for sequential division increases,
Processing speed is slightly slower. Also, the number of groups to be divided is 8
In this case, the processing of the component-specific variance calculation unit 32 and the division component determination unit 33 can be omitted, and high-speed representative color extraction can be performed. However, the extraction accuracy may deteriorate. Therefore, it is conceivable to add a means for controlling the number of groups to be divided according to the purpose. It is also conceivable that the distribution of the color data in the target block area is obtained and the number of divisions of the target group is controlled in accordance with the distribution variation.

【0053】以上のように、本実施の形態によれば、細
分化された領域内の色データの平均値や平均値からの分
散の大きい色方向から順次複数のグループに分割し各グ
ループを代表する代表色抽出を行うため、高精度でかつ
高速な領域分割と各領域内を代表する代表色を抽出する
ことができる。
As described above, according to the present embodiment, the average value of the color data in the subdivided area and the color direction in which the variance from the average value is large are sequentially divided into a plurality of groups, and each group is represented as a representative. Therefore, it is possible to perform high-precision and high-speed area division and extract a representative color representative of each area.

【0054】なお、これらの処理は本発明の第1の実施
の形態における画像処理方法に従いコンピュータ等に使
用される中央演算処理装置(CPU)及びデジタルシグ
ナルプロセッサ(DSP)等を使ったソフトウェア処理
でも同様に実現することができる。さらに、これらの処
理は本発明の第1の実施の形態における画像処理方法に
従って作成された半導体チップを使うことでも同様に実
現することができる。
Note that these processes can be performed by software processing using a central processing unit (CPU), a digital signal processor (DSP), or the like used in a computer or the like according to the image processing method according to the first embodiment of the present invention. It can be realized similarly. Further, these processes can be similarly realized by using a semiconductor chip prepared according to the image processing method according to the first embodiment of the present invention.

【0055】(第2の実施の形態)次に、本発明の第2
の実施の形態における画像処理方法及び画像処理装置に
ついて説明する。図7に示すように、画像処理装置にお
いて、第2グループ分割手段70はグループ分割手段2
4で得られた複数のグループを色データによりさらに複
数グループに分割するとともに、対象グループ内の色デ
ータを分割後に得られたグループに振り分ける。
(Second Embodiment) Next, a second embodiment of the present invention will be described.
An image processing method and an image processing apparatus according to the embodiment will be described. As shown in FIG. 7, in the image processing apparatus, the second group dividing unit 70
The plurality of groups obtained in step 4 are further divided into a plurality of groups by color data, and the color data in the target group is allocated to the groups obtained after the division.

【0056】そして、第2グループ分割手段70は、グ
ループ分割手段24で得られたグループ内の画素色デー
タの原点からのユークリッド距離を計算する補助分割基
準計算手段71と、上記補助分割基準値をもとに、グル
ープ分割手段24で得られたグループをさらに細分化す
るとともに、対象グループ内の色データを分割後に得ら
れたグループに振り分ける再グループ分割手段72より
構成される。
Then, the second group dividing means 70 calculates an auxiliary division criterion 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, Originally, the group obtained by the group dividing unit 24 is further divided into groups, and the regrouping unit 72 is configured to distribute the color data in the target group to the group obtained after the division.

【0057】以上のように構成された第2の実施の形態
における画像処理装置の動作及び画像処理方法について
図6のフローチャート図をもとに説明する。また、図8
はこの実施の形態におけるグループ分割の様子を模式的
に表す。本発明の第1の実施の形態における画像処理方
法及び画像処理装置と同様に、入力画像20を複数のブ
ロックに分割してから(S1)、初期設定手段22は、
初期グループとその代表色をいくつか設定する(S
2)。この後、成分別分散計算手段32が、図8(a)
に示すような分割対象グループSに対して、図8(b)
に示すように、グループS内の色データの代表色からの
分散値δrs、δgs、δbsの計算を行う(S3)。分割成
分決定手段33は、各r、g、b軸における分散値の最
大値をもつAmax成分を分割着目成分として選択する(S
21)。図8(b)の例では、分割着目成分としてr軸
が選択されている。図8(c)に示すように、グループ
分割手段24は、Amax成分に沿って対象グループを2つ
に分割し、代表色のAmax成分とグループSに属する各画
素色データIs[j]のAmax成分を比較してその大小関係で
2つのグループ分割する処理を行う(S22)。ここで
得られたグループを改めてグループSとグループnum+1と
する。なおnumは分割する前のグループ数を示す。
The operation of the image processing apparatus and the image processing method according to the second embodiment configured as described above will be described with reference to the flowchart of FIG. FIG.
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 dividing the input image 20 into a plurality of blocks (S1), the initial setting unit 22
Set some initial groups and their representative colors (S
2). After that, the component-based variance calculation means 32 executes the process shown in FIG.
8 (b) for the group S to be divided as shown in FIG.
As shown in (3), the variance values δrs, δgs, δbs from the representative colors of the color data in the group S are calculated (S3). The division component determination means 33 selects an Amax component having the maximum value of the variance on each of the r, g, and b axes as a division target component (S
21). In the example of FIG. 8B, the r-axis is selected as the component of interest for division. As shown in FIG. 8C, the group dividing unit 24 divides the target group into two along the Amax component, and the Amax component of the representative color and the Amax of each pixel color data Is [j] belonging to the group S. A process is performed to compare the components and divide the two groups according to the magnitude relationship (S22). The groups obtained here are again referred to as group S and group num + 1. Note that num indicates the number of groups before division.

【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に分割され、グループn
um+1の色データが分類される(S24)。こうすること
で、グループを分割する処理回数を減らすことができ、
高速なグループ分割を行うことができる。
Next, the second group dividing means 70
As shown in (d), the group S and the group num + 1 are each further divided into two groups. At this time, first, the group S and num
The Euclidean distance len from the origin of the pixel color data belonging to +1 is obtained (S23). Then, the regrouping unit 72 divides the group S into the group S and num + 2 based on the average value of the distance of the pixel color data in the group S, and distributes each color data. Similarly, group num + 1 is divided into groups num + 1 and num + 3, and group n
The color data of um + 1 is classified (S24). By doing so, you can reduce the number of times to split the group,
High-speed group division can be performed.

【0059】そして、代表色抽出手段25は、この時点
で得られたグループ内の色データの平均値を求め、その
グループの代表色とする(S6)。終了判定手段26
は、所定の代表色数が抽出されたかどうかの判定を行い
(S7)、得られていない場合には、対象グループが変
更されてから(S8)、成分別分散計算手段32による
手順S3からの処理が繰り返される。一方、代表色抽出
が終了したと判定された場合には、全ブロックの処理が
終了していれば(S9)、画像近似する時点において、
対象領域近似手段27が得られた代表色と各画素色デー
タを近似する際の位置情報をもとに、入力画像の近似画
像を作成し、出力画像28を得る(S10)。
Then, the representative color extracting means 25 finds the average value of the color data in the group obtained at this time and sets it as the representative color of the group (S6). End determination means 26
Determines whether or not a predetermined number of representative colors has been extracted (S7). If not, the target group is changed (S8). The process is repeated. On the other hand, if it is determined that the representative color extraction has been completed, and if the processing of all blocks has been completed (S9), at the time of image approximation,
An approximate image of the input image is created based on the position information when the target area approximating means 27 approximates the obtained representative color and each pixel color data, and an output image 28 is obtained (S10).

【0060】以上のように、本実施の形態によれば、細
分化された領域内の色データの平均値や平均値からの分
散の最も大きい色方向で2つにグループ分割を行った
後、改めて所属するグループ内の色データの原点からの
距離をもとに複数分割を行うことで、グループ分割を行
う処理回数を減らすことができる。
As described above, according to the present embodiment, after the average value of the color data in the subdivided region and the color direction having the largest variance from the average value are divided into two groups, By performing a plurality of divisions again based on the distance from the origin of the color data in the group to which the group belongs, the number of times of performing the group division can be reduced.

【0061】なお、これらの処理は本発明の第2の実施
の形態における画像処理方法に従いコンピュータ等に使
用される中央演算処理装置(CPU)及びデジタルシグ
ナルプロセッサ(DSP)等を使ったソフトウェア処理
でも同様に実現することができる。さらに、これらの処
理は本発明の第2の実施の形態における画像処理方法に
従って作成された半導体チップを使うことでも同様に実
現することができる。
Note that these processes can be performed 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 according to the second embodiment of the present invention. It can be realized similarly. Further, these processes can be similarly realized by using a semiconductor chip prepared according to the image processing method according to the second embodiment of the present invention.

【0062】(第3の実施の形態)次に本発明の第3の
実施の形態における画像処理方法及び画像処理装置につ
いて説明する。図10は第3の実施の形態における画像
処理装置の構成を表す。図10に示す画像処理装置にお
いて、参照色テーブルセット100は予め用意された参
照色セットを持つ。色データ分類手段101は、対象ブ
ロック領域内の色データと参照色テーブルセット内の参
照色セットをもとに小領域内の色データを所定数のグル
ープに分割する。総和分散計算手段102は、各グルー
プにおける平均値からの分散の総和を計算する。代表色
決定手段103は、色データ分類手段101で得られた
複数のグループ分割結果より1つの分割結果を選び出
し、その際に得られたグループ内色データの代表色を求
める。
(Third Embodiment) Next, an image processing method and an image processing apparatus according to a third embodiment of the present invention will be described. FIG. 10 shows a configuration of an 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 prepared reference color set. The color data classification means 101 divides the color data in the small area into a predetermined number of groups based on the color data in the target block area and the reference color set in the reference color table set. The sum variance calculation means 102 calculates the sum of variance from the average value in each group. The representative color determination unit 103 selects one division result from the plurality of group division results obtained by the color data classification unit 101, and obtains a representative color of the in-group color data obtained at that time.

【0063】以上のように構成された第3の実施の形態
における画像処理装置の動作及び画像処理方法について
図9のフローチャートをもとに説明する。
The operation of the image processing apparatus and the image processing method according to the third embodiment configured as described above will be described with reference to the flowchart of FIG.

【0064】入力画像20は領域分割手段21で複数の
微小ブロック領域に分割される(S1)。そして、各ブ
ロック領域ごとに代表色抽出されるのは本発明の第1の
実施の形態と同様である。しかし、第3の実施の形態で
は、対象ブロック内にまず初期グループを設定し、逐次
的にグループ分割を繰り返す処理が行われない。第3の
実施の形態では、予め用意されたテーブルセットより適
切な1組のn個の参照色が選択され、その参照色をもと
に対象ブロック内の画素色データがn個のグループに分
類され、各グループを代表する代表色が抽出される。
The input image 20 is divided into a plurality of small block areas by the area dividing means 21 (S1). Then, the representative color is extracted for each block area as in the first embodiment of the present invention. However, in the third embodiment, the process of first setting the initial group in the target block and repeating the group division sequentially is not performed. In the third embodiment, an appropriate set of n reference colors is selected from a table set prepared in advance, and the pixel color data in the target block is classified into n groups based on the reference colors. Then, a representative color representing each group is extracted.

【0065】参照色テーブルセット100の作成には、
例えば第1の実施の形態における画像処理が利用され
る。この場合、多くの画像サンプルについて予め第1の
実施の形態における画像処理が行われ、所定数nの代表
色のセットがKK個求められる。このKK個をそのままKK個
の参照色セットとしてテーブル化してもよい。また、こ
のKK個のnの代表色で構成されるベクトルにベクトル量
子化手法のような統計的手法を適用して、LL個のnの参
照色を持つセットを作成することも考えられる。統計的
手法の代わりに、コホーネンの自己組織化ニューラルネ
ットワークのような手法を適用することも可能である。
To create the reference color table set 100,
For example, the image processing in the first embodiment is used. In this case, image processing according to the first embodiment is performed in advance on many image samples, and a predetermined number n of sets of representative colors are obtained. The KK colors 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 also possible to apply a method such as Kohonen's self-organizing neural network.

【0066】代表色のセットを用意するために、例えば
テクスチャ、文字、比較的平坦な画像など特徴的な画像
の平均画像が利用されることがある。この場合、各画像
の平均画像が生成されてから、各平均画像に第1の実施
の形態における画像処理が施され、代表色のセットが用
意される。この場合でも、代表色のセットは、同じ個数
の参照色セットとしてテーブル化してもよいし、ベクト
ル量子化手法などにより異なる個数の参照色セットとし
てテーブル化してもよい。さらに、別途画像を用意せず
とも、同じ画像について既に処理されたブロックの代表
色を参照色セットに利用することも可能である。
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 according to the first embodiment is performed on each average image, and a set of representative colors is prepared. Also in this case, the representative color set may be tabulated as the same number of reference color sets, or may be tabulated as a different number of reference color sets by a vector quantization method or the like. Further, it is also possible to use a representative color of a block already processed for the same image for 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 according to the ratio occupied by each classification target, and representative color extraction processing is performed on the classified blocks. The set of representative colors obtained in this manner may be tabulated as it is as a reference color for the corresponding classification target, or as in other examples,
The data may be tabulated using a vector quantization technique or the like.

【0068】また、1セット内の代表色数は一律nにす
る必要はなく、可変にすることも可能である。その場合
は、多くの画像サンプルから得られたn段階の代表色セ
ットを同様にKK個用意し、各段階におけるKK個の代表色
セットから、上記のような手法で複数個の参照色セット
を求めテーブル化することで参照色テーブルセット10
0が用意される。
The number of representative colors in one set does not need to be uniform n, but can be variable. In that case, KK representative color sets of n stages obtained from many image samples are similarly prepared, and a plurality of reference color sets are obtained from the KK representative color sets in each stage by the above-described method. The reference color table set 10 is obtained by converting the table into the required table
0 is prepared.

【0069】色データ分類手段101は、まず参照色テ
ーブルセット100内からm番目のn個の参照色セットdR
It_m ( t = 0,…,n-1 )を選択する(S31)。次に、
図11に示すように、この参照色セットでブロック内k
の画素データI_k[j]がn個のグループに分類される(S
32)。その分類は、例えば参照色セットdRIt_m (t =
0,…,n-1)と画素データI_k[j]の距離をもとに行わ
れ、画素データI_k[j]は、最も距離の小さい参照色の
グループtに分類される。その後、n個のグループ内での
平均値が求められる(S33)。各グループ内での平均
値からの分散値が求められ、m番目の参照色セットを用
いた際の各グループ平均値からの分散値の総和δ_mが
計算される(S34)。この処理がすべての参照色セッ
トに対して行われると(S35、S36)、代表色決定
手段103は、この分散値の総和が最小となる参照色セ
ットmより得られた平均値を対象ブロック領域kに対して
得られた代表色として決定する(S37)。そして、こ
の時のブロック内画素データに対する位置情報も合わせ
て保持され、全ブロックの処理が終了していれば(S
9)、画像復元時にこの代表色と位置情報を用いること
で、対象領域近似手段27は、出力画像28を生成する
(S10)。
The color data classifying means 101 first selects the m-th n reference color sets dR from the reference color table set 100.
It_m (t = 0,..., N-1) is selected (S31). next,
As shown in FIG. 11, k in the block
Of pixel data I_k [j] are classified into n groups (S
32). The classification is, for example, a reference color set dRIt_m (t =
0,..., N-1) and the pixel data I_k [j], and the pixel data I_k [j] is classified into the reference color group t having the shortest distance. Thereafter, an average value in the n groups is obtained (S33). The variance value from the average value in each group is obtained, and the sum δ_m of the variance values from the average value in each group when the m-th reference color set is used is calculated (S34). When this processing is performed for all the reference color sets (S35, S36), the representative color determination unit 103 determines the average value obtained from the reference color set m that minimizes the sum of the variance values as the target block area. It is determined as a representative color obtained for k (S37). Then, the position information for the pixel data in the block at this time is also held, and if the processing of all the blocks is completed (S
9) By using the representative color and the position information at the time of image restoration, the target area approximation unit 27 generates an output image 28 (S10).

【0070】こうすることで、本発明の第1や第2の実
施の形態における画像処理方法及び画像処理装置のよう
に、いちいち逐次的にグループ分割を行うことなく、高
速に対象領域内の色データの分割と代表色抽出ができ
る。そして、予め多くの画像サンプルより用意された精
度の高い参照色セットを複数用意してやることで、入力
画像にあまり影響されることなく精度のよい代表色抽出
が行え、復元近似された画像の精度の劣化を抑えること
ができる。
By doing so, unlike the image processing method and the image processing apparatus according to the first and second embodiments of the present invention, the color in the target area can be changed at high speed without sequentially performing group division. Data division and representative color extraction are possible. By preparing a plurality of high-precision reference color sets prepared from a large number of image samples in advance, accurate representative color extraction can be performed without being greatly affected by the input image, and the accuracy of the restored approximated image can be improved. Deterioration can be suppressed.

【0071】なお、これらの処理は本発明の第3の実施
の形態における画像処理方法に従いコンピュータ等に使
用される中央演算処理装置(CPU)及びデジタルシグ
ナルプロセッサ(DSP)等を使ったソフトウェア処理
でも同様に実現することができる。さらに、これらの処
理は本発明の第3の実施の形態における画像処理方法に
従って作成された半導体チップを使うことでも同様に実
現することができる。
Note that these processes can be performed by software 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 according to the third embodiment of the present invention. It can be realized similarly. Further, these processes can be similarly realized by using a semiconductor chip created according to the image processing method according to the third embodiment of the present invention.

【0072】(第4の実施の形態)次に本発明の第4の
実施の形態における画像処理方法及び画像処理装置につ
いて説明する。図13に示す画像処理装置において、逐
次分割判定値計算手段130は色データ分類手段101
で得られた各グループ内における平均値と上記色データ
分類手段101で使用された参照色より分割判定値を計
算する。逐次分割判定手段131は、分割判定値をもと
にここで得られた平均値より代表色を選ぶかどうかの判
定を行う。逐次的代表色決定手段132は、逐次分割判
定手段131で逐次分割を行うと判定された場合には、
小領域内の色データを逐次的にグループ分割し各グルー
プに所属する色データの代表色を求める。
(Fourth Embodiment) Next, an image processing method and an image processing apparatus according to a fourth embodiment of the present invention will be described. In the image processing apparatus shown in FIG.
A division determination value is calculated from the average value in each group obtained in step (1) and the reference color used by the color data classification means 101. The sequential division determination unit 131 determines whether to select a representative color from the average value obtained here based on the division determination value. The sequential representative color determination unit 132 determines that the sequential division determination unit 131 determines that the sequential division is to be performed.
The color data in the small area is sequentially divided into groups, and a representative color of the color data belonging to each group is obtained.

【0073】以上のように構成された第4の実施の形態
における画像処理装置及び画像処理方法では、図12の
フローチャートのように処理が行われる。本発明の第3
の実施の形態と同様に、領域分割手段21で入力画像2
0がブロック領域に分割される(S1)、分割されたブ
ロック領域kに対して、色データ分類手段101は、予
め用意されたm番目の参照色セットdRIt_m ( t = 0,…,
n-1 )によりグループ分割を行い、各グループにおける
平均値eRIt_m ( t = 0,…,n-1 )を求める(S31、S
32、S33)。
In the image processing apparatus and image processing method according to the fourth embodiment configured as described above, processing is performed as shown in the flowchart of FIG. Third of the present invention
As in the embodiment, the input image 2
0 is divided into block regions (S1). For the divided block region k, the color data classification means 101 prepares an m-th reference color set dRIt_m (t = 0,.
n-1) to perform group division, and obtain an average value eRIt_m (t = 0,..., n-1) in each group (S31, S31).
32, S33).

【0074】[0074]

【数3】 (Equation 3)

【0075】次に、逐次分割判定値計算手段130は、
(数3)のようにm番目の参照色セットと101で得ら
れた各グループの平均値eRIt_m 間のずれの総和b_thr
es_mを求める(S41)。この処理を用意されたKK個
の参照色セット全てに対して行い(S35、S36)、
逐次分割判定手段131がこの総和b_thres_mの最小
値を予め設定された基準値BThresholdと比較する(S4
2)。そして、その値より小さければ、代表色決定手段
103は、KK個の参照色セットに対するずれの総和b_t
hres_mの最小値を得る参照色セットmbにより得られた
各グループ内の平均値eRIt_mをそのブロックより得ら
れる代表色とする(S37)。なお、代表色決定手段1
03は、次のように代表色を求めることも可能である。
まず、m番目の参照色セットにより分割された際のグル
ープtの平均値eRIt_mに対して、グループtに属するnt
個の画素値データIt[j]の偏差絶対値の総和をr、g、b軸
で求め、各軸の結果の2乗平均値を算出する。そして、
この値を全てのグループtで総和した値(平均値からの
分散量)δ_mを求め、分散量δ_mの最小値を与える参
照色セットmbdを用いたグループ分割を行い、その際に
得られた各グループ内の平均値eRIt_mbをそのブロック
より得られる代表色とする。
Next, the sequential division judgment value calculation means 130
The sum b_thr of deviations between the m-th reference color set and the average value eRIt_m of each group obtained in 101 as in (Equation 3)
es_m is obtained (S41). This process is performed for all the prepared KK reference color sets (S35, S36),
The sequential division determination means 131 compares the minimum value of the sum b_thres_m with a preset reference value BThreshold (S4).
2). If the value is smaller than the value, the representative color determining unit 103 calculates the total sum b_t of shifts for the KK reference color sets.
The average value eRIt_m in each group obtained by the reference color set mb that obtains the minimum value of hres_m is set as a representative color obtained from the block (S37). Note that the representative color determining means 1
For 03, the representative color can be obtained as follows.
First, the average value eRIt_m of the group t when divided by the m-th reference color set is compared with the nt belonging to the group t.
The sum of the absolute deviation values of the pixel value data It [j] is obtained on the r, g, and b axes, and the mean square value of the results on each axis is calculated. And
This value is summed up for all the groups t to obtain a value (variance from the average value) δ_m, and group division is performed using a reference color set mbd that gives the minimum value of the variance δ_m. The average value eRIt_mb in the group is set as a representative color obtained from the block.

【0076】一方、逐次分割判定手段131で予め設定
された基準値BThresholdよりb_thres_mの最小値が大
きければ逐次的代表色決定手段132による逐次的代表
色決定処理が行われる(S43)。
On the other hand, if the minimum value of b_thres_m is larger than the reference value BThreshold preset by the sequential division determination means 131, the sequential representative color determination processing by the sequential representative color determination means 132 is performed (S43).

【0077】逐次的代表色決定手段132には、例え
ば、本発明の第1の実施の形態における初期設定手段2
2、着目成分選択手段23、グループ分割手段24、代
表色抽出手段25、終了判定手段26が設けられ、逐次
的代表色決定手段132では、第1の実施の形態と同様
の処理が行われる。また、逐次的代表色決定手段132
に、本発明の第2の実施の形態における初期設定手段2
2、着目成分選択手段23、グループ分割手段24、第
2グループ分割手段70、代表色抽出手段25、終了判
定手段26が設けられ、逐次的代表色決定手段132で
第2の実施の形態と同様の処理が行われてもよい。
The sequential representative color determining means 132 includes, for example, the initial setting means 2 according to the first embodiment of the present invention.
2. A target component selecting unit 23, a group dividing unit 24, a representative color extracting unit 25, and an end determining unit 26 are provided. The sequential representative color determining unit 132 performs the same processing as that of the first embodiment. Further, the sequential representative color determining means 132
Secondly, the initial setting means 2 according to the second embodiment of the present invention
2. A target component selecting unit 23, a group dividing unit 24, a second group dividing unit 70, a representative color extracting unit 25, and an end determining unit 26 are provided, and the sequential representative color determining unit 132 performs the same operation as in the second embodiment. May be performed.

【0078】全ブロックの処理が終了すると(S9)、
最後に、代表色決定手段103もしくは逐次的代表色決
定手段132で得られた代表色とその位置情報が27の
対象領域近似手段27で用いられることで、近似出力画
像28が得られる(S10)。
When the processing of all blocks is completed (S9),
Finally, an approximate output image 28 is obtained by using the representative color obtained by the representative color determining means 103 or the sequential representative color determining means 132 and its position information in the target area approximating means 27 (S10). .

【0079】以上のように第4の実施の形態では、入力
画像より得られたブロック領域内画素色データを近似す
る際に、用意されたテーブル内の参照色に比較的一致す
るような場合には、その参照色を使って簡単にグループ
分割と各グループ内の代表色を求めることができるの
で、処理の削減につながる。一方、第3の実施の形態の
ように、一律にテーブル際の参照色を用いた場合に、参
照色とそれをもとにしたグループ内の平均値の間が大き
くずれるような場合に代表色抽出精度が低下する恐れが
あるが、本発明のようにそのような場合には、本発明の
第1もしくは第2のように実際の領域内の色データの分
布に従いグループ分割を行うことで代表色抽出精度を改
善することができる。
As described above, in the fourth embodiment, when approximating the pixel color data in the block area obtained from the input image, when the reference color in the prepared table relatively matches. Can easily use the reference color to divide a group and find a representative color in each group, which leads to a reduction in processing. On the other hand, when the reference color at the time of the table is used uniformly as in the third embodiment, when the reference color and the average value in the group based on the reference color are greatly shifted, the representative color is used. Although the extraction accuracy may be reduced, in such a case as in the present invention, representative grouping is performed by performing group division according to the distribution of color data in an actual area as in the first or second embodiment of the present invention. The color extraction accuracy can be improved.

【0080】なお、これらの処理は本発明の第4の実施
の形態における画像処理方法に従いコンピュータ等に使
用される中央演算処理装置(CPU)及びデジタルシグ
ナルプロセッサ(DSP)等を使ったソフトウェア処理
でも同様に実現することができる。さらに、これらの処
理は本発明の第4の実施の形態における画像処理方法に
従って作成された半導体チップを使うことでも同様に実
現することができる。
Note that these processes can be performed 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. It can be realized similarly. Further, these processes can be similarly realized by using a semiconductor chip prepared according to the image processing method according to the fourth embodiment of the present invention.

【0081】(第5の実施の形態)次に本発明の第5の
実施の形態における画像処理方法及び画像処理装置につ
いて説明する。図15は第5の実施の形態における画像
処理装置装置の構成を表し、図14は第5の実施の形態
における画像処理方法における処理のフローチャートを
表す。図15に示す画像処理装置において、色データ統
計量算出手段150は、対象領域内の色データの統計的
分布を求める。既代表色利用判定手段151は、色デー
タ統計量算出手段150で得られた色データ統計量を既
に代表色抽出済み領域より得られた統計量と比較してこ
の処理済領域の代表色を用いるかどうかの判定を行う。
類似領域決定手段152は、既代表色利用判定手段15
1で用いると判断された場合には、最も類似度の高い処
理済領域を選択する。簡易代表抽出手段153は、類似
領域決定手段152で選択された代表色をもとに色デー
タ分類手段101がグループ分割を行った際に得られた
各グループ内色データの代表色を求める。
(Fifth Embodiment) Next, an image processing method and an image processing apparatus according to a fifth embodiment of the present invention will be described. FIG. 15 illustrates a configuration of an image processing apparatus according to the fifth embodiment, and FIG. 14 illustrates a flowchart of processing in an image processing method according to the fifth embodiment. In the image processing apparatus shown in FIG. 15, the color data statistic calculation unit 150 obtains a statistical distribution of the color data in the target area. The already-represented color use determining unit 151 compares the color data statistic obtained by the color data statistic calculation unit 150 with the statistic obtained from the already-extracted representative color region, and uses the representative color of the processed region. Is determined.
The similar area determination means 152 is the representative color use determination means 15
If it is determined to be used in step 1, the processed area having the highest similarity is selected. The simple representative extracting unit 153 obtains a representative color of the in-group color data obtained when the color data classifying unit 101 performs the group division based on the representative colors selected by the similar region determining unit 152.

【0082】以上のように構成された第5の実施の形態
における画像処理方法及び画像処理装置の動作について
図14のフローチャートをもとに説明する。本発明の第
4の実施の形態では、予め用意された複数の参照色セッ
トテーブルとの比較をしていたのに対し、ここでは対象
ブロック領域kの以前に代表色抽出処理が完了した領域
で得られた代表色との比較を行うことで、グループ分割
処理の簡略化が図られている。
The operation of the image processing method and the image processing apparatus according to 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, a comparison is made with a plurality of reference color set tables prepared in advance. By performing comparison with the obtained representative colors, the group division processing is simplified.

【0083】色データ統計量算出手段150は、対象ブ
ロック内kの色データI_k[i,j]をすでに処理済みの領域
p内の色データI_p[i,j]と比較するための色データ統計
量Lenを求める(S51)。この統計量の例として、互
いに対応する画素色データ間の2乗誤差平均や、ブロッ
ク内色データのヒストグラム頻度の絶対差分値の平均が
ある。しかし、この統計量はこの値に一意に決まるもの
ではなく、これ以外にも多くの手法があり得る。(数
4)に、画素色データ間の2乗誤差平均を表し、(数
5)に、ブロック内色データのヒストグラム頻度の絶対
差分値の平均を表す。
The color data statistic calculation means 150 converts the color data I_k [i, j] of k in the target block into a region which has already been processed.
A color data statistic Len for comparison with the color data I_p [i, j] in p is obtained (S51). Examples of the statistics include an average square error between pixel color data corresponding to each other and an average of absolute difference values of histogram frequencies of color data in a block. However, this statistic is not uniquely determined by this value, and many other methods are possible. (Equation 4) represents the mean square error between the pixel color data, and (Equation 5) represents the average of the absolute difference values of the histogram frequencies of the in-block color data.

【0084】[0084]

【数4】 (Equation 4)

【0085】[0085]

【数5】 (Equation 5)

【0086】画素色データ間の2乗誤差平均が統計量Le
nに用いられる場合、図16に示すように、対象ブロッ
ク内色データに対応する比較対象ブロック内色データが
用意され、両者の2乗誤差を画素数で平均した値によっ
て類似度がはかられる。また、ブロック内色データのヒ
ストグラム頻度の絶対差分値の平均が統計量Lenに用い
られる場合、対象ブロック内色データのヒストグラム
と、比較対象ブロック内色データのヒストグラムが用意
され、ヒストグラム頻度の差の絶対値を画素数で平均し
た値によって類似度がはかられる。前者の場合には、色
データ値そのものが基準となり、後者の場合には、色と
しての頻度が基準になる。より精度を必要とする場合
は、前者の基準値の方が好ましいが、微小ブロック内で
の色データ数が限られることから後者の基準値でも十分
であると考える。
The average square error between the pixel color data is the statistic Le
When used for n, as shown in FIG. 16, color data in the comparison target block corresponding to the color data in the target block is prepared, and the degree of similarity is determined by averaging the square error of both with the number of pixels. . When the average of the absolute difference values of the histogram frequencies of the color data in the block is used as the statistic Len, a histogram of the color data in the target block and a histogram of the color data in the comparison target block are prepared. The degree of similarity is determined by a value obtained by averaging the absolute values with 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 more accuracy is required, the former reference value is more preferable, but the latter reference value is considered to be sufficient because the number of color data in a minute block is limited.

【0087】色データ統計量算出手段150は、このよ
うに対象ブロック領域kと処理済領域pより選ばれた1つ
の領域内の色データの分布の類似度Lenをはかるための
値を求める(S52)。既代表色利用判定手段151
は、この値をもとに、既に抽出された代表色を用いるべ
きかどうかの判定を行う(S53)。この判定のため
に、先ほど得られた統計量が各処理済みブロックに対し
て算出され、その統計量の最も小さい値が予め設定され
た判定値PThresholdと比較される。その値より小さけれ
ば、処理済領域内より得られた代表色が使用される。そ
の際、使用される処理済領域及び代表色の選択は類似領
域決定手段152で行われるが、ここでは色データ統計
量の最小値を持つ処理済ブロック領域PPを選択し(S5
4)、そのブロックより得られた代表色を用いて、第3
の実施の形態のように、色データ分類手段101が対象
ブロック領域内の色データのグループ分割を行う。簡易
代表抽出手段153は、この色データ分類手段101の
結果を受けて得られた各グループ内に属する色データの
平均値を求め、そのグループの代表色とする(S5
5)。
The color data statistic calculation means 150 obtains a value for measuring the similarity Len of the distribution of the color data in one area selected from the target block area k and the processed area p (S52). ). Already-representative color use determining means 151
Determines whether to use the already extracted representative color based on this value (S53). For this determination, the statistic obtained earlier is calculated for each processed block, and the smallest value of the statistic is compared with a predetermined determination value PThreshold. If it is smaller than that value, the representative color obtained from the processed area is used. At this time, the selection of the processed area and the representative color to be used is performed by the similar area determination unit 152. Here, the processed block area PP having the minimum value of the color data statistics is selected (S5).
4), using the representative color obtained from the block,
As in the embodiment, the color data classification means 101 divides the color data in the target block area into groups. The simple representative extracting unit 153 obtains the average value of the color data belonging to each group obtained by receiving the result of the color data classifying unit 101, and sets the average value as the representative color of the group (S5).
5).

【0088】一方、既代表色利用判定手段151で、対
象ブロックと処理済領域間の色データ統計量が予め設定
された判定値PThresholdより大きな値であると判定され
た場合には、それまで代表色抽出処理された領域とは色
データ分布的に異なるブロック領域を対象としている可
能性がある。従って、この場合は逐次的代表色決定手段
132を用いて、逐次的にグループ分割と各グループの
代表色を求める(S43)。こうすることで、このよう
な領域より代表色抽出における精度の低下を抑制するこ
とができる。
On the other hand, when the already-represented color use determining means 151 determines that the color data statistic between the target block and the processed area is larger than a predetermined determination value PThreshold, the representative color use determination means 151 has been used until that time. There is a possibility that a block area different in color data distribution from the area subjected to the color extraction processing is targeted. Accordingly, in this case, the group is sequentially divided and the representative color of each group is obtained by using the sequential representative color determining means 132 (S43). By doing so, it is possible to suppress a decrease in accuracy in representative color extraction from such an area.

【0089】このような処理構成をとることで、本発明
の第4の画像処理方法と同様に不要な逐次グループ分割
を避けることができ、より高速な画像近似が可能とな
る。しかも、本発明の第3や第4の画像処理方法のよう
に予め複数の画像より求めた参照色セットを含むテーブ
ルを用意することなく、画像自体の処理済み領域をテー
ブルに用いるため、逐次処理をしない領域からもより高
精度な代表色抽出が可能であるという効果を持つ。
By employing such a processing configuration, unnecessary sequential group division can be avoided as in the fourth image processing method of the present invention, and higher-speed image approximation becomes possible. Moreover, since the processed area of the image itself is used for the table without preparing a table including a reference color set previously obtained from a plurality of images as in the third and fourth image processing methods of the present invention, the sequential processing is performed. There is an effect that it is possible to extract a representative color with higher precision even from an area where no color is extracted.

【0090】なお、これらの処理は本発明の第5の実施
の形態における画像処理方法に従いコンピュータ等に使
用される中央演算処理装置(CPU)及びデジタルシグ
ナルプロセッサ(DSP)等を使ったソフトウェア処理
でも同様に実現することができる。さらに、これらの処
理は本発明の第5の実施の形態における画像処理方法に
従って作成された半導体チップを使うことでも同様に実
現することができる。
Note that these processes can be performed 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 according to the fifth embodiment of the present invention. It can be realized similarly. Further, these processes can be similarly realized by using a semiconductor chip prepared according to the image processing method according to the fifth embodiment of the present invention.

【0091】(第6の実施の形態)次に本発明の第6の
実施の形態における画像処理方法及び画像処理装置につ
いて説明する。図19は第6の実施の形態における画像
処理装置の構成を表し、図18は第6の実施の形態にお
ける画像処理方法を説明するためのフローチャートであ
る。
(Sixth Embodiment) Next, an image processing method and an image processing apparatus according to a sixth embodiment of the present invention will be described. FIG. 19 illustrates a configuration of an image processing apparatus according to the sixth embodiment. FIG. 18 is a flowchart illustrating an image processing method according to the sixth embodiment.

【0092】図19に示す画像処理装置において、逐次
分割対象決定手段180は、領域分割手段21で細分化
された複数のブロック領域より逐次分割処理を行う複数
の領域を選択する。近接類似領域決定手段181は、逐
次分割対象決定手段180で選択されていない領域に関
しては、色データ統計量算出手段150で得られた色デ
ータ統計量をもとに対象領域に近接している複数の逐次
分割対象領域から最も類似度の高い処理済領域を選択す
る。
In the image processing apparatus shown in FIG. 19, the sequential division target determining means 180 selects a plurality of areas to be subjected to the sequential division processing from the plurality of block areas subdivided by the area dividing means 21. Based on the color data statistic obtained by the color data statistic calculation unit 150, the proximity similar region determination unit 181 determines a plurality of regions that are not selected by the sequential division target determination unit 180 based on the color data statistic. , A processed area having the highest similarity is selected from the sequentially divided target areas.

【0093】この実施の形態では、まず画像全体をブロ
ック化して得られた複数のブロック領域のうち、本発明
の第1の実施の形態もしくは第2の実施の形態と同様
に、逐次的代表色抽出処理が行われる。その後、残りの
ブロック領域から代表色を抽出する際に、先ほど逐次的
代表色抽出処理をされたブロックのうちで、対象ブロッ
クに近接している複数のものが選び出される。そして、
その近接した逐次的処理済みブロック領域の中から対象
ブロック領域内の色データ分布に最も類似したブロック
領域が選び出され、その際の代表色で対象ブロック領域
内の色データがグループ分割されることによって、代表
色抽出が行われる。
In this embodiment, first of all, a plurality of block areas obtained by blocking the entire image are sequentially represented by the representative color, as in the first or second embodiment of the present invention. An extraction process is performed. Thereafter, when extracting a representative color from the remaining block area, a plurality of blocks that are close to the target block are selected from the blocks that have been subjected to the sequential representative color extraction processing. And
The block area most similar to the color data distribution in the target block area is selected from the adjacent sequential processed block areas, and the color data in the target block area is divided into groups by the representative color at that time. , Representative color extraction is performed.

【0094】以上のように構成された第6の実施の形態
における画像処理装置の動作及び画像処理方法について
図18のフローチャートに従い説明する。まず入力画像
20は領域分割手段21で複数の微小領域に分割される
(S1)。次に、逐次分割対象決定手段180でその複
数のブロックs領域より、本発明の第1もしくは第2で
説明したような逐次的代表色抽出処理を行う領域が決定
される(S61)。この場合、どのような選択でも可能
であるが、画像全域にできるだけ均等になるように選択
する方が、逐次的代表色抽出をしない領域における代表
色抽出精度を保つためにも望ましい。そこで、領域分割
手段21でブロック分割された領域に画像先端から番号
がつけられ、その奇数番号が逐次分割対象決定手段18
0で対象領域に選択される。逐次分割対象決定手段18
0で選択された領域に対しては逐次的代表色決定手段1
32による逐次的代表色決定処理が行われる(S43、
S62)。ここで、第1の実施の形態で示した方法が用
いられる場合、逐次的代表色決定手段132には、初期
設定手段22、着目成分選択手段23、グループ分割手
段24、代表色抽出手段25、終了判定手段26が設け
られ、第1の実施の形態と同様の処理が実行される。第
2の実施の形態で示した方法が用いられる場合、逐次的
代表色決定手段132に第2グループ分割手段70がさ
らに加えられる。
An operation and an image processing method of the image processing apparatus according to the sixth embodiment having the above-described configuration will be described with reference to the flowchart of FIG. First, the input image 20 is divided into a plurality of minute regions by the region dividing means 21 (S1). Next, the sequential division target determining means 180 determines an area for performing the sequential representative color extraction processing as described in the first or second embodiment of the present invention from the plurality of block s areas (S61). In this case, any selection is possible. However, it is preferable to select as uniform as possible over the entire area of the image in order to maintain the representative color extraction accuracy in an area where sequential representative color extraction is not performed. Therefore, a number is assigned to the area divided by the area dividing means 21 from the top of the image, and the odd number is sequentially assigned to the division target determining means 18.
0 is selected as the target area. Sequential division target determination means 18
0 for the area selected in step 0
32 is performed (S43,
S62). Here, when the method described in the first embodiment is used, the sequential representative color determining unit 132 includes the initial setting unit 22, the target component selecting unit 23, the group dividing unit 24, the representative color extracting unit 25, An end determination unit 26 is provided, and the same processing as in the first embodiment is executed. When the method described in the second embodiment is used, a second group dividing unit 70 is further added to the sequential representative color determining unit 132.

【0095】一方、逐次分割対象決定手段180で選択
されていないブロック領域に関しては、色データ統計量
手段150でブロック内の色データ分布を示す統計量が
計算される(S63、64)。この値としては、第5の
実施の形態で説明された量(図16、図17)を用いる
こともできるし、それ以外の基準量でも構わない。そし
て、近接類似領域決定手段181は、対象ブロック領域
とそのブロックに近接し逐次的代表色抽出処理されたブ
ロック領域から算出されるこの統計量より適切な処理済
みブロック領域を選択する(S65)。色データ分類手
段101はこの選択された代表色をもとに、対象ブロッ
ク領域内の色データについてグループ分割を行う。簡易
代表抽出手段153は、各グループに属する色データの
平均値をそのグループの代表色とする(S66)。逐次
分割対象決定手段180で選択されていないブロック領
域の処理が終了した後(S67)、画像復元に関して
は、これまでの実施の形態と同様であるので説明を省略
する。
On the other hand, for the block area not selected by the sequential division target determining means 180, the statistic indicating the color data distribution in the block is calculated by the color data statistic means 150 (S63, 64). As this value, the amount described in the fifth embodiment (FIGS. 16 and 17) can be used, or another reference amount may be used. Then, the proximity similar area determination unit 181 selects an appropriate processed block area from the statistics calculated from the target block area and the block area adjacent to the block and subjected to the sequential representative color extraction processing (S65). The color data classifying unit 101 performs group division on the color data in the target block area based on the selected representative color. The simple representative extracting unit 153 sets the average value of the color data belonging to each group as the representative color of the group (S66). After the processing of the block area not selected by the sequential division target determination unit 180 is completed (S67), the image restoration is the same as in the previous embodiments, and thus the description is omitted.

【0096】以上のように、このような処理や構成をと
ることで、予め複数の画像より求めた参照色セットを含
むテーブルを用意する必要がない。また、第5の実施の
形態と比較してテーブルとする処理済み領域を探す手間
も減らすことができるという効果を持つ。
As described above, by adopting such processing and configuration, it is not necessary to prepare a table including a reference color set previously obtained from a plurality of images. Further, compared to the fifth embodiment, there is an effect that the trouble of searching for a processed area to be a table can be reduced.

【0097】なお、これらの処理は第6の実施の形態に
おける画像処理方法に従いコンピュータ等に使用される
中央演算処理装置(CPU)及びデジタルシグナルプロ
セッサ(DSP)等を使ったソフトウェア処理でも同様
に実現することができる。さらに、これらの処理は本発
明の第6の実施の形態における画像処理方法に従って作
成された半導体チップを使うことでも同様に実現するこ
とができる。
Note that 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 in accordance with the image processing method in the sixth embodiment. can do. Further, these processes can be similarly realized by using a semiconductor chip prepared according to the image processing method according to the sixth embodiment of the present invention.

【0098】(第7の実施の形態)本発明の第7の実施
の形態における画像処理方法及び画像処理装置について
説明する。図21は第7の実施の形態における画像処理
装置の構成を表し、図20は第7の実施の形態における
画像処理装置を説明するためのフローチャートを表す。
(Seventh Embodiment) An image processing method and an image processing apparatus according to a seventh embodiment of the present invention will be described. FIG. 21 shows the configuration of the image processing apparatus according to the seventh embodiment, and FIG. 20 shows a flowchart for explaining the image processing apparatus according to the seventh embodiment.

【0099】図21に示す画像処理装置において、保持
判断手段200は、得られた現在の分割数が保持分割数
を満足するかどうかの判断を行う。段階符号化保持手段
201は、保持判断手段200で保持すると決定された
場合に、この段階での代表色と、小領域内をこの代表色
で近似する際の位置情報を保持する。最大終了判定手段
202は、得られた代表色が最大所定数得られたどうか
の判定を行い、得られていない場合には上記分割基準計
算手段へ処理が移る。ユーザ画質選択手段203は、ユ
ーザにより画像を近似する際の画質モードを選択する。
適切代表色読出手段204は上記最大終了判定手段20
2で終了したと判定された場合には、ユーザ画質選択手
段203の結果に従い、段階符号化保持手段201より
ユーザ選択モードに応じた代表色と位置情報を呼び出
す。この第7の実施の形態では、代表色を抽出する際
に、最大代表色数と、それに至るまでの段階ごとの代表
色数を設定しておいて、その設定された段階ごとの代表
色と位置情報が保持される。そしてユーザが指定するモ
ードに応じて、保持されたデータから、そのモードに応
じた数の代表色と位置情報を使って即座に画像近似が行
われる。
In the image processing apparatus shown in FIG. 21, the holding judgment means 200 judges whether or not the obtained current division number satisfies the holding division number. The stage encoding holding unit 201 holds the representative color at this stage and the position information when approximating the inside of the small area with this representative color, when the holding determination unit 200 determines to hold. The maximum end determination means 202 determines whether the maximum number of obtained representative colors has been obtained, and if not, the processing moves to the division criterion calculation means. The user image quality selection unit 203 selects an image quality mode when an image is approximated by the user.
The appropriate representative color reading means 204 is provided by the maximum end determining means 20.
If it is determined that the processing has been completed in step 2, the step encoding / holding unit 201 calls the representative color and position information corresponding to the user selection mode according to the result of the user image quality selecting unit 203. In the seventh embodiment, when a representative color is extracted, the maximum number of representative colors and the number of representative colors for each stage up to that are set, and the representative color for each of the set stages is set. Position information is held. Then, in accordance with the mode specified by the user, image approximation is immediately performed from the stored data using the number of representative colors and position information corresponding to the mode.

【0100】第7の実施の形態における画像処理方法及
び画像処理装置の動作について図20のフローチャート
に従い説明する。まず、入力画像20をブロック分割し
(S1)、各ブロック領域内を逐次的にグループ分割・
代表色抽出を行う処理は第1の実施の形態と同様である
(S2からS6)。ここで異なるのは、最終的に得られ
た代表色のみが保持されるのではなく、それまでに至る
いくつかの段階での代表色と位置情報も保持されること
である。この場合、たとえば、最終代表色数までに至る
段階が3段階であった場合に段階符号化保持手段201
で保持されるデータは図22のようになる。保持判断手
段200は、代表色数が最大数に至るまでに設定された
段階で設定された色数分だけ得られたかどうかをチェッ
クし(S71)、その段階での代表色数に達した時点で
の結果を段階符号化保持手段201が保持する(S7
2)。
The operation of the image processing method and the image processing apparatus according to the seventh embodiment will be described with reference to the flowchart of FIG. First, the input image 20 is divided into blocks (S1), and the inside of each block area is sequentially divided into groups.
The process of extracting the representative color is the same as in the first embodiment (S2 to S6). What is different here is that not only the finally obtained representative color is stored, but also the representative color and position information at several stages up to that point are stored. In this case, for example, when the number of steps up to the final representative color number is three, the step encoding holding unit 201
The data held in is as shown in FIG. The retention judging means 200 checks whether or not the set number of representative colors has been obtained until the maximum number of representative colors is reached (S71), and when the number of representative colors at that stage is reached. Is stored in the stage encoding storage unit 201 (S7).
2).

【0101】一方、最大終了判定手段202で設定され
た最大代表色数が全てのブロックについて得られた時点
で(S73、S8、S9)、ユーザに全ての保持情報が
送信される。扱う画質モードとして、たとえば、高速で
画質はあまり気にしないモード、高精細モード、中間モ
ード等が用意されており、ユーザはユーザ画質選択手段
203によって、これらから画質モードを選択する(S
74)。この選択結果に応じて、たとえば高速モードの
場合、できるだけ少ない代表色で構わないので、最低段
階レベルでの代表色数が選ばれ画像復元が行われる(S
75)。一方、高精細モードでは、最大代表色数が選択
され画像復元が行われる。この読み出しと代表色の判断
を適切代表色読出手段204が担当する。
On the other hand, when the maximum number of representative colors set by the maximum end determination means 202 has been obtained for all blocks (S73, S8, S9), all held information is transmitted to the user. As the image quality mode to be handled, for example, a high-speed mode that does not care much about the image quality, a high-definition mode, an intermediate mode, and the like are prepared, and the user selects an image quality mode from these by the user image quality selection unit 203 (S
74). According to the selection result, for example, in the case of the high-speed mode, as few representative colors as possible may be used, so that the number of representative colors at the lowest level is selected and image restoration is performed (S
75). On the other hand, in the high definition mode, the maximum number of representative colors is selected and image restoration is performed. The appropriate representative color reading means 204 takes charge of the reading and the determination of the representative color.

【0102】なお、ここでは定性的表示モードで説明し
たが、直接に近似する代表色数を選択させることも可能
である。また、最大終了判定手段202で全てが終了し
た時点でユーザに送られ、その時点でのユーザ画質選択
手段203における選択をもとに適切代表色読出手段2
04が適切な代表色数を選択するように説明したが、こ
れに限られるものではない。段階符号化保持手段201
で保持された段階的データは常にユーザに送信され、送
信された時点で復元された画像をユーザが観察しなが
ら、さらなる代表色数での表示を要望し得るようにして
もよい。また、現在の対象ブロックで最大代表色数に達
していないが現在の画質で十分であれば、そのブロック
での代表色抽出を停止されるように指示するように構成
することも可能である。
Although the qualitative display mode has been described here, it is also possible to directly select the approximate number of representative colors. Also, when all of the images have been completed by the maximum end determination unit 202, the image data is sent to the user, and based on the selection by the user image quality selection unit 203 at that time, the appropriate representative color reading unit 2
Although the description has been made so that the number of representative colors is selected at 04, the present invention is not limited to this. Step encoding holding means 201
May be transmitted to the user at all times, and while the user observes the image restored at the time of transmission, it may be possible to request display in a further representative number of colors. In addition, if the maximum number of representative colors is not reached in the current target block but the current image quality is sufficient, it may be configured to instruct to stop the extraction of the representative colors in the block.

【0103】このように圧縮された画像は、通常ユーザ
に送られたデータをもとに1度画像復元され、それから
所望の画質や解像度に応じて改めてフィルタ処理等によ
る画像処理が行われることが多い。JPEG圧縮された
画像データを扱う場合は特にそうである。しかしなが
ら、この実施の形態のように多段階における代表色とそ
の代表色で領域近似を行う際の位置情報が保持されるこ
とで、複数の画質モードの指示が画像符号化時点で予め
明確でないような場合(例えば、インターネットでの画
像の配信)でも即座に対応することができる。さらに、
このような非可逆圧縮された画像の復元画像に対して、
フィルタ処理等を行うと圧縮時に発生した歪みも増大さ
せる可能性があるが、ここでは元画像より全て得たデー
タを使用しているのでそのような影響が抑えられる。
[0103] The image thus compressed is usually restored once based on the data sent to the user, and then image processing such as filtering is performed again according to the desired image quality and resolution. Many. This is especially true when dealing with JPEG-compressed image data. However, since the representative colors in multiple stages and the position information when performing the region approximation with the representative colors are held as in this embodiment, the instructions of the plurality of image quality modes are not clear beforehand at the time of image encoding. (For example, image distribution on the Internet). further,
For such a restored image of the irreversibly compressed image,
Performing a filtering process or the like may increase the distortion generated during compression, but here, since all data obtained from the original image is used, such an influence can be suppressed.

【0104】なお、これらの処理は本発明の第7の実施
の形態における画像処理方法に従いコンピュータ等に使
用される中央演算処理装置(CPU)及びデジタルシグ
ナルプロセッサ(DSP)等を使ったソフトウェア処理
でも同様に実現することができる。さらに、これらの処
理は本発明の第7の実施の形態における画像処理方法に
従って作成された半導体チップを使うことでも同様に実
現することができる。
Note that these processes can be performed 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. It can be realized similarly. 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】また、本発明の第1から第7の実施の形態
において、微少分割する際に、各ブロックサイズは固定
である必要はなく画像に応じて可変であっても構わな
い。また、各ブロック領域から抽出される代表色数も固
定である必要はなく、可変であっても本発明で説明した
内容は同様に成立する。本発明の第1から第7の実施の
形態における画像処理方法及び画像処理装置は、リアル
タイムに画像を授受する機器などに応用される。そのよ
うな応用対象として、例えばモバイルスキャナ等の画像
読み取り機器や、監視カメラやTV会議システム、遠隔
医療監視システム等のネットワークカメラを介したシス
テムがある。さらに、本発明の第1から第7の実施の形
態における画像処理方法及び画像処理装置は、携帯電話
やPDAのような携帯端末での固定色数を使った高速表
示に利用したり、パソコンからインクジェットプリンタ
やカラーレーザープリンタなどの印刷装置に送られる印
字画像データの固定長圧縮に利用することも可能であ
る。
Also, in the first to seventh embodiments of the present invention, when finely dividing, each block size does not need to be fixed, and may be variable according to the image. Also, the number of representative colors extracted from each block area does not need to be fixed, and even if the number is variable, the contents described in the present invention similarly hold. The image processing method and the image processing apparatus according to the first to seventh embodiments of the present invention are applied to a device that exchanges 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 monitoring systems. Further, 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 on 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 device such as an ink jet printer or a color laser printer.

【0106】ところで、上述のように代表色を使って色
データを近似する画像処理は、人間の視覚特性を応用し
たものである。人間の視覚特性を考慮すると、近似の精
度を確保する上で、ブロックの大きさや代表色の数は重
要である。
Incidentally, the image processing for approximating color data using representative colors as described above is based on human visual characteristics. In consideration of human visual characteristics, the size of a block and the number of representative colors are important for securing approximation accuracy.

【0107】適当なブロックの大きさや代表色の数は、
画像によって変化する。例えば画像の解像度とブロック
の大きさとの関係が適当でないと、近似の精度は悪化
し、復元画像の画質は劣化してしまう。スキャナなどの
画像入力装置からパーソナルコンピュータに画像が供給
されるような場合に、画像入力装置側で近似が行われて
から、パーソナルコンピュータ側で画像の解像度が他の
解像度に変換されることがある。このような場合、パー
ソナルコンピュータ側で出力される画像の画質は低下し
てしまう可能性がある。ここでの解像度変換には、画像
の拡大や縮小に伴うものも含まれる。
An appropriate block size and the number of representative colors are as follows.
Varies by image. For example, if the relationship between the resolution of the image and the size of the block is not appropriate, the accuracy of the approximation deteriorates and the image quality of the restored image deteriorates. When an image is supplied to a personal computer from an image input device such as a scanner, the resolution of the image may be converted to another resolution on the personal computer after approximation is performed on the image input device side. . In such a case, the image quality of the image output on the personal computer side may be degraded. Here, the resolution conversion includes one accompanying the enlargement or reduction of the image.

【0108】このため、ブロックの大きさは、画像が所
定の解像度に変換されてから、その解像度に応じて決定
されるのが好ましい。所定の解像度が解像度の変換前と
変換後との変換率で表される場合には、解像度の変換率
の設定に応じて、ブロックの大きさを変更すればよい。
解像度が高い時は大きなブロックを対象にし、解像度が
低いときは小さいブロックを対象にすることで、視覚的
な劣化を抑えることができる。このような画像処理につ
いて図23、図24、図25を用いて説明する。
For this reason, it is preferable that the size of the block is determined according to the resolution after the image is converted to a predetermined resolution. When the predetermined resolution is represented by the conversion ratio between before and after the resolution conversion, the block size may be changed according to the setting of the resolution conversion ratio.
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.

【0109】図23に示す画像処理装置において、解像
度変換回路1002は、カラー画像を所定の解像度に変
換する解像度変換手段として用いられる。例えば解像度
変換回路1002は、入力回路1003から取り込んだ
画像を高解像度から低解像度に解像度を変換する。解像
度設定回路1004は解像度設定を信号1401によっ
て、解像度変換回路1002、代表色抽出回路1001
に与える。代表色抽出回路1は、所定の解像度に応じ
て、代表色を抽出する小領域の大きさを決定する領域決
定手段と、決定された小領域から複数の代表色を抽出す
る代表色抽出手段として用いられる。
In the image processing apparatus shown in FIG. 23, a resolution conversion circuit 1002 is used as a resolution conversion means for converting a color image into a predetermined resolution. For example, the resolution conversion circuit 1002 converts the image fetched from the input circuit 1003 from a high resolution to a low resolution. A resolution setting circuit 1004 performs resolution setting by a signal 1401 according to a resolution conversion circuit 1002 and a representative color extraction circuit 1001.
Give to. The representative color extracting circuit 1 includes, as area determining means for determining the size of a small area from which a representative color is to be extracted in accordance with a predetermined resolution, and representative color extracting means for extracting a plurality of representative colors from the determined small area. Used.

【0110】例えば400DPIから200DPIに解
像度の設定が変更されたとすると、図24に示すよう
に、解像度変換回路2は2個の画素を単位として隣接画
素を同じ値に変換する。代表色抽出回路1は、この解像
度の設定に応じて、ブロックの大きさを半分に設定す
る。400DPIのときブロックの大きさが4画素×4
画素である場合には、200DPIのときブロックの大
きさは2画素×2画素に決定される。これによって、原
稿濃度の変化が粗くなった分、処理精度をあげることに
なり、画質劣化を抑えることができる。代表色抽出回路
1は、例えば各実施の形態で上述したように、決定され
たブロックの代表色を抽出し、インターフェース100
7(以下、I/F1007と記す)に画像データを出力
する。
For example, if the resolution setting is changed from 400 DPI to 200 DPI, as shown in FIG. 24, the resolution conversion circuit 2 converts adjacent pixels into the same value in units of two pixels. The representative color extraction circuit 1 sets the block size to half according to the setting of the resolution. At 400 DPI, the block size is 4 pixels x 4
In the case of pixels, the size of the block is determined to be 2 pixels × 2 pixels at 200 DPI. As a result, the processing accuracy is increased as much as the change in the document density becomes coarse, and image quality deterioration can be suppressed. The representative color extraction circuit 1 extracts the representative color of the determined block, for example, as described above in each embodiment, and
7 (hereinafter referred to as I / F 1007).

【0111】ここで、解像度変換処理について図24を
用いて、詳細に説明する。図24に示すように、400
DPIを200DPIに変更する場合は、信号(デー
タ)300と信号(データ)301のいずれかの値を、
隣接画素に複写する。例えば、信号301を信号302
と信号303に複写する。これによって、400DPI
の白黒パターンは解像度の低下によって消えてしまう。
実際の処理では、信号302と信号303は同じ値なの
で、いずれか一方を残すように間引き処理される。これ
は、縮小処理となる。すなわち、解像度変換と拡大縮小
は、回路的には近い処理(又は、同じ処理)として扱わ
れる。従って、解像度変換は、処理前と処理後とで画素
数が変わらない場合に用いられることも多いが、ここで
は解像度変換に画素数が変わる拡大や縮小に伴うものも
含めている。
Here, the resolution conversion processing will be described in detail with reference to FIG. As shown in FIG.
When changing the DPI to 200 DPI, change the value of either the signal (data) 300 or the signal (data) 301 to
Copy to adjacent pixels. For example, the signal 301 is converted to the signal 302
Is copied to the signal 303. With this, 400 DPI
The black and white pattern disappears due to a decrease in resolution.
In the actual processing, since the signal 302 and the signal 303 have the same value, the thinning processing is performed so as to leave one of them. This is a reduction process. That is, the resolution conversion and the enlargement / reduction are handled as processing (or the same processing) that is close in terms of the circuit. Therefore, the resolution conversion is often used when the number of pixels does not change before and after the processing, but here, resolution conversion includes enlargement and reduction accompanying the change in the number of pixels.

【0112】拡大処理や縮小処理が行われる場合には、
解像度の代わりに倍率を設定すればよい。この場合、解
像度変換回路1002は、画像を所定の場合に拡大又は
縮小する変倍処理手段として用いられることになる。ま
た、解像度設定回路1004は、倍率を設定することに
なる。この倍率に応じて、解像度変換回路1002は、
画素補間法、ニアレストネイバー法、バイリニア法、バ
イキュービック法、直交変換法(DCT変換法、ウェー
ブレット変換法)等を用いて画素数の増減を行い、拡大
処理、縮小処理を実行する。
When the enlargement processing or the reduction processing is performed,
What is necessary is just to set the magnification instead of the resolution. In this case, the resolution conversion circuit 1002 is used as scaling processing means for enlarging or reducing an image in a predetermined case. The resolution setting circuit 1004 sets the magnification. According to this magnification, the resolution conversion circuit 1002
The number of pixels is increased or decreased by using a pixel interpolation method, a nearest neighbor method, a bilinear method, a bicubic method, an orthogonal transformation method (DCT transformation method, wavelet transformation method), and the like, and enlargement processing and reduction processing are executed.

【0113】図25を用いて、原稿画像を拡大処理、縮
小処理した場合の説明を行う。例えば図25(c)に示
すように、3画素×3画素の原画の隣接画素間に1画素
を挿入して原画を2倍に拡大すると、画素数は9から2
5に増大する。この場合は、画素数の増大に合わせて、
より大きなブロックから代表色を抽出しても画像劣化は
少ない。よって、代表色抽出回路1001は、拡大率に
応じて、ブロックの大きさを増大させる。より大きな領
域から代表色が抽出されることになるから、圧縮率を稼
ぐことができる。一方、図25(a)に示すように、縮
小処理の場合には画素数が減少する。よって、原画上の
パターンの空間周波数は高くなるので、解像度を高くし
た処理が必要となる。そのために、ブロックの大きさ
を、より小さく設定することが望ましい。すなわち、代
表色抽出回路1001は、縮小率に応じて、ブロックの
大きさを小さく設定する。これによって、空間周波数の
高いパターンも保持できるので、画質を向上できる。
Referring to FIG. 25, a description will be given of a case where a document image is subjected to enlargement processing and reduction processing. For example, as shown in FIG. 25C, when one pixel is inserted between adjacent pixels of an original image of 3 pixels × 3 pixels to enlarge the original image twice, the number of pixels becomes 9 to 2
Increase to 5. In this case, as the number of pixels increases,
Even if a representative color is extracted from a larger block, image deterioration is small. Therefore, the representative color extraction circuit 1001 increases the size of the block according to the enlargement ratio. Since the representative colors are extracted from the larger area, the compression ratio can be increased. On the other hand, as shown in FIG. 25A, in the case of the reduction processing, the number of pixels decreases. Therefore, since the spatial frequency of the pattern on the original image is increased, processing with a higher resolution is required. Therefore, it is desirable to set the size of the block smaller. That is, the representative color extraction circuit 1001 sets the block size to be small according to the reduction ratio. As a result, a pattern having a high spatial frequency can be held, so that image quality can be improved.

【0114】このように、解像度に応じて代表色を抽出
する領域の大きさを変更すれば、高周波のパターンがあ
っても、それを保持して画質劣化を抑えることができ
る。また、画質を維持しながら、圧縮率を向上できる。
As described above, by changing the size of the region from which the representative color is extracted according to the resolution, even if there is a high-frequency pattern, it is possible to maintain the high-frequency pattern and suppress the image quality deterioration. Further, the compression rate can be improved while maintaining the image quality.

【0115】なお、例えば写真原稿、文字原稿、文字・
写真原稿など、原稿の特徴に応じて適当な解像度は異な
る。このため、原稿の特徴に応じて適当なブロックの大
きさや代表色の数を分類することができる。原稿の特徴
が処理モードとして設定される場合、代表色抽出回路1
001は、解像度の代わりに、原稿の特徴を表す処理モ
ードに応じて、ブロックの大きさ、又は代表色の数を決
定するようにしてもよい。
For example, a photo original, a text original, a character
The appropriate resolution differs depending on the characteristics of the original such as a photographic original. Therefore, it is possible to classify an appropriate block size and the number of representative colors according to the characteristics of the document. When the feature of the document is set as the processing mode, the representative color extraction circuit 1
In the case of 001, the size of the block or the number of representative colors may be determined according to the processing mode representing the characteristics of the document instead of the resolution.

【0116】図26に示す画像処理装置において、処理
モード設定回路1005は、対象となる原稿によって処
理モードを設定するモード設定手段として用いられる。
処理モード設定回路1005は、処理モードを代表色抽
出回路1001に与える。
In the image processing apparatus shown in FIG. 26, a processing mode setting circuit 1005 is used as mode setting means for setting a processing mode according to a target document.
The processing mode setting circuit 1005 gives the processing mode to the representative color extraction circuit 1001.

【0117】例えば図27に示すように、処理モードと
して「写真モード」と「文字モード」が用意されている
ものとする。この例では、各処理モードは、圧縮率によ
って2つの設定モードにそれぞれ細分化されている。各
設定モードには、適当なブロックの大きさと代表色の数
が対応付けられている。代表色抽出回路1001は、例
えば図27に示されるようなテーブルを用いてブロック
の大きさや代表色の数を決定する。処理モード設定回路
1005によって設定される設定モードが1であれば、
ブロックの大きさは4画素×4画素に、代表色の数は2
に決定される。
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 ratio. Each setting mode is associated with an appropriate block size and the number of representative colors. The representative color extraction circuit 1001 determines the size of a block and the number of representative colors using, for example, a table as shown in FIG. If the setting mode set by the processing mode setting circuit 1005 is 1,
The size of the block is 4 pixels x 4 pixels, and the number of representative colors is 2
Is determined.

【0118】これによって、原稿毎に必要な処理解像が
自動的に確保され、高品位な画質が得られる。
As a result, the required processing resolution is automatically secured for each document, and high quality image quality can be obtained.

【0119】このように、ブロックの大きさを決定する
画像処理装置も、専用のハードウェアによって実現する
だけでなく、CPUやDSPによるソフトウェア処理に
よって実現することができる。
As described above, the image processing device that determines the size of a block can be realized not only by dedicated hardware but also by software processing by a CPU or a DSP.

【0120】ソフトウェア処理によって実現される場
合、CPUやDSPを備えたコンピュータは、画像を所
定の解像度に変換するステップを行うと、所定の解像度
に応じて、代表色を抽出する小領域の大きさを決定する
ステップを行い、その後、決定された小領域から複数の
代表色を抽出するステップを行うことになる。
When the processing is realized by software processing, a computer having a CPU and a DSP performs a step of converting an image to a predetermined resolution, and, in accordance with the predetermined resolution, a size of a small area for extracting a representative color. Is determined, and then a step of extracting a plurality of representative colors from the determined small area is performed.

【0121】画像を所定の倍率に拡大又は縮小するので
あれば、画像を所定の倍率に拡大又は縮小するステップ
が行われた後、コンピュータは、所定の倍率に応じて、
代表色を抽出する小領域の大きさを決定するステップを
行う。
If the image is to be enlarged or reduced to a predetermined magnification, after the step of enlarging or reducing the image to the predetermined magnification is performed, the computer sets the image according to the predetermined magnification.
The step of determining the size of the small region from which the representative color is extracted is performed.

【0122】さらに、処理モードを利用する場合には、
対象となる原稿によって処理モードを設定するステップ
が行われてから、コンピュータは、処理モードに応じ
て、代表色を抽出する小領域の大きさ又は代表色数を決
定するステップを行う。
Further, when using the processing mode,
After the step of setting the processing mode according to the target document is performed, the computer performs the step of determining the size of the small region from which the representative color is extracted or the number of representative colors according to the processing mode.

【0123】なお、図27の例では、処理モードとし
て、「文字モード」、「写真モード」が用意されていた
が、これに限られるものではない。例えば混在画像の
「文字写真モード」、さらには「地図モード」や「拡大
縮小モード」などの他の処理モードを用意してもよい。
In the example shown in FIG. 27, the "text mode" and the "photo mode" are prepared as the processing modes, but the present invention is not limited to these modes. For example, another processing mode such as a “text / photo mode” of a mixed image, a “map mode”, or an “enlargement / reduction mode” may be prepared.

【0124】[0124]

【発明の効果】以上説明したように、本発明では、所定
数のグループが、小領域内の色データと参照色セットテ
ーブル内の参照色をもとに得られるから、逐次的なグル
ープ分割が省略され、その結果、小領域内の色データの
近似は高精度且つ高速に行われる。さらに、適当な参照
色セットテーブルが用意されていない領域では、逐次的
なグループ分割によって代表色を求めれば、精度の劣化
を抑えながら画像全体としては高速に近似を行うことが
可能となる。
As described above, according to the present invention, a predetermined number of groups can be obtained based on the color data in the small area and the reference colors in the reference color set table. As a result, the approximation of the color data in the small area is performed with high accuracy and at high speed. Further, in a region where an appropriate reference color set table is not prepared, if representative colors are obtained by sequential group division, it is possible to perform high-speed approximation of the entire image while suppressing deterioration in accuracy.

【0125】また、分割着目成分を複数選択し、選択さ
れた複数の分割着目成分に関する基準をもとにグループ
分割が行われる場合、グループ分割が逐次的に行われて
も、繰り返し回数は減少するから、近似は高精度且つ高
速に行われる。
When a plurality of divided components of interest are selected and group division is performed based on the criterion relating to the selected plurality of divided components of interest, the number of repetitions is reduced even if group division is performed sequentially. Therefore, the approximation is performed with high accuracy and high speed.

【0126】また、選択された分割着目成分に関する基
準をもとにグループ分割が行われてから、各グループ内
の色データをもとに各グループがさらに複数のグループ
に分割される場合も、グループ分割を行う処理回数が減
少するから、近似は高精度且つ高速に行われる。
Also, after the group division is performed based on the criterion relating to the selected divided component of interest, each group is further divided into a plurality of groups based on the color data in each group. The approximation is performed with high accuracy and high speed because the number of times of performing the division is reduced.

【0127】さらに、逐次的にグループ分割が行われる
場合でも、既に代表色が抽出された抽出済み領域の代表
色を利用して小領域の代表色を求めれば、逐次的にグル
ープ分割が行われるのが一部の小領域だけになり、画像
全体として近似は高精度且つ高速に行われる。
Further, even when the group division is performed sequentially, if the representative color of the small area is obtained by using the representative color of the extracted area from which the representative color has already been extracted, the group division is performed sequentially. Is only a part of the small area, and the approximation is performed with high accuracy and high speed as the whole image.

【図面の簡単な説明】[Brief description of the drawings]

【図1】本発明の第1の実施の形態における画像処理方
法を説明するためのフローチャート
FIG. 1 is a flowchart for explaining an image processing method according to a first embodiment of the present invention;

【図2】本発明の第1の実施の形態における画像処理装
置の構成を表すブロック図
FIG. 2 is a block diagram illustrating a configuration of an image processing apparatus according to the first embodiment of the present invention.

【図3】本発明の第1の実施の形態における画像処理装
置の代表色抽出手段による処理を模式的に表す概念図
FIG. 3 is a conceptual diagram schematically illustrating processing by a representative color extracting unit of the image processing apparatus according to the first embodiment of the present invention.

【図4】本発明の第1の実施の形態における画像処理装
置で各小領域を近似するために必要な情報を表す概念図
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.

【図5】本発明の第1の実施の形態における画像処理装
置の初期設定手段による処理を模式的に表す概念図
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.

【図6】本発明の第2の実施の形態における画像処理方
法を説明するためのフローチャート
FIG. 6 is a flowchart illustrating an image processing method according to a second embodiment of the present invention.

【図7】本発明の第2の実施の形態における画像処理装
置の構成を表すブロック図
FIG. 7 is a block diagram illustrating a configuration of an image processing apparatus according to a second embodiment of the present invention.

【図8】本発明の第2の実施の形態における画像処理装
置の第2グループ分割手段による処理を模式的に表す概
念図
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.

【図9】本発明の第3の実施の形態における画像処理方
法を説明するためのフローチャート
FIG. 9 is a flowchart illustrating an image processing method according to a third embodiment of the present invention.

【図10】本発明の第3の実施の形態における画像処理
装置の構成を表すブロック図
FIG. 10 is a block diagram illustrating a configuration of an image processing apparatus according to a third embodiment of the present invention.

【図11】本発明の第3の実施の形態における画像処理
装置の色データ分類手段による処理を模式的に表す概念
FIG. 11 is a conceptual diagram schematically showing processing by a color data classification unit of an image processing apparatus according to a third embodiment of the present invention.

【図12】本発明の第4の実施の形態における画像処理
方法を説明するためのフローチャート
FIG. 12 is a flowchart illustrating an image processing method according to a fourth embodiment of the present invention.

【図13】本発明の第4の実施の形態における画像処理
装置の構成を表すブロック図
FIG. 13 is a block diagram illustrating a configuration of an image processing apparatus according to a fourth embodiment of the present invention.

【図14】本発明の第5の実施の形態における画像処理
方法を説明するためのフローチャート
FIG. 14 is a flowchart illustrating an image processing method according to a fifth embodiment of the present invention.

【図15】本発明の第5の実施の形態における画像処理
装置の構成を表すブロック図
FIG. 15 is a block diagram illustrating a configuration of an image processing apparatus according to a fifth embodiment of the present invention.

【図16】本発明の第5の実施の形態における画像処理
装置で扱われる色データ統計量の一例を表す図
FIG. 16 is a diagram illustrating an example of color data statistics handled by an image processing apparatus according to a fifth embodiment of the present invention.

【図17】本発明の第5の実施の形態における画像処理
装置で扱われる色データ統計量の一例を表す図
FIG. 17 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.

【図18】本発明の第6の実施の形態における画像処理
方法を説明するためのフローチャート
FIG. 18 is a flowchart illustrating an image processing method according to a sixth embodiment of the present invention.

【図19】本発明の第6の実施の形態における画像処理
装置の構成を表すブロック図
FIG. 19 is a block diagram illustrating a configuration of an image processing apparatus according to a sixth embodiment of the present invention.

【図20】本発明の第7の実施の形態における画像処理
方法を説明するためのフローチャート
FIG. 20 is a flowchart illustrating an image processing method according to a seventh embodiment of the present invention.

【図21】本発明の第7の実施の形態における画像処理
装置の構成を表すブロック図
FIG. 21 is a block diagram illustrating a configuration of an image processing apparatus according to a seventh embodiment of the present invention.

【図22】本発明の第7の実施の形態における画像処理
装置の段階符号化保持手段が保持する保持情報を表す概
念図
FIG. 22 is a conceptual diagram showing held information held by a stage encoding holding unit of the image processing apparatus according to the seventh embodiment of the present invention.

【図23】解像度変換回路を備えた画像処理装置の簡易
的な構成を表すブロック図
FIG. 23 is a block diagram illustrating a simple configuration of an image processing apparatus including a resolution conversion circuit.

【図24】解像度変換処理を説明するための図FIG. 24 is a diagram illustrating a resolution conversion process.

【図25】拡大・縮小処理を説明するための図FIG. 25 is a diagram for explaining enlargement / reduction processing.

【図26】モード設定手段を備えた画像処理装置の簡易
的な構成を示すブロック図
FIG. 26 is a block diagram illustrating a simple configuration of an image processing apparatus including a mode setting unit.

【図27】処理モードを説明するための図FIG. 27 is a diagram for explaining a processing mode;

【図28】従来の画像処理方法を説明するためのフロー
チャート
And FIG. 28 is a flowchart illustrating a conventional image processing method.

【図29】従来の画像処理装置の構成を表すブロック図FIG. 29 is a block diagram illustrating a configuration of a conventional image processing apparatus.

【符号の説明】[Explanation of symbols]

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 Reference Signs List 20 input image 21 area dividing means 22 initial setting means 23 target component selecting means 24 group dividing means 25 representative color extracting means 26 end determining means 27 target area approximating means 28 output image 29 distance calculating means 30 initial group dividing means 31 initial representative extracting Means 32 Component-specific variance calculation means 33 Divided component determination means 70 Second group division means 71 Auxiliary division criterion calculation means 72 Regroup division means 100 Reference color table set 101 Color data classification means 102 Total variance calculation means 103 Representative color determination means 130 Sequential division judgment value calculation means 131 Sequential division judgment means 132 Sequential representative color determination means 150 Color data statistic calculation means 151 Existing representative color use judgment means 152 Similar area determination means 153 Simple representative extraction means 180 Sequential division target determination means 181 Proximity Similar Area determining means 200 Holding determining means 201 Step coding holding means 202 Maximum end determining means 203 User image quality selecting means 204 Appropriate representative color reading means 2300a Input means r 2300b Input means g 2300c Input means b 2301a Previous coding means r 2301b Previous coding Encoding means g 2301c pre-stage encoding means b 2302 post-stage encoding means 2303 decoding means 2304a output means r 2304b output means g 2304c output means b

───────────────────────────────────────────────────── フロントページの続き (72)発明者 桑原 康浩 大阪府門真市大字門真1006番地 松下電器 産業株式会社内 (72)発明者 黒沢 俊晴 大阪府門真市大字門真1006番地 松下電器 産業株式会社内 (72)発明者 物部 祐亮 大阪府門真市大字門真1006番地 松下電器 産業株式会社内 (72)発明者 奥 博隆 大阪府門真市大字門真1006番地 松下電器 産業株式会社内 Fターム(参考) 5B057 CA01 CA08 CA12 CA16 CB01 CB08 CB12 CB16 CC01 CE17 CH07 CH08 5C077 LL17 MP08 PP32 PP37 PP46 PP68 PQ12 PQ18 PQ19 PQ23 5C079 HB01 LA26 LB00 MA04 MA11 NA10 5L096 AA02 FA15 FA32 FA33 GA19 JA11  ──────────────────────────────────────────────────続 き Continuing on the front page (72) Inventor Yasuhiro Kuwahara 1006 Kazuma Kadoma, Osaka Prefecture Matsushita Electric Industrial Co., Ltd. 72) Inventor Yusuke Monobe 1006 Kadoma Kadoma, Kadoma-shi, Osaka Matsushita Electric Industrial Co., Ltd. (72) Inventor Hirotaka Oku 1006 Kadoma Kadoma, Kadoma-shi Osaka Pref. CA12 CA16 CB01 CB08 CB12 CB16 CC01 CE17 CH07 CH08 5C077 LL17 MP08 PP32 PP37 PP46 PP68 PQ12 PQ18 PQ19 PQ23 5C079 HB01 LA26 LB00 MA04 MA11 NA10 5L096 AA02 FA15 FA32 FA33 GA19 JA11

Claims (24)

【特許請求の範囲】[Claims] 【請求項1】 入力された画像を複数の小領域に分割
し、 上記小領域内の色データと予め用意されたテーブル内の
参照色をもとに小領域内の色データを所定数のグループ
に分割し、 上記得られた各グループに対して代表色の抽出処理を行
い、 上記得られた所定数の代表色を使って小領域の色データ
を近似する画像処理方法。
1. An input image is divided into a plurality of small areas, and color data in the small areas is divided into a predetermined number of groups based on the color data in the small areas and reference colors in a table prepared in advance. An image processing method of performing a representative color extraction process on each of the obtained groups and approximating color data of a small area using the obtained predetermined number of representative colors.
【請求項2】 入力された画像を複数の小領域に分割し
てから、上記小領域内の色データと予め用意されたテー
ブル内の参照色より得られる判定値をもとに、参照色を
もとに小領域内の色データを所定数のグループに分割す
るかどうかを判断し、 上記判断に従い、参照色をもとに小領域内の色データを
所定数のグループに分割しない場合には、小領域内の色
データの分布より分割着目成分を選択し、所定の基準を
もとに小領域を複数のグループに分割し、 上記得られた各グループに対して代表色の抽出処理を行
い、 上記代表色が所定数得られるまで、上記分割着目成分の
選択から代表色の抽出までの処理を繰り返し行い、 上記小領域の色データを近似する所定数の代表色を得る
請求項1記載の画像処理方法。
2. After dividing an input image into a plurality of small areas, a reference color is determined based on color data in the small area and a judgment value obtained from a reference color in a table prepared in advance. It is determined whether or not to divide the color data in the small area into a predetermined number of groups based on the above.If the color data in the small area is not divided into the predetermined number of groups based on the reference color according to the above determination, Then, the component of interest is selected from the distribution of the color data in the small area, the small area is divided into a plurality of groups based on a predetermined criterion, and the representative color is extracted for each of the obtained groups. 2. The method according to claim 1, wherein a predetermined number of representative colors approximating the color data of the small area are obtained by repeatedly performing a process from the selection of the divided target component to the extraction of the representative color until a predetermined number of the representative colors are obtained. Image processing method.
【請求項3】 入力されたカラー画像を複数の小領域に
分割し、 上記小領域内の色データの分布より分割着目成分を複数
選択し、選択された複数の分割着目成分に関する基準を
もとに小領域内の色データを複数のグループに分割し、 上記得られた各グループに対して代表色の抽出処理を行
い、 上記代表色が所定数得られるまで、上記分割着目成分の
選択から各グループの代表色の抽出までの処理を繰り返
し行い、 上記得られた所定数の代表色を使って小領域の色データ
を近似する画像処理方法。
3. An input color image is divided into a plurality of small regions, a plurality of divided target components are selected from a distribution of color data in the small regions, and a reference is made based on the selected plurality of divided target components. Then, the color data in the small area is divided into a plurality of groups, a representative color is extracted for each of the obtained groups, and until the predetermined number of the representative colors is obtained, the selection of the divided target component is performed. An image processing method in which the processing up to the extraction of the representative color of the group is repeated, and the color data of the small area is approximated using the predetermined number of representative colors obtained above.
【請求項4】 グループを代表する代表色は、当該グル
ープ内の色データの平均値であり、分割着目成分は、色
データの各成分のうち平均値に対する分散が大きい成分
から順番に複数選択される請求項3記載の画像処理方
法。
4. A representative color representing a group is an average value of color data in the group, and a plurality of divided target components are selected in order from a component having a large variance with respect to the average value among the components of the color data. The image processing method according to claim 3.
【請求項5】 上記所定数が複数段階設定されており、 上記代表色が最大所定数得られるまで、上記分割着目成
分の選択から各グループの代表色の抽出までの処理を繰
り返し行うとともに、各段階の代表色と当該代表色を使
用して上記小領域内の色データを近似するための情報を
保持し、 上記得られた代表色を使って各小領域の色データを近似
する際に、複数の画質モードのうちからユーザがいずれ
かの画質モードを選択すると、 上記選択された画質モードに従い、各段階の代表色を使
い分けて小領域の色データを近似する請求項3記載の画
像処理方法。
5. The method according to claim 1, wherein the predetermined number is set in a plurality of stages, and a process from the selection of the divided target component to the extraction of the representative color of each group is repeatedly performed until the maximum predetermined number of the representative colors is obtained. Using the representative color of the stage and the information for approximating the color data in the small area using the representative color, when approximating the color data of each small area using the obtained representative color, 4. The image processing method according to claim 3, wherein when the user selects any one of the plurality of image quality modes, color data of a small area is approximated by selectively using representative colors in each stage according to the selected image quality mode. .
【請求項6】 入力された画像を複数の小領域に分割
し、 上記小領域内の色データの分布より分割着目成分を選択
し、選択された分割着目成分に関する基準をもとに小領
域内の色データを複数のグループに分割し、 各グループ内の色データをもとに各グループをさらに複
数のグループに分割し、 上記得られた各グループに対して代表色の抽出処理を行
い、 上記代表色が所定数得られるまで、上記分割着目成分の
選択から各グループの代表色の抽出までの処理を繰り返
し行い、 上記得られた所定数の代表色を使って小領域の色データ
を近似する画像処理方法。
6. An input image is divided into a plurality of small regions, a component of interest to be divided is selected from the distribution of color data in the small region, and a component within the small region is selected based on a criterion for the selected component of interest. Is divided into a plurality of groups, each group is further divided into a plurality of groups based on the color data in each group, and a representative color extraction process is performed for each of the obtained groups. Until a predetermined number of representative colors are obtained, the processes from the selection of the divided target component to the extraction of the representative color of each group are repeated, and the color data of the small area is approximated using the obtained predetermined number of representative colors. Image processing method.
【請求項7】 グループ内の色データの各成分のうち、
色データの平均値に対する分散が最も大きい成分を分割
着目成分として選択し、 小領域内の各色データの原点からのユークリッド距離値
をもとに各グループをさらに複数のグループに分割する
請求項6記載の画像処理方法。
7. Among the components of the color data in the group,
7. The component having the largest variance with respect to the average value of the color data is selected as the component of interest for division, and each group is further divided into a plurality of groups based on the Euclidean distance value from the origin of each color data in the small area. Image processing method.
【請求項8】 対象とする小領域内の色データ分布を既
に代表色が抽出された抽出済み領域内の分布と比較し
て、対象小領域について上記分割着目成分の選択から各
グループの代表色の抽出までの処理を繰り返す逐次的代
表色抽出処理を行うかどうかを判断し、 上記判断に従い、対象小領域について逐次的代表色抽出
処理を行わない場合には、対象小領域内の色データ分布
より選択された抽出済み領域を代表する代表色をもとに
小領域内の色データを複数のグループに分割し、上記得
られた各グループの代表色の抽出処理と、得られた代表
色による小領域の色データ近似を行う請求項3又は6記
載の画像処理方法。
8. The color data distribution in the target small area is compared with the distribution in the extracted area in which the representative color has already been extracted, and the representative color of each group is selected from the selection of the component of interest for the target small area. It is determined whether or not to perform the sequential representative color extraction processing that repeats the processing up to the extraction of the color data distribution within the target small area if the sequential representative color extraction processing is not performed for the target small area according to the above determination. The color data in the small area is divided into a plurality of groups based on the representative colors representative of the selected extracted areas, and the process of extracting the representative colors of each of the obtained groups is performed. 7. The image processing method according to claim 3, wherein color data approximation of a small area is performed.
【請求項9】 上記判断は、対象小領域内の色データの
ヒストグラムと、抽出済み領域内の色データのヒストグ
ラムとの類似度に基づいて行われる請求項8記載の画像
処理方法。
9. The image processing method according to claim 8, wherein the determination is made based on a similarity between a histogram of the color data in the target small area and a histogram of the color data in the extracted area.
【請求項10】 予め設定された基準で選択された小領
域についてのみ、代表色が所定数得られるまで上記分割
着目成分の選択から代表色の抽出までの処理を繰り返す
逐次的代表色抽出処理を行い、上記選択が行われなかっ
た小領域については、既に代表色が抽出された抽出済み
領域の代表色をもとに当該小領域内の色データを複数の
グループに分割し、上記得られた各グループの代表色の
抽出処理を行い、得られた代表色による小領域の色デー
タ近似を行う請求項3又は6記載の画像処理方法。
10. A sequential representative color extraction process that repeats the process from the selection of the component of interest to the extraction of the representative color until a predetermined number of representative colors is obtained for only the small regions selected on the basis of a preset reference. For the small area where the selection is not performed, the color data in the small area is divided into a plurality of groups based on the representative colors of the extracted areas where the representative colors have already been extracted, and the obtained 7. The image processing method according to claim 3, wherein a representative color of each group is extracted, and color data approximation of a small area is performed by the obtained representative color.
【請求項11】 小領域内の全ての色データが属する1
つのグループを初期グループに設定し、分割着目成分に
関する基準をもとに初期グループを複数のグループに分
割する3又は6記載の画像処理方法。
11. The one to which all color data in a small area belongs
7. The image processing method according to 3 or 6, wherein one group is set as an initial group, and the initial group is divided into a plurality of groups based on a criterion regarding a component of interest.
【請求項12】 小領域内の各色データの原点からのユ
ークリッド距離をもとに定めた複数のグループを初期グ
ループに設定し、分割着目成分に関する基準をもとに初
期グループを複数のグループに分割する請求項3又は6
記載の画像処理方法。
12. A plurality of groups determined based on a Euclidean distance from the origin of each color data in a small area are set as an initial group, and the initial group is divided into a plurality of groups based on a criterion regarding a component of interest. Claim 3 or 6
The image processing method described in the above.
【請求項13】 入力された画像を複数の小領域に分割
する領域分割手段と、 予め用意された参照色セットを持つ参照色テーブルセッ
トと、 上記小領域内の色データと上記テーブル内の参照色をも
とに小領内の色データを所定数のグループに分割する色
データ分類手段と、 上記得られた各グループ内の色データの代表色を求める
代表色決定手段と、 上記得られた所定数の代表色を使って各小領域の色デー
タを近似する対象領域近似手段とを備えた画像処理装
置。
13. An area dividing means for dividing an input image into a plurality of small areas, a reference color table set having a reference color set prepared in advance, color data in the small area and reference in the table. Color data classifying means for dividing the color data in the subdivision into a predetermined number of groups based on the color; representative color determining means for obtaining the representative color of the color data in each of the obtained groups; An image processing apparatus comprising: target area approximating means for approximating color data of each small area using a number of representative colors.
【請求項14】 上記色データ分類手段によって得られ
た各グループにおけるる色データの平均値からの分散の
総和を計算する総和分散計算手段を備え、 上記代表色決定手段は、上記総和分散計算手段の計算結
果を使ってグループ内の色データの代表色を求める請求
項13記載の画像処理装置。
14. A total variance calculating means for calculating a total variance from an average value of color data in each group obtained by said color data classifying means, wherein said representative color determining means comprises said total variance calculating means. 14. The image processing apparatus according to claim 13, wherein a representative color of the color data in the group is obtained using the calculation result of (1).
【請求項15】 上記色データ分類手段によって得られ
た各グループにおける色データの平均値と上記色データ
分類手段で使用された参照色より分割判定値を計算する
逐次分割判定値計算手段と、 対象グループ内の色データの分布をもとに選択された分
割着目成分に関する基準をもとに対象グループを複数の
グループに分割し、得られた各グループの代表色を決定
する処理を、上記代表色が所定数得られるまで繰り返す
逐次的代表色決定手段と、 上記分割判定値をもとに、上記逐次的代表色決定手段に
より代表色を決定するかどうかを判定する逐次分割判定
手段とを備え、 上記逐次分割判定手段の判定に従い、上記逐次的代表色
決定手段により代表色が決定される場合には、上記対象
領域近似手段は、上記逐次的代表色決定手段で得られた
所定数の代表色を使って各小領域の色データを近似する
請求項13記載の画像処理装置。
15. A sequential division judgment value calculation means for calculating a division judgment value from an average value of color data in each group obtained by the color data classification means and a reference color used by the color data classification means, The process of dividing the target group into a plurality of groups based on the criterion regarding the component of interest selected based on the distribution of the color data within the group and determining the representative color of each obtained group A sequential representative color determining unit that repeats until a predetermined number is obtained, and a sequential division determining unit that determines whether to determine a representative color by the sequential representative color determining unit based on the division determination value, When the representative color is determined by the sequential representative color determining means according to the determination of the sequential division determining means, the target area approximating means determines the position obtained by the sequential representative color determining means. 14. The image processing apparatus according to claim 13, wherein color data of each small area is approximated using a constant representative color.
【請求項16】 入力されたカラー画像を複数の小領域
に分割する領域分割手段と、 上記小領域に対して初期のグループを設定し、上記小領
域内の色データ全てを初期のグループに分類し、初期の
グループの代表色を求める初期設定手段と、 対象グループ内に属する色データの分布をもとに、対象
とするグループの分割時に着目する分割着目成分を複数
選択する着目成分選択手段と、 上記得られた複数の分割着目成分に従い、対象とするグ
ループを複数に分割するとともに、対象グループに属す
る色データを分割後に得られたグループに振り分けるグ
ループ分割手段と、 上記グループ分割手段によって得られた各グループに属
する色データの代表色を求める代表色抽出手段と、 上記代表色が所定数得られたかどうかの判定を行う終了
判定手段と、 上記代表色が所定数得られるまで上記着目成分選択手段
による分割着目成分の選択、上記グループ分割手段によ
るグループ分割及び上記代表色抽出手段による代表色の
抽出が繰り返され、上記終了判定手段により上記代表色
が所定数得られたと判定された場合には、得られた所定
数の代表色を使って各小領域の色データを近似する対象
領域近似手段とを備えた画像処理装置。
16. An area dividing means for dividing an input color image into a plurality of small areas, an initial group is set for the small areas, and all color data in the small areas are classified into an initial group. Initial setting means for obtaining a representative color of the initial group; and focused component selecting means for selecting a plurality of divided focused components to be focused upon when the target group is divided based on the distribution of color data belonging to the target group. According to the plurality of divided target components obtained above, the target group is divided into a plurality of groups, and the color data belonging to the target group is divided into the groups obtained after the division. Representative color extracting means for obtaining a representative color of color data belonging to each group, and an end determining means for determining whether a predetermined number of the representative colors have been obtained. Selection of the target component of interest by the component-of-interest selection means, group division by the group-division means, and extraction of the representative color by the representative-color extraction means are repeated until a predetermined number of the representative colors are obtained. An image processing apparatus comprising: target area approximation means for approximating color data of each small area using the obtained predetermined number of representative colors when it is determined that a predetermined number of the representative colors have been obtained.
【請求項17】 上記着目成分選択手段は、対象グルー
プ内の色データの代表色と色データの各成分の分散を計
算する成分別分散計算手段と、各成分のうち上記成分別
分散計算手段で得られた分散値が大きい成分から順番に
分割着目成分に決定する分割成分決定手段とを備えた請
求項16記載の画像処理装置。
17. The component-of-interest selection means includes: component-specific variance calculating means for calculating a variance of a representative color of color data in a target group and each component of the color data; and component-specific variance calculating means of each component. 17. The image processing apparatus according to claim 16, further comprising: a split component determining unit that determines a component of interest in order from a component having a large variance value.
【請求項18】 上記所定数に複数設定された段階の代
表色が得られたかどうかの判断を行う保持判断手段と、 上記保持判断手段で代表色が得られたと判断された場合
に、各段階での代表色と当該代表色を使用して上記小領
域内の色データを近似するための位置情報を保持する段
階符号化保持手段と、 複数の画質モードのうちからユーザがいずれかの画質モ
ードを選択するためのユーザ画質選択手段と、 上記ユーザ画質選択手段を用いた選択結果に従い、上記
段階符号化保持手段より選択モードに応じた代表色と位
置情報を呼び出す適切代表色読出手段とを備え、 上記終了判定手段は、上記代表色が最大所定数得られた
かどうかの判定を行い、 上記対象領域近似手段は、上記終了判定手段で上記代表
色が最大所定数得られたと判定された場合、上記適切代
表色読出手段により得られた代表色を使って各小領域の
色データを近似する請求項16記載の画像処理装置。
18. A storage judging means for judging whether or not the representative colors of a plurality of stages set to the predetermined number have been obtained, and each stage when the holding judging unit judges that the representative colors have been obtained. And a stage encoding holding unit for holding position information for approximating the color data in the small area using the representative color and the representative color, and a user selects one of the image quality modes from among the plurality of image quality modes. And a suitable representative color reading means for calling the representative color and the position information according to the selection mode from the step encoding holding means in accordance with the selection result using the user image quality selecting means. The end determination means determines whether the maximum number of the representative colors has been obtained. The target area approximation means determines whether the maximum number of the representative colors has been obtained by the end determination means. The image processing apparatus according to claim 16 wherein approximating the color data of each small region with the representative colors obtained by the appropriate representative color reading means.
【請求項19】 入力された画像を複数の小領域に分割
する領域分割手段と、 上記小領域に対して初期のグループを設定し、上記小領
域内の色データ全てを初期のグループに分類し、初期の
グループの代表色を求める初期設定手段と、 対象グループ内に属する色データの分布をもとに、対象
とするグループの分割時に着目する分割着目成分を選択
する着目成分選択手段と、 上記得られた分割着目成分に従い、対象とするグループ
を複数に分割するとともに、対象グループに属する色デ
ータを分割後に得られたグループに振り分けるグループ
分割手段と、 上記グループ分割手段によって得られた各グループ内の
色データをもとに各グループをさらに複数のグループに
分割するとともに、各グループ内の色データを分割後に
得られたグループに振り分ける第2グループ分割手段
と、 上記第2グループ分割手段で得られた各グループに属す
る色データの代表色を求める代表色抽出手段と、 上記代表色が所定数得られたかどうかの判定を行う終了
判定手段と、 上記代表色が所定数得られるまで上記着目成分選択手段
による分割着目成分の選択、上記グループ分割手段及び
上記第2グループ分割手段によるグループ分割及び上記
代表色抽出手段による代表色の抽出が繰り返され、上記
終了判定手段により上記代表色が所定数得られたと判定
された場合には、得られた所定数の代表色を使って各小
領域の色データを近似する対象領域近似手段とを備えた
画像処理装置。
19. An area dividing means for dividing an input image into a plurality of small areas, an initial group is set for the small areas, and all color data in the small areas are classified into the initial groups. Initial setting means for obtaining a representative color of an initial group; and focused component selecting means for selecting a focused component of interest when dividing the target group based on the distribution of color data belonging to the target group. In accordance with the obtained divided component of interest, the target group is divided into a plurality of groups, and the color data belonging to the target group is divided into groups obtained after the division. Each group is further divided into multiple groups based on the color data of, and the color data in each group is divided into groups obtained after the division. Second group dividing means for dividing, representative color extracting means for obtaining a representative color of the color data belonging to each group obtained by the second group dividing means, and determining whether a predetermined number of the representative colors have been obtained. Until the predetermined number of representative colors are obtained, selection of the component of interest by the component selection unit, group division by the group division unit and the second group division unit, and representative color extraction by the representative color extraction unit. If the extraction is repeated and the end determination means determines that the predetermined number of representative colors have been obtained, the target area approximation means for approximating the color data of each small area using the obtained predetermined number of representative colors An image processing apparatus comprising:
【請求項20】 上記第2グループ分割手段は、上記グ
ループ分割手段で得られた各グループ内の色データの原
点からのユークリッド距離を計算する補助分割基準計算
手段と、上記補助分割基準計算手段の計算結果をもと
に、上記グループ分割手段で得られたグループをさらに
細分化するとともに、対象グループ内の色データを分割
後に得られたグループに振り分ける再グループ分割手段
とを備えた請求項19記載の画像処理装置。
20. An auxiliary division criterion calculating means for calculating a Euclidean distance from an origin of color data in each group obtained by the group dividing means, and a second group dividing means, 20. A regrouping means for further subdividing the group obtained by the grouping means on the basis of the calculation result and allocating the color data in the target group to the group obtained after the division. Image processing device.
【請求項21】 上記小領域内の色データの統計的分布
を求める色データ統計量算出手段と、 上記色データの統計的分布を既に代表色が抽出された抽
出済み領域より得られた統計的分布と比較して、抽出済
み領域の代表色を利用するかどうかを判定する既代表色
利用判定手段と、 上記小領域と最も類似度の高い抽出済み領域を選択する
類似領域決定手段と、 上記小領域内の色データと上記選択された抽出済み領域
内の代表色をもとに小領域内の色データを所定数のグル
ープに分割する色データ分類手段と、 上記色データ分類手段によって得られた各グループに属
する色データの代表色を求める簡易代表抽出手段とを備
え、 上記既代表色利用判定手段により抽出済み領域の代表色
を利用するとの判定がされた場合には、対象領域近似手
段は、上記簡易代表色抽出手段で得られた所定数の代表
色を使って各小領域の色データを近似する請求項16又
は19記載の画像処理装置。
21. A color data statistic calculation means for calculating a statistical distribution of color data in the small area, and a statistical distribution of the color data obtained from an extracted area in which a representative color has already been extracted. A representative color use determining unit that determines whether to use the representative color of the extracted region in comparison with the distribution; a similar region determining unit that selects an extracted region having the highest similarity to the small region; Color data classification means for dividing 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; Simplified representative extraction means for obtaining a representative color of the color data belonging to each group, wherein the target area approximating means is used when the representative color use determining means determines that the representative color of the extracted area is to be used. Is Serial image processing apparatus according to claim 16 or 19, wherein using a predetermined number of representative colors obtained by the simplified representative color extracting means for approximating the color data of each small area.
【請求項22】 上記小領域のうち上記代表色決定手段
により代表色が決定される領域を選択する逐次分割対象
決定手段と、 上記小領域内の色データの統計量を求める色データ統計
量算出手段と、 既に代表色が抽出された抽出済み領域のうち、上記逐次
分割対象決定手段で選択されていない小領域に近接する
抽出済み領域より得られた統計量と当該小領域の統計量
を比較して、最も類似度の高い抽出済領域を選択する近
接類似領域決定手段と、 上記近接類似領域決定手段で選択された抽出済み領域の
代表色をもとに、対象小領域内の色データを所定数のグ
ループに分割し各グループに属する代表色を求める簡易
代表抽出手段とを備え、 上記対象領域近似手段は、上記逐次分割対象決定手段で
選択されていない小領域については、上記簡易代表抽出
手段で得られた所定数の代表色を使って各小領域の色デ
ータを近似する請求項16又は19記載の画像処理装
置。
22. A sequential division target determining means for selecting an area of the small area in which the representative color is determined by the representative color determining means, and a color data statistic calculation for obtaining a statistic of color data in the small area. Means and a statistic of an extracted area in which a representative color has already been extracted and which is obtained from an extracted area close to a small area which is not selected by the sequential division target determination means, and a statistic of the small area. Means for selecting an extracted area having the highest similarity, and color data in the target small area based on the representative color of the extracted area selected by the close similar area determining means. Simple representative extraction means for dividing into a predetermined number of groups to obtain representative colors belonging to each group, wherein the target area approximating means performs the simple substitution for small areas not selected by the successive division target determining means. The image processing apparatus according to claim 16 or 19, wherein using a predetermined number of representative colors obtained by the extraction means for approximating the color data of each small area.
【請求項23】 上記初期設定手段は、小領域内色デー
タの原点からのユークリッド距離を求める距離計算手段
と、上記ユークリッド距離をもとに領域内の全色データ
を複数のグループに分類する初期グループ分割手段と、
上記初期グループ分割手段で得られた各グループ内の色
データの平均値をそのグループの代表色とする初期代表
抽出手段とを備えた請求項16又は19記載の画像処理
装置。
23. A distance setting means for calculating a Euclidean distance from an origin of color data in a small area, and an initial setting means for classifying all color data in the area into a plurality of groups based on the Euclidean distance. Group dividing means;
20. The image processing apparatus according to claim 16, further comprising an initial representative extracting unit that sets an average value of the color data in each group obtained by the initial group dividing unit as a representative color of the group.
【請求項24】 グループを代表する代表色は、当該グ
ループ内の色データの平均値である請求項16又は19
記載の画像処理装置。
24. A representative color representing a group is an average value of color data in the group.
The image processing apparatus according to any one of the preceding claims.
JP2002012451A 2001-01-22 2002-01-22 Image data transmission method and image data transmission apparatus Expired - Fee Related JP3971614B2 (en)

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
JP2001012756 2001-01-22
JP2001-12756 2001-01-22
JP2001012757 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 true JP2002290763A (en) 2002-10-04
JP2002290763A5 JP2002290763A5 (en) 2005-06-30
JP3971614B2 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)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007200170A (en) * 2006-01-30 2007-08-09 Brother Ind Ltd Image processing apparatus and image processing program
JP2013197728A (en) * 2012-03-16 2013-09-30 Konica Minolta Inc Data processing method, data processing program, and data processing device
JP2018514118A (en) * 2015-03-17 2018-05-31 ネットフリックス・インコーポレイテッドNetflix, Inc. Video program segment detection
CN112652024A (en) * 2020-12-11 2021-04-13 浙江工商大学 Method for replacing colors of image again based on color harmony

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007200170A (en) * 2006-01-30 2007-08-09 Brother Ind Ltd Image processing apparatus and image processing program
US8169656B2 (en) 2006-01-30 2012-05-01 Brother Kogyo Kabushiki Kaisha Image processing devices and methods for resizing an original image therefor
JP2013197728A (en) * 2012-03-16 2013-09-30 Konica Minolta Inc Data processing method, data processing program, and data processing device
JP2018514118A (en) * 2015-03-17 2018-05-31 ネットフリックス・インコーポレイテッドNetflix, Inc. Video program segment detection
US10452919B2 (en) 2015-03-17 2019-10-22 Netflix, Inc. Detecting segments of a video program through image comparisons
CN112652024A (en) * 2020-12-11 2021-04-13 浙江工商大学 Method for replacing colors of image again based on color harmony
CN112652024B (en) * 2020-12-11 2023-05-05 浙江工商大学 A method of recoloring images based on color harmony

Also Published As

Publication number Publication date
JP3971614B2 (en) 2007-09-05

Similar Documents

Publication Publication Date Title
US6757431B2 (en) Resolution conversion for anti-aliased images using loose gray scale template matching
US6686922B2 (en) Adaptive thresholding using loose gray scale template matching
US6961462B2 (en) Image processing method and image processor
EP0235456B1 (en) Image processing apparatus and method with blocks of compressed data
EP1347410B1 (en) Edge-based enlargement and interpolation of images
JP3828210B2 (en) Image contrast enhancement method
US5109282A (en) Halftone imaging method and apparatus utilizing pyramidol error convergence
EP0650287B1 (en) Image processing method and apparatus
EP0874330A2 (en) Area based interpolation for image enhancement
US6738517B2 (en) Document image segmentation using loose gray scale template matching
EP1349371A2 (en) Image processing apparatus, image processing program and storage medium storing the program
JP4045913B2 (en) Image coding apparatus, image coding method, and image processing apparatus
JPH06223172A (en) Image processing method and image processing apparatus
US5760921A (en) Method of and apparatus for image processing
JP2004166007A (en) Device, method and program for image processing, and storage medium
Dixit Quantization of color images for display/printing on limited color output devices
Miyata et al. Novel inverse colorization for image compression
JP3514050B2 (en) Image processing device
JPH07322074A (en) Equipment and method for data processing to process 2 level image file that a dither ring happened
JP2020043461A (en) Image processing apparatus, image processing method, and program
JP3971614B2 (en) Image data transmission method and image data transmission apparatus
JP3509397B2 (en) Markov model image coding device
JP3346051B2 (en) Image processing device
JPH0974488A (en) Image processing method and apparatus
JP3647071B2 (en) Image processing apparatus and method

Legal Events

Date Code Title Description
A521 Request for written amendment filed

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 Request for written amendment filed

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