[go: up one dir, main page]

JPH07182516A - Judgement method of color component of computer graphic picture - Google Patents

Judgement method of color component of computer graphic picture

Info

Publication number
JPH07182516A
JPH07182516A JP6275818A JP27581894A JPH07182516A JP H07182516 A JPH07182516 A JP H07182516A JP 6275818 A JP6275818 A JP 6275818A JP 27581894 A JP27581894 A JP 27581894A JP H07182516 A JPH07182516 A JP H07182516A
Authority
JP
Japan
Prior art keywords
image
color
pixels
block
value
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
JP6275818A
Other languages
Japanese (ja)
Inventor
Tsuai-Shin Deiue Julie
ジュリー・ツァイ−シン・デイウェ
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.)
HP Inc
Original Assignee
Hewlett Packard 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 Hewlett Packard Co filed Critical Hewlett Packard Co
Publication of JPH07182516A publication Critical patent/JPH07182516A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Analysis (AREA)

Abstract

PURPOSE: To provide a color decision method which automatically sorts an image into a specific category based on a pixel color component that exists in a computer graphics image. CONSTITUTION: An image is automatically sorted by deciding the color component of a computer graphics image. The primary image types which are automatically sorted include (1) a binary image, (2) a gray scale image and (3) a color image, and these automatically sorted images are stored in an assigned memory 120 as the graphics images according to the image conditions. In this case, the gray scale and binary images can be stored by means of 8-bit/pixel and 1-bit/pixel respectively after automatic sorting with higher precision.

Description

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

【0001】[0001]

【産業上の利用分野】本発明はコンピュータシステムに
関し、より詳細には走査されたコンピュータ画像の色成
分を判定し、かかる画像を表示および記憶する方法に関
する。
FIELD OF THE INVENTION This invention relates to computer systems, and more particularly to methods for determining the color components of scanned computer images and displaying and storing such images.

【0002】[0002]

【従来の技術】コンピュータ図形画像は通常複数の点あ
るいは画素からなる。それぞれの画素はその画素の階調
範囲を表わす符号を有する。モノクロシステムにおいて
は、この階調範囲はグレースケール上の純粋な黒から純
粋な白までの間である。この符号すなわちグレースケー
ルレベルは通常8ビットであり、0から255までの階
調範囲を提供し、0は純粋な黒かな白のいずれかを表わ
し、255はその反対の色(すなわち純粋な白か純粋な
黒)を表わす。
BACKGROUND OF THE INVENTION Computer graphic images usually consist of multiple points or pixels. Each pixel has a code representing the gradation range of that pixel. In monochrome systems, this tonal range is from pure black on the gray scale to pure white. This sign or grayscale level is typically 8 bits and provides a tonal range of 0 to 255, where 0 represents either pure black or white and 255 is the opposite color (ie pure white or not). Represents pure black).

【0003】[0003]

【発明が解決しようとする課題】カラーグラフィックス
システムにおいては、色は赤、緑および青(RGB)の
3原色を“混合する”ことによって作られる。RGBモ
デルは三次元空間内のRGB色立方体として説明するこ
とができ、この場合黒(すなわち色の不在)が原点であ
り、白がこの立方体の反対の端部にある。この立方体内
あるいはその辺上の任意の点は次の式で与えられる色を
表わす。 C = rR+gG+bB ここでCはその画素を表わす色であり、R、G、Bは原
色を表わし、r、g、bはR、G、Bの相対的な量に対
応する。したがって、それぞれの画素は上記の式に対応
する赤、緑および青のなんらかの組み合わせである。
In a color graphics system, colors are created by "mixing" the three primary colors red, green and blue (RGB). The RGB model can be described as an RGB color cube in three-dimensional space, where black (ie the absence of color) is the origin and white is at the opposite end of this cube. Any point on this cube or on its side represents the color given by: C = rR + gG + bB where C is the color representing the pixel, R, G, B represent the primary colors, and r, g, b correspond to the relative amounts of R, G, B. Thus, each pixel is some combination of red, green and blue corresponding to the above equation.

【0004】カラー画像は通常1画素あたり24ビット
を割り当てることによって記憶される。この方法では、
赤に8ビット、緑に8ビット、そして青に8ビットが割
り当てられる。これらの8ビット符号の範囲はそれぞれ
0から255にわたる。24ビット方式はカラー画像あ
たりの画素数によっては困難になる。走査画像中の画素
数は画像の大きさとスキャナの解像度によって決まる。
たとえば、300ドット/インチ(dpi)で走査され
た8.5×11インチのレターサイズの用紙には25メ
ガバイトのメモリを必要とする。したがって、画像デー
タの処理に大量のメモリと時間を必要とする。24ビッ
ト/画素方式を用いる場合の他の問題点は、目標画像の
実際の色成分にかかわりなく24ビットすべてが使用さ
れることである。したがって、走査画像が実際に色を持
っているかどうかにかかわりなく、1画素あたり24ビ
ットが画像の表現と記憶に用いられる。
Color images are usually stored by allocating 24 bits per pixel. in this way,
8 bits are allocated for red, 8 bits for green, and 8 bits for blue. The range of each of these 8-bit codes ranges from 0 to 255. The 24-bit method becomes difficult depending on the number of pixels per color image. The number of pixels in the scanned image depends on the size of the image and the resolution of the scanner.
For example, an 8.5 x 11 inch letter size sheet scanned at 300 dots per inch (dpi) requires 25 megabytes of memory. Therefore, processing of image data requires a large amount of memory and time. Another problem with using the 24 bit / pixel scheme is that all 24 bits are used regardless of the actual color components of the target image. Therefore, 24 bits per pixel are used to represent and store the image, regardless of whether the scanned image actually has color.

【0005】コンピュータグラフィックスにおいて有用
なもう1つのカラーモデルとして、二重六角錐モデル、
すなわちHLS(色相、明度、彩度)モデルがある。色
相という用語はここでは従来の意味で用いられる。すな
わち、画像の色を表わす。飽和度という用語は色の純度
を表わす。“純粋な”色とは飽和度100%の色を意味
する。飽和度は、ある色が飽和度0%の単色になるまで
白、黒あるいはグレーがその色に加えられるのに応じて
小さくなっていく。明度は画素の強度あるいは輝度であ
る。
Another color model useful in computer graphics is the double hexagonal pyramid model,
That is, there is an HLS (Hue, Lightness, Saturation) model. The term hue is used here in the conventional sense. That is, it represents the color of the image. The term saturation describes the purity of a color. "Pure" color means a color with 100% saturation. The degree of saturation decreases as white, black, or gray is added to a color until it becomes a single color with a saturation of 0%. Brightness is the intensity or brightness of a pixel.

【0006】RGB色立方体が白から黒までの対角線に
沿った平面に投影されると、六角形が形成される。この
形状の関係を用いて、RGB色立方体をDavid.
F. RogersがProcedural Eleme
nts for Computer Graphics
に説明したもののような簡単な非三角法アルゴリズムを
用いてHLS二重六角錐に変換することができる。基本
的には、明度(I)の値は黒の頂点から白の頂点までの
軸に沿って変化する。飽和度(S)は中心軸からの径方
向の距離によって決まる。飽和度(S)=1のとき色の
飽和が発生する。色相(H)は中心軸のまわり360゜
において変動し、飽和度(S)=0のとき不定である。
A hexagon is formed when an RGB color cube is projected onto a plane along the diagonal from white to black. Using the relationship of this shape, the RGB color cube is divided into David.
F. Rogers is Procedural Elem
nts for Computer Graphics
It can be converted to an HLS double hexagonal pyramid using a simple non-trigonometric algorithm such as the one described in. Basically, the value of lightness (I) changes along the axis from the black vertex to the white vertex. The saturation (S) is determined by the radial distance from the central axis. When the saturation (S) = 1, color saturation occurs. The hue (H) fluctuates at 360 ° around the central axis and is indefinite when the saturation (S) = 0.

【0007】[0007]

