JP3306964B2 - Limited color determining method and apparatus - Google Patents

Limited color determining method and apparatus

Info

Publication number
JP3306964B2
JP3306964B2 JP04964993A JP4964993A JP3306964B2 JP 3306964 B2 JP3306964 B2 JP 3306964B2 JP 04964993 A JP04964993 A JP 04964993A JP 4964993 A JP4964993 A JP 4964993A JP 3306964 B2 JP3306964 B2 JP 3306964B2
Authority
JP
Japan
Prior art keywords
color
pixel
image data
image
representative
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
JP04964993A
Other languages
Japanese (ja)
Other versions
JPH06259539A (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 Inc
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 Inc filed Critical Toppan Inc
Priority to JP04964993A priority Critical patent/JP3306964B2/en
Publication of JPH06259539A publication Critical patent/JPH06259539A/en
Application granted granted Critical
Publication of JP3306964B2 publication Critical patent/JP3306964B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

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 generating a natural image using a limited number of representative colors when a digitized natural image is displayed on a display device in a limited number of colors. The present invention relates to a method and an apparatus for determining a limited color for display.

【0002】[0002]

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

【0003】一方、CD−ROMやCD−I、CAD
(Computer Aided Design)、CAI(Computer Assist
ed Instruction)や、パソコン、X−Window System等で
画像を扱う世界では、上記224色のうちの限定された数
の色しか同時に表示できないカラーディスプレイ装置を
用いる場合が多く、このような場合、画像メモリの画素
当たりの容量が、通常8ビット以下にされているので、
同時表示できる色の数は28=256までである。そし
て、256色以下のような限られた色数では、自然画像
を劣化無く表示することが難しいが、これを可能にした
いという要求が多い。
On the other hand, CD-ROM, CD-I, CAD
(Computer Aided Design), CAI (Computer Assist
ed Instruction), a personal computer, an X-Window System, etc., in a world where images are handled, a color display device that can simultaneously display only a limited number of the above-mentioned 224 colors is often used. Since the capacity per pixel of the memory is usually set to 8 bits or less,
The number of colors that can be displayed simultaneously is up to 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 to make this possible.

【0004】また、上記ディスプレイ装置等のデータ容
量の関係から、自然画像の色数を自然画像の劣化が無い
ように減らして、画像データのデータ量を減らしたいと
いう要求も多い。このような目的のため、従来、多数の
色から少数の表示色を選択して表示するカラーマップデ
ィスプレイのために、自然画像を視覚的な劣化を抑制し
ながら限られた色数で表示する方法が知られている。
[0004] Further, from the relation of the data capacity of the display device and the like, there are many demands to reduce the number of colors of the natural image so that the natural image is not deteriorated, thereby reducing the data amount of the image data. For such a purpose, a method of displaying a natural image with a limited number of colors while suppressing visual deterioration has been conventionally used for a color map display that selects and displays a small number of display colors from a large number of colors. It has been known.

【0005】上記方法としては、例えば、色をR,G,
Bの3原色の各値で表わした場合に、R,G,Bの各値
を座標とする3次元の直交座標系で表わされる空間を色
空間とし、この色空間において、カラー画像データに含
まれている各画素の色の分布を解析する。そして、デー
タに含まれる色が多く分布している上記色空間内の色領
域からは多く、少ない分布の色領域からは少なくなるよ
うに表示色を選び、これらの表示色をカラーマップに登
録する。そして、カラー画像データの各画素の色に最も
近い表示色を代表色として各画素に割り当て、カラーマ
ップに代表色として登録された色コードを画像メモリの
各画素の位置に書き込むことによって近似表示を行うも
のがある。
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 orthogonal coordinate system having coordinates of the values of R, G, and B as a color space, and included in the color image data in this color space. The color distribution of each pixel is analyzed. Then, display colors are selected such that the display colors are large from the color regions in the color space where many colors included in the data are distributed and are small from the color regions with a small distribution, and these display colors are registered in the color map. . Then, a display color closest to the color of each pixel of the color image data is assigned to each pixel as a representative color, and a color code registered as a representative color in the color map is written at the position of each pixel in the image memory to perform approximate display. There is something to do.

【0006】上記のように代表色を選択する方法の一つ
として、大津の判別分析(信学論 (D).J63-D、4、pp.349-3
56.昭和55-4.)を用いたものがある。また、色空間に
は、RGBの3原色の組み合わせにより色を表現するも
のだけではなく、人間の色差を考慮したL***、L*
**均等色空間(CIE(国際照明委員会)で勧告の
もの)などがあり、これらの色空間を用いて上記判別分
析法を行うこともできる。また、人間の視覚特性を利用
し、さらにディザリング法を適用した方法(画像電子学
会誌 第18巻 第5号 (1989) p.293-301;田島、池
田)等が提案されている。
As one of the methods for selecting a representative color as described above, Otsu's discriminant analysis (IEICE (D). J63-D, 4, pp. 349-3)
56. Showa 55-4.). Further, the color space is not limited to one that expresses a color by a combination of three primary colors of RGB, but also L * u * v * and L * in consideration of human color difference .
a * b * uniform color space (recommended by the CIE (International Commission on Illumination)) and the like, and the discriminant analysis method can be performed using these color spaces. In addition, a method using the visual characteristics of humans and further applying a dithering method (Journal of the Institute of Image Electronics Engineers of Japan, Vol. 18, No. 5, (1989) p. 293-301; Tajima, Ikeda) and the like have been proposed.

【0007】[0007]

【発明が解決しようとする課題】ところで、上記判別分
析法は、単に色の分布のまとまりの良さにより表示色を
決めるものなので、上記RGB色空間において、判別分
析法により表示色を決めて作成された画像が人間の目に
とって自然画像を違和感無く再現したものとならなかっ
た。例えば、画像データの色の変化の緩やかな部分に少
数の代表色が割り当てられた場合に、偽輪郭が発生する
ことがあり、特に、人間の視覚特性が輝度に対して敏感
なことによって、輝度の階調の変化が少数の代表色によ
り表現された場合に偽輪郭が際だってしまうという問題
があった。
Since the above-described discriminant analysis method simply determines a display color based on the goodness of the color distribution, the discriminant analysis method is created by determining a display color by the discriminant analysis method in the RGB color space. The image did not become a natural image for the human eye without 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. There is a problem in that when the change in the gradation is represented by a small number of representative colors, false contours are noticeable.

【0008】また、上記判別分析法により選択された代
表色は、画像データの各画素の色を色空間に配置した状
態で、各画素の分布により決められたものなので、画像
データ上での色の配置が考慮されておらず、自然画像を
違和感無く再現することが困難であった。
The representative color selected by the above-described discriminant analysis is determined by the distribution of each pixel in a state where the color of each pixel of the image data is arranged in a color space. However, it is difficult to reproduce a natural image without discomfort.

【0009】例えば、風景写真の画像データにおいて、
空と海とが写されている場合に、空と海とでは、共に青
系統の色を有する画素が最も多く含まれており、この画
像データの各画素をその色に基づいて色空間に配置した
場合に、空の部分の画素と海の部分の画素とが、色空間
上で互いに近い位置に配置され、一つのクラスタを形成
してしまうことになり、上記判別分析法により色数を減
らしていくと、空と海とに略同じような代表色が割り当
てられる可能性があり、その場合に、空と海の色の違い
が無くなってしまうという問題があった。
For example, in image data of a landscape photograph,
When the sky and the sea are imaged, the sky and the sea each contain the largest number of pixels having a bluish color, and each pixel of this image data is arranged in a color space based on that color. In this case, the pixels of the sky and the pixels of the sea are arranged at positions close to each other in the color space, and form one cluster. As a result, there is a possibility that substantially similar representative colors may be assigned to the sky and the sea, and in that case, there is a problem that the color difference between the sky and the sea disappears.

【0010】なお、この問題は、空と海とを写した風景
写真に限られるものではなく、似通った色を有する異な
ったものが描かれた画像データを少数の代表色で近似表
示しようとした場合に起こる問題である。
[0010] This problem is not limited to a landscape photograph of the sky and the sea, but an attempt is made to approximate and display image data in which different objects having similar colors are drawn using a small number of representative colors. This is a problem that arises in some cases.

【0011】また、従来の手法としては、上記判別分析
法による方法等のように、原画像の状態、例えば色の分
布傾向が極端に異なるにも拘わらず、その傾向の違いを
考慮しない方法で限られた表示色を選択して画像を作成
する非適応的方法と、原画像の色分布等の統計的性質に
適するように限定色を選択する適応的方法がある。
In addition, as a conventional method, a method in which the state of an original image, for example, a color distribution tendency is extremely different from the original image state, is not taken into consideration, such as the method based on the above-described discriminant analysis method. There are a non-adaptive method of creating an image by selecting a limited display color, and an adaptive method of selecting a limited color so as to be suitable for statistical properties such as the color distribution of the original image.

【0012】上記非適応的方法では、前述の判別分析法
を用いた場合のように必ずしも人間の目から見た場合の
原画像と近似された画像とはならず、画質に問題があ
る。また、適応的方法では、画像データ毎の色分布等を
調べ、色分布の状態に応じて統計的な処理の仕方を変更
することが必要となり、一般的に処理が煩雑になると共
に、途中で人間の判断を必要としたり、処理時間が長い
という問題がある。
In the above non-adaptive method, unlike the case of using the above-described discriminant analysis method, the image is not always approximated to the original image when viewed from the human eyes, and there is a problem in image quality. In addition, in the adaptive method, it is necessary to check the color distribution and the like of each image data, and to change the statistical processing method according to the state of the color distribution. There are problems that require human judgment and that the processing time is long.

【0013】そして、一般的な画像データに対し、ある
程度の画質を保てる非適応的方法は、画像データを特に
選ばず、人の判断も必要でないため、処理時間が早いと
いう利点から、適応的方法よりも発展してきたが、画像
データとなる自然画像は、その内容によって色分布等の
統計的性質が非常に異なるものもあり、画質の点からは
依然適用的方法の優位は変わっていない。
The non-adaptive method that can maintain a certain level of image quality for general image data does not particularly select image data and does not require human judgment. Although natural images serving as image data have more advanced statistical characteristics such as color distribution depending on their contents, the superiority of the applied method has not changed in terms of image quality.

【0014】特に、50色以下の少ない数の限定色を求
めるには、人間のものの見方を考慮することが不可欠で
あり、非適応的方法はまだこれに成功していない。人の
判断を途中で入力してこれを取り込むことのできる適応
的方法がやはり優位である。
In particular, in order to obtain a small number of limited colors of 50 colors or less, it is essential to consider a human viewpoint, and the non-adaptive method has not been successful yet. An adaptive method that can input and judge a person's judgment on the way is still superior.

【0015】本発明は、上記課題に鑑みてなされたもの
であり、人間の視覚が特に輝度の変化に敏感であるとい
う点に着目し、また人間の色の見方として、色空間に展
開する以前の画像としての色のまとまり、即ち画像上で
の色の連続性が重要であるとの見地から、上記非適応的
方法と適応的方法との問題点を解決することができる限
定色決定方法および装置を提供することを目的とするも
のである。
The present invention has been made in view of the above problems, and focuses on the fact that human vision is particularly sensitive to a change in luminance. A limited color determination method that can solve the problems of the non-adaptive method and the adaptive method from the viewpoint that the color cohesion as an image, that is, the continuity of colors on the image is important, and It is intended to provide a device.

【0016】[0016]

【課題を解決するための手段】本発明の請求項1記載の
限定色決定方法は、3原色の座標系で表現されるカラー
画像データを均等色空間の座標系に変換し、変換された
座標系における上記画像データの各画素の度数分布に対
して判別分析を行うことにより代表色を求め、上記画像
データを限定された代表色で近似表示するためのもので
あり、上記画像データの画像上に配列された各画素の色
成分の画像配列上での分布から上記画像配列上での各画
素の色成分のまとまりの良さを数値化し、この数値化さ
れた画像配列上での各画素の色成分のまとまりの良さを
各画素の各色成分に対応付けして上記色空間に新たに色
成分のまとまりの良さを示す座標軸を設定することによ
り多次元空間を設け、この多次元空間の座標系における
上記画像データの各画素の度数分布を求め、上記度数分
布に対して判別分析を行うことにより代表色を求めるこ
とを上記課題の解決手段とした。
According to a first aspect of the present invention, there is provided a limited color determining method for converting color image data represented by a coordinate system of three primary colors into a coordinate system of a uniform color space, and converting the converted coordinates. A representative color is obtained by performing a discriminant analysis on a frequency distribution of each pixel of the image data in the system, and the image data is displayed approximately by a limited representative color. From the distribution of the color components of each pixel arranged in the image array, the goodness of the unity of the color components of each pixel on the image array is quantified, and the color of each pixel on the quantified image array The multi-dimensional space is provided by associating the unity of the components with each color component of each pixel and newly setting a coordinate axis indicating the unity of the color components in the color space, in the coordinate system of the multi-dimensional space. The above image data Obtains a frequency distribution of the pixel, the determination of the representative colors by performing discriminant analysis on the frequency distribution was means for solving the above-described problem.

【0017】そして、本発明の請求項2記載の限定色決
定方法は、3原色の座標系で表現されるカラー画像デー
タを均等色空間の座標系に変換し、変換された座標系に
おける上記画像データの各画素の度数分布に対して判別
分析を行うことにより代表色を求め、上記画像データを
限定された代表色で近似表示するためのものであり、上
記画像データの画像上に配列された各画素の色成分の画
像配列上での分布から、上記画像を画素間の色変化に基
づいて分割可能な領域に分割し、各画素が画像のどの領
域に属するかを調べ、各領域毎にその内部の各画素の色
成分のまとまりの良さを数値化し、この数値化された色
成分のまとまりの良さを各画素の各色成分に対応付けし
て上記色空間に新たに色成分のまとまりの良さを示す座
標軸を設定することにより多次元空間を設け、この多次
元空間の座標系における上記画像データの各画素の度数
分布を求め、上記度数分布に対して判別分析を行うこと
により代表色を求めることを上記課題の解決手段とし
た。
The limited color determining method according to the second aspect of the present invention converts color image data expressed in a coordinate system of three primary colors into a coordinate system in a uniform color space, and converts the image data in the converted coordinate system into a uniform color space. The representative color is obtained by performing a discriminant analysis on the frequency distribution of each pixel of the data, and is used for approximating the image data with a limited representative color, and is arranged on the image of the image data. From the distribution of the color components of each pixel on the image array, the image is divided into regions that can be divided based on the color change between pixels, and it is checked which region of the image each pixel belongs to. The goodness of the color components of each pixel therein is quantified, and the goodness of the quantified color components is associated with each color component of each pixel, and the goodness of the color components is newly collected in the color space. Set the coordinate axis indicating Means for obtaining a frequency distribution of each pixel of the image data in a coordinate system of the multidimensional space, and obtaining a representative color by performing a discriminant analysis on the frequency distribution. And

