JP3423157B2 - Image processing device - Google Patents

Image processing device

Info

Publication number
JP3423157B2
JP3423157B2 JP24125896A JP24125896A JP3423157B2 JP 3423157 B2 JP3423157 B2 JP 3423157B2 JP 24125896 A JP24125896 A JP 24125896A JP 24125896 A JP24125896 A JP 24125896A JP 3423157 B2 JP3423157 B2 JP 3423157B2
Authority
JP
Japan
Prior art keywords
color
histogram
image data
image processing
division
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP24125896A
Other languages
Japanese (ja)
Other versions
JPH1063242A (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.)
Ricoh Co Ltd
Original Assignee
Ricoh Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP24125896A priority Critical patent/JP3423157B2/en
Publication of JPH1063242A publication Critical patent/JPH1063242A/en
Application granted granted Critical
Publication of JP3423157B2 publication Critical patent/JP3423157B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は画像処理装置に関
し、特に減色処理機能を有する画像処理装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an image processing apparatus, and more particularly to an image processing apparatus having a color reduction processing function.

【0002】[0002]

【従来の技術】従来の画像処理装置が有するカラー多値
データの減色処理手段は、大きく二つに分けられる。第
1の減色処理手段は、入力した画像データからヒストグ
ラムを作成し、使用頻度の高い色を抽出し、その近辺に
補間色を多く割り当て減色処理を施す手法又は画素が分
布しているRGB3次元の色空間を部分空間に分割して
頻度の高い部分から代表色を抽出して同じく補間色を割
り当てるなどして目標色数まで減色処理を施す手法等を
有し、第2の減色処理手段は、レッド(R)、グリーン
(G)及びブルー(B)各色に対してヒストグラムを作
成し出現頻度を求め、頻度の高い色を抽出して元データ
に関連付けて配色する減色方法又は色距離の近い画素を
併合して減色処理を施す手法等を有する。これらの減色
処理手段は画像処理機能を有するデバイス全般に応用さ
れる。
2. Description of the Related Art Color reduction processing means for color multi-valued data included in a conventional image processing apparatus is roughly classified into two types. The first color-reduction processing means creates a histogram from the input image data, extracts a color that is frequently used, allocates many interpolated colors in the vicinity thereof, and performs color-reduction processing, or an RGB three-dimensional method in which pixels are distributed. The second color reduction processing means has a method of performing color reduction processing up to a target color number by dividing a color space into subspaces, extracting representative colors from high-frequency portions, and assigning interpolation colors in the same manner. A color reduction method for creating a histogram for each color of red (R), green (G), and blue (B), obtaining the appearance frequency, extracting a high-frequency color, and associating the color with the original data, or a pixel with a short color distance And a method of performing color reduction processing. These color reduction processing means are applied to all devices having an image processing function.

【0003】[0003]

【発明が解決しようとする課題】上記第1の減色処理手
段においては、入力データの出現頻度の高い色を正確に
知ることが可能であるが、データ量に無関係に入力デー
タの色数を格納するための大容量のメモリが必要であ
り、これに伴う計算も長時間必要であるという問題点を
有する。また第2の減色手段においては、第1の減色手
段よりはメモリ容量が少なくてすむが、入力画像データ
において使用頻度が低い色を抽出してしまう可能性があ
るという問題点を有する。
In the first color-reduction processing means, it is possible to accurately know the color that frequently appears in the input data, but the number of colors of the input data is stored regardless of the amount of data. There is a problem that a large capacity memory for doing so is required and the calculation accompanying this is also required for a long time. In addition, the second color-reducing means has a smaller memory capacity than the first color-reducing means, but has a problem that colors that are less frequently used may be extracted from the input image data.

【0004】本発明は上記問題点に鑑みなされたもので
その目的とするところは、減色処理を行なうときに割り
当てられるメモリの節約、減色処理速度の向上及び減色
処理を行なった後の良好な色再現を連立をすることので
きる画像処理装置を提供することにある。
The present invention has been made in view of the above problems, and it is an object of the present invention to save the memory allocated when performing color reduction processing, improve the color reduction processing speed, and obtain good colors after color reduction processing. An object of the present invention is to provide an image processing device capable of simultaneous reproduction.

【0005】減色前の元の画像データのヒストグラムに
おいて、画素値が非常に狭い帯域に集中するような場合
などでも各原色の分割数nの値によって色区分テーブル
数が目標減色数未満にならず使用頻度の高い色を代表色
として抽出することができ、十分にメモリの節約が可能
画像処理装置を提供することを目的とする。
In the histogram of the original image data before color reduction
When the pixel values are concentrated in a very narrow band
Representative color frequently used colors color classification number table by the value of the division number n of each primary color is not less than the target decrease the number of colors in such
Can be extracted as and save enough memory
It is an object of the present invention to provide a simple image processing device.