【課題を解決するための手段】本発明はコンピュータグ
ラフィックス画像に存在する情報の種類を分類する新し
い方法を提供する。以下の説明においては、“タイ
プ”、“自動分類”、“画像タイプ”および“情報のタ
イプ”は走査された画像の内容を指す。3つの主要な画
像タイプ分類がある。すなわち、(1)2値画像、
(2)グレースケール画像および(3)カラー画像であ
る。カラータイプはさらに、連続階調あるいはスポット
カラーに分類される。2値タイプは黒と白の情報からな
る画像を指す。2値タイプ画像の例にはテキストページ
や線画(すなわち、白い用紙の上に黒いインクで描いた
もの)がある。
The present invention provides a new method for classifying the type of information present in a computer graphics image. In the following description, "type", "auto sort", "image type" and "information type" refer to the content of the scanned image. There are three main image type classifications. That is, (1) binary image,
(2) Gray scale image and (3) Color image. Color types are further classified as continuous tone or spot colors. Binary type refers to an image consisting of black and white information. Examples of binary type images include text pages and line drawings (ie, black ink drawn on white paper).

【0008】グレースケールタイプの画像は黒、白およ
びグレーの成分からなる。グレースケール画像は単色で
ある。すなわち、かかる画像は有意味な色成分を全く持
っていない。グレースケール画像の一例としては白黒フ
ィルムで取った写真がある。
An image of the gray scale type consists of black, white and gray components. Grayscale images are monochromatic. That is, such an image has no meaningful color components. An example of a grayscale image is a picture taken in black and white film.

【0009】カラータイプの画像は通常三原色、赤、
緑、青(RGB)の混合からなる。カラー画像はまたい
くらかの単色成分も含んでいるが、それをグレースケー
ル画像から区別できるだけの量の有意味な色成分を含
む。カラータイプの画像はさらに連続階調かスポットカ
ラーのいずれかに分類することができる。連続階調カラ
ー画像はさまざまな色相の多くの色の混合である。連続
階調カラー画像の一例に、カラーフィルムを用いて取っ
た風景写真がある。スポットカラー画像が通常2、3の
明確な概念的な色を含む人工の図形である。スポットカ
ラーの一例として、カラーバー図がある。
Color type images are usually three primary colors, red,
It consists of a mixture of green and blue (RGB). Color images also contain some monochromatic components, but enough meaningful color components to distinguish them from grayscale images. Color type images can be further classified as either continuous tone or spot color. A continuous tone color image is a mixture of many colors of different hues. An example of a continuous tone color image is a landscape photograph taken using a color film. A spot color image is usually an artificial figure containing a few distinct conceptual colors. A color bar diagram is an example of spot colors.

【0010】本発明はコンピュータグラフィックス画像
の色成分を判定することによって画像を自動的に分類す
るものである。本発明の方法は、まず走査あるいは記憶
された画像のRGB値を非三角法アルゴリズムを用いて
HLS値に変換することである。次に、かかるHLS値
を用いてその画像の色成分が判定される。本発明の方法
によれば、従来の方法に比べてより正確に画像の分類を
行なうことができる。
The present invention automatically classifies an image by determining the color components of the computer graphics image. The method of the present invention is to first convert the RGB values of the scanned or stored image to HLS values using a non-triangulation algorithm. Next, the HLS value is used to determine the color component of the image. According to the method of the present invention, it is possible to classify images more accurately than the conventional method.

【0011】本発明の方法では、まず飽和度値を用いて
画像が有彩色であるか単色であるかが判定される。飽和
度が低い場合、これはその画像が単色画像であることを
示し、飽和度が高い場合、これは画像が有彩色画像であ
ることを示す。飽和度値が中間的な値である場合、色相
が彩度の標識として用いられる。黄色っぽい色相は単色
画像を表わす。明度値は単色画像をさらにグレースケー
ル画像あるいは2値画像のいずれかとしてキャラクタラ
イズするのに用いられる。
In the method of the present invention, the saturation value is first used to determine whether the image is chromatic or monochromatic. A low saturation indicates that the image is a monochromatic image, and a high saturation indicates that the image is a chromatic image. If the saturation value is an intermediate value, the hue is used as an indicator of saturation. A yellowish hue represents a monochrome image. The lightness value is used to further characterize the monochrome image as either a grayscale image or a binary image.

【0012】本発明の利点は画像をその色成分によって
自動的に分類することができることである。この自動的
な画像分類は、図形画像のメモリ割り当てをその画像の
条件にしたがって行なうことができるため、画像のより
効率的な表現と記憶を容易に行なうことを可能にし、2
4ビット/画素方式を用いてフルカラー画像を記憶する
ことができ、8ビット/画素を用いてグレースケール画
像を記憶することができ、1ビット/画素を用いて2値
画像を記憶することができる。
An advantage of the present invention is that images can be automatically classified by their color components. This automatic image classification enables the memory allocation of graphic images according to the conditions of the images, which facilitates more efficient representation and storage of images.
A full color image can be stored using the 4 bit / pixel method, a grayscale image can be stored using 8 bit / pixel, and a binary image can be stored using 1 bit / pixel. .

【0013】[0013]

【実施例】図1は本発明を用いた汎用デジタルコンピュ
ータシステム100のブロック図である。処理装置11
0がシステムバス105に接続されている。システムバ
ス105は処理装置110とメモリ120、データ記憶
ディスク130および入出力インターフェース装置14
0の間の通信を容易にする。このメモリは本発明のソフ
トウエアおよび本発明によって収集・生成されたすべて
のデータを記憶する。メモリ120には以下により詳細
に説明する本発明を記憶するための領域125が設定さ
れている。入出力インターフェース装置140はシステ
ムバス105と表示装置142の間およびキーボード1
44とスキャナ146の間のデータ通信を制御する。
1 is a block diagram of a general purpose digital computer system 100 using the present invention. Processor 11
0 is connected to the system bus 105. The system bus 105 includes a processing device 110, a memory 120, a data storage disk 130, and an input / output interface device 14.
Facilitates communication between 0s. This memory stores the software of the present invention and all the data collected and generated by the present invention. An area 125 is set in the memory 120 for storing the present invention, which will be described in more detail below. The input / output interface device 140 is provided between the system bus 105 and the display device 142 and the keyboard 1
Controls data communication between 44 and scanner 146.

【0014】スキャナ146はグレースケールスキャナ
あるいはカラースキャナのいずれかとすることができ
る。グレースケールスキャナは走査されたそれぞれの画
素のグレースケール値を返す。この値は通常0から25
5の範囲の8ビットであり、0は純粋な黒を表わし、2
55は純粋な白を表わす。本発明はこれらの値に限定さ
れず、これらの値の表示は入れ替えることができる。カ
ラースキャナは通常それぞれの画素について3つの値
(すなわち、赤、緑、青)を返す。それぞれの値は0か
ら255の範囲の8ビットであり、合計で1画素あたり
24ビットの赤―緑―青(RGB)画像データとなる。
本発明の範囲から逸脱することなくさまざまなスキャナ
方式を用いることができる。たとえば、スキャナはそれ
ぞれのRGB値について8ビット以上を返すものであっ
てもよく、この場合1画素あたりのRGB画像データの
総ビットが増える。一実施例において、スキャナ146
は「スキャンジェット IIc」あるいは「スキャンジ
ェットIIp」とすることができ、これらはいずれもカ
ルフォルニア州、パロアルトのカルフォルニア州法人で
あるヒューレットパッカード社から販売されている。
The scanner 146 can be either a grayscale scanner or a color scanner. The grayscale scanner returns a grayscale value for each pixel scanned. This value is typically 0 to 25
8 bits in the range of 5, where 0 represents pure black and 2
55 represents pure white. The present invention is not limited to these values, and the display of these values can be interchanged. Color scanners typically return three values for each pixel (ie red, green, blue). Each value is 8 bits in the range of 0 to 255, and a total of 24 bits per pixel is red-green-blue (RGB) image data.
Various scanner schemes can be used without departing from the scope of the invention. For example, the scanner may return more than 8 bits for each RGB value, which increases the total bits of RGB image data per pixel. In one embodiment, the scanner 146
Can be referred to as "ScanJet IIc" or "ScanJet IIp", both of which are sold by Hewlett-Packard Company, a California corporation of Palo Alto, California.

