JPH06259538A - Method and device for determining restricted color - Google Patents

Method and device for determining restricted color

Info

Publication number
JPH06259538A
JPH06259538A JP5049641A JP4964193A JPH06259538A JP H06259538 A JPH06259538 A JP H06259538A JP 5049641 A JP5049641 A JP 5049641A JP 4964193 A JP4964193 A JP 4964193A JP H06259538 A JPH06259538 A JP H06259538A
Authority
JP
Japan
Prior art keywords
color
principal component
pixel
space
component axis
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP5049641A
Other languages
Japanese (ja)
Other versions
JP2914074B2 (en
Inventor
Yuichi Kobayashi
裕一 小林
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Toppan Inc
Original Assignee
Toppan Printing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Toppan Printing Co Ltd filed Critical Toppan Printing Co Ltd
Priority to JP5049641A priority Critical patent/JP2914074B2/en
Publication of JPH06259538A publication Critical patent/JPH06259538A/en
Application granted granted Critical
Publication of JP2914074B2 publication Critical patent/JP2914074B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Controls And Circuits For Display Device (AREA)
  • Image Analysis (AREA)
  • Image Processing (AREA)
  • Image Generation (AREA)

Abstract

PURPOSE:To reduce the number of colors without generating a feeling of physi cal disorder in an original picture at the time of reducing the number of colors in picture data and displaying the picture by the small number of representative colors. CONSTITUTION:The appearance frequency of similar colors continuously appearing in respective picture elements on a picture is set up as the continuity value; of respective picture elements (S4). Each picture element has four values, i.e., values L*, a*, b* and the continuity, value. A four-dimensional (4-D) space consisting of four coordinate axes indicating the four values is supposed instead of a color space and respective picture elements in picture data are developed in the 4-D space and representative colors are determined by judgement/analysis (S11). In the case of finding out a division threshold in the 4-D space, the main component axis of the picture elements developed in the 4-D space is found out by main component anaysis (S7) and the frequency distribution of picture elements projected to the main component axis (S8) is found out (S9).

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、ディジタル化された自
然画像を、少数の色しか同時に表示できないカラーディ
スプレイ装置で、特に色数を少なくする必要がある場合
に、色変化の少ない部分をできるだけ少数色で表わし、
色差の大きい成分に対してできるだけ色を割り当てるよ
うに違和感なく色を選んで表示する限定色決定方法およ
び装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention is a color display device capable of displaying a digitized natural image at the same time in a small number of colors. Represented by a few colors,
The present invention relates to a limited color determination method and apparatus for selecting and displaying a color so that a component having a large color difference is assigned as much as possible without causing any discomfort.

【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, and each color image is digitized to about 8 bits. For a full color display, 24 bits for each pixel, or 2 24
Colors can be displayed simultaneously, and a natural image can be displayed without a sense of discomfort to the human eye.

【0003】一方、CD−ROMやCD−I、CAD
(Computer Aided Design)、CAI(Computer Assis
ted Instruction)やグラフィックスの世界では、限定
された数の色しか同時に表示できないカラーディスプレ
イ装置が使用される場合が多い。通常のカラーマップデ
ィスプレイの場合、画像メモリの画素当たりの容量は8
ビットなので、同時表示できる色の数は28=256ま
でである。256色のような限られた色数では自然画像
を劣化無く表示することは難しいが、これを可能にした
いという要求は多い。さらに、CD−ROMやCD−I
の世界では、限られたデータ容量の中に文字、音声、画
像といった種々のデータを内蔵するため、できる限りデ
ータを小さく収めるために32色以下のような少数色へ
の圧縮の要求は強い。
On the other hand, CD-ROM, CD-I, CAD
(Computer Aided Design), CAI (Computer Assis)
In the world of ted instruction) and graphics, color display devices that can display only a limited number of colors at the same time are often used. In the case of a normal color map display, the capacity per pixel of the image memory is 8
Since it is a bit, the number of colors that can be displayed simultaneously is up to 2 8 = 256. Although it is difficult to display a natural image without deterioration with a limited number of colors such as 256 colors, there are many demands for enabling this. In addition, CD-ROM and CD-I
In the world, since various data such as characters, voices, and images are built in the limited data capacity, there is a strong demand for compression to a small number of colors such as 32 colors or less in order to keep the data as small as possible.

【0004】このような目的のため、従来、カラーマッ
プディスプレイに、自然画像を視覚的な劣化をなるべく
少なくして限られた色数で表示する方法が知られてい
る。例えば、224色のフルカラーの画像データを256
色程度の代表色に減らして表示する方法としては、例え
ば、色をR,G,Bの3原色で表わした場合に、R,
G,Bの各値を座標とする3次元の直交座標系で表わさ
れる空間を色空間とし、フルカラーの画像データに含ま
れている画素の色の分布を解析し、色空間上の画素が多
く分布している色領域には多く、少ない分布の色領域に
は少なく表示色を選び、カラーマップに登録し、各画素
に最も近い代表色を割り当て、その代表色の色コードを
画像メモリの各画素の位置に書き込むことによって近似
表示を行うものがある。
For such a purpose, conventionally, there has been known a method of displaying a natural image on a color map display with a limited number of colors while minimizing visual deterioration. For example, 256 full color image data of 2 24 colors
As a method of reducing the number of representative colors to display, for example, when the colors are represented by three primary colors of R, G, and B,
A space represented by a three-dimensional orthogonal coordinate system having G and B values as coordinates is defined as a color space, and the color distribution of pixels included in full-color image data is analyzed to find many pixels in the color space. Select a display color that is large in the distributed color area and small in the distributed color area, register it in the color map, assign the representative color closest to each pixel, and assign the color code of the representative color to each of the image memory. There is one in which approximate display is performed by writing at a pixel position.

