[go: up one dir, main page]

JPH06337926A - Method for optimizing display limited color and limited color display device - Google Patents

Method for optimizing display limited color and limited color display device

Info

Publication number
JPH06337926A
JPH06337926A JP5148603A JP14860393A JPH06337926A JP H06337926 A JPH06337926 A JP H06337926A JP 5148603 A JP5148603 A JP 5148603A JP 14860393 A JP14860393 A JP 14860393A JP H06337926 A JPH06337926 A JP H06337926A
Authority
JP
Japan
Prior art keywords
color
point
distance
histogram
image
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.)
Withdrawn
Application number
JP5148603A
Other languages
Japanese (ja)
Inventor
Masahiro Kawachi
正洋 河内
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.)
Victor Company of Japan Ltd
Original Assignee
Victor Company of Japan 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 Victor Company of Japan Ltd filed Critical Victor Company of Japan Ltd
Priority to JP5148603A priority Critical patent/JPH06337926A/en
Publication of JPH06337926A publication Critical patent/JPH06337926A/en
Withdrawn legal-status Critical Current

Links

Landscapes

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

Abstract

PURPOSE:To prevent a false contour and dropping of a small area of color at the time of displaying a color picture with limited colors. CONSTITUTION:A histogram preparing means 3 prepares histograms H (m1, m2, m3) of picture data and a distance calculating means 5 finds out a distance (d) from each point in a color space up to the nearest point in a color pallet based on the histograms H (m1, m2, m3) and an initial representative point <C<0>n> prepared by an initial representative point preparing means 4. A minimum distance representative point selecting means 6 selects a distance from each point in the color space up to the nearest point of the color pallet, an adding means 7 adds the selected value to the preceding color pallet and an evaluating means 8 evaluates the added value to fined out a color pallet <C<k>n> for furthermore reducing the sum J (<Cn>) of products between the added value and the histograms H of the color picture.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、コンピュータやCDグ
ラフィックス等においてカラー画像を限定色により表示
するための表示限定色の最適化方法および限定色表示装
置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method for optimizing a display limited color and a limited color display device for displaying a color image in a limited color in a computer, a CD graphic or the like.

【0002】[0002]

【従来の技術】一般に、例えばRGB各8ビットのデジ
タルカラー画像を224色のフルカラーで表示すると各画
素に対して24ビットのメモリが必要になるので、メモ
リ容量を低減させるために限定色により表示する方法が
知られている。また、表示能力が256色程度のコンピ
ュータにおいてカラー画像を表示するためには、表示さ
れる限定色を最適化することが必要になる。
2. Description of the Related Art Generally, for example, when a digital color image of 8 bits each for RGB is displayed in 2 24 full colors, a memory of 24 bits is required for each pixel. A method of displaying is known. Further, in order to display a color image on a computer having a display capability of about 256 colors, it is necessary to optimize the limited color to be displayed.

【0003】この種の限定色表示方法としては、原画像
の色分布の統計量を考慮せず、単純に色分布領域を代表
色数に均等に分割し、各領域の中央値を代表色とする均
等量子化法(uniform quantization method)や、後述
するように原画像の色分布の統計量を基にカラーパケッ
トを最適化する細分化量子化法(tapered quantization
method)や、何らかの方法で代表色を決定した場合に
原画像の各画素の色(色空間におけるユークリッド距離
で)最も近い色を選定する最近隣色探索法等が知られ、
上記細分化量子化法としては種々の提案がなされてい
る。
In this type of limited color display method, the color distribution area is simply divided into representative color numbers without considering the statistical quantity of the color distribution of the original image, and the median value of each area is defined as the representative color. Uniform quantization method, which is described later, or a subdivided quantization method (tapered quantization) that optimizes color packets based on statistics of the color distribution of the original image as described later.
method) or the nearest neighbor color search method that selects the closest color (in Euclidean distance in color space) of each pixel of the original image when the representative color is determined by some method,
Various proposals have been made as the subdivision quantization method.

【0004】この細分化量子化法としては、最も出現頻
度が高い色から順次代表色として選定する頻度法や、R
GB色空間内で原画像の色が分布している部分領域だけ
を線形に分割して代表色を決定する色空間線形分割法
や、先ず原画像のRGB空間における色分布に外接する
直方体を考え、RGB3軸のうち直方体の最も長い辺に
平行な軸で原画像の総画素数を等分するように直方体を
2分し、これを繰り返しながら直方体を徐々に細分化し
て最後に同数の画素から成るN個の直方体を生成し、各
直方体の色データの平均値を代表色とする中央値分割法
や、RGB空間を仕切る区画を徐々に拡大していく過程
で各画素内に含まれる画素数をできるだけ同数になるよ
うにしてその区画毎の代表色を選定するポピュレーショ
ン イコライゼーション(population equalization)
法や、RGB空間を色の分布に合わせて球状の部分空間
で仕切ってその部分空間毎に代表色を選定する適応型部
分空間法や、RGB空間において代表色をお互いにでき
るだけ離して配置する観点から代表色を立方最密状に配
置させる立方最密配置法や、ペアノ(Peano)曲線を用
いて一筆書きの要領でペアノ走査して3次元空間の分布
を1次元化し、これを等頻度分割することにより代表色
を決定する方法が知られている。
As the subdivision quantization method, a frequency method in which colors having the highest appearance frequency are sequentially selected as representative colors, and R
Consider a color space linear division method that linearly divides only a partial area where the color of the original image is distributed in the GB color space to determine a representative color, and a rectangular parallelepiped that circumscribes the color distribution in the RGB space of the original image. , The RGB three axes are divided into two so that the total number of pixels of the original image is equally divided by the axis parallel to the longest side of the rectangular parallelepiped, and the rectangular parallelepiped is gradually subdivided by repeating this, and finally from the same number of pixels. The number of pixels included in each pixel in the process of generating N rectangular parallelepipeds and using the median value division method in which the average value of the color data of each rectangular parallelepiped is the representative color, and the process of gradually expanding the partitions that partition the RGB space. Population equalization that selects representative colors for each section so that the
Method, an adaptive subspace method in which the RGB space is partitioned into spherical subspaces according to the color distribution and a representative color is selected for each subspace, and a viewpoint in which the representative colors are arranged as far apart from each other as possible in the RGB space The cubic close-packing method, which arranges the representative colors in a cubic close-packed manner, and the Peano curve are used in a single stroke to perform a Peano scan to make the distribution of the three-dimensional space one-dimensional, and divide this into equal frequency divisions. There is known a method of determining a representative color by doing.

【0005】また、例えば特開平4−190466号公
報に示されるようにRGB各8ビットのデータの上位5
ビットを用いて色空間を構成し、色分布に基づいて色空
間が限定された数の領域に分割して各領域の代表色を選
定し、各原画像の色と、選定された代表色と、この代表
色に似通った色との間で3次元ユークリッド距離を算出
して最も距離が短い代表色を原画像に割り付け、また、
ペアノ曲線を用いて1次元化する方法が提案されてい
る。
Further, as shown in, for example, Japanese Patent Laid-Open No. 4-190466, the upper 5 of each 8-bit RGB data
The color space is constructed using bits, the color space is divided into a limited number of areas based on the color distribution, and the representative color of each area is selected. , Calculating a three-dimensional Euclidean distance from a color similar to the representative color, assigning the representative color with the shortest distance to the original image, and
A method of making one-dimensional by using a Peano curve has been proposed.

