JP3674965B2 - Color image compression method - Google Patents
Color image compression method Download PDFInfo
- Publication number
- JP3674965B2 JP3674965B2 JP25178194A JP25178194A JP3674965B2 JP 3674965 B2 JP3674965 B2 JP 3674965B2 JP 25178194 A JP25178194 A JP 25178194A JP 25178194 A JP25178194 A JP 25178194A JP 3674965 B2 JP3674965 B2 JP 3674965B2
- Authority
- JP
- Japan
- Prior art keywords
- color
- representative
- partial
- pixel
- value
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Images
Landscapes
- Processing Or Creating Images (AREA)
- Image Processing (AREA)
- Compression Of Band Width Or Redundancy In Fax (AREA)
- Controls And Circuits For Display Device (AREA)
Description
【0001】
【産業上の利用分野】
本発明は、カラー画像の圧縮に関する。
近年、カラー画像の表示の高品位化の要望が高まり、所謂フルカラー対応システムに対する要望が高まって来た。一方、現状では、従来の256色擬似カラーディスプレイが行き渡っているため、その活用を図ることが要求されている。このために既存のディスプレイによりフルカラー画像を出来る限り自然に表示する必要がある。このため、代表色と呼ばれる所定の数の色(例えば256色)を選び、これらの色によってカラー画像を表現する方法、即ちカラー画像圧縮方法を実現する必要がある。
【0002】
【従来の技術】
カラー画像圧縮方法の一つとして、従来より、LUT(Look up table) が用いられている。具体的には、原画像に観察される色(例えば、16777216色のフルカラー)のうち、代表色として所定の数の色(例えば256色)を選び、その色のみをLUTに設定する。各画素は、LUTに格納されている何れかの色によって表現される。なお、LUTに設定される代表色の列はカラーマップと呼ばれる。圧縮画像によって表示される画像において、その多くの画素は、元の色とは異なった色によって表示され、原画像の色相感を損なうことが多く、この様な欠点を回避するべく、従来より、種々の方法が提案されている。以下に、従来技術の代表的方法を2件例示する。
【0003】
第1は、図5に示す構成をとる(特開平4−298196参照)。図中、1はカラー画像入力部、2は出現色頻度計数部、3はカラーマップ作成部、4はカラー画像変換部である。本方法では、対象となるカラー画像に含まれるカラー情報の出現頻度を求め、出現頻度の高い順に所定の数の代表色を抽出する。本方法では、画像の多くの範囲で観察される色は忠実に保存される。しかし、その他の部分の色はすべて原画像の色とかなりかけ離れた色で再現されるので、かなりの違和感を生じる。
【0004】
第2は、図6に示す構成をとる(特開昭64−80991参照)。図中、1はカラー画像入力部、2は画像分割部、3はカラーマップ作成部、4はカラー画像変換部である。本方法では、対象となるカラー画像に含まれるカラー情報を色空間(例えば、RGBの三原色の各成分を3つの座標軸とする3次元空間等)に変換し、色空間を複数領域に分割して代表となる色を決定する方法も提案されている。本方法では、原画像で色相が急激に変化する位置を検出し、その位置を境界とした領域内に、適応的にカラーマップを決定する。その結果、画像の全体にわたって画質が向上し、画像の転送や格納に有用である。しかし、一つの画像に対して複数のカラーマップを持つため、画像表示する場合には装置の構成が複雑になり導入のメリットが無いのが現状である。
【0005】
【発明が解決しようとする課題】
従って、(1) 画像の全体にわたって画質を保持するカラーマップを決定できない、(2) 画質を極力保持するために、複数のカラーマップを設定しなければならない、といった問題点があった。
【0006】
本発明は、これらの問題点を解決し、既存のディスプレイを用いて、フルカラー画像を表示するカラー画像圧縮方法を実現することを目的とする。
【0007】
【課題を解決するための手段】
図1は、本発明の原理説明図、図3は図1の処理の流れを示す図である。図1中、1はカラー画像入力部、2は色空間分割部、3はカラーマップ作成部、4はカラー画像変換部である。
【0008】
請求項1の発明では、カラー画像の色空間を代表色に対応する数の複数部分領域に分割し、該部分領域に属する色値を該部分領域毎に定めた代表色に変換するカラー画像圧縮方法であって、前記カラー画像中の各画素について、色空間に変換し、変換された前記各画素の前記色空間での色値の分布を1つの部分領域とし、該部分領域内でユークリッド距離が最も大きい2色を代表色として前記部分領域を2分割し、前記2分割された各部分領域の代表色は該部分領域の平均値を用い、各部分領域毎の画素値と代表色との距離の評価値を求めて、該評価値の分散を計算し、分散の大きい部分領域を選択し、該選択された部分領域を2分割してそれぞれの代表色を決定し、該2分割により増加した後の部分領域の数が所定数になるまで、毎回全部分領域を対象に、領域の分割と代表色の決定を繰り返す。
【0009】
請求項2の発明では、カラー画像の色空間を代表色に対応する数の複数部分領域に分割し、該部分領域に属する色値を該部分領域毎に定めた代表色に変換するカラー画像圧縮方法であって、前記カラー画像中の各画素について、色空間に変換し、変換された前記各画素の前記色空間での色値の分布を1つの部分領域とし、該部分領域内でユークリッド距離が最も大きい2色を代表色として前記部分領域を2分割し、前記2分割された各部分領域の代表色は各部分領域の色値の平均値とし、前記部分領域の各画素に対応する色値と前記部分領域の色値の平均値とから、該部分領域の分散を計算し、分散の大きい部分領域を選択し、該選択された部分領域を2分割してそれぞれの代表色を決定し、該2分割により増加した後の全部分領域の数が所定数になるまで、毎回全部分領域を対象に、領域の分割と代表色の決定を繰り返す。
【0010】
請求項3の発明では、請求項1または請求項2の発明を、色空間がRGB値をそのまま3成分とする3次元座標で示される場合に適用する。
請求項4の発明では、請求項1または請求項2の発明を、RGB値をYIQの3成分とする3次元座標に変換した3次元座標で示される場合、さらにYIを2成分とする2次元座標に変換する場合に適用する。
【0011】
請求項5の発明では、請求項1の発明について、画素の色値の属する部分領域の代表色と該画素の色値との距離の評価値を画素の色値の属する部分領域の代表色と該画素の色値とのユークリッド距離としている。
【0012】
請求項6の発明では、請求項1の発明について、画素の色値の属する部分領域の代表色と該画素の色値との距離の評価値を画素の色値の属する部分領域の代表色と該画素の色値との街区画距離としている。
【0013】
【作用】
請求項1の発明および請求項2の発明では、図1の如くカラー画像入力部1から入力された原カラー画像は、色空間分割部6に送られる。色空間分割部6は色空間分割、RGB変換および代表色決定の諸機能を内蔵するもので、カラー画像のRGB値を色空間に写像し、写像結果に基づき、全ての画素についてその画素の色値の属する部分領域の代表色と該画素の色値との距離の評価値の累積が小さくなるように、色空間を所定の数の複数部分領域に分割し、各部分領域の代表色を決定する。
【0014】
色空間分割および代表色決定の結果と原画像とを用いて、カラーマップ作成部3でカラーマップとして、各部分領域の通し番号と代表色の対応表を生成する。その結果に基づいて、続くカラー画像変換部4で、分割された色空間内の部分領域に通し番号を付け、入力画像の各画素を、それが属する部分領域の番号に置き換える。このようにして得られた圧縮符号化画像(圧縮された画像)を得る。
【0015】
本発明によると、全ての画素についてその画素の色値の属する部分領域の代表色と該画素の色値との距離の評価値の累積が小さいため(即ち色の近似の程度が良好であるため)、高品位の圧縮画像が得られる。
【0016】
請求項3の発明では、請求項1の発明および請求項2の発明の場合と同様に、図1に示すカラー画像入力部1から入力された原カラー画像は、色空間分割部6に送られるが、色空間がRGB値をそのまま3成分とする3次元座標で示される場合であり、色空間分割部6は色空間分割および代表色決定の諸機能を内蔵するもので、カラー画像のRGB値を用いて、全ての画素についてその画素の色値の属する部分領域の代表色と該画素の色値との距離の評価値の累積が小さくなるように、RGB色空間を所定の数の複数部分領域に分割し、各部分領域の代表色を決定する。以下、請求項1の発明および請求項2の発明の場合と同様に、色空間分割および代表色決定の結果と原画像とを用いて、カラーマップ作成部3でカラーマップとして、各部分領域の通し番号と代表色の対応表を生成する。その結果に基づいて、続くカラー画像変換部4で、分割された色空間内の部分領域に通し番号を付け、入力画像の各画素を、それが属する部分領域の番号に置き換える。このようにして得られた圧縮符号化画像を得る。
【0017】
本発明によると、請求項1の発明および請求項2の発明と同様にして、色の近似の程度が良好で、高品位の圧縮画像が得られる。
請求項4の発明においても、図1の如くカラー画像入力部1から入力された原カラー画像は、色空間分割部6に送られる。色空間分割部6は色空間分割、RGB変換および代表色決定の諸機能を内蔵するもので、カラー画像のRGB値をYIQ色空間に写像し、写像結果に基づき、全ての画素についてその画素の色値の属する部分領域の代表色と該画素の色値との距離の評価値の累積が小さくなるように、色空間を所定の数の複数部分領域に分割し、各部分領域の代表色を決定する。以下請求項1ないし請求項3の発明と同様にして、圧縮符号化画像(圧縮された画像)を得る。
【0018】
本発明では、上記の共通の効果のほかに、YIQの3成分のうち1つの成分が他の2つに比して少ない性質を利用して2次元色空間(YIの2次元)に近似する事が出来るため、より簡便な構成を採ることが可能という顕著な効果がある。
【0019】
請求項5の発明では、画素の色値の属する部分領域の代表色と該画素の色値との距離の評価値は画素の色値の属する部分領域の代表色と該画素の色値とのユークリッド距離であるが、その他については請求項1の発明と全く同様の作用が期待される。
【0020】
請求項6の発明では、画素の色値の属する部分領域の代表色と該画素の色値との距離の評価値は画素の色値の属する部分領域の代表色と該画素の色値との街区画距離であるが、その他については請求項1の発明と全く同様の作用が期待される。
【0021】
【実施例】
図2は本発明の実施例構成図、図4は図2の処理の流れを示す図である。図2中、11はRGB値変換部で、画像記憶部12に格納された原画像を読み出し、RGB値を色空間に写像した変換画像を画像記憶部に格納するもの、13は色空間分割および代表色決定部で、画像記憶部に格納された変換画像を読み出し、色空間に含まれるいかなる画像も、全ての画素についてその画素の色値の属する部分領域の代表色と該画素の色値との距離の評価値の累積が小さくなるように、色空間を所定の数の複数部分領域に分割し、各部分領域の代表色を決定し、色空間の分割結果および各領域の代表色を色空間分割結果および代表色記憶部14に格納するもの、15は画像符号化部で、色空間分割結果および代表色記憶部14に格納された色空間の分割結果および各部分領域の代表色を読み出し、各部分領域に通し番号をつけ、画像記憶部12に格納された原画像を読み出し、各画素をそれが属する番号に置き換えるものである。置き換えた画像は符号化画像として画像記憶部12に格納し、同時に、カラーマップとして、各領域の通し番号と代表色の対応表を生成する。生成したカラーマップは、カラーマップ記憶部16に格納する。
【0022】
以下では、色空間への変換の例として3次元空間の場合と2次元空間の場合について夫々2例、計4例について実際の変換式を示し、また色空間分割および代表色決定、色空間におけるユークリッド距離の算出方法、色空間における平均値の算出方法および色空間における分散の算出方法につい例示し、本発明の有効性を確認した。
【0023】
RGB値の色空間への変換
〔第1の例〕YIQの3次元空間への変換の場合
3次元空間を、互いに直交する3軸(Y軸、I軸、Q軸)が成す3次元空間と捉える。本例は請求項4の発明の第1の具体的実施例であり、図2中のRGB変換部11において変換が行われ、その結果を画像記憶部12に格納する。RGB値のY座標、I座標、Q座標への変換は次式を用いておこなう。
【0024】
Y=0.30×R+0.59×G+0.11×B
I=0.60×R−0.28×G−0.32×B
Q=0.21×R−0.52×G+0.31×B
〔第2の例〕RGBの3次元空間への変換の場合
3次元空間を、互いに直交する3軸(R軸、G軸、B軸)が成す3次元空間と捉える。本例は請求項3の発明の具体的実施例であり、この場合、R座標、G座標、B座標は、RGB値をそのまま用いる。
〔第3の例〕YIの2次元空間への変換の場合
色空間を、YIQ3次元空間を成す互いに直交する3軸のうち、分布が最も少ない軸(Q軸)を割愛した2軸(Y軸、I軸)が成す2次元空間と捉える。請求項4の発明の第2の具体的実施例である。図2中のRGB変換部11において変換が行われ、その結果を画像記憶部12に格納する。RGB値のY座標、I座標への変換は次式を用いておこなう。
【0025】
Y=0.30×R+0.59×G+0.11×B
I=0.60×R−0.28×G−0.32×B
〔第4の例〕xy2次元空間への変換の場合
色空間を、次式で示す2軸(x軸、y軸)が成す2次元空間と捉える。請求項1の発明および請求項2の発明の具体的実施例である。図2中のRGB変換部11において変換が行われ、その結果を画像記憶部12に格納する。
【0026】
x=(R+G+B)/3
y=(R−B)/2
以上の各例においては、以下の手段(手順)を共通して用いる。
〔第1の手段〕色空間分割および代表色決定の手段
(1) 色空間での画素分布を一つの部分領域とみなす。この部分領域の代表色として該部分領域の平均値を用いる。
(2) 部分領域数が代表色の所定数と一致するまで、(3) から(6) まで繰り返す。
(3) 各部分領域毎の画素値と代表色との差を求め、この差につき分散を求める。
(4) これまでに得られた全ての部分領域の中で (3)で得られた分散値が最も高い部分領域を2分割の対象として選択し、2つの部分領域に分割する。そして該部分領域内でユークリッド距離が最も大きい2色を仮に2分割後の新しい2つの部分領域のそれぞれの代表色とする。
(5) (4)で得られた2つの部分領域のいずれかに属する各点は、その点と代表色のうちユークリッド距離が小さい方の領域に属しているとみなして、2つの領域それぞれの平均値を計算し、それを新しい代表色とする。
(6) (5)における平均値計算後の新しい代表色が平均値計算前の古い代表色と一致するまで (5)の過程を繰り返す。
〔第2の手段〕色空間におけるユークリッド距離の算出方法
(1) 色空間が3次元の場合
ある二つの色C1 =(X1,Y1,Z1 )およびC2 =(X2,Y2,Z2 )の距離dは次式により求められる。
【0027】
d={(X1 −X2 )2 +(Y1 −Y2 )2 +(Z1 −Z2 )2 }1/2
(2) 色空間が2次元の場合
ある二つの色C1 =(X1,Y1 )およびC2 =(X2,Y2 )の距離dは次式により求められる。
【0028】
d={(X1 −X2 )2 +(Y1 −Y2 )2 }1/2
〔第3の手段〕色空間における平均値の算出方法
(1) 色空間が3次元の場合
ある領域に属する色をCi =(Xi,Yi,Zi )(i=1,N)(Nは自然数)とすると、この領域の平均値Cm =(Xm,Ym,Zm )は次式により求められる。
【0029】
【数1】
【0030】
(2) 色空間が2次元の場合
ある領域に属する色をCi =(Xi,Yi )(i=1,N)(Nは自然数)とすると、この領域の平均値Cm =(Xm,Ym )は次式により求められる。
【0031】
【数2】
【0032】
〔第4の手段〕色空間における分散の算出方法
(1) 色空間が3次元の場合
ある領域に属する色をCi =(Xi,Yi,Zi )(i=1,N)(Nは自然数)、そして、この領域の平均値をCm =(Xm,Ym,Zm )とすると、この領域の分散σは次式により求められる。
【0033】
【数3】
【0034】
(2) 色空間が2次元の場合
ある領域に属する色をCi =(Xi,Yi )(i=1,N)(Nは自然数)、そして、この領域の平均値をCm =(Xm,Ym )とすると、この領域の分散σは次式により求められる。
【0035】
【数4】
【0036】
【発明の効果】
以上説明した様に、本発明によれば、(1) 画像の全ての画素についてその画素の色値の属する部分領域の代表色と該画素の色値との距離の評価値の累積を考慮するので、画像の全体にわたって均一に画質を保持するカラーマップを決定することができ、(2) 画像のすべての点を同時に考慮して代表色を決定するので、一枚の画像につきただ一つのみカラーマップを設定できる。
【0037】
その結果、カラー画像(例えば、16777216色のフルカラー)の原画を従来の方法よりも自然に疑似カラー(例えば256色)に圧縮する事が出来、既存の設備の有効利用を図ることが出来る。
【図面の簡単な説明】
【図1】 本発明の原理説明図である。
【図2】 本発明の実施例構成図である。
【図3】 処理の流れ1である。
【図4】 処理の流れ2である。
【図5】 従来技術の構成1である。
【図6】 従来技術の構成2である。
【符号の説明】
1 カラー画像入力部
2 出現色頻度計数部
3 カラーマップ作成部
4 カラー画像変換部
5 画像分割部
6 色空間分割部
11 RGB値変換部
12 画像記憶部
13 色空間分割および代表色決定部
14 色空間分割結果および代表色記憶部
15 画像符号化部
16 カラーマップ記憶部[0001]
[Industrial application fields]
The present invention relates to color image compression.
In recent years, there has been an increasing demand for high-quality display of color images, and there has been an increasing demand for so-called full-color compatible systems. On the other hand, since the conventional 256-color pseudo color display is prevalent, it is required to utilize it. For this reason, it is necessary to display a full-color image as naturally as possible on an existing display. For this reason, it is necessary to select a predetermined number of colors (for example, 256 colors) called representative colors and realize a method of expressing a color image by these colors, that is, a color image compression method.
[0002]
[Prior art]
Conventionally, a LUT (Look up table) is used as one of color image compression methods. Specifically, a predetermined number of colors (for example, 256 colors) are selected as representative colors among colors observed in the original image (for example, 16777216 full colors), and only those colors are set in the LUT. Each pixel is represented by any color stored in the LUT. The representative color column set in the LUT is called a color map. In an image displayed by a compressed image, many pixels are displayed in a color different from the original color, often impairing the hue of the original image. In order to avoid such drawbacks, Various methods have been proposed. Below, two typical methods of a prior art are illustrated.
[0003]
The first has the configuration shown in FIG. 5 (see Japanese Patent Laid-Open No. 4-298196). In the figure, 1 is a color image input unit, 2 is an appearance color frequency counting unit, 3 is a color map creation unit, and 4 is a color image conversion unit. In this method, the appearance frequency of color information included in a target color image is obtained, and a predetermined number of representative colors are extracted in descending order of appearance frequency. In this method, colors observed in many areas of the image are faithfully preserved. However, the colors of the other parts are reproduced with colors that are considerably different from the colors of the original image, which causes a considerable sense of incongruity.
[0004]
Second, the structure shown in FIG. 6 is employed (see Japanese Patent Laid-Open No. 64-80991). In the figure, 1 is a color image input unit, 2 is an image dividing unit, 3 is a color map creation unit, and 4 is a color image conversion unit. In this method, color information contained in a target color image is converted into a color space (for example, a three-dimensional space having three coordinate components of three primary colors of RGB as three coordinate axes), and the color space is divided into a plurality of regions. A method for determining a representative color has also been proposed. In this method, a position where the hue changes abruptly in the original image is detected, and a color map is adaptively determined within a region having the position as a boundary. As a result, the image quality is improved over the entire image, which is useful for transferring and storing images. However, since there are a plurality of color maps for one image, the configuration of the apparatus is complicated when displaying an image, and there is no merit of introduction.
[0005]
[Problems to be solved by the invention]
Therefore, (1) it is impossible to determine a color map that maintains the image quality over the entire image, and (2) in order to maintain the image quality as much as possible, a plurality of color maps must be set.
[0006]
An object of the present invention is to solve these problems and to realize a color image compression method for displaying a full-color image using an existing display.
[0007]
[Means for Solving the Problems]
FIG. 1 is a diagram for explaining the principle of the present invention, and FIG. 3 is a diagram showing the flow of processing in FIG. In FIG. 1, 1 is a color image input unit, 2 is a color space division unit, 3 is a color map creation unit, and 4 is a color image conversion unit.
[0008]
According to the first aspect of the present invention, color image compression is performed in which a color space of a color image is divided into a plurality of partial areas corresponding to representative colors, and color values belonging to the partial areas are converted into representative colors determined for the partial areas. A method of converting each pixel in the color image into a color space, and converting the color value distribution of the converted pixel in the color space into one partial region, and a Euclidean distance in the partial region The partial area is divided into two with the two colors having the largest color as the representative color, and the average value of the partial areas is used as the representative color of each of the divided partial areas, and the pixel value and the representative color of each partial area are Obtain the evaluation value of the distance, calculate the variance of the evaluation value, select a partial region with a large variance, determine the representative color by dividing the selected partial region into two, and increase by dividing into two Every time until the number of sub-regions reaches a predetermined number Targeting regions, repeat the division and the representative color determination of regions.
[0009]
According to a second aspect of the present invention, color image compression is performed in which a color space of a color image is divided into a plurality of partial areas corresponding to representative colors, and color values belonging to the partial areas are converted into representative colors determined for the partial areas. A method of converting each pixel in the color image into a color space, and converting the color value distribution of the converted pixel in the color space into one partial region, and a Euclidean distance in the partial region The partial area is divided into two with the two colors having the largest color as the representative color, and the representative color of each of the two divided partial areas is an average value of the color values of the partial areas, and the color corresponding to each pixel of the partial area The distribution of the partial area is calculated from the value and the average value of the color values of the partial areas, the partial area having a large variance is selected, and the selected partial area is divided into two to determine the representative colors. The number of all partial areas after increasing by the two divisions Until several, covering all partial regions each, repeated division and representative color determination of regions.
[0010]
In the invention of claim 3, the invention of
In the invention of
[0011]
According to a fifth aspect of the present invention, in the first aspect of the invention, the evaluation value of the distance between the representative color of the partial area to which the pixel color value belongs and the color value of the pixel is the representative color of the partial area to which the pixel color value belongs. is the Euclidean distance between the color value of the pixel.
[0012]
According to a sixth aspect of the present invention, in the first aspect of the invention, the evaluation value of the distance between the representative color of the partial area to which the pixel color value belongs and the color value of the pixel is the representative color of the partial area to which the pixel color value belongs. The city block distance from the color value of the pixel is used.
[0013]
[Action]
In the first and second aspects of the invention, the original color image input from the color
[0014]
Using the result of color space division and representative color determination and the original image, the color map creation unit 3 generates a correspondence table between serial numbers of each partial area and representative colors as a color map. Based on the result, the subsequent color
[0015]
According to the present invention, the accumulation of evaluation values of the distance between the representative color of the partial area to which the color value of the pixel belongs and the color value of the pixel is small for all the pixels (that is, the degree of color approximation is good). ), A high-quality compressed image is obtained.
[0016]
In the third aspect of the invention, as in the case of the first and second aspects of the invention, the original color image input from the color
[0017]
According to the present invention, similarly to the first and second aspects of the invention, a high-quality compressed image with a good degree of color approximation can be obtained.
Also in the invention of
[0018]
In the present invention, in addition to the above-described common effect, one of the three components of YIQ is approximated to a two-dimensional color space (two-dimensional YI) by utilizing the property that it is less than the other two components. Therefore, there is a remarkable effect that it is possible to adopt a simpler configuration.
[0019]
In the invention of
[0020]
According to the sixth aspect of the present invention, the evaluation value of the distance between the representative color of the partial area to which the pixel color value belongs and the color value of the pixel is the difference between the representative color of the partial area to which the pixel color value belongs and the color value of the pixel. With respect to the city block distance, the other effects are expected to be exactly the same as those of the invention of
[0021]
【Example】
FIG. 2 is a block diagram of an embodiment of the present invention, and FIG. 4 is a diagram showing the flow of processing of FIG. In FIG. 2, reference numeral 11 denotes an RGB value conversion unit which reads an original image stored in the image storage unit 12 and stores a converted image obtained by mapping RGB values in the color space in the image storage unit, and 13 denotes color space division and The representative color determination unit reads the converted image stored in the image storage unit, and for any image included in the color space, for all pixels, the representative color of the partial area to which the color value of the pixel belongs and the color value of the pixel The color space is divided into a predetermined number of partial areas so that the accumulated evaluation value of the distance becomes smaller, the representative color of each partial area is determined, and the color space division result and the representative color of each area are colored. What is stored in the space division result and the representative color storage unit 14, 15 is an image encoding unit, which reads out the color space division result and the color space division result stored in the representative color storage unit 14 and the representative color of each partial area A serial number for each partial area. Reads out the original image stored in the image storage unit 12, is intended to replace the number of pixels it belongs. The replaced image is stored in the image storage unit 12 as an encoded image, and at the same time, a correspondence table of serial numbers of each region and representative colors is generated as a color map. The generated color map is stored in the color map storage unit 16.
[0022]
In the following, as examples of conversion to the color space, actual conversion formulas are shown for two cases in the case of the three-dimensional space and the case of the two-dimensional space, for a total of four examples. The method of calculating the Euclidean distance, the method of calculating the average value in the color space, and the method of calculating the variance in the color space are exemplified to confirm the effectiveness of the present invention.
[0023]
Conversion of RGB values to color space [First example] In the case of conversion of YIQ to a three-dimensional space, a three-dimensional space is defined as a three-dimensional space formed by three axes (Y axis, I axis, Q axis) orthogonal to each other. Capture. This example is a first specific embodiment of the invention of
[0024]
Y = 0.30 × R + 0.59 × G + 0.11 × B
I = 0.60 × R−0.28 × G−0.32 × B
Q = 0.21 × R−0.52 × G + 0.31 × B
[Second Example] In the case of converting RGB into a three-dimensional space, the three-dimensional space is regarded as a three-dimensional space formed by three axes (R axis, G axis, B axis) orthogonal to each other. This example is a specific embodiment of the invention of claim 3. In this case, RGB values are used as they are for the R coordinate, G coordinate, and B coordinate.
[Third Example] When YI is converted to a two-dimensional space, the color space is divided into two axes (Y-axis) that omits the axis (Q-axis) with the smallest distribution among the three axes orthogonal to each other forming the YIQ three-dimensional space. , I axis). This is a second specific embodiment of the invention of
[0025]
Y = 0.30 × R + 0.59 × G + 0.11 × B
I = 0.60 × R−0.28 × G−0.32 × B
[Fourth Example] In the case of conversion to an xy two-dimensional space A color space is regarded as a two-dimensional space formed by two axes (x-axis and y-axis) represented by the following equations. It is a specific embodiment of the invention of
[0026]
x = (R + G + B) / 3
y = (R−B) / 2
In the above examples, the following means (procedures) are commonly used.
[First Means] Means for color space division and representative color determination
(1) Consider the pixel distribution in the color space as one partial area. The average value of the partial area is used as the representative color of the partial area.
(2) Repeat from (3) to (6) until the number of partial areas matches the predetermined number of representative colors.
(3) The difference between the pixel value for each partial area and the representative color is obtained, and the variance is obtained for this difference.
(4) Of all the partial regions obtained so far, the partial region having the highest variance value obtained in (3) is selected as the object of division into two and divided into two partial regions. The two colors having the largest Euclidean distance in the partial area are assumed to be representative colors of the two new partial areas after the division into two.
(5) Each point belonging to one of the two partial areas obtained in (4) is regarded as belonging to the area with the smaller Euclidean distance between the point and the representative color, and An average value is calculated and used as a new representative color.
(6) The process of (5) is repeated until the new representative color after the average value calculation in (5) matches the old representative color before the average value calculation.
[Second Means] Method for calculating Euclidean distance in color space
(1) The distance d between two colors C 1 = (X 1 , Y 1 , Z 1 ) and C 2 = (X 2 , Y 2 , Z 2 ) when the color space is three-dimensional is obtained by the following equation: .
[0027]
d = {(X 1 −X 2 ) 2 + (Y 1 −Y 2 ) 2 + (Z 1 −Z 2 ) 2 } 1/2
(2) The distance d of two colors C 1 = (X 1 , Y 1 ) and C 2 = (X 2 , Y 2 ) when the color space is two-dimensional is obtained by the following equation.
[0028]
d = {(X 1 -X 2 ) 2 + (Y 1 -Y 2) 2} 1/2
[Third Means] Method for calculating average value in color space
(1) If the color space is three-dimensional, and the color belonging to a certain area is C i = (X i, Y i, Z i ) (i = 1, N) (N is a natural number), the average value C of this area m = (X m, Y m , Z m) is obtained by the following equation.
[0029]
[Expression 1]
[0030]
(2) When the color space is two-dimensional, if the color belonging to a certain region is C i = (X i, Y i ) (i = 1, N) (N is a natural number), the average value C m = ( X m, Y m ) is obtained by the following equation.
[0031]
[Expression 2]
[0032]
[Fourth Means] Calculation Method of Variance in Color Space
(1) When the color space is three-dimensional, the color belonging to a certain area is C i = (X i, Y i, Z i ) (i = 1, N) (N is a natural number), and the average value of this area is If C m = (X m, Y m, Z m ), the dispersion σ of this region is obtained by the following equation.
[0033]
[Equation 3]
[0034]
(2) When the color space is two-dimensional, the color belonging to a certain area is C i = (X i, Y i ) (i = 1, N) (N is a natural number), and the average value of this area is C m = If (X m, Y m ), the variance σ of this region can be obtained by the following equation.
[0035]
[Expression 4]
[0036]
【The invention's effect】
As described above, according to the present invention, (1) taking into account the accumulation of evaluation values of the distance between the representative color of the partial area to which the color value of the pixel belongs and the color value of the pixel for all the pixels of the image Therefore, it is possible to determine a color map that maintains the image quality uniformly throughout the entire image, and (2) the representative color is determined considering all points of the image at the same time, so only one image per image A color map can be set.
[0037]
As a result, an original image of a color image (for example, 16777216 full colors) can be compressed to a pseudo color (for example, 256 colors) more naturally than the conventional method, and the existing equipment can be effectively used.
[Brief description of the drawings]
FIG. 1 is a diagram illustrating the principle of the present invention.
FIG. 2 is a configuration diagram of an embodiment of the present invention.
FIG. 3 is a
FIG. 4 is a
FIG. 5 is
FIG. 6 is
[Explanation of symbols]
DESCRIPTION OF
Claims (6)
前記カラー画像中の各画素について、色空間に変換し、変換された前記各画素の前記色空間での色値の分布を1つの部分領域とし、該部分領域内でユークリッド距離が最も大きい2色を代表色として前記部分領域を2分割し、
前記2分割された各部分領域の代表色は該部分領域の平均値を用い、各部分領域毎の画素値と代表色との距離の評価値を求めて、該評価値の分散を計算し、分散の大きい部分領域を選択し、該選択された部分領域を2分割してそれぞれの代表色を決定し、該2分割により増加した後の部分領域の数が所定数になるまで、毎回全部分領域を対象に、領域の分割と代表色の決定を繰り返すことを特徴とするカラー画像圧縮方法。A color image compression method for dividing a color space of a color image into a plurality of partial areas corresponding to representative colors and converting color values belonging to the partial areas into representative colors determined for the partial areas,
For each pixel in the color image, the color is converted into a color space, and the color value distribution of the converted pixel in the color space is defined as one partial region, and the two colors having the largest Euclidean distance in the partial region Divide the partial area into two with the representative color,
The representative color of each of the partial areas divided into two is obtained by using the average value of the partial areas, obtaining an evaluation value of the distance between the pixel value and the representative color for each partial area, and calculating the variance of the evaluation values, Select a partial area with a large variance, determine the representative color for each of the selected partial areas by dividing the area into two parts, and increase the total number of partial areas each time until the number of partial areas increased by the two divisions reaches a predetermined number. A color image compression method characterized by repeatedly dividing an area and determining a representative color for the area.
前記カラー画像中の各画素について、色空間に変換し、変換された前記各画素の前記色空間での色値の分布を1つの部分領域とし、該部分領域内でユークリッド距離が最も大きい2色を代表色として前記部分領域を2分割し、
前記2分割された各部分領域の代表色は各部分領域の色値の平均値とし、前記部分領域の各画素に対応する色値と前記部分領域の色値の平均値とから、該部分領域の分散を計算し、分散の大きい部分領域を選択し、該選択された部分領域を2分割してそれぞれの代表色を決定し、該2分割により増加した後の全部分領域の数が所定数になるまで、毎回全部分領域を対象に、領域の分割と代表色の決定を繰り返すことを特徴とするカラー画像圧縮方法。A color image compression method for dividing a color space of a color image into a plurality of partial areas corresponding to representative colors and converting color values belonging to the partial areas into representative colors determined for the partial areas,
For each pixel in the color image, the color is converted into a color space, and the color value distribution of the converted pixel in the color space is defined as one partial region, and the two colors having the largest Euclidean distance in the partial region Divide the partial area into two with the representative color,
The representative color of each of the partial areas divided into two is the average value of the color values of the partial areas, and the partial area is obtained from the color value corresponding to each pixel of the partial area and the average value of the color values of the partial areas. Is calculated, a partial area having a large variance is selected, the selected partial area is divided into two, the respective representative colors are determined, and the number of all partial areas after increasing by the two divisions is a predetermined number. A color image compression method characterized by repeating division of a region and determination of a representative color for all partial regions each time.
カラー画像の色空間はRGB色空間であることを特徴とするカラー画像圧縮方法。In claim 1 or claim 2,
A color image compression method, wherein a color space of the color image is an RGB color space.
カラー画像の色空間はYIQ色空間又はYIの2次元色空間であることを特徴とするカラー画像圧縮方法。In claim 1 or claim 2,
A color image compression method, wherein a color space of a color image is a YIQ color space or a YI two-dimensional color space.
画素の色値の属する部分領域の代表色と該画素の色値との距離の評価値は画素の色値の属する部分領域の代表色と該画素の色値とのユークリッド距離であることを特徴とするカラー画像圧縮方法。In claim 1,
The evaluation value of the distance between the representative color of the partial area to which the pixel color value belongs and the color value of the pixel is the Euclidean distance between the representative color of the partial area to which the pixel color value belongs and the color value of the pixel. Color image compression method.
画素の色値の属する部分領域の代表色と該画素の色値との距離の評価値は画素の色値の属する部分領域の代表色と該画素の色値との街区画距離であることを特徴とするカラー画像圧縮方法。In claim 1,
The evaluation value of the distance between the representative color of the partial area to which the color value of the pixel belongs and the color value of the pixel is the city block distance between the representative color of the partial area to which the color value of the pixel belongs and the color value of the pixel. A characteristic color image compression method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP25178194A JP3674965B2 (en) | 1994-10-18 | 1994-10-18 | Color image compression method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP25178194A JP3674965B2 (en) | 1994-10-18 | 1994-10-18 | Color image compression method |
Publications (2)
Publication Number | Publication Date |
---|---|
JPH08115405A JPH08115405A (en) | 1996-05-07 |
JP3674965B2 true JP3674965B2 (en) | 2005-07-27 |
Family
ID=17227835
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP25178194A Expired - Fee Related JP3674965B2 (en) | 1994-10-18 | 1994-10-18 | Color image compression method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP3674965B2 (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP4831233B2 (en) * | 2007-06-28 | 2011-12-07 | コニカミノルタビジネステクノロジーズ株式会社 | Image processing method, image processing apparatus, image data compression apparatus, and computer program |
JP4978598B2 (en) * | 2008-09-17 | 2012-07-18 | コニカミノルタビジネステクノロジーズ株式会社 | Image processing method, image processing apparatus, and image processing program |
-
1994
- 1994-10-18 JP JP25178194A patent/JP3674965B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JPH08115405A (en) | 1996-05-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP2923648B2 (en) | Method and apparatus for generating color characteristics of an object | |
US5164717A (en) | Method and apparatus for the dithering of antialiased vectors | |
JPH05143709A (en) | Video effect device | |
US5201030A (en) | Method and apparatus for dithering graphic images | |
KR19980064843A (en) | Drafting and drafting methods | |
KR20070074590A (en) | Perspective transformation of two-dimensional images | |
US5264840A (en) | Method and apparatus for vector aligned dithering | |
US7050066B2 (en) | Image processing apparatus and image processing program | |
JP2947360B2 (en) | Method and apparatus for measuring image motion | |
US5621819A (en) | Multidimensional multi-valued color image compression and decompression method | |
JPH10214071A (en) | Video signal processing method | |
JP3674965B2 (en) | Color image compression method | |
JPH11231832A (en) | Moving vector detecting method, moving image display method and moving image display device | |
JPH04190466A (en) | Limited color representation device for color image | |
US20030063084A1 (en) | System and method for improving 3D data structure representations | |
US7127118B2 (en) | System and method for compressing image files while preserving visually significant aspects | |
CN102074004A (en) | Method and device for determining type of barrier of spatial entity | |
JPH07334648A (en) | Method and device for processing image | |
JP2973710B2 (en) | Limited color determination method and limited color determination device | |
JPH0814843B2 (en) | Color conversion method and color conversion device | |
CA2268595C (en) | Encoder, method thereof, and graphic processing apparatus | |
US20040091173A1 (en) | Method, apparatus and system for the spatial interpolation of color images and video sequences in real time | |
JPH0799586A (en) | Color conversion device | |
CN116778018A (en) | Nonlinear color mapping method of depth map | |
JP2775748B2 (en) | Method and apparatus for expressing limited color of color image |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20040430 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20040511 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20040712 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20040817 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20041013 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20050125 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20050310 |
|
A911 | Transfer of reconsideration by examiner before appeal (zenchi) |
Free format text: JAPANESE INTERMEDIATE CODE: A911 Effective date: 20050315 |
|
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: 20050412 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20050425 |
|
R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20080513 Year of fee payment: 3 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090513 Year of fee payment: 4 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090513 Year of fee payment: 4 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100513 Year of fee payment: 5 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100513 Year of fee payment: 5 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110513 Year of fee payment: 6 |
|
LAPS | Cancellation because of no payment of annual fees |