JPH0887256A - Color reduction method - Google Patents

Color reduction method

Info

Publication number
JPH0887256A
JPH0887256A JP6225397A JP22539794A JPH0887256A JP H0887256 A JPH0887256 A JP H0887256A JP 6225397 A JP6225397 A JP 6225397A JP 22539794 A JP22539794 A JP 22539794A JP H0887256 A JPH0887256 A JP H0887256A
Authority
JP
Japan
Prior art keywords
color
image
colors
gradation
full
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.)
Pending
Application number
JP6225397A
Other languages
Japanese (ja)
Inventor
Toshiichi Shimizu
敏一 清水
Masanori Sugie
正則 杉江
Takashi Higashida
隆司 東田
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.)
Hitachi Software Engineering Co Ltd
Hitachi Ltd
Original Assignee
Hitachi Software Engineering Co Ltd
Hitachi 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 Hitachi Software Engineering Co Ltd, Hitachi Ltd filed Critical Hitachi Software Engineering Co Ltd
Priority to JP6225397A priority Critical patent/JPH0887256A/en
Publication of JPH0887256A publication Critical patent/JPH0887256A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE: To provide a natural, smooth and attractive image whose display and print are not rough by replacing a decomposed color of a pixel of coincidence to a comparison reference color becoming a comparison partner and replacing the decomposed color of the pixel of noncoincidence to the comparison reference color whose gradation is the nearest. CONSTITUTION: An RGB block control part 3 decomposes respective pixels of a full- color image to red, green and blue when the full-color image is inputted. Then, the number of use pixels are counted in gradation unit in subdivided blocks corresponding to the gradations of respective decomposed colors, and the number of use gradations in respective subdivided blocks are counted. Thereafter, the decomposed color of which use frequency is more is selected from the whole subdivided blocks. Then, the decomposed color of the selected gradation is decided as the comparison reference color, and the comparison reference color is compared with the decomposed colors of each pixel of full color image of a color reduction object successively. Then, the decomposed color of the pixel of which both coincide with each other is replaced to the comparison reference color becoming the comparison partner, and the decomposed color of the pixel of which both disagree is replaced to the comparison reference color of which gradation is the nearest, and a color reduced image 4 is generated.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、表示装置や印刷装置な
どの画像出力装置で出力するフルカラー画像の色数を削
減する減色方法に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a color reduction method for reducing the number of colors of a full color image output by an image output device such as a display device or a printing device.

【0002】[0002]

【従来の技術】従来、表示装置や印刷装置などの画像出
力装置でフルカラー画像を出力する場合、フルカラー画
像の中から平均的な色を取り出してディザリングによ
り、画像を作成して出力するものがある。
2. Description of the Related Art Conventionally, when outputting a full-color image with an image output device such as a display device or a printing device, there is a device that creates an image by dithering by extracting an average color from the full-color image. is there.

【0003】ディザリングとは、ある特殊なパターンで
交互に異なる色を設定し、擬似的に中間色を作成する方
法である。
Dithering is a method in which different colors are set alternately in a certain special pattern and pseudo intermediate colors are created.

【0004】例えば、表示装置が任意の色を256色指
定でき、かつ同時に256色表示できる場合、使用頻度
の多い色だけを選択せずにフルカラー(例えば、167
7万色や26万色)画像の中から平均的な色を抽出し、
色の片寄りがないようにする方法である。
For example, when the display device can specify 256 arbitrary colors and can display 256 colors at the same time, the full color (for example, 167) is selected without selecting only the colors that are frequently used.
Average color is extracted from the image (70,000 colors or 260,000 colors),
This is a method to prevent color deviation.

【0005】この方法の場合、色が平均的に抽出してあ
るため、2つの隣り合う間の色を表示しようとすると、
そのどちらか近い方の色を用いて表示される。
In the case of this method, since the colors are extracted on average, if two adjacent colors are displayed,
It is displayed using the color whichever is closer.

【0006】また、画像の中の大きな範囲で似かよった
複数の色の部分があった場合、この部分の色は同じ色で
塗り潰されてしまう。従って、近似色で形や奥行などが
表されていても平面的な表示となってしまう。
Further, when there are a plurality of similar color portions in a large area in the image, the colors of these portions are filled with the same color. Therefore, even if the shape and the depth are represented by the approximate color, the display is flat.

【0007】別のケースで、例えば1ドットが紫色とす
る。しかし、256色の中に紫色が無かった場合、赤と
青をそれぞれ1ドットで隣り合わせにすると人の目には
混ざり合って紫色に見える。すなわち、複数の色を用い
て別の色に見えるようにでき、画像全体で見た場合は見
栄えがする画像とすることができる。しかし、1ドット
ずつ色が変わるため、画像の色に滑らかさが無くなって
しまう。従って、画像の中の対象となる目的物が大きい
場合は有効であるが、小さい場合は効果が薄れてしま
う。さらに、解像度の低い表示装置等を使用すると粗さ
が目立ってしまう。
In another case, for example, one dot is purple. However, when there is no purple in the 256 colors, if red and blue are placed next to each other by one dot, they will be mixed and appear purple to the human eye. That is, a plurality of colors can be used to make different colors appear, and the image can look good when viewed as a whole image. However, since the color changes dot by dot, the color of the image loses smoothness. Therefore, when the target object in the image is large, it is effective, but when it is small, the effect is weakened. Furthermore, when a display device having a low resolution is used, the roughness becomes conspicuous.