【0006】さらに、他の方法として特開平4−152
386号公報に示されるように色分布に基づいて色空間
が限定された数の領域に分割して各領域の代表色を選定
し、各原画像の色と、原画素が属する領域の代表色と、
この領域に隣接する2つの領域の代表色との間で3次元
ユークリッド距離を算出して最も距離が短い代表色を原
画像に割り付ける方法が提案されている。
Further, as another method, Japanese Patent Laid-Open No. 4-152
As shown in Japanese Patent No. 386, the representative color of each region is selected by dividing the color space into a limited number of regions based on the color distribution, and the color of each original image and the representative color of the region to which the original pixel belongs. When,
A method has been proposed in which a three-dimensional Euclidean distance is calculated between the representative colors of two areas adjacent to this area and the representative color having the shortest distance is assigned to the original image.

【0007】また、他の方法としては、例えば特開平3
−37696号公報に示されるようにカラー空間内の任
意の点と最も近いカラーサンプル点との間の最大距離を
減少させるために、カラー空間全体を含む6角結晶構造
中にサンプル点を配分することが提案されている。
Another method is, for example, Japanese Patent Laid-Open No.
Sample points are distributed in a hexagonal crystal structure that includes the entire color space in order to reduce the maximum distance between any point in the color space and the closest color sample point as shown in US Pat. Is proposed.

【0008】[0008]

【発明が解決しようとする課題】ここで、上記特開平3
−37696号公報に示される方法では、サンプル点を
正6角形の頂点に配置するので、サンプル点を格子状に
均等に配置した場合に比べて、同一数のサンプル点を用
いても空間内の任意の点までの距離を小さくすることが
できる。しかしながら、どのような画像データに対して
もサンプル点の取り方すなわちカラーパレットの取り方
が不変であるので、このようなカラーパレットでは、例
えば空の絵のように色が徐々に変化するような画像に対
しては疑似輪郭が発生することが避けられないという問
題点がある。
SUMMARY OF THE INVENTION Here, the above-mentioned Japanese Patent Laid-Open No.
In the method disclosed in Japanese Patent Publication No. 37696, since the sample points are arranged at the vertices of a regular hexagon, even if the same number of sample points is used, the space in the space is smaller than that in the case where the sample points are evenly arranged in a grid pattern. The distance to any point can be reduced. However, the method of taking the sample points, that is, the method of taking the color palette is invariant for any image data, so that in such a color palette, the color gradually changes like an empty picture, for example. There is a problem in that it is unavoidable that pseudo contours occur in an image.

【0009】なお、上記「頻度法」、「中央値分割
法」、「ポピュレーション イコライゼーション法」、
「適応型部分空間法」、「立体最密配置による方法」、
「ペアノ曲線を用いた方法」などでは、疑似輪郭の問題
を解決することができるかもしれないが、例えば緑色が
一面に存在する中に赤色の花が小さく存在するような絵
では、データ量が非常に多い「緑色」付近に全てのサン
プル点を取られると「赤色」に適正な色を割り当てるこ
とができなくなるので、花の「赤色」を適正に表示する
ことができなくなる事態が発生しやすいという問題点が
ある。
The above "frequency method", "median division method", "population equalization method",
"Adaptive subspace method", "method by three-dimensional close packing",
The method using the Peano curve may be able to solve the problem of pseudo contours, but for example, in a picture in which red flowers are small while there is green on one side, the amount of data is If all the sample points are taken in the vicinity of "green", which is very common, it will not be possible to assign an appropriate color to "red", so it will be difficult to properly display the "red" of flowers. There is a problem.

【0010】本発明は上記従来の問題点に鑑み、疑似輪
郭と小面積の色の欠落を防止することができる表示限定
色の最適化方法および限定色表示装置を提供することを
目的とする。
In view of the above-mentioned conventional problems, an object of the present invention is to provide a method of optimizing a display-limited color and a limited-color display device which can prevent a false contour and a color loss of a small area.

【0011】[0011]

【課題を解決するための手段】本発明は上記目的を達成
するために、色彩空間における各点からカラーパレット
の最も近い点までの距離と、カラー画像のヒストグラム
との積の和をより小さくすることによりカラーパレット
を求めるようにしている。すなわち本発明によれば、色
彩空間における各点からカラーパレットの最も近い点ま
での距離と、カラー画像のヒストグラムとの積の和をよ
り小さくすることによりカラーパレットを求めることを
特徴とする表示限定色の最適化方法が提供される。
In order to achieve the above object, the present invention reduces the sum of the product of the distance from each point in the color space to the closest point in the color palette and the histogram of the color image. By doing so, I seek a color palette. That is, according to the present invention, the color palette is obtained by further reducing the sum of the product of the distance from each point in the color space to the closest point of the color palette and the histogram of the color image. A color optimization method is provided.

【0012】また、本発明によれば、カラー画像のヒス
トグラムを作成するヒストグラム作成手段と、カラー画
像の画像データと前記ヒストグラム作成手段により作成
されたヒストグラムに基づいて、色彩空間における各点
からカラーパレットの最も近い点までの距離を計算する
距離計算手段と、前記距離計算手段により計算された距
離と前記ヒストグラム作成手段により作成されたヒスト
グラムとの積の和をより小さくするカラーパレットを求
める手段とを有する限定色表示装置が提供される。
Further, according to the present invention, a histogram creating means for creating a histogram of a color image, and the color palette from each point in the color space based on the image data of the color image and the histogram created by the histogram creating means. Distance calculating means for calculating the distance to the closest point of, and means for obtaining a color palette that further reduces the sum of the products of the distance calculated by the distance calculating means and the histogram created by the histogram creating means. A limited color display device having the same is provided.

【0013】[0013]

【作用】本発明では、色彩空間における各点からカラー
パレットの最も近い点までの距離と、カラー画像のヒス
トグラムとの積の和をより小さくするカラーパレットが
求められ、したがって、サンプル点の配置位置が画像デ
ータに応じて最適化されるとともに、積演算によりサン
プル点から離れた画素値から構成される小面積の比重が
増加するので、疑似輪郭と小面積の色の欠落を防止する
ことができる。
According to the present invention, a color palette that reduces the sum of the product of the distance from each point in the color space to the closest point in the color palette and the histogram of the color image is calculated. Is optimized according to the image data, and the weight of the small area formed by the pixel values distant from the sample point is increased by the product operation, so that it is possible to prevent the false contour and the loss of the color of the small area. .

【0014】[0014]

【実施例】以下、図面を参照して本発明の実施例を説明
する。図1は本発明に係る表示限定色の最適化方法およ
び限定色表示装置の一実施例を示すブロック図、図2は
図1の方法および装置によるサンプル点の配置位置を示
す説明図、図3は図1の装置の変形例を示すブロック図
である。
Embodiments of the present invention will be described below with reference to the drawings. FIG. 1 is a block diagram showing an embodiment of a method for optimizing a display limited color and a limited color display device according to the present invention, FIG. 2 is an explanatory diagram showing arrangement positions of sample points by the method and device of FIG. 1, and FIG. FIG. 7 is a block diagram showing a modified example of the device of FIG. 1.

