JP2973710B2 - Limited color determination method and limited color determination device - Google Patents

Limited color determination method and limited color determination device

Info

Publication number
JP2973710B2
JP2973710B2 JP4161445A JP16144592A JP2973710B2 JP 2973710 B2 JP2973710 B2 JP 2973710B2 JP 4161445 A JP4161445 A JP 4161445A JP 16144592 A JP16144592 A JP 16144592A JP 2973710 B2 JP2973710 B2 JP 2973710B2
Authority
JP
Japan
Prior art keywords
color
coordinate axis
frequency distribution
representative
image data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP4161445A
Other languages
Japanese (ja)
Other versions
JPH06124343A (en
Inventor
裕一 小林
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Toppan Inc
Original Assignee
Toppan Printing 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 Toppan Printing Co Ltd filed Critical Toppan Printing Co Ltd
Priority to JP4161445A priority Critical patent/JP2973710B2/en
Priority to US08/027,848 priority patent/US5608851A/en
Publication of JPH06124343A publication Critical patent/JPH06124343A/en
Application granted granted Critical
Publication of JP2973710B2 publication Critical patent/JP2973710B2/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)
  • Controls And Circuits For Display Device (AREA)

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、ディジタル化された自
然画像を、少数の限られた色でディスプレイ装置に表示
するに際して、少数に限定した代表色を用いて違和感の
無い画像を作成し、表示するための限定色決定方法及び
限定色決定装置に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method for producing a natural image using a limited number of representative colors when displaying a digitized natural image on a display device with a small number of limited colors. The present invention relates to a limited color determination method and a limited color determination device for displaying.

【0002】[0002]

【従来の技術】一般にカラーディスプレイ装置で用いる
カラー画像は、RGBの各色成分で表され、それぞれの
色成分に8ビットのメモリが割り当てられてデジタル化
される。従って、前記デジタル化されたカラー画像を表
示するフルカラーディスプレイでは、各画素に対して2
4ビット分の色、即ち224色を同時表示可能であり、自
然画像を違和感なく表示することが可能である。
2. Description of the Related Art Generally, a color image used in a color display device is represented by RGB color components, and each color component is digitized by allocating an 8-bit memory. Therefore, in a full-color display for displaying the digitized color image, two pixels are required for each pixel.
4 bits of color, that is, simultaneously capable of displaying 2 24 colors, it is possible to display a natural image without discomfort.

【0003】一方、CD−ROMやCD−I、CAD
(Computer Aided Design)、CAI(Computer Assist
ed Instruction)やグラフィックスの世界では、前記2
24色のうちの限定された数の色しか同時に表示できない
カラーディスプレイ装置を用いる場合が多く、このよう
な場合、画像メモリの画素当たりの容量が、通常8ビッ
ト以下にされているので、同時表示できる色の数は28
=256までである。そして、256色以下のような限
られた色数では、自然画像を劣化無く表示することが難
しいが、これを可能にしたいという要求は多い。また、
前記ディスプレイ装置等のデータ容量の関係から、自然
画像の色数を、自然画像の劣化が無いように減らして、
画像データのデータ量を減らしたいという要求も多い。
On the other hand, CD-ROM, CD-I, CAD
(Computer Aided Design), CAI (Computer Assist
ed Instruction) and in the world of graphics,
In many cases, a color display device capable of simultaneously displaying only a limited number of colors out of 24 colors is used. In such a case, the capacity per pixel of the image memory is usually set to 8 bits or less. The number of possible colors is 2 8
= 256. With a limited number of colors, such as 256 colors or less, it is difficult to display a natural image without deterioration, but there are many demands for making this possible. Also,
From the relationship of the data capacity of the display device and the like, the number of colors of the natural image is reduced so that the natural image does not deteriorate,
There are many requests to reduce the amount of image data.

【0004】このような目的のため、従来、多数の色か
ら少数の表示色を選択して表示するカラーマップディス
プレイのために、自然画像を視覚的な劣化を抑制しなが
ら限られた色数で表示する方法が知られている。
For such a purpose, conventionally, for a color map display for selecting and displaying a small number of display colors from a large number of colors, a natural image is displayed in a limited number of colors while suppressing visual deterioration. Methods of displaying are known.

【0005】上記方法としては、例えば、色をR,G,
Bの3原色の各値で表した場合に、R,G,Bの各値を
座標とする3次元の直交座標系で表される空間を色空間
とし、この色空間において、カラー画像データに含まれ
ている各画素の色の分布を解析し、カラー画像データに
含まれる色が多く分布している前記色空間内の色領域か
らは多く、少ない分布の色領域からは少なく表示色を選
び、これらの表示色をカラーマップに登録し、カラー画
像データの各画素の色に最も近い表示色を代表色として
各画素に割り当て、カラーマップに代表色として登録さ
れた色コードを画像メモリの各画素の位置に書き込むこ
とによって近似表示を行なうものがある。上記のように
代表色を選択する方法の一つとして大津の判別分析(信
学論(D).J63−D,4,pp.349−356.
昭和55−4.)を用いたものがある。
As the above method, for example, the colors R, G,
When represented by the values of the three primary colors of B, a space represented by a three-dimensional rectangular coordinate system having coordinates of the values of R, G, and B is defined as a color space. The color distribution of each pixel included is analyzed, and a large number of color regions in the color space where many colors included in the color image data are distributed, and a small number of display colors are selected from color regions with a small distribution. These display colors are registered in the color map, the display color closest to the color of each pixel of the color image data is assigned to each pixel as a representative color, and the color code registered as the representative color in the color map is stored in each image memory. In some cases, approximate display is performed by writing data at pixel positions. As one of the methods for selecting the representative colors as described above, Otsu's discriminant analysis (IEICE (D). J63-D, 4, pp. 349-356.
Showa 55-4. ).

【0006】また、色空間には、RGBの3原色の組合
せにより色を表現するものだけではなく、人間の色差を
考慮したL***色空間、L***色空間(CIE
(国際照明委員会)で勧告されたもの)などの均等色空
間があり、これらの色空間を用いて前記判別分析法を行
なうこともできる。
The color space is not only a color space expressed by a combination of three primary colors of RGB, but also an L * u * v * color space and an L * a * b * color space in consideration of human color differences. CIE
(Recommended by the International Commission on Illumination) and the like, and the discriminant analysis method can be performed using these color spaces.

【0007】また、人の視覚特性を利用し、さらにディ
ザ法を適応した方法(画像電子学会誌 第18巻 第5
号(1989)p、293〜301;田島、池田)が提
案されているが、この方法では100色以下の少ない色
数で限定色表示する場合に対しては考慮されていない。
Further, a method utilizing the visual characteristics of humans and further applying the dither method (Journal of the Institute of Image Electronics Engineers of Japan, vol. 18, no. 5,
No. (1989) p. 293-301; Tajima, Ikeda), but this method does not consider the case of displaying limited colors with a small number of colors of 100 or less.

【0008】[0008]

【発明が解決しようとする課題】ところで、前記判別分
析法は、単に色の分布により表示色を決めるものなの
で、前記RGB色空間において、判別分析法により表示
色を決めて作成された画像が、人間の目にとって、自然
画像を違和感なく再現したものとはならなかった。例え
ば、画像データの色の変化の緩やかな部分に、少数の代
表色が割り当てられた場合に、偽輪郭が発生することが
あり、特に、人間の視覚特性が輝度に対して敏感なこと
によって、輝度の階調の変化が少数の代表色により表現
された場合に偽輪郭が際だってしまうという問題があっ
た。
Since the discriminant analysis method simply determines a display color based on a color distribution, an image created by determining a display color by the discriminant analysis method in the RGB color space is: For the human eye, natural images were not reproduced without any discomfort. For example, when a small number of representative colors are assigned to a portion where the color change of the image data is gradual, false contours may occur.In particular, since the human visual characteristics are sensitive to luminance, There has been a problem that when the change in the luminance gradation is represented by a small number of representative colors, false contours are noticeable.

【0009】また、人間の色差を考慮したL***
空間やL***色空間において判別分析法を用いて
も、人間の目から見た場合に、必ずしも自然画像に近似
したものとはならなかった。また、従来の手法として
は、前記判別分析法等のように、原画像の状態、例えば
色の分布が統計的に異なるにも拘わらず、限られた表示
色を選択して画像を作成してしまう非適応的方法と、原
画像の色分布等の統計的性質に適するように限定色を選
択する適応的方法がある。
Further, even if a discriminant analysis method is used in an L * u * v * color space or an L * a * b * color space in consideration of human color differences, a natural image is not always obtained when viewed from human eyes. It was not an approximation. Further, as a conventional method, as in the above-described discriminant analysis method, an image is created by selecting a limited number of display colors despite the fact that the state of the original image, for example, the color distribution is statistically different. There are two types of non-adaptive methods, and an adaptive method of selecting limited colors so as to be suitable for statistical properties such as the color distribution of the original image.

【0010】前記非適応的方法では、前述の判別分析法
の場合のように必ずしも人間の目から見た場合に原画像
と近似された画像とはならず、画質に問題がある。ま
た、適応的方法では、画像データ毎の色分布等を調べ、
色分布の状態に応じて統計的な処理の仕方を変えること
が必要となり、一般的に処理が煩雑になると共に処理時
間が長い。そして、一般的な画像データに対し、ある程
度の画質を保てる非適応的方法は、画像データを特に選
ばず、処理時間が早いという利点から、適応的方法より
も発展してきたが、画像データとなる自然画像は、その
内容によって色分布等の統計的性質が非常に異なるもの
もあり、画質の点からは依然適応的処理の優位は変わっ
ていない。
In the non-adaptive method, an image similar to the original image is not necessarily obtained when viewed from human eyes as in the case of the above-described discriminant analysis method, and there is a problem in image quality. In addition, in the adaptive method, the color distribution and the like of each image data are checked,
It is necessary to change the method of statistical processing according to the state of the color distribution, so that the processing is generally complicated and the processing time is long. The non-adaptive method that can maintain a certain level of image quality for general image data has been developed more than the adaptive method because of the advantage that the image data is not particularly selected and the processing time is short. Some natural images have very different statistical properties such as color distribution depending on the content, and the superiority of adaptive processing has not changed in terms of image quality.

【0011】本発明は、上記課題に鑑みてなされたもの
であり、人間の視覚が特に輝度の変化に敏感であるとい
う点に着目し、より忠実に原画像の再生を可能とすると
共に、前記非適応的方法と適応的方法との問題点を解決
することができる限定色決定方法を提供することを目的
とするものである。
The present invention has been made in view of the above-mentioned problems, and has been made in view of the fact that human vision is particularly sensitive to a change in luminance. It is an object of the present invention to provide a limited color determination method that can solve the problems between the non-adaptive method and the adaptive method.

【0012】[0012]

【課題を解決するための手段】本発明の限定色決定方法
は、均等色空間において、輝度成分を示す座標軸におけ
る階級数と、色度成分を示す座標軸における階級数とが
異なるように、各座標軸の階級数を設定し、前記各座標
軸の該設定された階級で3次元的に分割してなるクラス
タ毎に、前記均等色空間の座標系で表されるカラー画像
データの度数分布を求め、前記各クラスタ毎の度数分布
に対して判別分析を行うことにより前記均等色空間を分
割し、該分割した色領域の各色成分に基づいて各色領域
における代表色を求め、該求められた代表色により、前
記カラー画像データを近似することを前記課題の解決手
段とした。
According to the present invention, a method for determining a limited color according to the present invention is arranged such that, in a uniform color space, a class number on a coordinate axis indicating a luminance component is different from a class number on a coordinate axis indicating a chromaticity component. set the number of class, the coordinates
A class that is three-dimensionally divided by the set class of axis
Color image represented by the coordinate system of the uniform color space for each data
Obtains a frequency distribution of data, divided the uniform color space by performing determine by analysis to the frequency distribution of each of said cluster
Each color area based on each color component of the divided color area.
The representative means for solving the above-mentioned problem is to obtain the representative color in the above and to approximate the color image data with the obtained representative color.

【0013】また、本発明の限定色決定方法は、前記均
等色空間において前記度数分布を求めるに際して、輝度
成分を示す座標軸の階級数を、色度成分を示す座標軸の
階級数より多くして、輝度を強調した代表色を選択する
ことを前記課題の解決手段とした。
In the method for determining a limited color according to the present invention, when the frequency distribution is obtained in the uniform color space, the rank of the coordinate axis indicating the luminance component is set to be larger than the rank of the coordinate axis indicating the chromaticity component. The solution of the above-described problem is to select a representative color in which the luminance is enhanced.

【0014】また、本発明の限定色決定方法は、前記均
等色空間において前記度数分布を求めるに際して、色度
成分を示す座標軸の階級数を、輝度成分を示す座標軸の
階級数より多くして、色度を強調した代表色を選択する
ことを前記課題の解決手段とした。また、本発明の限定
色決定方法は、前記均等色空間において各座標軸毎に画
素の分布の分散を求め、該求めた各座標軸間の分散の比
率に応じて、前記色度成分を示す座標軸における階級数
に対する、前記輝度成分を示す座標軸における階級数の
比率を決定することを前記課題の解決手段とした。
Further, in the method for determining a limited color according to the present invention, when obtaining the frequency distribution in the uniform color space, the rank of the coordinate axis indicating the chromaticity component is set to be larger than the rank of the coordinate axis indicating the luminance component. The solution to the above-mentioned problem is to select a representative color in which chromaticity is emphasized. Also, limitations of the present invention
The color determination method is based on the image for each coordinate axis in the uniform color space.
The variance of the elementary distribution is obtained, and the ratio of the obtained variance between the coordinate axes.
The number of classes in the coordinate axis indicating the chromaticity component according to the ratio
Of the class number on the coordinate axis indicating the luminance component
Determining the ratio is a means for solving the above-mentioned problem.