【0008】一方、フルカラー画像は、赤(R)、緑
(G)、青(B)の各色が共に64階調のとき、その表
現可能な色数は262,144(=64×64×64)
色となる。
On the other hand, in a full-color image, when each of red (R), green (G), and blue (B) has 64 gradations, the number of expressible colors is 262,144 (= 64 × 64 × 64). )
It becomes a color.

【0009】このような条件で、表示装置が任意の色を
例えば256色までしか同時表示できない場合に色数を
減らす方法としては、使用頻度の多い色から先に256
色抜き出し、残った色については、先に抜き出した25
6色の中で最も近い色に変更するという方法が考えられ
る。
Under such conditions, when the display device can simultaneously display an arbitrary color, for example, up to 256 colors at the same time, as a method for reducing the number of colors, 256 colors are used first in the order of frequency of use.
The color was extracted, and the remaining color was extracted first.
A method of changing to the closest color among the six colors can be considered.

【0010】この方法では、ある程度の画像の質は得ら
れるものの、残った色は、階調を数値的に近似するた
め、思わぬ色に変更されてしまい、画像のあちこちに粗
さが目立った見栄えのしないものとなってしまう。
With this method, although the image quality can be obtained to some extent, the remaining color is changed to an unexpected color because the gradation is approximated numerically, and the roughness is conspicuous around the image. It will not look good.

【0011】これに対し、特開昭63−151267号
公報あるいは特開昭63−151270号公報に示され
るような色調補正方法が提案されている。
On the other hand, there has been proposed a color tone correction method as disclosed in JP-A-63-151267 or JP-A-63-151270.

【0012】特開昭63−151267号公報に示され
た色調補正方法は、単純なパラメータを用いることによ
って色調修正を行った画像を得る方法である。
The color tone correction method disclosed in Japanese Patent Laid-Open No. 63-151267 is a method of obtaining an image whose color tone has been corrected by using simple parameters.

【0013】また、特開昭63−151270号公報に
示される色調補正方法は、黒又は黒に近い色であること
を識別する黒検出器を設け、これらを一色の黒として扱
う方法である。
The color tone correction method disclosed in Japanese Patent Laid-Open No. 63-151270 is a method in which a black detector for identifying black or a color close to black is provided, and these are treated as one black color.

【0014】[0014]

【発明が解決しようとする課題】フルカラー画像の色数
を減色するには、例えば、黄赤系が多い夕焼け、青系が
多い浜辺、赤系の多い人物、白系が多い雪山などの画像
に見られるように、画像によって使用している色が同色
系に集まっている傾向にある点を考慮し、見た目に粗さ
や不自然さが感じられないように減色する必要がある。
To reduce the number of colors in a full-color image, for example, a sunset with a lot of yellow-reds, a beach with a lot of blues, a person with a lot of reds, a snow mountain with a lot of whites, etc. As described above, in consideration of the tendency that the colors used in the image are concentrated in the same color system, it is necessary to reduce the colors so that the appearance does not feel roughness or unnaturalness.

【0015】しかしながら、ディザリング処理によって
フルカラー画像の色を減色する従来の方法にあっては、
平面的な画像になったり、滑らかさがない不自然な画像
になるなどの問題があり、またフルカラー画像の面積が
ある程度大きくなければ処理できないという問題があ
る。
However, in the conventional method for reducing the color of the full-color image by the dithering process,
There are problems such as a two-dimensional image and an unnatural image without smoothness, and there is a problem that it cannot be processed unless the area of a full-color image is large to some extent.

【0016】また、特開昭63−151267号公報お
よび特開昭63−151270号公報に開示された色調
補正方法にあっては、単純なパラメータを用いて色修正
を行っているので、パラメータによって色数を減少させ
ることは可能であるが、パラメータを人為的に設定する
ので、原画像に対して不自然さが残る画像となってしま
う問題がある。
Further, in the color tone correction method disclosed in JP-A-63-151267 and JP-A-63-151270, since the color correction is performed using simple parameters, it depends on the parameters. Although it is possible to reduce the number of colors, the parameter is artificially set, so that there is a problem that the image becomes unnatural with respect to the original image.