【0005】上記のように代表色を選択する方法の一つ
として、大津の判別分析(信学論 (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 the representative color as described above, Otsu's discriminant analysis (Study on Science (D) .J63-D, 4, pp.349-3
56. Showa 55-4.) Is used. Further, the color space is not limited to one that expresses a color by combining the three primary colors of RGB, but also L * u * v * , L * that considers human color differences .
There is an a * b * uniform color space (recommended by the CIE (International Commission on Illumination)) and the like, and the above discriminant analysis method can be performed using these color spaces. Further, a method in which a human visual characteristic is used and a dithering method is applied (Proceedings of the Institute of Image Electronics Engineers of Japan, Vol. 18, No. 5 (1989) p.293-301; Tajima, Ikeda) and the like are proposed.

【0006】[0006]

【発明が解決しようとする課題】ところで、上記従来の
方法、すなわち、256色程度の限定色表示アルゴリズ
ムによって32色等の少数限定色を求めた場合は、平均
的な色を選択するため、選択された代表色による近似画
像の色が濁ってしまうという問題があった。従って、3
2色等の少数の色数で自然画像を表示する場合には、人
手によってあるいは人手を介して、人間の視覚にあった
色割当を行う必要があるため、非効率的であった。
By the way, when a small number of limited colors such as 32 colors is obtained by the above-mentioned conventional method, that is, a limited color display algorithm of about 256 colors, an average color is selected. There is a problem that the color of the approximate image due to the displayed representative color becomes cloudy. Therefore, 3
Displaying a natural image with a small number of colors, such as two colors, is inefficient because it is necessary to manually or through humans perform color allocation that matches human vision.

【0007】また、従来の方法では、画像データの各画
素を色空間上に配置して、色空間上の画素の分布から代
表色を決定するので、画像上に配列された各画素間の位
置と色との関係が考慮されていなかった。例えば、空と
海とが描かれた画像データの場合は、画像上の配列で
は、空の部分の画素と海の部分の画素とが上下に分離す
ることになるが、色空間上では、空と海とが略同様な青
系統の色なので、空と海とを示す画素の一部が重なって
分布すると共に、空と海との画素が略一塊に分布するこ
とになる。
Further, in the conventional method, each pixel of the image data is arranged in the color space, and the representative color is determined from the distribution of the pixels in the color space. Therefore, the position between the pixels arranged in the image is determined. And the relationship with color was not considered. For example, in the case of image data in which the sky and the sea are drawn, pixels in the sky part and pixels in the sea part are vertically separated in the array on the image, but in the color space, Since sea and sea are blue colors that are almost the same, pixels of the sky and the sea are partially overlapped and distributed, and the pixels of the sky and the sea are distributed substantially in one block.

【0008】したがって、上記従来の方法により代表色
を決めた場合に、青系統の色の画素の塊となった色空間
の部分から代表色が選択されることなり、代表色数を大
きく減らした場合には、空と海の部分に略同じような代
表色が選択され、空と海とで色の違いがほとんどなくな
ってしまうという問題点がある。すなわち、画像データ
上に似たような色の異なる被写体があった場合に、被写
体によって代表色を変えるように選択することができな
い。
Therefore, when the representative color is determined by the above-mentioned conventional method, the representative color is selected from the portion of the color space which is a group of pixels of blue color, and the number of representative colors is greatly reduced. In this case, there is a problem that substantially the same representative colors are selected for the sky and the sea, and the color difference between the sky and the sea almost disappears. In other words, when there are similar subjects of different colors on the image data, it is not possible to select to change the representative color depending on the subjects.

【0009】本発明は、上記の問題点を解決し、自然画
像を32色等の少数の色数を自動的に求め、違和感無く
表示する限定色決定方法および装置を提供することを課
題とする。
SUMMARY OF THE INVENTION It is an object of the present invention to solve the above problems and provide a limited color determination method and apparatus for automatically obtaining a small number of colors such as 32 colors for a natural image and displaying the natural image without any discomfort. .

【0010】[0010]

【課題を解決するための手段】本発明の限定色決定方法
は、3原色の座標系で表現されるカラー画像データを、
均等色空間の座標系に変換し、変換された座標系におけ
る上記画像データの各画素の度数分布に対して判別分析
を行うことによって均等色空間を2つの領域に分割し、
さらに分割された領域を2つの領域に分割することを繰
り返すことにより代表色を求め、上記画像データを指定
した色数の限定された代表色で近似表示するものであ
り、上記判別分析により、均等色空間を順次複数の領域
に分割するに際し、上記均等色空間もしくは均等色空間
を分割した領域における上記画像データの各画素の分布
に対して、主成分分析を行うことにより主成分軸を求
め、次いで、上記主成分軸に上記均等色空間もしくは上
記領域に展開された各画素を射影し、次いで、各画素が
射影された主成分軸上において、各画素の度数分布を求
め、上記度数分布に対して判別分析を行うことにより、
上記主成分軸上における分割閾値を求め、該主成分軸上
の分割閾値において、均等色空間もしくは領域を上記主
成分軸に垂直な平面で分割することを上記課題の解決手
段とした。
A method for determining a limited color according to the present invention uses color image data represented by a coordinate system of three primary colors,
The uniform color space is converted into a coordinate system of a uniform color space, and the uniform color space is divided into two regions by performing a discriminant analysis on the frequency distribution of each pixel of the image data in the converted coordinate system,
The representative color is obtained by repeating the division of the further divided area into two areas, and the image data is approximately displayed by the representative color with a limited number of specified colors. When the color space is sequentially divided into a plurality of regions, the principal component axis is obtained by performing a principal component analysis on the distribution of each pixel of the image data in the uniform color space or the region obtained by dividing the uniform color space, Next, project each pixel developed in the uniform color space or the region on the principal component axis, then find the frequency distribution of each pixel on the principal component axis on which each pixel is projected, and calculate the frequency distribution. By performing discriminant analysis on
The division threshold on the principal component axis is obtained, and the uniform color space or region is divided on the plane perpendicular to the principal component axis at the division threshold on the principal component axis.

【0011】そして、本発明の限定色決定方法は、3原
色の座標系で表現されるカラー画像データを、均等色空
間の座標系に変換し、変換された座標系における上記画
像データの各画素の度数分布に対して判別分析を行うこ
とによって均等色空間を2つの領域に分割し、さらに分
割された領域を2つの領域に分割することを繰り返すこ
とにより代表色を求め、上記画像データを指定した色数
の限定された代表色で近似表示するものであり、上記画
像データの画像上に配列された各画素の色成分の画像配
列上での分布から上記画像配列上での各画素の色成分の
まとまりの良さを数値化し、この数値化された画像配列
上での各画素の色成分のまとまりの良さを各画素の各色
成分に対応付けして上記色空間に新たに色成分のまとま
りの良さを示す座標軸を設定することにより多次元空間
を設け、上記判別分析により、上記均等色空間に代えて
上記多次元空間を順次複数の領域に分割するものとし、
上記多次元空間の分割に際し、上記多次元空間もしくは
多次元空間を分割した領域における上記画像データの各
画素の分布に対して、主成分分析を行うことにより主成
分軸を求め、次いで、上記主成分軸に上記多次元空間も
しくは上記領域に展開された各画素を射影し、次いで、
各画素が射影された主成分軸上において、各画素の度数
分布を求め、上記度数分布に対して判別分析を行うこと
により、上記主成分軸上における分割閾値を求め、該主
成分軸上の分割閾値において、上記多次元空間もしくは
領域を上記主成分軸に垂直な曲面で分割することを上記
課題の解決手段とした。
The limited color determining method of the present invention converts the color image data represented by the coordinate system of the three primary colors into the coordinate system of the uniform color space, and each pixel of the image data in the transformed coordinate system. The uniform color space is divided into two regions by performing a discriminant analysis on the frequency distribution of, and a representative color is obtained by repeating division of the divided regions into two regions, and the above image data is designated. The approximate color is represented by a limited number of representative colors, and the color of each pixel on the image array is calculated from the distribution of the color components of each pixel arranged on the image of the image data on the image array. The goodness of unity of components is digitized, and the goodness of unity of the color components of each pixel on the digitized image array is associated with each color component of each pixel to newly add the unity of color components to the color space. Seat showing goodness The multidimensional space formed by setting the shaft, by the discriminant analysis, shall be divided into sequential plurality of areas the multidimensional space instead of the uniform color space,
When dividing the multidimensional space, the principal component axis is obtained by performing a principal component analysis on the distribution of each pixel of the image data in the multidimensional space or a region obtained by dividing the multidimensional space. Project each pixel developed in the multidimensional space or the region on the component axis, and then
On the principal component axis on which each pixel is projected, a frequency distribution of each pixel is obtained, and a discriminant analysis is performed on the frequency distribution to obtain a division threshold on the principal component axis. At the division threshold, dividing the multidimensional space or region by a curved surface perpendicular to the principal component axis is a means for solving the above problem.

【0012】また、本発明の限定色決定装置は、3原色
の座標系で表現されるカラー画像データを、均等色空間
の座標系に変換し、変換された座標系における上記画像
データの各画素の度数分布に対して判別分析を行うこと
によって均等色空間を2つの領域に分割し、さらに分割
された領域を2つの領域に分割することを繰り返すこと
により代表色を求め、上記画像データを指定した色数の
限定された代表色で近似表示するものであり、上記均等
色空間もしくは均等色空間を分割した領域における上記
画像データの各画素の分布に対して、主成分分析を行う
ことにより主成分軸を求める主成分軸演算手段と、上記
主成分軸に上記均等色空間もしくは上記領域に展開され
た各画素を射影する射影手段と、上記各画素が射影され
た主成分軸上において、各画素の度数分布を求める度数
分布演算手段と、上記度数分布に対して判別分析を行う
ことにより、上記主成分軸上における分割閾値を求める
分割閾値演算手段と、該主成分軸上の分割閾値におい
て、均等色空間もしくは領域を上記主成分軸に垂直な平
面で分割する領域分割手段とを具備してなることを上記
課題の解決手段とした。
Further, the limited color determination apparatus of the present invention converts the color image data represented by the coordinate system of the three primary colors into the coordinate system of the uniform color space, and each pixel of the image data in the transformed coordinate system. The uniform color space is divided into two regions by performing a discriminant analysis on the frequency distribution of, and a representative color is obtained by repeating division of the divided regions into two regions, and the above image data is designated. It is an approximate display with a representative color with a limited number of colors, and is mainly displayed by performing a principal component analysis on the distribution of each pixel of the image data in the uniform color space or the area obtained by dividing the uniform color space. A principal component axis calculating means for obtaining a component axis, a projecting means for projecting each pixel developed in the uniform color space or the area on the principal component axis, and a principal component axis on which each pixel is projected. Then, a frequency distribution calculating means for obtaining a frequency distribution of each pixel, a division threshold calculating means for obtaining a division threshold on the principal component axis by performing a discriminant analysis on the frequency distribution, and a division threshold calculating means on the principal component axis. It is the means for solving the above-mentioned problem that the uniform color space or the area is divided by a plane perpendicular to the principal component axis at the division threshold.

【0013】さらに、本発明の限定色決定装置は、3原
色の座標系で表現されるカラー画像データを、均等色空
間の座標系に変換し、変換された座標系における上記画
像データの各画素の度数分布に対して判別分析を行うこ
とによって均等色空間を2つの領域に分割し、さらに分
割された領域を2つの領域に分割することを繰り返すこ
とにより代表色を求め、上記画像データを指定した色数
の限定された代表色で近似表示するものであり、上記画
像データの画像上に配列された各画素の色成分の画像配
列上での分布から上記画像配列上での各画素の色成分の
まとまりの良さを数値化する数値化手段と、上記数値化
された画像配列上での各画素の色成分のまとまりの良さ
を各画素の各色成分に対応付けして上記色空間に新たに
色成分のまとまりの良さを示す座標軸を設定することに
より多次元空間を設け、上記多次元空間もしくは多次元
空間を分割した領域における上記画像データの各画素の
分布に対して、主成分分析を行うことにより主成分軸を
求める主成分軸演算手段と、上記主成分軸に上記多次元
空間もしくは上記領域に展開された各画素を射影する射
影手段と、上記各画素が射影された主成分軸上におい
て、各画素の度数分布を求める度数分布演算手段と、上
記度数分布に対して判別分析を行うことにより、上記主
成分軸上における分割閾値を求める分割閾値演算手段
と、該主成分軸上の分割閾値において、多次元空間もし
くは上記領域を上記主成分軸に垂直な曲面で分割する領
域分割手段とを具備してなることを上記課題の解決手段
とした。
Further, the limited color determining apparatus of the present invention converts the color image data represented by the coordinate system of the three primary colors into the coordinate system of the uniform color space, and each pixel of the image data in the transformed coordinate system. The uniform color space is divided into two regions by performing a discriminant analysis on the frequency distribution of, and a representative color is obtained by repeating division of the divided regions into two regions, and the above image data is designated. The approximate color is represented by a limited number of representative colors, and the color of each pixel on the image array is calculated from the distribution of the color components of each pixel arranged on the image of the image data on the image array. Numeralizing means for quantifying the goodness of cohesion of components, and the goodness of cohesion of color components of each pixel on the quantized image array are associated with each color component of each pixel to newly add to the color space. A group of color components A multidimensional space is provided by setting coordinate axes indicating goodness, and a principal component analysis is performed on the distribution of each pixel of the image data in the multidimensional space or a region obtained by dividing the multidimensional space by performing a principal component analysis. A principal component axis computing means for obtaining the principal component axis, a projection means for projecting each pixel developed in the multidimensional space or the area on the principal component axis, and a principal component axis of each pixel projected on the principal component axis. A frequency distribution calculating means for obtaining a frequency distribution, a division threshold calculating means for obtaining a division threshold on the principal component axis by performing discriminant analysis on the frequency distribution, and a division threshold on the principal component axis An area dividing means for dividing the dimensional space or the area by a curved surface perpendicular to the principal component axis is provided as a means for solving the above problems.

【0014】[0014]

【作用】上記請求項1および3記載の限定色決定方法お
よび限定色決定装置によれば、判別分析により均等色空
間もしくは均等色空間の分割した領域を分割するに際し
て、まず、上記均等色空間もしくは領域の画素の分布に
対して主成分分析を行い、主成分軸を求めている。そし
て、主成分軸上に上記均等色空間もしくは上記領域に展
開した上記画像データの画素を射影し、主成分軸上に射
影された画素の度数分布を求めている。そして、該度数
分布に対して判別分析を行うことにより、主成分軸上に
おける分割閾値を求め、この分割閾値で均等色空間もし
くは領域を分割している。
According to the limited color determination method and the limited color determination apparatus described in claims 1 and 3, when the uniform color space or the divided area of the uniform color space is divided by the discriminant analysis, first, the uniform color space or Principal component analysis is performed on the distribution of pixels in the region to find the principal component axis. Then, the pixels of the image data developed in the uniform color space or the area are projected on the principal component axis, and the frequency distribution of the pixels projected on the principal component axis is obtained. Then, by performing a discriminant analysis on the frequency distribution, a division threshold value on the principal component axis is obtained, and the uniform color space or region is divided by this division threshold value.

【0015】上記主成分軸上に射影された画素の位置
は、主成分分析により3次元空間である均等色空間にお
ける画素の分布の情報を1次元上でより多く含むように
求められたものであり、3次元の座標系において、3つ
の座標軸のうちの分割閾値を求めるべき座標軸を決め、
該座標軸に対する画素の度数分布を求め、判別分析によ
り上記座標軸上の分割閾値を求め、均等色空間を上記座
標軸上の分割閾値で上記座標軸に平行な分割平面で均等
色空間もしくは上記領域を分割した場合に比較して、分
割閾値を決定する際に、均等色空間上での画素の分布が
より多く反映されたものとなる。
The positions of the pixels projected on the principal component axis are obtained by principal component analysis so as to include more information on the distribution of pixels in the uniform color space, which is a three-dimensional space, in one dimension. Yes, in the three-dimensional coordinate system, determine the coordinate axis for which the division threshold value among the three coordinate axes should be obtained,
The frequency distribution of pixels on the coordinate axis is obtained, the division threshold on the coordinate axis is obtained by discriminant analysis, and the uniform color space is divided by the division threshold on the coordinate axis into the uniform color space or the area on a division plane parallel to the coordinate axis. Compared to the case, the distribution of pixels in the uniform color space is more reflected when determining the division threshold.

【0016】また、請求項2および4記載の限定色決定
方法および限定色決定装置によれば、上記均等色空間に
変えて、均等色空間の座標軸に、画像配列上での色成分
のまとまりの良さを示す座標軸を加えて多次元空間を設
け、該多次元空間において判別分析により代表色を求め
ているので、求められた代表色に画像配列上での色相の
分布が反映される。ここで画像配列上の各画素の色成分
のまとまりの良さを説明する。一般に、画像上に描かれ
る物体は、それぞれ比較的近い系統の色で表わされてい
る。例えば、海や空は青系統の色を多く含み、林檎は赤
系統の色を多く含んでいる。そして、画像配列上の海や
空が描かれた部分には、青系統の色を有する画素がまと
まって存在しており、これをまとまりの良さとして表現
している。
According to the limited color determination method and the limited color determination device of the second and fourth aspects, instead of the uniform color space, the coordinate axes of the uniform color space are combined into groups of color components on the image array. A coordinate axis indicating goodness is added to provide a multidimensional space, and the representative color is obtained by discriminant analysis in the multidimensional space. Therefore, the obtained representative color reflects the distribution of hues on the image array. Here, the goodness of the unity of the color components of each pixel on the image array will be described. In general, the objects drawn on the image are represented by colors of relatively close systems. For example, the sea and sky contain many blue colors, and the apple contains many red colors. Then, in the portion where the sea or the sky is drawn on the image array, pixels having a blue color are grouped together, and this is expressed as goodness of unity.

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

【0018】また、請求項2および4記載の限定色決定
方法および限定色決定装置においても、上記請求項1お
よび3記載の限定色決定方法および限定色決定装置と同
様に主成分分析により求められた主成分軸上で分割閾値
を求めることにより、判別分析法により求められた代表
色が、上記4次元空間に展開された画像データの各画素
の分布の情報をより多く反映したものとなる。
Further, in the limited color determination method and the limited color determination apparatus according to claims 2 and 4, it is obtained by the principal component analysis as in the limited color determination method and the limited color determination apparatus according to the first and third aspects. By obtaining the division threshold value on the principal component axis, the representative color obtained by the discriminant analysis method reflects more the information of the distribution of each pixel of the image data developed in the four-dimensional space.

【0019】[0019]

【実施例】以下に、本発明の限定色決定装置の一実施例
を、図面を参照して説明する。図1に示すようにこの実
施例の限定色決定装置は、カラー画像データを格納する
画像記憶手段1と、該画像記憶手段1に記憶された画像
データの上位4ビットを記憶する上位4ビット画像記憶
手段2と、上位4ビット画像記憶手段に記憶された上位
4ビットの画像データを画像サイズに応じて定めたサイ
ズの部分セルに分画するモザイク画像演算手段3と、該
モザイク画像演算手段3により部分セルに分画されたモ
ザイク画像の各セル毎にセル内に優位に存在する色成分
を求めるモザイクセル色決定手段4と、該モザイクセル
色決定手段4により求められたモザイクセル色を記憶す
るモザイクセル色記憶手段5と、上記モザイク画像にお
いて隣接するセルに同じモザイクセル色の現れる連続性
を各セル毎に鉛直、水平、左斜め、右斜めの4方向に対
して求め、その連続性を連続性値として数値化する連続
性値演算手段6と、該連続性値演算手段6により数値化
された各色成分の連続性値を記憶する連続性値記憶手段
7とを備えている。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the limited color determining apparatus of the present invention will be described below with reference to the drawings. As shown in FIG. 1, the limited color determination apparatus according to this embodiment includes an image storage unit 1 for storing color image data, and an upper 4-bit image for storing upper 4 bits of the image data stored in the image storage unit 1. A storage unit 2, a mosaic image calculation unit 3 that divides the upper 4-bit image data stored in the higher 4-bit image storage unit into partial cells having a size determined according to the image size, and the mosaic image calculation unit 3 A mosaic cell color determining unit 4 for determining a color component that is predominantly present in each cell of the mosaic image divided into partial cells by the above, and the mosaic cell color determined by the mosaic cell color determining unit 4 is stored. The mosaic cell color storage means 5 and the continuity of appearance of the same mosaic cell color in adjacent cells in the mosaic image are vertically, horizontally, diagonally left, and diagonally right four directions for each cell. And a continuity value storage means for storing the continuity value of each color component digitized by the continuity value calculation means 6. 7 and 7.

【0020】また、上記限定色決定装置は、後記(1)
〜(7)式によりカラー画像のRGBデータをL**
*データに画素毎に色変換する色変換手段8と、L*、a
*、b*およびその色成分の連続性値で張られる4次元空
間に各画素をそのL***および連続性値に基づいて
展開し、該4次元空間における各画素の集合=クラスタ
を記憶するクラスタ記憶手段9と、上記クラスタについ
て主成分分析により主成分および主成分軸(主成分ベク
トル)を計算する主成分軸演算手段10と、該主成分軸
演算手段10により求められた主成分および主成分軸を
記憶する主成分記憶手段11と、主成分記憶手段11に
記憶された主成分軸上へ各色成分を射影する色成分射影
手段12と、該色成分射影手段12により各色成分を主
成分軸上へ射影した結果を記憶する主成分軸射影値記憶
手段13と、各主成分軸射影値記憶手段13から読み取
った値のヒストグラムを計算する射影値ヒストグラム演
算手段14と、射影値ヒストグラム演算手段14により
計算されたヒストグラムを記憶する射影値ヒストグラム
記憶手段15とを備えている。
Further, the limited color determining device described above will be described in (1) below.
~ Equation (7) is used to convert RGB data of a color image into L * a * b
* Color conversion means 8 for color-converting each pixel into data, L * , a
Each pixel is expanded in a four-dimensional space spanned by the continuity values of * , b * and its color components based on the L * a * b * and continuity value, and a set of each pixel in the four-dimensional space = cluster , A principal component axis computing means 10 for computing a principal component and a principal component axis (principal component vector) for the cluster by principal component analysis, and a main component axis computing means 10 Principal component storing means 11 for storing components and principal component axes, color component projecting means 12 for projecting each color component onto the principal component axes stored in the principal component storing means 11, and each color component by the color component projecting means 12. A principal component axis projection value storage means 13 for storing the result of projecting onto the principal component axis, and a projection value histogram calculation means 14 for calculating a histogram of the values read from each principal component axis projection value storage means 13. And a projection histogram storage unit 15 for storing the calculated histogram by Kagechi histogram calculating means 14.

【0021】そして、上記限定色決定装置は、上記射影
値ヒストグラム記憶手段15に記憶されたヒストグラム
から平均および分散を求める平均・分散演算手段16
と、該平均・分散演算手段16により求められた平均・
分散を記憶する平均・分散記憶手段17と、平均・分散
記憶手段17に記憶された分散に基づいて重み付き分散
を求める重み付き分散演算手段18と、主成分記憶手段
11に記憶された主成分軸において、射影値ヒストグラ
ム記憶手段15に記憶されたヒストグラムに基づいて判
別分析により分割閾値を求める分割閾値決定手段19
と、該分割閾値決定手段19により求められた分割閾値
を記憶する分割閾値記憶手段20と、上記重み付き分散
の大きい順にクラスタを分割閾値により2分するクラス
タ分割手段21と、該クラスタ分割手段21によりクラ
スタを分割することにより新たにできたクラスタの情報
を管理するクラスタ管理記憶手段22と、上記クラスタ
分割手段19により分割されてできた各クラスタをその
主成分値によってソートするクラスタ・ソート手段23
と、上記各手段2〜23の動作をクラスタ・ソート手段
23により求められた主成分値が最大のクラスタについ
て、これ以上分割するクラスタが無くなるか、あるいは
クラスタ数が規定の色数に達するまでこれらの処理を繰
り返すクラスタ分割制御手段24とを備えている。
Then, the limited color determination device has an average / variance calculation means 16 for obtaining an average and a variance from the histogram stored in the projection value histogram storage means 15.
And the average calculated by the average / dispersion calculating means 16.
Average / dispersion storage means 17 for storing the dispersion, weighted dispersion calculation means 18 for obtaining the weighted dispersion based on the dispersion stored in the average / dispersion storage means 17, and the principal component stored in the principal component storage means 11. On the axis, a division threshold value determining unit 19 for obtaining a division threshold value by discriminant analysis based on the histogram stored in the projection value histogram storage unit 15
A division threshold value storage means 20 for storing the division threshold value obtained by the division threshold value determination means 19, a cluster division means 21 for dividing a cluster into two by the division threshold value in descending order of weighted variance, and the cluster division means 21. A cluster management storage unit 22 that manages information on a newly formed cluster by dividing the cluster by the above, and a cluster sort unit 23 that sorts each cluster formed by the cluster dividing unit 19 by its principal component value.
With respect to the cluster having the largest principal component value obtained by the cluster sorting means 23, the operations of the above respective means 2 to 23 are performed until there are no more clusters to be divided or the number of clusters reaches the specified number of colors. And a cluster division control unit 24 that repeats the above process.

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

【0023】画像記憶手段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) Value (8 bits for each color component) is stored. The upper 4 bits image storage means 2 stores the upper 4 bits of each pixel (RGB) value of the image data stored in the image storage means 1.

