JPH08331373A - Color image reduction device and color image reduction method - Google Patents

Color image reduction device and color image reduction method

Info

Publication number
JPH08331373A
JPH08331373A JP7133953A JP13395395A JPH08331373A JP H08331373 A JPH08331373 A JP H08331373A JP 7133953 A JP7133953 A JP 7133953A JP 13395395 A JP13395395 A JP 13395395A JP H08331373 A JPH08331373 A JP H08331373A
Authority
JP
Japan
Prior art keywords
color
image
representative
divided
color image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP7133953A
Other languages
Japanese (ja)
Inventor
Tokumasa Yakura
得正 矢倉
Hisahiro Tabata
尚弘 田畑
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.)
Omron Corp
Original Assignee
Omron Corp
Omron Tateisi Electronics Co
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 Omron Corp, Omron Tateisi Electronics Co filed Critical Omron Corp
Priority to JP7133953A priority Critical patent/JPH08331373A/en
Publication of JPH08331373A publication Critical patent/JPH08331373A/en
Pending legal-status Critical Current

Links

Landscapes

  • Editing Of Facsimile Originals (AREA)
  • Facsimile Image Signal Circuits (AREA)
  • Color Image Communication Systems (AREA)
  • Image Processing (AREA)

Abstract

PURPOSE: To provide the color image reduction device and the color image reduction method in which a reduced color image is obtained while keeping color information of an original color image. CONSTITUTION: A representative color generating means 24 has a histogram generating means 26 and a range selection output means 28. The histogram generating means 26 counts number of picture elements having a color belonging to each range block obtained by dividing a color space as to picture elements forming a division image. The range selection output means 28 selects the range block including most of picture elements among range blocks as a representative range block and provides an output of a color corresponding to the representative range block as a representative color of a division image. A reduced image generating means 30 replaces one division image with one picture element and generates a reduced color image by using the representative color of the division image as a color of one picture element. Thus, a color close to colors appearing most in the division image is used for a representative color to reduce the image.

Description

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

【0001】[0001]

【産業上の利用分野】この発明は、カラー画像縮小装置
およびカラー画像縮小方法に関し、特に、原カラー画像
の色を保ちつつ画像縮小を行なう技術に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a color image reducing apparatus and a color image reducing method, and more particularly to a technique for reducing an image while maintaining the color of an original color image.

【0002】[0002]

【従来の技術】画像処理を行なう前処理などを目的とし
て、カラー画像縮小処理が行なわれる。従来のカラー画
像縮小装置によるカラー画像縮小処理のブロック図を図
15Aに示す。従来のカラー画像縮小処理は、画像分割
処理4、間引き処理6、縮小画像作成処理8から構成さ
れている。
2. Description of the Related Art Color image reduction processing is performed for the purpose of preprocessing for image processing. A block diagram of color image reduction processing by a conventional color image reduction device is shown in FIG. 15A. The conventional color image reduction processing is composed of image division processing 4, thinning processing 6, and reduced image creation processing 8.

【0003】図16に示すように、まず、1つの原カラ
ー画像10を所定個数の分割画像12a、12b、・・
・、12jに分割する。これが、画像分割処理4(図1
5A参照)である。ここで、分割画像12a、12b、
・・・、12jは、それぞれ、複数個の画素から構成さ
れている。また、各画素は、それぞれ色を持っている。
As shown in FIG. 16, first, one original color image 10 is divided into a predetermined number of divided images 12a, 12b, ...
., 12j. This is the image division processing 4 (see FIG.
5A). Here, the divided images 12a, 12b,
.., 12j are each composed of a plurality of pixels. Also, each pixel has its own color.

【0004】つぎに、各分割画像12a、12b、・・
・、12jから、それぞれ1つの画素を抽出し、抽出し
た画素の色を、各分割画像12a、12b、・・・、1
2jの代表色とする。図16の例では、各分割画像12
a、12b、・・・、12jの最左上に位置する画素1
4a1、14b1、・・・、14j1を抽出するよう構
成している。これが、間引き処理6(図15A参照)で
ある。
Next, the divided images 12a, 12b, ...
, 12j, one pixel is extracted from each of the divided images 12a, 12b, ..., 1
The representative color of 2j. In the example of FIG. 16, each divided image 12
Pixel 1 located at the upper left of a, 12b, ..., 12j
4a1, 14b1, ..., 14j1 are extracted. This is the thinning process 6 (see FIG. 15A).

【0005】つぎに、抽出した各画素14a1、14b
1、・・・、14j1の色と同一の色をもつ画素16
a、16b、・・・、16jを要素として、縮小カラー
画像18を作成する。これが、縮小画像作成処理8(図
15A参照)である。
Next, the extracted pixels 14a1 and 14b
Pixels 16 having the same color as 1, ..., 14j1
A reduced color image 18 is created using a, 16b, ..., 16j as elements. This is the reduced image creation processing 8 (see FIG. 15A).

【0006】このように、原カラー画像10の各分割画
像12a、12b、・・・、12jと、縮小カラー画像
18の画素16a、16b、・・・、16jとを対応さ
せることにより、原カラー画像10を縮小することがで
きる。
.., 12j of the original color image 10 and the pixels 16a, 16b ,. The image 10 can be reduced.

【0007】[0007]

【発明が解決しようとする課題】しかしながら、このよ
うな従来のカラー画像縮小装置によるカラー画像縮小処
理には次のような問題点があった。図15Aに示すカラ
ー画像縮小処理においては、各分割画像12a、12
b、・・・、12jの代表色を決定する際、各分割画像
12a、12b、・・・、12jの最左上に位置する画
素14a1、14b1、・・・、14j1を抽出するよ
う構成している。したがって、代表色を決定する処理が
極めて単純であるという長所がある。
However, the color image reduction processing by such a conventional color image reduction apparatus has the following problems. In the color image reduction processing shown in FIG. 15A, the divided images 12a, 12
When the representative color of b, ..., 12j is determined, the pixels 14a1, 14b1, ..., 14j1 located at the upper left of each divided image 12a, 12b ,. There is. Therefore, there is an advantage that the process of determining the representative color is extremely simple.

【0008】しかし、各分割画像12a、12b、・・
・、12jの最左上に位置する画素14a1、14b
1、・・・、14j1のいずれかに、たまたま無意味な
ノイズがのっていた場合であっても、ノイズがのった画
素の色を当該分割画像の代表色と決定してしまうという
問題があった。これでは、原カラー画像10に忠実に縮
小カラー画像18を作成することができず、後処理に支
障をきたす。
However, the divided images 12a, 12b, ...
.., pixels 14a1 and 14b located at the upper left of 12j
Even if there is meaningless noise on any one of 1, ..., 14j1, the color of the pixel with noise is determined to be the representative color of the divided image. was there. In this case, the reduced color image 18 cannot be created faithfully to the original color image 10 and the post-processing is hindered.

【0009】この問題を解決するために、図15Bに示
すカラー画像縮小処理が提案されている。図15Bに示
すカラー画像縮小処理においては、間引き処理6(図1
5A参照)に替え、平均化処理2が採用されている。
To solve this problem, a color image reduction process shown in FIG. 15B has been proposed. In the color image reduction process shown in FIG. 15B, the thinning process 6 (see FIG.
5A), averaging process 2 is adopted.

【0010】平均化処理2は、次のように行なう。たと
えば、分割画像12aを構成する全画素14a1、14
a2、・・・、14akの色の平均値を算出し、この平
均値を分割画像12aの代表色とする。他の分割画像1
2b、・・・、12jについても、同様の方法で代表色
を決定する。
Averaging process 2 is performed as follows. For example, all the pixels 14a1 and 14a forming the divided image 12a
The average value of the colors a2, ..., 14ak is calculated, and this average value is used as the representative color of the divided image 12a. Other split image 1
For 2b, ..., 12j, the representative color is determined by the same method.

【0011】このように、代表色を決定するに際し平均
化処理2を採用することにより、分割画像の一部に無意
味なノイズがのっていた場合であっても、ノイズをほと
んど無視することができる。したがって、ノイズの影響
をほとんど受けない信頼性の高い縮小カラー画像18を
作成することができる。
As described above, by adopting the averaging process 2 in determining the representative color, even if a part of the divided image has meaningless noise, the noise is almost ignored. You can Therefore, it is possible to create a highly reliable reduced color image 18 that is hardly affected by noise.