【0017】本発明の目的は、例えば1677万色や2
6万色といった膨大な色数から構成されるフルカラー画
像を256色等に減色させても、見た目では画質に粗さ
や不自然さを感じさせない見栄えのよい画像に減色させ
ることができる減色方法を提供することである。
The object of the present invention is, for example, 16.77 million colors or 2
Providing a color-reduction method that can reduce a full-color image consisting of an enormous number of 60,000 colors to 256 colors, etc., to a good-looking image that does not cause roughness or unnaturalness in the image quality It is to be.

【0018】[0018]

【課題を解決するための手段】上記目的を達成するため
に本発明は、赤(R)、緑(G)、青(B)の3つの明
度軸からなる論理的に立体構造のRGB空間を所定階調
単位で複数の細分化ブロックに分割しておき、減色対象
のフルカラー画像の各画素の色を赤(R)、緑(G)、
青(B)に分解し、その各分解色の使用画素数を前記複
数の細分化ブロックのうち各分解色の階調に対応した細
分化ブロックにおいて階調単位にカウントすると共に、
各細分化ブロックにおける使用階調数をカウントした
後、各細分化ブロックから前記使用画素数が多い階調の
分解色を、各細分化ブロックにおける前記使用階調数に
応じた数だけ選択し、この選択した階調の分解色を比較
基準色と定め、この比較基準色と減色対象のフルカラー
画像の各画素の分解色とを順次比較し、両者が一致した
画素の分解色は比較相手となった比較基準色に置換し、
不一致の画素の分解色は階調が最も近い比較基準色に置
換し、減色対象のフルカラー画像の色を前記比較基準色
の数に減色することを特徴とする。
In order to achieve the above object, the present invention provides an RGB space having a logical three-dimensional structure composed of three lightness axes of red (R), green (G) and blue (B). The color of each pixel of the full-color image to be subjected to color reduction is divided into a plurality of subdivided blocks in a predetermined gradation unit, and the color of each pixel is red (R), green (G),
It is decomposed into blue (B), and the number of pixels used for each separated color is counted in gradation units in a divided block corresponding to the gradation of each separated color among the plurality of divided blocks, and
After counting the number of tones used in each subdivided block, the number of separated colors of the tones having a large number of used pixels from each subdivided block is selected by the number corresponding to the number of tones used in each subdivided block, The separation color of the selected gradation is defined as a comparison reference color, and the comparison reference color is sequentially compared with the separation color of each pixel of the full-color image to be reduced, and the separation color of the pixel where both match is the comparison partner. Replaced with the reference color
The separated color of the mismatched pixel is replaced with the comparison reference color having the closest gradation, and the color of the full-color image to be reduced is reduced to the number of the comparison reference colors.

【0019】[0019]

【作用】本発明によれば、赤(R)、緑(G)、青
(B)の3つの明度軸からなる論理的に立体構造のRG
B空間を用意する。
According to the present invention, an RG having a logical three-dimensional structure composed of three lightness axes of red (R), green (G) and blue (B).
Prepare B space.

【0020】RGB空間とは、赤(R)、緑(G)、青
(B)の明度を立体的に表現するためのもので、それぞ
れの軸が階調となり、3つの明度軸の交点(原点)が
「黒」、原点以外の頂点がそれぞれ最も明るい赤、緑、
青を表わすものとなる。すべてが最も明るい赤、緑、青
となった交点は「白」を表わすものとなる。
The RGB space is for three-dimensionally expressing the brightness of red (R), green (G), and blue (B), and each axis is a gradation and the intersection of three brightness axes ( (Origin) is "black", vertices other than origin are the brightest red, green,
It represents blue. The intersection of all bright red, green and blue represents "white".

【0021】そして、このRGB空間を所定階調単位で
複数の細分化ブロックに分割する。例えば、赤、緑、青
がそれぞれ64階調から成る262,144(=64×
64×64)色のフルカラー画像を扱う場合、64階調
を8階調単位で8個に分割し、この分割数に対応した5
12(=8×8×8)ブロックに細分化する。
Then, the RGB space is divided into a plurality of subdivided blocks in units of a predetermined gradation. For example, 262,144 (= 64 ×, each of which has 64 gradations of red, green, and blue)
When handling a 64 × 64) full-color image, 64 gradations are divided into 8 gradations in units of 8 gradations, and 5 corresponding to the number of divisions.
It is subdivided into 12 (= 8 × 8 × 8) blocks.

【0022】このようにすると、1つの細分化ブロック
で表現可能な色数は、512(=8×8×8)色とな
る。
In this way, the number of colors that can be represented by one subdivided block is 512 (= 8 × 8 × 8).

【0023】そこで、減色対象のフルカラー画像の各画
素の色を赤(R)、緑(G)、青(B)に分解し、その
使用画素数を複数の細分化ブロックのうち各分解色の階
調に対応した細分化ブロックにおいて階調単位にカウン
トすると共に、各細分化ブロックにおける使用階調数を
カウントする。すなわち、対象となるフルカラー画像
が、RGB空間の512個の各細分化ブロック中で何色
使用しているか、さらに、各色を何画素が使用している
かをカウントする。
Therefore, the color of each pixel of the full-color image to be subjected to color reduction is decomposed into red (R), green (G), and blue (B), and the number of pixels used is determined for each of the separated colors of a plurality of subdivided blocks. The subdivision blocks corresponding to the gradation are counted in gradation units, and the number of gradations used in each subdivision block is counted. That is, how many colors the target full-color image uses in each of the 512 subdivided blocks in the RGB space and how many pixels use each color are counted.