【0015】図2は本発明のソフトウエアの概略を示
す。スキャナソフトウエア200はコンピュータシステ
ム100とスキャナ146(図1参照)の間の画像デー
タの流れを制御するために設けられる。このスキャナソ
フトウエア200はデータ構造割り当て/初期設定関数
210、測定プレビュー関数220および自動分類関数
230等のいくつかの関数を実行する。スキャナソフト
ウエア200は他のスキャナ関数を実行するが、これら
は本発明には含まれない。
FIG. 2 shows the outline of the software of the present invention. Scanner software 200 is provided to control the flow of image data between computer system 100 and scanner 146 (see FIG. 1). The scanner software 200 executes several functions such as a data structure allocation / initialization function 210, a measurement preview function 220 and an automatic classification function 230. Scanner software 200 performs other scanner functions, which are not included in the invention.

【0016】測定プレビュー関数220は、24ビット
処理ルーチン211と8ビット処理ルーチン215の2
つのルーチンを呼び出す。24ビット処理ルーチン21
1はHLS関数212とRGB画素測定関数213を呼
び出す。自動分類関数230はカラー自動分類関数23
1とグレースケール自動分類関数235を呼び出す。カ
ラー自動分類関数231はグレースケール自動分類関数
235を呼び出す能力を有する。
The measurement preview function 220 includes a 24-bit processing routine 211 and an 8-bit processing routine 215.
Call one routine. 24-bit processing routine 21
1 calls the HLS function 212 and the RGB pixel measurement function 213. The automatic classification function 230 is the color automatic classification function 23.
1 and the grayscale automatic classification function 235 are called. The color auto-classification function 231 has the ability to call the grayscale auto-classification function 235.

【0017】24ビット処理ルーチン211はRGB画
素測定関数213と連動して「スキャンジェットII
c」等のカラースキャナによって検索されたデータを収
集し、“測定する”。画像の“測定”とは単に画素の統
計の記録(たとえば、200より大きい赤の値を有する
画素の数の判定)を意味する。典型的な画像は大量のデ
ータを有するため、24ビット処理ルーチン211はそ
の計算を画像データのストリップ上で実行することがで
きる。したがって、24ビット処理ルーチン211は画
像全体が収集・測定されるまで何回も呼び出される。こ
れに対して、自動分類関数230は測定プレビュー関数
220によって(24ビット処理ルーチン211とRG
B画素測定関数213を介して)すべての測定が行なわ
れた後分類の決定を行なうために1度だけ呼び出され
る。24ビット処理ルーチン211はまた、画像の成分
と利用可能なメモリ量(図1の120)によっては一回
の呼び出しで画像データの収集と測定を行なうこともで
きる。
The 24-bit processing routine 211 works in conjunction with the RGB pixel measurement function 213 to "scanjet II.
Collect and "measure" data retrieved by a color scanner such as "c". "Measuring" an image simply means recording a statistic of pixels (eg, determining the number of pixels having a red value greater than 200). Since a typical image has a large amount of data, 24-bit processing routine 211 can perform its calculations on strips of image data. Therefore, the 24-bit processing routine 211 is called many times until the entire image is acquired and measured. On the other hand, the automatic classification function 230 uses the measurement preview function 220 (the 24-bit processing routine 211 and the RG
Called only once to make a classification decision after all measurements have been made (via the B pixel measurement function 213). The 24-bit processing routine 211 can also collect and measure image data in a single call, depending on the components of the image and the amount of memory available (120 in FIG. 1).

【0018】図3は本発明の方法の全体的な流れを示す
フロー図である。この方法はブロック310で始まり、
このブロックでは赤―緑―青(RGB)値が走査された
ラスタ画像から生成される。かかるRGB値はスキャナ
(図1中の146)によって割り当てるか、あるいはス
キャナソフトウエア(図2中の200)によって生成す
ることができる。ブロック320においてRGB値が、
たとえば、ロジャースによって提案されたもののような
非三角法アルゴリズムにしたがって、色相―明度―飽和
度(HLS)値に変換される。ブロック330におい
て、後に図6から図9を参照して詳細に説明するように
これらのHLS値に基づいてこの画像の色成分が判定さ
れる。ブロック340において、最終結果(画像の色成
分)が出力される。この出力は3つの主要なタイプ、す
なわち(1)カラー、(2)グレースケール、あるいは
(3)2値(すなわち黒と白)のうちの1つである。カ
ラータイプはさらに連続階調かスポットカラーのいずれ
かに分類される。
FIG. 3 is a flow chart showing the overall flow of the method of the present invention. The method begins at block 310
In this block, red-green-blue (RGB) values are generated from the scanned raster image. Such RGB values can be assigned by the scanner (146 in Figure 1) or generated by scanner software (200 in Figure 2). In block 320, the RGB values are
For example, it is converted to Hue-Lightness-Saturation (HLS) values according to a non-triangulation algorithm such as that proposed by Rogers. At block 330, the color components of this image are determined based on these HLS values, as described in detail below with reference to FIGS. 6-9. At block 340, the final result (color components of the image) is output. This output is one of three major types: (1) color, (2) grayscale, or (3) binary (ie black and white). Color types are further classified as either continuous tone or spot color.

【0019】ブロック350において、ブロック340
からの出力に基づいて、画像を表示装置に表示する(図
1中の142)か、あるいは画像をメモリに記憶する
(図1中の120)か、あるいはその両方を行なう。こ
の方法によれば、画像の表現と記憶が容易である。それ
は、画像の表現と記憶に用いられるビット数が最小限と
なるためである。たとえば、ブロック340からの出力
がカラー自動分類である場合、ブロック350におい
て、24ビット/画素方式を用いて画像が表示・記憶さ
れる。同様に、ブロック340からの出力がグレースケ
ール自動分類である場合、表示(図1中の142)は単
色であり、ブロック350において、8ビット/画素方
式を用いて画像が記憶される。2値画像は1画素あたり
わずか1ビットを用いて表現・記憶される。
At block 350, block 340.
The image is displayed on the display device (142 in FIG. 1), the image is stored in the memory (120 in FIG. 1), or both, based on the output from the device. According to this method, it is easy to represent and store the image. This is because the number of bits used to represent and store the image is minimal. For example, if the output from block 340 is automatic color classification, then at block 350 the image is displayed and stored using a 24-bit / pixel scheme. Similarly, if the output from block 340 is grayscale auto-classification, the display (142 in FIG. 1) is monochromatic and at block 350 the image is stored using the 8-bit / pixel scheme. Binary images are represented and stored using only one bit per pixel.

【0020】図4はRGB色空間とHLS色空間の関係
図を示す。RGB色立方体の原点410はHLS六角錐
の第1の頂点410に変換される。この410は黒を表
わす。白は420のRGB色立方体の反対の角によって
表わされる。これはHLS六角錐の第2の頂点420に
変換することができる、グレースケール画像は飽和度の
低い(すなわち、HLS六角錐の軸に近い)ものであ
り、黒の頂点410から白の頂点420までの範囲にあ
る。
FIG. 4 shows the relationship between the RGB color space and the HLS color space. The origin 410 of the RGB color cube is transformed into the first vertex 410 of the HLS hexagonal pyramid. This 410 represents black. White is represented by the opposite corners of the 420 RGB color cube. This can be transformed into a second vertex 420 of the HLS hexagonal pyramid, the grayscale image is less saturated (ie, closer to the axis of the HLS hexagonal pyramid), the black vertex 410 to the white vertex 420. Range up to.

【0021】図5はRGB−HLS変換関数(図3の3
20と図2の212)のより詳細なフロー図を示す。こ
の関数については、RGB−HLS変換処理速度を上げ
るために、浮動小数点計算は固定小数点計算に変換され
た。
FIG. 5 shows the RGB-HLS conversion function (3 in FIG. 3).
20 and a more detailed flow diagram of 212 of FIG. 2). For this function, floating point calculations were converted to fixed point calculations to speed up the RGB-HLS conversion process.