【0015】さらに、本発明の限定色決定方法は、前記
均等色空間で表される画像データの各画素値の度数分布
に対して判別分析を行なうことにより代表色を求め、求
められた代表色について、再び均等色空間における度数
分布を求め、この度数分布に対して判別分析を行なうこ
とによりさらに少数の代表色を求め、これを繰り返すこ
とにより段階的に代表色を減らして行くに際して、代表
色を減らす各段階もしくはいずれかの段階で度数分布を
求めるのに、輝度成分を示す座標軸における階級数と、
色度成分を示す座標軸における階級数との比率を変更す
ることを前記課題の解決手段とした。
Further, in the limited color determination method of the present invention, a representative color is obtained by performing a discriminant analysis on the frequency distribution of each pixel value of the image data represented in the uniform color space, and the obtained representative color is obtained. The frequency distribution in the uniform color space is obtained again, a smaller number of representative colors are obtained by performing discriminant analysis on this frequency distribution, and the representative colors are gradually reduced by repeating this process. To determine the frequency distribution at each stage or at any stage to reduce the number of classes in the coordinate axis showing the luminance component,
Changing the ratio with the class number on the coordinate axis indicating the chromaticity component is a means for solving the above problem.

【0016】そして、本発明の限定色決定方法は、前記
カラー画像データの各画素の3原色の値を表すデジタル
データの下位ビットを読み取り、該下位ビットに同じ値
が出現する周期性を求め、一方前記カラー画像データを
均等色空間の座標系で表した各画素値に対して、該均等
色空間での輝度成分を示す座標軸と色度成分を示す座標
軸における度数分布を求め、該度数分布を前記周期性の
データに基づいて重み付け補正し、該重み付け補正した
度数分布に対して更に輝度を示す座標軸における階級数
と色度を示す座標軸における階級数を異なるものとして
度数分布を補正し、判別分析を行なうことを前記課題の
解決手段とした。
The limited color determination method of the present invention reads the lower bits of digital data representing the values of the three primary colors of each pixel of the color image data, and determines the periodicity at which the same value appears in the lower bits. On the other hand, for each pixel value of the color image data expressed in a coordinate system of a uniform color space, a frequency distribution on a coordinate axis indicating a luminance component and a coordinate axis indicating a chromaticity component in the uniform color space is obtained, and the frequency distribution is calculated. The weight distribution is corrected based on the periodicity data, and the frequency distribution is corrected by differentiating the class distribution on the coordinate axis indicating luminance and the class number on the coordinate axis indicating chromaticity with respect to the frequency distribution with the weight correction, and discriminant analysis. Is the means for solving the above problem.

【0017】また、本発明の限定色決定装置は、均等色
空間の座標系で表されるカラー画像データを、限定され
た代表色で近似する限定色決定装置において、前記均等
色空間の、輝度成分を示す座標軸における階級数と、色
度成分を示す座標軸における階級数とが異なるように、
各座標軸の階級数を設定する階級数設定手段と、前記各
座標軸の該設定された階級で3次元的に分割してなるク
ラスタ毎に、前記カラー画像データの度数分布を求める
度数分布演算手段と、前記各クラスタ毎の度数分布に対
して判別分析を行うことにより前記均等色空間を分割す
る色領域分割手段と、前記分割した色領域の各色成分に
基づいて各色領域における代表色を決定する代表色決定
手段とを具備してなることを前記課題の解決手段とし
た。
The limited color determining apparatus according to the present invention is a limited color determining apparatus which approximates color image data represented by a coordinate system of a uniform color space with a limited representative color. So that the rank on the coordinate axis indicating the component and the rank on the coordinate axis indicating the chromaticity component are different,
A class number setting means for setting the number of classes of each coordinate axis, wherein each of
A three-dimensional division based on the set class of coordinate axes
Frequency distribution calculating means for obtaining a frequency distribution of the color image data for each raster; and performing a discriminant analysis on the frequency distribution of each cluster to divide the uniform color space.
Color region dividing means, and each color component of the divided color region
And a representative color determining means for determining a representative color in each color area based on the color information .

【0018】また、本発明の限定色決定装置は、均等色
空間の座標系で表されるカラー画像データの各画素値の
度数分布に対して判別分析を行なうことにより代表色を
求め、前記カラー画像データを限定された代表色で近似
するものであり、前記カラー画像データの3原色を表す
デジタルデータに対して下位ビットに同じ値が出現する
周期性係数を求める周期性演算手段と、前記均等色空間
における輝度成分を示す座標軸と色度成分を示す座標軸
に対する前記カラー画像データの各画素値の度数部分を
求める度数分布演算手段と、前記度数分布演算手段によ
り求められた度数分布を前記周期性係数によって重み付
け補正する度数分布補正手段と、前記重み付け補正され
た度数分布に対して、輝度成分を示す座標軸の階級数と
色度成分を示す座標軸の階級数を異なるものとして度数
分布を補正し、判別分析を行なうことにより代表色を決
定する代表色決定手段とを具備してなることを前記課題
の解決手段とした。
Further, the limited color determining apparatus of the present invention obtains a representative color by performing a discriminant analysis on a frequency distribution of each pixel value of color image data represented by a coordinate system of a uniform color space, thereby obtaining the representative color. A periodicity calculating means for approximating the image data with limited representative colors, and a periodicity calculating means for obtaining a periodicity coefficient in which the same value appears in lower bits with respect to digital data representing three primary colors of the color image data; A frequency distribution calculating means for calculating a frequency part of each pixel value of the color image data with respect to a coordinate axis indicating a luminance component and a coordinate axis indicating a chromaticity component in a color space; and the frequency distribution calculated by the frequency distribution calculating means is defined by the periodicity. Frequency distribution correction means for performing weight correction using a coefficient; and a coordinate system indicating a class number of a coordinate axis indicating a luminance component and a chromaticity component with respect to the weight corrected frequency distribution. The frequency distribution by correcting the number of classes of the shaft as a different, that is formed by and a representative color determining means for determining a representative color by performing a discriminant analysis was solutions of the problems.

【0019】[0019]

【作用】前記請求項1記載の構成によれば、均等色空間
上に変換された画像データについて、各座標軸毎の画素
の度数分布に対して判別分析を行なうことにより均等色
空間を分割して各色領域における代表色を求める場合
に、輝度を示す座標軸の階級数と、色度を示す座標軸の
階級数を異なるものとすることにより、代表色を選択し
た際に輝度もしくは色度を強調したものとすることがで
きる。すなわち、画像データの色調や、人間の視覚が輝
度に敏感であること等を考慮して、選択された代表色を
輝度側に変化の多いものとしたり、色度側に変化の多い
ものとしたりすることが可能となる。
According to the configuration of the first aspect, the image data converted into the uniform color space is subjected to the discriminant analysis with respect to the frequency distribution of the pixels for each coordinate axis, so that the uniform color is obtained.
When dividing a space to obtain a representative color in each color region, by making the rank of the coordinate axis indicating luminance and the rank of the coordinate axis indicating chromaticity different, the luminance or the color when selecting the representative color is determined. The degree can be emphasized. That is, in consideration of the color tone of the image data and the fact that human vision is sensitive to luminance, the selected representative color may be set to have a large change on the luminance side or may have a large change on the chromaticity side. It is possible to do.

【0020】また、請求項2記載の構成によれば、輝度
に対して敏感な人間の視覚特性に合わせて輝度が強調さ
れた代表色が選択されることになり、人間の視覚に対応
した代表色を選択することができる。例えば、画像デー
タの色が緩やかに変化する部分に、少数の代表色しか選
択されなかった場合に、偽輪郭が発生することになり、
特に人間の視覚が輝度に敏感であることにより、前記少
数の代表色として同じような輝度の色が選択された場合
に、偽輪郭が強調されることになるが、輝度を強調した
代表色、すなわち、輝度の変化に富んだ代表色を選択す
ることにより、偽輪郭が強調されるのを防止することが
できる。
According to the second aspect of the present invention, a representative color whose luminance is emphasized is selected in accordance with a human visual characteristic which is sensitive to luminance, and a representative color corresponding to human vision is selected. Color can be selected. For example, when only a small number of representative colors are selected in a portion where the color of the image data changes slowly, a false contour occurs,
In particular, since human vision is sensitive to luminance, when a color with similar luminance is selected as the small number of representative colors, false contours will be emphasized. That is, by selecting a representative color rich in change in luminance, it is possible to prevent false contours from being emphasized.

【0021】なお、上記のように偽輪郭が強調され易い
画像とは、その色分布が同じような色相に集中してい
て、さまざまな輝度成分を持ったものであり、このよう
な画像データにおいて特に輝度を強調した代表色を選択
することにより、偽輪郭を防止することができる。
An image in which false contours are easily emphasized as described above is one in which the color distribution is concentrated on the same hue and has various luminance components. In particular, false contours can be prevented by selecting a representative color whose luminance is emphasized.

【0022】また、請求項3記載の構成によれば、画像
データにおいて、その色分布が様々な色相に分散してい
て、比較的少数の輝度成分に集中している場合に、人間
の視覚が輝度に敏感であっても、偽輪郭が強調されるよ
うなことがないので、色度を強調した代表色、すなわ
ち、様々な色相の代表色を選択できるようにすること
で、代表色により表される画像を元の画像データに近い
ものとすることができる。
According to the third aspect of the present invention, when the color distribution of image data is dispersed in various hues and concentrated on a relatively small number of luminance components, human vision is reduced. Even if it is sensitive to luminance, false contours will not be emphasized.Therefore, a representative color with enhanced chromaticity, that is, a representative color of various hues can be selected, so that a representative color can be displayed. The resulting image can be close to the original image data.

【0023】また、請求項4記載の構成によれば、判別
分析により代表色を選択する際に、一度に必要とする代
表色まで色を減少させるのではなく、例えば、元の画像
データの均等色空間における度数分布を求め、判別分析
により代表色を一万色にし、この代表色の均等色空間に
おける度数分布を求め、判別分析により代表色を千色に
するというように、段階的に減らすようにする。そし
て、各段階で、元の画像データもしくは各段階の代表色
の色分布に対応して、輝度もしくは色度を強調して判別
分析を行なうことにより、元の画像データの色分布等の
統計的性質に適した代表色を選択することが可能とな
る。
According to the fourth aspect of the present invention, when a representative color is selected by discriminant analysis, the color is not reduced to the required representative color at a time, but, for example, the equalization of the original image data is performed. The frequency distribution in the color space is determined, the representative color is determined to be 10,000 colors by discriminant analysis, the frequency distribution in the uniform color space of the representative color is determined, and the representative color is reduced to 1000 colors by discriminant analysis. To do. At each stage, discriminant analysis is performed by emphasizing the luminance or chromaticity corresponding to the color distribution of the original image data or the representative color of each stage, thereby providing a statistical analysis of the color distribution of the original image data. It is possible to select a representative color suitable for the property.

【0024】すなわち、判別分析による代表色の選択と
いう非適応的方法を繰り返すだけの処理で、煩雑な処理
を必要とする適応的方法と同様に、画像データの色分布
等の統計的性質に対応した代表色を選択することが可能
となる。
In other words, the process simply repeats the non-adaptive method of selecting a representative color by discriminant analysis, and corresponds to the statistical properties such as the color distribution of image data in the same manner as the adaptive method requiring complicated processing. The selected representative color can be selected.

【0025】さらに、請求項5記載の構成によれば、画
像データ中の徐々に色が変化する部分では、連続して配
置された画素の色のデータを順番に読み取っていった場
合に、下位ビットの値が増加しては上位ビットへの繰り
上げ行なわれ、下位ビットの値が一気に減少する一連の
サイクルもしくは逆方向のサイクルが繰り返されること
になる。
Further, according to the configuration of the fifth aspect, in a portion where the color gradually changes in the image data, when the color data of the pixels arranged continuously is read in order, the lower order is set. When the value of the bit increases, it is carried up to the upper bit, and a series of cycles or the reverse cycle in which the value of the lower bit decreases at a stretch is repeated.

【0026】従って、画像データ中の色の変化の緩やか
な部分に、連続して配置された各画素は、前記下位ビッ
トの値に周期性があることになり、連続して配置された
画素の周期性を調べることにより、画像データの色が緩
やかに変化する部分及びその部分の色を特定することが
でき、かつ、その周期性の強弱から緩やかな色の変化の
度合いを推定することができる。
Therefore, each pixel successively arranged in a portion where the color change in the image data is gradual has a periodicity in the value of the lower bit, and the pixels arranged consecutively have a lower value. By examining the periodicity, it is possible to specify a portion where the color of the image data changes gradually and the color of that portion, and it is possible to estimate the degree of the gradual color change from the strength of the periodicity. .

【0027】そこで、画像データ中の色の出現頻度を示
すヒストグラムを作成して判別分析を行なう場合に、前
述のように画像データにおいて、色の変化の緩やかな部
分を特定し、下位ビットの周期性を有する色変化の緩や
かな部分の色について、その周期性の強弱により重み付
け係数を決め、この重み付け係数を用いて前記ヒストグ
ラムに重み付けして判別分析することにより、色の変化
の緩やかな部分を表示するための代表色の数を増やすこ
とができ、色の変化の緩やかな部分を僅かな代表色で表
示することにより発生する偽輪郭が抑制される。
Therefore, when performing a discriminant analysis by creating a histogram indicating the frequency of appearance of colors in the image data, a portion of the image data having a gradual change in color is specified and the period of the lower bits is determined. For the color of the gradual change in color having the characteristic, a weighting coefficient is determined based on the strength of the periodicity, and the histogram is weighted using the weighting coefficient to perform the discriminant analysis. The number of representative colors to be displayed can be increased, and a false contour generated by displaying a portion having a gradual change in color with a small representative color is suppressed.