【0024】この後、各細分化ブロックから前記使用画
素数が多い階調の分解色を、各細分化ブロックにおける
前記使用階調数に応じた数だけ選択する。
After that, from each subdivided block, the separated colors of the gray scales having a large number of used pixels are selected by the number corresponding to the used gray scale number in each subdivided block.

【0025】これにより、フルカラー画像を構成してい
る色のうち使用頻度の多い色が所定数だけ抽出される。
例えば、256色だけ抽出される。
As a result, a predetermined number of frequently used colors are extracted from the colors forming the full-color image.
For example, only 256 colors are extracted.

【0026】次に、この選択した階調の分解色を比較基
準色と定め、この比較基準色と減色対象のフルカラー画
像の各画素の分解色とを順次比較し、両者が一致した画
素の分解色は比較相手となった比較基準色に置換し、不
一致の画素の分解色は階調が最も近い比較基準色に置換
する。
Next, the separated color of the selected gradation is defined as a comparison reference color, and the comparison reference color and the separated color of each pixel of the full-color image to be subtracted are sequentially compared, and the pixels of which the both match are separated. The color is replaced with the comparison reference color which is the comparison partner, and the separated color of the mismatched pixel is replaced with the comparison reference color having the closest gradation.

【0027】これにより、減色対象のフルカラー画像の
色は、前記比較基準色の数に減色される。
As a result, the color of the full-color image to be reduced is reduced to the number of comparison reference colors.

【0028】この場合、各細分化ブロックから使用画素
数が多い階調の分解色を、各細分化ブロックにおける前
記使用階調数に応じた数だけ選択するので、例えば青系
が多い浜辺のフルカラー画像においては、青系の比較基
準色が多く選択されるので、対象のフルカラー画像の色
の特徴を反映した自然な画像となる。
In this case, since the number of separated gradation colors having a large number of pixels used from each subdivided block is selected according to the number of used gradations in each subdivided block, for example, a full color on a beach with many blues. Since many blue-based comparison reference colors are selected in the image, the image becomes a natural image that reflects the color characteristics of the target full-color image.

【0029】[0029]

【実施例】以下、本発明の一実施例を図面を用いて詳細
に説明する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be described in detail below with reference to the drawings.

【0030】図1は、本発明を実現する画像処理装置の
機能ブロックであり、フルカラー画像を入力するイメー
ジスキャナ1、入力されたフルカラー画像の各色の使用
頻度をカウントするための赤(R)、緑(G)、青
(B)の3つの明度軸から成る論理的に立体構造のRG
Bブロック(空間)2、このRGBブロックを使用して
フルカラー画像を減色するRGBブロック制御部3、減
色された減色化画像4を表示装置6に表示させるための
表示制御部5、同様に減色された減色化画像4を印刷装
置8から印刷出力させるための印刷制御部7とが設けら
れている。
FIG. 1 is a functional block of an image processing apparatus for implementing the present invention. An image scanner 1 for inputting a full-color image, a red (R) for counting the frequency of use of each color of the input full-color image, A logically structured RG consisting of three lightness axes of green (G) and blue (B)
B block (space) 2, RGB block control unit 3 for reducing the color of a full-color image using this RGB block, display control unit 5 for displaying the reduced color-reduced image 4 on the display device 6, and similarly reduced color. A print control unit 7 is provided to print out the reduced color image 4 from the printing device 8.

【0031】以下、赤、緑、青の明度が各64階調であ
り、フルカラー画像は262,144(=64×64×
64)色、目的の色数(減色化画像4)は256色の例
で説明する。
Hereinafter, the brightness of red, green, and blue is 64 gradations, and the full-color image is 262,144 (= 64 × 64 ×).
64) and the target number of colors (color-reduced image 4) will be described with an example of 256 colors.

【0032】RGBブロック2とは、赤(R)、緑
(G)、青(B)の明度を立体的な構造で表現するため
のもので、それぞれの軸が階調となり、3つの明度軸の
交点(原点)が「黒」、原点以外の頂点がそれぞれ最も
明るい赤、緑、青を表わすものとなる。すべてが最も明
るい赤、緑、青となった交点は「白」を表わすものとな
る。
The RGB block 2 is for expressing the brightness of red (R), green (G), and blue (B) in a three-dimensional structure, and each axis is a gradation and has three brightness axes. The intersection point (origin) of is black, and the vertices other than the origin represent the brightest red, green, and blue, respectively. The intersection of all bright red, green and blue represents "white".