【0022】この関数によって、ブロック510におい
て走査された画像の1つの画素が得られる。ブロック5
20においては、最大RGB値と最小RGB値の和の半
分に基づいて、その画素の明度値が判定される。たとえ
ば、ある画素のRGB値が、 赤=10 緑=20 青=30 である場合、このときの明度値は、 (30+10)/2=20 であり、最大値が青=30で、最小値が赤=10であ
る。
This function results in one pixel of the image scanned in block 510. Block 5
At 20, the brightness value of the pixel is determined based on half of the sum of the maximum RGB value and the minimum RGB value. For example, when the RGB value of a pixel is red = 10 green = 20 blue = 30, the brightness value at this time is (30 + 10) / 2 = 20, the maximum value is blue = 30, and the minimum value is Red = 10.

【0023】ブロック520において、制御は画素の飽
和度値を判定するブロック530にわたされる。最大R
GB値と最小RGB値の差がある小さな値(経験的には
この小さな値は15である)、画素はグレースケールで
あり、したがって飽和度は0に設定される。あるいは飽
和度は(1)この差の比率とその和に等しいかそれより
小さいある数に基づく、あるいは(2)完全な飽和を示
す数に等しく設定される。この関数が飽和度値を大きい
値に設定するとき、計算が固定小数点に変換されている
ため、この大きな数は“1”と等価であることに注意し
なければならない。
At block 520, control is passed to block 530 which determines the saturation value of the pixel. Maximum R
A small value where there is a difference between the GB value and the minimum RGB value (empirically this small value is 15), the pixel is grayscale and therefore the saturation is set to zero. Alternatively, the degree of saturation is set (1) based on some number equal to or less than the ratio of this difference and its sum, or (2) equal to a number indicating complete saturation. It should be noted that when the function sets the saturation value to a large value, this large number is equivalent to "1" because the calculation has been converted to fixed point.

【0024】飽和度が判定されると、制御は画素の色相
値を判定するブロック540にわたされる。色相はRG
B値の最大値の判定に基づき、この最大値を用いてこの
最大値と他のRGB値の間の差を計算することによって
得られる。たとえば、上の値を用いると、最大値は青=
30である。次に、差は次のように計算される。 (青―緑)―(青―赤) すなわち、 (30−20)−(30−10)=−10
Once the saturation is determined, control is passed to block 540 which determines the hue value of the pixel. Hue is RG
Based on the determination of the maximum B-value, this maximum is used to obtain the difference between this maximum and the other RGB values. For example, using the above values, the maximum value is blue =
Thirty. The difference is then calculated as: (Blue-green)-(blue-red) That is, (30-20)-(30-10) =-10

【0025】次に、この差が、分子と最大RGB値と最
小RGB値の差の比の分子として用いられる。
Next, this difference is used as the numerator and the numerator of the ratio of the difference between the maximum RGB value and the minimum RGB value.

【0026】ブロック520、530および540にお
いて、判定は固定小数点計算を用いるためにその結果に
整数を加算および/または乗算することによって変更さ
れる。この固定小数点計算法によって、処理装置(図1
の110)は浮動小数点計算を用いる場合より速くRG
B値をHLS値に変換することができる。
At blocks 520, 530 and 540, the decision is modified by adding and / or multiplying the result by an integer to use fixed point arithmetic. By this fixed point calculation method, the processing device (see FIG.
110) of RG is faster than when using floating point calculation
The B value can be converted to an HLS value.

【0027】RGB値がHLS値に変換されると、ブロ
ック550において、その画素は適当なHLSアレーに
割り当てられる。かかるアレーは、指定された特性に該
当する画素をカウントするカウンタである。それぞれの
画素のHLS特性を記録するための好適なルーチンは下
記に示す表1の通りである。
Once the RGB values have been converted to HLS values, at block 550 the pixel is assigned to the appropriate HLS array. The array is a counter that counts the pixels corresponding to the specified characteristics. A preferred routine for recording the HLS characteristics of each pixel is shown in Table 1 below.

【0028】[0028]

【表1】 [Table 1]

【0029】他の色空間変換を本発明の範囲から逸脱す
ることなく実行することができる。たとえば、RGBか
らHIV(色相、明度および値)並進運動の変換やRG
Bからマンセル表色系への変換等を本発明の範囲から逸
脱することなくRGBをHLS変換を行なうことができ
る。
Other color space conversions can be performed without departing from the scope of the invention. For example, conversion from RGB to HIV (hue, lightness and value) translational motion or RG
HLS conversion of RGB can be performed without departing from the scope of the present invention such as conversion from B to Munsell color system.

【0030】画素が記録およびカウントされると、制御
はこの画素を黄味がかったグレーとして分類することが
できるかどうかを判定する判断ブロック560に渡され
る。明度値が178から228の間であり、色相値が6
0より小さい場合、この画素は淡黄色がかったグレーと
考えられ、ブロック565はカウンタを1だけインクリ
メントする。ブロック570からブロック510に戻
り、走査された画像の各画素が変換されるまで次の画素
を得る。各画素が変換されると、ブロック570は制御
を後に図6から図9を参照して詳細に説明するカラー自
動分類関数にわたす。
Once the pixel has been recorded and counted, control is passed to decision block 560 which determines if the pixel can be classified as yellowish gray. The lightness value is between 178 and 228 and the hue value is 6
If less than 0, the pixel is considered to be a pale yellowish gray and block 565 increments the counter by one. Returning from block 570 to block 510, the next pixel is obtained until each pixel of the scanned image has been transformed. Once each pixel has been transformed, block 570 passes control to a color auto-classification function, which is described in detail below with reference to FIGS.

【0031】図6は本発明のカラー自動分類関数(図3
の330と図2の231)のフロー図を示す。RGBか
らHLSへの変換関数がすべての画素をHLS色空間に
変換すると、ブロック620でその画像に関連する画素
の総数をカウントし、この数が小さいしきい値数である
場合、画像のタイプとして“カラー”を返す。一実施例
においては、10がこのしきい値数として選択される。
しきい値数は、少数の画素しか持たない画像の画像タイ
プを判定する場合に確信がないために用いられる。デフ
ォルト値“カラー”はユーザーの好みとして選択され
る。本発明の範囲から逸脱することなく、異なるしきい
値およびデフォルト画像タイプを選択することができ
る。
FIG. 6 shows the automatic color classification function (FIG. 3) of the present invention.
330 and 231) of FIG. 2 are shown. Once the RGB to HLS conversion function has converted all pixels to the HLS color space, block 620 counts the total number of pixels associated with the image, and if this number is a small threshold number, then as the type of image. Returns "color". In one embodiment, 10 is selected as this threshold number.
The threshold number is used because of uncertainty when determining the image type of an image that has only a few pixels. The default value "color" is selected as a user preference. Different thresholds and default image types can be selected without departing from the scope of the invention.

【0032】次に、ブロック640は、画像がグレーあ
るいはグレーがかった黄色であるとき、グレースケール
自動分類関数(図2の235)を呼び出す。グレースケ
ール自動分類関数は画像に含まれる画素のRGB値に基
づいてグレースケール画像であるか2値画像であるかの
判定を行なう。
Next, block 640 calls the grayscale auto-classification function (235 in FIG. 2) when the image is gray or greyish-yellow. The grayscale automatic classification function determines whether the image is a grayscale image or a binary image based on the RGB values of the pixels included in the image.

【0033】ブロック660において、淡黄色がかった
グレーの画素の数(図5の560および565とその関
連説明を参照されたい)と高飽和度に基づいて、画像が
テキストページであるかどうかの判定が行なわれる。画
像がテキストページである場合、ブロック660は“バ
イナリ”の画像タイプを返す。
At block 660, it is determined whether the image is a text page based on the number of light yellowish gray pixels (see 560 and 565 of FIG. 5 and associated description) and high saturation. Is performed. If the image is a text page, block 660 returns a "binary" image type.