【0006】また、データ参照及び計算時間を短縮する
ことのできる画像処理装置を提供することを目的とす
る。
It is another object of the present invention to provide an image processing apparatus which can reduce data reference and calculation time.

【0007】さらに、画素値の最大・最小値を減色処理
を行なった後の画像データに加えることで、減色後のデ
ィザ、誤差拡散といった画像処理の効力を有効にするこ
とのできる画像処理装置を提供することを目的とする。
Furthermore, by adding the maximum / minimum pixel values to the image data after the color reduction processing, an image processing apparatus capable of making effective the effect of the image processing such as dither after color reduction and error diffusion is provided. The purpose is to provide.

【0008】[0008]

【課題を解決するための手段】請求項1の発明は、原稿
をカラー多値画像データとして読み取る読取手段と、前
記画像データを記憶する記憶手段と、レッド、グリーン
及びブルーそれぞれの色に対する画像データ毎にヒスト
グラムを作成する第1のヒストグラム作成手段と、を有
する画像処理装置において、前記第1のヒストグラム作
成手段により作成されたレッド、グリーン及びブルーそ
れぞれのヒストグラムの画素レンジを分割レンジに分割
する分割手段と、前記分割レンジ内で最も頻度の高い画
素要素を選択する第1の選択手段と、前記レッド、グリ
ーン及びブルー各色の分割レンジを組み合わせて色区分
テーブルを作成する第1のテーブル作成手段と、分配さ
れたカラー多値画像データの値の出現頻度の多い色区分
テーブルで使用されている各色分割レンジのレンジを分
割して第2の色区分テーブルを作成する第2のテーブル
作成手段と、前記第のテーブル作成手段で作成した色
区分テーブルにカラー多値画像データの値を分配し、分
配されたカラー多値画像データの値の出現頻度の多い色
区分テーブルを順に要求された数だけ抽出する抽出手段
と、前記抽出手段で抽出された色区分テーブルの各レッ
ド、グリーン及びブルー各色の分割レンジに前記第1の
選択手段で選択されたその分割レンジの画素要素を割り
付けてその分割レンジの代表色として抽出する代表色抽
出手段とを有することを特徴とする画像処理装置であ
According to a first aspect of the present invention, there is provided a reading means for reading a document as color multi-valued image data, a storage means for storing the image data, and image data for each color of red, green and blue. An image processing apparatus having a first histogram creating unit for creating a histogram for each of the red, green and blue histograms created by the first histogram creating unit. Means, first selecting means for selecting a pixel element having the highest frequency in the division range, and first table creating means for producing a color division table by combining the division ranges of the red, green and blue colors. , Distributed
Color classification with high frequency of occurrence of values in multi-valued color image data
The range of each color division range used in the table is divided
A second table that divides to create a second color classification table
And creating means, the color classification table created in the second table creation means divides the value of the color multi-value image data, requests the occurrence frequency of large color classification table of the distributed values of the color multi-value image data in the order And a pixel element of the division range selected by the first selection means is allocated to each red, green and blue color division range of the color division table extracted by the extraction means. An image processing apparatus characterized by having a representative color extracting means for extracting as a representative color of the divided range.
It

【0009】[0009]

【0010】請求項記載の発明は、請求項に記載の
発明において、前記画像データの各主走査線上の任意の
画素を抽出してその画素についてレッド、グリーン及び
ブルー各色のヒストグラムを作成する第2のヒストグラ
ム作成手段を有することを特徴とする画像処理装置であ
According to a second aspect of the present invention, in the first aspect of the present invention, an arbitrary pixel on each main scanning line of the image data is extracted and a red, green and blue color histogram is created for the pixel. An image processing apparatus having a second histogram creating means.
It

【0011】請求項記載の発明は、請求項に記載の
発明において、前記画像データの各副走査線上の任意の
画素を抽出してその画素についてレッド、グリーン及び
ブルー各色のヒストグラムを作成する第3のヒストグラ
ム作成手段を有することを特徴とする画像処理装置であ
According to a third aspect of the present invention, in the first aspect of the present invention, an arbitrary pixel on each sub-scanning line of the image data is extracted, and a histogram of each color of red, green and blue is created for the pixel. An image processing apparatus having a third histogram creating means.
It

【0012】請求項記載の発明は、請求項1から
いずれか1項に記載の発明において、前記代表色として
各色の画素レンジにおける最大値、及び最小値を選択す
る第2の選択手段を有することを特徴とする画像処理装
置である
[0012] The invention of claim 4, wherein, in the invention according to any one of claims 1 to 3, the maximum value of each color pixel range as the representative color, and a second selecting means for selecting a minimum value Image processing device characterized by having
It is a place .

【0013】[0013]

【発明の実施の形態】以下、図面を参照して本発明に係
る画像処理装置の一実施形態を説明する。
BEST MODE FOR CARRYING OUT THE INVENTION An embodiment of an image processing apparatus according to the present invention will be described below with reference to the drawings.