【0018】また、本発明の請求項3記載の限定色決定
装置は、3原色の座標系で表現されるカラー画像データ
を均等色空間の座標系に変換し、変換された座標系にお
ける上記画像データの各画素の度数分布に対して判別分
析を行うことにより代表色を求め、上記画像データを限
定された代表色で近似表示するためのものであり、上記
画像データの画像上に配列された各画素の画像配列上で
の色成分の分布から各画素の色成分のまとまりの良さを
数値化する数値化手段と、該数値化手段により数値化さ
れた色成分のまとまりの良さを各画素の色成分に対応付
けして上記均等色空間に新たに色成分のまとまりの良さ
を示す座標軸を設定することにより4次元空間を設け、
該4次元空間の座標系における上記画像データの各画素
の度数分布を求める度数分布演算手段と、上記度数分布
演算手段により求められた上記4次元空間の上記画像デ
ータの各画素の度数分布に対して判別分析を行うことに
より代表色を求める判別分析演算手段とを具備してなる
ことを上記課題の解決手段とした。
According to a third aspect of the present invention, there is provided a limited color determining apparatus for converting color image data represented by a coordinate system of three primary colors into a coordinate system of a uniform color space, and converting the image data in the converted coordinate system to a uniform color space. The representative color is obtained by performing a discriminant analysis on the frequency distribution of each pixel of the data, and is used for approximating the image data with a limited representative color, and is arranged on the image of the image data. Numerical means for quantifying the goodness of the color components of each pixel from the distribution of the color components on the image array of each pixel, and the goodness of the color components quantified by the numerical means for each pixel. A four-dimensional space is provided by newly setting a coordinate axis indicating the goodness of the color components in the uniform color space in association with the color components,
A frequency distribution calculating means for obtaining a frequency distribution of each pixel of the image data in the coordinate system of the four-dimensional space; and a frequency distribution of each pixel of the image data in the four-dimensional space obtained by the frequency distribution calculating means. And a discriminant analysis operation means for obtaining a representative color by performing discriminant analysis by using the discriminant analysis.

【0019】そして、本発明の請求項4記載の限定色決
定装置は、3原色の座標系で表現されるカラー画像デー
タを均等色空間の座標系に変換し、変換された座標系に
おける上記画像データの各画素の度数分布に対して判別
分析を行うことにより代表色を求め、上記画像データを
限定された代表色で近似表示するためのものであり、上
記画像データの画像上に配列された各画素の画像配列位
上での色成分の分布から上記画像を各画素間の色変化に
基づいて分割可能な領域に分割する画像分割手段と、上
記画像データの各画素が上記画像分割手段に分割された
領域のうちのどの領域に属するかを求める画素所属領域
演算手段と、上記領域内の各画素の色成分の分布から各
画素の色成分のまとまりの良さを数値化する数値化手段
と、該数値化手段により数値化された色成分のまとまり
の良さを各画素の各色成分に対応付けして上記均等色空
間に新たにに色成分のまとまりの良さを示す座標軸を設
定することにより4次元空間を設け、該4次元空間の座
標系における上記画像データの各画素の度数分布を求め
る度数分布演算手段と、上記度数分布演算手段により求
められた上記4次元空間の上記画像データの各画素の度
数分布に対して判別分析を行うことにより代表色を求め
る判別分析演算手段とを具備してなることを上記課題の
解決手段とした。
The limited color determining apparatus according to a fourth aspect of the present invention converts the color image data represented by the coordinate system of the three primary colors into a coordinate system of a uniform color space, and converts the image data in the converted coordinate system. The representative color is obtained by performing a discriminant analysis on the frequency distribution of each pixel of the data, and is used for approximating the image data with a limited representative color, and is arranged on the image of the image data. An image dividing unit that divides the image into regions that can be divided based on a color change between the pixels based on a distribution of color components on an image arrangement position of each pixel, and each pixel of the image data is transmitted to the image dividing unit. Pixel belonging area calculating means for determining which of the divided areas belongs to, and numerical value means for quantifying the goodness of the color components of each pixel from the distribution of the color components of each pixel in the area. , The digitizing means A four-dimensional space is provided by associating the united goodness of the color components more digitized with each color component of each pixel and newly setting a coordinate axis indicating the goodness of the unity of the color components in the uniform color space, A frequency distribution calculating means for obtaining a frequency distribution of each pixel of the image data in the coordinate system of the four-dimensional space; and a frequency distribution of each pixel of the image data in the four-dimensional space obtained by the frequency distribution calculating means. And a discriminant analysis operation means for obtaining a representative color by performing discriminant analysis by using the discriminant analysis.

【0020】[0020]

【作用】上記請求項1および3記載の構成によれば、例
えば、L*,u*,v*もしくはL*,a*,b*の3つの座標軸
で表わされる均等色空間に、画像配列上の各画素の色成
分のまとまりの良さを示す座標軸を新たに加えて4次元
空間を設けることになる。ここで画像配列上の各画素の
色成分のまとまりの良さを説明する。一般に、画像上に
描かれる物体は、それぞれ比較的近い系統の色で表わさ
れている。例えば、海や空は青系統の色を多く含み、林
檎は赤系統の色を多く含んでいる。そして、画像配列上
の海や空が描かれた部分には、青系統の色を有する画素
がまとまって存在しており、これをまとまりの良さとし
て表現している。
According to the structure of the first and third aspects, for example, the uniform color space represented by three coordinate axes of L * , u * , v * or L * , a * , b * is used for image arrangement. A new coordinate axis indicating the cohesion of the color components of each pixel is newly added to provide a four-dimensional space. Here, the goodness of the unity of the color components of each pixel on the image array will be described. In general, objects drawn on an image are represented by relatively similar colors. For example, the sea and sky contain many blue-based colors, and apples contain many red-based colors. Then, in a portion where the sea and the sky are drawn on the image array, pixels having a bluish color are present collectively, and this is expressed as goodness of unity.

【0021】そして、この画像配列上の各画素の色成分
のまとまりの良さは、例えば、近似した色の画素がまと
まっていくつ存在するか、任意の範囲内に近似した色の
画素がどのくらいの割合で存在するかなどを測定するこ
とにより数値化することができる。
The goodness of the unity of the color components of each pixel on the image array is determined by, for example, how many pixels of similar colors are present together, and how many pixels of similar colors are within an arbitrary range. It can be converted into a numerical value by measuring whether or not it exists.

【0022】そして、上記4次元空間に画像データの各
画素を展開して、上記4次元空間における画素の度数分
布を求め、求められた度数分布に対して判別分析法によ
り代表色を求めることにより、従来、均等色空間上で判
別分析を行った場合に失われてしまう各画素の画像配列
上での位置と色との関係の情報の一部を取り込んだ状態
で判別分析を行うことができる。
Then, each pixel of the image data is developed in the four-dimensional space, a frequency distribution of the pixels in the four-dimensional space is obtained, and a representative color is obtained from the obtained frequency distribution by a discriminant analysis method. Conventionally, discriminant analysis can be performed in a state in which a part of the information on the relationship between the position on the image array and the color of each pixel, which is lost when the discriminant analysis is performed on the uniform color space, is conventionally taken in. .

【0023】すなわち、均等色空間上では、互いに近似
した色を有する画素が、互いに近接した位置に配置さ
れ、一つの画素の集合=クラスタを形成することになる
が、上記4次元空間上では、互いに近似した色を有する
画素が、必ずしも近接した位置に配置されるとは限ら
ず、上記数値化された色成分のまとまりの良さが違え
ば、異なるクラスタに属することになり、判別分析に際
して、似たような色が別々の判別分析の閾値による分割
領域に属する可能性がある。
That is, in the uniform color space, pixels having colors similar to each other are arranged at positions close to each other to form a set of one pixel = cluster, but in the four-dimensional space, Pixels having colors similar to each other are not always arranged at close positions, and if the unity of the numerically represented color components is different, they belong to different clusters. Such a color may belong to a divided area based on different threshold values for discriminant analysis.

【0024】従って、海と空とのように近似した色を有
する2つ以上の被写体が描かれた画像において、極めて
少ない代表色に限定して画像を表示した場合に、海と空
とが違う色で描かれる可能性が高い。
Therefore, in an image in which two or more subjects having similar colors such as the sea and the sky are drawn, when the image is displayed with only a few representative colors, the sea and the sky are different. Likely to be painted in color.

【0025】また、画像データ上で、一つの被写体の部
分に含まれる画素は、似たような色を有すると共に同じ
ようなまとまりの良さを示す可能性が高く、前記被写体
を表わす部分に含まれる画素は、上記4次元空間上で密
集した状態になり、比較的多くの代表色を選択する場合
に、判別分析法により上記画素が密集した部分から多く
の色が選択されることになる。すなわち、似たような色
が画像上でまとまって存在する部分(色の変化が緩やか
な部分)に多くの色が配色されることになり、偽輪郭の
発生を防止することができる。
In the image data, pixels included in one subject portion are likely to have similar colors and exhibit similar coherence, and are included in the portion representing the subject. The pixels are densely packed in the four-dimensional space, and when selecting a relatively large number of representative colors, many colors are selected from the densely packed pixels by the discriminant analysis method. That is, many colors are arranged in a portion where similar colors are present collectively on the image (a portion where the color changes gradually), and the occurrence of a false contour can be prevented.

【0026】また、請求項2および4記載の構成によれ
ば、画像配列上の各画素の色成分のまとまりの良さを数
値化するに当たって、予め、上記画像データの画像上に
配列された各画素の色成分の画像配列上での分布から、
上記画像を画素間の色変化に基づいて分割可能な領域に
分割している。
According to the second and fourth aspects of the present invention, in order to quantify the goodness of the color components of the respective pixels on the image array, the respective pixels previously arranged on the image of the image data are used. From the distribution of the color components on the image array,
The image is divided into regions that can be divided based on a color change between pixels.

【0027】例えば、画像に描かれた被写体は、その輪
郭線において、画像配列上で互いの隣接した画素の色成
分が大きく変化することになり、この変化により画像を
分割することができる。また、JPEG等に用いられる
離散コサイン変換等の周波数変換を用いて空間周波数の
分布を求めることにより、画像を分割することができ
る。
For example, in a subject drawn in an image, the color components of pixels adjacent to each other on the image array greatly change in the outline, and the image can be divided by this change. Further, an image can be divided by obtaining a spatial frequency distribution using a frequency transform such as a discrete cosine transform used in JPEG or the like.

【0028】以上のようにして予め画像を領域分割し、
分割された領域内において、近似した色の画素の割合を
求めることにより容易に色成分のまとまりの良さを数値
化することができる。そして、上記請求項1および3記
載の発明と同様に、均等色空間を用いた判別分析に、画
像上の画素の位置と色との関係の情報の一部を取り込む
ことができる。
As described above, the image is divided into regions in advance.
By calculating the ratio of pixels of similar colors in the divided areas, it is possible to easily digitize the goodness of unity of color components. As in the first and third aspects of the present invention, a part of the information on the relationship between the positions of the pixels on the image and the colors can be taken into the discriminant analysis using the uniform color space.

【0029】[0029]

【実施例】以下に、本発明の一実施例を図面を参照して
説明する。図1は、本発明の限定色決定方法を用いた限
定色決定装置の概略図を示すものであり、図2は、本発
明の限定色決定方法のアルゴリズムを示すフローチャー
トを示すものであり、図3ないし図9は、本発明の限定
色決定方法を説明するための図面である。
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 using the limited color determining method of the present invention. FIG. 2 is a flowchart showing an algorithm of the limited color determining method of the present invention. 3 to 9 are views for explaining the limited color determining method of the present invention.

【0030】以下に本実施例の限定色決定を用いて画像
処理を行う限定色決定装置について図1を参照して説明
する。上記限定色決定装置は、画像データを格納する画
像記憶手段1と、該画像記憶手段1に記憶された画像デ
ータの上位4ビットを記憶する上位4ビット画像記憶手
段2と、上位4ビット画像記憶手段に記憶された上位4
ビットの画像データを画像サイズに応じて定めたサイズ
の部分セルに分画するモザイク画像演算手段3と、該モ
ザイク画像演算手段3により部分セルに分画されたモザ
イク画像の各セル毎にセル内に優位に存在する色成分を
求めるモザイクセル色決定手段4と、該モザイクセル色
決定手段4により求められたモザイクセル色を記憶する
モザイクセル色記憶手段5と、上記モザイク画像におい
て隣接するセルに同じモザイクセル色の現れる連続性を
各セル毎に鉛直、水平、左斜め、右斜めの4方向に対し
て求め、その連続性を連続性値として数値化する連続性
値演算手段6と、該連続性値演算手段6により数値化さ
れた各色成分の連続性値を記憶する連続性値記憶手段7
とを備えている。
A limited color determining apparatus for performing image processing using the limited color determination according to the present embodiment will be described below with reference to FIG. The limited color determination device includes an image storage unit 1 for storing image data, an upper 4-bit image storage unit 2 for storing upper 4 bits of the image data stored in the image storage unit 1, and an upper 4-bit image storage unit. Top 4 stored in the means
A mosaic image calculating means 3 for dividing the bit image data into partial cells of a size determined according to the image size, and a mosaic image calculating means 3 for dividing each mosaic image into partial cells into cells. A mosaic cell color determining means 4 for finding a color component which is superior to the mosaic cell, a mosaic cell color storing means 5 for storing the mosaic cell color calculated by the mosaic cell color determining means 4, A continuity value calculating means 6 for determining the continuity of appearance of the same mosaic cell color in each of the four directions of vertical, horizontal, diagonally left and diagonally right, and quantifying the continuity as a continuity value; Continuity value storage means 7 for storing the continuity value of each color component digitized by the continuity value calculation means 6
And