【0028】また、請求項6記載の限定色決定装置によ
れば、階級数設定手段により、均等色空間における、輝
度成分を示す座標軸の階級数と、色度成分を示す階級数
とが異なるように設定され、度数分布演算手段により、
上記各座標軸のその設定された階級で3次元的に分割し
てなるクラスタ毎に、前記カラー画像データの度数分布
が求められる。そして、色領域分割手段によって求めら
れた度数分布に対して判別分析を行うことにより均等色
空間が分割され、この分割した色領域の各色成分に基づ
いて、代表色決定手段により各色領域における代表色が
決定されるので、画像データの色調や人間の視覚が輝度
に敏感であること等を考慮して、選択された代表色を輝
度側に変化の多いものとしたり、色度側に変化の多いも
のとしたりすることが可能となる。
According to the limited color determining apparatus of the present invention, the rank setting means sets the rank of the coordinate axis indicating the luminance component and the rank of the chromaticity component in the uniform color space to be different. Set by the frequency distribution calculation means,
Divide three-dimensionally by the set class of each coordinate axis
Frequency distribution of the color image data for each cluster
Is required. Then, by the color area dividing means,
Uniform color by performing discriminant analysis on the selected frequency distribution
The space is divided and based on each color component of the divided color area.
Since the representative color in each color area is determined by the representative color determining means, the selected representative color is changed to the luminance side in consideration of the color tone of the image data and the sensitivity of human vision to luminance. It is possible to increase the number of colors or change the number of colors on the chromaticity side.

【0029】また、請求項7記載の限定色決定装置
れば、周期性演算手段により色の変化の穏やかさを示す
周期性係数を求め、度数分布補正手段が度数分布演算手
段によって求められた度数分布を、前記周期性係数によ
り重み付け補正してから、代表色決定手段が、判別分析
を行なうことになるので、色の変化の緩やかな部分から
多くの代表色が選択されることになる。また、度数分布
補正手段は、輝度成分を示す座標軸の階級数と色度成分
を示す座標軸の階級数を異なるものとして度数分布を補
正するので、画像データの色調と色の変化の緩やかさを
考慮した代表色が選択されることになる。さらに、請求
項8記載の限定色決定方法によれば、請求項1記載の限
定色決定方法において、均等色空間において各座標軸毎
に画素の分布の分散が求められ、この求めた各座標軸間
の分散の比率に応じて、色度成分を示す座標軸における
階級数に対する輝度成分を示す座標軸における階級数の
比率が決定される。
Further, according to the limited color determining apparatus of the seventh aspect, the periodicity calculating means obtains a periodicity coefficient indicating the gentleness of the color change, and the frequency distribution correcting means calculates the frequency distribution. After the frequency distribution obtained by the means is weighted and corrected by the periodicity coefficient, the representative color determining means performs the discriminant analysis, so that many representative colors are selected from the portion where the color changes gradually. Will be. In addition, the frequency distribution correction unit corrects the frequency distribution by making the rank of the coordinate axis indicating the luminance component and the rank of the coordinate axis indicating the chromaticity component different, so that the gradual change of the color tone and color of the image data is considered. The selected representative color is selected. In addition, billing
According to the limited color determination method described in claim 8, the limited color is determined according to claim 1.
In the constant color determination method, for each coordinate axis in a uniform color space
The variance of the pixel distribution is calculated in
In the coordinate axis indicating the chromaticity component according to the variance ratio of
Of the class number on the coordinate axis indicating the luminance component for the class number
The ratio is determined.

【0030】[0030]

【実施例】以下に、本発明の一実施例を図面を参照して
説明する。図1は、本実施例の限定色決定装置の概略図
を示すものであり、図2ないし図8は、本実施例の限定
色決定方法を説明するための図面である。以下に図1を
用いて、本実施例の限定色決定装置について説明する。
An embodiment of the present invention will be described below with reference to the drawings. FIG. 1 is a schematic diagram of a limited color determining apparatus according to the present embodiment, and FIGS. 2 to 8 are diagrams for explaining a limited color determining method according to the present embodiment. Hereinafter, the limited color determining apparatus of the present embodiment will be described with reference to FIG.

【0031】上記限定色決定装置は、画像データを格納
する画像記憶手段1と、前記画像データの下位3ビット
を格納する下位3ビット記憶手段2と、前記下位3ビッ
トの画像データにおいて、各画素からその周囲の画素の
下位3ビットの値を放射線方向に沿って読み取り、読み
取られた画素の下位3ビットの周期性を求め、その周期
性を正規化する周期性演算手段3と、前記周期性演算手
段3によって正規化された周期性を係数として記憶する
周期性係数記憶手段4と、RGBの各値からなる前記画
像データを、L***空間における値に変換する色変
換手段5と、L***空間を、L*,a*,b*の各座標
軸において各画素の度数分布を求める際の階級数で多数
のクラスタに細分化し、これらクラスタにクラスタ番号
を付け、L***空間の値に変換された画素の値を、
その画素を含むクラスタのクラスタ番号に置き換えて記
憶するクラスタ画像記憶手段6と、各クラスタ毎の画素
の度数分布を前記L***空間の各座標軸毎に求める
ヒストグラム演算手段7と、求められたヒストグラムを
記憶するヒストグラム記憶手段8と、前記ヒストグラム
から平均色・分散を求める平均・分散演算手段9と、求
められた平均・分散を記憶する平均・分散記憶手段10
と、第一主軸を求める第一主軸演算手段11と、求めら
れた第一主軸を記憶する第一主軸記憶手段12と、重み
付き分散を求める重み付き分散演算手段13と、判別分
析により分割閾値を求める分割閾値決定手段14と、求
められた分割閾値を記憶する分割閾値記憶手段15と、
前記重み付き分散及び第一主軸に従って色領域を分割閾
値により分割する色領域分割手段16と、分割できる色
領域がなくなるか、分割された色領域数が既定の表示色
数に到達するまで、前記各手段による処理を繰り返して
行なうように制御する分割制御手段17と、各色領域に
分割する前にL***空間の各座標軸に対する分散の
比率に応じて輝度成分L*を示す座標軸における階級数
を、色度成分a**を示す座標軸における階級数に対し
て何倍(1/8倍〜32倍)にするかを指定する強調係
数指定手段18と、この強調係数指定手段18によって
指定された倍率(強調係数)により各座標軸の階級数を
求める強調係数演算手段19と、強調係数演算手段19
により求められた各座標軸の階級数を記憶する強調係数
記憶手段20と、前記周期性係数記憶手段4から読み出
した周期性係数により、ヒストグラム記憶手段8から読
みだした前記ヒストグラムを重み付け補正し、かつ、ヒ
ストグラムの階級数を前記強調係数記憶手段20に記憶
された階級数に変更してヒストグラムを書き換え、書き
換えられたヒストグラムをヒストグラム記憶手段に記憶
させるヒストグラム更新手段21と、上記各手段2〜2
1の動作を行なって得られる限定色を平均・分散記憶手
段から読み出し、色変換手段5の逆変換を行なう逆色変
換手段22と、限定色で各画素の色を置き換える代表色
割当手段23と、前記限定色を色空間上での距離によっ
てソートし、代表色をカラーマップ30aに登録する限
定色カラーパレット手段24と、前記代表色に置き換え
られた画像データが近似表示された画面上で、部分的な
色修正を可能とする色修正手段25と、上記各手段2〜
21の動作を行なって得られる限定色に対し、さらに上
記各手段2〜21の動作を反復して行なうことを制御す
る反復制御手段26とを主体として構成されている。
The above-described limited color determining apparatus includes an image storage unit 1 for storing image data, a lower 3 bit storage unit 2 for storing lower 3 bits of the image data, and each pixel in the lower 3 bits of image data. And the periodicity calculating means 3 for reading the values of the lower 3 bits of the surrounding pixels along the radiation direction, determining the periodicity of the lower 3 bits of the read pixels, and normalizing the periodicity. A periodicity coefficient storage means 4 for storing the periodicity normalized by the arithmetic means 3 as a coefficient; and a color conversion means 5 for converting the image data composed of each value of RGB into a value in L * a * b * space. And the L * a * b * space is subdivided into a number of clusters based on the number of classes used to determine the frequency distribution of each pixel on each of the L * , a * , and b * coordinate axes, and these clusters are assigned cluster numbers. L The value of the pixel converted to a value in the * a * b * space is
A cluster image storage unit 6 for storing the cluster numbers of the clusters including the pixel in place of the cluster number; a histogram calculation unit 7 for obtaining the frequency distribution of the pixel for each cluster for each coordinate axis in the L * a * b * space; Histogram storing means 8 for storing the obtained histogram, average and variance calculating means 9 for obtaining the average color and variance from the histogram, and average and variance storing means 10 for storing the obtained average and variance.
A first spindle calculating means 11 for obtaining a first spindle, a first spindle storing means 12 for storing the obtained first spindle, a weighted variance calculating means 13 for obtaining a weighted variance, and a division threshold value by discriminant analysis. , A division threshold storage unit 15 for storing the obtained division threshold,
A color region dividing unit 16 that divides a color region by a division threshold according to the weighted variance and the first principal axis, and until the color region that can be divided disappears or the number of divided color regions reaches a predetermined number of display colors, Division control means 17 for controlling the processing by each means repeatedly; and a coordinate axis indicating a luminance component L * according to a ratio of dispersion to each coordinate axis in L * a * b * space before dividing into each color area. Emphasis coefficient designating means 18 for designating how many times (1/8 to 32 times) the class number is on the coordinate axis indicating the chromaticity components a * b * ; Coefficient calculating means 19 for calculating the rank of each coordinate axis by the magnification (emphasis coefficient) designated by
Weighting the histogram read from the histogram storage means 8 by the emphasis coefficient storage means 20 for storing the rank of each coordinate axis obtained by the above, and the periodicity coefficient read from the periodicity coefficient storage means 4, and A histogram updating means 21 for changing the class number of the histogram to the class number stored in the emphasis coefficient storage means 20 and rewriting the histogram, and storing the rewritten histogram in the histogram storage means;
The inverse color conversion means 22 for reading out the limited color obtained by performing the operation 1 from the averaging / dispersion storage means and performing the inverse conversion of the color conversion means 5 and the representative color assigning means 23 for replacing the color of each pixel with the limited color. A limited color pallet means 24 for sorting the limited colors by the distance in the color space and registering the representative colors in the color map 30a; and a screen on which the image data replaced with the representative colors is approximately displayed, A color correcting means 25 for enabling a partial color correction;
The repetition control means 26 for controlling the repetition of the operations of the means 2 to 21 for the limited color obtained by performing the operation 21 is mainly constituted.

【0032】画像記憶手段1は、画像メモリ10aを有
し、画像データの各画素の(R,G,B)値(各色成分
が8ビットずつ)が格納されている。下位3ビット記憶
手段2は、画像記憶手段1に格納されている画像データ
の各画素の(R,G,B)値の下位3ビットが格納され
ている。
The image storage means 1 has an image memory 10a and stores (R, G, B) values (each color component is 8 bits) of each pixel of the image data. The lower 3 bits storage unit 2 stores the lower 3 bits of the (R, G, B) value of each pixel of the image data stored in the image storage unit 1.

【0033】周期性演算手段3は、下位3ビット記憶手
段2から各画素の下位3ビットのデータを読みだし、画
像上で、各画素の周囲に鉛直、水平、左斜め、右斜めの
放射状の方向に連続して配置された画素において、下位
3ビットに4画素以下の周期で同じ値が現われる回数を
計測し、これにより後述する周期値を各画素毎に求め
る。また、前記周期値の最大値を1としたときの割合を
各画素毎に周期性係数として求める。
The periodicity calculating means 3 reads out the lower 3 bits of data of each pixel from the lower 3 bits storage means 2 and, on the image, surrounds each pixel in a vertical, horizontal, left diagonal, right diagonal radial manner. In the pixels arranged continuously in the direction, the number of times that the same value appears in the lower 3 bits in a cycle of 4 pixels or less is measured, and a cycle value described later is obtained for each pixel. Further, a ratio when the maximum value of the periodic value is set to 1 is obtained as a periodicity coefficient for each pixel.

【0034】周期性係数記憶手段4は、各画素毎の周期
性係数を画素と同様の配列として記憶する。色変換手段
5は、画像データの各画素のRGBの値をL***
間の座標に変換する。クラスタ画像記憶手段6は、前記
***空間を各座標の階級によってクラスタに細分
化し、各クラスタに含まれる画素の値をクラスタ番号に
置き換えて記憶する。ヒストグラム演算手段7は、各ク
ラスタに属する各画素の度数分布を求めヒストグラムを
作成し、ヒストグラム記憶手段8に記憶させる。
The periodicity coefficient storage means 4 stores the periodicity coefficient for each pixel as an array similar to the pixels. The color conversion means 5 converts the RGB values of each pixel of the image data into coordinates in L * a * b * space. The cluster image storage means 6 divides the L * a * b * space into clusters according to the rank of each coordinate, and stores the values of the pixels included in each cluster by replacing them with cluster numbers. The histogram calculation unit 7 obtains a frequency distribution of each pixel belonging to each cluster, creates a histogram, and stores the histogram in the histogram storage unit 8.

【0035】平均・分散演算手段9は、L***空間
もしくはL***空間を閾値により分割した色領域に
おいて、各座標軸毎に、画素の分布の平均及び分散を求
める。第一主軸演算手段11は、L***空間もしく
はL***空間を閾値により分割した色領域におい
て、平均・分散記憶手段10から読みだした前記分散の
最大の座標軸を求め第一主軸とする。第一主軸記憶手段
12には、求められた第一主軸が格納される。
The average / dispersion calculating means 9 finds the average and the variance of the pixel distribution for each coordinate axis in the L * a * b * space or the color region obtained by dividing the L * a * b * space by a threshold value. The first spindle calculating means 11 calculates the maximum coordinate axis of the variance read from the average / variance storage means 10 in the L * a * b * space or the color area obtained by dividing the L * a * b * space by a threshold value. The first main shaft. The first spindle storage means 12 stores the obtained first spindle.