【0014】図2、図3及び図4はこの画像処理装置が
作成するヒストグラムであり、図2は色の3原色である
R、G及びBのうちのR成分のヒストグラムを表し、図
3はG成分のヒストグラムを表し、図4はB成分のヒス
トグラムを表す。
2, FIG. 3 and FIG. 4 are histograms created by this image processing apparatus, FIG. 2 is a histogram of the R component of R, G and B which are the three primary colors of colors, and FIG. FIG. 4 shows a histogram of G component, and FIG. 4 shows a histogram of B component.

【0015】各図において横軸は階調度数を表してお
り、この図では画素レンジとしての横軸を8等分してい
る。この等分する個数は後述する値nによって決まり、
いまの場合はn=8である。もちろん8以外の数でもよ
い。この各等分間隔を分割レンジという。
In each figure, the horizontal axis represents the gradation frequency, and in this figure, the horizontal axis as the pixel range is divided into eight equal parts. The number of equal parts is determined by the value n described later,
In this case, n = 8. Of course, a number other than 8 may be used. These equal intervals are called division ranges.

【0016】また縦軸は画素の出現頻度を示している。
図2において画素レンジを8個に分割している分割レン
ジは各々R1、R2、R3、・・・、R8に対応してい
る。例えば1画素を3つの各色毎に8ビットを用いて計
24ビットで表すことにすると、Rは8ビット幅、即ち
256階調の画素レンジで表される。したがってこの場
合には分割レンジR1は0〜31、R2は32〜63、
R3は64〜95、R4は96〜127、R5は128
〜159、R6は160〜191、R7は192〜22
3、R8は224〜255の範囲に該当する。
The vertical axis indicates the frequency of appearance of pixels.
In FIG. 2, the pixel range is divided into eight, and the divided ranges correspond to R1, R2, R3, ..., R8, respectively. For example, if one pixel is represented by a total of 24 bits by using 8 bits for each of the three colors, R is represented by an 8-bit width, that is, a pixel range of 256 gradations. Therefore, in this case, the division range R1 is 0 to 31, R2 is 32 to 63,
R3 is 64-95, R4 is 96-127, R5 is 128
~ 159, R6 is 160-191, R7 is 192-22
3 and R8 correspond to the range of 224 to 255.

【0017】また、各分割レンジで最も頻度の高い画素
要素の階調度数は矢印で示されており、R1〜R8それ
ぞれの分割レンジにおける最高頻度の階調度数はそれぞ
れ〜の矢印で示される階調度数である。図3及び図
4も図2と同様にG1〜G8及びB1〜B8の分割レン
ジにより画素レンジが分割されており、矢印により各分
割レンジで最も頻度の高い画素要素の階調度数が示され
ている。
Further, the gradation frequency of the pixel element having the highest frequency in each divided range is indicated by an arrow, and the highest frequency gradation degree in each of the divided ranges R1 to R8 is indicated by an arrow. It is a frequency. 3 and 4, the pixel range is divided by the division ranges G1 to G8 and B1 to B8 as in FIG. 2, and the arrow indicates the gradation frequency of the pixel element with the highest frequency in each division range. There is.

【0018】図5はRGBヒストグラムの例である。こ
のRGBヒストグラムは図2、図3及び図4に示される
分割レンジR1〜R8、G1〜G8及びB1〜B8を組
み合わせた8×8×8=512通りの色区分テーブル上
の画素の出現頻度をグラフ化したものである。前記の値
512は上記nの3乗となる。目標減色数が例えば25
6である場合には、前記512個の色区分テーブルのう
ち高頻度の上位256にある色区分テーブルを抽出し、
その色区分に対応したパレットを作成する。
FIG. 5 is an example of an RGB histogram. This RGB histogram shows the frequency of appearance of pixels on the color division table of 8 × 8 × 8 = 512 combinations of the division ranges R1 to R8, G1 to G8 and B1 to B8 shown in FIGS. 2, 3 and 4. It is a graph. The value 512 is the cube of n. The target color reduction number is 25
In the case of 6, the color division table in the high-order upper 256 of the 512 color division tables is extracted,
Create a palette corresponding to that color category.