【0015】最初に本発明における、用語について説明
すると、先ず、本発明における画像とは、2次元の整数
Nの座標空間内における各座標から画素値への関数であ
る。また、各画素値は通常、1次元(モノクロ画像)ま
たは3次元(カラー画像)のベクトル値であり、画像P
は、
First, the terms in the present invention will be explained. First, the image in the present invention is a function from each coordinate in the coordinate space of a two-dimensional integer N to a pixel value. Further, each pixel value is usually a one-dimensional (monochrome image) or three-dimensional (color image) vector value, and the image P
Is

【0016】[0016]

【数1】P:N2 →N (モノクロ画像) P:N2 →N3 (カラー画像)[Equation 1] P: N 2 → N (monochrome image) P: N 2 → N 3 (color image)

【0017】で表される。A=(x,y)の点の画素値
はPAまたはP(x,y)で表し、また、このPA、P
(x,y)を単に画素ともいう。さらに、3次元のベク
トル値の場合には、RGB(レッド、グリーン、ブル
ー)、YMC(イエロー、マゼンタ、シアン)、HSI
(色相、彩度、明度)のような物理量が考えられるが、
このような3次元の値からなる空間を色彩空間と呼ぶ。
また、この3次元の色彩空間内の点Aの第1座標軸の値
をPA.XまたはP(x,y).Xで表し、同様に第2、
第3座標軸の値をそれぞれPA.YまたはP(x,y).
Y、PA.ZまたはP(x,y).Zで表す。したがっ
て、このような色彩空間では、数学で普通に表される距
離dを導入することができ、この距離dは空間内の任意
の点Q、R、Sに対して
It is represented by The pixel value at the point of A = (x, y) is represented by P A or P (x, y), and P A , P
(X, y) is also simply referred to as a pixel. Furthermore, in the case of a three-dimensional vector value, RGB (red, green, blue), YMC (yellow, magenta, cyan), HSI
Physical quantities such as (hue, saturation, lightness) can be considered,
A space composed of such three-dimensional values is called a color space.
Further, the value of the first coordinate axis of the point A in this three-dimensional color space is represented by P A. X or P (x, y). X, and similarly, the second,
The value of the third coordinate axis is P A. Y or P (x, y).
Represented by Y, PA.Z or P (x, y) .Z. Therefore, in such a color space we can introduce a distance d, which is commonly expressed in mathematics, which for any point Q, R, S in space.

【0018】[0018]

【数2】d(Q,R)≧0 d(Q,R)=d(R,Q) d(Q,R)=0 ⇔ Q=R d(Q,R)≦d(Q,S)+d(S,R)## EQU2 ## d (Q, R) ≧ 0 d (Q, R) = d (R, Q) d (Q, R) = 0 ⇔ Q = R d (Q, R) ≦ d (Q, S) + D (S, R)

【0019】を満たす正の実数値関数dである。なお、
この関数dとしては、ユークリッド距離やシティブロッ
ク距離が広く知られており、また、色相データのように
巡回するような座標に関しても導入することができる。
また、本実施例では、画像Pの色彩空間における頻度分
布(ヒストグラム)をHPで表す。また、画像Pにおけ
る画素値pの頻度はHP(p)で表し、特にp=(x,
y,z)のときHP(x,y,z)で表す。
It is a positive real-valued function d that satisfies: In addition,
As the function d, the Euclidean distance and the city block distance are widely known, and it is also possible to introduce them for coordinates such as hue data that circulate.
Further, in this embodiment, it represents the frequency distribution in color space of the image P a (histogram) in H P. Further, the frequency of the pixel value p in the image P is represented by HP (p), and in particular p = (x,
y, expressed when the z) H P (x, y , z).

【0020】ここで、3次元の色彩空間の各座標軸が8
ビットの精度すなわち256階調の場合には、前述した
ように画像表示装置には28×28×28=約1670万
色の表示能力が必要になるが、このような高画質な画像
を表示可能なコンピュータは高価であり、また、各画素
に対して24ビットのデータが必要になるのでデータ量
も多くなる。したがって、現状では各画素に対して全体
で8ビットすなわち256色程度の表示能力を有するも
のが多く、この場合には0〜255の番号が付された画
素値が表示されている。そこで、本実施例では、画素値
の列C1、C2…CNを<Ci|i=0,1…N>で表
し、また、個数に対して特に注意を払う必要がない場合
には単に<Ci>で表す。
Here, each coordinate axis of the three-dimensional color space is 8
In the case of bit precision, that is, 256 gradations, the image display device must have a display capacity of 2 8 × 2 8 × 2 8 = about 16.7 million colors as described above. A computer capable of displaying is expensive, and 24-bit data is required for each pixel, resulting in a large amount of data. Therefore, at present, most of the pixels have a display capability of 8 bits in total, that is, about 256 colors, and in this case, pixel values numbered 0 to 255 are displayed. Therefore, in this embodiment, the pixel value columns C1, C2 ... CN are represented by <C i | i = 0, 1 ... N>, and if it is not necessary to pay particular attention to the number, simply It is represented by C i >.

【0021】このような定義を用いて本実施例では、画
像毎に適したカラーパレットを作成し(すなわち画像P
に最も適した<Ci>を求め)、色彩空間の各画素値毎
に割り当てる<Ci>の中の1つを決定する。したがっ
て、色彩空間の各点は、<Ci>の個数Nの集合に分割
され、各<Ci>がそれぞれの集合の代表点とみなすこ
とができる。
In this embodiment using such a definition, a color palette suitable for each image is created (that is, image P
<C i >, which is the most suitable for the color space), and one of <C i > assigned to each pixel value in the color space is determined. Thus, each point of the color space can be regarded divided into a set number N of <C i>, the <C i> is a representative point of each set.

【0022】次に、本発明の第1実施例を説明する。こ
の実施例では、画像PのヒストグラムをH(m1,m
2,m3)(但し、m1=0,1…M1,m2=0,1
…M2,m3=0,1…M3)とし、この画像を表示す
るためのカラーパレットを<C n|i=0,1…N>と
して、次の式(1)で与えられるJ(<Cn>)につい
て考え、このJ(<Cn>)を最小にする<Cn>を求め
ることによりカラーパレット<Cn>を作成する。
Next, a first embodiment of the present invention will be described. This
In this embodiment, the histogram of the image P is set to H (m1, m
2, m3) (however, m1 = 0,1 ... M1, m2 = 0,1
... M2, m3 = 0,1 ... M3) and display this image
<C to create a color palette n | i = 0, 1 ... N>
Then, J (<C given by the following equation (1)n>)
Think of this, J (<Cn>) To minimize <Cn
Color palette <Cn> Is created.

【0023】[0023]

【数3】 [Equation 3]

【0024】式(1)は各画素値を、<Cn>の中で最
も距離的に近い値で置き換えたときの画像P全体におけ
る誤差を示す量を示し、別の見方をすればこれは画像P
をサンプリングしなおしたときのサンプリングノイズの
総和である。
Equation (1) represents the amount of error in the entire image P when each pixel value is replaced by the closest distance value in <C n >. From another viewpoint, this is Image P
Is the sum of the sampling noises when resampled.

【0025】特開平3−37696号公報のようにどの
ような画像データに対してもサンプル点の取り方すなわ
ちカラーパレットの取り方が不変である場合、このよう
なカラーパレットでは、例えば空の絵のように色が徐々
に変化するような画像に対しては疑似輪郭が発生するこ
とが避けられないが、本実施例では図2に示すように、
画像データの値が集中する場所(図では緑色)にサンプ
ル点が多く配置されているので疑似輪郭を防止すること
ができる。
In the case where the method of taking sample points, that is, the method of taking a color palette is invariant with respect to any image data as in Japanese Patent Laid-Open No. 3-37696, such a color palette is used to, for example, display an empty picture. It is unavoidable that a pseudo contour occurs in an image in which the color gradually changes as described above, but in the present embodiment, as shown in FIG.
Since many sample points are arranged in a place where the image data values are concentrated (green in the figure), the pseudo contour can be prevented.