【0012】しかしながら、図15Bに示すカラー画像
縮小処理においては、たとえば、分割画像12aを構成
する全画素14a1、14a2、・・・、14akの色
の平均値を、分割画像12aの代表色とするため、代表
色が必ずしも分割画像12aのもともと有していた色を
再現しているとは限らないという問題点がある。
However, in the color image reduction processing shown in FIG. 15B, for example, the average value of the colors of all the pixels 14a1, 14a2, ..., 14ak forming the divided image 12a is used as the representative color of the divided image 12a. Therefore, there is a problem that the representative color does not always reproduce the original color of the divided image 12a.

【0013】たとえば、分割画像12aを構成する全画
素14a1、14a2、・・・、14akのうち、80
%の画素の色が「白」で、20%の画素の色が「黒」で
ある場合、代表色は、分割画像12aの大部分を占める
「白」でもなく、一部を占める「黒」でもない、「灰」
となる。
For example, 80 out of all the pixels 14a1, 14a2, ..., 14ak forming the divided image 12a.
When the color of% of the pixels is “white” and the color of 20% of the pixels is “black”, the representative color is not “white” which occupies most of the divided image 12a, but “black” which occupies a part thereof. But not "ash"
Becomes

【0014】したがって、カラー画像縮小処理に続く後
処理が、原カラー画像10の色を基準とするような処理
である場合、例えば、「『白』であれば、『掛時計』で
あると認識させる」ような処理である場合には、不都合
が生ずることとなる。
Therefore, when the post-processing subsequent to the color image reduction processing is processing in which the color of the original color image 10 is used as a reference, for example, "" white "is recognized as" wall clock ". If such processing is performed, inconvenience will occur.

【0015】この発明は、このような従来のカラー画像
縮小装置の問題点を解消し、原カラー画像の色情報を保
持しつつ縮小カラー画像を得ることができるカラー画像
縮小装置およびカラー画像縮小方法を提供することを目
的とする。
The present invention solves the problems of the conventional color image reducing apparatus, and it is possible to obtain a reduced color image while retaining the color information of the original color image, and a color image reducing method. The purpose is to provide.

【0016】[0016]

【課題を解決するための手段】[Means for Solving the Problems]

【0017】[0017]

【課題を解決するために案出した技術思想】原カラー画
像の色情報を保持しつつ縮小カラー画像を得ることがで
きるカラー画像縮小装置およびカラー画像縮小方法を提
供するために、分割画像を構成する画素の色のうち、最
大度数の色を分割画像の代表色として縮小カラー画像を
作成することとした。
[Technical idea devised to solve the problem] To provide a color image reducing apparatus and a color image reducing method capable of obtaining a reduced color image while retaining color information of an original color image, a divided image is configured. The reduced color image is created by using the color with the maximum frequency among the colors of the pixels to be represented as the representative color of the divided image.

【0018】すなわち、請求項に記載した発明の構成を
示す第1図に記載しているように、請求項1のカラー画
像縮小装置は、画像記憶領域20に記憶された原カラー
画像を、複数の分割画像に分割する画像分割手段22、
分割画像を構成する画素の色のうち、最大度数の色を分
割画像の代表色とする代表色生成手段24、1つの分割
画像を1画素に置換するとともに、該分割画像の代表色
を該1画素の色として、縮小カラー画像を作成する縮小
画像作成手段30、を備えたことを特徴とする。
That is, as described in FIG. 1 showing the configuration of the invention described in the claims, the color image reducing apparatus according to claim 1 makes it possible to obtain a plurality of original color images stored in the image storage area 20. Image dividing means 22 for dividing into divided images
Among the colors of the pixels forming the divided image, the representative color generating unit 24 that makes the color with the maximum frequency the representative color of the divided image, replaces one divided image with one pixel, and sets the representative color of the divided image to 1 A reduced image creating means 30 for creating a reduced color image is provided as the color of the pixel.

【0019】請求項2のカラー画像縮小装置は、請求項
1のカラー画像縮小装置において、代表色生成手段24
が、分割画像を構成する画素について、色空間を分割し
て得られる各範囲ブロックに属する色を有する画素の数
を計数するヒストグラム作成手段26、範囲ブロックの
うち画素を最も多く含む範囲ブロックを代表範囲ブロッ
クとして選択するとともに、代表範囲ブロックに対応す
る色を分割画像の代表色として出力する範囲選択出力手
段28、を備えたことを特徴とする。
A color image reducing apparatus according to a second aspect is the color image reducing apparatus according to the first aspect, in which the representative color generating means 24 is provided.
Is a histogram creating means 26 for counting the number of pixels having a color belonging to each range block obtained by dividing the color space among the pixels constituting the divided image, and the range block containing the most pixels among the range blocks is represented. It is characterized in that range selection output means 28 for selecting the range block and outputting the color corresponding to the representative range block as the representative color of the divided image is provided.

【0020】請求項3のカラー画像縮小方法は、原カラ
ー画像を、複数の分割画像に分割し、分割画像を構成す
る画素の色のうち、最大度数の色を分割画像の代表色と
し、1つの分割画像を1画素に置換するとともに、該分
割画像の代表色を該1画素の色として、縮小カラー画像
を作成すること、を特徴とする。
According to a third aspect of the color image reduction method of the present invention, the original color image is divided into a plurality of divided images, and among the colors of the pixels constituting the divided image, the color having the maximum frequency is used as a representative color of the divided image. One of the divided images is replaced with one pixel, and a reduced color image is created by using the representative color of the divided image as the color of the one pixel.

【0021】請求項4のカラー画像縮小方法は、請求項
3のカラー画像縮小方法において、代表色を定めるに際
し、分割画像を構成する画素について、色空間を分割し
て得られる各範囲ブロックに属する色を有する画素の数
を計数し、範囲ブロックのうち画素を最も多く含む範囲
ブロックを代表範囲ブロックとして選択するとともに、
代表範囲ブロックに対応する色を分割画像の代表色とし
て出力すること、を特徴とする。
A color image reducing method according to a fourth aspect is the color image reducing method according to the third aspect, in which when defining the representative color, the pixels constituting the divided image belong to each range block obtained by dividing the color space. The number of pixels having a color is counted, and the range block that includes the most pixels among the range blocks is selected as the representative range block, and
The color corresponding to the representative range block is output as the representative color of the divided image.

【0022】[0022]

【用語の定義】課題を解決するために案出した技術思想
を表現する請求項での用語の概念を、次のとおり定義す
るとともに、その用語と実施例との関係を説明する。
[Definition of terms] The concept of terms in the claims expressing the technical idea devised to solve the problems will be defined as follows, and the relationship between the terms and examples will be described.

【0023】「最大度数の色」:最も出現頻度の高い
色、または最も出現頻度の高い色に近い色をいう。実施
例では、図3の画素平均値算出処理において算出された
ブロック内画素平均値Mijが該当する。
"Color with maximum frequency": A color with the highest appearance frequency or a color close to the color with the highest appearance frequency. In the embodiment, the in-block pixel average value Mij calculated in the pixel average value calculation process of FIG. 3 corresponds.

【0024】「色空間」:色を表現するために用いられ
る要素を座標軸とする空間をいう。したがって、色を、
R(赤色成分)、G(緑色成分)、B(青色成分)の組
合せとして定義する場合は、色空間は3次元空間とな
る。同様に、Y(イエロ)、M(マゼンタ)、C(シア
ン)の組合せとして定義する場合や、H(色相)、S
(彩度)、V(明度)の組合せとして定義する場合も、
3次元空間となる。実施例では、第11図のRGB空間が
該当する。
"Color space": A space having coordinate axes of elements used for expressing colors. Therefore, the color
When defined as a combination of R (red component), G (green component), and B (blue component), the color space is a three-dimensional space. Similarly, when defining as a combination of Y (yellow), M (magenta) and C (cyan), H (hue), S
When defining as a combination of (saturation) and V (brightness),
It becomes a three-dimensional space. In the embodiment, the RGB space shown in FIG. 11 is applicable.

【0025】「範囲ブロック」:色空間を複数のブロッ
クに分割した場合における、分割された各ブロックをい
う。したがって、RGB空間が直交座標系である場合に
は、R、G、B各成分を等分割することにより、立方体
の範囲ブロックを得ることができる。実施例では、第1
1図の範囲ブロックBsが該当する。
"Range block": Refers to each of the divided blocks when the color space is divided into a plurality of blocks. Therefore, when the RGB space is a rectangular coordinate system, a cubic range block can be obtained by equally dividing each of the R, G, and B components. In the embodiment, the first
This corresponds to the range block Bs in FIG.

【0026】[0026]