【0019】図6、図7及び図8もヒストグラムの例で
ある。図5において、説明を簡略化するため仮にR1G
1B1、R1G2B1、R1G3B1、R1G4B1及
びR8G8B8の5テーブルが全色区分テーブルの中で
高頻度の上位テーブルであるとし、その他の色区分テー
ブルはこのテーブルに対して極端に頻度が低いテーブル
であるとする。図6、図7及び図8は上記5テーブルの
各RGB成分の分割レンジをさらにn=2として分割し
た分割レンジに対するヒストグラムである。それぞれの
分割レンジにおける最高頻度の階調度数はそれぞれ〜
の矢印で示される階調度数である。r1、r2は色区
分テーブルR1G1B1におけるレンジR1を分割する
レンジであり、r3、r4は色区分テーブルR1G2B
1におけるレンジR1を分割するレンジであり、他も同
様である。このヒストグラム図6、図7及び図8から上
記の方法と同様な方法で色区分テーブルから新たな色区
分テーブル++を作成する。ここでは5つの色区分テー
ブルの各色成分を分割したが、もちろん任意の数の色区
分テーブルも同様な方法で分割できる。そしてこれらを
分割する個数も変えることができる。
FIGS. 6, 7 and 8 are also examples of histograms. In FIG. 5, in order to simplify the explanation, it is assumed that R1G
It is assumed that the 5 tables 1B1, R1G2B1, R1G3B1, R1G4B1 and R8G8B8 are high-ranking high-rank tables among all color classification tables, and the other color classification tables are extremely low-frequency tables. . FIGS. 6, 7 and 8 are histograms for the division ranges obtained by further dividing the division range of each RGB component of the above-mentioned 5 tables with n = 2. The highest frequency gradation in each divided range is ~
Is the gradation frequency indicated by the arrow. r1 and r2 are ranges that divide the range R1 in the color classification table R1G1B1, and r3 and r4 are color classification tables R1G2B.
It is a range that divides the range R1 in 1 and the other is the same. A new color division table ++ is created from the color division table by the same method as the above method from the histograms FIG. 6, FIG. 7 and FIG. Here, each color component of the five color division tables is divided, but of course any number of color division tables can be divided in the same manner. The number of divisions of these can also be changed.

【0020】図9、図10及び図11は抽出画素を選択
するパターンを示す図の例で、各図において黒く塗り潰
された画素1、2及び3が抽出される画素である。図9
は主走査線方向の各ラインにおいて偶数番目の画素を抽
出することを示している。図10は、主走査線方向の各
ラインにおいて、そのラインが副走査方向において奇数
番目のラインである場合には偶数番目の画素を抽出し、
そのラインが副走査方向において偶数番目のラインであ
る場合には奇数番目の画素を抽出することを示してい
る。図11は副走査方向の各ラインにおいて奇数番目の
画素を抽出していることを示している。もちろん、上記
以外の抽出パターンで画素を抽出しても良い。
FIG. 9, FIG. 10 and FIG. 11 are examples of diagrams showing patterns for selecting extracted pixels, and pixels 1, 2, and 3 filled with black in each drawing are pixels to be extracted. Figure 9
Indicates that even-numbered pixels are extracted in each line in the main scanning line direction. In FIG. 10, in each line in the main scanning line direction, if the line is an odd numbered line in the sub scanning direction, even numbered pixels are extracted,
If the line is an even-numbered line in the sub-scanning direction, it indicates that odd-numbered pixels are extracted. FIG. 11 shows that odd-numbered pixels are extracted in each line in the sub-scanning direction. Of course, the pixels may be extracted by an extraction pattern other than the above.

【0021】図1は、この画像処理装置の動作を説明す
るフローチャートである。
FIG. 1 is a flow chart for explaining the operation of this image processing apparatus.

【0022】減色対象画像の各画素に対して、全画素を
抽出するのか又は例えば図9、図10又は図11に示さ
れるように特定の画素を抽出するのかを決定し(ステッ
プS1101)、全抽出画素(データ)数Dを算出し
(ステップS1102)、データ数のカウンタdを初期
化する(ステップS1103)。
For each pixel of the color-reduction target image, it is determined whether all pixels are extracted or a specific pixel is extracted as shown in FIG. 9, FIG. 10 or FIG. 11 (step S1101), and all pixels are extracted. The number of extracted pixels (data) D is calculated (step S1102), and the data number counter d is initialized (step S1103).

【0023】ステップS1104で色区分テーブル++
が作成されているか否かを判断し、まだ色区分テーブル
++が作成(ステップS1117)されていない場合
(No)には、nを決定する(ステップS1105)。
nはR、G及びBの各成分におけるヒストグラムの分割
レンジ幅、及びこれら分割レンジを組み合せて作成され
る色区分テーブルのテーブル数を決定する数値であり、
減色対象画像の色数、データ量及び目標減色数などを考
慮して任意の値が決定される(ステップS1105)。
また、nの3乗個の色区分テーブルを作成しておき(ス
テップS1106)ヒストグラム化できるように準備
し、ステップS1107に移行する。
In step S1104, the color classification table ++
Is created, and if the color classification table ++ has not been created (step S1117) (No), n is determined (step S1105).
n is a numerical value that determines the division range width of the histogram for each of the R, G and B components, and the number of color division tables created by combining these division ranges,
An arbitrary value is determined in consideration of the number of colors of the color reduction target image, the data amount, the target number of color reductions, and the like (step S1105).
In addition, n cubed color division tables have been created (step S1106) and prepared so as to form a histogram, and the process proceeds to step S1107.