【0033】本発明では、図2の拡大図に示すように、
RGBブロック2を8階調単位で512(=8×8×
8)個の細分化ブロック20に分割する。
In the present invention, as shown in the enlarged view of FIG.
512 (= 8 × 8 ×) of the RGB block 2 in units of 8 gradations
8) Divide into subdivided blocks 20.

【0034】このようにすると、1つの細分化ブロック
で表現可能な色数は、512(=8×8×8)色とな
る。
In this way, the number of colors that can be represented by one subdivided block is 512 (= 8 × 8 × 8).

【0035】この細分化ブロック20は、フルカラー画
像の各色の使用頻度をカウントするためのものであるの
で、具体的には、メモリを使用した階調単位のカウンタ
で構成される。
Since the subdivision block 20 is for counting the frequency of use of each color of the full-color image, it is specifically composed of a gradation unit counter using a memory.

【0036】まず、減色対象のフルカラー画像を減色す
る場合、イメージスキャナ1から対象のフルカラー画像
を入力する。
First, in the case of reducing the full-color image of the color-reduction target, the target full-color image is input from the image scanner 1.

【0037】RGBブロック制御部3は、フルカラー画
像が入力されると、そのフルカラー画像の各画素の色を
赤(R)、緑(G)、青(B)に分解し、512個の細
分化ブロック20のうち各分解色の階調に対応した細分
化ブロックにおいて階調単位に使用画素数nをカウント
させると共に、各細分化ブロック20における使用階調
数mをカウントさせる。すなわち、対象となるフルカラ
ー画像が、RGB空間の512個の各細分化ブロック2
0中で何色使用しているか、さらに、各色を何回使用し
ているかをカウントさせる。
When the full-color image is input, the RGB block control unit 3 decomposes the color of each pixel of the full-color image into red (R), green (G), and blue (B), and divides into 512 pieces. In the subdivided block corresponding to the gradation of each separated color in the block 20, the number of used pixels n is counted in gradation units, and the number of used gradations m in each subdivided block 20 is counted. That is, the target full-color image is the 512 subdivided blocks 2 in the RGB space.
The number of colors used in 0 and the number of times each color is used are counted.

【0038】この後、全体の細分化ブロック20から使
用頻度の多い階調の分解色を256個選択する。
After that, from the entire subdivided block 20, 256 separated colors having gradations that are frequently used are selected.

【0039】この場合、どの細分化ブロック20から幾
つの分解色を選択するかは、対象とするフルカラー画像
全体の色数及び画素数のうち、各々の細分化ブロック2
0での使用色数率、及び使用ドット数率により選択す
る。
In this case, how many separation colors are selected from which subdivided block 20 is selected for each subdivided block 2 among the number of colors and the number of pixels of the entire target full-color image.
Selection is made according to the used color number ratio of 0 and the used dot number ratio.

【0040】使用色数率とは、その細分化ブロックでの
使用色数(=m)/全体色数(=262,144)のこ
とであり、使用ドット数率とは、その細分化ブロックで
の使用画素数(=n)/全体画素数のことである。
The used color number ratio is the number of used colors (= m) / the total number of colors (= 262,144) in the subdivided block, and the used dot number ratio is the number of used subdivided blocks. The number of used pixels (= n) / the total number of pixels.

【0041】具体的には、使用画素数nが多い階調の分
解色を、各細分化ブロック20における使用階調数mに
応じた数だけ順次選択し、最終的には256個の分解色
を選択する。
Concretely, the number of gradation separations having a large number of used pixels n is sequentially selected by the number corresponding to the number m of gradations used in each subdivision block 20, and finally 256 separated colors are obtained. Select.

【0042】これにより、フルカラー画像を構成してい
る色のうち使用頻度の多い色が所定数だけ選択される。
例えば、256色だけ選択され、26万色が256色に
絞り込まれる。
As a result, a predetermined number of frequently used colors are selected from the colors forming the full-color image.
For example, only 256 colors are selected, and 260,000 colors are narrowed down to 256 colors.

【0043】次に、この選択した256個の階調の分解
色を比較基準色と定め、この比較基準色と減色対象のフ
ルカラー画像の各画素の分解色とを順次比較し、両者が
一致した画素の分解色は比較相手となった比較基準色に
置換し、不一致の画素の分解色は階調が最も近い比較基
準色に置換することにより、減色化画像4を生成する。
Next, the separated color of the selected 256 gradations is defined as a comparison reference color, and the comparison reference color and the separated color of each pixel of the full-color image to be subtracted are sequentially compared, and both match. The separated color of the pixel is replaced with the comparative reference color that is the comparison partner, and the separated color of the non-matching pixel is replaced with the comparative reference color having the closest gradation, thereby generating the reduced color image 4.

【0044】今、1つの細分化ブロック20においてカ
ウントした1階調単位の使用画素数nが図3の枠内の数
値で示すような分布であったとする。
Now, it is assumed that the number of used pixels n in one gradation unit counted in one subdivision block 20 has a distribution as shown by the numerical values in the frame of FIG.