【作用】請求項1のカラー画像縮小装置および請求項3
のカラー画像縮小方法は、分割画像を構成する画素の色
のうち、最大度数の色を分割画像の代表色として縮小カ
ラー画像を作成することを特徴とする。したがって、分
割画像にいちばん多く現れる色に近い色を代表色とし
て、画像を縮小することができる。
A color image reducing apparatus according to claim 1 and claim 3
The color image reduction method is characterized in that the reduced color image is created by using the color of the maximum frequency among the colors of the pixels forming the divided image as the representative color of the divided image. Therefore, it is possible to reduce the size of the image with the color closest to the color that appears most in the divided images as the representative color.

【0027】請求項2のカラー画像縮小装置および請求
項4のカラー画像縮小方法は、さらに、色空間を分割し
て得られる各範囲ブロックに属する色を有する画素の数
を計数し、範囲ブロックのうち画素を最も多く含む代表
範囲ブロックに対応する色を分割画像の代表色として出
力することを特徴とする。したがって、後処理の要求に
対応させて範囲ブロックの大きさを設定することができ
る。
The color image reducing apparatus according to claim 2 and the color image reducing method according to claim 4 further count the number of pixels having a color belonging to each range block obtained by dividing the color space, It is characterized in that the color corresponding to the representative range block including the largest number of pixels is output as the representative color of the divided image. Therefore, the size of the range block can be set according to the request for the post-processing.

【0028】[0028]

【実施例】図2に、図1に示すカラー画像縮小装置の各
機能を、CPUを用いて実現した場合のハードウェア構
成を示す。このカラー画像縮小装置は、大略、カラーテ
レビカメラ32、ワークステーションWS、CRT34
を備えている。ワークステーションWSは、画像入力ボ
ード36、キーボード38、マウス40、CPU42、
RAM44、ROM46、インタフェース48を備えて
いる。
FIG. 2 shows a hardware configuration when each function of the color image reducing apparatus shown in FIG. 1 is realized by using a CPU. This color image reducing device is generally composed of a color television camera 32, a workstation WS, and a CRT 34.
It has. The workstation WS includes an image input board 36, a keyboard 38, a mouse 40, a CPU 42,
The RAM 44, the ROM 46, and the interface 48 are provided.

【0029】カラーテレビカメラ32は、風景などを撮
影し、得られた光学情報をアナログ電気信号に変換して
出力する。カラーテレビカメラ32から出力されたアナ
ログ電気信号は、画像入力ボード36を介して、デジタ
ル電気信号としてRAM44に取込まれる。RAM44
に取込まれたデジタル電気信号を画像データという。
The color television camera 32 photographs a landscape or the like, converts the obtained optical information into an analog electric signal, and outputs the analog electric signal. The analog electric signal output from the color television camera 32 is taken into the RAM 44 as a digital electric signal via the image input board 36. RAM44
The digital electric signal captured by is called image data.

【0030】CPU42は、ROM46に記憶されてい
るプログラムに従って、RAM44に取込まれた画像デ
ータを縮小処理する。処理結果は、インターフェース4
8を介して、CRT34に表示される。キーボード38
およびマウス40は、命令等の入力手段として用いられ
る。
The CPU 42 reduces the image data taken into the RAM 44 according to the program stored in the ROM 46. The processing result is interface 4
It is displayed on the CRT 34 via 8. Keyboard 38
The mouse 40 is also used as an input means for commands and the like.

【0031】ここで、RAM44は、図1における画像
記憶領域20に対応する。また、CPU42は、図1に
おける画像分割手段22、ヒストグラム作成手段26、
範囲選択出力手段28、縮小画像作成手段30に対応す
る。
The RAM 44 corresponds to the image storage area 20 in FIG. The CPU 42 also includes the image dividing unit 22, the histogram creating unit 26, and
It corresponds to the range selection output means 28 and the reduced image creation means 30.

【0032】つぎに、図3に、図1に示すカラー画像縮
小装置によるカラー画像縮小処理のブロック図を示す。
カラー画像縮小処理は、カラー画像設定処理50、画像
分割処理52、ヒストグラム作成処理54、範囲選択処
理56、画素平均値算出処理58、縮小画像作成処理6
0から構成されている。
Next, FIG. 3 shows a block diagram of the color image reduction processing by the color image reduction apparatus shown in FIG.
Color image reduction processing includes color image setting processing 50, image division processing 52, histogram creation processing 54, range selection processing 56, pixel average value calculation processing 58, and reduced image creation processing 6.
It consists of zero.

【0033】ここで、画像分割処理52は、図1におけ
る画像分割手段22に対応する。ヒストグラム作成処理
54は、ヒストグラム作成手段26に対応する。範囲選
択処理56および画素平均値算出処理58は、範囲選択
出力手段28に対応する。縮小画像作成処理60は、縮
小画像作成手段30に対応する。
Here, the image division processing 52 corresponds to the image division means 22 in FIG. The histogram creation processing 54 corresponds to the histogram creation means 26. The range selection process 56 and the pixel average value calculation process 58 correspond to the range selection output means 28. The reduced image creation processing 60 corresponds to the reduced image creation means 30.

【0034】図4に、図3に示すカラー画像縮小処理を
時系列で表したフローチャートを示す。図2のハードウ
ェア構成を参照しつつ、図4に基づいて、カラー画像縮
小処理の流れを説明する。
FIG. 4 shows a time-series flowchart of the color image reduction processing shown in FIG. The flow of the color image reduction process will be described based on FIG. 4 while referring to the hardware configuration of FIG.

【0035】まず、CPU42は、カラーテレビカメラ
32、画像入力ボード36を介して、デジタル電気信号
として、一旦RAM44に取込まれた画像データを、所
定のフォーマットに変換した後、再び、画像記憶領域で
あるRAM44に記憶させる。このように所定のフォー
マットに変換されてRAM44に記憶された画像データ
をサンプルカラー画像(原カラー画像)Gという。CP
U42は、このようにしてサンプルカラー画像Gの作成
を行なう(ステップS2)。
First, the CPU 42 converts the image data, which has been temporarily stored in the RAM 44 as a digital electric signal, into a predetermined format via the color television camera 32 and the image input board 36, and then, again, the image storage area. It is stored in the RAM 44. The image data thus converted into the predetermined format and stored in the RAM 44 is referred to as a sample color image (original color image) G. CP
U42 creates the sample color image G in this way (step S2).

【0036】図5に示すように、サンプルカラー画像G
は、RGB成分(赤色成分、緑色成分、青色成分)を要素
とするフルカラー画素値D[g,h]を持った画素を、n行m
列に直交配置した行列、すなわち、サイズn×m画素の
フルカラー画像である。サンプルカラー画像Gのフォー
マットを、以下に示す。
As shown in FIG. 5, a sample color image G
Is a pixel with a full-color pixel value D [g, h] that has RGB components (red component, green component, blue component) as elements, and n rows and m
It is a matrix arranged orthogonally in columns, that is, a full-color image of size n × m pixels. The format of the sample color image G is shown below.

【0037】 [0037]

【0038】ただし、 G ;サンプルカラー画像 D[g,h] ;画素値(フルカラー画素) g ;縦方向の画素番号( = 1,2,3,...,n) n ;縦方向の画素数 h ;横方向の画素番号( = 1,2,3,...,m) m ;横方向の画素数 n*m ;総画素数 である。However, G: sample color image D [g, h]; pixel value (full color pixel) g; vertical pixel number (= 1,2,3, ..., n) n; vertical pixel Number h; pixel number in horizontal direction (= 1,2,3, ..., m) m; number of pixels in horizontal direction n * m; total number of pixels.

【0039】図6にサンプルカラー画像Gのデータ形式
を示す。なお、ステップS2が、図3に示すカラー画像
設定処理50に対応する。
FIG. 6 shows the data format of the sample color image G. Note that step S2 corresponds to the color image setting process 50 shown in FIG.

【0040】なお、上述の例では、カラーテレビカメラ
32などを介してRAM44に取込まれた画像データ
を、所定のフォーマットに変換することによりサンプル
カラー画像Gの作成を行なうよう構成したが、画像デー
タはカラーテレビカメラ32から入力されたものに限る
ものではなく、画像を記録した磁気ディスク(図示せ
ず)などから入力したものであってもよい。さらに、あ
らかじめ所定のフォーマットに変換された画像データを
RAM44に取込むこともできる。
In the above example, the sample color image G is created by converting the image data taken into the RAM 44 via the color television camera 32 or the like into a predetermined format. The data is not limited to that input from the color television camera 32, and may be input from a magnetic disk (not shown) on which an image is recorded. Furthermore, the image data converted in advance into a predetermined format can be loaded into the RAM 44.