【0024】ステップS1104において色区分テーブ
ル++が既に作成されていると判断された場合には(Y
es)、ステップS1107に移行する。ステップS1
107においてデータ数カウンタdが全抽出画素数Dと
等しくなっているか否かを判断し、等しくない場合(N
o)には、以前に取り出していない画素を1つを取り出
し参照する(ステップS1108)。次にステップS1
109で色区分テーブル++が作成されているか否かを
判断し、新たな色区分テーブル++が作成されている場
合(Yes)には、ステップS1113に移行する。ま
だ色区分テーブル++が作成されていない場合(No)
には、図2に示されるようなヒストグラムを作成するた
めにそのR成分をRヒストグラムへ(ステップS111
0)、図3に示されるようなヒストグラムを作成するた
めにG成分をGヒストグラムへ(ステップS111
1)、図4に示されるようなヒストグラムを作成するた
めにB成分をBヒストグラムへ(ステップS1112)
追加する。また、RGBの各値の組み合わせを、既に作
成された色区分テーブルの中で該当するテーブルに追加
してRGBヒストグラムを作成してゆく(ステップS1
113)。以上の動作後にdをインクリメントする(ス
テップS1114)。ステップS1108〜ステップS
1114までの動作をd=Dとなるまで繰り返す。
If it is determined in step S1104 that the color classification table ++ has already been created (Y
es), and proceeds to step S1107. Step S1
In 107, it is judged whether or not the data number counter d is equal to the total number D of extracted pixels.
In (o), one pixel that has not been extracted before is extracted and referred to (step S1108). Next step S1
In 109, it is determined whether or not the color classification table ++ has been created, and when a new color classification table ++ has been created (Yes), the process proceeds to step S1113. If the color classification table ++ has not been created yet (No)
In order to create a histogram as shown in FIG. 2, the R component is converted into an R histogram (step S111).
0), the G component is converted into a G histogram to create a histogram as shown in FIG. 3 (step S111).
1), the B component is converted into a B histogram to create a histogram as shown in FIG. 4 (step S1112).
to add. Further, the RGB histogram is created by adding the combination of the RGB values to the corresponding table in the already created color classification table (step S1).
113). After the above operation, d is incremented (step S1114). Step S1108 to Step S
The operations up to 1114 are repeated until d = D.

【0025】ステップS1107で判断した結果d=D
となった場合(Yes)、作成されたRGBヒストグラ
ムの各色区分テーブルから最も頻度の高い未抽出の色区
分テーブルを一つ抽出(ステップS1115)する。ス
テップS1116において抽出した色区分テーブルの合
計が目標減色数に達しているか否かを判断して、抽出し
た色区分テーブルの合計が目標減色数に達していない場
合(No)にはステップS1117に移行する。抽出し
た色区分テーブルの合計が目標減色数に達している場合
(Yes)にはステップS1119に移行する。ステッ
プS1117において未抽出の色区分テーブル数が0で
あるか否かを判断し、未抽出の色区分テーブル数が0で
ない場合(No)にはステップS1115に移行して頻
度の高いテーブルを抽出し、抽出した色区分テーブル数
の合計が目標減色数に達するまでステップS1115か
らステップS1117までの動作を繰り返す。ステップ
S1117で判断した結果、未抽出の色区分テーブル数
が0となった場合(Yes)、ステップS1118に移
行する。
Result determined in step S1107 d = D
If (Yes), one unextracted color division table with the highest frequency is extracted from each color division table of the created RGB histogram (step S1115). It is determined whether or not the total of the color division tables extracted in step S1116 has reached the target color reduction number. If the total of the extracted color division tables has not reached the target color reduction number (No), the process proceeds to step S1117. To do. When the total of the extracted color classification tables has reached the target number of color reductions (Yes), the process proceeds to step S1119. In step S1117, it is determined whether or not the number of unextracted color division tables is 0, and if the number of unextracted color division tables is not 0 (No), the process proceeds to step S1115 to extract a frequently used table. The operations from step S1115 to step S1117 are repeated until the total number of extracted color classification tables reaches the target number of color reductions. If the number of unextracted color classification tables is 0 as a result of the determination in step S1117 (Yes), the process proceeds to step S1118.