【0034】ブロック620、640および660の条
件が満たされない場合、ブロック680は画像タイプと
して“カラー”を返す。
If the conditions of blocks 620, 640 and 660 are not met, block 680 returns "color" as the image type.

【0035】図7はこの色自動分類関数のより詳細なフ
ロー図を示す。特に、図7は図6における620と64
0の始めを拡大して示す。図6の620の拡大図の始点
であるブロック710において、色自動分類関数に用い
られる変数が初期設定される。かかる変数には、使用さ
れる画素の総数、色相値を有する画素の数、およびグレ
ーのパーセンテージ、黄色のパーセンテージ等の特性パ
ーセンテージ等がある。かかる変数がゼロに初期設定さ
れると、ブロック712において使用される画素の数が
カウントされる。使用画素数は画像中の画素の総数であ
るとは限らない。画像データをn個おきの画素を用いて
分析することができる(nは1より大きい整数)。一実
施例において、nは対象とする走査領域中の画素の総数
を画像のタイプの判定に必要な最適な画素数で割った比
であり、この最適な数は20000である。
FIG. 7 shows a more detailed flow chart of this automatic color classification function. In particular, FIG. 7 shows 620 and 64 in FIG.
The beginning of 0 is shown enlarged. At block 710, which is the starting point of the enlarged view of 620 in FIG. 6, variables used in the automatic color classification function are initialized. Such variables include the total number of pixels used, the number of pixels having a hue value, and characteristic percentages such as gray percentage, yellow percentage, and the like. When such a variable is initialized to zero, the number of pixels used in block 712 is counted. The number of pixels used is not necessarily the total number of pixels in the image. The image data can be analyzed using every nth pixel (n is an integer greater than 1). In one embodiment, n is the ratio of the total number of pixels in the scan area of interest divided by the optimal number of pixels needed to determine the type of image, the optimal number being 20000.

【0036】使用される画素の数がカウントされると、
判断ブロック720において、自動分類を行なうのに十
分な数の画素があるかどうかが判定される。使用される
画素の数がしきい値量を越えない場合、ブロック720
は制御を自動分類をデフォルト値“COLOR”に設定
するブロック722に渡し、次にブロック724に渡し
て、主プログラムに戻る。十分な数の画素がある場合、
ブロック720はさらに分析を行なうために制御をブロ
ック730に渡す。一実施例においては、この画素しき
い値量は10であり、それより小さい場合不十分とみな
され、この方法では処理が停止され、単にブロック72
2および724を介して“カラー”自動分類が返され
る。自動分類で返される“COLOR”はユーザーの好
みによってデフォルト値として選択される。ほとんどの
ユーザーはカラー能力を有するコンピュータシステムを
用いており、カラー画像を期待している。“グレイスケ
ール”あるいは“バイナリ”はデフォルト自動分類とし
て用いられてきた。
When the number of pixels used is counted,
At decision block 720, it is determined whether there are enough pixels to perform automatic classification. If the number of pixels used does not exceed the threshold amount, block 720
Passes control to block 722 which sets the automatic classification to the default value "COLOR" and then to block 724 to return to the main program. If you have enough pixels,
Block 720 passes control to block 730 for further analysis. In one embodiment, this pixel threshold amount is 10 and any less than that is considered inadequate and the method stops the process, simply block 72.
The "color" automatic classification is returned via 2 and 724. "COLOR" returned by automatic classification is selected as a default value according to user preference. Most users use computer systems that have color capabilities and expect color images. "Grayscale" or "binary" has been used as the default automatic classification.

【0037】使用される画素の数が10より多い場合、
この方法は図6の640に入って、その画像がグレース
ケールか2値画像であるかを判定する。飽和度と色相に
ついて初期計算が行なわれる。ブロック730におい
て、色相を有する画素の数が計算される。色相[12]
の配列中にある無色相の画素は基本的にグレースケール
の画素である。次に、ブロック732において、グレー
スケールの画素のパーセンテージが計算される。グレー
パーセントは低飽和度の画素の数を使用される画素の数
で割ったものに等しい。低飽和度画素は飽和度[0..
2]の配列中にある。
If the number of pixels used is greater than 10,
The method enters 640 of FIG. 6 to determine if the image is a grayscale or binary image. Initial calculations are performed for saturation and hue. At block 730, the number of pixels having a hue is calculated. Hue [12]
The colorless phase pixels in the array are basically grayscale pixels. Next, at block 732, the percentage of grayscale pixels is calculated. The gray percentage is equal to the number of low saturation pixels divided by the number of pixels used. Low saturation pixels are saturated [0 ..
2] in the array.

【0038】図8は図7の続きであり、図6の640を
さらに拡大したものである。判断ブロック810におい
て、色相値を有する画素があるかどうかが判定され、色
相を有する画素がない場合、制御を判断ブロック820
に渡し、判断ブロック820において、グレー画素のパ
ーセンテージが0.9以下であるかどうかが判定され
る。色相を有する画素が存在する場合、ブロック810
は制御を黄色がかった画素のパーセンテージを計算する
ブロック812に渡す。“黄色がかった”画素は色相
[1..2]の配列中にある画素である。黄色がかった画
素のパーセンテージは黄色がかった画素の数を色相値を
有する画素の数で割ることによって判定される。ブロッ
ク812において黄色がかった画素のパーセンテージが
計算された後、ブロック812は制御を判断ブロック8
20に返す。
FIG. 8 is a continuation of FIG. 7 and is a further enlargement of 640 of FIG. At decision block 810, it is determined whether there are pixels that have a hue value, and if there are no pixels that have a hue, then control is passed to decision block 820.
And in decision block 820 it is determined whether the percentage of gray pixels is less than or equal to 0.9. If there are pixels with hue, block 810
Passes control to block 812 which calculates the percentage of yellowish pixels. A "yellowish" pixel is a pixel in the array of hues [1..2]. The percentage of yellowish pixels is determined by dividing the number of yellowish pixels by the number of pixels having a hue value. After the percentage of yellowish pixels has been calculated in block 812, block 812 determines control block 8
Return to 20.

【0039】フローチャートのこの点に到達すると、こ
の画像がグレースケール画像であるか2値画像であるか
が判定される。この方法では、画像がグレーであるか黄
色がかった色相を有するグレーであるかどうかを判定す
ることによってこの判定を行なう。判断ブロック820
ではまず画像がグレーであるかどうかを判定する、“グ
レーの”画像のしきい値は90%すなわち0.9であ
る。したがって、図7のブロック732で計算されたグ
レースケール画素のパーセンテージが0.9以上である
場合、制御はさらにグレースケールの判定を行なうため
に判断ブロック830に渡される。グレースケール画素
のパーセンテージが0.9より低い場合、制御は図9の
ブロック910に渡される。
When this point in the flow chart is reached, it is determined whether this image is a grayscale image or a binary image. This method makes this determination by determining whether the image is gray or gray with a yellowish hue. Decision block 820
The threshold for a "gray" image, which first determines if the image is gray, is 90% or 0.9. Therefore, if the percentage of grayscale pixels calculated in block 732 of FIG. 7 is greater than or equal to 0.9, control is passed to decision block 830 to make further grayscale determinations. If the percentage of grayscale pixels is less than 0.9, control is passed to block 910 of FIG.