【0041】つぎに、CPU42は、オペレータにより
キーボード38から入力された縮小率をRAM44に取
り込む。この実施例においては、縦横の縮小率は同率で
あると仮定し、これを1/kとする。よって、全体の縮小
率は、1/k*kとなる。
Next, the CPU 42 loads the reduction ratio input by the operator from the keyboard 38 into the RAM 44. In this embodiment, it is assumed that the vertical and horizontal reduction rates are the same, and this is 1 / k. Therefore, the overall reduction ratio is 1 / k * k.

【0042】すなわち、 1/k*k ;サンプルカラー画像の縮小率 である。たとえば、k=4とすると、縮小率は、1/1
6となる。このようにして縮小率の設定を行なう(ステ
ップS4)。
That is, 1 / k * k; the reduction ratio of the sample color image. For example, if k = 4, the reduction ratio is 1/1
It becomes 6. In this way, the reduction rate is set (step S4).

【0043】つぎに、CPU42は、図7に示すよう
に、サンプルカラー画像Gを、縦方向n/k(=ei)個、横方
向m/k(=ej)個に等分割する。分割されてできた各画像
を、分割画像Gijという。分割画像Gijのサイズはk×
k画素であり、これが、n*m/(k*k)個できる。このよう
にして、サンプルカラー画像Gを分割する(ステップS
6)。以下に、分割画像Gijのフォーマットを示す。
Next, the CPU 42 equally divides the sample color image G into n / k (= ei) pieces in the vertical direction and m / k (= ej) pieces in the horizontal direction, as shown in FIG. Each of the divided images is called a divided image Gij. The size of the divided image Gij is k ×
There are k pixels, which can be n * m / (k * k). In this way, the sample color image G is divided (step S
6). The format of the divided image Gij is shown below.

【0044】 Gij={ Dij[1,1], Dij[1,2], Dij[1,3], ..., Dij[1,k], Dij[2,1], Dij[2,2], Dij[2,3], ..., Dij[2,k], ... Dij[x,y], ... Dij[k,1], Dij[k,2], Dij[k,3], ..., Dij[k,k] }。Gij = {Dij [1,1], Dij [1,2], Dij [1,3], ..., Dij [1, k], Dij [2,1], Dij [2,2 ], Dij [2,3], ..., Dij [2, k], ... Dij [x, y], ... Dij [k, 1], Dij [k, 2], Dij [k , 3], ..., Dij [k, k]}.

【0045】ただし、 Gij ;分割されたカラー画像(分割画像) Dij[x,y];画素値(フルカラー画素) i ;縦方向の分割番号(i = 1,2,3,...,ei) ei ;縦方向の分割数( = n/k ) n ;縦方向の画素数 j ;横方向の分割番号(j = 1,2,3,...,ej) ej ;横方向の分割数( = m/k ) m ;横方向の画素数 k ;画像の縦方向(横方向)縮小率の逆数 x ;分割画像の縦方向画素番号(x = 1,2,3,...,
k) y ;分割画像の横方向画素番号(y = 1,2,3,...,
k) x*y ;分割画像の総画素数 である。
However, Gij; divided color image (divided image) Dij [x, y]; pixel value (full color pixel) i; vertical division number (i = 1,2,3, ..., ei) ) ei; Vertical division number (= n / k) n; Vertical pixel number j; Horizontal division number (j = 1,2,3, ..., ej) ej; Horizontal division number (= m / k) m; number of pixels in the horizontal direction k; reciprocal of vertical (horizontal) reduction ratio of image x; vertical pixel number of divided image (x = 1,2,3, ...,
k) y; horizontal pixel number of the divided image (y = 1,2,3, ...,
k) x * y; The total number of pixels in the divided image.

【0046】図8に、分割画像Gijのデータ形式を示
す。なお、ステップS6が、図3に示す画像分割処理5
2に対応する。
FIG. 8 shows the data format of the divided image Gij. Note that step S6 is the image division processing 5 shown in FIG.
Corresponds to 2.

【0047】つぎに、CPU42は、図9に示すよう
に、分割画像Gijの各フルカラー画素(k×k画素)か
ら、RGB成分を抽出する(ステップS8)。すなわち、
画素値Dij[x,y]から、256階調の赤色成分DRij[x,y]
、緑色成分DGij[x,y] 、 青色成分DBij[x,y]の3成分
を抽出する。以下に画素値Dij[x,y]の成分のフォーマッ
トを示す。
Next, the CPU 42 extracts RGB components from each full color pixel (k × k pixel) of the divided image Gij as shown in FIG. 9 (step S8). That is,
From the pixel value Dij [x, y], 256-level red component DRij [x, y]
, Green component DGij [x, y], and blue component DBij [x, y] are extracted. The format of the components of the pixel value Dij [x, y] is shown below.

【0048】 Dij[x,y] = { DRij[x,y] , DGij[x,y] , DBij[x,y] } ただし、 Dij[x,y];画素値(フルカラー画素) DRij[x,y];画素値の赤色成分(256階調) DGij[x,y];画素値の緑色成分(256階調) DBij[x,y];画素値の青色成分(256階調) i ;縦方向の分割番号(i = 1,2,3,...,ei) ei ;縦方向の分割数( = n/k) n ;縦方向の画素数 k ;画像の縦方向(横方向)縮小率の逆数 j ;横方向の分割番号(j = 1,2,3,...,ej) ej ;横方向の分割数( = m/k ) m ;横方向の画素数 x ;分割画像の縦方向画素番号(x = 1,2,3,...,
k) y ;分割画像の横方向画素番号(y = 1,2,3,...,
k) x*y ;分割画像の総画素数 である。なお、図10に、画素のデータ形式を示す。
Dij [x, y] = {DRij [x, y], DGij [x, y], DBij [x, y]} where Dij [x, y]; pixel value (full color pixel) DRij [x , y]; red component of pixel value (256 gradations) DGij [x, y]; green component of pixel value (256 gradations) DBij [x, y]; blue component of pixel value (256 gradations) i; Vertical division number (i = 1,2,3, ..., ei) ei; Vertical division number (= n / k) n; Vertical pixel count k; Vertical image (horizontal direction) Reciprocal of reduction ratio j; horizontal division number (j = 1,2,3, ..., ej) ej; horizontal division number (= m / k) m; horizontal pixel number x; divided image Vertical pixel number (x = 1,2,3, ...,
k) y; horizontal pixel number of the divided image (y = 1,2,3, ...,
k) x * y; The total number of pixels in the divided image. Note that FIG. 10 shows a data format of pixels.

【0049】つぎに、CPU42は、オペレータにより
キーボード38から入力された範囲ブロックの個数L*
L*Lを、RAM44に取り込む。これにより、RGB色
空間にL*L*L個の範囲ブロックBsを作成する(ス
テップS10)。
Next, the CPU 42 causes the number L * of range blocks input by the operator from the keyboard 38.
L * L is loaded into the RAM 44. As a result, L * L * L range blocks Bs are created in the RGB color space (step S10).

【0050】色は、一般に3つの独立した要素により決
定される。したがって、この3つの要素を3次元座標軸
にとれば、全ての色はこの3次元座標で定義される空間
内の点として表わされる。一般に、色を表現するために
用いられる要素を座標軸とする空間を色空間という。こ
の実施例においては、色を、R(赤色成分)、G(緑色
成分)、B(青色成分)の組合せとして定義している。
そこで、R、G、Bを3次元直交座標軸にとれば、色空
間は3次元直交空間として定義される。この色空間をRG
B空間と呼ぶ。
Color is generally determined by three independent factors. Therefore, if these three elements are taken as three-dimensional coordinate axes, all colors are represented as points in the space defined by these three-dimensional coordinates. Generally, a space having coordinate axes of elements used for expressing colors is called a color space. In this embodiment, a color is defined as a combination of R (red component), G (green component) and B (blue component).
Therefore, if R, G, and B are taken as three-dimensional orthogonal coordinate axes, the color space is defined as a three-dimensional orthogonal space. This color space is RG
Called B space.