【0026】ステップS1118の動作は、抽出した色
区分テーブルの合計数が目標減色数に達する前に未抽出
の色区分テーブルがなくなってしまった場合の動作であ
り、、そのなくなる前までに抽出された色区分テーブル
の各RGB成分を図6,図7及び図8に示されるように
さらに細分化して組み合わせ、新たな色区分テーブル+
+を作成する(ステップS1118)。このテーブルに
はステップS1101〜ステップS1103までの動作
を繰り返した後、d=D(ステップS1107)となる
までステップS1108,ステップS1113及びステ
ップS1114の動作を繰り返す。このとき、ステップ
S1110〜ステップS1112の動作は色区分テーブ
ルのチェックルーチン(ステップS1109)により省
略される。
The operation of step S1118 is an operation when there is no unextracted color division table before the total number of the extracted color division tables reaches the target number of color reductions, and the operation is performed before that time. Each RGB component of the color classification table is further subdivided and combined as shown in FIGS. 6, 7 and 8 to obtain a new color classification table +
+ Is created (step S1118). After repeating the operations of steps S1101 to S1103 for this table, the operations of steps S1108, S1113 and S1114 are repeated until d = D (step S1107). At this time, the operations of steps S1110 to S1112 are omitted by the color classification table check routine (step S1109).

【0027】目標減色数だけ色区分テーブルを取得(ス
テップS1116)した後、ステップS1119におい
て各成分の最大・最小値で組み合わされた色区分テーブ
ルを使用するか否かを判断し、使用しない場合(No)
には、抽出した各色区分テーブルにおいて、各色区分テ
ーブルの中で最も出現頻度の高いR、G及びB成分をヒ
ストグラムから抽出し、これを色区分テーブルの代表色
として割り当てて減色パレットを作成し(ステップS1
120)、動作を終える。これにより作成されたパレッ
トを減色処理時に使用する。
After obtaining the color division tables for the target number of color reductions (step S1116), it is determined in step S1119 whether or not the color division table combined with the maximum / minimum value of each component is used. No)
In the extracted color segmentation table, the R, G, and B components that have the highest frequency of appearance in each color segmentation table are extracted from the histogram and are assigned as the representative colors of the color segmentation table to create a color reduction palette ( Step S1
120) and the operation ends. The palette thus created is used during the color reduction process.

【0028】ステップS1119の判断において各成分
の最大・最小値で組み合わされた色区分テーブルを使用
する場合(Yes)には、このテーブルを作成する(ス
テップS1121)。例えばRGBの成分が各色8ビッ
トで表される場合には1成分0〜255の256階調で
あるため、(R,G,B)テーブルは、(0,0,
0)、(0,0,255)、(0,255,0)、
(0,255,255)、(255,0,0)、(25
5,0,255)、(255,255,0)及び(25
5,255,255)の8通りのテーブルが作成され
る。
When the color division table combined with the maximum and minimum values of each component is used in the determination of step S1119 (Yes), this table is created (step S1121). For example, when RGB components are represented by 8 bits for each color, since there are 256 gradations of 1 component to 255, the (R, G, B) table is (0, 0,
0), (0,0,255), (0,255,0),
(0,255,255), (255,0,0), (25
5,0,255), (255,255,0) and (25
5, 255, 255) are created.

【0029】ステップS1115からステップS111
7までの動作により抽出された色区分テーブルの中で頻
度の低い色区分テーブルを、ステップS1121で作成
された色区分テーブルの数だけ差し引いたテーブルA
と、ステップS1121で作成された色区分テーブルB
を合わせた色区分テーブルに対して、各色区分テーブル
の中で最も頻度の高いR、G及びB成分をヒストグラム
から抽出し、これを各色区分テーブルの代表色として割
り当て(ステップS1122)、減色パレットを作成
し、動作を終える。
Steps S1115 to S111
Table A obtained by subtracting the infrequent color segment table among the color segment tables extracted by the operations up to 7 by the number of color segment tables created in step S1121.
And the color classification table B created in step S1121
With respect to the color segmentation table in which each of the color segmentation tables is combined, the most frequent R, G, and B components in each color segmentation table are extracted from the histogram, and this is assigned as the representative color of each color segmentation table (step S1122), and the color reduction palette is set. Create and finish the operation.

【0030】[0030]

【発明の効果】上記の説明から明らかなように、RGB
各色別のヒストグラムを各々分割して組み合わせて色区
分テーブルを作成することにより、分割しないで組み合
わされたテーブルに対して非常に少ないメモリの割り当
てで済ませることができる。またこのテーブルのヒスト
グラムからは元の画像データのRGBの強度比率を知る
ことができ、これを参考に減色するため比較的劣化の少
ない減色画像データを作成することができる。
As is apparent from the above description, RGB
By dividing each histogram for each color and combining them to create a color division table, it is possible to allocate a very small memory to the combined table without dividing. Also, the RGB intensity ratio of the original image data can be known from the histogram of this table, and since color reduction is performed with reference to this, it is possible to create reduced color image data with relatively little deterioration.

【0031】また、減色前の元の画像データのヒストグ
ラムにおいて、画素値が非常に狭い帯域に集中するよう
な場合、例えば、単色のグラデーション等の減色におい
ても、使用頻度の高い色を代表色として抽出することが
できる。
Further, in the histogram of the original image data before color reduction, when pixel values are concentrated in a very narrow band, for example, even in color reduction such as monochromatic gradation, a color that is frequently used is used as a representative color. Can be extracted.

