JPS63244094A - Fast color alteration display method and apparatus for color image - Google Patents

Fast color alteration display method and apparatus for color image

Info

Publication number
JPS63244094A
JPS63244094A JP62080236A JP8023687A JPS63244094A JP S63244094 A JPS63244094 A JP S63244094A JP 62080236 A JP62080236 A JP 62080236A JP 8023687 A JP8023687 A JP 8023687A JP S63244094 A JPS63244094 A JP S63244094A
Authority
JP
Japan
Prior art keywords
color
image
colors
storage means
pixel
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
JP62080236A
Other languages
Japanese (ja)
Other versions
JPH06100900B2 (en
Inventor
田島 讓二
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
NEC Corp
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 NEC Corp filed Critical NEC Corp
Priority to JP62080236A priority Critical patent/JPH06100900B2/en
Publication of JPS63244094A publication Critical patent/JPS63244094A/en
Priority to US07/596,425 priority patent/US5058040A/en
Publication of JPH06100900B2 publication Critical patent/JPH06100900B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Digital Computer Display Output (AREA)
  • Processing Of Color Television Signals (AREA)
  • Controls And Circuits For Display Device (AREA)

Abstract

(57)【要約】本公報は電子出願前の出願データであるた
め要約のデータは記録されません。
(57) [Summary] This bulletin contains application data before electronic filing, so abstract data is not recorded.

Description

【発明の詳細な説明】 (産業上の利用分野) 本発明は、カラー画像の色の自然さを損なわずに高速に
変更して表示する方法及び装置に関する。
DETAILED DESCRIPTION OF THE INVENTION (Field of Industrial Application) The present invention relates to a method and apparatus for rapidly changing and displaying colors of a color image without impairing the naturalness of the colors.

(従来の技術) カラーデザインの分野にCAD(コンピュータ、エイデ
ィラド・デザイン)が適用され、その中で色を変更する
ことが求められている。具体的には、デザインの対象(
例えば自動車)を含む画像を、スキャナやカラーカメラ
でコンピュータ・システムにとり込み、カラーディスプ
レイに表示したのち、この対象の部分の色を変更(例え
ば、元々、赤い自動車のボディーを青色に)することに
より、各種の色にしたときのデザインの結果を、実際に
物を作ることなく予測することが要求される。
(Prior Art) CAD (computer, aided design) is applied to the field of color design, and there is a need to change colors within it. Specifically, the object of design (
For example, by importing an image containing a car (for example, a car) into a computer system using a scanner or color camera and displaying it on a color display, the color of the object part is changed (for example, the body of a car that was originally red is changed to blue). , it is required to predict the result of a design in various colors without actually making it.

このような目的のため、従来、第3図で示されたような
、ある面の色(最終的にR(赤)、G(緑)、B(青)
、三成分で与えられる)を菩カメラ(モノクロ)で得ら
れた陰影に応じてつける回路が知られている(゛繊維と
工業、36巻、6号、1980年、195〜199ペー
ジ)。この場合、物体の色を変化させたい部分を異なっ
た濃度で塗った濃淡の原画101をモノクロテレビカメ
ラ102で入力し、偽信号補正回路103で信号を整形
したのち、ん0コンバータ104により、ディジタル値
に変換して各部分を分離し、色彩コントローラ105に
よってR,G、B値を与えカラーエンコーダ106によ
ってカラーテレビ信号とする。この段階では、同色部分
は平板な(R,G、B)で示される色となっている。こ
れと同時に製品の実物107を原画101と位置を合わ
せて、もう一つのモノクロテレビカメラ108により撮
影し、これにより得られる陰影のある画像信号Nと、先
のカラーテレビ信号を陰影合成回路109により合成す
る。これにより、カラーテレビ110には陰影のついた
カラー画像を色を自由に変化させながらシミュレートで
きる。
For this purpose, conventionally, the color of a certain surface (finally R (red), G (green), B (blue)) as shown in Figure 3 has been used.
, given by three components) according to the shadow obtained with a camera (monochrome) (Textiles and Industry, Vol. 36, No. 6, 1980, pp. 195-199). In this case, a gray original image 101 in which the parts of the object whose colors are to be changed are painted with different densities is inputted by a monochrome television camera 102, the signal is shaped by a false signal correction circuit 103, and then converted into a digital image by a zero converter 104. The signal is converted into a value and separated into each part, and a color controller 105 gives R, G, and B values, and a color encoder 106 converts the signal into a color television signal. At this stage, the same color portions have colors shown as flat (R, G, B). At the same time, the actual product 107 is aligned with the original image 101 and photographed by another monochrome television camera 108, and the resulting image signal N with shadows and the previous color television signal are sent to a shadow synthesis circuit 109. Synthesize. This allows the color television 110 to simulate a color image with shading while freely changing the colors.

このとき、物体の色が(R,G、B)と与えられると、
モノクロカメラから与えられる各画素の明度Nによって
、各画素の色(R”、α、Bつは次のように求められる
At this time, if the color of the object is given as (R, G, B),
Based on the brightness N of each pixel given by the monochrome camera, the color (R'', α, B) of each pixel is determined as follows.

ここでNはO〜1の値をとると考える。Here, it is assumed that N takes a value of O to 1.

この方法は、「一つの色領域の色は、元々(R,G、B
)という明るい色であり、陰影により暗くなっている部
分がある。」という根拠によっている。言いかえれば、
第4図の3次元色空間で考えたとき、−ツノ領域の色(
R’、G’、B’)は黒(0,0,0)と物体色(R,
G、B)を結ぶ直線上に乗っていることが仮定されてい
る。
This method is based on the following method: ``The colors of one color area are originally (R, G, B
), and some parts are darker due to shading. ” is the basis. In other words,
When considering the three-dimensional color space in Figure 4, - the color of the horn area (
R', G', B') is black (0,0,0) and object color (R,
It is assumed that it is on a straight line connecting G and B).

(本発明が解決しようとする問題点) しかし、実際は、一つの色領域でも、光が照り返して明
るいために、第4図Pのように白に近い位置の色も存在
するのが普通である。しかし、上記の回路では、このよ
うな部分に正しく対応することはできない。
(Problem to be solved by the present invention) However, in reality, even in one color area, because the light reflects back and is bright, it is normal for there to be colors that are close to white, as shown in Figure 4, P. . However, the above circuit cannot properly handle such parts.

本発明は、この問題を解決し、照り返しの部分を持つ画
像の色領域でも自然にしがも、非常に高速に色変更を行
なって表示する方法及び装置を提供することを目的とし
ている。
It is an object of the present invention to solve this problem and provide a method and apparatus for displaying a color area of an image having a reflective portion by changing the color naturally and at a very high speed.

(問題点を解決するための手段) 第1の発明は、カラー画像の対象となる色領域中の各画
素の三原色値を、三次元の色空間において黒色、物体色
、光源色の三色が張る平面上の色を示すと仮定して二次
元の中間座標値に変換し、その分布からクラスタリング
により少数の代表色を選択し、前記色領域中の各画素に
ついて前記クラスタリングの基準に従って前記代表色を
示す色コードを与え、色コード画像を作成し、各色コー
ドに対応する変更色を前記光源色及び新たに与えられた
第2の物体色を用いて前記代表色について求めてルック
アップテーブルに登録し、前記カラー画像と、前記色コ
ード画像に対しルックアップテーブルを適用した画像を
切り換えて表示することにより、上記色領域のみに所望
の色変更が自然になされた画像を高速に表示するカラー
画像の高速色変更表示方法である。
(Means for Solving the Problems) The first invention is to calculate the three primary color values of each pixel in the color region that is the target of a color image by the three colors of black, object color, and light source color in a three-dimensional color space. A small number of representative colors are selected from the distribution by clustering, and the representative colors are determined according to the clustering criteria for each pixel in the color area. A color code is given, a color code image is created, and a change color corresponding to each color code is determined for the representative color using the light source color and the newly given second object color, and is registered in a lookup table. and, by switching between and displaying the color image and an image obtained by applying a lookup table to the color code image, a color image that quickly displays an image in which a desired color change is naturally made only in the color area. This is a fast color changing display method.

ま゛た、第2の発明は、カラー画像を格納するカラー画
像記憶手段と、該カラー画像の対象となる色領域の物体
色を記憶する第一の物体色記憶手段と、該カラー画像の
光源色を記憶する光源色記憶手段と、前記カラー画像の
対象となる色領域中の各画素の三原色値を、三次元の色
空間において、黒色、物体色、光源色の三色が張る平面
上の色を示すと仮定して、二次元の色空間の中間座標値
に変換する中間画素計算手段と、該中間画素値計算手段
から得られる色分布をクラスタリングし、少数の代表色
を選択するクラスタリング手段と、該クラスタリングの
過程で得られるクラスタリング基準と前記代表色を格納
するクラスタ記憶手段と、前記中間画素値計算手段から
得られる中間座標値と前記クラスタリング基準により求
められる各画素の前記代表色に対応する色コードを画像
として記憶する色コード画像記憶手段と、前記色領域の
色変更後の物体色を記憶する第二の物体色記憶手段と、
該第二の物体色と前記光源色によって前記代表色から計
算された前記色コードに対応する三原色値を格納し、画
像の表示の際、前記色コード画像記憶手段から読み出さ
れる色コードを三原色値に変換するルックアップ・テー
ブルと、画像の表示の際、前記カラー画像記憶手段から
読み出される画素の三原色値を前記色領域に属する画素
については前記ルック・アップ・テーブルから出力され
る三原色値に置き換えるディスプレイコントローラとを
含み、カラー画像の対象となる色領域の色を高速に変更
し表示するカラー画像の高速色変更表示装置である。
In addition, a second invention includes a color image storage means for storing a color image, a first object color storage means for storing an object color of a color region that is a target of the color image, and a light source for the color image. A light source color storage means for storing colors, and the three primary color values of each pixel in the target color region of the color image are stored on a plane defined by the three colors of black, object color, and light source color in a three-dimensional color space. Intermediate pixel calculation means for converting into intermediate coordinate values in a two-dimensional color space assuming that it represents a color, and clustering means for clustering the color distribution obtained from the intermediate pixel value calculation means and selecting a small number of representative colors. , a cluster storage means for storing the clustering standard obtained in the clustering process and the representative color, and an intermediate coordinate value obtained from the intermediate pixel value calculation means and corresponding to the representative color of each pixel determined by the clustering standard. a color code image storage means for storing a color code as an image, and a second object color storage means for storing an object color after changing the color of the color area;
The three primary color values corresponding to the color code calculated from the representative color using the second object color and the light source color are stored, and when displaying an image, the color code read from the color code image storage means is stored as the three primary color values. a look-up table for converting the image into a pixel, and, when displaying an image, replacing the three primary color values of pixels read from the color image storage means with the three primary color values output from the look-up table for pixels belonging to the color area. The present invention is a high-speed color change display device for a color image, which includes a display controller and quickly changes and displays the color of a target color area of a color image.

(作用) 本発明の作用を第5図を参照して説明する。光源120
から物体121に当たって、カメラ122に入る光は、
鏡面反射光123と拡散反射光124に大別できる。鏡
面反射光は、物体の表面で反射するもので、その分光組
成は、光源と同じで、強度だけが変化する。拡散反射光
は、光源の光が物体の中に入射し、物質特有の分光吸収
を受けたのち、等方向に外部に射出されるものである。
(Operation) The operation of the present invention will be explained with reference to FIG. light source 120
The light that hits the object 121 and enters the camera 122 from
The light can be roughly divided into specular reflection light 123 and diffuse reflection light 124. Specular reflected light is reflected from the surface of an object, and its spectral composition is the same as that of the light source, with only the intensity changing. Diffuse reflected light is light from a light source that enters an object, undergoes spectral absorption specific to the material, and then is emitted to the outside in the same direction.

拡散反射光の分光組成は光源とは異なっているのが普通
である。そのため、対象面の各点の色の三成分(R,G
、B)は、 と書くことができる。ここで、(Ro、Go、Bo)は
拡散反射光の三成分であり、物体により異なるので、本
明細書では以降、「物体色」と呼ばれる。
The spectral composition of the diffusely reflected light is usually different from that of the light source. Therefore, the three color components (R, G
, B) can be written as . Here, (Ro, Go, Bo) are three components of the diffusely reflected light, and since they differ depending on the object, they are hereinafter referred to as "object colors" in this specification.

(Rs、Gs、Bs)は鏡面反射光の三成分であり、光
源の色と等しいので、本明細書では以降「光源色」と呼
ばれる。α、I3は射出光量に対する拡散反射光、鏡面
反射光の寄与の度合を示しており、表面の材質、方向な
どに関係する。これは、画素毎に異なるので、画素内の
画素位置を(X、y)とすると、と書かれる。このよう
なモデルは、コンピュータ・グラフィクスで利用されて
おり、例えばPhongのモデルによると、 となる(第13回画像工学コンファレンス、1982年
、55〜58ページ)。
(Rs, Gs, Bs) are three components of specularly reflected light and are equal to the color of the light source, so they are hereinafter referred to as "light source color" in this specification. α and I3 indicate the degree of contribution of diffusely reflected light and specularly reflected light to the amount of emitted light, and are related to the surface material, direction, etc. This differs from pixel to pixel, so if the pixel position within a pixel is (X, y), then it is written as: Such models are used in computer graphics, and for example, according to Phong's model, (13th Image Engineering Conference, 1982, pp. 55-58).

ユニで、θは表面の法線とカメラの方向のなす角、αは
鏡面反射方向とカメラの方向のなす角、dは拡散反射光
と周囲光の強度の度合を示す定数、W(θ)は、やはり
鏡面反射光の拡散反射光に対する度合を示す項である。
Uni, θ is the angle between the surface normal and the camera direction, α is the angle between the specular reflection direction and the camera direction, d is a constant that indicates the intensity of diffuse reflected light and ambient light, W(θ) is also a term indicating the degree of specular reflection light relative to diffuse reflection light.

ある対象の表面が式(3)で表わされる場合、同じ材質
で色が異なるものは、物体色のみを(Ro’+GO’y
BO’)に変更することにより、式(5)ノように各画
素値を計算することができる。
When the surface of a certain object is expressed by equation (3), if objects are made of the same material but have different colors, only the object color is expressed as (Ro'+GO'y
BO'), each pixel value can be calculated as shown in equation (5).

本発明では、カラー画像内の一つの色領域での各画素の
色は式(3)に従うものと仮定する。これを第6図〜第
8図を参照して説明する。第6図においてカラー画像内
の一つの色領域で色分布200はR,G、B色空間にお
いて、原点0、物体色C8、光源色Csの作る平面内に
含まれる。そして、各画素の色は、0とC8を結ぶ座標
軸αと、0とCsを結ぶ座標軸pにより表わすことがで
きる。この色分布は2つの座標軸α、13を直交座標と
見れば、第7図のようになる。これに対し、物体色のみ
をColに変更することにより、α軸が第8図のα′軸
に変わり、色分布は不変とすることで自然な色変化を得
ることができる。
In the present invention, it is assumed that the color of each pixel in one color region in a color image follows equation (3). This will be explained with reference to FIGS. 6 to 8. In FIG. 6, a color distribution 200 in one color area in a color image is included in a plane formed by the origin 0, the object color C8, and the light source color Cs in the R, G, B color space. The color of each pixel can be expressed by a coordinate axis α connecting 0 and C8, and a coordinate axis p connecting 0 and Cs. This color distribution becomes as shown in FIG. 7 if the two coordinate axes α and 13 are viewed as orthogonal coordinates. On the other hand, by changing only the object color to Col, the α axis changes to the α' axis in FIG. 8, and by keeping the color distribution unchanged, a natural color change can be obtained.

これを実現するためには、与えられたカラー画像の色領
域に対して、co、csを決定し、各画素のα、p値を
求める必要がある。実際には、α=o、又はp=0の色
は存在しないので、画像がらC8,csを正確に求める
ことはできないが、画像中で、最もその色領域の色らし
い部分(例えば、赤い車体の自動車なら、大変赤く見え
る部分)の画像値を読み取ってcoとし、鏡面反射で真
っ白に光って見える部分の画像値を読み取ってCsとす
れば実用上十分である。
To achieve this, it is necessary to determine co and cs for the color region of a given color image, and to find the α and p values for each pixel. In reality, there is no color where α=o or p=0, so it is not possible to accurately determine C8 and cs from the image. In the case of a car, it is practically sufficient to read the image value of the part that looks very red and set it as co, and read the image value of the part that looks pure white due to specular reflection and set it as Cs.

各画素のα、13を求めるため便宜上C8及びcsに垂
直な第三の色彩ベクトルcdを、例えばcoとCsのベ
クトル積(外積)として、 cd=coXC8(6) のように定める。このcdをR,G、B空間で式(7)
のように表わしたとき 画像内の各画素の色(R,G、B)は、γを導入して、
と書くことができる。ここでγは、各色の0、C8,c
oの作る平面からの距離に対応し、対象となる色領域の
画素についてはノイズ分と考えられる。
To obtain α, 13 for each pixel, for convenience, a third color vector cd perpendicular to C8 and cs is determined as, for example, the vector product (cross product) of co and Cs, as follows: cd=coXC8(6). Expression (7) of this cd in R, G, B space
When expressed as, the color (R, G, B) of each pixel in the image is expressed as
It can be written as Here γ is 0, C8, c of each color
The pixels in the target color region corresponding to the distance from the plane created by o are considered to be noise.

式(8)を逆に解いて、式(9)が成立するため、各画
素について、R,G、B値からαt13tγを求めるこ
とができる。γはノイズ分なので無視してよい。
By reversing equation (8), equation (9) holds true, so αt13tγ can be found from the R, G, and B values for each pixel. Since γ is a noise component, it can be ignored.

このようにして、各画素についてαとpが求められる。In this way, α and p are determined for each pixel.

物体色coをもっていた画像部分をC8′に変換し、こ
の色領域の他の部分もこれに即して、自然に見えるよう
に変換するには、式(5)を利用すればよいのは先に述
べた通りである。
In order to convert the image part that had the object color co to C8' and to convert the other parts of this color area accordingly so that they look natural, it is best to use equation (5) first. As stated above.

しかし、上記の方法によると、カラー画像のすべての画
素について対象色領域であるかどうかを調へ、それを満
たすすべての画素について式(5)全実行することにな
るので、Colを1秒に、何回も変化させ、その結果を
連続的に観測するには非常に高速な専用演算回路を作る
必要がある。この問題を解決するために、第9図に示す
ようなディスプレイ装置を利用する。このディスプレイ
はリフレッシュのための画像メモリを2種類もつ。カラ
ー画像メモリ1は、カラー画像を各画素につきR,G、
B各8ビットでもつ。色コード画像メモリ2は、各画素
に例えば8ビツトの色コードを持ち、次段のルック・ア
ップ・テーブル(LUT)3は、各画素の色コードに従
って、予めセットされているR、G、B値を出力する。
However, according to the above method, it is necessary to determine whether or not each pixel in the color image is in the target color area, and then to execute equation (5) for all pixels that satisfy this condition. , it is necessary to create a very high-speed dedicated arithmetic circuit to make changes many times and observe the results continuously. In order to solve this problem, a display device as shown in FIG. 9 is used. This display has two types of image memory for refreshing. The color image memory 1 stores a color image in R, G,
B has 8 bits each. The color code image memory 2 has, for example, an 8-bit color code for each pixel, and the next stage look-up table (LUT) 3 has preset R, G, B color codes according to the color code of each pixel. Output the value.

これにより、同時に256色の画像を表示することがで
きる。一般には、カラー画像を256色で表示するのは
画質の著しい劣化を免れないが、一つの色領域の色の変
化を表示することは、256色を適切に選べば可能であ
ることが多い。本発明は、画像全体をカラー画像メモリ
1からのR,G、B値で表示し、色の変更を行なう色領
域のみを色コード画像メモリ2とルック・アップ・テー
ブル3で表示し、ルック・アップ・テーブル3の内容を
書き換えることにより、高速の色変更表示を実現しよう
とするものである。ディスプレイ・コントローラ5は、
この2つの画像メモリからの信号の切り換えを各画素毎
にマスク画像メモリ4の画素値によって行なう。即ち、
マスク画像メモリ4は、各画像1ビツトを持つメモリで
ある。第10図にカラー画像メモリ1に格納された画像
とマスク画像メモリ4に格納されたマスク画像との関係
を示す。マスク画像は、色変更を行なう対象である自動
車のボディ一部のみで“1”の画素値を持つ。ディスプ
レイ・コントローラ5は、画像の表示の際に、各画素毎
にマスク画像の画素値を調べ、01′”であれば、ルッ
ク、アップ、テーブル3がらの(R,G、B)値を“θ
パであればカラー画像メモリ1からの(R,G、B)値
をD/A変換器6に与え、カラーモニタ7上に自然に色
変更された部分が合成されたカラー画像が表示される。
This allows images in 256 colors to be displayed simultaneously. Generally, displaying a color image with 256 colors will inevitably result in significant deterioration in image quality, but it is often possible to display color changes in one color area by appropriately selecting 256 colors. In the present invention, the entire image is displayed using R, G, and B values from a color image memory 1, and only the color area whose color is to be changed is displayed using a color code image memory 2 and a look-up table 3. By rewriting the contents of the up table 3, it is attempted to realize high-speed color change display. The display controller 5 is
The signals from these two image memories are switched for each pixel using the pixel value of the mask image memory 4. That is,
The mask image memory 4 is a memory having one bit for each image. FIG. 10 shows the relationship between the image stored in the color image memory 1 and the mask image stored in the mask image memory 4. The mask image has a pixel value of "1" only in the part of the body of the car whose color is to be changed. When displaying an image, the display controller 5 checks the pixel value of the mask image for each pixel, and if it is "01'", the (R, G, B) value from the look, up, table 3 is set to "01'". θ
If it is a color image memory 1, the (R, G, B) values from the color image memory 1 are given to the D/A converter 6, and a color image in which the naturally colored parts are combined is displayed on the color monitor 7. .

このようにすると、Co′を変化させたときに、色変更
のために行なう計算は、ルックアップテーブル3の内容
のみであり、256回の式(5)の計算で済むため大巾
な高速化が実現される。
In this way, when Co′ is changed, the only calculation required to change the color is the contents of lookup table 3, and 256 calculations of equation (5) are required, resulting in a significant speed increase. is realized.

次に、対象の色領域を少ない色数で表現するための適切
な色選択方法について第11図〜第14図を参照して説
明する。色領域に存在するすべての色が、第7図のα−
p空間で斜線の領域200に分布しているとしても、各
色の頻度を等肩線で表示すると、第11図に示すように
ほとんどの色は非常に頻度は少なく、クラスタ101−
105で示すような幾つかの部分でのみ頻度が高い。そ
のためこのような部分についてのみ正確に再現し、その
他の部分は、不正確であっても実用上はとんど問題はな
い。
Next, an appropriate color selection method for expressing a target color area with a small number of colors will be described with reference to FIGS. 11 to 14. All colors existing in the color area are α-
Even if the colors are distributed in the diagonally shaded area 200 in p-space, if the frequency of each color is represented by isocapital lines, most of the colors have a very low frequency as shown in FIG. 11, and the cluster 101-
The frequency is high only in some parts such as 105. Therefore, even if only such parts are accurately reproduced and other parts are inaccurate, there is almost no problem in practice.

従って、ルックアップテーブルに登録する256色を、
このようなりラスタの色に集中させることによって自然
な色再現を行なう。
Therefore, the 256 colors to be registered in the lookup table are
By concentrating on the raster colors in this way, natural color reproduction is achieved.

クラスタを求めるクラスタリングの手法の一例を次に説
明する。ここでは簡単のため、4色のクラスタを得る方
法を例示する。ここで、対象色領域の色は第12図のX
印のように分布していると仮定する。この18色の(α
、β)座標は第13図の通りである。クラスタリングは
通常コンピュータプログラムにより実行されるが、(α
、段のデータセットを2つのクラスタに分ける際の処理
フローを第14図に示す。データセットは、最も分散の
大きい主軸の方向についてのメディアンの位置Cを求め
ることにより、2等分される。2n色にクラスタリング
する場合は、この分割されたデータセットについて更に
同じ処理を繰り返し、全体でn段階行えばよい。このよ
うにして得られたクラスタの代表色として、各クラスタ
に含まれる画素の色の平均を求めた結果を第12図のO
印として示した。
An example of a clustering method for determining clusters will be described below. For the sake of simplicity, a method for obtaining four-color clusters will be exemplified here. Here, the color of the target color area is
Assume that the distribution is as shown in the figure. These 18 colors (α
, β) coordinates are as shown in FIG. Clustering is usually performed by a computer program, but (α
FIG. 14 shows the processing flow when dividing the dataset of stages , , into two clusters. The data set is divided into two equal parts by finding the median position C in the direction of the principal axis with the largest variance. In the case of clustering into 2n colors, the same process may be repeated for this divided data set, performing n stages in total. As the representative color of the cluster obtained in this way, the result of finding the average color of the pixels included in each cluster is shown in Figure 12.
Shown as a mark.

このような手法により、256色の代表色を選択し、色
コードOから色コード255とする。また上記のクラス
タリングのための主軸とメディアンを用いることによっ
て色領域中の各画素について色コードを与え、第9図の
色コード画像メモリ2に格納する。また、ルックアップ
テーブル3には、各代表色の(α、13)から式(5)
によって各色コードに対する(R″、G’、Bつを求め
書き込む。このようにすると、自然な色変更表示が得ら
れる。
By such a method, 256 representative colors are selected and the color codes are set from color code O to color code 255. Furthermore, by using the principal axis and median for clustering described above, a color code is given to each pixel in the color area and stored in the color code image memory 2 of FIG. In addition, lookup table 3 contains formula (5) from (α, 13) of each representative color.
Find (R'', G', B) for each color code and write them. By doing this, a natural color change display can be obtained.

尚、カラー画像の対象とする領域中に鏡面反射と考えら
れる部分がない場合には、C6として、ディスプレイ装
置において通常白と考えられる値(例えば、R,G、B
それぞれに8ビツトを割り当てているディスプレイ装置
では、鳥=Gs:B、=、、255)を与えても実用上
は差し支えない。
Note that if there is no part that is considered to be specular reflection in the target area of the color image, C6 is a value that is normally considered white on the display device (for example, R, G, B
In a display device that allocates 8 bits to each, there is no practical problem in giving BIRD=Gs:B,=,255).

(実施例) 本発明の実施例を第1図を参照して説明する。カラー画
像メモリ1、色コード画像メモリ2、ルック・アップ・
テーブル(LUT)3、マスク画像メモリ4、ディスプ
レイコントローラ5、D/A変換器6、カラーモニター
7の各々の働きは、既に第9図で説明した通りである。
(Example) An example of the present invention will be described with reference to FIG. Color image memory 1, color code image memory 2, look up
The functions of the table (LUT) 3, mask image memory 4, display controller 5, D/A converter 6, and color monitor 7 are as already explained in FIG.

カラー画偉メモリ1には例えば自動車などを含むフルカ
ラー画像が格納されており、マスク画像メモリ4には、
マスク画像が、CRTによってカラー画像を観察しなが
ら、ポインティングデバイスで輪郭をとり、中を塗りつ
ぶすような公知の技術で既に作られていると仮定する。
The color image memory 1 stores full color images including, for example, cars, and the mask image memory 4 stores,
It is assumed that a mask image has already been created using a known technique such as observing a color image on a CRT, drawing an outline with a pointing device, and filling in the inside.

色指定手段8は、利用者の指示によりCRT7とポイン
ティング・デバイス9を利用して、画像中から物体色C
8及び光源色C8をピックアップし、それぞれ第1の物
体色記憶手段10、光源色記憶手段11に格納するもの
で、マイクロコンピュータなどで実現できる。中間画素
値計算手段12は、マスク画像メモリ4の各画素を走査
し、値が“1″である画素に対して、カラー画像メモリ
1に格納されている(R,G、B)から、式(9)に従
って中間画素値(α、I3)を計算しまず色分布メモリ
13に与える。色分布メモリ13は(α、p)ラメモリ
の二次元アドレスとし、対象色領域の色分布を各アドレ
スの頻度として第11図に示したような形で記憶する。
A color specifying means 8 uses a CRT 7 and a pointing device 9 to select an object color C from an image according to a user's instruction.
8 and light source color C8 are picked up and stored in the first object color storage means 10 and light source color storage means 11, respectively, and can be realized by a microcomputer or the like. The intermediate pixel value calculation means 12 scans each pixel of the mask image memory 4, and calculates the formula for the pixel whose value is "1" from (R, G, B) stored in the color image memory 1. The intermediate pixel value (α, I3) is calculated according to (9) and first provided to the color distribution memory 13. The color distribution memory 13 is a two-dimensional (α, p) memory, and stores the color distribution of the target color area as the frequency of each address in the form shown in FIG. 11.

クラスタリング手段14は、この色分布に対し、先に述
べたようなりラスタリングを施こし、その結果をクラス
タ記憶手段15に格納する。クラスタリング手段14は
マイクロコンピュータなどで実現できる。クラスタ記憶
手段15の内容を第2図に示す。代表色に当たる各クラ
スタの平均値32頁がクラスタ平均値テーブル153に
、これを得る過程で決定された、各段階における主軸ベ
クトルとその方向での分割点の値が、それぞれ主軸ベク
トルテーブル151及び分割点テーブル152に格納さ
れる。代表色が28:256色の場合、クラスタ平均値
テーブル153の容量は256であり、これは8段階の
2等分の繰り返しで決定されるため、 1+2+4+8+16+32+64+128=255に
より主軸ベクトルテーブル151と分割点テーブル15
2は各々255の容量を持つ。
The clustering means 14 performs rastering on this color distribution as described above, and stores the results in the cluster storage means 15. The clustering means 14 can be realized by a microcomputer or the like. The contents of the cluster storage means 15 are shown in FIG. The average value of each cluster corresponding to the representative color (page 32) is stored in the cluster average value table 153, and the values of the principal axis vector at each stage and the dividing point in that direction, determined in the process of obtaining this, are stored in the principal axis vector table 151 and the dividing point, respectively. It is stored in the point table 152. When the representative colors are 28:256 colors, the capacity of the cluster average value table 153 is 256, and this is determined by repeating 8 stages of bisection, so 1+2+4+8+16+32+64+128=255 creates the principal axis vector table 151 and the division point table. 15
2 each have a capacity of 255.

クラスタが決定された段階で、中間画素値計算手段12
は、再び対象色領域の各画素を走査し、(α、13)を
今度は色コード計算手段16に送る。色コード計算手段
は、各中間画素値(α、!3)を主軸ベクトルテーブル
151及び分割点テーブル152の内容に従って8段階
の判別により、色コードを決定し色コード画像メモリ2
の対応する画素に書き込む。色コード画像が完成した段
階で、色変更表示の準備は整ったことになる。
At the stage when clusters are determined, intermediate pixel value calculation means 12
scans each pixel in the target color area again and sends (α, 13) to the color code calculation means 16 this time. The color code calculation means determines the color code by determining each intermediate pixel value (α, !3) in eight steps according to the contents of the principal axis vector table 151 and the division point table 152, and stores the color code in the color code image memory 2.
write to the corresponding pixel. Once the color code image is completed, preparations for color change display are complete.

実際の色変更は、まず利用者が、例えばポインティング
デバイス9やキーボード18から物体色C8の代わりの
新しい物体色Co′のR,G、B値(RO’+GO’y
BO’)を色指定手段8に与え、これが第2の物体色記
憶手段19に格納されることにより開始される。変更色
計算手段17は、クラスタ平均値テーブル153に格納
された各α、pに対し、CI!及びC。′を用いて式(
5)によってそれぞれのR,G、B値を計算し、LUT
3に書き込む。
To actually change the color, the user first uses the pointing device 9 or the keyboard 18 to change the R, G, and B values (RO'+GO'y) of a new object color Co' instead of the object color C8.
BO') is given to the color specifying means 8, and this is stored in the second object color storage means 19, thereby starting the process. The change color calculation means 17 calculates CI! for each α and p stored in the cluster average value table 153. and C. ′ to form the formula (
5) calculate the respective R, G, B values and use the LUT
Write in 3.

これにより、カラー画像の内、マスク画像の画素に“1
”が立っている部分だけが色コード画像メモリ2とLU
T3により発生される色に置きかえられ、所望の色に変
更されて自然に表示される。
As a result, “1” is added to the pixels of the mask image in the color image.
Only the part with “” is the color code image memory 2 and LU.
The color is replaced with the color generated by T3 and changed to a desired color for natural display.

(発明の効果) 以上に述べた方法及び装置により、カラー画像中に含ま
れる、本来一定色であるが、陰影や照り返しにより濃淡
のある領域の色を、高速に、しかも自然さを損なわず指
定した色に変更して表示することができる。本発明によ
りデザインされた製品などの色を、その周囲の状況を変
化させることなく、自然に、しかも次々と変更しながら
表示することができるので、実際にその色の製品を作る
ことなく配色などのチェックを行なうことができ、工業
的、経済的に大きな効果がある。
(Effects of the Invention) With the method and device described above, colors in areas that are originally constant colors but have shading due to shading or reflection can be specified quickly and without sacrificing naturalness. You can change the color and display it. It is possible to display the colors of products designed according to the present invention while changing them naturally and one after another without changing the surrounding conditions, so it is possible to change the color scheme without actually creating a product with that color. can be checked, and has great industrial and economical effects.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図は本発明の実施例を示すブロック図、第2図はク
ラスタ記憶手段の詳細構成を示すブロック図、第3図は
従来の装置のブロック図、第4図は従来の装置の原理の
説明図、第5図は本発明の詳細な説明図、第6図は1つ
の色領域の色分布を色空間中に示した説明図、第7図は
これを別の座標系で示した説明図、第8図は上記色領域
の色を本発明により変更した場合の色分布を色空間中に
示した図、第9図は、本発明の高速色変更表示のための
構成の説明図、第10図はカラー画像メモリとマスク画
像メモリの関係を示す説明図、第11図は対象色領域に
おける色分布の説明図、第12〜13図は色分布のクラ
スタリング例の説明図、第14図はクラスタリングの1
段階の処理フローである。 1・・・カラー画像メモリ、2・・・色コード画像メモ
リ、3・・・ルック・アップ・テーブル、4・・・マス
ク画像メモリ、5・・・ディスプレイコントローラ、6
・・・D/A変換器、7・・・カラーモニタ、8・・・
色指定手段、9・・・ポインティング・デバイス、10
・・・第1の物体色記憶手段、11・・・光源色記憶手
段、12・・・中間画素値計算手段、13・・・色分布
メモリ、14・・・クラスタリング手段、15・・・ク
ラスタ記憶手段、16・・・色コード計算手段、17・
・・変更色計算手段、18・・・キーボード、19・・
・第2の第10 第2図 第4図 B 第5図 第6図 第7図 第8図 第9図 第10図 第11図 第12図 第13図 第14図
FIG. 1 is a block diagram showing an embodiment of the present invention, FIG. 2 is a block diagram showing the detailed configuration of the cluster storage means, FIG. 3 is a block diagram of a conventional device, and FIG. 4 is a block diagram of the principle of the conventional device. 5 is a detailed explanatory diagram of the present invention, FIG. 6 is an explanatory diagram showing the color distribution of one color area in a color space, and FIG. 7 is an explanatory diagram showing this in a different coordinate system. 8 is a diagram showing the color distribution in the color space when the color of the color area is changed according to the present invention, and FIG. 9 is an explanatory diagram of the configuration for high-speed color change display of the present invention. Fig. 10 is an explanatory diagram showing the relationship between color image memory and mask image memory, Fig. 11 is an explanatory diagram of color distribution in the target color area, Figs. 12 and 13 are explanatory diagrams of an example of clustering of color distribution, and Fig. 14 is clustering 1
This is a step-by-step process flow. DESCRIPTION OF SYMBOLS 1... Color image memory, 2... Color code image memory, 3... Look up table, 4... Mask image memory, 5... Display controller, 6
...D/A converter, 7...color monitor, 8...
color specifying means, 9... pointing device, 10
... first object color storage means, 11 ... light source color storage means, 12 ... intermediate pixel value calculation means, 13 ... color distribution memory, 14 ... clustering means, 15 ... cluster Storage means, 16... Color code calculation means, 17.
... Change color calculation means, 18... Keyboard, 19...
・Second 10 Figure 2 Figure 4 B Figure 5 Figure 6 Figure 7 Figure 8 Figure 9 Figure 10 Figure 11 Figure 12 Figure 13 Figure 14

Claims (1)

【特許請求の範囲】 1、カラー画像の対象となる色領域中の各画素の三原色
値を、三次元の色空間において黒色、物体色、光源色の
三色が張る平面上の色を示すと仮定して二次元の中間座
標値に変換し、その分布からクラスタリングにより少数
の代表色を選択し、前記色領域中の各画素について前記
クラスタリングの基準に従って前記代表色を示す色コー
ドを与え、色コード画像を作成し、各色コードに対応す
る変更色を前記光源色及び新たに与えられた第2の物体
色を用いて前記代表色について求めてルックアップテー
ブルに登録し、前記カラー画像と、前記色コード画像に
対しルックアップテーブルを適用した画像を切り換えて
表示することにより、上記色領域のみに所望の色変更が
自然になされた画像を高速に表示するカラー画像の高速
色変更表示方法。 2、カラー画像を格納するカラー画像記憶手段と、該カ
ラー画像の対象となる色領域の物体色を記憶する第一の
物体色記憶手段と、該カラー画像の光源色を記憶する光
源色記憶手段と、前記カラー画像の対象となる色領域中
の各画素の三原色値を、三次元の色空間において、黒色
、物体色、光源色の三色が張る平面上の色を示すと仮定
して、二次元の色空間の中間座標値に変換する中間画素
値計算手段と、該中間画素値計算手段から得られる色分
布をクラスタリングし、少数の代表色を選択するクラス
タリング手段と、該クラスタリングの過程で得られるク
ラスタリング基準と前記代表色を格納するクラスタ記憶
手段と、前記中間画素値計算手段から得られる中間座標
値と前記クラスタリング基準により求められる各画素の
前記代表色に対応する色コードを画像として記憶する色
コード画像記憶手段と、前記色領域の色変更後の物体色
を記憶する第二の物体色記憶手段と、該第二の物体色と
前記光源色によって前記代表色から計算された前記色コ
ードに対応する三原色値を格納し、画像の表示の際、前
記色コード画像記憶手段から読み出される色コードを三
原色値に変換するルック・アップ・テーブルと、画像の
表示の際、前記カラー画像記憶手段から読み出される画
素の三原色値を前記色領域に属する画素については前記
ルック・アップ・テーブルから出力される三原色値に置
き換えるディスプレイコントローラとを含み、カラー画
像の対象となる色領域の色を高速に変更し表示するカラ
ー画像の高速色変更表示装置。
[Claims] 1. The three primary color values of each pixel in the target color region of a color image are expressed as colors on a plane defined by the three colors black, object color, and light source color in a three-dimensional color space. A small number of representative colors are selected from the distribution by clustering, a color code indicating the representative color is given to each pixel in the color area according to the clustering criteria, and the color is converted into two-dimensional intermediate coordinate values. A code image is created, a changed color corresponding to each color code is obtained for the representative color using the light source color and the newly given second object color, and registered in a lookup table, and the color image and the A high-speed color change display method for a color image, in which an image in which a desired color change is naturally made only in the color area is displayed at high speed by switching and displaying images obtained by applying a look-up table to a color code image. 2. Color image storage means for storing a color image, first object color storage means for storing an object color of a color region that is a target of the color image, and light source color storage means for storing a light source color of the color image. Assuming that the three primary color values of each pixel in the target color region of the color image represent the colors on a plane defined by the three colors of black, object color, and light source color in a three-dimensional color space, intermediate pixel value calculation means for converting into intermediate coordinate values in a two-dimensional color space; clustering means for clustering the color distribution obtained from the intermediate pixel value calculation means and selecting a small number of representative colors; a cluster storage means for storing the obtained clustering standard and the representative color, and a color code corresponding to the representative color of each pixel determined by the intermediate coordinate value obtained from the intermediate pixel value calculation means and the clustering standard as an image. a second object color storage means for storing an object color after changing the color of the color region; and a color code image storage means for storing an object color after changing the color of the color region, and the color calculated from the representative color using the second object color and the light source color. a look-up table that stores three primary color values corresponding to the codes and converts the color code read from the color code image storage means into the three primary color values when displaying an image; and a display controller that replaces the three primary color values of the pixels read from the means with the three primary color values output from the look-up table for pixels belonging to the color area, and the display controller is configured to quickly change the colors of the target color area of the color image. A fast color changing display device for changing and displaying color images.
JP62080236A 1987-03-25 1987-03-31 Method and apparatus for high-speed color change display of color image Expired - Lifetime JPH06100900B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP62080236A JPH06100900B2 (en) 1987-03-31 1987-03-31 Method and apparatus for high-speed color change display of color image
US07/596,425 US5058040A (en) 1987-03-25 1990-10-11 Simulation of a change in three-component color values by using two-component color values

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP62080236A JPH06100900B2 (en) 1987-03-31 1987-03-31 Method and apparatus for high-speed color change display of color image

Publications (2)

Publication Number Publication Date
JPS63244094A true JPS63244094A (en) 1988-10-11
JPH06100900B2 JPH06100900B2 (en) 1994-12-12

Family

ID=13712702

Family Applications (1)

Application Number Title Priority Date Filing Date
JP62080236A Expired - Lifetime JPH06100900B2 (en) 1987-03-25 1987-03-31 Method and apparatus for high-speed color change display of color image

Country Status (1)

Country Link
JP (1) JPH06100900B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1996022659A1 (en) * 1995-01-18 1996-07-25 Sony Corporation Device and method for converting color of picture data

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1996022659A1 (en) * 1995-01-18 1996-07-25 Sony Corporation Device and method for converting color of picture data
GB2301976A (en) * 1995-01-18 1996-12-18 Sony Corp Device and method for converting color of picture data
GB2301976B (en) * 1995-01-18 1999-07-07 Sony Corp Device and method for converting color of picture data
US6369860B1 (en) * 1995-01-18 2002-04-09 Sony Corporation Color conversion apparatus and method for image data
US6545726B2 (en) 1995-01-18 2003-04-08 Sony Corporation Color conversion apparatus for image data and color conversion method for image data

Also Published As

Publication number Publication date
JPH06100900B2 (en) 1994-12-12

Similar Documents

Publication Publication Date Title
US6429877B1 (en) System and method for reducing the effects of aliasing in a computer graphics system
US5877769A (en) Image processing apparatus and method
US5103217A (en) Electronic image processing
GB2270243A (en) Hidden surface removal algerithm
JPH0814854B2 (en) 3D graphic display device
JPH05307610A (en) Texture mapping method and its device
US6731289B1 (en) Extended range pixel display system and method
US20010040999A1 (en) Image processing apparatus and image processing method
US6859209B2 (en) Graphics data accumulation for improved multi-layer texture performance
US5880735A (en) Method for and apparatus for transparency conversion, image processing system
US6744440B1 (en) Image processing apparatus, recording medium, and program
JP3035571B2 (en) Image processing device
US7116333B1 (en) Data retrieval method and system
US6563497B1 (en) Image processing apparatus
JP3903557B2 (en) Data conversion apparatus and image generation apparatus
JPS63237172A (en) Method and device for color change of color picture
EP0974935B1 (en) Spotlight characteristic forming method and image processor using the same
JPS63244094A (en) Fast color alteration display method and apparatus for color image
JPH0345427B2 (en)
JPH0696231A (en) Method and device for graphic display
JPH06259571A (en) Image synthesizer
JPH05298455A (en) Texture mapping device
JP2590783B2 (en) 3D graphic display device
JPH06203176A (en) Image data processing method and device therefor
JP2898569B2 (en) Video accelerator board for computer game development

Legal Events

Date Code Title Description
EXPY Cancellation because of completion of term
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20071212

Year of fee payment: 13