【0036】重み付き分散演算手段13は、色領域に含
まれる画素数の全画素数に対する相対頻度を、分散に乗
じることによって重み付け分散を求める。分割閾値決定
手段14は、前記判別分析によって分割閾値を決定す
る。分割閾値記憶手段15は、分割閾値決定手段14に
よって得られた分割閾値を記憶する。
The weighted variance calculating means 13 obtains a weighted variance by multiplying the variance by the relative frequency of the number of pixels included in the color area with respect to the total number of pixels. The division threshold value determining means 14 determines a division threshold value by the discriminant analysis. The division threshold storage unit 15 stores the division threshold obtained by the division threshold determination unit 14.

【0037】色領域分割手段16は、前記重み付け分散
演算手段13により求められた各領域の重み付け分散の
値をソートし、最も重み付け分散の大きな色領域を求
め、該色領域(最初の分割の場合は色空間)の第一主軸
を第一主軸記憶手段20から読みだし、前記色領域(色
空間)を分割閾値記憶手段15から読みだした前記第一
主軸の分割閾値で二分する。分割制御手段17は、色領
域分割手段16によって分割された全色領域数が規定の
色数に到達するか、あるいは、もうそれ以上分割できな
くなるまで、各色領域について上記の演算および分割を
繰り返し行なうのを制御する。
The color area dividing means 16 sorts the values of the weighted variances of the respective areas obtained by the weighted variance calculating means 13 to obtain the color area having the largest weighted variance. Is read out from the first spindle storage means 20, and the color area (color space) is bisected by the division threshold of the first spindle read out from the division threshold storage means 15. The division control unit 17 repeats the above-described calculation and division for each color region until the total number of color regions divided by the color region division unit 16 reaches the specified number of colors or the color region cannot be further divided. To control.

【0038】代表色割当手段23は、上記の分割が終了
後、各色領域毎の平均色を平均.分散記憶手段10から
読みだし、その平均色を各色領域の代表色として採用す
ると共に、元の画像データにおいて、各色領域に含まれ
る画素に、その色領域の平均色を割り付け、元の画像デ
ータの画素の色を代表色に置き換える。なお、各画素の
色を代表色に置き換えられた画像データは、画像メモリ
30dに記憶されるようになっている。
After the above division is completed, the representative color allocating means 23 calculates the average color of each color area as an average. The average color of the original image data is read out from the distributed storage unit 10 and the average color is adopted as a representative color of each color region. In addition, in the original image data, the average color of the color region is assigned to the pixels included in each color region. The pixel color is replaced with the representative color. The image data obtained by replacing the color of each pixel with the representative color is stored in the image memory 30d.

【0039】強調係数指定手段18は、平均・分散演算
手段9によって求められたL*a*b*空間の各座標軸の
分散について、各座標軸同士の比率を求め、各座標軸の
階級数を、前記比率に応じて他の座標軸に対し、1/8
倍,1/4倍,1/2倍,2倍,4倍,8倍,16倍,
32倍にするか、その倍率を指定する。強調係数演算手
段19は、前記倍率に従って各座標軸の階級数を求め
る。
The emphasis coefficient designating means 18 calculates the ratio between the coordinate axes of the variance of each coordinate axis in the L * a * b * space obtained by the average / variance calculating means 9 and calculates the class number of each coordinate axis. 1/8 of other coordinate axes according to the ratio
Times, 1/4 times, 1/2 times, 2 times, 4 times, 8 times, 16 times,
Specify 32 times or specify the magnification. The emphasis coefficient calculating means 19 obtains the class number of each coordinate axis according to the magnification.

【0040】強調係数記憶手段20は強調係数演算手段
19によって得られた各座標軸の階級数を記憶する。ヒ
ストグラム更新手段21は、前記周期性係数記憶手段4
から読みだした各画素毎の周期性係数を、対応する各画
素が含まれる前記クラスタ毎に加算し、これらクラスタ
毎の周期性係数の和と各クラスタに含まれる画素の数と
を加算する。そして、上記のように各クラスタ毎に求め
られた値を新たにヒストグラムとする。
The emphasis coefficient storage means 20 stores the rank of each coordinate axis obtained by the emphasis coefficient calculation means 19. The histogram updating means 21 stores the periodicity coefficient storing means 4
Is added for each cluster including the corresponding pixel, and the sum of the periodicity coefficients for each cluster and the number of pixels included in each cluster are added. Then, the value obtained for each cluster as described above is newly set as a histogram.

【0041】さらに、ヒストグラム更新手段21は、上
記強調係数記憶手段20に記憶された各座標軸の階級数
により、L***空間を前記クラスタとは別の新クラ
スタに再分割し、前記ヒストグラムを再分割された新ク
ラスタ毎の画素数に変更する。
Further, the histogram updating means 21 subdivides the L * a * b * space into new clusters different from the clusters according to the rank of each coordinate axis stored in the emphasis coefficient storage means 20. The histogram is changed to the number of pixels for each new sub-cluster.

【0042】すなわち、前記強調係数指定手段18によ
り指定された倍率に従ってL***空間を新クラスタ
に分割し、この新クラスタに基づいてヒストグラムを更
新する。従って、前記周期性係数により重み付け補正す
ると共に強調係数指定手段18に指定された倍率で輝度
成分を強調する場合には、L***空間を新クラスタ
に分割した後に、各新クラスタ毎の周期性係数の和を求
めて、新クラスタに基づくヒストグラムを新クラスタ毎
の周期性係数の和で重み付け補正する。そして、ヒスト
グラム更新手段21は、ヒストグラム記憶手段8に記憶
されたヒストグラムを、上述のように更新されたヒスト
グラムに書き換える。
That is, the L * a * b * space is divided into new clusters according to the magnification specified by the emphasis coefficient specifying means 18, and the histogram is updated based on the new clusters. Therefore, when the weighting correction is performed using the periodicity coefficient and the luminance component is emphasized at the magnification specified by the emphasis coefficient specifying unit 18, the L * a * b * space is divided into new clusters, And the histogram based on the new cluster is weighted and corrected by the sum of the periodicity coefficients of each new cluster. Then, the histogram updating unit 21 rewrites the histogram stored in the histogram storage unit 8 with the histogram updated as described above.

【0043】限定色カラーパレット演算手段24は、上
記各手段の動作によって得られた代表色を色空間上での
距離についてソートし、代表色を色コードとしてカラー
マップ30aに登録する。色修正手段25は、上記各手
段の動作によって得られた限定色からなる表示画像の色
を、この画像を表示したディスプレイ30b画面上で、
部分的に変更したい場合に用いられるものである。
The limited color color pallet operation means 24 sorts the representative colors obtained by the operations of the above-described means in terms of the distance in the color space, and registers the representative colors as color codes in the color map 30a. The color correcting unit 25 changes the color of the display image composed of the limited colors obtained by the operations of the above units on the screen of the display 30b displaying this image.
This is used when you want to make partial changes.

【0044】そして、色修正手段25は、前記表示画像
の色を変更したい部分をマウスの指示により矩形で囲
い、前記矩形内の変更したい色をマウスのフォーカスを
合わせてクリックし、色を選択することにより、カラー
パレット画面において、選択された色の部分が反転強調
表示され、その近傍の色から順に選択することにより、
色を色空間上最も近い色から順に置き換えることを可能
とするものである。
Then, the color correcting means 25 surrounds a portion of the display image whose color is to be changed with a rectangle according to a mouse instruction, focuses on the color to be changed in the rectangle, clicks the mouse, and selects a color. As a result, on the color palette screen, the selected color portion is highlighted in reverse, and by selecting colors in order from the neighboring colors,
It is possible to replace colors in order from the closest color in the color space.

【0045】以上の構成の限定色決定装置は、限定色決
定方法を用いて、カラーマップディスプレイ装置30に
フルカラーの画像データを限定された表示色で表示す
る。なお、カラーマップディスプレイ装置30は、本実
施例において、画像記憶手段に記憶された画像データを
フルカラーで表示することも可能となっており、フルカ
ラーの画像と限定された色の画像を見比べて、前記色修
正手段28により色の修正を行なうこともできるように
なっている。なお、符号30cは、画像メモリ10a、
30dの画像データをディスプレイ30bに表示するた
めのD/A変換器である。
The limited color determination device having the above-described configuration displays full-color image data in a limited display color on the color map display device 30 by using the limited color determination method. In the present embodiment, the color map display device 30 is also capable of displaying image data stored in the image storage unit in full color, and comparing the full color image with the limited color image, The color correction means 28 can correct the color. Note that reference numeral 30c denotes the image memory 10a,
This is a D / A converter for displaying the image data of 30d on the display 30b.

【0046】次に、上記限定色決定装置を用いた限定色
決定方法について説明する。 (イ)表示すべき画像データの色変化の度合いの計測 従来の方法では、画像データの色の変化の度合い、すな
わち、画像内の各画素の色と、その画素の近傍の画素の
色が大きく異なっているか、もしくは略同じような色と
なっているかを計測する際には、RGB各8ビットで表
された画像のRGBデータの上位5ビットを用いて計測
するものが多かった。
Next, a limited color determining method using the above limited color determining apparatus will be described. (A) Measurement of the degree of color change of image data to be displayed In the conventional method, the degree of change of the color of image data, that is, the color of each pixel in an image and the color of pixels near the pixel are large. When measuring whether the colors are different or have substantially the same color, the measurement is often performed using the upper 5 bits of the RGB data of the image represented by each 8 bits of RGB.

【0047】しかし、色変化の緩やかさを表す情報は、
むしろ、これによって失われる下位3ビットに含まれて
いる。すなわち、色変化の少ない画像データにおいて、
各画素の上位ビットを比較しても、色変化の度合いを計
測することができず、極端に色変化が緩やかな部分と、
ある程度色変化が緩やかな部分とを区別することができ
ない。そこで、本実施例では、各色成分における下位3
ビットの値の周期性を調べることにより、表示すべき画
像データにおいて色変化の緩やかさを特定する。
However, information indicating the gradual change in color is as follows:
Rather, it is included in the lower three bits lost by this. That is, in image data with little color change,
Even if the upper bits of each pixel are compared, the degree of color change cannot be measured, and the portion where the color change is extremely gentle,
It cannot be distinguished from a portion where the color change is gentle to some extent. Therefore, in this embodiment, the lower three
By examining the periodicity of the bit values, the gradual change in color in the image data to be displayed is specified.

【0048】ところで、下位3ビットの値は、0から7
までの8個の値に限られる。そして画像の各画素の位置
の違いによる色変化が緩やかな場合、各画素のデータの
値は、連続して配置された各画素間で、小さな変動量で
連続的に変化する。従って、色変化の緩やかな部分で
は、下位3ビットの0から7までの範囲内にある一定の
値域が略規則的に現われることになる。そこで、本実施
例では、上記周期性演算手段3が、図2に示すように、
各画素41…を中心として、鉛直(上・下)、水平(左
・右)、左斜め(左上・右下)、右斜め(右上・左下)
の8つの放射方向に連続して配置された画素の下位3ビ
ット(下位3ビット記憶手段2に記憶されたもの)を読
み取り、RGBの各色成分ごとに前記規則性(周期性)
を調べる。
By the way, the values of the lower 3 bits are from 0 to 7
Limited to 8 values up to When the color change due to the difference in the position of each pixel of the image is gradual, the value of the data of each pixel continuously changes with a small variation amount between the pixels arranged continuously. Therefore, in a portion where the color change is gradual, a certain value range within the range of 0 to 7 of the lower 3 bits appears almost regularly. Therefore, in the present embodiment, as shown in FIG.
Vertical (upper / lower), horizontal (left / right), diagonal left (upper left / lower right), diagonal right (upper right / lower left) centering on each pixel 41 ...
The lower three bits (stored in the lower three bits storage means 2) of the pixels arranged continuously in the eight radial directions are read, and the above-mentioned regularity (periodicity) is obtained for each of the RGB color components.
Find out.

【0049】周期性演算手段3による具体的な周期性の
演算方法は、図3に示すように、まず、注目画素41a
の下位ビットの値と同じ値が現われるまで一画素ずつ前
記方向に沿って順次移動しながら画素41…のデジタル
データの下位3ビットの値を読み取る。そして、最初に
同じ値が見つかるまでに移動した画素数が4以下の場
合、次に同じ値がでるまで、引き続き順次隣の画素に移
動しながら下位3ビットを読み取り、次に同じ値が見つ
かった時の移動画素数が最初の移動画素数に等しけれ
ば、前記注目画素41aに周期性があるとみなす。
As shown in FIG. 3, a specific method of calculating the periodicity by the periodicity calculating means 3 is as follows.
Are read in the digital data of the pixels 41... While sequentially moving one pixel at a time along the above-mentioned direction until the same value as the value of the lower bits of the pixels 41 appears. If the number of pixels moved until the same value is first found is 4 or less, the lower 3 bits are read while sequentially moving to the next pixel until the next same value is found, and then the same value is found. If the number of moving pixels at the time is equal to the first moving pixel number, it is considered that the pixel of interest 41a has periodicity.