【0045】なお、実際はこの細分化ブロック20は立
方体構造であるが、ここでは説明を判り易くするため
に、立方体構造ではなく平面構造で説明する。また、縦
軸は赤明度、横軸は緑明度とし、図の下から上、左から
右に進むにつれて明るくなるものとする。図の上にいく
と明るい赤に、右にいくと明るい緑になる。右斜め上に
いくと赤と緑が混ざった明るい黄色になる。
Although the subdivided block 20 actually has a cubic structure, it is described here as a planar structure instead of a cubic structure in order to make the description easy to understand. The vertical axis represents red brightness and the horizontal axis represents green brightness, and the brightness increases from the bottom to the top and from left to right in the figure. It becomes bright red at the top of the figure and bright green at the right. Going diagonally to the right, it becomes a bright yellow mixture of red and green.

【0046】細分化ブロック内の数値は、赤と緑の明る
さに対応した各階調の使用画素数nである。
The numerical value in the subdivided block is the number n of pixels used for each gradation corresponding to the brightness of red and green.

【0047】この例では、赤明度が「0」、緑明度が
「0」の明るさの色は「35」画素使用されていること
になる。また、赤明度が「5」で、緑明度が「5」の位
置の明るさの色は95画素で最も多いことになる。
In this example, the color having the brightness of "0" for the red lightness and "0" for the green lightness is "35" pixels. In addition, the color having the brightness at the position where the red lightness is "5" and the green lightness is "5" is the most in 95 pixels.

【0048】ここから使用頻度の高い順に選択すると、
「95」,「90」,「90」,「85」・・・の順と
なる。実際には細分化ブロック20は立方体なので51
2個が降順に並ぶことになり、その中から任意の個数を
前記の割り出し方法により抽出する。
From here, if selected in descending order of frequency of use,
The order is "95", "90", "90", "85" .... Actually, since the subdivision block 20 is a cube, 51
Two pieces will be arranged in descending order, and an arbitrary number of them will be extracted by the above-described indexing method.

【0049】降順な抽出方法で10個抽出した場合、図
4の符号10のような階調が選択される。この場合、明
度の明るい方に集中して抽出されている。暗い方の色は
抽出できず、256個抽出した中に色が一致しなかった
場合、近似色選択時、色がかけ離れてしまう場合があ
る。また、色が集中しているので、色の差がほとんど変
わらないものばかりが抽出される。
When 10 gradations are extracted by the descending extraction method, a gradation as indicated by reference numeral 10 in FIG. 4 is selected. In this case, the lightness is concentrated and extracted. If the darker color cannot be extracted and the 256 colors have not been matched, the colors may be separated when the approximate color is selected. In addition, since the colors are concentrated, only those whose color differences are almost the same are extracted.

【0050】RGBブロック2を用いた選択方法では、
降順に抽出はするが、抽出した色の上下左右(立体の場
合は前後も含む)は抽出済みとし、以降それらは抽出し
ないようにする。
In the selection method using the RGB block 2,
Extraction is performed in descending order, but the top, bottom, left, and right (including the front and rear in the case of a solid) of the extracted colors are already extracted, and they are not extracted thereafter.

【0051】RGBブロック2を用いた選択方法で10
個抽出した場合、図4の符号11のような階調が選択さ
れる。
10 by the selection method using the RGB block 2.
When the individual pieces are extracted, the gradation as indicated by reference numeral 11 in FIG. 4 is selected.

【0052】降順な抽出方法より、分散して色が抽出で
き、近似色選択時も色がかけ離れないで済む。
By the descending extraction method, the colors can be extracted in a dispersed manner, and the colors are not separated even when the approximate color is selected.

【0053】表示制御部5は、このようにして生成され
た減色化画像4を使用してグラフィックディスプレイ等
の表示装置6に表示する。
The display control unit 5 uses the thus generated color-reduced image 4 to display it on the display device 6 such as a graphic display.

【0054】また、印刷制御部7は、減色化画像4をカ
ラーで印刷できる印刷装置8に印刷させる。
Further, the print controller 7 causes the printing device 8 capable of printing the color-reduced image 4 in color.

【0055】以上のようにして減色対象のフルカラー画
像の色は、256個の比較基準色の数に減色される。
As described above, the color of the full-color image to be reduced is reduced to the number of 256 comparison reference colors.

【0056】この場合、各細分化ブロック20から使用
画素数が多い階調の分解色を、各細分化ブロック20に
おける前記使用階調数に応じた数だけ選択するので、例
えば青系が多い浜辺のフルカラー画像においては、青系
の比較基準色が多く選択されるので、対象のフルカラー
画像の色の特徴を反映した自然な画像となる。
In this case, since the separation colors of the gradations having a large number of used pixels are selected from each of the subdivided blocks 20 by the number corresponding to the number of the used gradations in each of the subdivided blocks 20, for example, a beach with a lot of blue colors In the full-color image, since many blue-based comparison reference colors are selected, the image becomes a natural image that reflects the color characteristics of the target full-color image.