【0032】また、大容量データの画像を減色する場合
において、データの参照時間及び計算時間を短縮するこ
とができる。また元の画像データを再度参照するため効
果がある。
Further, in the case of reducing the color of an image of a large amount of data, the data reference time and calculation time can be shortened. Further, it is effective because the original image data is referenced again.

【0033】さらに、減色後にディザ又は誤差拡散等の
画像処理を施す場合には、元画像が画素値が非常に狭い
帯域に集中するような画像である場合に対してはより階
調をつけることができるため画像処理の効果を上げるこ
とができる。
Further, when image processing such as dithering or error diffusion is performed after color reduction, more gradation is added when the original image is an image in which pixel values are concentrated in a very narrow band. Therefore, the effect of image processing can be improved.

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

【図1】本発明に係る画像処理装置の動作を示すフロー
チャートである。
FIG. 1 is a flowchart showing an operation of an image processing apparatus according to the present invention.

【図2】本発明に係る画像処理装置が作成するR成分の
ヒストグラムである。
FIG. 2 is a histogram of the R component created by the image processing apparatus according to the present invention.

【図3】本発明に係る画像処理装置が作成するG成分の
ヒストグラムである。
FIG. 3 is a histogram of a G component created by the image processing apparatus according to the present invention.

【図4】本発明に係る画像処理装置が作成するB成分の
ヒストグラムである。
FIG. 4 is a B component histogram created by the image processing apparatus according to the present invention.

【図5】本発明に係る画像処理装置が作成するR、G、
Bの各画素レンジを組み合わせたレンジに対するヒスト
グラムである。
FIG. 5 is a diagram showing R, G, and
It is a histogram with respect to the range which combined each pixel range of B.

【図6】本発明に係る画像処理装置が作成するR成分の
ヒストグラムである。
FIG. 6 is a histogram of the R component created by the image processing apparatus according to the present invention.

【図7】本発明に係る画像処理装置が作成するG成分の
ヒストグラムである。
FIG. 7 is a G component histogram created by the image processing apparatus according to the present invention.

【図8】本発明に係る画像処理装置が作成するB成分の
ヒストグラムである。
FIG. 8 is a B component histogram created by the image processing apparatus according to the present invention.

【図9】画像上の抽出する画素を示す図である。FIG. 9 is a diagram showing pixels to be extracted on an image.

【図10】画像上の抽出する画素を示す図である。FIG. 10 is a diagram showing pixels to be extracted on an image.

【図11】画像上の抽出する画素を示す図である。FIG. 11 is a diagram showing pixels to be extracted on an image.

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

1,2,3 抽出する画素 Pixels to extract

───────────────────────────────────────────────────── フロントページの続き (58)調査した分野(Int.Cl.7,DB名) G06T 5/00 - 5/50 H04N 1/40 H04N 1/46 G09G 5/02 - 5/06 ─────────────────────────────────────────────────── ─── Continuation of front page (58) Fields surveyed (Int.Cl. 7 , DB name) G06T 5/00-5/50 H04N 1/40 H04N 1/46 G09G 5/02-5/06