【0031】また、上記限定色決定装置は、後述の
(1)〜(7)式によりカラー画像のRGBデータをL
***データに画素毎に色変換する色変換手段8と、
*、a*、b*およびその色成分の連続性値で張られる
4次元空間に各画素をそのL***および連続性値に
基づいて展開し、該4次元空間における各画素の集合=
クラスタを記憶するクラスタ記憶手段9と、上記各クラ
スタにおいてL*,a*,b*およびその色成分の連続性値
を示す座標軸のうち、分散が最大となる座標軸=主軸を
計算する主軸演算手段10と、該主軸演算手段10によ
り求められた主軸を記憶する主軸記憶手段11と、クラ
スタ記憶手段9に記憶された各クラスタ毎にクラスタ内
に含まれる画素の度数分布を上記4次元空間の各座標軸
毎に求めるヒストグラム演算手段12と、該ヒストグラ
ム演算手段12により求められたヒストグラムを記憶す
るヒストグラム記憶手段13とを備えている。
Further, the above-described limited color determining apparatus converts the RGB data of the color image into L according to the following equations (1) to (7).
color conversion means 8 for performing color conversion for each pixel into * a * b * data;
Each pixel is developed based on the L * a * b * and the continuity value in a four-dimensional space spanned by L * , a * , b * and the continuity value of the color component, and each pixel in the four-dimensional space is expanded. Set of =
Cluster storage means 9 for storing clusters; and principal axis calculation means for calculating a coordinate axis at which variance is maximum among coordinate axes indicating continuity values of L * , a * , b * and color components in each of the clusters = main axis. 10, a spindle storage unit 11 for storing the spindle obtained by the spindle calculation unit 10, and a frequency distribution of the pixels included in the cluster for each cluster stored in the cluster storage unit 9 in each of the four-dimensional spaces. The apparatus includes a histogram calculating means 12 for each coordinate axis and a histogram storing means 13 for storing the histogram calculated by the histogram calculating means 12.

【0032】そして、上記限定色決定装置は、上記ヒス
トグラム記憶手段13に記憶されたヒストグラムから平
均および分散を求める平均・分散演算手段14と、該平
均・分散演算手段14により求められた平均・分散を記
憶する平均・分散記憶手段15と、平均・分散記憶手段
15に記憶された分散に基づいて重み付き分散を求める
重み付き分散演算手段16と、主軸記憶手段11に記憶
された主軸において、ヒストグラム記憶手段13に記憶
されたヒストグラムに基づいて判別分析により分割閾値
を求める分割閾値決定手段17と、該分割閾値決定手段
17により求められた分割閾値を記憶する分割閾値記憶
手段18と、上記重み付き分散の大きい順にクラスタを
分割閾値記憶手段18に記憶された上記主軸上の上記分
割閾値により2分するクラスタ分割手段19と、該クラ
スタ分割手段19により分割された各クラスタをその重
み付き分散値によってソートするクラスタ・ソート手段
20と、上記各手段2〜20の動作をクラスタ・ソート
手段20により求められた重み付き分散値が最大のクラ
スタについて、これ以上分割するクラスタが無くなる
か、あるいはクラスタ数が規定の色数に達するまでこれ
らの処理を繰り返すクラスタ分割制御手段21とを備え
ている。
The limited color determination device includes an average / variance calculating means 14 for calculating an average and a variance from the histogram stored in the histogram storage means 13, and an average / variance calculated by the average / variance calculating means 14. , A weighted variance calculating means 16 for obtaining a weighted variance based on the variance stored in the mean / variance storage means 15, and a histogram stored in the main axis stored in the main axis storage means 11. A dividing threshold value determining means 17 for obtaining a dividing threshold value by discriminant analysis based on the histogram stored in the storing means 13; a dividing threshold value storing means 18 for storing the dividing threshold value obtained by the dividing threshold value determining means 17; The clusters are sorted in the descending order of the variance by the division threshold on the main axis stored in the division threshold storage means 18 for two minutes. Cluster dividing means 19, a cluster sorting means 20 for sorting the clusters divided by the cluster dividing means 19 according to their weighted variance values, and the operations of the means 2 to 20 are obtained by the cluster sorting means 20. A cluster division control unit 21 is provided which repeats these processes until there are no more clusters to be divided into clusters having the largest weighted variance value or the number of clusters reaches a specified number of colors.

【0033】さらに、上記限定色決定装置は、L*
*、b*、およびその色成分の連続性値で張られる4次
元空間の各座標軸についての分散の比率に応じて各座標
軸に対する階級数を変更する強調手段22と、この強調
手段22によって変更された階級数で、上記各手段2〜
21の動作を行って得られる度数分布の値を正規化する
強調係数演算手段23と、各画素毎に強調係数演算手段
23によって求められた強調係数を記憶する強調係数記
憶手段24と、上記強調係数記憶手段24から読み出し
た正規化された強調係数をヒストグラム記憶手段13に
記憶された上記ヒストグラムに乗じ、その結果を上記ヒ
ストグラムに加算し、得られた新たなヒストグラムを上
記ヒストグラムと書き換えるヒストグラム更新手段25
とを備えている。
Further, the above-mentioned limited color determining device is provided with L * ,
a * , b * , and emphasis means 22 for changing the rank of each coordinate axis in accordance with the variance ratio of each coordinate axis in the four-dimensional space spanned by the continuity values of the color components, and the emphasis means 22 The above means 2 to 2
An emphasis coefficient calculating means 23 for normalizing the value of the frequency distribution obtained by performing the operation 21; an emphasis coefficient storing means 24 for storing the emphasis coefficient obtained by the emphasis coefficient calculating means 23 for each pixel; A histogram updating means for multiplying the histogram stored in the histogram storage means 13 by the normalized enhancement coefficient read from the coefficient storage means 24, adding the result to the histogram, and rewriting the obtained new histogram with the histogram. 25
And

【0034】また、上記限定色決定装置は、上記各手段
2〜25の動作を行って得られる限定色を平均・分散記
憶手段15から読み出し、色変換手段8の逆変換を行う
色変換手段26と、クラスタ記憶手段9から限定色のク
ラスタ番号を用いて、限定色で各画素の色を置き換える
代表色割当手段27と、限定色を色空間上で距離につい
てソートする限定色カラーパレット演算手段28と、上
記各手段2〜28の動作を行って得られる限定色でカラ
ー画像を近似表示した画面上で、部分的な色修正を可能
とする色修正手段29とから構成されている。
The limited color determination device reads the limited color obtained by performing the operations of the above means 2 to 25 from the averaging / dispersion storage means 15 and performs the inverse conversion of the color conversion means 8 by the color conversion means 26. A representative color allocating unit 27 that replaces the color of each pixel with the limited color using the cluster number of the limited color from the cluster storage unit 9; and a limited color pallet calculating unit 28 that sorts the limited colors by distance in a color space. And a color correction unit 29 that enables partial color correction on a screen in which a color image is approximately displayed with limited colors obtained by performing the operations of the above units 2 to 28.

【0035】画像記憶手段1は、画像メモリ1aを有
し、限定色を求めるべき画像データの各画素の(R,G,
B)値(各色成分が8ビットずつ)が格納される。上位
4ビット画像記憶手段2には、画像記憶手段1に格納さ
れている画像データの各画素(RGB)値の上位4ビッ
トが格納される。
The image storage means 1 has an image memory 1a and stores (R, G,
B) A value (each color component is 8 bits) is stored. The upper 4-bit image storage unit 2 stores the upper 4 bits of each pixel (RGB) value of the image data stored in the image storage unit 1.

【0036】モザイク画像演算手段3は画像記憶手段1
に格納されている画像のサイズに対応し縦横それぞれ1
/30程度の任意のサイズを計算し、求めたサイズの矩
形領域=セルで上位4ビット画像記憶手段2に記憶され
た画像データを分画する。モザイクセル色決定手段4
は、モザイク画像演算手段3によりセルに分画された画
像データの各セル毎にセル内に1/4以上存在する色成
分(上位4ビット画像記憶手段2に記憶された上位4ビ
ットの値)の平均値をモザイクセル色として求める。
The mosaic image calculation means 3 is the image storage means 1
1 for each of the vertical and horizontal directions corresponding to the size of the image stored in
An arbitrary size of about / 30 is calculated, and the image data stored in the high-order 4-bit image storage means 2 is divided by a rectangular area of the obtained size = cell. Mosaic cell color determination means 4
Is a color component present in the cell for each cell of the image data divided into cells by the mosaic image calculation unit 3 (the value of the upper 4 bits stored in the upper 4 bit image storage unit 2). Is determined as a mosaic cell color.

【0037】もし、セル内に1/4以上存在する色成分
が一つの場合は、その色成分をモザイクセル色とし、1
/4以上存在する色成分がない場合には、モザイクセル
内の色成分の平均値をモザイクセル色とする。モザイク
セル色記憶手段5は、モザイクセル色決定手段4により
決定された上記モザイクセル色をモザイク状の画像デー
タとして記憶する。
If one or more color components exist in the cell, the color component is determined to be a mosaic cell color.
If there is no color component having more than / 4, the average value of the color components in the mosaic cell is set as the mosaic cell color. The mosaic cell color storage unit 5 stores the mosaic cell color determined by the mosaic cell color determination unit 4 as mosaic image data.

【0038】連続性値演算手段6は、モザイクセル色記
憶手段5に記憶されたモザイク状の画像データ上の各セ
ルにおいて、鉛直、水平、左斜め、右斜めの4方向に対
し上記セルと同じセル色が連続して続く回数を連続性値
として求める。連続性値記憶手段7は、各セル毎に求め
られた上記連続性値を各セルに含まれる画素に割り当
て、画像データ上の画素と同様の配列として記憶する。
The continuity value calculating means 6 is the same as the above-mentioned cells in the four directions of vertical, horizontal, diagonal left and diagonal right in each cell on the mosaic image data stored in the mosaic cell color storage means 5. The number of times the cell color continues continuously is determined as a continuity value. The continuity value storage means 7 assigns the continuity value obtained for each cell to the pixels included in each cell, and stores the continuity value in the same array as the pixels on the image data.

【0039】色変換手段8は、画像データの各画素の
(R、G、B)値を(L*、a*、b*)値に後述する変
換式を用いて変換する。クラスタ記憶手段9は、L*
*、b*およびその色成分の連続性値で張られる4次元
空間に各画素を展開し、上記4次元空間における画素の
集合=クラスタを記憶する。なお、ここでクラスタと
は、後述するように上記4次元空間を判別分析を用いて
分割した際に、4次元空間の分割された部分を示すもの
であり、分割された各部分にクラスタ番号を付し、クラ
スタ番号毎に上記4次元空間の分割された部分の座標上
の位置とクラスタ内に含まれる画素を記憶する。
The color conversion means 8 converts the (R, G, B) values of each pixel of the image data into (L * , a * , b * ) values using a conversion formula described later. The cluster storage means 9 stores L * ,
Each pixel is developed in a four-dimensional space spanned by a * and b * and the continuity values of the color components, and a set of pixels in the four-dimensional space = cluster is stored. Here, the cluster indicates a divided part of the four-dimensional space when the four-dimensional space is divided using discriminant analysis as described later, and a cluster number is assigned to each divided part. For each cluster number, the position on the coordinates of the divided portion of the four-dimensional space and the pixels included in the cluster are stored.

【0040】主軸演算手段10は、各クラスタについて
*、a*、b*、およびその色成分の連続性値を示す座
標軸のうち、各座標軸に対する画素の分布の分散が最大
となる座標軸=主軸を計算する。主軸記憶手段11は、
上記主軸演算手段10によって求められた主軸を記憶す
る。
The main axis calculating means 10 calculates, for each cluster, L * , a * , b * and, among the coordinate axes indicating the continuity values of the color components, the coordinate axis at which the variance of the pixel distribution with respect to each coordinate axis is equal to the main axis = main axis Is calculated. The spindle storage means 11
The spindle calculated by the spindle calculating means 10 is stored.

【0041】ヒストグラム演算手段12は、各クラスタ
に属する各画素の度数分布を後述する階級数に基づいて
求めヒストグラムを作成し、ヒストグラム記憶手段13
に記憶させる。平均・分散演算手段14は、各クラスタ
において、各座標軸毎に、画素の分布の平均および分散
を求め、平均・分散記憶手段15に記憶させる。
The histogram calculating means 12 obtains a frequency distribution of each pixel belonging to each cluster based on a class number to be described later and creates a histogram.
To memorize. The average / variance calculating means 14 calculates the average and variance of the pixel distribution for each coordinate axis in each cluster, and stores the average and variance in the average / variance storage means 15.

【0042】重み付き分散演算手段16は、各クラスタ
に含まれる画素数の全画素数に対する相対頻度を分散に
乗じることによって重み付き分散を求める。分割閾値決
定手段17は、大津の判別分析(信学論(D).J63-D,4,p
p.349-356.昭和55-4.)によって後述するように分割閾
値を決定する。分割閾値記憶手段18は、分割閾値決定
手段17で求められた分割閾値を記憶する。
The weighted variance calculating means 16 obtains a weighted variance by multiplying the variance by the relative frequency of the number of pixels included in each cluster with respect to the total number of pixels. The division threshold value determining means 17 performs Otsu's discriminant analysis (IEICE (D) .J63-D, 4, p
p.349-356. Showa 55-4.) to determine the division threshold as described later. The division threshold storage unit 18 stores the division threshold calculated by the division threshold determination unit 17.