【0040】判断ブロック830はグレースケール画素
のパーセンテージがブロック820において純粋なグレ
ーに非常に近いとして渡されたものよりさらにグレーが
かっているかどうかを判定する。グレースケール画素の
パーセンテージが0.99以上である場合、画像がグレ
ースケール画像か2値画像である可能性が高い。制御は
ブロック832に渡され、ブロック832においては、
ブロック840によるグレースケール自動分類関数の呼
び出し(図2の235)の前に、COLORカウンタと
SOME−COLORカウンタの2つのカウンタがゼロ
に初期設定される。これら2つの変数は、自動分類関数
がブロック820およびブロック830によって色成分
の存在が否定された後の色判定をバイパスするようにゼ
ロにされる。グレースケール自動分類関数(図2の23
5)は“グレイスケール”自動分類か“バイナリ”自動
分類を呼び出す。
Decision block 830 determines if the percentage of grayscale pixels is more grayed than the one passed in block 820 as being very close to pure gray. If the percentage of grayscale pixels is 0.99 or greater, then the image is likely to be a grayscale or binary image. Control is passed to block 832, where block 832
Prior to the invocation of the grayscale auto-classification function by block 840 (235 in FIG. 2), two counters, a COLOR counter and a SOME-COLOR counter, are initialized to zero. These two variables are zeroed so that the auto-classification function bypasses the color decision after the presence of color components is denied by blocks 820 and 830. Grayscale automatic classification function (23 in FIG. 2)
5) calls "Grayscale" or "Binary" autoclassification.

【0041】グレースケール画素のパーセンテージが
0.99以下である場合、制御は判断ブロック834に
渡され、判断ブロック834において、黄色がかった画
素のパーセンテージが0. 9より大きいかどうかが判定
される。色相が黄色がかっており 、グレースケール画
素のパーセンテージが0.9より大きい(ブロック82
0によって判定される)場合、これは2値画像を意味す
る。したがって、黄色がかった画素のパーセンテージが
0.9より大きい場合、制御はブロック832に渡さ
れ、ブロック832において、ブロック840によるグ
レースケール自動分類関数の呼び出し前に、”COLO
R”カウンタと”SOME−COLOR”カウンタの2
つの変数がゼロに初期設定される。黄色がかった画素の
パーセンテージが0.9以下である場合、制御は図9の
ブロック910に移る。
If the percentage of grayscale pixels is less than or equal to 0.99, control is passed to decision block 834 which determines if the percentage of yellowish pixels is greater than 0.9. The hue is yellowish and the percentage of grayscale pixels is greater than 0.9 (block 82).
(Determined by 0), this means a binary image. Therefore, if the percentage of yellowish pixels is greater than 0.9, control is passed to block 832, which calls “COLO” before the grayscale auto-classification function call by block 840.
2 of "R" counter and "SOME-COLOR" counter
Two variables are initialized to zero. If the percentage of yellowish pixels is less than or equal to 0.9, control transfers to block 910 of FIG.

【0042】図9は図8の続きであり、図6の660の
拡大図である。このフロー図のこの点に到達すると、画
像がカラー画像であるかテキストページ(すなわち2
値)であるかの判定を行なわなければならない。ブロッ
ク910において、淡黄色がかったグレーとして分類す
ることのできる画素のパーセンテージが計算される。図
5に関連して先に述べたように、明度値が178と22
8の間にあり、色相値が60より小さい場合、この画素
は淡黄色がかったグレーとみなされる。図5のブロック
565は淡黄色がかったグレーとみなされた画素の数の
カウンタを維持する。したがって、ブロック910はこ
の数を図7のブロック712で判定された使用される画
素の数で割って、淡黄色がかったグレーの画素のパーセ
ンテージが求められる。ブロック912において高飽和
度の画素のパーセンテージが計算される。飽和度[7..
9]の配列は高飽和度と考えられる。これらの配列が加
算され、その和が使用される画素の数によって割られて
高飽和度の画素のパーセンテージが得られる。
FIG. 9 is a continuation of FIG. 8 and is an enlarged view of 660 of FIG. When you reach this point in the flow diagram, whether the image is a color image or a text page (ie 2
Value) must be determined. At block 910, the percentage of pixels that can be classified as light yellowish gray is calculated. As described above in connection with FIG. 5, the brightness values are 178 and 22.
If it is between 8 and the hue value is less than 60, then this pixel is considered as a pale yellowish gray. Block 565 of FIG. 5 maintains a counter of the number of pixels that are considered light yellowish gray. Therefore, block 910 divides this number by the number of used pixels determined in block 712 of FIG. 7 to determine the percentage of light yellowish gray pixels. At block 912, the percentage of highly saturated pixels is calculated. Saturation [7 ..
9] is considered to have high saturation. These arrays are added and the sum is divided by the number of pixels used to obtain the percentage of highly saturated pixels.

【0043】次に、判断ブロック920および922に
おいて、画像がテキストページであるかどうかが判定さ
れる。淡黄色がかったグレーの画素のパーセンテージが
0.75より大きく(ブロック920)、高飽和度の画
素のパーセンテージが0.01より小さい(ブロック9
22)場合、画像はテキストページとみなされ、制御は
ブロック924に渡され、ブロック924において、画
像の自動分類がバイナリー(2値)に設定される。ブロ
ック920あるいはブロック922の結果が否である場
合、ブロック930において自動分類がカラーに設定さ
れる。一代替実施例において、ブロック930でさらに
そのカラー画像が連続階調であるかスポットカラーであ
るかを判定するようにしてもよい。連続階調タイプは色
調の異なる多数の色が存在するタイプである。スポット
カラータイプは一般に互いに区別できる2、3のはっき
りした色を有する人工の図形画像である。ブロック94
0において制御は主プログラム、光学的データリンクの
場合スキャナプログラム(図2の200)に返される。
この色自動分類関数を実施するための好適なルーチンを
下記の表2に示す。
Next, at decision blocks 920 and 922 it is determined whether the image is a text page. The percentage of light yellowish gray pixels is greater than 0.75 (block 920) and the percentage of highly saturated pixels is less than 0.01 (block 9).
22), the image is considered a text page, control is passed to block 924, where the automatic classification of the image is set to binary (binary). If the result of block 920 or block 922 is no, then in block 930 automatic classification is set to color. In an alternative embodiment, block 930 may further determine if the color image is continuous tone or spot color. The continuous tone type is a type in which many colors having different color tones exist. Spot color types are generally artificial graphic images with a few distinct colors that are distinguishable from each other. Block 94
At 0, control is returned to the main program, in the case of an optical data link the scanner program (200 in FIG. 2).
A preferred routine for implementing this automatic color classification function is shown in Table 2 below.

【0044】[0044]

【表2】 [Table 2]

【0045】本発明の実施例を参照して図示・説明した
が、本発明はここに図示した特定の構造には限定されな
い。当業者には、本発明の精神と範囲から逸脱すること
なく特許請求の範囲内でさまざまな変更が可能であるこ
とが理解されるであろう。たとえば、自動分類関数(図
2の230)は特定の画像の実際の色を同定するように
変更することができる。これは、たとえばブロック93
0の後に各画素の色相値を調べ、走査された画像を表わ
す全体的な色の判定を行なうことによって画像の色を判
定する新しいルーチンを追加することによって行なうこ
とができる。
Although illustrated and described with reference to embodiments of the invention, the invention is not limited to the particular structure illustrated. Those skilled in the art will appreciate that various modifications can be made within the scope of the claims without departing from the spirit and scope of the invention. For example, the automatic classification function (230 in FIG. 2) can be modified to identify the actual color of a particular image. This is for example block 93.
This can be done by adding a new routine that determines the color of the image by examining the hue value of each pixel after the 0 and making an overall color determination that represents the scanned image.