【0024】モザイク画像演算手段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.
Corresponding to the size of the image stored in
An arbitrary size of about / 30 is calculated, and the image data stored in the upper 4-bit image storage means 2 is segmented by the rectangular area = cell of the obtained size. Mosaic cell color determination means 4
Is a color component that is present in each cell of the image data divided into cells by the mosaic image calculation means 3 in the amount of ¼ or more in each cell (upper 4 bit value stored in the upper 4 bit image storage means 2). The average value of is calculated as the mosaic cell color.

【0025】もし、1/4以上存在する色成分が複数あ
る場合は、さらに1/2以上存在する場合を調べ、存在
する場合はその色成分を、存在しない場合は1/4以上
存在する色成分の平均値を、モザイクセル色とし、セル
内に1/4以上存在する色成分が一つの場合は、その色
成分をモザイクセル色とし、1/4以上存在する色成分
がない場合には、モザイクセル内の色成分の平均値をモ
ザイクセル色とする。モザイクセル色記憶手段5は、モ
ザイクセル色決定手段4により決定された上記モザイク
セル色をモザイク状の画像データとして記憶する。
If there are a plurality of color components that are 1/4 or more, it is checked if they are 1/2 or more. If they are present, the color components are checked. If they are not present, the color components that are 1/4 or more are present. If the average value of the components is the mosaic cell color, and there is one color component that exists in the cell at 1/4 or more, the color component is the mosaic cell color, and if there is no color component that exists at 1/4 or more, , The average value of the color components in the mosaic cell is 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.

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