【0050】そして、同じ移動数で同じ値が周期的に出
現する間、前記方向に沿って移動しながら画素41…の
色データの下位3ビットを読み取っていく。そして、同
じ移動数で同じ値の出現する出現回数をカウントする。
そして、同じ値が周期的に出現しなくなったところで、
画素のデータの読み取りを終了する。以上の作業を、前
記八方向全てについて行い、その同じ値の出現回数の総
カウント数を注目画素41aの周期値として定義する。
また、以上の作業は画像データの全画素41…を注目画
素41aとして行なう。なお、このような周期値の計測
はRGB各色成分ごとに行なわれる。
While the same value periodically appears with the same number of movements, the lower three bits of the color data of the pixels 41 are read while moving along the above-mentioned direction. Then, the number of appearances in which the same value appears with the same movement number is counted.
And when the same value stops appearing periodically,
The reading of the pixel data ends. The above operation is performed in all eight directions, and the total count of the number of appearances of the same value is defined as the cycle value of the pixel of interest 41a.
The above operation is performed with all the pixels 41 of the image data as the target pixel 41a. The measurement of such a period value is performed for each of the RGB color components.

【0051】以上の作業は、例えば、図3に示す場合、
画像データ上の画素41aについて注目した場合に、そ
の画素41aから水平(図2において向かって右)方向
に連続した画素41…の値を見ると、例えば3画素ごと
に、同じ値をもつ画素41bが出現する場合がある。こ
の様な場合には、3画素の周期で現われる同じ値の出現
回数をカウントし、残りの放射方向についても同様の作
業を行なって同じ値の出現回数をカウントし、これらを
すべて加算し、注目画素41aの周期値とする。
The above operation is performed, for example, in the case shown in FIG.
When attention is paid to the pixel 41a on the image data, looking at the values of the pixels 41... Continuous in the horizontal (right in FIG. 2) direction from the pixel 41a, for example, a pixel 41b having the same value every three pixels May appear. In such a case, the number of appearances of the same value appearing in the cycle of three pixels is counted, and the same operation is performed for the remaining radiation directions to count the number of appearances of the same value. The period value of the pixel 41a is used.

【0052】次に、各画素毎に各色成分の周期値を加算
する。そして、各画素毎の周期値の和を、ピークを1と
した比率で計算し、それを後述する重み付けに用いる周
期性係数として定義する。前記周期性係数biは、以下
の式によって求められる。 bi=ai/amax なお、ここで、iは各画素を示し、aiは各画素における
周期値の和を示し、amaxは各周期値の和aiのうちの最
大の周期値ai(最大値)を示すものである。
Next, the cycle value of each color component is added for each pixel. Then, the sum of the cycle values for each pixel is calculated at a ratio where the peak is 1, and the sum is defined as a periodicity coefficient used for weighting described later. The periodicity factor b i is obtained by the following equation. b i = a i / a max Here, i represents each pixel, a i represents the sum of the period values in each pixel, and a max is the maximum period value of the sum a i of each period value. a i (maximum value).

【0053】こうして得られた周期性係数biは、周期
性係数記憶手段4に記憶される。そして、ヒストグラム
更新手段21において、均等色空間に変換された各画素
の位置に周期性係数biが割り当てられ、均等色空間上
の各画素の位置に周期性係数biが配置された状態とな
る。
The thus obtained periodicity coefficients b i is stored in the periodicity coefficient storage unit 4. Then, the histogram updating unit 21, the periodicity factor b i is allocated to the position of each pixel is converted to a uniform color space, and a state in which the periodicity factor b i to the position of each pixel on the uniform color space is arranged Become.

【0054】そして、クラスタに分割された均等色空間
上において、各クラスタ内に含まれる画素数を示すヒス
トグラムを、ヒストグラム更新手段21で更新する際に
は、各クラスタ内に含まれる画素のそれぞれの周期性係
数biを加算し、この周期性係数biの和を各クラスタの
重み付け係数とする。そして、これら重み付け係数を各
クラスタの画素数にそれぞれ加算し、これを新たなヒス
トグラムとする。また、第一主軸に対して判別分析を行
なう場合には、前記構成されたヒストグラムから、第1
主軸の階級毎の画素数、すなわち第1主軸に対する度数
分布を求め、この度数分布から第1主軸の各階級に含ま
れる画素数を全画素数で割り、画素の発生確率を求め、
この発生確率を用いる。
When the histogram indicating the number of pixels included in each cluster is updated by the histogram updating unit 21 in the uniform color space divided into clusters, each of the pixels included in each cluster is updated. adding periodicity coefficients b i, the sum of the periodicity coefficient b i and the weighting coefficient of each cluster. Then, these weighting factors are added to the number of pixels of each cluster, respectively, and this is used as a new histogram. When performing discriminant analysis on the first main axis, the first histogram
The number of pixels for each class of the main axis, that is, the frequency distribution for the first main axis is obtained, the number of pixels included in each class of the first main axis is divided by the total number of pixels from the frequency distribution, and the occurrence probability of pixels is obtained.
This occurrence probability is used.

【0055】(ロ)代表色の選択 代表色を選ぶために、まず、画像データの色分布を色空
間上に配置するが、この際、人の視覚特性を考慮して、
均等色空間を使用する。均等色空間としては、前記L*
*v*またはL***を使用する。そこで、RGBデー
タからなる画像データの各画素の値をL**v*またはL
***に変換する。本実施例では、1例として、色変
換手段5による変換について、L***を用いて詳細
を記述する。 なお、本発明の均等色空間が、L**
*空間に限定されるものではない。
(B) Selection of representative color In order to select a representative color, first, the color distribution of the image data is arranged in a color space.
Use a uniform color space. As the uniform color space, the L *
Use u * v * or L * a * b * . Therefore, the value of each pixel of the image data composed of RGB data is represented by L * u * v * or L * u * v *.
Convert to * a * b * . In the present embodiment, as an example, the details of the conversion by the color conversion means 5 will be described using L * a * b * . Note that the uniform color space of the present invention is L * a * b
* It is not limited to space.

【0056】RGBデータから、L***への変換
は、CIE1931年勧告のXYZ系を介在して、以下
の式によって行なわれる。 X=0.61R+0.17G+0.20B …… (1a) Y=0.30R+0.59G+0.11B …… (1b) Z= 0.066G+1.12B …… (1c)
Conversion from RGB data to L * a * b * is performed by the following equation via the XYZ system recommended by CIE 1931. X = 0.61R + 0.17G + 0.20B (1a) Y = 0.30R + 0.59G + 0.11B (1b) Z = 0.066G + 1.12B (1c)

【0057】Y/Yn>0.008856の場合 L*=116(Y/Yn)1/3−16 …… (2a) Y/Yn≦0.008856の場合 L*=903.3(Y/Yn) …… (2b)When Y / Yn> 0.008856 L * = 116 (Y / Yn) 1/3 −16 (2a) When Y / Yn ≦ 0.008856 L * = 903.3 (Y / Yn) ) ...... (2b)

【0058】X/Xn>0.008856,Y/Yn>
0.008856,Z/Zn>0.008856の場合 a*=500〔(X/Xn)1/3−(Y/Yn)1/3〕 …… (2c) b*=200〔(Y/Yn)1/3−(Z/Zn)1/3〕 …… (2d)
X / Xn> 0.008856, Y / Yn>
A * = 500 [(X / Xn) 1/3 − (Y / Yn) 1/3 ] in the case of 0.008856, Z / Zn> 0.008856 (2c) b * = 200 [(Y / Yn ) 1/3 − (Z / Zn) 1/3 ] (2d)

【0059】X/Xn,Y/Yn,Z/Znに0.008
856以下のものがある場合、上記式(2c)及び(2
d)の(X/Xn)1/3,(Y/Yn)1/3,(Z/Zn)
1/3の項をそれぞれ7.787(X/Xn)+16/11
6,7.787(Y/Yn)+16/116,7.78
7(Z/Zn)+16/116に置き換える。ここで、
R,G,Bおよび白の色度はNTSCテレビジョン規格
に準拠している。
0.008 for X / Xn, Y / Yn, and Z / Zn
In the case where there is a value of 856 or less, the equations (2c) and (2
d) (X / Xn) 1/3 , (Y / Yn) 1/3 , (Z / Zn)
1/3 terms are 7.787 (X / Xn) +16/11
6,7.787 (Y / Yn) + 16 / 116,7.78
7 (Z / Zn) +16/116. here,
The chromaticities of R, G, B and white conform to the NTSC television standard.

【0060】(ハ)L***空間における画素の度数
分布 各画素の値は、前記RGBをL***に変換した段階
で、8ビットの整数の値から外れてしまうことになる。
そこで、L***空間において度数分布を求めるに
は、各座標軸の階級数を決めて、各座標軸の階級により
***空間をクラスタに分割し、前記クラスタに含
まれる画素数を求める必要がある。
(C) Frequency distribution of pixels in L * a * b * space The value of each pixel may deviate from an 8-bit integer value at the stage when RGB is converted to L * a * b *. become.
Therefore, in order to obtain the frequency distribution in the L * a * b * space, the rank of each coordinate axis is determined, the L * a * b * space is divided into clusters by the rank of each coordinate axis, and the pixels included in the cluster are determined. You need to find the number.

【0061】L***空間を必要な色数に分割し、そ
れぞれの色領域の平均色を代表色として選ぶのに、渡辺
のアルゴリズム(電子情報通信学会論文誌D Vol.
J70−D No.4 pp.720−726 198
7年4月)に改良を加えて使用した。主な改良点は、元
データとしてRGB上位5ビットを用いる代わりに、R
GB8ビットの値からL***に変換した値を使用し
た。これにより、データの精度8ビットをそのまま利用
することができる。
To divide the L * a * b * space into a required number of colors and select an average color of each color region as a representative color, Watanabe's algorithm (IEICE Transactions D Vol.
J70-D No. 4 pp. 720-726 198
(April 1995) with improvements. The main improvement is that instead of using the upper 5 bits of RGB as the original data, R
A value converted from an 8-bit GB value to L * a * b * was used. Thus, the 8-bit precision of the data can be used as it is.

【0062】また、分割を行なう初期空間の各座標軸の
階級数を例えばRGB32×32×32からL***
256×64×64のように、輝度成分L*を示す座標
軸の階級数を色度成分a**を示す座標軸の階級数に対
して4倍にし、輝度成分L*を強調するように変えた。
これは、吉良らの報告(信学技法,IE83〜92、
「限定された数の代表色による適応型自然色画像表示」
吉良、井上、福井)にあるように、人間の視覚特性が輝
度分布に対し、色度成分の4倍程度敏感であることを考
慮したためである。
The class number of each coordinate axis in the initial space to be divided is changed from, for example, RGB 32 × 32 × 32 to L * a * b *.
The rank of the coordinate axis indicating the luminance component L * is quadrupled to the rank of the coordinate axis indicating the chromaticity component a * b * , such as 256 × 64 × 64, so that the luminance component L * is emphasized. Was.
This is the report of Kira et al. (IEICE, IE83-92,
"Adaptive natural color image display with a limited number of representative colors"
(Kira, Inoue, Fukui) because human visual characteristics are about four times more sensitive to luminance distribution than chromaticity components.

【0063】具体的に説明すると、入力される画像デー
タは、通常、画素順にRGB値が並んでいる。そこで、
RGB値を座標とするRGB空間を考えた場合、RGB
空間は、R,G,Bを座標軸とし、各座標軸がそれぞれ
8ビットの値、すなわ0〜255の値を持つ三次元空間
となる。そこで、空間上の点にそのRGB値を持つ画素
の画素数を対応させれば、各色成分のヒストグラムが求
められる。
More specifically, the input image data usually has RGB values arranged in pixel order. Therefore,
Considering an RGB space having coordinates of RGB values, RGB
The space is a three-dimensional space in which R, G, and B are coordinate axes, and each coordinate axis has an 8-bit value, that is, a value of 0 to 255. Therefore, a histogram of each color component is obtained by associating the number of pixels having the RGB value with a point in space.

【0064】すなわち、histogram(r,g,b)=RGB(r,
g,b)の画素の総数となる。次に、均等色空間L***
のヒストグラムの場合は、上記RGBで表された各画素
の値(r,g,b)を上記式で(L*a*b*)に変換することにより
求められる。すなわち、histogram(L*a*b*)=L***
(L*a*b*)の画素の総数となる。しかし、RGBの値は、
各8ビットのデジタルデータなので、0〜255の整数
値となるが、上記変換の演算により(L*a*b*)の値は、0
〜255の整数値から外れてしまうと共に輝度成分を強
調するので適当な階級数を設ける必要がある。
That is, histogram (r, g, b) = RGB (r,
g, b) is the total number of pixels. Next, the uniform color space L * a * b *
Is obtained by converting the value (r, g, b) of each pixel represented by RGB into (L * a * b * ) by the above equation. That is, histogram (L * a * b * ) = L * a * b *
It is the total number of pixels of (L * a * b * ). However, the value of RGB is
Since each is 8-bit digital data, the value is an integer value of 0 to 255, but the value of (L * a * b *) is 0
Since it deviates from an integer value of 255 and emphasizes the luminance component, it is necessary to provide an appropriate class number.

【0065】本実施例では、上記のように輝度すなわち
*成分について強調する共に、L***への変換によ
ってデータの容量が増加するのを防止するために、各L
***の階級間隔を決める必要がある。データ容量と
しては、RGBの各値が8ビットにされているので、最
大を8ビットとする。従って、強調される輝度L*につ
いては、0〜255の値を取ることになる。そこで、前
記式で求められた画素のL*成分の値を、その大きさに
対応して0〜255に割り当てることになる。また、a
*,b*成分については、輝度成分を4倍に強調するため
にa*,b*:L*を1:4とする。すなわち、a*,b*
成分は、6ビット、0〜63までの値をとるようにす
る。
In this embodiment, in order to enhance the luminance, that is, the L * component as described above, and to prevent the data capacity from increasing due to the conversion to L * a * b * , each L
It is necessary to determine the class interval of * a * b * . As the data capacity, since each value of RGB is set to 8 bits, the maximum is set to 8 bits. Therefore, the emphasized luminance L * takes a value of 0 to 255. Therefore, the value of the L * component of the pixel obtained by the above equation is assigned to 0 to 255 corresponding to the size. Also, a
Regarding the * and b * components, a * , b * : L * is set to 1: 4 in order to emphasize the luminance component four times. That is, a * , b *
The component has a value of 6 bits, 0 to 63.

【0066】ここで、実際の階級間隔の計算は、各L*
**を8ビット以下のデータとする際に以下の式によ
って求める。 L*interval = (L*max- L*min)/(256/m) a*interval = (a*max - a*min)/(256/n) b*interval = (b*max - b*min)/(256/n) L*interval,a*interval,b*intervalは、L*
*,b*の階級間隔を示す。L*max,a*max ,b*max
はそれぞれL*,a*,b*の最大値を示す。L*min,a*
min ,b*min はそれぞれL*,a*,b*の最小値を示
す。また、m,nは、輝度成分(L*)と色度成分
(a*,b*)との比率により変更されるもので、本実施
例では、L*:a*,b*を4:1とするために、輝度成
分のmを1とし、色度成分のnを4としている。
Here, the actual calculation of the class interval is performed for each L *
When a * b * is 8-bit or less data, it is obtained by the following equation. L * interval = (L * max-L * min) / (256 / m) a * interval = (a * max-a * min) / (256 / n) b * interval = (b * max-b * min) ) / (256 / n) L * interval, a * interval, b * interval are L * ,
Indicates the class interval of a * and b * . L * max, a * max, b * max
Indicates the maximum value of L * , a * , and b * , respectively. L * min, a *
min and b * min indicate the minimum values of L * , a * and b * , respectively. Further, m and n are changed depending on the ratio between the luminance component (L * ) and the chromaticity components (a * , b * ). In this embodiment, L * : a * , b * is changed to 4: In order to set it to 1, m of the luminance component is set to 1 and n of the chromaticity component is set to 4.