【0051】RGB空間を複数のブロックに分割したと
き、この分割された各ブロックを範囲ブロックBsとい
う(図11参照)。この実施例では、それぞれ有限(2
56階調)のR、G、B各成分を、それぞれL分割する
ことにより、L*L*L個の範囲ブロックBsを得るよ
う構成している。
When the RGB space is divided into a plurality of blocks, each divided block is called a range block Bs (see FIG. 11). In this embodiment, each is finite (2
Each of the R, G, and B components of 56 gradations is divided into L parts to obtain L * L * L range blocks Bs.

【0052】したがって、範囲ブロックBsは立方体で
あり、範囲ブロックBsのサイズは、256/L×256/L×256
/Lである。以下に、Lの範囲と、範囲ブロックBsのデー
タフォーマットを示す。
Therefore, the range block Bs is a cube, and the size of the range block Bs is 256 / L × 256 / L × 256.
/ L. The range of L and the data format of the range block Bs are shown below.

【0053】1 <= L <= 256 (ただし、256/L が正の整
数となることが条件とされる。) Bs = { r[s] , g[s] , b[s] , dotnum[s] } ただし、 L ;各RGB成分の分割数 Bs ;範囲ブロック s ;範囲ブロックのブロック番号( = 1,2,..., L
*L*L ) r[s] ;R成分の分割番号( = 1,2,..., L ) g[s] ;G成分の分割番号( = 1,2,..., L ) b[s] ;B成分の分割番号( = 1,2,..., L ) dotnum[s];ブロック内の画素数カウンター値(初期値
は、0である) である。
1 <= L <= 256 (However, 256 / L must be a positive integer.) Bs = {r [s], g [s], b [s], dotnum [ s]} where L is the number of RGB component divisions Bs is the range block s is the block number of the range block (= 1,2, ..., L
* L * L) r [s] ; R component division number (= 1,2, ..., L) g [s] ; G component division number (= 1,2, ..., L) b [s]; B component division number (= 1,2, ..., L) dotnum [s]; counter value of the number of pixels in the block (initial value is 0).

【0054】また、ブロック番号sと、範囲ブロックBs
の内容との対応付けは、以下のように行なう。 B1 = (1,1,1,0) , B2 = (1,1,2,0), B3 = (1,1,3,0) ... , BL = (1,1,L,0), BL+1 = (1,2,1,0), ... , BL*L = (1,L,L,0), BL*L+1 = (2,1,1,0), ... , BL*L*L = (L,L,L,0) すなわち、B成分から順に、G成分、R成分とカウントア
ップしていく。
The block number s and the range block Bs
The association with the contents of is performed as follows. B1 = (1,1,1,0), B2 = (1,1,2,0), B3 = (1,1,3,0) ..., BL = (1,1, L, 0) , BL + 1 = (1,2,1,0), ..., BL * L = (1, L, L, 0), BL * L + 1 = (2,1,1,0) ,. .., BL * L * L = (L, L, L, 0) That is, the B component is counted up in order from the G component to the R component.

【0055】以下に、ブロック番号sから、RGB各成分の
分割番号を算出する式を示す。 r[s] = ceil (s/(L*L) ) g[s] = ceil ( (s - (r[s]-1)*L*L) / L ) b[s] = s - (r[s]-1)*L*L -(g[s]-1)*L。
The formula for calculating the division number of each RGB component from the block number s is shown below. r [s] = ceil (s / (L * L)) g [s] = ceil ((s-(r [s] -1) * L * L) / L) b [s] = s-(r [s] -1) * L * L-(g [s] -1) * L.

【0056】ただし、 L ;各RBG成分の分割数 Bs ;範囲ブロック s ;ブロック番号( = 1,2,..., L*L*L ) r[s] ;R成分の分割番号( = 1,2,..., L ) g[s] ;G成分の分割番号( = 1,2,..., L ) b[s] ;B成分の分割番号( = 1,2,..., L ) ceil(x) ;xを下回らない最小の整数を返す関数 である。なお、図12の(a)欄に、範囲ブロックBs
のデータ形式を示す。
However, L: the number of divisions of each RBG component Bs; range block s; block number (= 1,2, ..., L * L * L) r [s]; division number of R component (= 1 , 2, ..., L) g [s] ; G component division number (= 1,2, ..., L) b [s] ; B component division number (= 1,2, ...) , L) ceil (x) ; It is a function that returns the smallest integer not less than x. In addition, the range block Bs is shown in the column (a) of FIG.
Shows the data format of.

【0057】つぎにCPU42は、各分割画像Gijごと
に、分割画像Gijを構成する画素のRGB空間における3
次元ヒストグラムを作成する(ステップS12)。3次
元ヒストグラムは以下のように作成する。
Next, the CPU 42 sets, for each divided image Gij, three pixels in the RGB space of the pixels forming the divided image Gij.
A dimension histogram is created (step S12). The three-dimensional histogram is created as follows.

【0058】分割画像Gijを構成する各画素について、
その画素値(RGBの3成分値)を含む範囲ブロックBsを
探しだし、その範囲ブロックBsの画素数カウンター値d
otnum[s]をインクリメントする。分割画像Gij内のk*k
個の画素すべての処理が終了するまで、上記の処理を繰
り返す。以下に、その3次元ヒストグラムの算出式を示
す。
For each pixel forming the divided image Gij,
The range block Bs including the pixel value (3 component values of RGB) is searched for, and the pixel number counter value d of the range block Bs is searched.
Increment otnum [s]. K * k in the divided image Gij
The above processing is repeated until the processing of all the pixels is completed. The formula for calculating the three-dimensional histogram is shown below.

【0059】分割画像の各画素値:Dij[x,y] = { DRij
[x,y] , DGij[x,y] , DBij[x,y] } 範囲ブロック: Bs = { r[s] , g[s] , b[s] , dot
num[s] } において、 256/L * (r[s]-1) < DRij[x,y] <= 256/L * r[s] 256/L * (g[s]-1) < DGij[x,y] <= 256/L * g[s] 256/L * (b[s]-1) < DBij[x,y] <= 256/L * b[s] の条件を満たすブロック番号sを探しだし、dotnum[s] =
dotnum[s] + 1 とする。上記の処理を、1 <= x,y <= k
範囲のすべての x,y について行なう。
Each pixel value of the divided image: Dij [x, y] = {DRij
[x, y], DGij [x, y], DBij [x, y]} Range block: Bs = {r [s], g [s], b [s], dot
In num [s]}, 256 / L * (r [s] -1) <DRij [x, y] <= 256 / L * r [s] 256 / L * (g [s] -1) <DGij Block number that satisfies the condition of [x, y] <= 256 / L * g [s] 256 / L * (b [s] -1) <DBij [x, y] <= 256 / L * b [s] find s, dotnum [s] =
Use dotnum [s] + 1. 1 <= x, y <= k
Do for all x, y in the range.

【0060】ただし、 Dij[x,y];画素値(フルカラー画素) DRij[x,y];画素値の赤色成分(256階調) DGij[x,y];画素値の緑色成分(256階調) DBij[x,y];画素値の青色成分(256階調) i ;縦方向の分割番号(i = 1,2,3,...,ei) ei ;縦方向の分割数( = n/k) n ;縦方向の画素数 k ;画像の縦方向(横方向)縮小率の逆数 j ;横方向の分割番号(j = 1,2,3,...,ej) ej ;横方向の分割数( = m/k ) m ;横方向の画素数 x ;分割画像の縦方向画素番号(x = 1,2,3,...,
k) y ;分割画像の横方向画素番号(y = 1,2,3,...,
k) L ;各RGB成分の分割数 Bs ;範囲ブロック s ;ブロック番号( = 1,2,..., L*L*L ) r[s] ;R成分の分割番号( = 1,2,..., L ) g[s] ;G成分の分割番号( = 1,2,..., L ) b[s] ;B成分の分割番号( = 1,2,..., L ) dotnum[s];ブロック内の画素数カウンター値(初期値
は、0である) である。
However, Dij [x, y]; pixel value (full color pixel) DRij [x, y]; red component of pixel value (256 gradations) DGij [x, y]; green component of pixel value (256th floor) Key) DBij [x, y]; blue component of pixel value (256 gradations) i; vertical division number (i = 1,2,3, ..., ei) ei; vertical division number (= n / k) n ; Number of vertical pixels k ; Reciprocal of vertical (horizontal) reduction ratio of image j ; Horizontal division number (j = 1,2,3, ..., ej) ej ; Horizontal Number of divisions in direction (= m / k) m; number of pixels in horizontal direction x; vertical pixel number of divided image (x = 1,2,3, ...,
k) y; horizontal pixel number of the divided image (y = 1,2,3, ...,
k) L; number of divisions of each RGB component Bs; range block s; block number (= 1,2, ..., L * L * L) r [s]; division number of R component (= 1,2, ..., L) g [s] ; G component division number (= 1,2, ..., L) b [s] ; B component division number (= 1,2, ..., L). dotnum [s]; It is the pixel number counter value in the block (initial value is 0).

【0061】図11に、このようにして作成した3次元
ヒストグラムを示す。なお、ステップS12が、図3に
示すヒストグラム作成処理54に対応する。
FIG. 11 shows the three-dimensional histogram created in this way. Note that step S12 corresponds to the histogram creation processing 54 shown in FIG.