【0027】色変換手段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) value of each pixel of the image data into the (L * , a * , b * ) value using a conversion formula described later. The cluster storage means 9 has L * ,
Each pixel is expanded in a four-dimensional space defined by a * , b *, and the continuity value of its color components, and a set of pixels = cluster in the four-dimensional space is stored. It should be noted that here, the cluster means a divided part of the four-dimensional space when the above-mentioned four-dimensional space is divided by using discriminant analysis, and a cluster number is assigned to each of the divided parts. Then, the position on the coordinates of the divided part of the four-dimensional space and the pixel included in the cluster are stored for each cluster number.

【0028】主成分軸演算手段10は、各クラスタに含
まれ、L*、a*、b*、およびその色成分の連続性値を
有する画素について、4成分の主成分分析法を適用して
主成分、および主成分ベクトル(主成分軸)を求める。
主成分記憶手段11は、主成分軸演算手段10で求めた
主成分および主成分軸を格納する。
The principal component axis computing means 10 applies the four component principal component analysis method to pixels included in each cluster and having L * , a * , b * , and the continuity value of the color components thereof. Find the principal component and the principal component vector (principal component axis).
The principal component storing means 11 stores the principal component and the principal component axis obtained by the principal component axis calculating means 10.

【0029】色成分射影手段12は主成分記憶手段11
で求めた主成分軸上へ各画素の色成分を射影する。主成
分軸射影値記憶手段13は、各画素の色成分を主成分軸
上へ射影した結果を格納する。
The color component projection means 12 is a principal component storage means 11
The color component of each pixel is projected onto the principal component axis obtained in. The principal component axis projection value storage unit 13 stores the result of projecting the color component of each pixel on the principal component axis.

【0030】射影値ヒストグラム演算手段14は、主成
分軸射影値記憶手段13から読み取った主成分軸上に射
影された各画素の分布に対して適宜のサンプリング間隔
でヒストグラムを計算する。射影値ヒストグラム記憶手
段15は、射影値ヒストグラム演算手段14で求めたヒ
ストグラムを格納する。平均・分散演算手段16は、主
成分軸射影値記憶手段13から読み取ったクラスタに含
まれる射影値の平均および分散を求める。平均・分散記
憶手段17は、平均・分散演算手段16で求めた平均・
分散を格納する。
The projection value histogram calculation means 14 calculates a histogram at an appropriate sampling interval for the distribution of each pixel projected on the principal component axis read from the principal component axis projection value storage means 13. The projection value histogram storage means 15 stores the histogram obtained by the projection value histogram calculation means 14. The average / variance calculation unit 16 obtains the average and variance of the projection values included in the cluster read from the principal component axis projection value storage unit 13. The average / dispersion storage means 17 calculates the average / dispersion calculation means 16.
Store the variance.

【0031】重み付き分散演算手段18は、各クラスタ
に含まれる画素数の全画素数に対する相対頻度を分散に
乗じることによって重み付き分散を求める。分割閾値決
定手段19は、上記従来の大津の判別分析によって後述
するように分割閾値を決定する。分割閾値記憶手段20
は、分割閾値決定手段19で求められた分割閾値を記憶
する。
The weighted variance calculating means 18 obtains the 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 determination means 19 determines the division threshold as described later by the above-mentioned conventional Otsu's discriminant analysis. Division threshold storage means 20
Stores the division threshold value obtained by the division threshold value determination means 19.

【0032】クラスタ分割手段21は、上記クラスタを
分割閾値記憶手段20から読み出した上記主成分軸の分
割閾値で二分する。
The cluster dividing means 21 divides the cluster into two by the division threshold of the principal component axis read from the division threshold storage means 20.

【0033】クラスタ管理情報記憶手段22は、各クラ
スタの色情報が格納されているアドレスと、それまでの
ソート順位と、クラスタ内の成分数と、クラスタの主成
分値等を格納する。クラスタソート手段23は、上記ク
ラスタ管理情報記憶手段22から読み取った主成分値で
各クラスタをソートし、結果をクラスタ管理情報記憶手
段22に設定する。
The cluster management information storage means 22 stores the address where the color information of each cluster is stored, the sort order so far, the number of components in the cluster, the principal component value of the cluster, and the like. The cluster sort unit 23 sorts each cluster by the principal component value read from the cluster management information storage unit 22 and sets the result in the cluster management information storage unit 22.