【0067】そして、以上のように階級間隔の決められ
たL***空間を、各座標軸の階級で3次元的に分割
し、この分割された領域を色のクラスタとする。そし
て、各クラスタにクラスタ番号をつけておく。そして、
各画素の値を、その画素を含むクラスタのクラスタ番号
に置き換え、これをクラスタ画像記憶手段6が記憶す
る。 そして、ヒストグラム演算手段7によって、画像
データのクラスタ毎の度数分布を求める。
Then, the L * a * b * space in which the class interval is determined as described above is three-dimensionally divided by the class of each coordinate axis, and the divided region is defined as a color cluster. Then, a cluster number is assigned to each cluster. And
The value of each pixel is replaced with the cluster number of the cluster including that pixel, and this is stored in the cluster image storage unit 6. Then, the histogram calculation means 7 obtains a frequency distribution for each cluster of the image data.

【0068】図4及び図5を参照して、輝度を示す座標
軸の階級数を色度を示す座標軸の階級数より大きくし
て、判別分析による代表色を選択した場合について簡単
に説明する。なお、図4及び図5において、均等色空間
における色度を示す座標軸を一つとして2次元の座標系
で説明する。
Referring to FIGS. 4 and 5, a brief description will be given of a case where the rank of the coordinate axis indicating luminance is larger than the rank of the coordinate axis indicating chromaticity, and a representative color is selected by discriminant analysis. 4 and 5, a description will be given using a two-dimensional coordinate system with one coordinate axis indicating chromaticity in a uniform color space.

【0069】まず、y軸を輝度、x軸を色度とし、それ
ぞれの階級数を8とした場合には、図4に示すように判
別分析により色空間が分割されるものとする。そして、
x軸における階級数を4とすることにより、y軸の階級
数をx軸の階級数の2倍とした場合には、図5に示すよ
うに、x軸の図4において分割可能だった部分が分割で
きなくなり、その分、輝度軸の分割数が増えることにな
る。すなわち、分割された色空間の平均色を代表色とし
た場合に、代表色として同じ色相で輝度の異なる色が多
く選ばれ、異なる色相の色はあまり選ばれなくなり、輝
度が強調された代表色が選択されることになる。
First, when the y-axis is luminance and the x-axis is chromaticity, and each class is 8, the color space is divided by discriminant analysis as shown in FIG. And
When the class number on the x-axis is set to 4 and the class number on the y-axis is twice the class number on the x-axis, as shown in FIG. Cannot be divided, and the number of divisions of the luminance axis increases accordingly. That is, when the average color in the divided color space is set as the representative color, many colors having the same hue but different luminances are selected as the representative colors, and colors having different hues are not selected so much. Will be selected.

【0070】(ニ)輝度もしくは色度の強調 本実施例は、前記空間分割方式において、輝度成分のサ
ンプリングを強調することにより、輝度成分の変化の緩
やかな部分が強調されること、即ち輝度方向を第一主軸
とした分割が主要な分割となることに着目し、さらに色
度成分に対し輝度成分を強調したサンプリングを与える
ことにより、逆に、輝度変化の緩やかな部分および色を
特定する方法である。
(D) Enhancement of Luminance or Chromaticity In this embodiment, in the space division method, the sampling of the luminance component is emphasized to emphasize a portion where the change of the luminance component is gradual. A method of identifying a portion and a color with a gradual change in luminance by focusing on that the division with as the first main axis is a main division, and further giving sampling in which the luminance component is emphasized for the chromaticity component It is.

【0071】具体的には、L***(またはL*
**)で、256×16×16のように輝度方向に16
倍に強調サンプリングし、限定色の色数を例えば、10
0色などの少なめの数で指定し、前記(ロ)の分割方式
により代表色を求める。これにより輝度成分に対し、こ
の場合16倍に強調した100色が選ばれる。これら輝
度変化の緩やかな部分の色を強調した上位100色とな
っている。
Specifically, L * a * b * (or L * u)
* v * ), 16 in the luminance direction, such as 256 × 16 × 16
The sample is emphasized twice, and the number of limited colors is set to, for example, 10
The representative color is designated by a smaller number such as 0 color, and the representative color is obtained by the division method of (b). Thus, in this case, 100 colors emphasized 16 times are selected for the luminance component. These are the top 100 colors that emphasize the colors of the portions where the luminance changes gradually.

【0072】そして、強調係数指定手段18は、上述し
たように、平均・分散演算手段9によって求められた均
等色空間の各座標軸方向の分散について、各座標軸間の
比率を求める、その比率に対応して、色度を示す座標軸
の階級数に対する輝度を示す座標軸の階級数の倍率(強
調係数)を、1/8倍、1/4倍、1/2倍、等倍、2
倍、4倍、8倍、16倍、32倍、64倍のいずれかか
ら選べるようにした。
Then, as described above, the emphasis coefficient designating means 18 calculates the ratio between the coordinate axes with respect to the variance in the direction of each coordinate axis of the uniform color space obtained by the average / variance calculating means 9, and corresponds to the ratio. Then, the magnification (emphasis coefficient) of the rank of the coordinate axis indicating the luminance with respect to the rank of the coordinate axis indicating the chromaticity is 1/8, 1/4, 1/2, 1 or 2 times.
, 4 times, 8 times, 16 times, 32 times, 64 times.

【0073】そして、強調係数演算手段19は、上記の
ように決められた倍率によって、各座標軸の階級を決め
る。例えば、輝度成分L*に対する色度成分a**の倍
率を2倍とした場合には、各L***の座標軸の階級
数は、256×128×128となり、この階級数及び
階級数によって決まる階級間隔を強調係数記憶手段20
が記憶する。
The emphasis coefficient calculating means 19 determines the class of each coordinate axis based on the magnification determined as described above. For example, when the magnification of the chromaticity component a * b * with respect to the luminance component L * is doubled, the rank of the coordinate axis of each L * a * b * is 256 × 128 × 128. Classification interval determined by the class number
Remembers.

【0074】(ホ)ヒストグラムの変更 前記周期性係数記憶手段4に記憶された各画素毎の重み
付け係数及び強調係数記憶手段19に記憶された階級数
を用いて、ヒストグラム記憶手段8に記憶されたヒスト
グラムを更新する。
(E) Change of histogram The histogram coefficient is stored in the histogram storage unit 8 using the weighting coefficient for each pixel stored in the periodic coefficient storage unit 4 and the class stored in the enhancement coefficient storage unit 19. Update the histogram.

【0075】まず、周期性係数記憶手段4に記憶された
周期性係数を用いたヒストグラムの更新について説明す
る。まず、周期性係数記憶手段4に画素毎に記憶された
周期性係数を、均等色空間上に変換された各画素の位置
に配置し、各クラスタに含まれる画素のそれぞれの周期
性係数をクラスタ毎に加算する。そして、クラスタ毎に
加算された周期性係数の和とクラスタ毎の画素数を加算
した値を、各クラスタの画素数としてヒストグラムを作
成し、これを新たなヒストグラムとする。
First, updating of the histogram using the periodicity coefficient stored in the periodicity coefficient storage means 4 will be described. First, the periodicity coefficient stored for each pixel in the periodicity coefficient storage means 4 is arranged at the position of each pixel converted into a uniform color space, and the periodicity coefficient of each pixel included in each cluster is stored in the cluster. Add each time. Then, a histogram is created using the value obtained by adding the sum of the periodicity coefficients added for each cluster and the number of pixels for each cluster as the number of pixels for each cluster, and this is used as a new histogram.

【0076】すなわち、図6ないし図7に示すようにヒ
ストグラム記憶手段8に記憶されたヒストグラム43
(実際には均等色空間すなわち3次元空間におけるヒス
トグラムであるが、ここでは、説明を容易にするために
1次元のヒストグラムとした)に対して、周期係数記憶
手段4に記憶された係数44のクラスタ毎の和を表すヒ
ストグラムを加算することで、図8に示す重み付け補正
されたヒストグラム45を得ることができ、これを用い
て、後述する判別分析により代表色の選択を行なう。
That is, as shown in FIG. 6 and FIG.
(Actually, a histogram in a uniform color space, that is, a three-dimensional space, but here, a one-dimensional histogram is used for ease of explanation). By adding a histogram representing the sum for each cluster, a weight-corrected histogram 45 shown in FIG. 8 can be obtained, and using this, a representative color is selected by discriminant analysis described later.

【0077】また、ヒストグラム更新手段21は、前記
強調係数記憶手段20に記憶された階級数を用いてヒス
トグラムを再構成する。ヒストグラム演算手段7におい
ては、画像データの色調に関係なく輝度成分に対してい
色度成分を4倍に強調した階級数でヒストグラムを作成
したが、強調係数指定手段18により指定した倍率で階
級数を決める。
The histogram updating means 21 reconstructs a histogram by using the class number stored in the emphasis coefficient storage means 20. In the histogram calculation means 7, a histogram is created with a class number in which the chromaticity component is enhanced four times with respect to the luminance component regardless of the color tone of the image data. Decide.

【0078】そして、均等色空間を新たな階級による新
クラスタに分割し直し、新クラスタ毎の画素数を新たな
ヒストグラムとする。また、前記周期性係数による重み
付けと共に、強調を行なう場合には、新クラスタ毎の周
期性係数の和を重み付け係数とし、新クラスタ毎の画素
数に重み付け係数を加算して、新たなヒストグラムす
る。そして、ヒストグラム記憶手段8に記憶されたヒス
トグラムを上述のようにして求められた新たなヒストグ
ラムに更新する。
Then, the uniform color space is re-divided into new clusters of a new class, and the number of pixels for each new cluster is set as a new histogram. When weighting is performed together with the periodicity coefficient, the sum of the periodicity coefficients for each new cluster is used as a weighting coefficient, and the weighting coefficient is added to the number of pixels for each new cluster to form a new histogram. Then, the histogram stored in the histogram storage unit 8 is updated to a new histogram obtained as described above.

【0079】(へ)判別分析法による代表色の選択 本実施例の判別分析法による代表色の選択は、基本的に
上記従来技術と同様のものであり、各色成分毎のヒスト
グラムを用いて閾値を求め、この閾値において色空間を
順次多数の色領域に分割していくものであるが、本実施
例においては、上記周期性による重み付け及び強調され
た階級数による再構成が行なわれたヒストグラムを用い
て判別分析を行なう。
(F) Selection of representative color by discriminant analysis method The selection of a representative color by the discriminant analysis method of the present embodiment is basically the same as that of the above-described prior art, and a threshold value is determined by using a histogram for each color component. And the color space is sequentially divided into a number of color regions at this threshold value. In the present embodiment, the histogram weighted by the periodicity and reconstructed by the emphasized class number is used as the histogram. And perform discriminant analysis.

【0080】ここで、判別分析による閾値Tiの決定方
法を説明する。領域Sの画素数をN、一つの座標軸の任
意の階級iでの画素数をniとすると、その発生確率qi
は、次式(数1)で示される。なお、この際の画素数
は、上記ヒストグラム更新手段21により上述のように
更新されたヒストグラムから求められる。
Here, a method of determining the threshold T i by discriminant analysis will be described. Assuming that the number of pixels in the area S is N and the number of pixels in any rank i on one coordinate axis is n i , the occurrence probability q i
Is represented by the following equation (Equation 1). The number of pixels at this time is obtained from the histogram updated by the histogram updating unit 21 as described above.

【0081】すなわち、新たな階級数により分割された
新クラスタの画素数に、重み付け係数を加算した値をク
ラスタ毎の画素数とし、一つの座標軸の任意の階級に含
まれるクラスタ毎の画素数を加算したものを画素数ni
として用いる。
That is, the value obtained by adding the weighting coefficient to the number of pixels of the new cluster divided by the new number of classes is used as the number of pixels for each cluster, and the number of pixels for each cluster included in an arbitrary class on one coordinate axis is calculated. The sum is the number of pixels n i
Used as