【0057】[0057]

【発明の効果】以上のように本発明では、赤(R)、緑
(G)、青(B)の3つの明度軸からなる論理的に立体
構造のRGB空間を所定階調単位で複数の細分化ブロッ
クに分割しておき、減色対象のフルカラー画像の各画素
の色を赤(R)、緑(G)、青(B)に分解し、前記複
数の細分化ブロックのうち各分解色の階調に対応した細
分化ブロックにおいて階調単位に使用画素数をカウント
すると共に、各細分化ブロックにおける使用階調数をカ
ウントした後、各細分化ブロックから前記使用画素数が
多い階調の分解色を、各細分化ブロックにおける前記使
用階調数に応じた数だけ選択し、この選択した階調の分
解色を比較基準色と定め、この比較基準色と減色対象の
フルカラー画像の各画素の分解色とを順次比較し、両者
が一致した画素の分解色は比較相手となった比較基準色
に置換し、不一致の画素の分解色は階調が最も近い比較
基準色に置換し、減色対象のフルカラー画像の色を前記
比較基準色の数に減色するようにしたので、画像の表示
や印刷が粗くなく、自然で滑らかな見栄えのする画像が
得られる。
As described above, according to the present invention, a plurality of RGB spaces having a logical three-dimensional structure composed of three brightness axes of red (R), green (G), and blue (B) are provided in units of a predetermined gradation. The color of each pixel of the full-color image to be subjected to color reduction is divided into red (R), green (G), and blue (B) in advance and divided into subdivided blocks. The number of used pixels is counted for each gradation in the subdivision block corresponding to the gradation, the number of used gradations in each subdivision block is counted, and then the gradation having the large number of used pixels is decomposed from each subdivision block. The number of colors is selected according to the number of gradations used in each subdivision block, the separated color of the selected gradations is defined as a comparison reference color, and the comparison reference color and each pixel of the full-color image to be reduced Compare the separated colors one by one, and The color separation is replaced with the comparison reference color that is the comparison partner, the separated color of the mismatched pixel is replaced with the comparison reference color with the closest gradation, and the color of the full-color image to be reduced is reduced to the number of the comparison reference colors. As a result, the display and printing of the image are not rough, and an image with a natural and smooth appearance can be obtained.

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

【図1】本発明を実現するための画像処理装置の一実施
例を示す機能ブロック図である。
FIG. 1 is a functional block diagram showing an embodiment of an image processing apparatus for realizing the present invention.

【図2】RGBブロック(空間)の拡大図である。FIG. 2 is an enlarged view of an RGB block (space).

【図3】1つの細分化ブロックにおける使用画素数の数
値例を示す説明図である。
FIG. 3 is an explanatory diagram showing a numerical example of the number of pixels used in one subdivided block.

【図4】減色のために使用する比較基準色を選択する過
程の一例を示す説明図である。
FIG. 4 is an explanatory diagram showing an example of a process of selecting a comparison reference color used for color reduction.

【図5】減色のために使用する比較基準色を選択する過
程の他の例を示す説明図である。
FIG. 5 is an explanatory diagram showing another example of a process of selecting a comparison reference color used for color reduction.

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

1…イメージスキャナ、2…RGBブロック、3…RG
Bブロック制御部、4…減色化画像、5…表示制御部、
6…表示装置、7…印刷制御部、8…印刷装置、20…
細分化ブロック。
1 ... Image scanner, 2 ... RGB block, 3 ... RG
B block control unit, 4 ... reduced color image, 5 ... display control unit,
6 ... Display device, 7 ... Print control unit, 8 ... Printing device, 20 ...
Subdivision block.