【0043】クラスタ分割手段19は、各クラスタを後
記クラスタ・ソート手段20によりソートさせて求めら
れた最も重み付き分散の大きなクラスタの主軸を主軸記
憶手段11から読み出し、上記クラスタを分割閾値記憶
手段18から読み出した上記主軸の分割閾値で二分す
る。
The cluster dividing means 19 reads the main axis of the cluster having the largest weighted variance obtained by sorting each cluster by the cluster sorting means 20 described later from the main axis storing means 11 and stores the cluster in the division threshold storing means 18. Is divided into two by the main axis division threshold value read from.

【0044】クラスタソート手段20は、各クラスタを
上記重み付き分散演算手段16により求められた各クラ
スタの重み付き分散の値によってソートする。クラスタ
分割制御手段21は、クラスタ分割手段19によって分
割された全クラスタ数が規定の色数に到達するか、或
は、もうそれ以上分割するクラスタが無くなるまでこれ
らの処理を繰り返し行うのを制御する。
The cluster sorting means 20 sorts each cluster according to the weighted variance value of each cluster obtained by the weighted variance calculating means 16. The cluster division control unit 21 controls the repetition of these processes until the total number of clusters divided by the cluster division unit 19 reaches the specified number of colors or there are no more clusters to be divided. .

【0045】強調手段22は、L*,a*,b*および連続
性値の各座標軸について平均・分散演算手段14によっ
て求められた分散の互いの比率を求め、各軸の階級数を
その比率に応じて他の軸に対し、1/8倍、1/4倍、
1/2倍、等倍、2倍、4倍、8倍、16倍、32倍、
64倍にし、上記階級数で各軸の画素の度数分布を求め
る。強調係数演算手段23は、強調手段22によって求
められた度数分布のヒストグラムの値を正規化し、この
正規化された値を強調係数とする。
The emphasizing means 22 calculates the ratio of the variances obtained by the average / variance calculating means 14 for each coordinate axis of L * , a * , b * and the continuity value, and calculates the class number of each axis by the ratio. 1/8 times, 1/4 times,
1 / 2x, 1x, 2x, 4x, 8x, 16x, 32x,
64 times, and the frequency distribution of the pixels on each axis is determined by the above rank. The emphasis coefficient calculation means 23 normalizes the histogram value of the frequency distribution obtained by the emphasis means 22, and uses the normalized value as an emphasis coefficient.

【0046】強調係数記憶手段24は、強調係数演算手
段23によって求められた強調係数を、前記階級毎に含
まれる画素の数でわり、この結果を前記階級に含まれる
各画素の係数とし、各画素毎に記憶する。ヒストグラム
更新手段25は、強調係数記憶手段24から読み出した
強調係数を、上記ヒストグラム記憶手段13から読み出
したヒストグラムの階級数に対応させ、上記ヒストグラ
ムの値に乗じ、その結果を上記ヒストグラムの値に加
え、この結果を新たにヒストグラムの値として、ヒスト
グラム記憶手段13に記憶させる。
The emphasis coefficient storing means 24 divides the emphasis coefficient obtained by the emphasis coefficient calculating means 23 by the number of pixels included in each class, and uses the result as the coefficient of each pixel included in the class, It is stored for each pixel. The histogram updating means 25 associates the enhancement coefficient read from the enhancement coefficient storage means 24 with the class number of the histogram read from the histogram storage means 13, multiplies the histogram value, and adds the result to the histogram value. The result is stored in the histogram storage unit 13 as a new histogram value.

【0047】色変換手段26は、色変換手段8の逆変換
を行い、求められた代表色の(L*,a*,b* )の値を
(R,G,B)の値に変換する。代表色割当手段27は、
上記の分割が終了後、各クラスタ毎の平均色を限定色と
して平均・分散記憶手段15から読み出し、その平均色
を各クラスタの代表色として採用すると共に、元の画像
データにおいて、各クラスタに含まれる画素に、そのク
ラスタの平均色を割り当て、色変換手段26によって色
変換した値で置き換える。
The color conversion means 26 performs the inverse conversion of the color conversion means 8 and converts the value of (L * , a * , b * ) of the obtained representative color into the value of (R, G, B). . The representative color assigning means 27
After the above division is completed, the average color of each cluster is read from the average / dispersion storage unit 15 as a limited color, and the average color is adopted as a representative color of each cluster, and is included in each cluster in the original image data. The average color of the cluster is assigned to the pixel to be replaced, and the pixel is replaced with a value converted by the color conversion unit 26.

【0048】すなわち、代表色割当手段27は、クラス
タ記憶手段9からクラスタ番号と各クラスタ番号のクラ
スタに含まれる画素を読み出し、各クラスタ番号のクラ
スタの平均色を該クラスタ番号のクラスタに含まれる画
素の色とし、色変換手段26で変換した値で各画素の色
を置き換える。限定色カラーパレット演算手段28は、
求められた代表色を均等色空間(L*,a*,b*)上で距
離についてソートする。
That is, the representative color allocating means 27 reads out the cluster number and the pixels included in the cluster of each cluster number from the cluster storage means 9 and calculates the average color of the cluster of each cluster number in the cluster included in the cluster of the cluster number. The color of each pixel is replaced with the value converted by the color conversion means 26. The limited color color palette calculation means 28
The obtained representative colors are sorted on a uniform color space (L * , a * , b * ) for distance.

【0049】色修正手段29は、上記表示画像の色をマ
ウスの指示により矩形で囲い、上記矩形内の変更したい
色の部分をマウスのフォーカスを合わせてクリックする
ことにより、表示画像上の修正すべき場所および色を選
択するようになっている。そして、色修正手段29によ
り、選択された色を修正変更する場合には、2つの方法
があり、一つは、上記のように選択された色を、上記カ
ラーマップ30dに登録された別の代表色と交換するも
のである。すなわち、色修正手段29は、変更する色の
選択が行われた後に、カラーマップ30dに登録された
代表色を限定色カラーパレット画面として表示するよう
になっている。
The color correcting means 29 corrects the display image by enclosing the color of the display image with a rectangle in accordance with an instruction from the mouse, and focusing on the portion of the color to be changed in the rectangle and clicking the mouse. The place and the color to be chosen are to be selected. When the selected color is corrected and changed by the color correcting means 29, there are two methods. One is to change the color selected as described above to another color registered in the color map 30d. It is exchanged for the representative color. That is, after the color to be changed is selected, the color correcting means 29 displays the representative color registered in the color map 30d as a limited color palette screen.

【0050】また、表示された限定色カラーパレット画
面は、上記限定色カラーパレット演算手段28により代
表色が均等色空間上での距離、すなわち色差によりソー
トされ、色差の近い色が隣接して表示されるようになっ
ているとともに、前述のように選択された変更すべき代
表色が点滅表示されるようになっており、変更すべき代
表色に近い色が選択できるようになっている。
On the displayed limited color color palette screen, the limited color palette calculation means 28 sorts the representative colors according to the distance in the uniform color space, that is, the color difference, and displays the colors having similar color differences adjacently. The representative color to be changed, which is selected as described above, is displayed in a blinking manner, and a color close to the representative color to be changed can be selected.

【0051】そして、例えば、変更すべき代表色と近似
した代表色をカラーパレット画面から探し、カラーパレ
ット画面上で代表色を指定することにより、変更すべき
代表色を指定された代表色と交換するようになってい
る。すなわち、表示画像の上記マウスにより指定された
場所の代表色を他の代表色に交換できるようになってい
る。なお、この場合には、最初に表示画像上でマウスに
より指定された場所の色だけが、すでに決められた代表
色の中の一つの色と交換される。
Then, for example, a representative color similar to the representative color to be changed is searched from the color palette screen, and the representative color is designated on the color palette screen, thereby replacing the representative color to be changed with the designated representative color. It is supposed to. That is, the representative color at the location of the display image designated by the mouse can be replaced with another representative color. In this case, only the color of the place specified by the mouse on the display image first is replaced with one of the representative colors that have been determined.

【0052】もう一つの色の修正変更方法は、カラーマ
ップ30dに登録された代表色を変更するものであり、
上記のように変更したい代表色を選択した後に、上記カ
ラーパレット画面が表示され、選択された色が点滅表示
されるようになっている。また、上記限定色カラーパレ
ット画面と共に、24ビットのフルカラーのカラーパレ
ットが表示されるようになっている。そして、この修正
方法の場合には、代表色のカラーパレット上の選択され
た色を、フルカラーのカラーパレット上でマウスにより
指定された色と交換するようになっている。
Another method of modifying and changing the color is to change the representative color registered in the color map 30d.
After selecting the representative color to be changed as described above, the color pallet screen is displayed, and the selected color blinks. A 24-bit full color color palette is displayed together with the limited color palette screen. In the case of this correction method, the color selected on the representative color palette is replaced with the color designated by the mouse on the full color palette.

【0053】すなわち、この操作を行うことにより、選
択された代表色については、カラーマップ30dのデー
タ自体が変更されることになり、表示画面上において
は、マウスに指定された場所以外でも、選択された代表
色と同じ代表色を用いている部分は、すべて色が変更さ
れることになる。
That is, by performing this operation, for the selected representative color, the data itself of the color map 30d is changed, and on the display screen, the data other than the position designated by the mouse is selected. All the portions using the same representative color as the representative color are changed in color.

【0054】以上の構成の限定色決定装置は、限定色決
定方法を用いて、カラーマップディスプレイ装置30に
フルカラーの画像データを限定された表示色で表示す
る。なお、カラーマップディスプレイ装置30は、本実
施例において、画像記憶手段1に記憶された画像データ
をフルカラーで表示することも可能となっており、フル
カラーの画像と限定された色の画像とを見比べて、上記
色修正手段29により色の修正を行うこともできるよう
になっている。なお、符号30cは、画像メモリ1a、
30aの画像データをディスプレイ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 this embodiment, the color map display device 30 can also display the image data stored in the image storage unit 1 in full color, and compare the full color image with the limited color image. Thus, the color can be corrected by the color correcting means 29. Note that reference numeral 30c denotes the image memory 1a,
It is a D / A converter for displaying the image data of 30a on the display 30b.

【0055】次に、上記限定色決定装置を用いた限定色
決定方法について図2のフローチャートおよび図3ない
し図9を参照して説明する。 (イ)表示すべき画像データの色変化の度合いの計測 従来の方法では、画像データの色変化の度合い、即ち、
画像内の各画素の色と、その画素の近傍の画素の色が大
きく異なっているか、もしくは略同じような色となって
いるかを計測する際には、RGB各8ビットで表わされ
た画像のRGBデータをL***等の均等色空間など
に変換して、その色差の大小を用いて計測するものが多
かった。
Next, a limited color determining method using the above limited color determining apparatus will be described with reference to the flowchart of FIG. 2 and FIGS. 3 to 9. (A) Measurement of the degree of color change of image data to be displayed In the conventional method, the degree of color change of image data,
When measuring whether the color of each pixel in the image and the color of the pixel in the vicinity of the pixel are significantly different or substantially the same, the image represented by each of RGB 8 bits is used. RGB data is converted to a uniform color space such as L * a * b * or the like, and measurement is performed using the magnitude of the color difference.

【0056】しかし、画像データの色変化の度合いは、
色空間上ではなく、画像上で連続的に変化しているもの
であり、画像上の連続性を考慮する必要がある。色空間
上での連続性は、必ずしも画像上の連続性を示してはい
ない。そこで、本実施例は、各色成分の画像上の色連続
性を調べ、それを色空間上へ反映することにより、表示
すべき画像データにおいて色変化の緩やかさを特定す
る。また、画像上の色連続性において、画像上に似た色
が連続して存在する場合には、似たような色の画素が画
像上にまとまって存在していることを示し、画像上での
色成分のまとまりの良さを示す指標となる。
However, the degree of color change of image data is
Since the color changes continuously on the image, not on the color space, it is necessary to consider the continuity on the image. Continuity in a color space does not necessarily indicate continuity in an image. Therefore, in the present embodiment, the color continuity of each color component on an image is checked, and the color continuity is reflected on a color space, thereby specifying a gradual change in color in image data to be displayed. In addition, in the color continuity on the image, when similar colors are continuously present on the image, it indicates that pixels of similar colors are collectively present on the image, and Is an index indicating the goodness of unity of the color components.

【0057】画像上の色連続性は、各画素とその近傍の
画素との色差を計算し、色差が小さいほど連続性が強い
とみなし、大きいほど連続性が少ないとみなすことがで
きるが、本実施例では以下のように連続性を測定する。
まず、画像記憶手段1に記憶された限定色で表示すべき
画像データの各画素の上位4ビットの値を上位4ビット
画像記憶手段に記憶させることにより、上位4ビットで
表わされた画像データを作成する(ステップS1)。
The color continuity on an image is calculated by calculating the color difference between each pixel and its neighboring pixels. The smaller the color difference, the higher the continuity, and the larger the color difference, the less the continuity. In the embodiment, the continuity is measured as follows.
First, by storing the value of the upper 4 bits of each pixel of the image data to be displayed in the limited color stored in the image storage unit 1 in the upper 4 bit image storage unit, the image data represented by the upper 4 bits is stored. Is created (step S1).

【0058】次いで、モザイク画像演算手段6により、
画像データを画像サイズの1/20から1/40の大き
さのセルで網目上に区切り、モザイクセル画像を作成す
る(ステップS2)。そして、モザイクセル色決定手段
4により、上述のようにセル内で1/4以上を占める色
成分の値(1/4以上の色成分が複数の場合は平均値)
をモザイクセル色とする。
Next, the mosaic image calculation means 6
The image data is divided on a mesh by cells having a size of 1/20 to 1/40 of the image size to create a mosaic cell image (step S2). Then, as described above, the value of the color component occupying 1/4 or more in the cell (the average value when there are a plurality of 1/4 or more color components) by the mosaic cell color determination means 4 as described above
Is the mosaic cell color.