【0062】つぎに、CPU42は、すべての範囲ブロ
ックBsの中から、画素数カウンター値dotnum[s]が最大
の範囲ブロックBs(画素の出現頻度の最も高いブロッ
ク)を選択し、その範囲ブロックBsを代表範囲ブロッ
クBcとする(ステップS14)。以下に、その代表範
囲ブロックBcを求める式を示す。
Next, the CPU 42 selects the range block Bs having the largest pixel number counter value dotnum [s] (the block having the highest pixel appearance frequency) from all the range blocks Bs, and the range block Bs is selected. Is a representative range block Bc (step S14). The formula for obtaining the representative range block Bc is shown below.

【0063】dotnum[c] = max( dotnum[s] ) となるような、cを探し出す。この、cをあたえる範囲ブ
ロックBs=cが代表範囲ブロックBcとなる。
Find c such that dotnum [c] = max (dotnum [s]). The range block Bs = c that gives c becomes the representative range block Bc.

【0064】ただし、 s ;ブロック番号( = 1,2,..., L*L*L ) L ;各RGB成分の分割数 c ;代表範囲ブロックのブロック番号 dotnum[s];ブロック内の画素数カウンター値 max( dotnum[s] );dotnum[1]〜dotnum[L*L*L]のうち最
大のdotnum[s]を求める演算子である。
However, s; block number (= 1,2, ..., L * L * L) L; number of divisions of each RGB component c; block number of representative range block dotnum [s]; pixel in block Number counter value max (dotnum [s]); It is an operator that finds the maximum dotnum [s] of dotnum [1] to dotnum [L * L * L].

【0065】図11に、代表範囲ブロックBcを示す。
また、図12の(b)欄に代表範囲ブロックBcのデー
タ形式を示す。なお、ステップS14が、図3に示す範
囲選択処理56に対応する。
FIG. 11 shows the representative range block Bc.
The data format of the representative range block Bc is shown in the column (b) of FIG. Note that step S14 corresponds to the range selection processing 56 shown in FIG.

【0066】つぎにCPU42は、代表範囲ブロックB
cに含まれるすべての画素の平均値を算出する(ステッ
プS16)。
Next, the CPU 42 causes the representative range block B
The average value of all the pixels included in c is calculated (step S16).

【0067】まず代表範囲ブロックBcに含まれるすべ
ての画素(k*k個)をサーチし、代表範囲ブロックBcに
含まれる画素の値の総和値を算出する。その総和値を、
代表ブロックの画素数カウンター dotnum[c] で割り、
平均値Mijとする。以下に、平均値の算出手順を示す。
First, all the pixels (k * k) included in the representative range block Bc are searched, and the total sum of the values of the pixels included in the representative range block Bc is calculated. The total value is
Divide by the pixel number counter dotnum [c] of the representative block,
The average value is Mij. The procedure for calculating the average value is shown below.

【0068】代表範囲ブロック:Bc = { r[c] , g[c]
, b[c] , dotnum[c] } 分割画像の各画素:Dij[x,y] = { DRij[x,y] , DGij[x,
y] , DBij[x,y] } 総和テーブル: Dsum = { DRsum, DGsum, DBsum }(初
期値はすべて0である) 平均値: Mij = { MRij, MGij, MBij } において、 256/L * (r[c]-1) < DRij[x,y] <= 256/L * r[c] 256/L * (g[c]-1) < DGij[x,y] <= 256/L * g[c] 256/L * (b[c]-1) < DBij[x,y] <= 256/L * b[c] を満たす画素が、存在するなら、その成分値(DRij[x,
y], DGij[x,y], DBij[x,y])を、総和値(DRsum, DGsum,
DBsum)に加算していく。上記の処理を、1 <= x,y <= k
範囲のすべての x,y について行なう。
Representative range block: Bc = {r [c], g [c]
, b [c], dotnum [c]} Each pixel of the divided image: Dij [x, y] = {DRij [x, y], DGij [x,
y], DBij [x, y]} Sum table: Dsum = {DRsum, DGsum, DBsum} (initial values are all 0) Mean value: Mij = {MRij, MGij, MBij}, 256 / L * ( r [c] -1) <DRij [x, y] <= 256 / L * r [c] 256 / L * (g [c] -1) <DGij [x, y] <= 256 / L * g If a pixel that satisfies [c] 256 / L * (b [c] -1) <DBij [x, y] <= 256 / L * b [c] exists, its component value (DRij [x,
y], DGij [x, y], DBij [x, y]) is the sum value (DRsum, DGsum,
DBsum). 1 <= x, y <= k
Do for all x, y in the range.

【0069】最後に、RGB成分ごとの総和値(Dsum)を、
分割画像の総画素数で割る。
Finally, the sum value (Dsum) for each RGB component is
Divide by the total number of pixels in the divided image.

【0070】MRij = DRsum / dotnum[c] MGij = DGsum / dotnum[c] MBij = DBsum / dotnum[c]。MRij = DRsum / dotnum [c] MGij = DGsum / dotnum [c] MBij = DBsum / dotnum [c].

【0071】ただし、 Dij[x,y];画素値(フルカラー画素) DRij[x,y];画素値の赤色成分(256階調) DGij[x,y];画素値の緑色成分(256階調) DBij[x,y];画素値の青色成分(256階調) i ;縦方向の分割番号(i = 1,2,3,...,ei) ei ;縦方向の分割数( = n/k) n ;縦方向の画素数 k ;画像の縦方向(横方向)縮小率の逆数 j ;横方向の分割番号(j = 1,2,3,...,ej) ej ;横方向の分割数( = m/k ) m ;横方向の画素数 x ;分割画像の縦方向画素番号(x = 1,2,3,...,
k) y ;分割画像の横方向画素番号(y = 1,2,3,...,
k) L ;各RGB成分の分割数 Bc ;代表範囲ブロック c ;代表範囲ブロックのブロック番号 r[c] ;代表範囲ブロックのR成分の分割番号 g[c] ;代表範囲ブロックのG成分の分割番号 b[c] ;代表範囲ブロックのB成分の分割番号 dotnum[s];代表範囲ブロックに含まれる画素の総数 Dsum ;ブロック内画素の総和値 DRsum ;ブロック内画素のR成分の総和値 DGsum ;ブロック内画素のG成分の総和値 DBsum ;ブロック内画素のB成分の総和値 Mij ;ブロック内画素平均値 MRij ;ブロック内画素平均値のR成分 MGij ;ブロック内画素平均値のG成分 MBij ;ブロック内画素平均値のB成分 である。
However, Dij [x, y]; pixel value (full color pixel) DRij [x, y]; red component of pixel value (256 gradations) DGij [x, y]; green component of pixel value (256th floor) Key) DBij [x, y]; blue component of pixel value (256 gradations) i; vertical division number (i = 1,2,3, ..., ei) ei; vertical division number (= n / k) n ; Number of vertical pixels k ; Reciprocal of vertical (horizontal) reduction ratio of image j ; Horizontal division number (j = 1,2,3, ..., ej) ej ; Horizontal Number of divisions in direction (= m / k) m; number of pixels in horizontal direction x; vertical pixel number of divided image (x = 1,2,3, ...,
k) y; horizontal pixel number of the divided image (y = 1,2,3, ...,
k) L: Number of divisions of each RGB component Bc; Representative range block c; Block number of representative range block r [c]; Division number of R component of representative range block g [c]; Division of G component of representative range block Number b [c]; Division number of B component of representative range block dotnum [s]; Total number of pixels included in representative range block Dsum; Sum total value of pixels in block DRsum; Sum total value of R components of pixel in block DGsum; Sum of values of G component of pixel in block DBsum; Sum of value of B component of pixel in block Mij; Average pixel value of block MRij; R component of pixel average value of block MGij; G component of pixel average value of block MBij; Block It is the B component of the inner pixel average value.

【0072】このようにして算出した平均値Mijが、分
割領域Gijの代表色となる。なお、ステップS16が、
図3に示す画素平均値算出処理58に対応する。
The average value Mij thus calculated becomes the representative color of the divided area Gij. Note that step S16
This corresponds to the pixel average value calculation processing 58 shown in FIG.

【0073】CPU42は、このようにして、各分割画
像Gijごとに、3次元ヒストグラムを作成し(ステップ
S12)、代表範囲ブロックBcを求め(ステップS1
4)、平均値Mijを算出する(ステップS16)。この
ようにして、各分割画像Gijごとに、代表色を求める。
In this way, the CPU 42 creates a three-dimensional histogram for each divided image Gij (step S12) and obtains the representative range block Bc (step S1).
4), average value Mij is calculated (step S16). In this way, the representative color is obtained for each divided image Gij.