───────────────────────────────────────────────────── フロントページの続き (72)発明者 杉江 正則 神奈川県横浜市中区尾上町6丁目81番地 日立ソフトウェアエンジニアリング株式会 社内 (72)発明者 東田 隆司 神奈川県横浜市戸塚区戸塚町5030番地 株 式会社日立製作所ソフトウェア開発本部内 ─────────────────────────────────────────────────── ─── Continued Front Page (72) Inventor Masanori Sugie 6-81, Onoe-cho, Naka-ku, Yokohama-shi, Kanagawa Hitachi Software Engineering Co., Ltd. (72) Inventor Ryuji Higada 5030 Totsuka-cho, Totsuka-ku, Yokohama-shi, Kanagawa Ceremony Company Hitachi Software Development Division

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 赤(R)、緑(G)、青(B)の3つの
明度軸からなる論理的に立体構造のRGB空間を所定階
調単位で複数の細分化ブロックに分割しておき、減色対
象のフルカラー画像の各画素の色を赤(R)、緑
(G)、青(B)に分解し、その各分解色の使用画素数
を前記複数の細分化ブロックのうち各分解色の階調に対
応した細分化ブロックにおいて階調単位にカウントする
と共に、各細分化ブロックにおける使用階調数をカウン
トした後、各細分化ブロックから前記使用画素数が多い
階調の分解色を、各細分化ブロックにおける前記使用階
調数に応じた数だけ選択し、この選択した階調の分解色
を比較基準色と定め、この比較基準色と減色対象のフル
カラー画像の各画素の分解色とを順次比較し、両者が一
致した画素の分解色は比較相手となった比較基準色に置
換し、不一致の画素の分解色は階調が最も近い比較基準
色に置換し、減色対象のフルカラー画像の色を前記比較
基準色の数に減色することを特徴とする減色方法。
1. A logically three-dimensional RGB space composed of three lightness axes of red (R), green (G), and blue (B) is divided into a plurality of subdivided blocks in predetermined gradation units. , The color of each pixel of the full-color image to be reduced is separated into red (R), green (G), and blue (B), and the number of pixels used for each separated color is the separated color of the plurality of subdivided blocks. While counting in gradation units in the subdivision block corresponding to the gradation of, the number of gradations used in each subdivision block is counted, and then the separated color of the gradation in which the number of pixels used is large from each subdivision block, A number corresponding to the number of used gradations in each subdivision block is selected, and the separated color of the selected gradation is defined as a comparison reference color, and the comparison reference color and the separated color of each pixel of the full-color image to be reduced Are sequentially compared, and the separated colors of the pixels where they match are compared. It is characterized in that the color of the full-color image to be color-reduced is reduced to the number of the comparison reference colors by replacing it with the comparison reference color that is the partner And the color reduction method.
JP6225397A 1994-09-20 1994-09-20 Color reduction method Pending JPH0887256A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP6225397A JPH0887256A (en) 1994-09-20 1994-09-20 Color reduction method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP6225397A JPH0887256A (en) 1994-09-20 1994-09-20 Color reduction method

Publications (1)

Publication Number Publication Date
JPH0887256A true JPH0887256A (en) 1996-04-02

Family

ID=16828726

Family Applications (1)

Application Number Title Priority Date Filing Date
JP6225397A Pending JPH0887256A (en) 1994-09-20 1994-09-20 Color reduction method

Country Status (1)

Country Link
JP (1) JPH0887256A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006123197A (en) * 2004-10-26 2006-05-18 Seiko Epson Corp Halftoning using pattern matrix and formation of pattern matrix
JP2010098480A (en) * 2008-10-15 2010-04-30 Nec Corp Color quantization apparatus and color quantization method
JP2010239644A (en) * 2010-05-31 2010-10-21 Seiko Epson Corp Generation device and method for generating pattern matrix, computer program, and recording medium
JP2012242466A (en) * 2011-05-17 2012-12-10 Advan International Corp Mobile medical monitor provided with battery pack

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006123197A (en) * 2004-10-26 2006-05-18 Seiko Epson Corp Halftoning using pattern matrix and formation of pattern matrix
JP4548090B2 (en) * 2004-10-26 2010-09-22 セイコーエプソン株式会社 Image processing apparatus, image processing method, computer program, and printing apparatus
JP2010098480A (en) * 2008-10-15 2010-04-30 Nec Corp Color quantization apparatus and color quantization method
JP2010239644A (en) * 2010-05-31 2010-10-21 Seiko Epson Corp Generation device and method for generating pattern matrix, computer program, and recording medium
JP2012242466A (en) * 2011-05-17 2012-12-10 Advan International Corp Mobile medical monitor provided with battery pack

Similar Documents

Publication Publication Date Title
US5103407A (en) Apparatus and method for color selection
US5278678A (en) Color table display for interpolated color and anti-aliasing
EP0359080B1 (en) A display using ordered dither
US6961064B2 (en) System and method for combining graphics formats in a digital video pipeline
US5204665A (en) Color editing with simple encoded images
EP0420391A2 (en) Colour tone generator
JPH1169156A (en) Image processor
EP0477904B1 (en) Method and apparatus for generating images of reduced size
JPH0887256A (en) Color reduction method
JP4174133B2 (en) Image generation method
EP0817122A2 (en) Filter and raster operations
JPH027091A (en) Color display system
JP2847740B2 (en) Coloring method for achromatic objects
JPH07129141A (en) Color reduction system
GB2352950A (en) Image superposition including transparency and translucency parameters
JPH05324786A (en) Device for generating color image
JPH1074248A (en) Color reduction device and color reduction method
JP2795083B2 (en) Creating the same material appearance image in image processing
JPH06180573A (en) Image forming method
JPH03113682A (en) Picture processor
JPH05334410A (en) Method for displaying color image
JPH03289267A (en) Intermediate tone picture data display system
JPH07234661A (en) Method and device for displaying color image
CN114723602A (en) Image processing method, image processing apparatus, terminal, and readable storage medium
JPH05204348A (en) Color image color changing processing system and color image synthesizing processing system