【0059】なお、モザイクセル色の選択方法は上記方
法に限られるものではなく、例えば、各セル毎にセル内
に含まれる色成分(RGB値)の上位4ビットの値を比
較し、主成分分析により主成分、および主成分ベクトル
を求め、その第1主成分の寄与率が8割以上の場合は第
一主成分ベクトルを、8割に満たない場合は、第一およ
び第二主成分ベクトルの合成ベクトルを求め、また、第
1および第2主成分の寄与率が8割に満たない場合は、
第1、第2および第3の主成分ベクトルの合成ベクトル
を求め、そのセルのモザイクセル色として採用するよう
にしても良い(ステップS3)。そして、上述のように
各セルにモザイクセル色を割り当てたモザイク状の画像
を作成し、モザイクセル色記憶手段5に記憶する。
The method of selecting the mosaic cell color is not limited to the above method. For example, for each cell, the values of the upper 4 bits of the color components (RGB values) included in the cell are compared, and the principal component is determined. Principal components and principal component vectors are obtained by analysis. When the contribution ratio of the first principal component is 80% or more, the first principal component vector is obtained. When the contribution ratio is less than 80%, the first and second principal component vectors are obtained. And if the contribution ratios of the first and second principal components are less than 80%,
A composite vector of the first, second, and third principal component vectors may be obtained and adopted as the mosaic cell color of the cell (step S3). Then, a mosaic image in which the mosaic cell colors are assigned to the cells as described above is created, and stored in the mosaic cell color storage unit 5.

【0060】上記連続性値演算手段6は、こうして求め
られた各セルの代表値を図3に示すように、各セル41
を中心として、鉛直(上・下)、水平(左・右)、左斜
め(左斜め上・左斜め下)、右斜め(右斜め上・右斜め
下)の4つ(8つ)の放射方向に連続して配置されたセ
ルの代表値を比べ連続して同じ値(上位4ビットのモザ
イクセル色)が表れるかどうかチェックすることにより
連続性を調べる。
The continuity value calculating means 6 calculates the representative value of each cell thus obtained as shown in FIG.
Four (8) radiations of vertical (upper / lower), horizontal (left / right), diagonal left (diagonally upper left / lower left lower), diagonal right (diagonally upper right / lower right lower) The continuity is examined by comparing the representative values of the cells arranged continuously in the direction and checking whether the same value (mosaic cell color of the upper 4 bits) appears continuously.

【0061】具体的な連続性の演算方法は、図4に示す
ように、まず注目セル41aの代表値と、上記方向に沿
って順次移動しながらセル41…の代表値を比較し、同
じ値が連続して現れる出現回数をカウントする。そし
て、同じ値が出現しなくなったところで、その方向のカ
ウントを終了する。以上の作業を、上記8方向について
行い、その同じ値の出現回数の総カウント数を注目セル
41aの連続性値として定義する。また、以上の作業は
画像データの全セル41…を注目セル41aとして行
い、全セルの連続性値を測定する。なお、図4におい
て、2つの注目セル41aは、それぞれ連続性値が3と
なっている。また、各セル毎に演算された連続性値は、
各セルに含まれる画素の連続性値とされる。
As shown in FIG. 4, a specific method of calculating the continuity is to first compare the representative value of the cell of interest 41a with the representative value of the cells 41 while sequentially moving in the above-mentioned direction. Is counted. When the same value no longer appears, the counting in that direction ends. The above operation is performed in the above eight directions, and the total count of the number of appearances of the same value is defined as the continuity value of the cell of interest 41a. The above operation is performed with all the cells 41 of the image data as the cell of interest 41a, and the continuity values of all the cells are measured. In FIG. 4, the continuity value of each of the two cells of interest 41a is 3. The continuity value calculated for each cell is
The continuity value of the pixels included in each cell is used.

【0062】そして、後述する代表色の選択の際に、L
***空間に上記連続性値の座標軸を加えた4次元空
間を想定するが、上記連続性値の座標軸は、モザイクセ
ル画像データに含まれる画素の連続性値の最小値から最
大値の範囲で、後述する階級数を有するように作成され
る(ステップS4)。
When selecting a representative color, which will be described later,
It is assumed that a four-dimensional space is obtained by adding the coordinate axis of the continuity value to the * a * b * space, and the coordinate axis of the continuity value is a minimum value to a maximum value of the continuity value of the pixels included in the mosaic cell image data. Is created so as to have a class number to be described later (step S4).

【0063】なお、上述の連続値の測定方法において
は、一旦画像データをモザイク画像に変換し、該モザイ
ク画像の各モザイクセルの色をモザイクセル中に優位に
存在する画素の色とし、モザイク画像全体に渡って各セ
ルの連続性値を測定するものとしたが、画像データを複
数の領域に分割し、分割された各領域内において、連続
性値を測定する構成としても良い。
In the above continuous value measuring method, the image data is temporarily converted into a mosaic image, and the color of each mosaic cell of the mosaic image is set to the color of the pixel that predominates in the mosaic cell, Although the continuity value of each cell is measured throughout, the image data may be divided into a plurality of regions, and the continuity value may be measured in each of the divided regions.

【0064】また、画像データを複数の領域に分割する
方法としては、例えば、画像データ内にある被写体の辺
縁を強調して、被写体の輪郭線を抽出し、該輪郭線によ
り画像データを分割する方法や、JPEG等に用いられ
る離散コサイン変換を用いて空間周波数の分布を求める
ことにより領域の分割を行うもの等の周知のディジタル
画像の分割方法を用いることができる。
As a method of dividing the image data into a plurality of areas, for example, the outline of the object is extracted by emphasizing the edges of the object in the image data, and the image data is divided by the outline. A known method of dividing a digital image, such as a method of dividing a region by obtaining a spatial frequency distribution using a discrete cosine transform used in JPEG or the like, can be used.

【0065】また、画像配列上の各画素の色成分のまと
まりの良さの数値化は、必ずしも上述の連続性値の測定
に限られるものではなく、前述のように分割された画像
データの各領域において、近似した色の画素を割合を求
めるなどの方法によっても良い。
Further, the numerical value of the goodness of the unity of the color components of each pixel on the image array is not necessarily limited to the measurement of the continuity value described above. In the above, a method of calculating a ratio of pixels of similar colors may be used.

【0066】(ロ)均等色空間への変換 代表色を選ぶために、まず画像データの色分布を色空間
上に配置するが、この際、人の視覚特性を考慮して、均
等色空間を使用する。均等色空間としては、上記L**
*またはL***を使用する。そこで、RGBデータ
からなる画像データの各画素の値をL***または、
***に変換する。本実施例では、一例として、色
変換手段8による変換について、L***を用いて詳
細を記述する。
(B) Conversion to Uniform Color Space In order to select a representative color, first, the color distribution of image data is arranged in a color space. At this time, the uniform color space is set in consideration of human visual characteristics. use. As a uniform color space, the above L * u *
Use 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
Convert to L * a * b * . In the present embodiment, as an example, the details of the conversion by the color conversion means 8 will be described using L * a * b * .

【0067】RGBデータから、L***への変換
は、CIE1931年勧告のXYZ系を介在して、以下
の式によって行われる。 X = 0.61R+0.17G+0.20B, (1) Y = 0.36R+0.59G+0.11B, (2) Z = 0.066G+1.12B (3)
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, (1) Y = 0.36R + 0.59G + 0.11B, (2) Z = 0.066G + 1.12B (3)