【0074】つぎにCPU42は、各分割画像Gijごと
に求めた平均値Mijを1ドットとする縮小カラー画像M
を作成する(ステップS18)。この縮小カラー画像M
のサイズは、ei×ejである。以下に、縮小カラー画像M
の画素値(フルカラー画素)Mijのフォーマットを示
す。
Next, the CPU 42 makes the reduced color image M in which the average value Mij obtained for each divided image Gij is 1 dot.
Is created (step S18). This reduced color image M
The size of is ei × ej. Below, the reduced color image M
The format of the pixel value (full color pixel) Mij of is shown.

【0075】Mij={ MRij, MGij, MBij } ただし、 Mij ;縮小カラー画像Mの画素値 MRij ;縮小カラー画像の画素値のR成分 MGij ;縮小カラー画像の画素値のG成分 MBij ;縮小カラー画像の画素値のB成分 i ;縦方向の分割番号(i = 1,2,3,...,ei) ei ;縦方向の分割数( = n/k) n ;縦方向の画素数 k ;画像の縦方向(横方向)縮小率の逆数 j ;横方向の分割番号(j = 1,2,3,...,ej) ej ;横方向の分割数( = m/k ) m ;横方向の画素数 である。Mij = {MRij, MGij, MBij} where Mij is the pixel value MRij of the reduced color image M MRij is the R component of the pixel value of the reduced color image MGij is the G component of the pixel value of the reduced color image MBij is the reduced color image B component of pixel value of i; vertical division number (i = 1,2,3, ..., ei) ei; vertical division number (= n / k) n; vertical pixel number k; Reciprocal of vertical (horizontal) reduction ratio of image j; horizontal division number (j = 1,2,3, ..., ej) ej; horizontal division number (= m / k) m; horizontal The number of pixels in the direction.

【0076】図13に、縮小カラー画像Mを示す。ま
た、図14に縮小カラー画像Mのデータ形式を示す。な
お、ステップS18が、図3に示す縮小画像作成処理6
0に対応する。
FIG. 13 shows the reduced color image M. Further, FIG. 14 shows the data format of the reduced color image M. Note that step S18 is the reduced image creation processing 6 shown in FIG.
Corresponds to 0.

【0077】なお、上述の実施例においては、色空間と
してRGB空間を用いたが、色空間として、Y(イエ
ロ)、M(マゼンタ)、C(シアン)を要素とするYMC
空間や、H(色相)、S(彩度)、V(明度)を要素と
するHSV空間を用いることもできる。
Although the RGB space is used as the color space in the above-described embodiment, the YMC having Y (yellow), M (magenta), and C (cyan) as elements is used as the color space.
It is also possible to use a space or an HSV space having H (hue), S (saturation), and V (lightness) as elements.

【0078】また、分割領域Gijの代表色として、代表
範囲ブロックBcに属する画素値の平均値Mijを採用し
たが、分割領域Gijの代表色として、以下の式で定義さ
れる代表範囲ブロックBcの中央値Cijを採用してもよ
い。
Although the average value Mij of the pixel values belonging to the representative range block Bc is adopted as the representative color of the divided area Gij, the representative range block Bc defined by the following equation is used as the representative color of the divided area Gij. The median value Cij may be adopted.

【0079】 中央値: Cij = { CRij, CGij, CBij } ただし、 CRij[x,y] = 256/L * (r[c]-1/2) CGij[x,y] = 256/L * (g[c]-1/2) CBij[x,y] = 256/L * (b[c]-1/2) である。Median: Cij = {CRij, CGij, CBij} where CRij [x, y] = 256 / L * (r [c] -1/2) CGij [x, y] = 256 / L * ( g [c] -1/2) CBij [x, y] = 256 / L * (b [c] -1/2).

【0080】分割領域Gijの代表色として中央値Cijを
採用することにより、平均値Mijを算出するための時間
を節減することができ、カラー画像縮小処理の処理速度
の短縮を図ることができる。
By using the median value Cij as the representative color of the divided area Gij, the time for calculating the average value Mij can be saved and the processing speed of the color image reduction processing can be shortened.

【0081】また、RGB空間を範囲ブロックBsに分割
し、各分割画像Gijごとに、RGB空間における3次元ヒ
ストグラムを作成し、最も出現頻度の高い代表範囲ブロ
ックBcを選択することにより、当該分割画像Gijの代
表色を求めるよう構成したが、R、G、B各成分の階調
(実施例では各成分とも256階調)が少ないような場
合(たとえば、32階調)には、RGB空間を範囲ブロッ
クBsに分割することなく、各色の出現頻度を直接計数
し、出現頻度の高い色を当該分割画像Gijの代表色とす
ることもできる。このように構成すれば、3次元ヒスト
グラムを作成する必要がなくなり、処理時間の短縮を図
ることができる。
Further, the RGB space is divided into range blocks Bs, a three-dimensional histogram in the RGB space is created for each divided image Gij, and the representative range block Bc with the highest frequency of appearance is selected, whereby the divided image is divided. Although the representative color of Gij is calculated, if the gradation of each of the R, G, and B components (256 gradations in each component in the embodiment) is small (for example, 32 gradations), the RGB space is set. It is also possible to directly count the appearance frequency of each color without dividing into the range block Bs and use the color having a high appearance frequency as the representative color of the divided image Gij. With this configuration, it is not necessary to create a three-dimensional histogram, and the processing time can be shortened.

【0082】なお、上述の実施例においては、CPU4
2を用いて、図1に示すカラー画像縮小装置の各機能を
実現した場合を例に説明したが、当該各機能の一部また
は全部を、ハードウェアロジックにより実現することも
できる。
In the above embodiment, the CPU 4
Although the case where each function of the color image reducing apparatus shown in FIG. 1 is realized by using 2 is described as an example, a part or all of each function can be realized by hardware logic.

【0083】[0083]

【発明の効果】請求項1のカラー画像縮小装置および請
求項3のカラー画像縮小方法は、分割画像を構成する画
素の色のうち、最大度数の色を分割画像の代表色として
縮小カラー画像を作成することを特徴とする。
According to the color image reducing apparatus of the first aspect and the color image reducing method of the third aspect, among the colors of the pixels forming the divided image, the color having the maximum frequency is used as the representative color of the divided image to form the reduced color image. It is characterized by creating.

【0084】したがって、分割画像にいちばん多く現れ
る色に近い色を代表色として、画像を縮小することがで
きる。すなわち、原カラー画像の色情報を保持しつつ縮
小カラー画像を得ることができる。
Therefore, it is possible to reduce the size of an image by using a color that is closest to the color that appears most in the divided images as a representative color. That is, it is possible to obtain a reduced color image while retaining the color information of the original color image.

【0085】請求項2のカラー画像縮小装置および請求
項4のカラー画像縮小方法は、さらに、色空間を分割し
て得られる各範囲ブロックに属する色を有する画素の数
を計数し、範囲ブロックのうち画素を最も多く含む代表
範囲ブロックに対応する色を分割画像の代表色として出
力することを特徴とする。
The color image reducing apparatus according to claim 2 and the color image reducing method according to claim 4 further count the number of pixels having a color belonging to each range block obtained by dividing the color space, It is characterized in that the color corresponding to the representative range block including the largest number of pixels is output as the representative color of the divided image.

【0086】したがって、後処理の要求に対応させて範
囲ブロックの大きさを設定することができる。すなわ
ち、さらに、任意の精度で原カラー画像の色情報を保持
しつつ縮小カラー画像を得ることができる。
Therefore, the size of the range block can be set in accordance with the request for post-processing. That is, it is possible to obtain a reduced color image while retaining the color information of the original color image with arbitrary accuracy.

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

【図1】請求項に記載したカラー画像縮小装置の構成を
示す図面である。
FIG. 1 is a diagram showing a configuration of a color image reducing device described in claims.

【図2】この発明によるカラー画像縮小装置の各機能
を、CPUを用いて実現した場合のハードウェア構成の
一例を示す図面である。
FIG. 2 is a diagram showing an example of a hardware configuration when each function of the color image reducing device according to the present invention is realized by using a CPU.

【図3】この発明の一実施例によるカラー画像縮小装置
による、カラー画像縮小処理のブロック図である。
FIG. 3 is a block diagram of color image reduction processing by the color image reduction apparatus according to the embodiment of the present invention.

【図4】この発明の一実施例によるカラー画像縮小装置
による、カラー画像縮小処理を時系列で表したフローチ
ャートである。
FIG. 4 is a time-series flowchart showing color image reduction processing by the color image reduction apparatus according to the embodiment of the present invention.

【図5】この発明の一実施例によるカラー画像縮小処理
における、サンプルカラー画像を示す図面である。
FIG. 5 is a diagram showing a sample color image in the color image reduction processing according to the embodiment of the present invention.