【0026】また、式(1)では、距離dとヒストグラ
ムHpの掛け算により、離れた点の比重が大きくなるよ
うに機能し(図2に示す斜線部の面積)、数としても離
れた場所のデータを漏らすことがなくなるので、例えば
緑色が一面に存在する中に赤色の花が小さく存在するよ
うな絵においても「赤色」の花を表示することができ、
したがって、小面積の色の欠落を防止することができ
る。また、式(1)における「Σ」は、データが多く存
在する位置に多くのサンプル点を割り当てることを意味
する。
In the equation (1), the distance d is multiplied by the histogram Hp so as to increase the specific gravity of the distant points (the area of the hatched portion shown in FIG. 2), and the number of distant points is also calculated. Since data will not be leaked, for example, a "red" flower can be displayed even in a picture in which a red flower is small while a green color is on one side,
Therefore, it is possible to prevent color loss in a small area. Further, “Σ” in Expression (1) means that many sample points are assigned to positions where much data exist.

【0027】ここで、式(1)に示すJ(<Cn>)を
最小にする<Cn>を求める最も単純な方法は、全ての
<Cn>の組み合わせに対してJ(<Cn>)を求めて最
小のものを選択することであるが、色彩空間の各座標軸
が8ビットすなわち256個の値をとり得ると、<Cn
>の組み合わせは、
[0027] Here, J shown in Equation (1) (<C n> ) to minimize the simplest method of obtaining the <C n>, all <C n> J for the combination of (<C n >) and select the smallest one, but if each coordinate axis of the color space can take 8 bits, that is, 256 values, <C n
> combination is

【0028】[0028]

【数4】256*256*256N …(2)[Equation 4] 256 * 256 * 256 C N (2)

【0029】通りとなる。したがって、この値はN=2
の時点で(約1670万)2/2であり、式(1)の計
算をこの回数だけ繰り返すことは現実的ではない。ここ
で、何らかの形で初期代表点列<C0 n>が与えられたと
きに、これを基に次の代表点列<C1 n>を求め、同様な
演算を繰り返して最終的にJ(<Cn>)を最小にする
<Cn>を求めることが必要になる。これにより求めら
れる<Cn>は、必ずしも式(1)の値を最小にするも
のでないかもしれないが、より良いカラーパレットとし
て求めることが可能であり、この手順を以下に説明す
る。先ず、
It becomes as follows. Therefore, this value is N = 2
Of (about 16.7 million) 2/2 at the time, it is not practical to repeat the calculation of equation (1) this number of times. Here, when the initial representative point sequence <C 0 n > is given in some form, the next representative point sequence <C 1 n > is obtained based on this, and similar operations are repeated to finally obtain J ( It is necessary to find <C n > that minimizes <C n >). The <C n > obtained by this may not necessarily minimize the value of the equation (1), but it can be obtained as a better color palette, and this procedure will be described below. First,

【0030】[0030]

【数5】 <C0 n>,<C1 n>,…,<CK n> …(3)<C 0 n >, <C 1 n >, ..., <C K n > ... (3)

【0031】を順次求めるということは、各Ck nに対し
Sequential determination of means that for each C k n

【0032】[0032]

【数6】 ΔCk n=Ck+1 n−Ck n …(4)ΔC k n = C k + 1 n −C k n (4)

【0033】となるCk nを求めることに他ならない。こ
のCk nは最急降下法やニュートン法のように、各状態か
らの勾配を用いて求めることができ、勾配を示す<dk n
>は、
It is nothing but the calculation of C k n . This C k n can be obtained by using the gradient from each state like the steepest descent method or the Newton method, and the gradient <d k n is shown.
> Is

【0034】[0034]

【数7】 [Equation 7]

【0035】によって与えられる。このdk nを用いてΔ
k nを決定するが、特に最急降下法ではdk n∝ΔCk n
なる。図1を参照して本実施例の限定色表示装置を説明
すると、先ず、カラー画像はイメージスキャナ等の画像
入力手段1を介して読み取られた後、バッファ2に格納
される。次いで、ヒストグラム作成手段3によりこの画
像データのヒストグラムH(m1,m2,m3)が作成
され、距離計算手段5によりこのヒストグラムH(m
1,m2,m3)と、初期代表点作成手段4により作成
される初期代表点<C0 n>から色彩空間における各点か
らカラーパレットの最も近い点までの距離dが求められ
る。
Is given by Δ using this d k n
While determining the C k n, the d k n αΔC k n, especially the steepest descent method. The limited color display device of this embodiment will be described with reference to FIG. 1. First, a color image is read via an image input means 1 such as an image scanner and then stored in a buffer 2. Next, the histogram creation means 3 creates a histogram H (m1, m2, m3) of this image data, and the distance calculation means 5 creates this histogram H (m
1, m2, m3) and the initial representative point <C 0 n > created by the initial representative point creating means 4, the distance d from each point in the color space to the closest point in the color palette is obtained.

【0036】次いで、距離最小代表点選択手段6により
式(1)において色彩空間における各点からカラーパレ
ットの最も近い点までの距離が選択され、加算手段7に
より前のカラーパレットに加算され、加算値が評価手段
8により評価されてカラー画像のヒストグラムとの積の
和J(<Cn>)をより小さくするカラーパレット<Ck
n>(k=1)が求められる。
Next, the distance minimum representative point selecting means 6 selects the distance from each point in the color space to the closest point in the color palette in the equation (1), and the adding means 7 adds the distance to the previous color palette and adds it. A color palette <C k whose value is evaluated by the evaluation means 8 to reduce the sum J (<C n >) of the products of the color image and the histogram.
n > (k = 1) is obtained.

【0037】また、勾配量計算手段9により式(5)に
示す勾配量<dk n>が求められ、次いで、代表点更新手
段10によりこの勾配量<dk n>から式(4)に示す次
のカラーパレットCk+1 nが求められ、次の計算のために
距離計算手段5に印加される。したがって、この処理を
繰り返すことにより、色彩空間における各点からカラー
パレットの最も近い点までの距離と、カラー画像のヒス
トグラムとの積の和をより小さくして、疑似輪郭と小面
積の色の欠落を防止することができるカラーパレットを
求めることができる。
Further, the gradient amount calculating means 9 obtains the gradient amount <d k n > shown in the equation (5), and then the representative point updating means 10 converts the gradient amount <d k n > into the equation (4). The next color palette C k + 1 n shown is determined and applied to the distance calculation means 5 for the next calculation. Therefore, by repeating this process, the sum of the product of the distance from each point in the color space to the closest point in the color palette and the histogram of the color image is made smaller, and the false contour and the color loss of the small area are lost. A color palette that can prevent