【0068】Y/Yn>0.008856の場合、 L*=116(Y/Yn1/3−16 (4) Y/Yn≦0.008856の場合、 L*=903.3(Y/Yn) (5) X/Xn>0.008856,Y/Yn>0.00885
6,Z/Zn>0.008856の場合、 a* = 500{(X/Xn1/3 −(Y/Yn1/3}, (6) b* = 200{(Y/Yn1/3 −(Z/Zn1/3} (7)
When Y / Y n > 0.008856, L * = 116 (Y / Y n ) 1/3 −16 (4) When Y / Y n ≦ 0.008856, L * = 903.3 ( Y / Y n ) (5) X / X n > 0.008856, Y / Y n > 0.00885
6, in the case of Z / Z n> 0.008856, a * = 500 {(X / X n) 1/3 - (Y / Y n) 1/3}, (6) b * = 200 {(Y / Y n ) 1/3 − (Z / Z n ) 1/3 } (7)

【0069】X/Xn,Y/Yn,Z/Znに0.0088
56以下のものがある場合、上記式(6)および(7)
の(X/Xn1/3,(Y/Yn1/3,(Z/Zn1/3の項
をそれぞれ 7.787(X/Xn)+16/116 7.787(Y/Yn)+16/116 7.787(Z/Zn)+16/116 に置き換える。ここで、R,G,Bおよび白の色度はN
TSCテレヴィジョン規格に準拠している。以上のよう
な変換式によりNTSCテレビジョン規格のRGBデー
タをCIEが勧告するL***データに変換する(ス
テップ5)。
0.0088 for X / X n , Y / Y n and Z / Z n
When there are 56 or less, the above equations (6) and (7)
(X / X n ) 1/3 , (Y / Y n ) 1/3 and (Z / Z n ) 1/3 terms are 7.787 (X / X n ) +16/116 7.787 ( Y / Y n ) +16/116 7.787 (Z / Z n ) +16/116. Here, the chromaticity of R, G, B and white is N
It conforms to the TSC television standard. The RGB data of the NTSC television standard is converted into L * a * b * data recommended by the CIE according to the above conversion formula (step 5).

【0070】(ハ)L*,a*,b*軸および連続性軸にお
ける画素の度数分布 各画素の値は、上記RGBをL***に変換した段階
で、8ビットの整数の値から外れてしまうことになる。
そこで、L***軸において度数分布を求めるには、
各座標軸の階級数を決めて、各座標軸の階級によりL*
**空間をクラスタに分割し、上記クラスタに含まれ
る画素数を求める必要がある。
(C) Frequency distribution of pixels on the L * , a * , b * axis and the continuity axis The value of each pixel is obtained by converting the above-mentioned RGB into L * a * b * , an 8-bit integer. It will deviate from the value.
Therefore, to obtain the frequency distribution on the L * a * b * axis,
Determine the number of classes of each coordinate axis, and L * according to the class of each coordinate axis .
It is necessary to divide the a * b * space into clusters and obtain the number of pixels included in the clusters.

【0071】L***および連続性軸で張られる空間
を必要な色数に分割し、それぞれの色領域の平均色を代
表色として選ぶのに、渡辺のアルゴリズム(電子情報通
信学会論文誌DVol.J70-DNo.4pp.720-726 1987.4)を改
良して使用した。
In order to divide the space spanned by L * a * b * and the continuity axis into the required number of colors, and to select the average color of each color region as a representative color, Watanabe's algorithm (Transactions of the Institute of Electronics, Information and Communication Engineers) Journal DVol.J70-DNo.4pp.720-726 1987.4) was modified and used.

【0072】主な改良点としては、元データとしてRG
B上位5ビットを用いる代わりに、RGB8ビットの値
からL***に変換した値を使用した。これにより、
データの精度8ビットをそのまま利用することができ
る。また、分割を行う初期空間を、RGB3次元空間で
はなく、L***軸および連続性軸の4軸によって張
られる4次元空間とした。これにより、画像上の色連続
性を代表色の選択に反映させることができる。
The main improvement is that RG is used as the original data.
Instead of using the B upper 5 bits, a value obtained by converting the RGB 8-bit value into L * a * b * was used. This allows
The 8-bit precision of the data can be used as it is. In addition, the initial space to be divided is not an RGB three-dimensional space but a four-dimensional space spanned by four L * a * b * axes and a continuity axis. Thereby, the color continuity on the image can be reflected in the selection of the representative color.

【0073】また、空間の各座標軸の階級数をL**
*軸および連続性軸の4軸の順に256×64×64×
64のように、輝度成分L*を示す座標軸の階級数を他
の座標軸の階級数に対して4倍にし、輝度成分L*を強
調するように変えた。これは、吉良らの報告(信学技
報,IE83〜92,「限定された数の代表色による適
応型自然画像表示」吉良、井上、福井)にあるように、
人間の視覚特性が輝度成分に対し、色度成分の4倍程度
敏感であることを考慮したためである。
The rank of each coordinate axis of the space is represented by L * a * b
* 256 × 64 × 64 × in order of 4 axes of axis and continuity axis
As shown at 64, the rank of the coordinate axis indicating the luminance component L * is quadrupled with respect to the rank of the other coordinate axes, so that the luminance component L * is emphasized. As described in the report by Kira et al. (IEICE Technical Report, IE83-92, "Adaptive Natural Image Display with Limited Number of Representative Colors", Kira, Inoue, Fukui)
This is because human visual characteristics are considered to be about four times more sensitive to luminance components than chromaticity components.

【0074】具体的に説明すると、入力される画像デー
タは、通常、画素順にRGB値が並んでいる。そこで、
RGB値を座標とするRGB空間を考えた場合、RGB
空間は、R、G、Bを座標軸とし、各座標軸がそれぞれ
8ビットの値、即ち0〜255の値を持つ3次元空間と
なる。そこで、空間上の点にそのRGB値を持つ画素の
画素数を対応させれば、各色成分のヒストグラムが求め
られる。すなわち、histogram(r,g,b)=RGB(r,g,b)の画
素の総数となる。
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. That is, histogram (r, g, b) = the total number of pixels of RGB (r, g, b).

【0075】次に、均等色空間L***のヒストグラ
ムの場合は、上記RGBで表わされた各画素の値(r、
g、b)を上記式で(L*,a*,b*)に変換することに
より求められる。すなわち、histogram(r,g,b)=L*a*b
*(L*a*b*)の画素の総数となる。しかし、L***の値
は、非線形変換によって求められるので、0〜255の
整数値から外れてしまうと共に輝度成分を強調するため
に適当な階級数を設ける必要がある。
Next, in the case of the histogram of the uniform color space L * a * b * , the value (r, r,
g, b) is converted to (L * , a * , b * ) by the above equation. That is, histogram (r, g, b) = L * a * b
* (L * a * b * ) is the total number of pixels. However, since the value of L * a * b * is obtained by non-linear conversion, it deviates from an integer value of 0 to 255, and it is necessary to provide an appropriate class number to emphasize the luminance component.

【0076】本実施例では、上記のように輝度即ちL*
成分について強調すると共に、L***への変換によ
ってデータの容量が、増大するのを防止するために、各
*,a*,b*の階級間隔を決める必要がある。データ容
量としては、RGBの各値が8ビットにされているので
最大を8ビットとする。したがって、強調される輝度L
*については、0〜255に割り当てることになる。ま
た、a*,b*成分は0〜63の値を取るようにする。
In this embodiment, as described above, the luminance, that is, L *
In order to emphasize the components and prevent the data volume from increasing by the conversion to L * a * b * , it is necessary to determine the class interval of each L * , 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
* Is assigned to 0 to 255. The a * and b * components take values from 0 to 63.

【0077】ここで、実際の階級間隔の計算は、各L*
**を8ビット以下のデータとする際に以下の数1の
式によって求められる。
Here, the actual calculation of the class interval is performed for each L *
When a * b * is 8-bit or less data, it can be obtained by the following equation (1).

【数1】 (Equation 1)

【0078】L* interval,a* interval,b
* intervalは、L*,a*,b*の階級間隔を示す。L* max,
* max,b* maxはそれぞれL*,a*,b*の最大値を示す。
* min,a* min,b* minはそれぞれL*,a*,b*の最小値
を示す。また、m、nは、輝度成分(L*)と色度成分
(a*、b*)との比率により変更されるもので、本実施
例では、L*:a*,b*を4:1にするために、輝度成分
のmをlとし、色度成分のnを4としている。
L * interval , a * interval , b
* interval indicates the class interval of L * , a * , b * . L * max ,
a * max and b * max indicate the maximum values 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 by the ratio between the luminance component (L * ) and the chromaticity components (a * , b * ). In the present embodiment, L * : a * , b * is changed to 4: In order to set it to 1, the luminance component m is set to 1 and the chromaticity component n is set to 4.

【0079】また、連続性値の軸に関しては、a*,b*
の階級間隔と同様にして以下の数2のように決められ
る。
Regarding the continuity value axis, a * , b *
In the same manner as the class interval of, the following equation 2 is used.

【数2】 Cは、連続性値を示す。Cintervalは、Cの階級間隔を
示す。Cmaxは、Cの最大値を示す。Cminは、Cの最小
値を示す。
(Equation 2) C indicates the continuity value. C interval indicates a class interval of C. C max indicates the maximum value of C. C min indicates the minimum value of C.

【0080】そして、以上のように階級間隔を決められ
たL***および連続性軸によって張られる空間を、
各座標軸の階級で4次元的に分割し、後述するようにヒ
ストグラムを作成する際の基本単位とする。そして、上
記のように各座標軸の階級で分割された4次元空間をク
ラスタ画像としてクラスタ記憶手段9が記憶する(ステ
ップS6)。なお、クラスタ記憶手段9は、後述するよ
うに順次分割されるクラスタにクラスタ番号を付して記
憶するとともに、各クラスタに含まれる画素を記憶す
る。そして、ヒストグラム演算手段12によって、画像
データの各座標軸におけるクラスタ毎の度数分布を求め
る(ステップS7)。
Then, the space spanned by the L * a * b * and continuity axis determined as described above is
The data is divided four-dimensionally according to the class of each coordinate axis, and is used as a basic unit when creating a histogram as described later. Then, the cluster storage unit 9 stores the four-dimensional space divided according to the rank of each coordinate axis as a cluster image as described above (step S6). The cluster storage unit 9 stores clusters that are sequentially divided as described later, with a cluster number attached thereto, and also stores pixels included in each cluster. Then, the histogram calculation unit 12 obtains a frequency distribution for each cluster in each coordinate axis of the image data (step S7).

【0081】図5および図6を参照して、輝度を示す座
標軸の階級数を色度あるいは連続性値を示す座標軸の階
級数より大きくして、判別分析による代表色を選択した
場合の効果について簡単に説明する。なお、図5および
図6において、図面による説明を容易にするため、L*
**および連続性軸によって張られる4次元空間にお
ける輝度を示す座標軸と、色度を示す座標軸の一つとを
選んで2次元の座標系で説明する。
Referring to FIGS. 5 and 6, the effect of selecting a representative color by discriminant analysis by making the rank of the coordinate axis indicating luminance larger than the rank of the coordinate axis indicating chromaticity or continuity value will be described. A brief description will be given. Note that in FIGS. 5 and 6, L *
A coordinate axis indicating luminance in a four-dimensional space spanned by a * b * and a continuity axis and one of coordinate axes indicating chromaticity are selected and described in a two-dimensional coordinate system.

【0082】まず、y軸を輝度(L*)、x軸を色度
(a*)とし、それぞれの階級数を8とした場合には、
図5に示すように判別分析により色空間が分割されるも
のとする。それに対して、x軸における階級数を4とし
て色空間が分割されるものとし、x軸における階級数を
4とすることにより、y軸の階級数をx軸の階級数の2
倍とした場合には、図6に示すように、x軸の図5にお
いて分割可能だった部分が分割できなくなり、その分、
輝度の分割数が増えることになる。
First, when the y-axis is luminance (L * ), the x-axis is chromaticity (a * ), and each rank is 8,
It is assumed that the color space is divided by the discriminant analysis as shown in FIG. On the other hand, it is assumed that the color space is divided with the rank on the x axis being 4, and the rank on the x axis is set to 4, so that the rank on the y axis is 2 of the rank on the x axis.
In the case where the number is doubled, as shown in FIG. 6, the portion that could be divided in FIG. 5 on the x axis cannot be divided, and
The number of divisions of luminance increases.

【0083】すなわち、分割された色空間の平均色を代
表色とした場合に、代表色として同じ色相で輝度の異な
る色が多く選ばれ、異なる色相の色が減少することにな
り、輝度が強調された代表色が選択されることになる。
従って、上述のように空間の各座標軸の階級数をL**
*軸および連続性軸の4軸の順に256×64×64
×64のように、輝度成分L*を示す座標軸の階級数を
他の座標軸の階級数に対して4倍にすることにより、輝
度が強調された代表色が選択される。
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 the colors of different hues are reduced, so that the luminance is emphasized. The selected representative color is selected.
Therefore, as described above, the rank of each coordinate axis of the space is represented by L * a *
b * axis and continuity axis: 256 × 64 × 64
By making the rank of the coordinate axis indicating the luminance component L * four times as large as the rank of the other coordinate axes, such as × 64, a representative color with enhanced luminance is selected.

【0084】 (ニ)輝度もしくは色度もしくは色連続性値の強調 本実施例は、上記空間分割方式において、輝度成分のサ
ンプリングを強調することにより、輝度成分の変化が緩
やかな部分が強調されること、即ち輝度方向を主軸とし
た分割が主要な分割となることに着目し、さらに色度成
分に対し輝度成分を強調したサンプリングを与えること
により、逆に、輝度変化の緩やかな部分および色を特定
する方法を発明した。
(D) Enhancement of Luminance, Chromaticity, or Color Continuity Value In the present embodiment, in the space division method, the sampling of the luminance component is emphasized, so that a portion where the change of the luminance component is gradual is emphasized. That is, paying attention to the fact that the division with the luminance direction as the main axis is the main division, and further giving sampling in which the luminance component is emphasized with respect to the chromaticity component, conversely, the portion and the color whose luminance change is gradual can be reduced. A method for identifying has been invented.

【0085】具体的には、L***(またはL*
**)および連続性軸によって張られる4次元空間で、
256×16×16×16のように輝度方向に16倍に
強調サンプリングし、限定色の色数を例えば、100色
などの少なめの数で指定し、後述する(ヘ)の分割方式
により代表色を求める。これにより、輝度成分に対しこ
の場合16倍に強調した100色が選ばれる。これらは
輝度変化の緩やかな部分の色を強調した上位100色と
なっている。
Specifically, L * a * b * (or L * u)
* v * ) and a four-dimensional space spanned by the continuity axis,
Emphasis sampling is performed 16 times in the luminance direction, such as 256 × 16 × 16 × 16, and the number of limited colors is specified by a smaller number, for example, 100 colors. Ask for. As a result, 100 colors in which the luminance component is enhanced 16 times in this case are selected. These are the top 100 colors that emphasize the color of the portion where the luminance changes slowly.

【0086】そして、強調手段22は、上述したよう
に、平均・分散演算手段14によって求められた均等色
座標軸および連続性軸によって張られる4次元空間の各
座標軸方向の分散について、各座標軸の比率を求め、そ
の比率に対応して、連続性値および色度を示す座標軸の
階級数に対する輝度を示す座標軸の階級数の比率を、1
/8倍、1/4倍、1/2倍、等倍、2倍、4倍、8
倍、16倍、32倍、64倍のいずれかから選べるよう
にした。
Then, as described above, the emphasis means 22 calculates the ratio of each coordinate axis to the variance in each coordinate axis direction of the four-dimensional space defined by the uniform color coordinate axis and the continuity axis obtained by the average / variance calculation means 14. Corresponding to the ratio, the ratio of the class number of the coordinate axis indicating the luminance to the class number of the coordinate axis indicating the continuity value and the chromaticity is 1
/ 8x, 1 / 4x, 1 / 2x, 1x, 2x, 4x, 8
It was made possible to select from any of x1, x16, x32, and x64.

【0087】また、強調手段22は、連続性軸の階級数
を限定すべき代表色の数により単独で変更できるように
なっており、色の変化の緩やかな部分を、上位ビットの
色連続性により特定し、100色以上のような比較的色
数が多い場合には、色連続性軸での階級数を減らして分
割を弱めることにより、均等色空間上における色の変化
の緩やかな部分から選択される代表色を増やしてやるこ
とで、確実に偽輪郭を抑制する。さらに、32色以下の
ような色数が少ない場合には、色連続性軸での階級数を
増やして分割を強調することにより、色相のまとまりを
強調した色選択を可能とする。
The emphasizing means 22 can independently change the rank of the continuity axis by the number of representative colors to be limited. If the number of colors is relatively large, such as 100 colors or more, the number of classes on the color continuity axis is reduced and the division is weakened, so that the color change in the uniform color space can be gradually reduced. False contours are reliably suppressed by increasing the number of representative colors to be selected. Further, when the number of colors such as 32 or less is small, the number of classes on the color continuity axis is increased to emphasize the division, thereby enabling color selection that emphasizes the unity of hues.

【0088】そして、強調係数演算手段23は、上記の
ように決められた階級数によって、均等色座標軸および
連続性軸によって張られる空間をクラスタに分割して、
上記ヒストグラム演算手段12と同様に度数分布を求
め、この度数分布における度数のピークを1とする正規
化を行い、各階級数毎の係数とする。そして、この係数
を各階級に含まれる画素の数で割って、各画素毎の係数
とする。そして、各画素毎の係数を強調係数記憶手段2
4が記憶する(ステップS8)。
Then, the emphasis coefficient calculating means 23 divides the space spanned by the uniform color coordinate axis and the continuity axis into clusters according to the rank determined as described above,
A frequency distribution is obtained in the same manner as in the above-described histogram calculation means 12, and normalization is performed with the frequency peak in this frequency distribution being set to 1 to obtain a coefficient for each class. Then, this coefficient is divided by the number of pixels included in each class to obtain a coefficient for each pixel. Then, the coefficient for each pixel is stored in the enhancement coefficient storage unit 2.
4 is stored (step S8).

【0089】(ホ)ヒストグラムの変更 上記強調係数記憶手段24に記憶された係数を用いて、
ヒストグラム記憶手段13に記憶されたヒストグラムを
重み付け補正して更新する(ステップS9)。具体的に
は、まず、濃度値(例えば0〜255)毎に、該濃度値
に含まれる画素の強調係数記憶手段24に記憶された強
調係数を集計することにより図8に示すように、濃度値
毎の係数44を求める。
(E) Change of histogram Using the coefficients stored in the emphasis coefficient storage means 24,
The histogram stored in the histogram storage unit 13 is updated with weight correction (step S9). Specifically, first, for each density value (for example, 0 to 255), the emphasis coefficients stored in the emphasis coefficient storage unit 24 of the pixels included in the density value are totaled, as shown in FIG. The coefficient 44 for each value is obtained.

【0090】次に、図7に示すようにヒストグラム記憶
手段13に記憶されたヒストグラム43に対して、図8
に示す濃度値毎の係数44を濃度値毎に乗算し、得られ
た結果をヒストグラム43に濃度値毎に加算すること
で、図9に示す重み付け補正されたヒストグラム45を
得ることができ、これを用いて、後述する判別分析によ
り代表色の選択を行う。
Next, the histogram 43 stored in the histogram storage means 13 as shown in FIG.
Is multiplied for each density value by a coefficient 44 for each density value, and the obtained result is added to the histogram 43 for each density value, whereby a weighted and corrected histogram 45 shown in FIG. 9 can be obtained. Is used to select a representative color by a discriminant analysis described later.

【0091】(へ)判別分析法による代表色の選択 本実施例の判別分析法による代表色の選択は、基本的に
上記従来技術と同様のものであり、各色成分毎のヒスト
グラムを用いて閾値を求め、この閾値において色空間を
順次多数のクラスタに分割していくものであるが、本実
施例においては、色空間にさらに上記連続性を表わす座
標軸を設定した4次元空間を用い、さらに上記重み付け
を行ったヒストグラムを用いて判別分析を行う。
(F) Selection of representative color by discriminant analysis The selection of a representative color by the discriminant analysis method of the present embodiment is basically the same as that of the above-mentioned prior art, and a threshold value is determined by using a histogram for each color component. Is obtained, and the color space is sequentially divided into a number of clusters at this threshold value. In this embodiment, a four-dimensional space in which coordinate axes indicating the continuity are further set in the color space is used. Discriminant analysis is performed using the weighted histogram.

【0092】ここで、まず上記ヒストグラムから4次元
空間もしくは後述するように分割されたクラスタにおい
て、あらかじめ平均・分散演算手段14によりクラスタ
(最初は4次元空間)の各座標軸の平均・分散を求めて
おく(ステップS10)。また、上述のように主軸演算
手段10により各クラスタの座標軸のうちの主軸を求め
ておく。さらに、重み付き分散演算手段16により各ク
ラスタの重み付き分散を求め、クラスタ・ソート手段2
0により最も重み付き分散の大きなクラスタを求めてお
き、この最も重み付き分散の大きなクラスタの主軸にお
いて、以下のように決められる分割閾値による分割が行
われることになる。
Here, first, in the four-dimensional space or the cluster divided as described later from the histogram, the average and variance of each coordinate axis of the cluster (firstly, the four-dimensional space) is obtained by the average / variance calculating means 14. (Step S10). Further, as described above, the main axis of the coordinate axes of each cluster is determined by the main axis calculation means 10. Further, the weighted variance of each cluster is obtained by the weighted variance calculating means 16 and the cluster sorting means 2
A cluster having the largest weighted variance is obtained from 0, and division is performed on the main axis of the cluster having the largest weighted variance by a division threshold determined as follows.

【0093】ここで、分割閾値決定手段17の判別分析
による閾値Tiの決定方法を説明する。領域Sの画素数
をN、濃度値iでの画素数をniとすると、その発生確
率qiは、次式で示される。 qi=ni/N そして、濃度値kで、区間[a、b]を2つの区間C1
[a、k]と、C2[k+1、b]とに分割すると仮定
し、両区間における画素の発生確率ω12、平均値を
μ12、分散をσ1 22 2とした場合に次式で与えられ
る重み付き分散和σw 2が最小となるように濃度値kを定
める。 σw 2=ω1ω2(μ1−μ2
[0093] Here will be described a method for determining the threshold value T i by the discrimination analysis of dividing threshold determining means 17. When the number of pixel areas S N, the number of pixels in the density values i and n i, the occurrence probability q i is given by the following equation. q i = n i / N Then, with the density value k, the section [a, b] is divided into two sections C 1
[A, k] and C 2 [k + 1, b] are assumed, and the pixel occurrence probabilities ω 1 , ω 2 , the average value μ 1 , μ 2 , and the variance σ 1 2 , σ 2 2 a weighted variance sum sigma w 2 given by: when the determined density values k so as to minimize. σ w 2 = ω 1 ω 21 −μ 2 )

【0094】σB 2を最大にするk(即ち、求めるべき閾
値Ti)は、次の数3に示すように逐次的に求めること
ができる。
The k that maximizes σ B 2 (that is, the threshold value T i to be obtained ) can be obtained sequentially as shown in the following equation (3).

【数3】 ここで、μTは全平均であり以下の数4に示すものであ
る。
(Equation 3) Here, μ T is the total average and is shown in the following Expression 4.

【数4】 (Equation 4)

【0095】以上のようにして、各色成分および連続性
値の閾値Tiを決定することができる(ステップS1
1)。そして、求められた閾値Tiにより、まず、4次
元空間を2つの領域に分割することになるが、上記主軸
演算手段10が各色成分のうちで最も上記分散σ2が最
大となった色成分もしくは連続性値を主軸とし、その色
成分もしくは連続性値の閾値Tiに対応する主軸の位置
で、クラスタ分割手段19が主軸に直交する曲面で4次
元空間を2つのクラスタに分割する(ステップS1
2)。
[0095] As described above, it is possible to determine the threshold value T i of each color component and the continuity values (step S1
1). Then, the four-dimensional space is first divided into two regions by the obtained threshold value T i , and the main axis calculation means 10 determines the color component having the largest variance σ 2 among the respective color components. or continuity value and spindle, at the position of the principal axis corresponding to the threshold T i of the color components or continuity value, the cluster dividing unit 19 divides the four-dimensional space by a curved surface which is perpendicular to the main axis into two clusters (step S1
2).

【0096】次に、新たに分割されたクラスタにおい
て、平均・分散演算手段14により平均・分散を求め、
重み付き分散演算手段16により重み付き分散を求め、
主軸演算手段10により主軸を求め、クラスタ・ソート
手段20が重み付き分散を4次元空間内の全てのクラス
タ間で比較し、重み付き分散が大きい順にクラスタをソ
ートすることにより最も重み付き分散が大きいクラスタ
を求め、このクラスタを次に分割する領域とする(ステ
ップS13)。そして、求められたクラスタにおいて、
上記色空間を分割したように閾値Tiを求め、クラスタ
をさらに2つのクラスタに分割する。
Next, in the newly divided cluster, the average and variance are obtained by the average and variance calculating means 14.
The weighted variance is obtained by the weighted variance calculating means 16,
The main axis calculation means 10 finds the main axis, the cluster sorting means 20 compares the weighted variances among all the clusters in the four-dimensional space, and sorts the clusters in descending order of the weighted variances, thereby giving the largest weighted variance. A cluster is obtained, and this cluster is set as a region to be divided next (step S13). Then, in the obtained cluster,
The threshold value Ti is determined as if the color space was divided, and the cluster is further divided into two clusters.

【0097】以上のように、分割された全てのクラスタ
において、最も重み付き分散が大きいクラスタを求め、
求められたクラスタを上述のように二分割することを繰
り返す。そして、分割されたクラスタの数が、表示すべ
き代表色の数と等しくなったところで、分割を終了する
(ステップS14)。次に、代表色割当手段27が各ク
ラスタにおける各色成分毎の濃度値の平均値を代表色と
し(ステップS15)、この代表色を色変換手段26が
上記色変換手段8の逆変換を行うことにより代表色をR
GB値とする(ステップS16)。
As described above, of all the divided clusters, the cluster having the largest weighted variance is obtained.
The process of dividing the obtained cluster into two as described above is repeated. Then, when the number of divided clusters becomes equal to the number of representative colors to be displayed, the division ends (step S14). Next, the representative color allocating unit 27 sets the average value of the density values for each color component in each cluster as the representative color (step S15), and the color conversion unit 26 performs the inverse conversion of the color conversion unit 8 on the representative color. The representative color is R
The GB value is set (step S16).

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

【0099】 (ト)上記操作の反復による代表色の決定 本実施例の限定色決定方法では、上述のように決定され
る代表色の選択を、選択された代表色に繰り返し行なう
ことで、代表色を段階的に減らしていくようになってい
る。すなわち、図示しない反復制御手段を設け、上述の
ように選択された代表色によって表される画像を、元画
像データとして再び上述した作業により代表色の選択を
行ない、これを、設定された回数だけ繰り返し、最終的
に必要とされる代表色まで減少させることもできるよう
になっている。
(G) Determining the representative color by repeating the above operation In the limited color determining method of the present embodiment, the representative color selected as described above is repeatedly selected for the selected representative color. The colors are gradually reduced. That is, an iterative control unit (not shown) is provided, and the image represented by the representative color selected as described above is selected as the original image data again by the above-described operation to select the representative color. It is also possible to reduce the number of representative colors finally required.

【0100】そして、繰り返し、代表色を選択する際に
は、毎回、連続性値演算手段6により連続性値の座標軸
が変更され、強調手段22および強調係数演算手段23
により強調係数が求められ、ヒストグラム更新手段25
によりヒストグラムが更新され、色の変化の穏やかな部
分について重み付けされると共に、輝度もしくは色度も
しくは連続性値が強調される。従って、画像データは、
色度の分布および輝度の分布および連続性値の分布とい
う統計的性質について、調整を受けながら代表色が絞ら
れていくことになり、適応的方法と同様に画像データの
統計的性質に適した代表色が選択されることになる。
Each time a representative color is repeatedly selected, the continuity value calculating means 6 changes the coordinate axis of the continuity value every time, and the emphasis means 22 and the emphasis coefficient operation means 23 are selected.
Is calculated by the histogram updating means 25.
Updates the histogram, weights the gentle part of the color change, and emphasizes the luminance or chromaticity or continuity value. Therefore, the image data is
With regard to the statistical properties of chromaticity distribution, luminance distribution and continuity value distribution, representative colors will be narrowed down while being adjusted, and suitable for the statistical properties of image data as well as the adaptive method. The representative color will be selected.

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

【0102】以上に述べた本実施例の限定色決定方法お
よび装置により、本来フルカラー・ディスプレイ装置で
表示されるべき自然画像を、少数の色数しか同時表示で
きないカラーマップ・ディスプレイ装置上でも、違和感
無く表示できる。すなわち、判別分析により代表色を決
定する際に、輝度を示す座標軸における階級数と、色度
を示す座標軸における階級数とを異なるものとすること
により、画像の輝度や色度の分布に対応して、輝度を強
調した代表色を選択したり、色度を強調した代表色を選
択したりすることができる。特に、輝度を強調した代表
色を選択することにより、輝度に敏感な人間の視覚特性
に対応した代表色を選択できると共に、偽輪郭の発生を
抑制することができる。
With the above-described method and apparatus for determining a limited color according to the present embodiment, a natural image that should be originally displayed on a full-color display device can be displayed on a color map display device that can simultaneously display only a small number of colors. Can be displayed without. That is, when the representative color is determined by the discriminant analysis, by making the class number on the coordinate axis indicating luminance different from the class number on the coordinate axis indicating chromaticity, it is possible to correspond to the distribution of luminance and chromaticity of the image. Thus, it is possible to select a representative color whose luminance is emphasized or a representative color whose chromaticity is emphasized. In particular, by selecting a representative color whose luminance is emphasized, it is possible to select a representative color corresponding to a human visual characteristic which is sensitive to the luminance, and to suppress the occurrence of a false contour.

【0103】また、本実施例の限定色決定装置は、色の
変化の緩やかな部分を画像データの上位4ビット画像の
色連続性により特定し、この連続性を各画素毎に求めて
一つの座標軸として、色空間の3次元空間に加えた4次
元空間を設けることにより、100色以上のような比較
的色数が多い場合には、色連続性軸での分割を弱めるこ
とにより、色の変化の緩やかな部分から選択される代表
色を増やしてやることで、確実に偽輪郭を抑制すること
ができる。さらに、32色以下のような色数が少ない場
合には、色連続性軸での分割を強調することにより、色
相のまとまりを強調した色選択を可能とし、元画像の色
相分布に忠実な色選択をすることができる。
Further, the limited color determining apparatus of this embodiment specifies a portion where the color changes gradually, based on the color continuity of the upper 4-bit image of the image data, and obtains this continuity for each pixel. By providing a four-dimensional space in addition to the three-dimensional space of the color space as a coordinate axis, when the number of colors is relatively large, such as 100 colors or more, the division on the color continuity axis is weakened, so that the color By increasing the number of representative colors selected from a portion having a gradual change, false contours can be surely suppressed. Further, when the number of colors such as 32 colors or less is small, the division on the color continuity axis is emphasized to enable the color selection with the hue unit being emphasized, and the color faithful to the hue distribution of the original image. You can make a choice.

【0104】なお、これらの処理全体を汎用のコンピュ
ータ上にプログラムとして構成し、実行することも可能
である。また、元の画像データの画素当たりのメモリ容
量を必ずしも24ビットとする必要は無く、さらに、色
変化の特定に用いる上位ビットを上位4ビットとする必
要は無い。上位ビットを何桁取るかは、元の画像データ
の画素当たりのメモリ容量等によって変更しても構わな
い。
Note that the entirety of these processes can be configured as a program on a general-purpose computer and executed. Further, the memory capacity per pixel of the original image data does not necessarily have to be 24 bits, and the upper bits used for specifying the color change need not be the upper 4 bits. The number of high-order bits to be taken may be changed depending on the memory capacity per pixel of the original image data.

【0105】また、本発明によって色数を減らすには、
処理時間がかかるが、これにより得られた圧縮画像を表
示する際には、複合処理が必要ないため、機械やシステ
ムの違いに依存せず、瞬時に色が限定された圧縮画像の
表示が可能である。もちろん、本発明によって色数を減
らした画像データに対し、JPEG等で推奨の画像圧縮
をかけて用いても良く、より圧縮率が増し効果的であ
る。これらのことによって、本発明の限定色決定方法お
よび装置は、多くの産業分野への利用が期待できる。
To reduce the number of colors according to the present invention,
Processing time is required, but when displaying the resulting compressed image, complex processing is not required, so compressed images with limited colors can be displayed instantaneously, regardless of differences in machines and systems. It is. Of course, the image data of which the number of colors has been reduced according to the present invention may be subjected to the recommended image compression using JPEG or the like, and the compression rate is more effectively increased. For these reasons, the limited color determination method and apparatus of the present invention can be expected to be used in many industrial fields.

【0106】[0106]

【発明の効果】上記請求項1および3に記載の限定色決
定方法および装置によれば、画像配列上での各画素の色
成分のまとまりの良さを数値化し、均等色空間に新たに
色成分のまとまりの良さを示す座標軸を設定することに
より多次元空間を設け、この多次元空間に展開された画
像データの各画素の度数分布に対して判別分析を行い限
定された代表色を求めることにより、各画素の画像上で
の位置と色との関係すなわち原画像の色相分布に対応し
た代表色を選択することができる。
According to the method and the apparatus for determining a limited color according to the first and third aspects, the goodness of the color components of each pixel on the image array is converted into a numerical value, and the color components are newly added to the uniform color space. By setting a coordinate axis indicating the cohesiveness of the multi-dimensional space, a discriminant analysis is performed on the frequency distribution of each pixel of the image data expanded in this multi-dimensional space, and a limited representative color is obtained. It is possible to select a representative color corresponding to the relationship between the position of each pixel on the image and the color, that is, the hue distribution of the original image.

【0107】従って、単に画像データの各画素を均等色
空間上に展開し、均等色空間上における画素の度数分布
に対して判別分析を行い、代表色を決定した場合と異な
り、極めて少ない代表色で画像データを近似表示した場
合でも、画像データ上に描かれた似た色の被写体を異な
る色に描くことができる。
Therefore, unlike the case where each pixel of the image data is simply developed on a uniform color space and discrimination analysis is performed on the frequency distribution of the pixels on the uniform color space to determine representative colors, extremely few representative colors are determined. Even if the image data is approximately displayed, the subject of a similar color drawn on the image data can be drawn in a different color.

【0108】したがって、特に色数を少なくする必要の
あるCD−ROM、CD−I等の自然画像に対しても、
違和感の目立ちやすい部分を特定して、その中から違和
感の少ない指定色数の限定色を求めることにより、効果
的に対応することができ、画像データの圧縮上大変有効
である。
Therefore, even for natural images such as CD-ROMs and CD-Is that need to reduce the number of colors in particular,
By identifying a portion where a sense of discomfort is conspicuous and obtaining a limited number of specified colors with less discomfort from the portion, it is possible to deal with the problem effectively, which is very effective in compressing image data.

【0109】また、請求項2および4記載の限定色決定
方法および装置によれば、上記請求項1および請求項4
記載の限定色決定方法および装置と同様の効果を奏する
と共に、画像を予め画素間の色変化に基づいて分割して
おくことにより、画像配列上の各画素の色成分のまとま
りの良さを数値化する際に、多くの方法を用いることが
できる。
Further, according to the method and apparatus for determining a limited color according to the second and fourth aspects, the first and the fourth aspects are set forth.
The same effects as those of the described limited color determination method and apparatus can be obtained, and the image is divided in advance based on the color change between pixels, thereby quantifying the goodness of the color components of each pixel on the image array. In doing so, many methods can be used.

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

【図1】上記実施例の限定色決定装置の概略を示すブロ
ック図である。
FIG. 1 is a block diagram illustrating an outline of a limited color determining apparatus according to an embodiment.

【図2】上記実施例の限定色決定方法にかかるアルゴリ
ズムを示すフローチャートである。
FIG. 2 is a flowchart illustrating an algorithm according to a limited color determination method of the embodiment.

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

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

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

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

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

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

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

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

2 上位4ビット画像記憶手段(数値化手段) 3 モザイク画像演算手段(数値化手段) 4 モザイクセル色決定手段(数値化手段) 5 モザイクセル色記憶手段(数値化手段) 6 連続性値演算手段(数値化手段) 7 連続性値記憶手段(数値化手段) 9 クラスタ記憶手段(度数分布演算手段) 10 主軸演算手段(判別分析演算手段) 11 主軸記憶手段(判別分析演算手段) 12 ヒストグラム演算手段(度数分布演算手段) 13 ヒストグラム記憶手段(度数分布演算手段) 14 平均・分散演算手段(判別分析演算手段) 15 平均・分散記憶手段(判別分析演算手段) 16 重み付き分散演算手段(判別分析演算手段) 17 分割閾値決定手段(判別分析演算手段) 18 分割閾値記憶手段(判別分析演算手段) 19 クラスタ分割手段(判別分析演算手段) 20 クラスタ・ソート手段(判別分析演算手段) 21 分割制御手段(判別分析演算手段) 2 Upper 4-bit image storage means (Numerization means) 3 Mosaic image calculation means (Numerization means) 4 Mosaic cell color determination means (Numerization means) 5 Mosaic cell color storage means (Numerization means) 6 Continuity value calculation means (Numerization means) 7 Continuity value storage means (Numerization means) 9 Cluster storage means (Frequency distribution operation means) 10 Spindle operation means (Discriminant analysis operation means) 11 Spindle storage means (Distinction analysis operation means) 12 Histogram operation means (Frequency distribution calculation means) 13 histogram storage means (frequency distribution calculation means) 14 average / variance calculation means (discrimination analysis calculation means) 15 average / variance storage means (discrimination analysis calculation means) 16 weighted distribution calculation means (discrimination analysis calculation) Means) 17 division threshold determination means (discrimination analysis operation means) 18 division threshold storage means (discrimination analysis operation means) 19 cluster division means ( Another analysis computing means) 20 cluster sorting means (discriminant analysis operations unit) 21 division control means (discriminant analysis operations unit)

───────────────────────────────────────────────────── フロントページの続き (58)調査した分野(Int.Cl.7,DB名) G06T 1/00 510 G06T 5/00 100 G06T 11/00 110 G06T 11/60 120 G09G 5/02 G09G 5/06 JICSTファイル(JOIS)──────────────────────────────────────────────────続 き Continued on the front page (58) Fields surveyed (Int.Cl. 7 , DB name) G06T 1/00 510 G06T 5/00 100 G06T 11/00 110 G06T 11/60 120 G09G 5/02 G09G 5 / 06 JICST file (JOIS)

Claims (4)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 3原色の座標系で表現されるカラー画像
データを均等色空間の座標系に変換し、変換された座標
系における上記画像データの各画素の度数分布に対して
判別分析を行うことにより代表色を求め、上記画像デー
タを限定された代表色で近似表示するための限定色決定
方法において、 上記画像データの画像上に配列された各画素の色成分の
画像配列上での分布から上記画像配列上での各画素の色
成分のまとまりの良さを数値化し、 この数値化された画像配列上での各画素の色成分のまと
まりの良さを各画素の各色成分に対応付けして上記色空
間に新たに色成分のまとまりの良さを示す座標軸を設定
することにより多次元空間を設け、 この多次元空間の座標系における上記画像データの各画
素の度数分布を求め、上記度数分布に対して判別分析を
行うことにより代表色を求めることを特徴とする限定色
決定方法。
1. A color image data expressed by a coordinate system of three primary colors is converted to a coordinate system of a uniform color space, and discriminant analysis is performed on a frequency distribution of each pixel of the image data in the converted coordinate system. In the limited color determination method for obtaining a representative color and approximating the image data with a limited representative color, the distribution of the color components of each pixel arranged on the image of the image data on the image array From the above, the goodness of the unity of the color components of each pixel on the image array is quantified, and the goodness of the unity of the color components of each pixel on the quantified image array is associated with each color component of each pixel. A multi-dimensional space is provided by newly setting coordinate axes indicating the goodness of the color components in the color space, and the frequency distribution of each pixel of the image data in the coordinate system of the multi-dimensional space is obtained. Against And determining a representative color by performing a discriminant analysis.
【請求項2】 3原色の座標系で表現されるカラー画像
データを均等色空間の座標系に変換し、変換された座標
系における上記画像データの各画素の度数分布に対して
判別分析を行うことにより代表色を求め、上記画像デー
タを限定された代表色で近似表示するための限定色決定
方法において、 上記画像データの画像上に配列された各画素の色成分の
画像配列上での分布から、上記画像を画素間の色変化に
基づいて分割可能な領域に分割し、各画素が画像のどの
領域に属するかを調べ、各領域毎にその内部の各画素の
色成分のまとまりの良さを数値化し、この数値化された
色成分のまとまりの良さを各画素の各色成分に対応付け
して上記色空間に新たに色成分のまとまりの良さを示す
座標軸を設定することにより多次元空間を設け、 この多次元空間の座標系における上記画像データの各画
素の度数分布を求め、上記度数分布に対して判別分析を
行うことにより代表色を求めることを特徴とする限定色
決定方法。
2. Converting color image data expressed by a coordinate system of three primary colors into a coordinate system of a uniform color space, and performing discriminant analysis on a frequency distribution of each pixel of the image data in the converted coordinate system. In the limited color determination method for obtaining a representative color and approximating the image data with a limited representative color, the distribution of the color components of each pixel arranged on the image of the image data on the image array From the above, the image is divided into regions that can be divided based on the color change between pixels, and to which region of the image each pixel belongs, for each region, the goodness of the unity of the color components of each pixel inside it Is converted into a numerical value, and the numerical value of the unity of the color components is associated with each color component of each pixel, and a new coordinate axis indicating the unity of the color components is set in the color space. Provided, this multi-order Obtains a frequency distribution of the pixels of the image data in the coordinate system of the space, limited color determination method characterized by determining the representative color by performing discriminant analysis on said frequency distribution.
【請求項3】 3原色の座標系で表現されるカラー画像
データを均等色空間の座標系に変換し、変換された座標
系における上記画像データの各画素の度数分布に対して
判別分析を行うことにより代表色を求め、上記画像デー
タを限定された代表色で近似表示するための限定色決定
装置において、 上記画像データの画像上に配列された各画素の画像配列
上での色成分の分布から各画素の色成分のまとまりの良
さを数値化する数値化手段と、 該数値化手段により数値化された色成分のまとまりの良
さを各画素の色成分に対応付けして上記均等色空間に新
たに色成分のまとまりの良さを示す座標軸を設定するこ
とにより4次元空間を設け、該4次元空間の座標系にお
ける上記画像データの各画素の度数分布を求める度数分
布演算手段と、 上記度数分布演算手段により求められた上記4次元空間
の上記画像データの各画素の度数分布に対して判別分析
を行うことにより代表色を求める判別分析演算手段とを
具備してなることを特徴とする限定色決定装置。
3. Converting color image data expressed by a coordinate system of three primary colors into a coordinate system of a uniform color space, and performing discriminant analysis on a frequency distribution of each pixel of the image data in the converted coordinate system. A limited color determination device for obtaining a representative color by the above method and approximating the image data with a limited representative color, wherein a distribution of a color component on an image array of each pixel arranged on the image of the image data is provided. Numericalizing means for quantifying the goodness of the color components of each pixel from, and the uniformity of the color components quantified by the quantifying means in association with the color components of each pixel in the uniform color space A four-dimensional space is provided by newly setting a coordinate axis indicating the goodness of color component cohesion; a frequency distribution calculating means for obtaining a frequency distribution of each pixel of the image data in a coordinate system of the four-dimensional space; A discriminant analysis calculating means for obtaining a representative color by performing a discriminant analysis on a frequency distribution of each pixel of the image data in the four-dimensional space obtained by the cloth calculating means. Color determination device.
【請求項4】 3原色の座標系で表現されるカラー画像
データを均等色空間の座標系に変換し、変換された座標
系における上記画像データの各画素の度数分布に対して
判別分析を行うことにより代表色を求め、上記画像デー
タを限定された代表色で近似表示するための限定色決定
装置において、 上記画像データの画像上に配列された各画素の画像配列
位上での色成分の分布から上記画像を各画素間の色変化
に基づいて分割可能な領域に分割する画像分割手段と、 上記画像データの各画素が上記画像分割手段に分割され
た領域のうちのどの領域に属するかを求める画素所属領
域演算手段と、 上記領域内の各画素の色成分の分布から各画素の色成分
のまとまりの良さを数値化する数値化手段と、 該数値化手段により数値化された色成分のまとまりの良
さを各画素の各色成分に対応付けして上記均等色空間に
新たにに色成分のまとまりの良さを示す座標軸を設定す
ることにより4次元空間を設け、該4次元空間の座標系
における上記画像データの各画素の度数分布を求める度
数分布演算手段と、 上記度数分布演算手段により求められた上記4次元空間
の上記画像データの各画素の度数分布に対して判別分析
を行うことにより代表色を求める判別分析演算手段とを
具備してなることを特徴とする限定色決定装置。
4. Converting color image data expressed in a coordinate system of three primary colors into a coordinate system of a uniform color space, and performing discriminant analysis on a frequency distribution of each pixel of the image data in the converted coordinate system. In the limited color determination device for obtaining the representative color by the above and approximating the image data with the limited representative color, the color component on the image array position of each pixel arranged on the image of the image data is determined. An image dividing unit that divides the image from the distribution into regions that can be divided based on a color change between the pixels, and to which of the regions divided by the image dividing unit each pixel of the image data belongs Pixel-affected region calculating means, and numerical value means for quantifying the goodness of unity of the color components of each pixel from the distribution of the color components of each pixel in the region; color components quantified by the numerical value means Nomatoma The four-dimensional space is provided by associating the goodness of each pixel with each color component of each pixel and newly setting a coordinate axis indicating the goodness of the unity of the color components in the uniform color space. Frequency distribution calculating means for obtaining a frequency distribution of each pixel of the image data; and representative color by performing discriminant analysis on the frequency distribution of each pixel of the image data in the four-dimensional space obtained by the frequency distribution calculating means. And a discriminant analysis calculating means for determining the color difference.
JP04964993A 1993-03-10 1993-03-10 Limited color determining method and apparatus Expired - Fee Related JP3306964B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP04964993A JP3306964B2 (en) 1993-03-10 1993-03-10 Limited color determining method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP04964993A JP3306964B2 (en) 1993-03-10 1993-03-10 Limited color determining method and apparatus

Publications (2)

Publication Number Publication Date
JPH06259539A JPH06259539A (en) 1994-09-16
JP3306964B2 true JP3306964B2 (en) 2002-07-24

Family

ID=12837049

Family Applications (1)

Application Number Title Priority Date Filing Date
JP04964993A Expired - Fee Related JP3306964B2 (en) 1993-03-10 1993-03-10 Limited color determining method and apparatus

Country Status (1)

Country Link
JP (1) JP3306964B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0546617B1 (en) * 1991-12-09 1997-07-16 Koninklijke Philips Electronics N.V. Method of moulding products and device suitable for carrying out the method
JP5149858B2 (en) 2009-04-20 2013-02-20 富士フイルム株式会社 Color image representative color determination device and operation control method thereof

Also Published As

Publication number Publication date
JPH06259539A (en) 1994-09-16

Similar Documents

Publication Publication Date Title
JP4160258B2 (en) A new perceptual threshold determination for gradient-based local contour detection
US6445818B1 (en) Automatically determining an optimal content image search algorithm by choosing the algorithm based on color
EP0693738A2 (en) Method and apparatus for generating color image mask
JPH087552B2 (en) Display color selection method
JPH02162475A (en) Picture contour correcting method
JPH06243262A (en) Picture processor
JPH08317250A (en) Dynamic picture control circuit
US5852648A (en) Image signal processing method and image signal processing device
US5608851A (en) Color variation specification method and a device therefor
JP3126046B2 (en) Color adjustment method and color adjustment device for color image
JP3306964B2 (en) Limited color determining method and apparatus
JP3673092B2 (en) Image quality adjusting apparatus, image quality adjusting method, and recording medium recording image adjusting program
JP2522369B2 (en) Color image limited color representation method and apparatus
US5778105A (en) Method of and apparatus for removing artifacts from a reproduction
JP2973710B2 (en) Limited color determination method and limited color determination device
JPH07131653A (en) Image gradation compression display circuit
JP2914074B2 (en) Limited color determining method and apparatus
JP2806152B2 (en) Color change identification method, limited color determination method, and limited color determination device
JP3065332B2 (en) Image processing method
JP3059631B2 (en) Image correction method
JP2896319B2 (en) How to make a color image mask
JPH11296672A (en) Image color information extraction method
JP2896317B2 (en) How to make a color image mask
JP3381039B2 (en) Contour extraction method of color image applying fuzzy inference
Maeder et al. A colour importance measure for colour image analysis

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

LAPS Cancellation because of no payment of annual fees