Claims (4)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 原稿をカラー多値画像データとして読み
取る読取手段と、前記画像データを記憶する記憶手段
と、レッド、グリーン及びブルーそれぞれの色に対する
画像データ毎にヒストグラムを作成する第1のヒストグ
ラム作成手段と、を有する画像処理装置において、 前記第1のヒストグラム作成手段により作成されたレッ
ド、グリーン及びブルーそれぞれのヒストグラムの画素
レンジを分割レンジに分割する分割手段と、 前記分割レンジ内で最も頻度の高い画素要素を選択する
第1の選択手段と、 前記レッド、グリーン及びブルー各色の分割レンジを組
み合わせて色区分テーブルを作成する第1のテーブル作
成手段と、分配されたカラー多値画像データの値の出現頻度の多い
色区分テーブルで使用されている各色分割レンジのレン
ジを分割して第2の色区分テーブルを作成する第2のテ
ーブル作成手段と、 前記第のテーブル作成手段で作成した色区分テーブル
にカラー多値画像データの値を分配し、分配されたカラ
ー多値画像データの値の出現頻度の多い色区分テーブル
を順に要求された数だけ抽出する抽出手段と、 前記抽出手段で抽出された色区分テーブルの各レッド、
グリーン及びブルー各色の分割レンジに前記第1の選択
手段で選択されたその分割レンジの画素要素を割り付け
てその分割レンジの代表色として抽出する代表色抽出手
段とを有することを特徴とする画像処理装置。
1. A reading means for reading an original as color multi-valued image data, a storage means for storing the image data, and a first histogram creation for creating a histogram for each image data for each color of red, green and blue. In the image processing device having means, dividing means for dividing the pixel range of each of the red, green and blue histograms created by the first histogram creating means into divided ranges; First selection means for selecting a high pixel element, first table creation means for creating a color classification table by combining the division ranges of the red, green and blue colors, and the value of the distributed color multi-valued image data Frequently appears
The range of each color division range used in the color division table
The second table for creating the second color classification table by dividing the
And Buru creating means, the color classification table created in the second table creation means divides the value of the color multi-value image data, sequentially a frequency of greater color classification table of the distributed values of the color multi-value image data Extraction means for extracting the required number, each red of the color classification table extracted by the extraction means,
Image processing, characterized in that it has a representative color extracting means for allocating pixel elements of the divided range selected by the first selecting means to the divided ranges of green and blue and extracting them as representative colors of the divided range. apparatus.
【請求項2】 前記画像データの各主走査線上の任意の
画素を抽出してその画素についてレッド、グリーン及び
ブルー各色のヒストグラムを作成する第2のヒストグラ
ム作成手段を有することを特徴とする請求項1に記載の
画像処理装置。
2. Any of the main scanning lines of the image data
Pixel extraction and red, green and
The second histogram that creates a histogram for each blue color
The system according to claim 1, further comprising a program creating unit.
Image processing device.
【請求項3】 前記画像データの各副走査線上の任意の
画素を抽出してその画素についてレッド、グリーン及び
ブルー各色のヒストグラムを作成する第3のヒストグラ
ム作成手段を有することを特徴とする請求項1に記載の
画像処理装置。
3. An arbitrary line on each sub-scanning line of the image data
Pixel extraction and red, green and
The third histogram that creates a histogram for each blue color
The system according to claim 1, further comprising a program creating unit.
Image processing device.
【請求項4】 前記代表色として各色の画素レンジにお
ける最大値、及び最小値を選択する第2の選択手段を有
することを特徴とする請求項1から3のいずれか1項に
記載の画像処理装置。
4. The pixel range of each color as the representative color
Has a second selecting means for selecting the maximum value and the minimum value.
The method according to any one of claims 1 to 3, characterized in that
The image processing device described.
JP24125896A 1996-08-23 1996-08-23 Image processing device Expired - Fee Related JP3423157B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP24125896A JP3423157B2 (en) 1996-08-23 1996-08-23 Image processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP24125896A JP3423157B2 (en) 1996-08-23 1996-08-23 Image processing device

Publications (2)

Publication Number Publication Date
JPH1063242A JPH1063242A (en) 1998-03-06
JP3423157B2 true JP3423157B2 (en) 2003-07-07

Family

ID=17071575

Family Applications (1)

Application Number Title Priority Date Filing Date
JP24125896A Expired - Fee Related JP3423157B2 (en) 1996-08-23 1996-08-23 Image processing device

Country Status (1)

Country Link
JP (1) JP3423157B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4103740B2 (en) 2003-09-10 2008-06-18 セイコーエプソン株式会社 Image display device, image display method, and image display program

Also Published As

Publication number Publication date
JPH1063242A (en) 1998-03-06

Similar Documents

Publication Publication Date Title
JP4271804B2 (en) Method for selecting colors assigned to pixels, and method for encoding and storing images
CA2627999C (en) Generation of a depth map from a monoscopic color image for rendering stereoscopic still and video images
EP0159691B1 (en) Color image display system
US5701365A (en) Subpixel character positioning with antialiasing with grey masking techniques
EP0235456B1 (en) Image processing apparatus and method with blocks of compressed data
US10554856B2 (en) Image processing system and method
US5235435A (en) Method of producing halftone images
DE19715491A1 (en) Interpolation method and device for rapid image enlargement
JPH0764525A (en) Apparatus and method for processing of color image
US4692811A (en) Apparatus for processing image signal
US20090147110A1 (en) Video Processing Device
DE3836640C2 (en)
WO2001027780A1 (en) System and method for digital color image processing
JP3679139B2 (en) Color image converter
JPH1188700A (en) Coding method of color image signal, and decoding method and color image processor thereof
JP2001245141A (en) Image processing apparatus and method
EP0719041A2 (en) Video signal format conversion apparatus
JP3423157B2 (en) Image processing device
US20030190092A1 (en) System and method for resizing a digital image
EP0781493B1 (en) Packed yuv9 format for interleaved storage and efficient processing of digital video data
JP2012222453A5 (en)
CA2221973A1 (en) Multiple density level stochastic screening system and method
US9172849B2 (en) Method and apparatus for color transformation by addressing a look-up table
JPH0830768A (en) Picture conversion system
EP0583107A2 (en) Image processing method and apparatus

Legal Events

Date Code Title Description
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080425

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090425

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100425

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100425

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110425

Year of fee payment: 8

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120425

Year of fee payment: 9

LAPS Cancellation because of no payment of annual fees