【0038】ここで、勾配量dk nを求めるためには、微
分可能か否かが問題になるが、式(1)を展開したとき
の各項(明らかに微分可能)を単純に微分すればdk n
求めることができるものの、式(1)内のminiによって
は必ずしも微分可能ではなく、したがって、収束の安定
性を阻害する可能性がある。この問題を解決するため
に、正の整数δと、集合I={−1,0,1}、φk n
ζk n,ξk n∈Iを用いて、変分量ΔCk nを、
Here, in order to obtain the gradient amount d k n , whether or not it is differentiable is a problem. However, each term (obviously differentiable) when the formula (1) is expanded is simply differentiated. For example, d k n can be obtained, but it is not necessarily differentiable depending on mini in the equation (1), and therefore, there is a possibility of impairing the stability of convergence. To solve this problem, a positive integer δ and the set I = {− 1,0,1}, φ k n ,
Using ζ k n and ξ k n εI, the variation ΔC k n is

【0039】[0039]

【数8】 [Equation 8]

【0040】を与えるGive

【0041】[0041]

【数9】 δ(φk n,ζk n,ξk n) …(7)## EQU7 ## δ (φ k n , ζ k n , ξ k n ) (7)

【0042】として決定する。この方法は式(5)を用
いる場合に比べて、1回当たりの計算量は増加するが、
収束の安定性を保証することができる。
Is determined as This method increases the calculation amount per time as compared with the case of using the equation (5),
Convergence stability can be guaranteed.

【0043】図3はこの場合の限定色表示装置を示すブ
ロック図であり、次期代表点候補作成手段12により式
(6)を演算し、変分量ΔCk nを式(7)に示す値とし
て決定し、初期代表点作成手段4により作成された初期
代表点に基づいて次期代表点候補を距離計算手段5に印
加している。また、図1に示す場合と同様に、距離計算
手段5によりヒストグラムH(m1,m2,m3)と次
期代表点候補色彩空間における各点からカラーパレット
の最も近い点までの距離dが求められる。
FIG. 3 is a block diagram showing the limited color display device in this case. Equation (6) is calculated by the next representative point candidate creating means 12, and the variation ΔC k n is taken as the value shown in equation (7). The next representative point candidate is determined and applied to the distance calculating means 5 based on the initial representative point created by the initial representative point creating means 4. Further, as in the case shown in FIG. 1, the distance calculation means 5 obtains the histogram H (m1, m2, m3) and the distance d from each point in the next representative point candidate color space to the closest point in the color palette.

【0044】次いで、距離最小代表点選択手段6により
式(1)において色彩空間における各点からカラーパレ
ットの最も近い点までの距離が選択され、加算手段7に
より前のカラーパレットに加算され、加算値に基づいて
次期代表点選択手段11により次期代表点が選択され、
評価手段8により次期代表点が評価されてカラー画像の
ヒストグラムとの積の和J(<Cn>)をより小さくす
るカラーパレット<Ck n>が求められる。また、割り付
け手段13によりこの代表点列が原画像データに割り付
けられる。なお、他の構成1〜3は図1に示す場合と同
一であるので、その詳細な説明を省略する。
Then, the minimum distance representative point selecting means 6 is used.
In equation (1), the color palette is calculated from each point in the color space.
The distance to the closest point of the
Is added to the previous color palette and based on the added value
The next representative point is selected by the next representative point selecting means 11,
The next representative point is evaluated by the evaluation means 8 and the color image
Sum of products with histogram J (<Cn>) Smaller
Color palette <Ck n> is required. Also, allocation
This representative point sequence is assigned to the original image data by the clipping means 13.
Be kicked. The other configurations 1 to 3 are the same as those shown in FIG.
Since it is one, detailed description thereof will be omitted.

【0045】次に、本発明の第2実施例を説明する。先
ず、第1実施例の計算量について考えると、1回の繰り
返し毎に式(1)の演算をおおよそ、
Next, a second embodiment of the present invention will be described. First, considering the calculation amount of the first embodiment, the calculation of the formula (1) is roughly calculated for each iteration.

【0046】[0046]

【数10】 N×33 回 …(8)[Equation 10] N × 3 3 times (8)

【0047】行うことになる。ここで、式(1)の演算
では空間上の各点に対して最も近い<Cn>の点を求め
なければならないので、式(1)の計算量を見積もる
と、
It will be done. Here, since the point of <C n > closest to each point on the space must be obtained in the calculation of Expression (1), the calculation amount of Expression (1) is estimated as follows.

【0048】[0048]

【数11】 N×M1×M2×M3回 …(9)[Equation 11] N × M1 × M2 × M3 times (9)

【0049】の距離dの計算が必要である。したがっ
て、色彩空間の各座標軸が4ビットすなわちM1=M2
=M3=16の場合には式(9)は
It is necessary to calculate the distance d of. Therefore, each coordinate axis of the color space has 4 bits, that is, M1 = M2.
= M3 = 16, equation (9) becomes

【0050】[0050]

【数12】 4096N回 …(10)[Equation 12] 4096N times (10)

【0051】となる。また、8ビットすなわちM1=M
2=M3=256の場合には式(9)は
It becomes Also, 8 bits, that is, M1 = M
When 2 = M3 = 256, the equation (9) is

【0052】[0052]

【数13】 約1670万×N回 …(11)[Equation 13] Approximately 16.7 million times N times (11)

【0053】となる。したがって、式(10)はともか
く式(11)に示す回数では、非常に高価なコンピュー
タや高性能な専用装置でなければ実際に計算を行うこと
は困難である。なお、この問題は距離dの計算回数が色
彩空間の各座標軸の階調数の3乗に比例していることに
起因する。
It becomes Therefore, apart from equation (10), it is difficult to actually calculate the number of times represented by equation (11) unless it is a very expensive computer or a high-performance dedicated device. This problem is due to the fact that the number of times the distance d is calculated is proportional to the cube of the number of gradations on each coordinate axis in the color space.

【0054】そこで、この第2実施例では、3乗に比例
せず、たかだか1乗に比例する距離の計算回数で式
(1)の値を小さくしている。先ず、N≧N1×N2×
N3となるようなN1、N2、N3を与えてN1×N2
×N3個のカラーパレットを作成することを考える。な
お、画像表示能力が8ビット(256色)の場合には7
×7×5=245、7×6×6=252、17×5×3
=255などが適当である。
Therefore, in the second embodiment, the value of the equation (1) is reduced by the number of times the distance is calculated, which is not proportional to the third power but is proportional to the first power. First, N ≧ N1 × N2 ×
Given N1, N2, and N3 such that N3, N1 × N2
Consider creating × N3 color palettes. If the image display capability is 8 bits (256 colors), 7
X7x5 = 245, 7x6x6 = 252, 17x5x3
= 255 is suitable.

【0055】このとき、<Cn>を<0≦Dn≦M1|n
=1,2…N1>に置き換え、d1を色彩空間の第1軸
上の距離関数として
At this time, <C n > is set to <0 ≦ D n ≦ M1 | n
= 1, 2 ... N1>, and d1 is a distance function on the first axis of the color space

【0056】[0056]

【数14】 [Equation 14]

【0057】を考える。ここで、HP(m)は色彩空間
の第1座標に関するヒストグラムである。そして、式
(1)の場合と同様に、式(12)をより小さくする<
n>を求め、そのために<Dn>の初期値<D0 n>に対
する更新量<ΔDn>は、
Consider Here, H P (m) is a histogram relating to the first coordinate in the color space. Then, as in the case of the expression (1), the expression (12) is made smaller.
Seeking D n>, an initial value update amount for the <D 0 n> of <D n> to its <[Delta] D n> is

【0058】[0058]