【図6】この発明の一実施例によるカラー画像縮小処理
における、サンプルカラー画像のデータ形式を示す図面
である。
FIG. 6 is a diagram showing a data format of a sample color image in the color image reduction processing according to the embodiment of the present invention.

【図7】この発明の一実施例によるカラー画像縮小処理
における、分割画像を示す図面である。
FIG. 7 is a diagram showing divided images in a color image reduction process according to an embodiment of the present invention.

【図8】この発明の一実施例によるカラー画像縮小処理
における、分割画像のデータ形式を示す図面である。
FIG. 8 is a diagram showing a data format of divided images in a color image reduction process according to an embodiment of the present invention.

【図9】この発明の一実施例によるカラー画像縮小処理
における、分割画像を構成する画素を示す図面である。
FIG. 9 is a diagram showing pixels forming a divided image in the color image reduction processing according to the embodiment of the present invention.

【図10】この発明の一実施例によるカラー画像縮小処
理における、分割画像を構成する画素のデータ形式を示
す図面である。
FIG. 10 is a diagram showing a data format of pixels forming a divided image in the color image reduction processing according to the embodiment of the present invention.

【図11】この発明の一実施例によるカラー画像縮小処
理における、3次元ヒストグラムを示す図面である。
FIG. 11 is a drawing showing a three-dimensional histogram in a color image reduction process according to an embodiment of the present invention.

【図12】この発明の一実施例によるカラー画像縮小処
理における、範囲ブロックおよび代表範囲ブロックのデ
ータ形式を示す図面である。
FIG. 12 is a diagram showing a data format of a range block and a representative range block in the color image reduction processing according to the embodiment of the present invention.

【図13】この発明の一実施例によるカラー画像縮小処
理における、縮小カラー画像を示す図面である。
FIG. 13 is a diagram showing a reduced color image in the color image reduction processing according to the embodiment of the present invention.

【図14】この発明の一実施例によるカラー画像縮小処
理における、縮小カラー画像のデータ形式を示す図面で
ある。
FIG. 14 is a drawing showing a data format of a reduced color image in a color image reduction process according to an embodiment of the present invention.

【図15】従来のカラー画像縮小装置によるカラー画像
縮小処理のブロック図である。
FIG. 15 is a block diagram of color image reduction processing by a conventional color image reduction device.

【図16】従来のカラー画像縮小処理における、分割画
像および縮小カラー画像を示す図面である。
FIG. 16 is a diagram showing a divided image and a reduced color image in a conventional color image reduction process.

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

24・・・・・代表色生成手段 26・・・・・ヒストグラム作成手段 28・・・・・範囲選択出力手段 30・・・・・縮小画像作成手段 24 ... Representative color generation means 26 ... Histogram creation means 28 ... Range selection output means 30 ... Reduced image creation means

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】画像記憶領域に記憶された原カラー画像
を、複数の分割画像に分割する画像分割手段、 分割画像を構成する画素の色のうち、最大度数の色を分
割画像の代表色とする代表色生成手段、 1つの分割画像を1画素に置換するとともに、該分割画
像の代表色を該1画素の色として、縮小カラー画像を作
成する縮小画像作成手段、 を備えたことを特徴とするカラー画像縮小装置。
1. An image dividing means for dividing an original color image stored in an image storage area into a plurality of divided images, and a color having a maximum frequency among colors of pixels constituting the divided image is set as a representative color of the divided image. Representative color generating means for replacing one divided image with one pixel, and a reduced image generating means for generating a reduced color image using the representative color of the divided image as the color of the one pixel. Color image reduction device.
【請求項2】請求項1のカラー画像縮小装置において、
代表色生成手段が、 分割画像を構成する画素について、色空間を分割して得
られる各範囲ブロックに属する色を有する画素の数を計
数するヒストグラム作成手段、 範囲ブロックのうち画素を最も多く含む範囲ブロックを
代表範囲ブロックとして選択するとともに、代表範囲ブ
ロックに対応する色を分割画像の代表色として出力する
範囲選択出力手段、 を備えたことを特徴とするカラー画像縮小装置。
2. The color image reducing apparatus according to claim 1, wherein
The representative color generation means counts the number of pixels having a color belonging to each range block obtained by dividing the color space among the pixels forming the divided image, and a range including the largest number of pixels in the range block. A color image reduction device comprising: a range selection output unit that selects a block as a representative range block and outputs a color corresponding to the representative range block as a representative color of a divided image.
【請求項3】原カラー画像を、複数の分割画像に分割
し、 分割画像を構成する画素の色のうち、最大度数の色を分
割画像の代表色とし、 1つの分割画像を1画素に置換するとともに、該分割画
像の代表色を該1画素の色として、縮小カラー画像を作
成すること、 を特徴とするカラー画像縮小方法。
3. An original color image is divided into a plurality of divided images, and among the colors of the pixels forming the divided image, the color with the maximum frequency is used as a representative color of the divided image, and one divided image is replaced with one pixel. And a reduced color image is created by using the representative color of the divided image as the color of the one pixel.
【請求項4】請求項3のカラー画像縮小方法において、
代表色を定めるに際し、 分割画像を構成する画素について、色空間を分割して得
られる各範囲ブロックに属する色を有する画素の数を計
数し、 範囲ブロックのうち画素を最も多く含む範囲ブロックを
代表範囲ブロックとして選択するとともに、代表範囲ブ
ロックに対応する色を分割画像の代表色として出力する
こと、 を特徴とするカラー画像縮小方法。
4. The color image reduction method according to claim 3,
When determining the representative color, the number of pixels that have a color belonging to each range block obtained by dividing the color space is counted for the pixels that make up the divided image, and the range block that contains the largest number of pixels A color image reducing method characterized by selecting a range block and outputting a color corresponding to the representative range block as a representative color of a divided image.
JP7133953A 1995-05-31 1995-05-31 Color image reduction device and color image reduction method Pending JPH08331373A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP7133953A JPH08331373A (en) 1995-05-31 1995-05-31 Color image reduction device and color image reduction method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP7133953A JPH08331373A (en) 1995-05-31 1995-05-31 Color image reduction device and color image reduction method

Publications (1)

Publication Number Publication Date
JPH08331373A true JPH08331373A (en) 1996-12-13

Family

ID=15116943

Family Applications (1)

Application Number Title Priority Date Filing Date
JP7133953A Pending JPH08331373A (en) 1995-05-31 1995-05-31 Color image reduction device and color image reduction method

Country Status (1)

Country Link
JP (1) JPH08331373A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7027646B2 (en) * 2001-03-26 2006-04-11 Canon Kabushiki Kaisha Scaled image generating apparatus and method, image feature calculating apparatus and method, computer programs therefor, and image data structure
JP2006222940A (en) * 2005-01-14 2006-08-24 Ricoh Co Ltd Image processing apparatus

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7027646B2 (en) * 2001-03-26 2006-04-11 Canon Kabushiki Kaisha Scaled image generating apparatus and method, image feature calculating apparatus and method, computer programs therefor, and image data structure
JP2006222940A (en) * 2005-01-14 2006-08-24 Ricoh Co Ltd Image processing apparatus

Similar Documents

Publication Publication Date Title
US6859210B2 (en) Method for representing a digital color image using a set of palette colors based on detected important colors
EP0709806B1 (en) Color correction device and color correction method
US5034806A (en) Image processing apparatus and method
JP2000196907A (en) Method for selecting color to be assigned to pixel and method for encoding and storing picture
JPH04127675A (en) Digital picture formation
JP3679139B2 (en) Color image converter
US7671871B2 (en) Graphical user interface for color correction using curves
JP3126046B2 (en) Color adjustment method and color adjustment device for color image
CN111179370A (en) Picture generation method and device, electronic equipment and storage medium
JPH08331373A (en) Color image reduction device and color image reduction method
JP2936599B2 (en) Color image processing equipment
JP3215156B2 (en) Color image processing method
JPH06274618A (en) Area identifying device
JPS6232569A (en) Color picture device
JP3648778B2 (en) Image processing device
JPH05290133A (en) Color image processor
JPH09127924A (en) Image subtractive color display method
JPH0916769A (en) Device and method for processing image
KR0155925B1 (en) Digital color image
JPH06180573A (en) Image forming method
JPH03113682A (en) Picture processor
JPH0520455A (en) Picture processing method
KR100363965B1 (en) Method of optimizing color image for 4 gray-level display
JPS61292781A (en) Color gradation converter for color picture
JPH05334410A (en) Method for displaying color image

Legal Events

Date Code Title Description
A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20040223