【0034】クラスタ分割制御手段23は、クラスタ分
割手段21によって分割された全クラスタ数が規定の色
数に到達するか、或は、もうそれ以上分割するクラスタ
が無くなるまでこれらの処理を繰り返し行うのを制御す
る。色変換手段25は、色変換手段8の逆変換を行い、
求められた代表色の(L*,a*,b* )の値を(R,G,
B)の値に変換する。
The cluster division control means 23 repeats these processes until the total number of clusters divided by the cluster division means 21 reaches a prescribed number of colors or there are no more clusters to be divided. To control. The color conversion means 25 performs the inverse conversion of the color conversion means 8,
The value of (L * , a * , b * ) of the obtained representative color is set to (R, G,
Convert to the value of B).

【0035】代表色割当手段26は、上記の分割が終了
後、各クラスタ毎の平均色を限定色として平均・分散記
憶手段15から読み出し、その平均色を各クラスタの代
表色として採用すると共に、元の画像データにおいて、
各クラスタに含まれる画素に、そのクラスタの平均色を
割り当て、色変換手段25によって色変換した値で置き
換える。すなわち、代表色割当手段27は、クラスタ記
憶手段9からクラスタ番号と各クラスタ番号のクラスタ
に含まれる画素を読み出し、各クラスタ番号のクラスタ
の平均色を該クラスタ番号のクラスタに含まれる画素の
色とし、色変換手段26で変換した値で各画素の色を置
き換える。限定色カラーパレット演算手段27は、求め
られた代表色を均等色空間(L*,a*,b*)上で距離に
ついてソートする。
After the above division is completed, the representative color assigning means 26 reads the average color of each cluster as a limited color from the average / dispersion storage means 15, and adopts the average color as the representative color of each cluster. In the original image data,
The average color of the cluster is assigned to the pixels included in each cluster, and the average color of the cluster is replaced by the value converted by the color conversion unit 25. 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 storing means 9, and sets the average color of the cluster of each cluster number as the color of the pixel included in the cluster of the cluster number. The color of each pixel is replaced by the value converted by the color conversion means 26. The limited color palette calculator 27 sorts the obtained representative colors on the uniform color space (L * , a * , b * ) in terms of distance.

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

【0037】また、表示された限定色カラーパレット画
面は、上記限定色カラーパレット演算手段27により代
表色が均等色空間上での距離、すなわち色差によりソー
トされ、色差の近い色が隣接して表示されるようになっ
ているとともに、前述のように選択された変更すべき代
表色が点滅表示されるようになっており、変更すべき代
表色に近い色が選択できるようになっている。
In the displayed limited color color palette screen, the limited color color palette calculating means 27 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 adjacent to each other. In addition to the above, the representative color to be changed selected as described above is displayed in a blinking manner, and a color close to the representative color to be changed can be selected.

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

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

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

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

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

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

【0044】画像上の色連続性は、各画素とその近傍の
画素との色差を計算し、色差が小さいほど連続性が強い
とみなし、大きいほど連続性が少ないとみなすことがで
きるが、本実施例では以下のように連続性を測定する。
まず、画像記憶手段1に記憶された限定色で表示すべき
画像データの各画素の上位4ビットの値を上位4ビット
画像記憶手段に記憶させることにより、上位4ビットで
表わされた画像データを作成する(ステップS1)。
The color continuity on an image can be considered by calculating the color difference between each pixel and a pixel in the vicinity thereof, the smaller the color difference, the stronger the continuity, and the larger the color difference, the less the continuity. In the examples, 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 means 1 in the upper 4 bit image storage means, the image data represented by the upper 4 bits Is created (step S1).

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

【0046】なお、モザイクセル色の選択方法を上記方
法に限るものではなく、例えば、各セル毎にセル内に含
まれる色成分(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 upper 4 bits of the color components (RGB values) contained in the cell are compared to perform principal component analysis. The main component and the main component vector are obtained by using the first main component vector when the contribution ratio of the first main component is 80% or more, and the first and second main component vectors are calculated when the contribution ratio of the first main component is less than 80%. Find the composite vector, and
If the contribution rate of the second principal component is less than 80%, a combined vector of the first, second and third principal component vectors may be obtained and used as the mosaic cell color of the cell ( Step S3). Then, a mosaic image in which a mosaic cell color is assigned to each cell as described above is created and stored in the mosaic cell color storage unit 5.

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

【0048】具体的な連続性の演算方法は、図4に示す
ように、まず注目セル41aの代表値と、上記方向に沿
って順次移動しながらセル41…の代表値を比較し、同
じ値が連続して現れる出現回数をカウントする。そし
て、同じ値が出現しなくなったところで、その方向のカ
ウントを終了する。以上の作業を、上記8方向について
行い、その同じ値の出現回数の総カウント数を注目セル
41aの連続性値として定義する。また、以上の作業は
画像データの全セル41…を注目セル41aとして行
い、全セルの連続性値を測定する。なお、図4におい
て、2つの注目セル41aは、それぞれ連続性値が3と
なっている。また、各セル毎に演算された連続性値は、
各セルに含まれる画素の連続性値とされる。
As shown in FIG. 4, a concrete method of calculating continuity is as follows. First, the representative value of the target cell 41a is compared with the representative value of the cells 41 while sequentially moving in the above direction, and the same value is calculated. Counts the number of appearances that appear consecutively. Then, when the same value does not appear, the counting in that direction ends. The above operation is performed in the above eight directions, and the total number of appearances of the same value is defined as the continuity value of the cell of interest 41a. Further, the above work is performed by using all the cells 41 of the image data as the attention cells 41a, and the continuity value of all the cells is measured. In addition, in FIG. 4, the two attention cells 41a have a continuity value of 3, respectively. Also, the continuity value calculated for each cell is
It is the continuity value of the pixels included in each cell.

【0049】そして、後述する代表色の選択の際に、L
***空間に上記連続性値の座標軸を加えた4次元空
間を想定する。すなわち、上記連続性値の座標軸が作成
される(ステップS4)。
When selecting a representative color, which will be described later, L
Assume a four-dimensional space in which the coordinate axes of the above continuity values are added to the * a * b * space. That is, the coordinate axis of the continuity value is created (step S4).

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

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

【0052】また、画像配列上の各画素の色成分のまと
まりの良さの数値化は、必ずしも上述の連続性値の測定
に限られるものではなく、前述のように分割された画像
データの各領域において、近似した色の画素の割合を求
めるなどの方法によっても良い。
The quantification 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, but each region of the image data divided as described above. In the above, a method such as obtaining the ratio of pixels of similar colors may be used.

【0053】(ロ)均等色空間への変換 代表色を選ぶために、まず画像データの色分布を色空間
上に配置するが、この際、人の視覚特性を考慮して、均
等色空間を使用する。均等色空間としては、上記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 on the color space. At this time, the uniform color space is selected 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 set to L * u * v * or
Convert to L * a * b * . In this embodiment, as an example, the conversion by the color conversion unit 8 will be described in detail using L * a * b * .

【0054】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)
The conversion from RGB data to L * a * b * is performed by the following equations 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)

【0055】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, 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)

【0056】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***データに変換する(ス
テップS5)。
0.0088 for X / X n , Y / Y n , Z / Z n
When there are 56 or less, the above formulas (6) and (7)
(X / X n ) 1/3 , (Y / Y n ) 1/3 , and (Z / Z n ) 1/3 terms of 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
Complies with TSC television standards. The RGB data of the NTSC television standard is converted into the L * a * b * data recommended by CIE by the above conversion formula (step S5).

【0057】そして、L*,a*,b*の各軸および連続性
値から張られる4次元空間をクラスタ記憶手段9がクラ
スタ画像として記憶する(ステップS6)。なお、クラ
スタ記憶手段9は、順次分割されるクラスタにクラスタ
番号を付して記憶するとともに、各クラスタに含まれる
画素を記憶する。
Then, the cluster storage means 9 stores a four-dimensional space defined by each axis of L * , a * , b * and the continuity value as a cluster image (step S6). The cluster storage unit 9 assigns cluster numbers to the sequentially divided clusters and stores the clusters, and also stores the pixels included in each cluster.

【0058】 (ハ)主成分分析による主成分および主成分軸の決定 主成分分析について図5を用いて簡単に説明する。な
お、図5は、説明を簡略化するために画素42…の変量
を2つとして画素の分布を2次元で描いたものである。
図5に示すように、2変量x1、x2を持つ画素をプロ
ットしたとき、これらの画素の集まりが1本の直線に十
分近ければ、この2次元平面上の点の散らばりは、この
直線方向の一次元の点の散らばりで代表することができ
る。
(C) Determination of Principal Components and Principal Component Axis by Principal Component Analysis Principal component analysis will be briefly described with reference to FIG. Note that FIG. 5 is a two-dimensional drawing of the distribution of pixels with two variables 42 ... For the sake of simplicity.
As shown in FIG. 5, when pixels having bivariate x1 and x2 are plotted, and the group of these pixels is sufficiently close to one straight line, the scattering of points on this two-dimensional plane is It can be represented by the scattering of one-dimensional dots.