【数15】 [Equation 15]

【0059】を与える<δn>として求められる。同様
にして<D0 n>、<D1 n>、…、<DK1 n>を順次求
め、決められた条件の下でK1回で終了する。そして、
求められた<DK1 n>に対して画像Pを各画素値から最
も近い<DK1 n>の値毎に分類する。また、求められた
<DK1 n>に最も近い画素の2次元座標の集合をΨnで表
すと、集合Ψnは次式で与えられる。
It is obtained as <δn> which gives Similarly, <D 0 n >, <D 1 n >, ..., <D K1 n > are sequentially obtained, and the process ends K1 times under the determined conditions. And
The image P is classified by the value of <D K1 n > closest to each pixel value with respect to the obtained <D K1 n >. When the set of two-dimensional coordinates of the pixel closest to the obtained <D K1 n > is represented by Ψ n , the set Ψ n is given by the following equation.

【0060】[0060]

【数16】 [Equation 16]

【0061】このようにして元の画像をN1個に分割す
ることができるので、後の手順では同様な方法で各集合
ΨnをN2個に分割し、更にそれぞれをN3個に分割す
る。すなわち、HΨn1(m)を色彩空間の第2軸に関する
Ψn1のヒストグラムとし、また、色彩空間の第2軸上の
代表列点を<0≦En≦M2|n=1,2…N1>と
し、色彩空間の第2軸上の距離関数をd2として、
Since the original image can be divided into N1 pieces in this manner, each set Ψ n is divided into N2 pieces and then into N3 pieces in a similar manner in the subsequent procedure. That is, HΨ n1 (m) is a histogram of Ψ n1 with respect to the second axis of the color space, and the representative column points on the second axis of the color space are <0 ≦ E n ≦ M2 | n = 1,2 ... N1. >, And the distance function on the second axis of the color space is d2,

【0062】[0062]

【数17】 [Equation 17]

【0063】がより小さくなるように、<Dn>の場合
と同様に<EK2(n1) n>を求める。ここで、K2(n
1)はn1番目の集合Ψn1における繰り返し回数であ
る。そして、<EK2(n1) n>を用いて各集合Ψnを分割す
る。また、各集合Ψn1をN2個に分割したn2番目の集
合Ψn1,n2は次式で与えられる。
As in the case of <D n >, <E K2 (n1) n > is calculated so that becomes smaller. Where K2 (n
1) is the number of iterations in the n1-th set Ψ n1 . Then, each set Ψ n is divided using <E K2 (n1) n >. Further, the n2-th set Ψ n1 , n2 obtained by dividing each set Ψ n1 into N2 pieces is given by the following equation.

【0064】[0064]

【数18】 [Equation 18]

【0065】更に、色彩空間の第3軸上で全く同様な処
理を行って、代表列点<FK2(n1,n2)nを求めて各集合Ψ
n1,n2をN3個に分割する。この場合、n3番目の集合
Ψn1, n2,n3は、色彩空間の第3軸上の距離関数をd3と
すると以下のように与えられる。
Further, on the third axis of the color space, exactly the same processing is performed.
And the representative column point <FK2 (n1, n2)nFor each set Ψ
n1,n2Is divided into N3 pieces. In this case, the n3rd set
Ψn1, n2,n3Is the distance function on the third axis of the color space as d3
Then it is given as follows.

【0066】[0066]

【数19】 [Formula 19]