【数1】 そして、座標軸上の値k(階級を単位とする値)で、区
間〔a、b〕を2つの区間C1〔a、k〕と、C2〔k+
1、b〕とに分割すると仮定し、両区間における画素の
発生確率ω1,ω2、平均値をμ1,μ2、分散をσ1 2,σ
2 2とした場合に、次式(数2)で与えられる重み付き分
散和σw 2が最小となるように座標軸上の値kを定める。
(Equation 1) Then, the section [a, b] is divided into two sections C 1 [a, k] and C 2 [k + by a value k (a value in units of class) on the coordinate axis.
1, b], the pixel occurrence probabilities ω 1 and ω 2 in both sections, the average values μ 1 and μ 2 , and the variances σ 1 2 and σ
In case of a 2 2, define the value k of the coordinate axis as weighted variance sum sigma w 2 given by: (Equation 2) is minimized.

【数2】 (Equation 2)

【0082】重み付き分散和σw 2を最小にすることと次
式(数3)で与えられる二つの区間の間の分散σB 2を最
大とすることは同値である。
Minimizing the weighted variance sum σ w 2 is equivalent to maximizing the variance σ B 2 between the two sections given by the following equation (Equation 3).

【数3】 (Equation 3)

【0083】σB 2を最大とするk*(すなわち、求める
べき閾値Ti)は、次式(数4)のように逐次的に求め
ることができる。
K * that maximizes σ B 2 (that is, the threshold value T i to be obtained ) can be obtained sequentially as in the following equation (Equation 4).

【数4】 ここで、μTは全平均であり、次式(数5)で示される
ものである。
(Equation 4) Here, μ T is the total average and is represented by the following equation (Equation 5).

【数5】 (Equation 5)

【0084】以上のようにして、各色成分の閾値Ti
決定することができる。そして、求められた閾値Ti
より、まず、色空間を2つの領域に分割することになる
が、各色成分のうちで最も前記分散σ2が最大となった
色成分の座標軸を第一主軸とし、その色成分の閾値Ti
に対応する第一主軸の位置で、第一主軸に直交する分割
平面で色空間を2つの色領域に分割する。
As described above, the threshold value T i of each color component can be determined. Then, the color space is firstly divided into two regions by the obtained threshold value T i , and the coordinate axis of the color component having the largest variance σ 2 among the respective color components is defined as the first principal axis. , The threshold value T i of the color component
The color space is divided into two color regions on a division plane orthogonal to the first principal axis at the position of the first principal axis corresponding to.

【0085】次に、分割されたそれぞれの色領域の重み
付き分散和σw 2を求め、これらを色領域間で比較し、最
も重み付き分散和σw 2が大きい色領域を次に分割する領
域とする。そして、前記色領域において、前記色空間を
分割したように閾値Tiと第一主軸を求め、色領域をさ
らに二つの色領域に分割する。次に、分割された全ての
色領域において、最も重み付き分散和σw 2が大きい色領
域を求め、求められた色領域を上述のように二分割する
ことを繰り返す。そして、分割された色領域の数が、表
示すべき代表色の数と等しくなったところで、分割を終
了する。次に、各色領域における各色成分の平均値を逆
色変換手段22によりL***からRGBに変換して
代表色とする。
Next, a weighted variance sum σ w 2 of each of the divided color regions is obtained, these are compared between the color regions, and the color region having the largest weighted variance sum σ w 2 is divided next. Area. Then, in the color region, a threshold value Ti and a first principal axis are obtained as if the color space were divided, and the color region is further divided into two color regions. Next, a color region having the largest weighted variance sum σ w 2 is obtained in all the divided color regions, and the obtained color region is divided into two as described above. Then, when the number of the divided color areas becomes equal to the number of the representative colors to be displayed, the division is completed. Next, the average value of each color component in each color area is converted from L * a * b * to RGB by the inverse color conversion means 22 to obtain a representative color.

【0086】そして、この代表色をカラーマップディス
プレイ装置30のカラーマップ30aに色コードとして
登録し、表示すべきカラー画像データの色空間における
色分布と、前記各色領域を対応させ、画像データの各画
素に、その画素の元々の色に近似した色をカラーマップ
30aから色コードとして割り付ける。このように各画
素に色コードが割り付けられて色を限定された画像デー
タを、前記色コードを登録されたカラーマップ30aを
有するカラーマップディスプレイ装置30のディスプレ
イ30bに表示させる。
Then, this representative color is registered as a color code in the color map 30a of the color map display device 30, and the color distribution in the color space of the color image data to be displayed is made to correspond to each of the color regions, and each of the image data is A color similar to the original color of the pixel is assigned to the pixel as a color code from the color map 30a. In this way, the image data in which the color is assigned to each pixel and the color is limited is displayed on the display 30b of the color map display device 30 having the color map 30a in which the color code is registered.

【0087】また、前記限定された色の画像データを記
憶装置等に記憶させることができ、一度画像処理した画
像は、瞬時にディスプレイ30bに表示することが可能
であると共に、前記限定された画像データは、元の自然
画像の画像データに比較してメモリ容量が減少している
ので、メモリ容量の少ない装置でも容易に扱うことがで
きる。
The image data of the limited color can be stored in a storage device or the like, and the image processed once can be instantaneously displayed on the display 30b, and the limited image data can be displayed. Since the memory capacity of the data is smaller than that of the image data of the original natural image, it can be easily handled even by a device having a small memory capacity.

【0088】(ト)上記操作の反復による代表色の決
定。 本実施例の限定色決定方法では、上述のように決定され
る代表色の選択を、選択された代表色に繰り返し行なう
ことで、代表色を段階的に減らしていくようになってい
る。すなわち、反復制御手段17は、上述のように選択
された代表色にによって表される画像を、元画像データ
として再び上述した作業により代表色の選択を行ない。
これを、設定された回数だけ繰り返し、最終的に必要と
される代表色まで減少させるようになっている。
(G) Determination of a representative color by repeating the above operation. In the limited color determination method of the present embodiment, the representative colors selected as described above are repeatedly selected for the selected representative colors, so that the representative colors are gradually reduced. That is, the repetition control means 17 selects the representative color by the above-described operation again using the image represented by the representative color selected as described above as the original image data.
This is repeated a set number of times to reduce the number of representative colors finally required.

【0089】そして、繰り返し、代表色を選択する際に
は、毎回、周期性係数演算手段3及び強調係数演算手段
19により、ヒストグラムが補正され、ヒストグラム更
新手段によりヒストグラムが、色の変化の穏やかな部分
について重み付けされると共に、輝度もしくは色度が強
調される。従って、画像データは、色の分布及び輝度の
分布という統計的性質について、調整を受けながら代表
色が絞られていくことになり、適応的方法と同様に画像
データの統計的性質に適した代表色が選択されることに
なる。
Each time the representative color is repeatedly selected, the histogram is corrected by the periodicity coefficient calculating means 3 and the enhancement coefficient calculating means 19, and the histogram is updated by the histogram updating means. The parts are weighted and the luminance or chromaticity is emphasized. Therefore, the representative color is narrowed down in the image data while adjusting the statistical properties of the color distribution and the luminance distribution, and the representative color suitable for the statistical property of the image data is adjusted similarly to the adaptive method. The color will be selected.

【0090】以上のように、本実施例の限定色決定装置
は、色の変化の緩やかな部分を画像データの下位3ビッ
トの周期性により特定し、この周期性を係数として、画
像の色分布を重み付け補正し、色変化の緩やかな部分か
ら多くの色を選択する共に、輝度を示す座標軸の階級数
を色度を示す座標の階級数より多くして、人間の視覚の
特性に対応して輝度の異なる色を多く選択することで、
偽輪郭を防止することができる。
As described above, the limited color determination device of the present embodiment specifies the portion where the color changes gradually, based on the periodicity of the lower three bits of the image data, and uses the periodicity as a coefficient to determine the color distribution of the image. Weighting correction, select many colors from the gradual part of the color change, and make the number of ranks of the coordinate axis indicating the luminance greater than the number of ranks of the coordinate indicating the chromaticity, in response to the characteristics of human vision By selecting many colors with different brightness,
False contour can be prevented.

【0091】また、輝度と色度の各座標軸における分散
を比較して、輝度の変化の多い画像データに関しては、
さらに輝度を強調し、輝度の変化が乏しく多くの色相を
有する画像に対しては色度を強調することにより、画像
データの性質に適した代表色を選択することができる。
さらに、上述の操作を繰り返しながら代表色を段階的に
減らしていくことにより、上記下位3ビットの周期性の
計測及び輝度と色度の各座標軸における分散の比較を繰
り返すと共に、これらに対応したヒストグラムの補正を
繰り返すことになり、代表色を画像データの統計的性質
に適応したものに絞り込んでいくことができる。
The variances of the luminance and the chromaticity in each coordinate axis are compared.
Further, by emphasizing the luminance, and by emphasizing the chromaticity of an image having a small change in luminance and many hues, it is possible to select a representative color suitable for the characteristics of the image data.
Further, by repeating the above operation and gradually reducing the representative colors, the measurement of the periodicity of the lower three bits and the comparison of the variance of the luminance and chromaticity on each coordinate axis are repeated, and the histogram corresponding to these is compared. Is repeated, and the representative colors can be narrowed down to those suitable for the statistical properties of the image data.

【0092】なお、これらの処理全体を汎用のコンピュ
ータ上にプログラムとして構成し、実行することも可能
である。また、元の画像データの画素当たりのメモリ容
量を必ずしも24ビットとする必要はなく、さらに、色
変化の特定に用いる下位ビットを下位3ビットとする必
要はない。下位ビットを何桁取るかは、元の画像データ
の画素当たりのメモリ容量等によって変更しても構わな
い。また、本発明によって色数を減らすには、ある程度
処理時間がかかるが、これにより得られた圧縮画像を表
示する際には、復号処理が必要ないため、機械やシステ
ムに依存せず、瞬時に色が限定された圧縮画像の表示が
可能である。これらのことによって、限定色決定方法
は、多くの産業分野への利用が期待できる。
Note that the entirety of these processes can be configured as a program on a general-purpose computer and executed. Also, the memory capacity per pixel of the original image data does not necessarily need to be 24 bits, and the lower bits used for specifying the color change need not be the lower 3 bits. The number of lower bits to be taken may be changed according to the memory capacity per pixel of the original image data and the like. In addition, although it takes some processing time to reduce the number of colors according to the present invention, when displaying a compressed image obtained by this method, decoding processing is not necessary, so that it does not depend on a machine or a system, and is instantaneous. It is possible to display a compressed image with limited colors. For these reasons, the limited color determination method can be expected to be used in many industrial fields.

【0093】[0093]

【発明の効果】以上に述べた本発明の限定色決定方法お
よび装置により、本来フルカラー・ディスプレイ装置で
表示されるべき自然画像を、少数の限定色しか同時表示
できないカラーマップディスプレイ装置上でも、違和感
無く表示できる。
According to the above-described method and apparatus for determining a limited color according to the present invention, a natural image which should be displayed on a full-color display apparatus can be displayed on a color map display apparatus which can simultaneously display only a limited number of limited colors. Can be displayed without.

【0094】すなわち、判別分析により代表色を決定す
る際に、輝度を示す座標軸における階級数と、色度を示
す座標軸における階級数とを異なるものとすることによ
り、画像の輝度や色度の分布に対応して、輝度を強調し
た代表色を選択したり、色度を強調した代表色を選択し
たりすることができる。特に、輝度を強調した代表色を
選択することにより、輝度に敏感な人間の視覚特性に対
応した代表色を選択できると共に、偽輪郭が強調される
のを抑制することができる。
That is, when the representative color is determined by the discriminant analysis, the class number on the coordinate axis indicating the luminance is different from the class number on the coordinate axis indicating the chromaticity, so that the distribution of the luminance and the chromaticity of the image is determined. Accordingly, a representative color whose luminance is emphasized or a representative color whose chromaticity is emphasized can be selected. In particular, by selecting a representative color whose luminance is enhanced, it is possible to select a representative color corresponding to a human visual characteristic that is sensitive to the luminance, and to suppress the false contour from being enhanced.

【0095】さらに、色の緩やかな部分を、下位ビット
の周期性により特定し、ヒストグラムを補正して、色の
緩やかな部分から選択される代表色を増やしてやること
で、確実に偽輪郭を抑制することができる。従って、1
00色以下のような特に色数を少なくする必要のあるC
D−ROM等の自然画像に対しても、違和感の目立ちや
すい部分を特定し、その中から最も違和感のない指定色
数の限定色を求めることにより、効果的に対応すること
ができ、画像データの圧縮上大変有効である。
Further, the gradual color portion is specified by the periodicity of the lower bits, the histogram is corrected, and the number of representative colors selected from the gradual color portion is increased. Can be suppressed. Therefore, 1
C that requires a particularly small number of colors, such as 00 colors or less
Even for natural images such as D-ROMs, it is possible to effectively cope with the problem by identifying portions where conspicuousness is conspicuous, and obtaining a limited number of specified colors with the least discomfort among them. It is very effective in compression of.

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

【図1】上記実施例の限定色決定装置を示す概略図であ
る。
FIG. 1 is a schematic diagram showing a limited color determination device of the embodiment.

【図2】上記実施例の限定色決定方法を説明するための
図面である。
FIG. 2 is a diagram for explaining a limited color determining method of the embodiment.

【図3】上記限定色決定方法を説明するための図面であ
る。
FIG. 3 is a diagram for explaining the above-described limited color determining method.

【図4】上記限定色決定方法を説明するための座標系を
示す図面である。
FIG. 4 is a drawing showing a coordinate system for explaining the above-described limited color determining method.