【0059】この意味でこれらの点の散らばりの最も大
きい方向、すなわち、図の0Z方向を見つけ、各点の直
線0Z方向の成分を総合的指標として用いることができ
る。これは、n変量のn次元空間についても同様に考え
ることができる。このようにn変量のデータの分布を考
え、そのn次元空間で最も散らばりの大きい方向、すな
わち分散が最大の方向がその分布を表わすに最も適した
方向と考えられる。この分散値を主成分といい、この方
向を主成分軸という。本実施例では、上記4次元空間上
に分布する画素について、周知の4成分の主成分分析法
により、主成分軸演算手段10が、主成分と主成分軸を
求める(ステップS7)。
In this sense, it is possible to find the direction with the largest dispersion of these points, that is, the 0Z direction in the figure, and use the component of each point in the straight line 0Z direction as a comprehensive index. This can be similarly considered for an n-variable n-dimensional space. In this way, considering the distribution of n-variate data, the direction with the largest dispersion in the n-dimensional space, that is, the direction with the largest dispersion, is considered to be the most suitable direction for expressing the distribution. This dispersion value is called the principal component, and this direction is called the principal component axis. In the present embodiment, for the pixels distributed in the four-dimensional space, the principal component axis calculating means 10 obtains the principal component and the principal component axis by the well-known four-component principal component analysis method (step S7).

【0060】(ニ)ヒストグラムの作成 次に、各画素を主成分軸上に射影する(ステップS
8)。すなわち、上記4次元空間上に分布する各画素か
ら主成分軸に直交する線を引き、該線と主成分軸との交
点を主成分軸上に射影された各画素の位置とする。そし
て、主成分軸を適宜の階級間隔で分割し、各階級に含ま
れる射影された画素の分布をヒストグラムとする(ステ
ップS9)。
(D) Creation of Histogram Next, each pixel is projected onto the principal component axis (step S
8). That is, a line orthogonal to the principal component axis is drawn from each pixel distributed in the four-dimensional space, and the intersection of the line and the principal component axis is set as the position of each pixel projected on the principal component axis. Then, the principal component axis is divided at an appropriate class interval, and the distribution of the projected pixels included in each class is used as a histogram (step S9).

【0061】(ホ)判別分析法による代表色の選択 本実施例の判別分析法による代表色の選択は、基本的に
上記従来技術と同様のものであり、ヒストグラムを用い
て閾値を求め、この閾値において色空間を順次多数のク
ラスタに分割していくものであるが、本実施例において
は、色空間にさらに上記連続性を表わす座標軸を設定し
た4次元空間を用い、さらに主成分軸上に射影された画
素のヒストグラムを用いて判別分析を行う。
(E) Selection of representative color by the discriminant analysis method The selection of the representative color by the discriminant analysis method of this embodiment is basically the same as that of the above-mentioned conventional technique, and a threshold value is obtained by using a histogram. Although the color space is sequentially divided into a number of clusters at the threshold value, in the present embodiment, a four-dimensional space in which coordinate axes representing the above continuity are further set is used in the color space, and further on the principal component axis. Discriminant analysis is performed using the histogram of the projected pixels.

【0062】ここで、まず上述のように主成分軸演算手
段10により各クラスタの主成分軸を求めておく。ま
た、上記ヒストグラムから4次元空間もしくは後述する
ように分割されたクラスタにおいて、あらかじめ平均・
分散演算手段17によりクラスタ(最初は4次元空間)
の主成分軸に射影された画素の平均・分散を求めておく
(ステップS10)。さらに、重み付き分散演算手段1
8により各クラスタの重み付き分散を求め、最も重み付
き分散の大きなクラスタを求めておき、この最も重み付
き分散の大きなクラスタの主成分軸において、以下のよ
うに決められる分割閾値による分割が行われることにな
る。
Here, first, the principal component axis of each cluster is obtained by the principal component axis computing means 10 as described above. In addition, in the four-dimensional space from the above histogram or in a cluster divided as described later, the average and
Cluster by distributed computing means 17 (first four-dimensional space)
The average / dispersion of the pixels projected onto the principal component axis of is calculated (step S10). Furthermore, the weighted distributed computing means 1
8, the weighted variance of each cluster is obtained, the cluster with the largest weighted variance is obtained, and the principal component axis of this cluster with the largest weighted variance is divided by the division threshold determined as follows. It will be.

【0063】ここで、分割閾値決定手段19の判別分析
による閾値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
Here, a method of determining the threshold value T i by the discriminant analysis of the division threshold value determining means 19 will be described. When the number of pixels in the area S is N and the number of pixels at the density value i is n i , the occurrence probability q i is expressed 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
Assuming that the pixel is divided into [a, k] and C 2 [k + 1, b], pixel occurrence probabilities ω 1 and ω 2 , average values μ 1 and μ 2 , variances σ 1 2 and σ. When 2 2 is set, the density value k is determined so that the weighted dispersion sum σ w 2 given by the following equation is minimized. σ w 2 = ω 1 ω 21 −μ 2 )

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

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

【数2】 [Equation 2]