【0067】以上の処理により、全画素がN1×N2×
N3個の集合に分類され、また、各集合Ψn1,n2,n3毎に
代表する画素値を(DK1 n,EK2(n1) n,FK2(n1,N2) n
または3画素の平均とすればカラーパレットが作成され
る。
By the above processing, all pixels are N1 × N2 ×
Pixel values classified into N3 sets and representing each set Ψ n1 , n2 , n3 are (D K1 n , E K2 (n1) n , F K2 (n1, N2) n ).
Alternatively, if an average of 3 pixels is used, a color palette is created.

【0068】図4はこの第2の実施例の装置を示し、図
5は図4の第1軸、第2軸、第3軸の代表点決定手段2
2a、22b、22cを詳細に示す。図4に示すヒスト
グラム作成手段21a、21b、21cではそれぞれ、
バッファ2と前段の分割マスク作成手段23a、23b
のデータに基づいて色彩空間の第1軸、第2軸、第3軸
のヒストグラムが作成される。
FIG. 4 shows the apparatus of the second embodiment, and FIG. 5 shows the representative point determining means 2 for the first axis, the second axis and the third axis of FIG.
2a, 22b and 22c are shown in detail. The histogram creating means 21a, 21b, and 21c shown in FIG.
The buffer 2 and the division mask creating means 23a and 23b in the previous stage
A histogram of the first axis, the second axis, and the third axis of the color space is created on the basis of the data of 1.

【0069】そして、第1軸、第2軸、第3軸の代表点
決定手段22a、22b、22cでは、図5に詳しく示
すように図3に示す場合と同様に、次期代表点候補作成
手段226と初期代表点作成手段227により式(6)
が演算され、前のカラーパレットとの変分量ΔCk nが式
(7)に示す値として決定されて距離計算手段221に
印加されている。距離計算手段221により式(12)
における各軸のヒストグラムと、次期代表点候補作成手
段226により作成される次期代表点候補から色彩空間
における各点からカラーパレットの最も近い点までの距
離d1、d2、d3が求められる。
Then, in the representative point determining means 22a, 22b and 22c for the first axis, the second axis and the third axis, as shown in detail in FIG. 5, as in the case shown in FIG. 226 and the equation (6) by the initial representative point creating means 227.
Is calculated, the variation amount ΔC k n with respect to the previous color palette is determined as the value shown in Expression (7), and is applied to the distance calculation means 221. Equation (12) is calculated by the distance calculation means 221.
The distances d1, d2, and d3 from each point in the color space to the closest point in the color palette are obtained from the histogram of each axis in the above and the next representative point candidate created by the next representative point candidate creating unit 226.

【0070】次いで、距離最小代表点選択手段222に
より式(12)において色彩空間における各点からカラ
ーパレットの最も近い点までの距離が求められ、加算手
段223により前のカラーパレットに加算され、次期代
表点選択手段224により加算値から次期代表点が選択
され、評価手段225により評価されて式(12)、
(15)等をより最小にする<Dn>、<En>、<Fn
>が求められる。また、次期代表点候補作成手段226
によりこの<Dn>、<En>、<Fn>から次期代表点
候補が作成され、距離計算手段221に印加されて次の
<Dn>、<En>、<Fn>が求められる。また、図4
に示す分割マスク作成手段23cと代表点画素値決定手
段により、最終的に求められた第1〜第3軸の代表点の
画素値(D K1 n,EK2(n1) n,FK2(n1,N2) n)または3画
素の平均が原データに割り当てられる。
Then, the minimum distance representative point selection means 222
Therefore, in equation (12), each point in the color space is
-The distance to the closest point on the pallet is calculated, and the
Step 223 adds to previous color palette
The next representative point is selected from the added values by the table point selection means 224.
And evaluated by the evaluation means 225 to obtain equation (12),
Minimize (15) etc. <Dn>, <En>, <Fn
> Is required. In addition, the next representative point candidate creating means 226
This <Dn>, <En>, <Fn> To next representative point
A candidate is created and applied to the distance calculation means 221, and the next
<Dn>, <En>, <Fn> Is required. Also, FIG.
The division mask creating means 23c shown in FIG.
Of the representative points of the 1st to 3rd axes finally obtained by the step
Pixel value (D K1 n, EK2 (n1) n, FK2 (n1, N2) n) Or 3 strokes
A raw average is assigned to the raw data.

【0071】次に、本発明の第3実施例を説明する。上
記第1および第2の実施例では、更新量がδであるの
で、色彩空間の変動幅が256、すなわち0〜255の
値を取り得るとき、単調に最適値に向かったとしても最
悪の場合に処理を255/δ回繰り返さなければならな
い。なお、δを大きくすれば回数が減少するが精度が悪
化し、例えばδ=64とすると、初期値D0 n=0に対し
てDk n(k=1,2…)のとり得る値は、0、64、1
28、192の4通りである。したがって、これでは3
回程度で処理が終了するが、カラーパレットとしては十
分でなくなる。
Next, a third embodiment of the present invention will be described. In the first and second embodiments, since the update amount is δ, when the variation range of the color space can take a value of 256, that is, a value of 0 to 255, even in the worst case even if the value monotonously approaches the optimum value. The process must be repeated 255 / δ times. Note that if δ is increased, the number of times decreases, but the accuracy deteriorates. For example, if δ = 64, the possible values of D k n (k = 1, 2 ...) With respect to the initial value D 0 n = 0. , 0, 64, 1
There are four types, 28 and 192. Therefore, this is 3
The process is completed in about a few times, but it is no longer sufficient as a color palette.

【0072】そこで、この第3実施例では、上記問題を
解決するために、繰り返し回数が少なくかつ高精度に最
適な<Dn>(または<En>、<Fn>)を求めるよう
にしている。具体的には、rを1より小さい正の数とし
Therefore, in the third embodiment, in order to solve the above problem, the optimum <D n > (or <E n >, <F n >) with a small number of iterations and high accuracy is obtained. ing. Specifically, let r be a positive number less than 1.

【0073】[0073]

【数20】 δk=rk(M1+1) …(18)## EQU20 ## δk = r k (M1 + 1) (18)

【0074】を用い、δk<1となるまで<Dk n>を更
新する。したがって、特にr=1/2とすると、M1+
1≦2δならばどの初期点からでもp回で任意の点に到
達することができる。なお、到達可能な証明は、0〜2
p−1の整数がp桁の2進数で表現可能なことから容易
に導くことができる。
<D k n > is updated by using the above equation until δk <1. Therefore, especially when r = 1/2, M1 +
If 1 ≦ 2δ, an arbitrary point can be reached p times from any initial point. In addition, reachable proof is 0-2
Since the integer of p −1 can be represented by a binary number of p digits, it can be easily derived.

【0075】このとき、初期点列<D0 n>は個数が奇数
個であるか、または乱数などで等間隔にならないように
配置しなければならない。なぜならば、偶数個の初期点
列<D0 n>を等間隔で配置すると、先ず1回目の移動可
能な点には必ず<D0 n>の他の点が既に存在するからで
ある。このように<Dn>の中で重複する点が存在する
と、J(<Dn>)は定義の性格上必ず増加し、したが
って、更新量が「0」となり、また、r=1/2とする
と残りのp−1回で(M1+1)/2を越えて離れた点
へ移動することができない。
At this time, the initial point sequence <D 0 n > has to be arranged in an odd number or in random numbers so as not to be evenly spaced. This is because, if an even number of initial point strings <D 0 n > are arranged at equal intervals, first of all, the first movable point always has other points <D 0 n >. With this there is a point to duplicate in the <D n>, J (< D n>) is increased always on the definition nature, therefore, update amount becomes "0" Further,, r = 1/2 Then, the remaining p-1 times cannot move to a point beyond (M1 + 1) / 2.

【0076】図6(a)〜(c)はそれぞれ、一例とし
てITE(社団法人テレビジョン学会)の標準画像「肌
色評価用画像(女性のアップ像)」のR、G、Bの各ヒ
ストグラムを示し、この標準画像のR、G、Bの原デー
タは共に8ビットであり、画像サイズは横760×縦4
83である。このような標準画像に対して、色彩空間の
各座標軸における分割数N1、N2、N3をそれぞれ
7、7、5とし、初期点列<D0 n>、<E0 n>、<F0 n
>はいずれも等間隔に配置した場合について説明する。
さらに、r=1とし、色彩空間の第1、第2、第3軸上
の距離関数としてはいずれも座標値の差の絶対値を用い
た場合について説明する。
FIGS. 6A to 6C respectively show R, G, and B histograms of the standard image "skin color evaluation image (up-image of woman)" of the ITE (Institute of Television Engineers) as an example. The original data of R, G, and B of this standard image are all 8 bits, and the image size is horizontal 760 × vertical 4
83. With respect to such a standard image, the division numbers N1, N2, and N3 on each coordinate axis of the color space are set to 7, 7, and 5, respectively, and the initial point sequences <D 0 n >, <E 0 n >, and <F 0 n are set.
A case where the symbols> are arranged at equal intervals will be described.
Further, a case will be described in which r = 1 and the absolute value of the difference between coordinate values is used as the distance function on the first, second, and third axes of the color space.

【0077】図7(a)は図6(a)に示すRのヒスト
グラムに対し、従来例のように初期点列<D0 n>を等間
隔で配置した場合を示し、ヒストグラムの下の矢印
「↑」が各D0 nを示している。図7(b)は図6(a)
に示すRのヒストグラムに対し、第2の実施例により得
られた<DK1 n>を配置した場合を示し、「|」が<D
K1 n>により分割された領域の境界を示している。
FIG. 7A shows a case where the initial point sequence <D 0 n > is arranged at equal intervals as in the conventional example with respect to the R histogram shown in FIG. 6A. “↑” indicates each D 0 n . 7 (b) is shown in FIG. 6 (a).
The case where <D K1 n > obtained by the second embodiment is arranged with respect to the R histogram shown in FIG.
The boundary of the area divided by K1 n > is shown.

【0078】図8(a)は第2の実施例における集合Ψ
1のヒストグラムとその初期点列<E0 n>の配置を示
し、図8(b)は集合Ψ1のヒストグラムとその初期点
列<EK2(K1) n>を示す。また、図9(a)はΨ1,1
ヒストグラムとその初期点列<F 0n>の配置を示し、図
9(b)はΨ1,1 のヒストグラムとその初期点列<F
K3(K1,K2) n>の配置を示す。そして、各集合Ψn1,n2,n3
のRGBの平均を求め、最終的に2ページにわたる次表
に示すようなカラーパレットを得た。なお、表中の()
内の数字は各カラーパレットの画素値をRGBで表わし
たものであり、()の右側の個数は各カラーパレット毎
の画素数を示す。
FIG. 8A shows the set Ψ in the second embodiment.
1Histogram and its initial point sequence <E0 n> Is shown
Then, FIG. 8B shows the set Ψ.1Histogram and its initial point
Column <EK2(K1) n> Is shown. In addition, FIG.1,1 of
Histogram and its initial point sequence <F 0n> Shows the layout
9 (b) is Ψ1,1 Histogram and its initial point sequence <F
K3 (K1, K2) n> Shows the arrangement. And each set Ψn1, n2, n3
The average of RGB of
A color palette as shown in is obtained. In addition, () in the table
The numbers inside are RGB pixel values of each color palette.
The number on the right side of () is for each color palette.
Shows the number of pixels.

【0079】[0079]

【表1】 [Table 1]

【0080】[0080]

【表2】 [Table 2]

【0081】[0081]

【発明の効果】以上説明したように本発明によれば、色
彩空間における各点からカラーパレットの最も近い点ま
での距離と、カラー画像のヒストグラムとの積の和をよ
り小さくするカラーパレットが求められので、サンプル
点の配置位置が画像データに応じて最適化されととも
に、積演算により小面積の比重が増加し、したがって、
疑似輪郭と小面積の色の欠落を防止することができる。
As described above, according to the present invention, a color palette that reduces the sum of the product of the distance from each point in the color space to the closest point of the color palette and the histogram of the color image is obtained. Therefore, the arrangement position of the sample points is optimized according to the image data, and the product area increases the specific gravity of the small area.
It is possible to prevent the false contour and the loss of color in a small area.

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

【図1】本発明に係る表示限定色の最適化方法および限
定色表示装置の第1実施例を示すブロック図である。
FIG. 1 is a block diagram showing a first embodiment of a display limited color optimization method and a limited color display device according to the present invention.

【図2】図1の方法および装置によるサンプル点の配置
位置を示す説明図である。
FIG. 2 is an explanatory diagram showing arrangement positions of sample points by the method and apparatus of FIG.

【図3】図1の装置の変形例を示すブロック図である。FIG. 3 is a block diagram showing a modified example of the apparatus of FIG.

【図4】本発明の第2実施例を示すブロック図である。FIG. 4 is a block diagram showing a second embodiment of the present invention.

【図5】図4の第1軸、第2軸、第3軸の代表点決定手
段を詳細に示すブロック図である。
5 is a block diagram showing in detail representative point determining means for the first, second, and third axes of FIG. 4. FIG.

【図6】標準画像のR、G、Bの各ヒストグラムを示す
説明図である。
FIG. 6 is an explanatory diagram showing R, G, and B histograms of a standard image.

【図7】図6のヒストグラムに対する従来例と本実施例
のサンプル点の配置位置を比較した説明図である。
FIG. 7 is an explanatory diagram comparing the arrangement positions of the sample points of the conventional example and the present example with respect to the histogram of FIG.

【図8】第2実施例における集合Ψ1のヒストグラムと
その初期点列の配置を示す説明図である。
FIG. 8 is an explanatory diagram showing an arrangement of a histogram of a set Ψ 1 and its initial point sequence in the second embodiment.

【図9】集合Ψ1,1 のヒストグラムとその初期点列の配
置を示す説明図である。
FIG. 9 is an explanatory diagram showing the arrangement of a histogram of a set Ψ 1,1 and its initial point sequence.

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

3 21a,21b,21c ヒストグラム作成手段 4 初期代表点作成手段 5 距離計算手段 6 距離最小代表点選択手段 7 加算手段 8 評価手段 22a,22b,22c 代表点決定手段 3 21a, 21b, 21c Histogram creating means 4 Initial representative point creating means 5 Distance calculating means 6 Distance minimum representative point selecting means 7 Adding means 8 Evaluation means 22a, 22b, 22c Representative point determining means

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 色彩空間における各点からカラーパレッ
トの最も近い点までの距離と、カラー画像のヒストグラ
ムとの積の和をより小さくすることによりカラーパレッ
トを求める表示限定色の最適化方法。
1. A display-limited color optimization method for obtaining a color palette by further reducing the sum of the products of the distance from each point in the color space to the closest point in the color palette and the histogram of the color image.
【請求項2】 カラー画像のヒストグラムを作成するヒ
ストグラム作成手段と、 カラー画像の画像データと前記ヒストグラム作成手段に
より作成されたヒストグラムに基づいて、色彩空間にお
ける各点からカラーパレットの最も近い点までの距離を
計算する距離計算手段と、 前記距離計算手段により計算された距離と前記ヒストグ
ラム作成手段により作成されたヒストグラムとの積の和
をより小さくするカラーパレットを求める手段とを有す
る限定色表示装置。
2. A histogram creating means for creating a histogram of a color image, and image data of the color image and a histogram created by the histogram creating means, from each point in the color space to the closest point of the color palette. A limited color display device having a distance calculating means for calculating a distance, and means for obtaining a color palette that reduces the sum of products of the distance calculated by the distance calculating means and the histogram created by the histogram creating means.
JP5148603A 1993-05-27 1993-05-27 Method for optimizing display limited color and limited color display device Withdrawn JPH06337926A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5148603A JPH06337926A (en) 1993-05-27 1993-05-27 Method for optimizing display limited color and limited color display device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5148603A JPH06337926A (en) 1993-05-27 1993-05-27 Method for optimizing display limited color and limited color display device

Publications (1)

Publication Number Publication Date
JPH06337926A true JPH06337926A (en) 1994-12-06

Family

ID=15456471

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5148603A Withdrawn JPH06337926A (en) 1993-05-27 1993-05-27 Method for optimizing display limited color and limited color display device

Country Status (1)

Country Link
JP (1) JPH06337926A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009182662A (en) * 2008-01-30 2009-08-13 Ricoh Co Ltd Image processing apparatus, image processing method, program, and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009182662A (en) * 2008-01-30 2009-08-13 Ricoh Co Ltd Image processing apparatus, image processing method, program, and storage medium
US8218863B2 (en) 2008-01-30 2012-07-10 Ricoh Company, Ltd. Image processing apparatus, image processing method and image processing means

Similar Documents

Publication Publication Date Title
EP0159691B1 (en) Color image display system
US20160330455A1 (en) Method device for image compression, having enhanced matching of fixed-width variable-length pixel samples strings
US10424269B2 (en) Flexible addressing for a three dimensional (3-D) look up table (LUT) used for gamut mapping
WO2017059043A1 (en) 2d lut color transforms with reduced memory footprint
US6836563B2 (en) Computer-readable medium and program for quantizing a data set, method and apparatus for quantizing a data set
US10453171B2 (en) Multiple stage memory loading for a three-dimensional look up table used for gamut mapping
US20100027877A1 (en) Method and system for predictive scaling of colour mapped images
US12056902B2 (en) Parent-child cluster compression
CN109727196B (en) Image interpolation processing method
US20020080232A1 (en) Method and apparatus for three-dimensional signal conversion
Schaefer et al. A hybrid color quantization algorithm incorporating a human visual perception model
JPH06337926A (en) Method for optimizing display limited color and limited color display device
JP4429626B2 (en) Method and system for calculating function value of input node based on function value of known node
US7023585B1 (en) Multi-dimensional edge interpolation
JPH11238126A (en) Common interpolating circuit for radial interpolation with asymmetrical pruning and tetrahedral interpolation with asymmetrical pruning
JP3153002B2 (en) Color conversion method, color conversion table creation method, color conversion device, and color conversion table creation device
CN100414963C (en) Normalization method, and multi-dimensional interpolation method and apparatus
JPH05284346A (en) Color converter
JPH11238127A (en) Common interpolating circuit for pruning radial interpolation and pruning tetrahedral interpolation
JPH09261499A (en) Image processing apparatus and method
JP3934206B2 (en) Image processing device
JPH09284578A (en) Image processing device
Fojtík et al. Invisible modification of the palette color image enhancing lossless compression
JPH10134167A (en) Method and apparatus for generating local color space representative color list
JPH11339008A (en) Image processing device

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20000801