【0046】上記説明したように本発明に係る画像の色
成分を判定する方法は下記に示す構成とすることができ
る。 [1]1つあるいはそれ以上の画素を有する走査された
画像中の図形情報の色成分を判定する方法であって、
(a)前記画像をコンピュータシステム内に走査するス
テップ、(b)前記コンピュータシステム内に走査され
た前記の1つあるいはそれ以上の画素をカウントして結
果を出し、その結果を走査された画像の総数として第1
の記憶場所に記憶するステップ、(c)前記走査された
画像内に含まれる前記の1つあるいはそれ以上の画素に
値を割り当てて、割り当てられた画素のそれぞれを1つ
あるいはそれ以上の記憶場所に記憶し、それぞれの値は
第1の色空間を表わすステップ、(d)前記第1の色空
間のそれぞれの値を第2の空間に変換するステップ、
(e)ステップ(d)で変換された前記値に基づいて前
記走査された画像の色成分を判定するステップからな
る。
As described above, the method of determining the color component of the image according to the present invention can be configured as shown below. [1] A method for determining a color component of graphic information in a scanned image having one or more pixels,
(A) scanning the image into a computer system, (b) counting the one or more pixels scanned in the computer system to produce a result, and outputting the result to the scanned image. First in total
(C) assigning a value to the one or more pixels contained in the scanned image, each of the assigned pixels having one or more memory locations. And storing each value in the first color space, (d) converting each value in the first color space to a second space,
(E) determining the color components of the scanned image based on the values converted in step (d).

【0047】[2]前記第1の色空間は赤の値、緑の
値、および青の値からなる[1]に記載の方法である。
[2] The method according to [1], wherein the first color space is composed of red values, green values, and blue values.

【0048】[3]前記第2の色空間は色相値、明度
値、および飽和度値からなる[2]に記載の方法であ
る。
[3] The method according to [2], wherein the second color space comprises a hue value, a lightness value, and a saturation value.

【0049】[4]上記[3]に記載の方法であって、
(f)前記走査された画素の総数がしきい値量に等しい
かどうかを判定するステップ、(g)前記走査された画
素の総数が前記しきい値量より小さい場合、カラーの自
動分類を返すステップ、(h)前記走査された画素の総
数が前記しきい値量以上である場合、前記走査された画
像がグレーであるかグレーがかった黄色であるかを判定
するステップ、(i)前記画像がグレーであるかグレー
がかった黄色である場合、前記走査された画像のグレー
スケールタイプを判定するステップ、(j)前記走査さ
れた画像がテキストページであるかどうかを判定し、前
記走査された画像がテキストページである場合、2値の
自動分類を返すステップ、および(k)前記走査された
画像がテキストページでない場合、カラーの自動分類を
返すステップからなる方法である。
[4] The method described in [3] above, wherein
(F) determining whether the total number of scanned pixels is equal to a threshold amount, and (g) returning the automatic color classification if the total number of scanned pixels is less than the threshold amount. Step (h) determining if the scanned image is gray or greyish yellow if the total number of scanned pixels is greater than or equal to the threshold amount; (i) the image Is gray or greyish-yellow, determining the grayscale type of the scanned image, (j) determining whether the scanned image is a text page, and scanning the scanned image. From the step of returning a binary auto-classification if the image is a text page, and (k) returning the color auto-classification if the scanned image is not a text page It is that way.

【0050】[5]上記[4]に記載の方法であって、
ステップ(h)が(i)走査された画素の総数から色相
値を有しない画素の数を表わすを減算することによって
色相値を有する画素の数を表わす第1の数を計算するス
テップ、(m)飽和度の低い画素の数を走査された画素
の総数で割ることによって飽和度の低い画素のパーセン
テージを表わす第2の数を計算するステップ、(n)前
記第1の数が1以上である場合、色相値の低い画素の数
を前記第1の数で割ることによって黄色がかった色相を
有する画素のパーセンテージを表わす第3の数を計算す
るステップ、(o)前記第2の数が0.9以上であるか
どうかを判定し、前記第2の数が0.9より小さい場
合、ステップ(k)に進むステップ、(p)前記第2の
数が0.9以上である場合、前記第2の数が0. 99以
上であるかどうかを判定し、前記第2の数が0.99以
上である場合、ステップ(i)に進むステップ、(q)
前記第2の数が0.99より小さいが0.9以上である
場合、前記第3の数が0.9以上であるかどうかを判定
し、前記第3の数が0.9より小さい場合、ステップ
(j)に進むステップ、および、(r)前記第3の数が
0.9以上である場合、ステップ(i)に進むステップ
からなる方法である。
[5] The method described in [4] above, wherein
Calculating a first number representing the number of pixels having a hue value by subtracting (i) representing the number of pixels having no hue value from (i) the total number of pixels scanned, (m) ) Calculating a second number representing the percentage of less saturated pixels by dividing the number of less saturated pixels by the total number of scanned pixels, (n) said first number being one or more. Calculating a third number representing the percentage of pixels having a yellowish hue by dividing the number of pixels with a low hue value by the first number, (o) said second number being 0. 9 or more, and if the second number is smaller than 0.9, proceed to step (k), (p) if the second number is 0.9 or more, Whether the number of 2 is more than 0.99 Constant, and if the second number is 0.99 or more, the step proceeds to step (i), (q)
When the second number is smaller than 0.99 but is 0.9 or more, it is determined whether the third number is 0.9 or more, and when the third number is smaller than 0.9 , Step (j), and (r) if the third number is 0.9 or more, the method proceeds to step (i).

【0051】[6]上記[5]に記載の方法であって、
ステップ(j)が(s)淡黄色がかったグレーの色相値
を有する画素の数を走査された画素の総数で割ることに
よって、淡黄色がかったグレーの色相値を有する画素の
パーセンテージを表わす第4の数を計算するステップ、
(t)飽和度値の高い画素の数を走査された画素の総数
で割ることによって飽和度値の高い画素のパーセンテー
ジを表わす第5の数を計算するステップ、(u)前記第
4の数が0.75より大きいかどうかを判定し、前記第
4の数が0.75より小さい場合、カラーの自動分類を
返すステップ、(v)前記第4の数が0.75より大き
い場合、前記第5の数が0.01より小さいかどうかを
判定し、前記第5の数が0.01より大きい場合、カラ
ーの自動分類を返すステップ、(w)前記第4の数が
0.75より大きく、前記の第5の数が0.01より小
さい場合、2値の自動分類を返すステップからなる方法
である。
[6] The method described in [5] above, wherein
Step (j) (s) expresses the percentage of pixels having a light yellowish gray hue value by dividing the number of pixels having a light yellowish gray hue value by the total number of pixels scanned. The step of calculating the number of
(T) calculating a fifth number representing the percentage of pixels with high saturation values by dividing the number of pixels with high saturation values by the total number of pixels scanned, (u) wherein the fourth number is Determining if it is greater than 0.75 and returning an automatic classification of colors if the fourth number is less than 0.75, (v) if the fourth number is greater than 0.75, Determining if the number 5 is less than 0.01, and returning the automatic color classification if the fifth number is greater than 0.01; (w) the fourth number is greater than 0.75. , The fifth number is less than 0.01, a binary automatic classification is returned.

【0052】[0052]

【発明の効果】上記説明した構成にすることのより本発
明に係るコンピュータ図形画像の色成分の判定方法は、
画像を走査するステップ、走査された画素をカウント
し、その結果を走査された画像の総数として第1の記憶
場所に記憶し、走査された画像内に含まれる画素に値を
割り当てて、割り当てられた画素のそれぞれを1つある
いはそれ以上の記憶場所に記憶し、それぞれの値は第1
の色空間を表わし、第1の色空間のそれぞれの値を第2
の空間に変換し、この変換された値に基づいて走査され
た画像の色成分を判定するようにしたことにより、図形
画像のメモリ割り当てをその画像の条件にしたがって行
なうことができるようになり、画像のより効率的な表現
と記憶を容易に行なえ、例えば24ビット/画素方式を
用いてフルカラー画像を記憶することができ、8ビット
/画素を用いてグレースケール画像を記憶することがで
き、1ビット/画素を用いて2値画像を記憶することが
でき、コンピュータグラフィックス画像を従来の方法に
記載の比べてより正確に自動的に分類することができる
と云う極めて優れた効果を奏する。
The method of determining the color components of the computer graphic image according to the present invention, which has the above-described configuration,
Scanning the image, counting the pixels scanned, storing the result in a first memory location as the total number of scanned images, assigning a value to the pixels contained in the scanned image, Each of the stored pixels in one or more memory locations, each value being the first
Of the first color space and the second value of the first color space.
By converting to the space of, and determining the color component of the scanned image based on the converted value, it becomes possible to perform the memory allocation of the graphic image according to the condition of the image, A more efficient representation and storage of the image can be easily performed, for example, a 24-bit / pixel system can be used to store a full-color image, and 8-bit / pixel can be used to store a grayscale image. Binary images can be stored using bits / pixels, which is a great advantage in that computer graphics images can be classified more accurately and automatically than in the conventional method.

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