【図5】上記限定色決定方法を説明するための座標系を
示す図面である。
FIG. 5 is a drawing showing a coordinate system for explaining the above-described limited color determining method.

【図6】上記限定色決定方法を説明するためのヒストグ
ラムを示す図面である。
FIG. 6 is a diagram showing a histogram for explaining the above-described limited color determining method.

【図7】上記限定色決定方法を説明するためのグラフを
示す図面である。
FIG. 7 is a diagram showing a graph for explaining the above-described limited color determining method.

【図8】上記限定色決定方法を説明するためのヒストグ
ラムを示す図面である。
FIG. 8 is a drawing showing a histogram for explaining the above-described limited color determining method.

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

2 下位3ビット記憶手段 3 周期性演算手段 5 色変換手段 7 ヒストグラム演算手段 9 平均・分散演算手段 11 第1主軸演算手段 13 重み付き分散演算手段 14 分割閾値決定手段 16 色領域分割手段 17 分割制御手段 18 強調係数指定手段 19 強調係数演算手段 21 ヒストグラム更新手段 22 逆色変換手段 23 代表色割当手段 41、41a、41b 画素 43 度数分布を示すヒストグラム 44 重み付け係数を示すグラフ 45 重み付け補正されたヒストグラム 2 Lower 3 bits storage means 3 Periodic calculation means 5 Color conversion means 7 Histogram calculation means 9 Average and variance calculation means 11 First spindle calculation means 13 Weighted variance calculation means 14 Division threshold value determination means 16 Color area division means 17 Division control Means 18 Emphasis coefficient designating means 19 Emphasis coefficient calculating means 21 Histogram updating means 22 Inverted color conversion means 23 Representative color allocating means 41, 41a, 41b Pixel 43 Histogram showing frequency distribution 44 Graph showing weighting coefficient 45 Weighted histogram

Claims (8)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 均等色空間において、輝度成分を示す座
標軸における階級数と、色度成分を示す座標軸における
階級数とが異なるように、各座標軸の階級数を設定し、前記各座標軸の該設定された階級で3次元的に分割して
なるクラスタ毎に、前記均等色空間の座標系で表される
カラー画像データの度数分布を求め、 前記各クラスタ毎の 度数分布に対して判別分析を行うこ
とにより前記均等色空間を分割し、 該分割した色領域の各色成分に基づいて各色領域におけ
る代表色を求め、 該求められた代表色により、前記カラー画像データを近
似することを特徴とする限定色決定方法。
1. A class number of each coordinate axis is set in a uniform color space such that a class number on a coordinate axis indicating a luminance component is different from a class number on a coordinate axis indicating a chromaticity component , and the setting of each coordinate axis is set. Three-dimensionally divided by the class
For each cluster represented by the coordinate system of the uniform color space
Obtains a frequency distribution of the color image data, the said uniform color space is divided by performing determine by analysis to the frequency distribution for each cluster, put in each color region based on each color component of the divided color areas
That determine the representative color, the by representative colors determined, limited color determination method characterized by approximating the color image data.
【請求項2】 前記均等色空間において前記度数分布を
求めるに際して、輝度成分を示す座標軸の階級数を、色
度成分を示す座標軸の階級数より多くして、輝度を強調
した代表色を選択することを特徴とする請求項1記載の
限定色決定方法。
2. When obtaining the frequency distribution in the uniform color space, the number of ranks of the coordinate axis indicating the luminance component is set to be larger than the number of ranks of the coordinate axis indicating the chromaticity component, and a representative color whose luminance is emphasized is selected. 2. The method for determining a limited color according to claim 1, wherein:
【請求項3】 前記均等色空間において前記度数分布を
求めるに際して、色度成分を示す座標軸の階級数を、輝
度成分を示す座標軸の階級数より多くして、色度を強調
した代表色を選択することを特徴とする請求項1記載の
限定色決定方法。
3. When calculating the frequency distribution in the uniform color space, a rank of a coordinate axis indicating a chromaticity component is set to be larger than a rank of a coordinate axis indicating a luminance component, and a representative color in which chromaticity is emphasized is selected. 2. The method for determining a limited color according to claim 1, wherein:
【請求項4】 前記均等色空間で表される画像データの
各画素値の度数分布に対して判別分析を行なうことによ
り代表色を求め、求められた代表色について、再び均等
色空間における度数分布を求め、この度数分布に対して
判別分析を行なうことによりさらに少数の代表色を求
め、これを繰り返すことにより段階的に代表色を減らし
て行くに際して、代表色を減らす各段階もしくはいずれ
かの段階で度数分布を求めるのに、輝度成分を示す座標
軸における階級数と、色度成分を示す座標軸における階
級数との比率を変更することを特徴とする請求項1又は
請求項2又は請求項3記載の限定色決定方法。
4. A representative color is obtained by performing a discriminant analysis on a frequency distribution of each pixel value of the image data represented in the uniform color space, and the obtained representative color is again subjected to a frequency distribution in the uniform color space. , And a smaller number of representative colors is obtained by performing discriminant analysis on the frequency distribution, and by repeating this, the number of representative colors is reduced step by step. 4. The method according to claim 1, further comprising: changing a ratio between a class number on a coordinate axis indicating a luminance component and a class number on a coordinate axis indicating a chromaticity component. Limited color determination method.
【請求項5】 前記カラー画像データの各画素の3原色
の値を表すデジタルデータの下位ビットを読み取り、該
下位ビットに同じ値が出現する周期性を求め、 一方前記カラー画像データを均等色空間の座標系で表し
た各画素値に対して、該均等色空間での輝度成分を示す
座標軸と色度成分を示す座標軸における度数分布を求
め、該度数分布を前記周期性のデ一タに基づいて重み付
け補正し、 該重み付け補正した度数分布に対して更に輝度を示す座
標軸における階級数と色度を示す座標軸における階級数
を異なるものとして度数分布を補正し、判別分析を行な
うことを特徴とする請求項1又は請求項2又は請求項3
又は請求項4記載の限定色決定方法。
5. Reading the lower bits of digital data representing the values of the three primary colors of each pixel of the color image data, and determining the periodicity in which the same value appears in the lower bits. For each pixel value represented by the coordinate system, a frequency distribution on a coordinate axis indicating a luminance component and a coordinate axis indicating a chromaticity component in the uniform color space is obtained, and the frequency distribution is calculated based on the periodicity data. And performing a discriminant analysis by correcting the frequency distribution by making the class number on the coordinate axis indicating luminance and the class number on the coordinate axis indicating chromaticity different from each other with respect to the weight distribution corrected by weighting. Claim 1 or Claim 2 or Claim 3
Alternatively, the limited color determining method according to claim 4.
【請求項6】 均等色空間の座標系で表されるカラー画
像データを、限定された代表色で近似する限定色決定装
置において、 前記均等色空間の、輝度成分を示す座標軸における階級
数と、色度成分を示す座標軸における階級数とが異なる
ように、各座標軸の階級数を設定する階級数設定手段
と、前記各座標軸の該設定された階級で3次元的に分割して
なるクラスタ毎に、前記カラー画像データの 度数分布を
求める度数分布演算手段と、前記各クラスタ毎の 度数分布に対して判別分析を行うこ
とにより前記均等色空間を分割する色領域分割手段と、 前記分割した色領域の各色成分に基づいて各色領域にお
ける 代表色を決定する代表色決定手段と、 を具備してなることを特徴とする限定色決定装置。
6. A limited color determination device that approximates color image data represented by a coordinate system of a uniform color space with a limited representative color, comprising: a class number on a coordinate axis indicating a luminance component of the uniform color space; Class number setting means for setting the class number of each coordinate axis so that the class number on the coordinate axis indicating the chromaticity component is different , and three-dimensionally dividing by the set class of each coordinate axis
Each comprising a cluster, a frequency distribution calculating means for calculating a frequency distribution of the color image data, a color area division unit for dividing the uniform color space by performing discriminant analysis the relative frequency distribution of each cluster, the Based on each color component of the divided color area,
And a representative color determining means for determining a representative color to be determined.
【請求項7】 均等色空間の座標系で表されるカラー画
像データの各画素値の度数分布に対して判別分析を行な
うことにより代表色を求め、前記カラー画像データを限
定された代表色で近似する限定色決定装置であって、 前記カラー画像データの3原色を表すデジタルデータに
対して下位ビットに同じ値が出現する周期性係数を求め
る周期性演算手段と、 前記均等色空間における輝度成分を示す座標軸と色度成
分を示す座標軸に対する前記カラー画像データの各画素
値の度数部分を求める度数分布演算手段と、 前記度数分布演算手段により求められた度数分布を前記
周期性係数によって重み付け補正する度数分布補正手段
と、 前記重み付け補正された度数分布に対して、輝度成分を
示す座標軸の階級数と色度成分を示す座標軸の階級数を
異なるものとして度数分布を補正し、判別分析を行なう
ことにより代表色を決定する代表色決定手段と、 を具備してなることを特徴とする限定色決定装置。
7. A representative color is obtained by performing a discriminant analysis on a frequency distribution of each pixel value of color image data represented by a coordinate system of a uniform color space, and the color image data is defined by a limited representative color. An approximate limited color determination device, comprising: periodicity calculating means for determining a periodicity coefficient in which the same value appears in lower bits of digital data representing three primary colors of the color image data; and a luminance component in the uniform color space. And a frequency distribution calculating means for calculating a frequency part of each pixel value of the color image data with respect to a coordinate axis indicating the chromaticity component and a coordinate axis indicating the chromaticity component. The frequency distribution calculated by the frequency distribution calculating means is weighted and corrected by the periodicity coefficient. A frequency distribution correcting unit, wherein the weight distribution of the weighted corrected frequency distribution is different from the rank of the coordinate axis indicating the luminance component and the rank of the coordinate axis indicating the chromaticity component. The frequency distribution is corrected as shall, discriminant analysis limited color determination apparatus characterized by comprising anda representative color determining means for determining a representative color by performing.
【請求項8】 前記均等色空間において各座標軸毎に画8. An image for each coordinate axis in the uniform color space.
素の分布の分散を求め、Find the variance of the prime distribution, 該求めた各座標軸間の分散の比率に応じて、前記色度成The chromaticity component is determined according to the calculated ratio of the variance between the coordinate axes.
分を示す座標軸における階級数に対する、前記輝度成分The luminance component with respect to the class number on the coordinate axis indicating the minute
を示す座標軸における階級数の比率を決定するDetermine the ratio of classes in the coordinate axis ことを特Specially
徴とする請求項1に記載の限定色決定方法。The method for determining a limited color according to claim 1, wherein:
JP4161445A 1992-06-17 1992-06-19 Limited color determination method and limited color determination device Expired - Fee Related JP2973710B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP4161445A JP2973710B2 (en) 1992-06-19 1992-06-19 Limited color determination method and limited color determination device
US08/027,848 US5608851A (en) 1992-06-17 1993-03-08 Color variation specification method and a device therefor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4161445A JP2973710B2 (en) 1992-06-19 1992-06-19 Limited color determination method and limited color determination device

Publications (2)

Publication Number Publication Date
JPH06124343A JPH06124343A (en) 1994-05-06
JP2973710B2 true JP2973710B2 (en) 1999-11-08

Family

ID=15735253

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4161445A Expired - Fee Related JP2973710B2 (en) 1992-06-17 1992-06-19 Limited color determination method and limited color determination device

Country Status (1)

Country Link
JP (1) JP2973710B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5585944A (en) * 1994-05-10 1996-12-17 Kaleida Labs, Inc. Method for compressing and decompressing images by subdividing pixel color distributions
WO2005057908A1 (en) * 2003-12-11 2005-06-23 Fujitsu Limited Image processing method, program, and device
US8320669B2 (en) 2007-06-28 2012-11-27 Konica Minolta Business Technologies, Inc. Image processing method, image processing apparatus, image data compression device, and computer program
CN111311525A (en) * 2019-11-20 2020-06-19 重庆邮电大学 Image gradient field double-interval equalization algorithm based on histogram probability correction

Also Published As

Publication number Publication date
JPH06124343A (en) 1994-05-06

Similar Documents

Publication Publication Date Title
KR910000545B1 (en) Color image display system
EP0693738A2 (en) Method and apparatus for generating color image mask
GB2236463A (en) Method and apparatus for dithering antialiased vectors
EP0357385B1 (en) Image processing method and apparatus
US7450121B2 (en) Dynamic bit depth rendering
US5608851A (en) Color variation specification method and a device therefor
US5264840A (en) Method and apparatus for vector aligned dithering
JP3126046B2 (en) Color adjustment method and color adjustment device for color image
JP2973710B2 (en) Limited color determination method and limited color determination device
WO2001043076A1 (en) Color conversion matrix based on minimal surface theory
US6271850B1 (en) Image generation apparatus, image generation method, image generation program recording medium, image composition apparatus, image composition method, and image composition program recording medium
JPH05300375A (en) Sharpness processing unit
JP2522369B2 (en) Color image limited color representation method and apparatus
US5778105A (en) Method of and apparatus for removing artifacts from a reproduction
JP3306964B2 (en) Limited color determining method and apparatus
JP2806152B2 (en) Color change identification method, limited color determination method, and limited color determination device
CN112513940A (en) Alpha value determination device, alpha value determination method, program, and data structure of image data
JP2914074B2 (en) Limited color determining method and apparatus
JP3674965B2 (en) Color image compression method
JP2896319B2 (en) How to make a color image mask
JPH04301685A (en) Method and apparatus for display
JP2775748B2 (en) Method and apparatus for expressing limited color of color image
JP2896317B2 (en) How to make a color image mask
KR0155925B1 (en) Digital color image
JPH0737060A (en) Image color quantizing method

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 19990803

LAPS Cancellation because of no payment of annual fees