【0065】以上のようにして、各色成分および連続性
値の閾値Tiを決定することができる(ステップS1
1)。そして、求められた閾値Tiにより、上記主成分
軸演算手段10により求められた主成分軸において、ク
ラスタ分割手段19が主成分軸に直交する曲面で4次元
空間を2つのクラスタに分割する(ステップS12)。
As described above, the threshold value T i for each color component and continuity value can be determined (step S1).
1). Then, according to the obtained threshold value T i , in the principal component axis obtained by the principal component axis calculating means 10, the cluster dividing means 19 divides the four-dimensional space into two clusters by a curved surface orthogonal to the principal component axis (( Step S12).

【0066】次に、新たに分割されたクラスタにおい
て、主成分軸演算手段10により主成分と主成分軸を求
め(ステップS7’)、クラスタソート手段23により
主成分値を全てのクラスタ間で比較し、主成分値が大き
い順にクラスタをソートする(ステップS14)ことに
より最も主成分値が大きいクラスタを求め(ステップS
15)、このクラスタを次に分割するクラスタとする。
そして、求められたクラスタにおいて、上記色空間を分
割したように閾値T1を求め、クラスタを更に2つのク
ラスタに分割する。
Next, in the newly divided cluster, the principal component axis calculating means 10 finds the principal component and the principal component axis (step S7 '), and the cluster sorting means 23 compares the principal component values among all the clusters. Then, the cluster having the largest principal component value is obtained by sorting the clusters in descending order of the principal component value (step S14) (step S14).
15) Let this cluster be the cluster to be divided next.
Then, in the obtained cluster, the threshold value T1 is obtained as if the color space was divided, and the cluster is further divided into two clusters.

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

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

【0069】以上のように本実施例の限定色決定装置に
よれば、まず、各画素毎に画素値(R,G,B)を(L*,
*,b*)に変換する。そして、各画素値(R,G,B)
の上位ビット画像からモザイク画像演算手段によってモ
ザイク画像を求め、そのモザイクセルの代表色の画面上
の連続性を数値化し、各画素に対応させることにより連
続性値軸を定める。そして、前に求めたL*,a*,b*
3軸と合わせた4軸で張られる4次元空間に画像を展開
したクラスタ画像に対して、各クラスタの主成分軸を求
める。
As described above, according to the limited color determining apparatus of this embodiment, first, the pixel value (R, G, B) is (L * ,
a * , b * ). And each pixel value (R, G, B)
A mosaic image is obtained from the higher-order bit image by the mosaic image calculating means, the continuity on the screen of the representative color of the mosaic cell is digitized, and the continuity value axis is determined by corresponding each pixel. Then, the principal component axis of each cluster is obtained for the cluster image in which the image is expanded in the four-dimensional space stretched by the four axes combined with the previously obtained three axes of L * , a * , and b * .

【0070】次いで、分割閾値決定手段による判別分析
を適用して得られた主成分軸上の分割閾値でクラスタを
2分することを繰り返す。そして、目的とする色数に達
した段階で、クラスタの分割を終了する。分割終了後の
各クラスタの代表色を画像に割り当て、カラーマップに
記憶すると共にカラーディスプレイ上に既定の色数で近
似表示する。フルカラー・ディスプレイ装置に対して
は、原画像も併せて表示し、ディスプレイ上で比較が可
能である。この比較で限定色の一部を変更した場合、色
修正手段28、限定色カラーパレット手段27によって
色の修正を容易に行うことができる。
Then, the cluster is divided into two by the division threshold on the principal component axis obtained by applying the discriminant analysis by the division threshold determining means. Then, when the target number of colors is reached, the division of the cluster is completed. A representative color of each cluster after the division is assigned to an image, stored in a color map, and approximately displayed with a predetermined number of colors on a color display. For a full-color display device, the original image is also displayed and can be compared on the display. When a part of the limited color is changed in this comparison, the color can be easily corrected by the color correction means 28 and the limited color color palette means 27.

【0071】以上のことから本発明のカラー画像限定色
表示方法および装置により、本来フルカラー・ディスプ
レイ装置で表示されるべき自然画像を少数の限定色しか
同時表示できないカラーマップディスプレイ装置上で
も、違和感無く表示できる。特に50色以下のような特
に色数を少なくする必要のあるCD−ROM等への自然
画表示に対して、画像上の色の連続性を考慮して限定色
を決定することにより、色変化の少ない部分はできるだ
け少数の限定色を割り当て、色差の大きい部分にできる
だけ色が割り当てられるようにすることにより、効果的
に限定色を求めることができる。
From the above, the color image limited color display method and apparatus of the present invention can be used without any discomfort even on a color map display device which can simultaneously display only a small number of limited colors of a natural image which should originally be displayed on a full color display device. Can be displayed. In particular, for a natural image display on a CD-ROM or the like that requires a particularly small number of colors such as 50 colors or less, by determining the limited color in consideration of the continuity of colors on the image, a color change The limited color can be effectively obtained by allocating as few limited colors as possible to the portion having a small number of colors and assigning as many colors as possible to the portion having a large color difference.

【0072】さらに、動画像の場合、それぞれの画面で
少数色に圧縮することにより、複数の画像に対する限定
色を、それらの少数色の組み合わせで実現することがで
き、データの圧縮上大変有効である。本発明によって色
数を減らすには、処理時間がかかるが、これにより得ら
れた圧縮画像を表示する際には、復号処理が必要ないた
め、機械やシステムに依存せず、瞬時に表示が可能であ
る。もちろん、本発明によって色数を減らした画像デー
タに対し、JPEG等で推奨の画像圧縮をかけて用いて
も良く、より圧縮率が増し効果的である。これらのこと
によって、本発明の限定色決定方法および装置は、多く
の産業分野への利用が期待できる。
Further, in the case of a moving image, by compressing to a small number of colors on each screen, a limited color for a plurality of images can be realized by a combination of these small numbers of colors, which is very effective in data compression. is there. It takes processing time to reduce the number of colors according to the present invention, but when displaying a compressed image obtained by this, since decoding processing is not required, it is possible to display instantly without depending on the machine or system. Is. Of course, the image data of which the number of colors is reduced according to the present invention may be subjected to the recommended image compression by JPEG or the like, which is effective because the compression rate is further increased. Due to these facts, the limited color determination method and apparatus of the present invention can be expected to be applied to many industrial fields.

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

【0074】[0074]

【発明の効果】上記請求項1および3記載の限定色決定
方法および限定色決定装置によれば、判別分析により均
等色空間を順次複数の領域に分割し、該領域を代表する
色を用いて、画像データを限定された色で表示する際
に、均等色空間もしくは該均等色空間を分割した領域に
おいて主成分分析を行い主成分軸を求め、該主成分軸上
に射影された画素の度数分布を求め、該度数分布から判
別分析による分割閾値を求めているので、3次元空間を
該3次元空間に展開された画像データの画素の分布によ
り分割平面の位置を決める際に、3次元空間に展開され
た画素の分布の情報をより多く反映したものとなる。従
って、画像データを限定された少数の代表色で表示する
際に、より違和感のないものとすることができる。
According to the limited color determination method and the limited color determination apparatus described in claims 1 and 3, the uniform color space is sequentially divided into a plurality of regions by the discriminant analysis, and the colors representing the regions are used. , When displaying image data in a limited color, a principal component analysis is performed in a uniform color space or a region obtained by dividing the uniform color space to obtain a principal component axis, and the frequency of pixels projected on the principal component axis. Since the distribution is obtained and the division threshold is obtained from the frequency distribution by the discriminant analysis, when the position of the division plane is determined by the distribution of the pixels of the image data developed in the three-dimensional space, the three-dimensional space is determined. More information on the distribution of pixels developed in the above is reflected. Therefore, when displaying the image data in a limited number of representative colors, it is possible to make the image data more comfortable.

【0075】上記請求項2および4記載の限定色決定方
法および限定決定装置によれば、判別分析により代表色
を決める際に、画像データの画素を前記均等色空間の3
つの座標軸に、画像配列上での画素の色成分のまとまり
の良さを数値化した軸を加えた多次元空間に展開し、こ
の多次元空間における画素の分布から代表色を決定して
いるので、代表色を求める際に、画像上での色相の分布
を反映させることができる。
According to the limited color determination method and the limited determination apparatus described in claims 2 and 4, when the representative color is determined by the discriminant analysis, the pixels of the image data are set to the 3 of the uniform color space.
It is developed in a multi-dimensional space in which the coordinate values of the color components of the pixels on the image array are added to two coordinate axes, and the representative color is determined from the distribution of pixels in this multi-dimensional space. When obtaining the representative color, the distribution of hues on the image can be reflected.

【0076】さらに、上記請求項1および3記載の限定
色決定方法および限定色決定装置と同様に主成分分析に
より主成分軸を求め、該主成分軸上に射影された画素の
度数分布に対して判別分析による閾値の決定を行ってい
るので、4次元空間の画素の分布をより多く反映した閾
値を決めることができる。従って、画像データを少数の
代表色で表示する際に、人間の目により違和感のないも
のとすることができる。
Further, as in the limited color determination method and limited color determination apparatus described in claims 1 and 3, the principal component axis is obtained by principal component analysis, and the frequency distribution of the pixels projected on the principal component axis is calculated. Since the threshold value is determined by the discriminant analysis, it is possible to determine the threshold value that more reflects the distribution of pixels in the four-dimensional space. Therefore, when the image data is displayed in a small number of representative colors, it is possible to make the human eyes feel comfortable.

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

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

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

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

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

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

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

2 上位4ビット画像記憶手段(数値化手段) 3 モザイク画像演算手段(数値化手段) 4 モザイクセル色決定手段(数値化手段) 5 モザイクセル色記憶手段(数値化手段) 6 連続性値演算手段(数値化手段) 7 連続性値記憶手段(数値化手段) 10 主成分軸演算手段 12 色成分軸射影手段(射影手段) 14 射影値ヒストグラム演算手段(度数分布演算手
段) 19 分割閾値決定手段(分割閾値演算手段) 21 クラスタ分割手段(領域分割手段)
2 Higher 4-bit image storage means (numericalization means) 3 Mosaic image calculation means (numericalization means) 4 Mosaic cell color determination means (numericalization means) 5 Mosaic cell color storage means (numericalization means) 6 Continuity value calculation means (Numerical conversion means) 7 Continuity value storage means (numerical conversion means) 10 Principal component axis calculation means 12 Color component axis projection means (projection means) 14 Projection value histogram calculation means (frequency distribution calculation means) 19 Divided threshold value determination means ( Division threshold calculation means) 21 Cluster division means (area division means)

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】 3原色の座標系で表現されるカラー画像
データを、均等色空間の座標系に変換し、変換された座
標系における上記画像データの各画素の度数分布に対し
て判別分析を行うことによって均等色空間を2つの領域
に分割し、さらに分割された領域を2つの領域に分割す
ることを繰り返すことにより代表色を求め、上記画像デ
ータを指定した色数の限定された代表色で近似表示する
限定色決定方法において、 上記判別分析により、均等色空間を順次複数の領域に分
割するに際し、 上記均等色空間もしくは均等色空間を分割した領域にお
ける上記画像データの各画素の分布に対して、主成分分
析を行うことにより主成分軸を求め、 次いで、上記主成分軸に上記均等色空間もしくは上記領
域に展開された各画素を射影し、 次いで、各画素が射影された主成分軸上において、各画
素の度数分布を求め、 上記度数分布に対して判別分析を行うことにより、上記
主成分軸上における分割閾値を求め、該主成分軸上の分
割閾値において、均等色空間もしくは領域を上記主成分
軸に垂直な平面で分割することを特徴とする限定色決定
方法。
1. Color image data expressed in a coordinate system of three primary colors is converted into a coordinate system in a uniform color space, and a discriminant analysis is performed on the frequency distribution of each pixel of the image data in the converted coordinate system. The uniform color space is divided into two areas by performing the above operation, and the divided area is further divided into two areas to obtain a representative color. In the limited color determination method of approximating display by the above, when the uniform color space is sequentially divided into a plurality of areas by the discriminant analysis, the distribution of each pixel of the image data in the uniform color space or the area obtained by dividing the uniform color space is determined. On the other hand, a principal component axis is obtained by performing a principal component analysis, and then each pixel developed in the uniform color space or the region is projected on the principal component axis, and then each image is extracted. Is calculated, the frequency distribution of each pixel is obtained on the principal component axis, and the division threshold on the principal component axis is obtained by performing a discriminant analysis on the frequency distribution. 2. A method for determining a limited color, characterized in that the uniform color space or region is divided by a plane perpendicular to the principal component axis.
【請求項2】 3原色の座標系で表現されるカラー画像
データを、均等色空間の座標系に変換し、変換された座
標系における上記画像データの各画素の度数分布に対し
て判別分析を行うことによって均等色空間を2つの領域
に分割し、さらに分割された領域を2つの領域に分割す
ることを繰り返すことにより代表色を求め、上記画像デ
ータを指定した色数の限定された代表色で近似表示する
限定色決定方法において、 上記画像データの画像上に配列された各画素の色成分の
画像配列上での分布から上記画像配列上での各画素の色
成分のまとまりの良さを数値化し、 この数値化された画像配列上での各画素の色成分のまと
まりの良さを各画素の各色成分に対応付けして上記色空
間に新たに色成分のまとまりの良さを示す座標軸を設定
することにより多次元空間を設け、 上記判別分析により、上記均等色空間に代えて上記多次
元空間を順次複数の領域に分割するものとし、 上記多次元空間の分割に際し、 上記多次元空間もしくは多次元空間を分割した領域にお
ける上記画像データの各画素の分布に対して、主成分分
析を行うことにより主成分軸を求め、 次いで、上記主成分軸に上記多次元空間もしくは上記領
域に展開された各画素を射影し、 次いで、各画素が射影された主成分軸上において、各画
素の度数分布を求め、 上記度数分布に対して判別分析を行うことにより、上記
主成分軸上における分割閾値を求め、該主成分軸上の分
割閾値において、上記多次元空間もしくは領域を上記主
成分軸に垂直な曲面で分割することを特徴とする限定色
決定方法。
2. Color image data represented by a coordinate system of three primary colors is converted into a coordinate system of a uniform color space, and discriminant analysis is performed on the frequency distribution of each pixel of the image data in the transformed coordinate system. The uniform color space is divided into two areas by performing the above operation, and the divided area is further divided into two areas to obtain a representative color. In the limited color determination method of approximating display, the goodness of cohesion of the color components of each pixel on the image array is numerically calculated from the distribution of the color components of the pixels arrayed on the image of the image data on the image array. Then, the cohesiveness of the color components of each pixel on the digitized image array is associated with each color component of each pixel, and a coordinate axis indicating the cohesion of the color components is newly set in the color space. Especially A multi-dimensional space is provided, and the discriminant analysis is used to sequentially divide the multi-dimensional space into a plurality of regions instead of the uniform color space. When dividing the multi-dimensional space, the multi-dimensional space or the multi-dimensional space is divided. The principal component axis is obtained by performing a principal component analysis on the distribution of each pixel of the image data in the divided region, and then each pixel expanded in the multidimensional space or the region on the principal component axis. Then, on the principal component axis on which each pixel is projected, the frequency distribution of each pixel is obtained, and by performing a discriminant analysis on the frequency distribution, the division threshold on the principal component axis is obtained. A method for determining a limited color, characterized in that the multidimensional space or region is divided by a curved surface perpendicular to the principal component axis at a division threshold on the principal component axis.
【請求項3】 3原色の座標系で表現されるカラー画像
データを、均等色空間の座標系に変換し、変換された座
標系における上記画像データの各画素の度数分布に対し
て判別分析を行うことによって均等色空間を2つの領域
に分割し、さらに分割された領域を2つの領域に分割す
ることを繰り返すことにより代表色を求め、上記画像デ
ータを指定した色数の限定された代表色で近似表示する
限定色決定装置において、 上記均等色空間もしくは均等色空間を分割した領域にお
ける上記画像データの各画素の分布に対して、主成分分
析を行うことにより主成分軸を求める主成分軸演算手段
と、 上記主成分軸に上記均等色空間もしくは上記領域に展開
された各画素を射影する射影手段と、 上記各画素が射影された主成分軸上において、各画素の
度数分布を求める度数分布演算手段と、 上記度数分布に対して判別分析を行うことにより、上記
主成分軸上における分割閾値を求める分割閾値演算手段
と、 該主成分軸上の分割閾値において、均等色空間もしくは
領域を上記主成分軸に垂直な平面で分割する領域分割手
段とを具備してなることを特徴とする限定色決定装置。
3. Color image data expressed in a coordinate system of three primary colors is converted into a coordinate system in a uniform color space, and discriminant analysis is performed on the frequency distribution of each pixel of the image data in the converted coordinate system. The uniform color space is divided into two areas by performing the above operation, and the divided area is further divided into two areas to obtain a representative color. In the limited color determination apparatus that approximates the display by the above, the principal component axis is obtained by performing a principal component analysis on the distribution of each pixel of the image data in the uniform color space or a region obtained by dividing the uniform color space. Computing means, projection means for projecting each pixel developed in the uniform color space or the area on the principal component axis, and frequency of each pixel on the principal component axis on which each pixel is projected A frequency distribution calculating means for obtaining a distribution, a division threshold calculating means for obtaining a division threshold on the principal component axis by performing a discriminant analysis on the frequency distribution, and a uniform color for the division threshold on the principal component axis. A limited color determining apparatus comprising: a region dividing unit that divides a space or a region on a plane perpendicular to the principal component axis.
【請求項4】 3原色の座標系で表現されるカラー画像
データを、均等色空間の座標系に変換し、変換された座
標系における上記画像データの各画素の度数分布に対し
て判別分析を行うことによって均等色空間を2つの領域
に分割し、さらに分割された領域を2つの領域に分割す
ることを繰り返すことにより代表色を求め、上記画像デ
ータを指定した色数の限定された代表色で近似表示する
限定色決定装置において、 上記画像データの画像上に配列された各画素の色成分の
画像配列上での分布から上記画像配列上での各画素の色
成分のまとまりの良さを数値化する数値化手段と、 上記数値化された画像配列上での各画素の色成分のまと
まりの良さを各画素の各色成分に対応付けして上記色空
間に新たに色成分のまとまりの良さを示す座標軸を設定
することにより多次元空間を設け、上記多次元空間もし
くは多次元空間を分割した領域における上記画像データ
の各画素の分布に対して、主成分分析を行うことにより
主成分軸を求める主成分軸演算手段と、 上記主成分軸に上記多次元空間もしくは上記領域に展開
された各画素を射影する射影手段と、 上記各画素が射影された主成分軸上において、各画素の
度数分布を求める度数分布演算手段と、 上記度数分布に対して判別分析を行うことにより、上記
主成分軸上における分割閾値を求める分割閾値演算手段
と、 該主成分軸上の分割閾値において、多次元空間もしくは
上記領域を上記主成分軸に垂直な曲面で分割する領域分
割手段とを具備してなることを特徴とする限定色決定装
置。
4. A color image data represented by a coordinate system of three primary colors is converted into a coordinate system of a uniform color space, and a discriminant analysis is performed for a frequency distribution of each pixel of the image data in the transformed coordinate system. The uniform color space is divided into two areas by performing the above operation, and the divided area is further divided into two areas to obtain a representative color. In the limited color determination device that approximates display with, the goodness of cohesion of the color components of each pixel on the image array is numerically determined from the distribution of the color components of the pixels arrayed on the image of the image data on the image array. Numericalizing means for digitizing, and associating the goodness of aggregation of color components of each pixel on the digitized image array with each color component of each pixel to newly show goodness of aggregation of color components in the color space. Show coordinate axes A multi-dimensional space is provided by defining the multi-dimensional space, and a main component axis is obtained by performing a main component analysis on the distribution of each pixel of the image data in the multi-dimensional space or a region obtained by dividing the multi-dimensional space. A computing means, a projection means for projecting each pixel developed in the multidimensional space or the area on the principal component axis, and a frequency for obtaining a frequency distribution of each pixel on the principal component axis on which each pixel is projected. A distribution calculation means, a division threshold calculation means for obtaining a division threshold on the principal component axis by performing a discriminant analysis on the frequency distribution, and a multidimensional space or the region in the division threshold on the principal component axis. And a region dividing means for dividing the above into a curved surface perpendicular to the principal component axis.
JP5049641A 1993-03-10 1993-03-10 Limited color determining method and apparatus Expired - Lifetime JP2914074B2 (en)

Priority Applications (1)

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

Applications Claiming Priority (1)

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

Publications (2)

Publication Number Publication Date
JPH06259538A true JPH06259538A (en) 1994-09-16
JP2914074B2 JP2914074B2 (en) 1999-06-28

Family

ID=12836843

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5049641A Expired - Lifetime JP2914074B2 (en) 1993-03-10 1993-03-10 Limited color determining method and apparatus

Country Status (1)

Country Link
JP (1) JP2914074B2 (en)

Also Published As

Publication number Publication date
JP2914074B2 (en) 1999-06-28

Similar Documents

Publication Publication Date Title
US6518981B2 (en) Generating and using a color palette
US6445818B1 (en) Automatically determining an optimal content image search algorithm by choosing the algorithm based on color
Braquelaire et al. Comparison and optimization of methods of color image quantization
US8248410B2 (en) Synthesizing detailed depth maps from images
US6927874B1 (en) Image processing method, apparatus and storage medium therefor
US6236406B1 (en) Three-dimensional color space display
US6853374B2 (en) Image space display method and apparatus
US5491769A (en) Method and apparatus for variable minification of an image
Vlachos et al. Graph—theoretical approach to colour picture segmentation and contour classification
US6934422B2 (en) Methods, data, and systems to warp an image
US6836563B2 (en) Computer-readable medium and program for quantizing a data set, method and apparatus for quantizing a data set
CN111179173B (en) Image splicing method based on discrete wavelet transform and gradient fusion algorithm
US5608851A (en) Color variation specification method and a device therefor
JP2522369B2 (en) Color image limited color representation method and apparatus
US5778105A (en) Method of and apparatus for removing artifacts from a reproduction
JP3483912B2 (en) Color discriminating apparatus and color discriminating method
JP2914074B2 (en) Limited color determining method and apparatus
JP2003216948A (en) Representative color extraction device and representative color extraction program
JP3065332B2 (en) Image processing method
JP2973710B2 (en) Limited color determination method and limited color determination device
JP3306964B2 (en) Limited color determining method and apparatus
JP2002170122A (en) Method and program for texture analysis
JP2806152B2 (en) Color change identification method, limited color determination method, and limited color determination device
JPH08167028A (en) Image processing method
Watanabe A fast algorithm for color image quantization using only 256 colors

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