【図1】本発明を用いた汎用デジタルコンピュータシス
テムのブロック図である。
FIG. 1 is a block diagram of a general purpose digital computer system using the present invention.

【図2】本発明のソフトウエアの概略を示す。FIG. 2 shows an outline of software of the present invention.

【図3】本発明の方法の全体的な流れのフロー図であ
る。
FIG. 3 is a flow diagram of the overall flow of the method of the present invention.

【図4】RGB色空間とHLS色空間の関係図である。FIG. 4 is a relationship diagram between an RGB color space and an HLS color space.

【図5】RGBからHLS変換機能のより詳細なフロー
図である。
FIG. 5 is a more detailed flow chart of the RGB to HLS conversion function.

【図6】本発明の自動画像分類機能のフロー図である。FIG. 6 is a flowchart of the automatic image classification function of the present invention.

【図7】自動画像分類機能のより詳細なフロー図であ
る。
FIG. 7 is a more detailed flow chart of the automatic image classification function.

【図8】自動画像分類機能のより詳細なフロー図であ
る。
FIG. 8 is a more detailed flowchart of the automatic image classification function.

【図9】自動画像分類機能のより詳細なフロー図であ
る。
FIG. 9 is a more detailed flowchart of the automatic image classification function.

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

100 汎用デジタルコンピュータシステム 110 処理装置 105 システムバス 120 メモリ 130 データ記憶ディスク 140 入出力インターフェース装置 125 領域 142 表示装置 144 キーボード 146 スキャナ 200 スキャナソフトウエア 210 データ構造割り当て/初期設定関数 220 測定プレビュー関数 230 自動分類関数 211 24ビット処理ルーチン 215 8ビット処理ルーチン 212 HLS関数 213 RGB画素測定関数 231 カラー自動分類関数 235 グレースケール自動分類関数 310、320、330、340、350 ブロック 410 RGB色立方体の原点 420 HLS六角錐の第2の頂点 510、520、530、540、550、560、5
65、570、620、640、660、680、71
2、720、722、724、730、732、81
0、812、830、832、834、910、91
2、920、922、924、930、940 ブロ
ック
100 general-purpose digital computer system 110 processor 105 system bus 120 memory 130 data storage disk 140 input / output interface device 125 area 142 display device 144 keyboard 146 scanner 200 scanner software 210 data structure allocation / initialization function 220 measurement preview function 230 automatic classification Function 211 24-bit processing routine 215 8-bit processing routine 212 HLS function 213 RGB pixel measurement function 231 Color automatic classification function 235 Grayscale automatic classification function 310, 320, 330, 340, 350 block 410 RGB color cube origin 420 HLS hexagonal pyramid Second vertices of 510, 520, 530, 540, 550, 560, 5
65, 570, 620, 640, 660, 680, 71
2, 720, 722, 724, 730, 732, 81
0, 812, 830, 832, 834, 910, 91
2,920,922,924,924,930,940 blocks

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 1つあるいはそれ以上の画素を有する走
査された画像中の図形情報の色成分を判定する方法であ
って、 (a)前記画像をコンピュータシステム内に走査するス
テップ、 (b)前記コンピュータシステム内に走査された前記1
つあるいはそれ以上の画素をカウントして結果を出し、
その結果を走査された画像の総数として第1の記憶場所
に記憶するステップ、 (c)前記走査された画像内に含まれる前記の1つある
いはそれ以上の画素に値を割り当てて、割り当てられた
画素のそれぞれを1つあるいはそれ以上の記憶場所に記
憶し、それぞれの値は第1の色空間を表わすステップ、 (d)前記第1の色空間のそれぞれの値を第2の空間に
変換するステップ、 (e)ステップ(d)で変換された前記値に基づいて前
記走査された画像の色成分を判定するステップからなる
コンピュータ図形画像の色成分判定方法。
1. A method of determining color components of graphical information in a scanned image having one or more pixels, the method comprising: (a) scanning the image into a computer system; The one scanned into the computer system
Count one or more pixels and give the result,
Storing the result in a first memory location as the total number of scanned images, (c) assigning a value to the one or more pixels contained in the scanned image Storing each of the pixels in one or more memory locations, each value representing a first color space, (d) converting each value of the first color space to a second space A method for determining a color component of a computer graphic image, which comprises the steps of: (e) determining a color component of the scanned image based on the values converted in step (d).
JP6275818A 1993-10-13 1994-10-13 Judgement method of color component of computer graphic picture Pending JPH07182516A (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
US135,932 1987-12-21
US13593293A 1993-10-13 1993-10-13

Publications (1)

Publication Number Publication Date
JPH07182516A true JPH07182516A (en) 1995-07-21

Family

ID=22470447

Family Applications (1)

Application Number Title Priority Date Filing Date
JP6275818A Pending JPH07182516A (en) 1993-10-13 1994-10-13 Judgement method of color component of computer graphic picture

Country Status (1)

Country Link
JP (1) JPH07182516A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108292613A (en) * 2015-11-16 2018-07-17 应用材料公司 Colour imaging for CMP monitoring
US11776109B2 (en) 2019-02-07 2023-10-03 Applied Materials, Inc. Thickness measurement of substrate using color metrology

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108292613A (en) * 2015-11-16 2018-07-17 应用材料公司 Colour imaging for CMP monitoring
CN108292613B (en) * 2015-11-16 2022-10-04 应用材料公司 Color imaging for CMP monitoring
US11715193B2 (en) 2015-11-16 2023-08-01 Applied Materials, Inc. Color imaging for CMP monitoring
US11776109B2 (en) 2019-02-07 2023-10-03 Applied Materials, Inc. Thickness measurement of substrate using color metrology

Similar Documents

Publication Publication Date Title
EP1006716B1 (en) Method and apparatus for segmenting data to create mixed raster content planes
EP1014699B1 (en) Method of selecting colors for pixels within blocks for block truncation encoding
US7729025B2 (en) Color image compressing method and device
JP4242532B2 (en) Digital image data classification method
US5644406A (en) Method for selecting an optimum encoding process for a block of pixels from a plurality of predefined encoding processes
US5684895A (en) Method for decoding a compressed image
US7116443B2 (en) Neutral pixel detection using color space feature vectors wherein one color space coordinate represents lightness
US20030198381A1 (en) Image compression method and apparatus, and image coding method and apparatus
EP1453006A1 (en) Converted digital colour image with improved colour distinction for colour-blinds
JPH11232443A (en) Method for generating color pallet, picture processing method and picture processor
JPH07225826A (en) Picture editing device for image processing system
US6774909B1 (en) Method and apparatus for transforming color image into monochromatic image
US5825986A (en) Method for determining ink requirements
US7075681B1 (en) System and method for reducing the data volume of images
US6259813B1 (en) Method and apparatus for image processing using a signal of multiple scale values
JPH1166301A (en) Color image classification method and apparatus and recording medium recording this method
EP1670257B1 (en) Compressing a mutlivalue image with control of memory space requirement
US20020126312A1 (en) Accelerating color conversion using a temporary palette cache
JP2004229261A (en) Image-compressing method, image-compressing device, program, and recording media
US20060209125A1 (en) Color image processing apparatus
JP2002218263A (en) Image processing method and device for performing color/ texture conversion
JPH07182516A (en) Judgement method of color component of computer graphic picture
JP3482106B2 (en) Luminance image generation method and apparatus, and recording medium recording this method
EP1006717B1 (en) Method and apparatus for segmenting data
EP1453008A1 (en) Cocverted digital colour image with improved colour distinction for colour-blinds