JPH11252385A - Color character discriminating method - Google Patents

Color character discriminating method

Info

Publication number
JPH11252385A
JPH11252385A JP10053219A JP5321998A JPH11252385A JP H11252385 A JPH11252385 A JP H11252385A JP 10053219 A JP10053219 A JP 10053219A JP 5321998 A JP5321998 A JP 5321998A JP H11252385 A JPH11252385 A JP H11252385A
Authority
JP
Japan
Prior art keywords
value
rgb
data
color
character
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.)
Withdrawn
Application number
JP10053219A
Other languages
Japanese (ja)
Inventor
Tetsuo Tanaka
哲夫 田中
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP10053219A priority Critical patent/JPH11252385A/en
Publication of JPH11252385A publication Critical patent/JPH11252385A/en
Withdrawn legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To provide a color character discriminating method capable of accurately discriminating the color character. SOLUTION: This color character discriminating method comprises the discriminating the color of a character image from the values of three input data of RGB with respect to a pixel which is discriminated to be a character image by an image attribute discriminating processing of a character, a dot, a photograph, etc. In this case, the method comprises a difference minimum value discriminating step S6 for obtaining a difference minimum value as a minimum value within the difference of arbitrary two data of RGB data, an RGB minimum value discriminating step 7 of obtaining an RGB minimum value as a minimum value within RGB data values and color discriminating steps S8 to S18 of discriminating the color of a character image, based on the RGB minimum value and the difference minimum value.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、文字画像の色を判
別する色文字判別方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a color character discrimination method for discriminating a color of a character image.

【0002】[0002]

【従来の技術】地図や図面、文書、印刷・印画紙写真等
の原稿をスキャナ等で読み取り、プリンタやPC(パー
ソナルコンピュータ)等に出力する場合、特に文字の精
鋭度を目的とした適応処理が行われている。この適応処
理においては、黒文字と色文字との判別だけでなく、色
文字を更にシアン、マゼンタ、イエロー、レッド、グリ
ーン、ブルーの色に判別することにより、より文字精鋭
度を向上させた画像処理が可能となる。
2. Description of the Related Art When an original such as a map, a drawing, a document, a print or a photographic paper is read by a scanner or the like and output to a printer or a PC (personal computer), an adaptive process especially for the sharpness of characters is performed. Is being done. In this adaptive processing, not only the distinction between black characters and colored characters, but also the color characters are further distinguished into cyan, magenta, yellow, red, green, and blue colors, thereby further improving character sharpness. Becomes possible.

【0003】以下、従来の色文字判別方法について、R
GBの判定ビットと各色との関係を示す(表1)および
図17を参照しながら説明する。図17は従来の色文字
判別方法を示すフローチャートである。
[0003] A conventional color character discriminating method will be described below.
The relationship between the GB determination bit and each color will be shown (Table 1) and will be described with reference to FIG. FIG. 17 is a flowchart showing a conventional color character determination method.

【0004】[0004]

【表1】 [Table 1]

【0005】図17において、まず、文字判別された多
階調の画像データ(文字画像データ)を入力し(S11
0)、その画像データの注目画素のRGBの3データを
読み込む(S111)。次にRデータとしきい値(入力
8ビットデータの中央の値128)とを比較し(S11
2)、Rデータがしきい値以上のときはRの判定ビット
に「1」を入れ(S113)、Rデータがしきい値未満
のときはRの判定ビットに「0」を入れる(S11
4)。次にGデータとしきい値とを比較し(S11
5)、Gデータがしきい値以上のときはGの判定ビット
に「1」を入れ(S116)、Gデータがしきい値未満
のときはGの判定ビットに「0」を入れる(S11
7)。更にBデータとしきい値とを比較し(S11
8)、Bデータがしきい値以上のときはBの判定ビット
に「1」を入れ(S119)、Bデータがしきい値未満
のときはBの判定ビットに「0」を入れる(S12
0)。
In FIG. 17, first, multi-gradation image data (character image data) whose characters have been determined is input (S11).
0), the three RGB data of the target pixel of the image data are read (S111). Next, the R data is compared with a threshold value (the central value 128 of the input 8-bit data) (S11).
2) If the R data is equal to or greater than the threshold value, "1" is inserted into the R determination bit (S113), and if the R data is less than the threshold value, "0" is inserted into the R determination bit (S11).
4). Next, the G data is compared with the threshold value (S11).
5) If the G data is equal to or larger than the threshold, "1" is set to the G determination bit (S116), and if the G data is smaller than the threshold, "0" is set to the G determination bit (S11).
7). Further, the B data is compared with the threshold value (S11).
8) If the B data is equal to or larger than the threshold, "1" is set to the B determination bit (S119), and if the B data is smaller than the threshold, "0" is set to the B determination bit (S12).
0).

【0006】ここで、(表1)を参照し、シアン、マゼ
ンタ、イエロー、レッド、グリーン、ブルーの文字の色
を決定する(S121)。例えば、Rの判定ビットが
「1」、Gの判定ビットが「0」、Bの判定ビットが
「0」のときは、レッド文字であると決定する。
Here, referring to (Table 1), the colors of the characters cyan, magenta, yellow, red, green, and blue are determined (S121). For example, when the determination bit of R is “1”, the determination bit of G is “0”, and the determination bit of B is “0”, it is determined that the character is a red character.

【0007】以上で、注目画素の色文字判別処理が終了
し(S122)、次の注目画素のRGBデータが読み出
され(S111)、上記処理(ステップ111〜ステッ
プ122)が繰り返される。全ての画素の色文字判別処
理が終了したならば(S122)、色文字判別処理は終
了する。
As described above, the color character discrimination processing of the target pixel is completed (S122), the RGB data of the next target pixel is read (S111), and the above processing (steps 111 to 122) is repeated. When the color character discrimination processing for all pixels is completed (S122), the color character discrimination processing ends.

【0008】[0008]

【発明が解決しようとする課題】しかしながら、上記従
来の色文字判別方法では、しきい値が中央値の固定値で
あり、文字の色を判別する際に文字の濃度やしきい値に
よる影響が大きく、文字判別の精度としては低いもので
あるという問題点を有していた。
However, in the above-described conventional color character discrimination method, the threshold value is a fixed value of the median value, and the influence of the character density and the threshold value when discriminating the character color is determined. There is a problem in that the accuracy of character discrimination is large and low.

【0009】この色文字判別方法では、色文字判別の際
に高精度に色を判別することが要求されている。
In this color character discriminating method, it is required that color discrimination be performed with high accuracy in color character discrimination.

【0010】本発明は、高精度に文字の色を判別するこ
とができる色文字判別方法を提供することを目的とす
る。
It is an object of the present invention to provide a color character discriminating method capable of discriminating a character color with high accuracy.

【0011】[0011]

【課題を解決するための手段】この課題を解決するため
に本発明の請求項1に記載の色文字判別方法は、文字、
網点、写真等の画像属性判別処理により、文字画像と判
別された画素に対して、RGBの3入力データの値から
文字画像の色を判別する色文字判別方法であって、RG
Bデータの任意の2つのデータの差分の内の最小値とし
ての差分最小値を求める差分最小値判別ステップと、R
GBデータ値の内の最小値としてのRGB最小値を求め
るRGB最小値判別ステップと、RGB最小値と差分最
小値とに基づいて文字画像の色を判別する色判別ステッ
プとを有する構成を備えている。
In order to solve this problem, a color character discriminating method according to claim 1 of the present invention comprises a character,
A color character discrimination method for discriminating a color of a character image from values of three input data of RGB for a pixel determined to be a character image by image attribute determination processing such as a halftone dot or a photograph.
A difference minimum value determining step of obtaining a difference minimum value as a minimum value of a difference between any two data of the B data;
An RGB minimum value determining step of determining an RGB minimum value as a minimum value among the GB data values; and a color determining step of determining a color of a character image based on the RGB minimum value and the difference minimum value. I have.

【0012】これにより、高精度に文字の色を判別する
ことができる色文字判別方法が得られる。
As a result, a color character discriminating method capable of discriminating the character color with high accuracy is obtained.

【0013】[0013]

【発明の実施の形態】本発明の請求項1に記載の発明
は、文字、網点、写真等の画像属性判別処理により、文
字画像と判別された画素に対して、RGBの3入力デー
タの値から文字画像の色を判別する色文字判別方法であ
って、RGBデータの任意の2つのデータの差分の内の
最小値としての差分最小値を求める差分最小値判別ステ
ップと、RGBデータ値の内の最小値としてのRGB最
小値を求めるRGB最小値判別ステップと、RGB最小
値と差分最小値とに基づいて文字画像の色を判別する色
判別ステップとを有することとしたものであり、文字濃
度やしきい値が色判別に使用されず、文字濃度やしきい
値による影響が無いという作用を有する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS The invention according to claim 1 of the present invention is a method of determining three input data of RGB for a pixel determined to be a character image by image attribute determination processing of characters, halftone dots, photographs, and the like. A color character discriminating method for discriminating a color of a character image from a value, a difference minimum value discriminating step of obtaining a difference minimum value as a minimum value of a difference between arbitrary two data of RGB data, And an RGB minimum value determining step of determining an RGB minimum value as a minimum value among the above, and a color determining step of determining a color of a character image based on the RGB minimum value and the difference minimum value. The density and the threshold value are not used for color discrimination, and there is an effect that the character density and the threshold value have no effect.

【0014】請求項2に記載の発明は、文字、網点、写
真等の画像属性判別処理により、文字画像と判別された
画素に対して、RGBの3入力データの値から文字画像
の色を判別する色文字判別方法であって、RGBデータ
の任意の2つのデータの差分の内の最小値としての差分
最小値を求める差分最小値判別ステップと、RGBデー
タ値の内の最大値としてのRGB最大値を求めるRGB
最大値判別ステップと、RGB最大値と差分最小値とに
基づいて文字画像の色を判別する色判別ステップとを有
することとしたものであり、文字濃度やしきい値が色判
別に使用されず、文字濃度やしきい値による影響が無い
という作用を有する。
According to a second aspect of the present invention, a color of a character image is determined for a pixel determined as a character image by image attribute determination processing of a character, a halftone dot, a photograph, or the like from the values of three input data of RGB. A color character discriminating method for discriminating, wherein a difference minimum value discriminating step of obtaining a difference minimum value as a minimum value of a difference between arbitrary two data of RGB data; and RGB as a maximum value of RGB data values. RGB to find the maximum value
A maximum value determining step; and a color determining step of determining a color of the character image based on the RGB maximum value and the minimum difference value, wherein the character density and the threshold value are not used for the color determination. Has the effect that there is no influence by the character density or the threshold value.

【0015】請求項3に記載の発明は、文字、網点、写
真等の画像属性判別処理により、文字画像と判別された
画素に対して、RGBの3入力データの値から文字画像
の色を判別する色文字判別方法であって、RGBデータ
の内の最大値としてのRGB最大値を求めるRGB最大
値判別ステップと、RGBデータの内の最小値としての
RGB最小値を求めるRGB最小値判別ステップと、R
GBデータの内の中央値としてのRGB中央値を求める
RGB中央値判別ステップと、RGB中央値をしきい値
と比較すると共にRGB最大値とRGB最小値とRGB
中央値としきい値とに基づいて文字画像の色を判別する
色判別ステップとを有することとしたものであり、しき
い値の依存は中央値のみであり、しきい値の依存性が従
来よりも低減されるという作用を有する。
According to a third aspect of the present invention, a color of a character image is determined for a pixel determined to be a character image by image attribute determination processing of a character, a halftone dot, a photograph, or the like based on three input data values of RGB. An RGB maximum value determining step of obtaining an RGB maximum value as a maximum value of RGB data, and an RGB minimum value determining step of obtaining an RGB minimum value as a minimum value of RGB data. And R
An RGB median discriminating step of finding an RGB median as a median of the GB data; comparing the RGB median with a threshold value; and a RGB maximum value, an RGB minimum value, and an RGB value.
A color discrimination step of discriminating the color of the character image based on the median value and the threshold value. Is also reduced.

【0016】請求項4に記載の発明は、請求項3に記載
の発明において、しきい値をRGB最大値およびRGB
最小値から求めるしきい値決定ステップをRGB中央値
判別ステップと色判別ステップとの間に備えることとし
たものであり、しきい値の依存はRGB最大値およびR
GB最小値のみであり、しきい値の依存性が従来よりも
低減されるという作用を有する。
According to a fourth aspect of the present invention, in the third aspect of the present invention, the threshold value is set to an RGB maximum value and an RGB value.
A step of determining a threshold value obtained from the minimum value is provided between the RGB median value determining step and the color determining step, and the threshold value depends on the RGB maximum value and the R value.
This is only the GB minimum value, and has the effect that the dependency of the threshold value is reduced as compared with the conventional case.

【0017】請求項5に記載の発明は、文字、網点、写
真等の画像属性判別処理により、文字画像と判別された
画素に対して、RGBの3入力データの値から文字画像
の色を判別する色文字判別方法であって、RGBデータ
の内の最大値としてのRGB最大値を求めるRGB最大
値判別ステップと、RGBデータの内の最小値としての
RGB最小値を求めるRGB最小値判別ステップと、R
GBデータの内の中央値としてのRGB中央値を求める
RGB中央値判別ステップと、RGB中央値とRGB最
小値との差分を求める差分算出ステップと、RGB中央
値としきい値とを比較し、差分としきい値とを比較する
と共にRGB最大値とRGB最小値とRGB中央値と差
分としきい値とに基づいて文字画像の色を判別する色判
別ステップとを有することとしたものであり、しきい値
の依存はRGB中央値および差分のみであり、しきい値
の依存性が従来よりも低減されるという作用を有する。
値文字濃度に依存しない色文字判別が行われるという作
用を有する。
According to a fifth aspect of the present invention, the color of a character image is determined for pixels determined to be a character image by image attribute determination processing for characters, halftone dots, photographs, etc., based on the values of three RGB input data. An RGB maximum value determining step of obtaining an RGB maximum value as a maximum value of RGB data, and an RGB minimum value determining step of obtaining an RGB minimum value as a minimum value of RGB data. And R
An RGB median discriminating step of obtaining an RGB median as a median of the GB data; a difference calculating step of obtaining a difference between the RGB median and the RGB minimum value; comparing the RGB median with a threshold value; And a threshold value, and a color determining step of determining the color of the character image based on the RGB maximum value, the RGB minimum value, the RGB median value, the difference, and the threshold value. The value dependence is only the RGB median value and the difference, and has the effect that the dependence on the threshold value is reduced as compared with the conventional case.
This has the effect that color character discrimination independent of the value character density is performed.

【0018】請求項6に記載の発明は、文字、網点、写
真等の画像属性判別処理により、文字画像と判別された
画素に対して、RGBの3入力データの値から文字画像
の色を判別する色文字判別方法であって、RGBデータ
の内の最大値としてのRGB最大値を求めるRGB最大
値判別ステップと、RGBデータの内の最小値としての
RGB最小値を求めるRGB最小値判別ステップと、R
GBデータの内の中央値としてのRGB中央値を求める
RGB中央値判別ステップと、RGB中央値とRGB最
大値との差分を求める差分算出ステップと、RGB中央
値としきい値とを比較し、差分としきい値とを比較する
と共にRGB最大値とRGB最小値とRGB中央値と差
分としきい値とに基づいて文字画像の色を判別する色判
別ステップとを有することとしたものであり、しきい値
の依存はRGB中央値および差分のみであり、しきい値
の依存性が従来よりも低減されるという作用を有する。
According to a sixth aspect of the present invention, a color of a character image is determined for a pixel determined to be a character image by image attribute determination processing of a character, a halftone dot, a photograph, or the like from three RGB input data values. An RGB maximum value determining step of obtaining an RGB maximum value as a maximum value of RGB data, and an RGB minimum value determining step of obtaining an RGB minimum value as a minimum value of RGB data. And R
An RGB median determining step for obtaining an RGB median as a median of the GB data; a difference calculating step for obtaining a difference between the RGB median and an RGB maximum value; comparing the RGB median with a threshold value; And a threshold value, and a color determining step of determining the color of the character image based on the RGB maximum value, the RGB minimum value, the RGB median value, the difference, and the threshold value. The value dependence is only the RGB median value and the difference, and has the effect that the dependence on the threshold value is reduced as compared with the conventional case.

【0019】以下、本発明の実施の形態について、図1
〜図16を用いて説明する。 (実施の形態1)本発明の実施の形態1による色文字判
別方法を図1〜図7を用いて説明する。図1は本発明の
実施の形態1による色文字判別方法におけるイエロー文
字の色判別の説明図であり、図2は本発明の実施の形態
1による色文字判別方法におけるブルー文字の色判別の
説明図、図3は本発明の実施の形態1による色文字判別
方法におけるシアン文字の色判別の説明図、図4は本発
明の実施の形態1による色文字判別方法におけるレッド
文字の色判別の説明図、図5は本発明の実施の形態1に
よる色文字判別方法におけるマゼンタ文字の色判別の説
明図、図6は本発明の実施の形態1による色文字判別方
法におけるグリーン文字の色判別の説明図である。ま
た、図7は本発明の実施の形態1による色文字判別方法
を示すフローチャートである。
Hereinafter, an embodiment of the present invention will be described with reference to FIG.
This will be described with reference to FIG. (Embodiment 1) A color character discrimination method according to Embodiment 1 of the present invention will be described with reference to FIGS. FIG. 1 is an explanatory diagram of a color judgment of a yellow character in the color character judgment method according to the first embodiment of the present invention, and FIG. 2 is an explanation of a color judgment of a blue character in the color character judgment method according to the first embodiment of the present invention. FIG. 3 and FIG. 3 are explanatory diagrams of the color discrimination of the cyan character in the color character discriminating method according to the first embodiment of the present invention, and FIG. 4 is a description of the color discrimination of the red character in the color character discriminating method according to the first embodiment of the present invention. FIG. 5 and FIG. 5 are explanatory diagrams of the color determination of the magenta character in the color character determination method according to the first embodiment of the present invention, and FIG. 6 is a description of the color determination of the green character in the color character determination method according to the first embodiment of the present invention. FIG. FIG. 7 is a flowchart showing a color character discrimination method according to the first embodiment of the present invention.

【0020】図7において、まず、文字判別された画像
データ(文字画像データ)を入力し(S1)、その画像
データの注目画素のRデータ1、Gデータ2、Bデータ
3を読み出す(S2)。ここで、Rデータ1とGデータ
2との差分4を求める(S3)。次にGデータ2とBデ
ータ3との差分5を求める(S4)。更にBデータ3と
Rデータ1との差分6を求める(S5)。ここで上記求
めた差分4と差分5と差分6の中の差分最小値7を求め
(S6、差分最小値判別ステップ)、Rデータ1とGデ
ータ2とBデータ3の中のRGB最小値8(または最大
値)を求める(S7、RGB最小値判別ステップ(RG
B最大値判別ステップ))。上記差分最小値7と差分4
とを比較し(S8)、差分最小値7が差分4と等しい場
合、RGB最小値8(または最大値)をBデータ3と比
較する(S9)。
In FIG. 7, first, image data (character image data) for which a character is determined is input (S1), and R data 1, G data 2, and B data 3 of a target pixel of the image data are read (S2). . Here, the difference 4 between the R data 1 and the G data 2 is obtained (S3). Next, a difference 5 between the G data 2 and the B data 3 is obtained (S4). Further, a difference 6 between the B data 3 and the R data 1 is obtained (S5). Here, the minimum difference 7 among the differences 4, 5, and 6 determined above is determined (S 6, minimum difference determination step), and the RGB minimum 8 among the R data 1, G data 2, and B data 3 is calculated. (Or maximum value) (S7, RGB minimum value determination step (RG
B maximum value determination step)). Difference minimum value 7 and difference 4
(S8), and when the minimum difference value 7 is equal to the difference 4, the RGB minimum value 8 (or the maximum value) is compared with the B data 3 (S9).

【0021】図1、図2において、仮にBデータ3の値
がRデータ1とGデータ2との値の間に存在すると仮定
すると、差分4が差分最小値7となることはない。従っ
て差分4が差分最小値7と等しい場合、Bデータ3の値
はRデータ1とGデータ2との値の間には存在せず、ま
た差分4が差分4、差分5、差分6の中の最小値である
ことからBデータ3の値は、Rデータ1及びGデータ2
と比べ明らかに大きな値もしくは明らかに小さな値とな
る。8ビットでの理想的なイエローのRGBの各値は、
Rデータが255、Gデータが255、Bデータが0で
ある。また理想的なブルーのRGBの各値は、Rデータ
が0、Gデータが0、Bデータが255である。従っ
て、Rデータ1とGデータ2との差分4が差分最小値7
であるとき、Bデータ3の値によりイエロー文字または
ブルー文字となる。
1 and 2, if it is assumed that the value of the B data 3 exists between the values of the R data 1 and the G data 2, the difference 4 does not become the minimum difference value 7. Therefore, when the difference 4 is equal to the minimum difference value 7, the value of the B data 3 does not exist between the values of the R data 1 and the G data 2, and the difference 4 is the difference 4 among the differences 4, 5, and 6. Are the minimum values of the R data 1 and the G data 2
It is obviously larger or smaller than. The ideal values of RGB for 8-bit yellow are:
The R data is 255, the G data is 255, and the B data is 0. In addition, ideal blue RGB values are 0 for R data, 0 for G data, and 255 for B data. Therefore, the difference 4 between the R data 1 and the G data 2 is the minimum difference value 7
, The character becomes a yellow character or a blue character depending on the value of the B data 3.

【0022】ここで図7において、RGB最小値8(ま
たは最大値)がBデータ3の値と等しい場合イエロー文
字(またはブルー文字)であると判定し(S10)、R
GB最小値8(または最大値)がBデータ3の値と等し
くない場合ブルー文字(イエロー文字)であると判定す
る(S11)。次に上記差分最小値7が差分4と等しく
ない場合(S8)、差分最小値7と差分5とを比較し
(S12)、差分最小値7が差分5と等しい場合、RG
B最小値8(または最大値)をRデータ1と比較する
(S13)。
In FIG. 7, when the RGB minimum value 8 (or the maximum value) is equal to the value of the B data 3, it is determined that the character is a yellow character (or a blue character) (S10).
When the GB minimum value 8 (or the maximum value) is not equal to the value of the B data 3, it is determined that the character is a blue character (yellow character) (S11). Next, when the difference minimum value 7 is not equal to the difference 4 (S8), the difference minimum value 7 is compared with the difference 5 (S12), and when the difference minimum value 7 is equal to the difference 5, RG
The B minimum value 8 (or the maximum value) is compared with the R data 1 (S13).

【0023】図3、図4において、仮にRデータ1の値
がGデータ2とBデータ3との値の間に存在すると仮定
すると、差分5が差分最小値7となることはない。従っ
て差分5が差分最小値7と等しい場合、Rデータ1の値
はGデータ2とBデータ3との値の間には存在せず、ま
た差分5が差分4、差分5、差分6の中の最小であるこ
とからRデータ1の値は、Gデータ2及びBデータ3と
比べ明らかに大きな値もしくは明らかに小さな値とな
る。8ビットでの理想的なシアンのRGBの各値は、R
データが0、Gデータが255、Bデータが255であ
る。また理想的なレッドのRGBの各値は、Rデータが
255、Gデータが0、Bデータが0である。従って、
Gデータ2とBデータ3との差分5が差分最小値7であ
るとき、Rデータ1の値によりシアン文字またはレッド
文字となる。
3 and 4, if it is assumed that the value of the R data 1 exists between the values of the G data 2 and the B data 3, the difference 5 does not become the minimum difference value 7. Therefore, when the difference 5 is equal to the minimum difference value 7, the value of the R data 1 does not exist between the values of the G data 2 and the B data 3, and the difference 5 is the same as the difference 4, the difference 5, and the difference 6. Is smaller than the G data 2 and the B data 3, so that the value of the R data 1 is clearly larger or smaller. The ideal cyan RGB values at 8 bits are R
The data is 0, the G data is 255, and the B data is 255. The ideal red RGB values are 255 for R data, 0 for G data, and 0 for B data. Therefore,
When the difference 5 between the G data 2 and the B data 3 is the minimum difference 7, the character becomes a cyan character or a red character depending on the value of the R data 1.

【0024】ここで図7において、RGB最小値8(ま
たは最大値)がRデータ1の値と等しい場合シアン文字
(またはレッド文字)であると判定し(S14)、RG
B最小値8(または最大値)がRデータ1の値と等しく
ない場合レッド文字(シアン文字)であると判定する
(S15)。次に上記差分最小値7が差分5とも等しく
ない場合(S12)、差分最小値7は差分6と等しくな
る。
In FIG. 7, when the RGB minimum value 8 (or the maximum value) is equal to the value of the R data 1, it is determined that the character is a cyan character (or a red character) (S14).
If the B minimum value 8 (or the maximum value) is not equal to the value of the R data 1, it is determined that the character is a red character (cyan character) (S15). Next, when the minimum difference 7 is not equal to the difference 5 (S12), the minimum difference 7 is equal to the difference 6.

【0025】図5、図6において、仮にGデータ2の値
がRデータ1とBデータ3との値の間に存在すると仮定
すると、差分6が差分最小値7となることはない。従っ
て差分6が差分最小値7と等しい場合、Gデータ2の値
はRデータ1とBデータ3との値の間には存在せず、ま
た差分6が差分4、差分5、差分6の中の最小であるこ
とからGデータ2の値は、Rデータ1及びBデータ3と
比べ明らかに大きな値もしくは明らかに小さな値とな
る。8ビットでの理想的なマゼンタのRGBの各値は、
Rデータが255、Gデータが0、Bデータが255で
ある。また理想的なグリーンのRGBの各値は、Rデー
タが0、Gデータが255、Bデータが0である。従っ
て、Rデータ1とBデータ3との差分6が差分最小値7
であるとき、Gデータ2の値によりマゼンタ文字または
グリーン文字となる。
5 and 6, if it is assumed that the value of the G data 2 exists between the values of the R data 1 and the B data 3, the difference 6 does not become the minimum difference value 7. Therefore, when the difference 6 is equal to the minimum difference value 7, the value of the G data 2 does not exist between the values of the R data 1 and the B data 3, and the difference 6 is one of the differences 4, 5, and 6. Is smaller than the R data 1 and the B data 3, so that the value of the G data 2 is clearly larger or smaller. The ideal magenta RGB values at 8 bits are:
The R data is 255, the G data is 0, and the B data is 255. The ideal green RGB values are 0 for R data, 255 for G data, and 0 for B data. Therefore, the difference 6 between the R data 1 and the B data 3 becomes the minimum difference value 7
, The character becomes a magenta character or a green character depending on the value of the G data 2.

【0026】ここで図7において、RGB最小値8(ま
たは最大値)をGデータ2の値と比較する(S16)。
ここでRGB最小値8(または最大値)がGデータ2の
値と等しい場合マゼンタ文字(またはグリーン文字)で
あると判定し(S17)、RGB最小値8(または最大
値)がGデータ2の値と等しくない場合グリーン文字
(マゼンタ文字)であると判定する(S18)。
Here, in FIG. 7, the RGB minimum value 8 (or the maximum value) is compared with the value of the G data 2 (S16).
If the RGB minimum value 8 (or maximum value) is equal to the value of the G data 2, it is determined that the character is a magenta character (or green character) (S 17), and the RGB minimum value 8 (or maximum value) of the G data 2 If not equal to the value, it is determined that the character is a green character (magenta character) (S18).

【0027】以上で、注目画素の色文字判別処理が終了
し(S19)、次の注目画素のRGBデータが読み出さ
れ(S2)、上記処理(S2〜S19)が繰り返され
る。文字判別された全ての画素の色文字判別処理が終了
ならば(S19)、色文字判別処理が終了する。なお、
ステップ8〜18は色判別ステップを構成する。
Thus, the color character discrimination processing of the target pixel is completed (S19), the RGB data of the next target pixel is read (S2), and the above processing (S2 to S19) is repeated. If the color character discrimination processing for all the pixels for which character discrimination has been completed (S19), the color character discrimination processing ends. In addition,
Steps 8 to 18 constitute a color determination step.

【0028】以上のように本実施の形態によれば、RG
Bデータの任意の2つのデータの差分の内の最小値とし
ての差分最小値を求める差分最小値判別ステップS6
と、RGBデータ値の内の最小値(または最大値)とし
てのRGB最小値(RGB最大値)を求めるRGB最小
値判別ステップ(RGB最大値判別ステップ)S7と、
RGB最小値(またはRGB最大値)と差分最小値とに
基づいて文字画像の色を判別する色判別ステップS8〜
S18とを有するようにしたので、文字濃度やしきい値
が色判別に使用されず、文字濃度やしきい値による影響
を無くすことができるので、高精度に文字の色を判別す
ることができる。
As described above, according to the present embodiment, RG
Difference minimum value discrimination step S6 for finding the minimum difference value as the minimum value of the difference between any two data of the B data.
An RGB minimum value determining step (RGB maximum value determining step) S7 for obtaining an RGB minimum value (RGB maximum value) as a minimum value (or maximum value) of the RGB data values;
Color discriminating step S8 to discriminate the color of the character image based on the RGB minimum value (or the RGB maximum value) and the difference minimum value
Since S18 is provided, the character density and the threshold value are not used for color determination, and the influence of the character density and the threshold value can be eliminated, so that the character color can be determined with high accuracy. .

【0029】(実施の形態2)本発明の実施の形態2に
よる色文字判別方法について、図8〜図10を用いて説
明する。図8は本発明の実施の形態2による色文字判別
方法の説明図であり、図9、図10は本発明の実施の形
態2による色文字判別方法を示すフローチャートであ
る。
(Embodiment 2) A color character discrimination method according to Embodiment 2 of the present invention will be described with reference to FIGS. FIG. 8 is an explanatory diagram of a color character discrimination method according to the second embodiment of the present invention, and FIGS. 9 and 10 are flowcharts showing a color character discrimination method according to the second embodiment of the present invention.

【0030】図9において、まず、文字判別された画像
データを入力し(S21)、その画像データの注目画素
のRデータ9、Gデータ10、Bデータ11を読み出す
(S22)。ここで、図8に示すように、Rデータ9と
Gデータ10とBデータ11の中のRGB最大値12と
RGB最小値13とRGB中央値14を求める(S2
3、S24、S25)。上記RGB最大値12とRデー
タ9の値とを比較し(S26)、RGB最大値12がR
データ9の値と等しい場合はRの判定ビット15に
「1」を入れる(S27)。RGB最大値12がRデー
タ9の値と等しくない場合(S26)、RGB最大値1
2とGデータ10の値とを比較する(S28)。RGB
最大値12がGデータ10の値と等しい場合Gの判定ビ
ット16に「1」を入れる(S29)。またRGB最大
値12がRデータ9の値ともGデータ10の値とも等し
くない場合(S26、S28)、Bの判定ビット17に
「1」を入れる(S30)。次にRGB最小値13とR
データ9の値とを比較し(S31)、RGB最小値13
がRデータ9の値と等しい場合はRの判定ビット15に
「0」を入れる(S32)。RGB最小値13がRデー
タ9の値と等しくない場合(S31)、RGB最小値1
3とGデータ10の値とを比較する(S33)。RGB
最小値13がGデータ10と等しい場合はGの判定ビッ
ト16に「0」を入れる(S34)。またRGB最小値
13がRデータ9の値ともGデータ10の値とも等しく
ない場合(S31、S33)、Bの判定ビット17に
「0」を入れる(S35)。
In FIG. 9, first, image data for which a character has been identified is input (S21), and R data 9, G data 10, and B data 11 of a target pixel of the image data are read (S22). Here, as shown in FIG. 8, the RGB maximum value 12, the RGB minimum value 13, and the RGB median value 14 among the R data 9, the G data 10, and the B data 11 are obtained (S2).
3, S24, S25). The RGB maximum value 12 is compared with the value of the R data 9 (S26), and the RGB maximum value 12 is R
If it is equal to the value of the data 9, "1" is inserted into the determination bit 15 of R (S27). If the RGB maximum value 12 is not equal to the value of the R data 9 (S26), the RGB maximum value 1
2 and the value of the G data 10 are compared (S28). RGB
When the maximum value 12 is equal to the value of the G data 10, "1" is set to the G determination bit 16 (S29). If the RGB maximum value 12 is not equal to the value of the R data 9 or the value of the G data 10 (S26, S28), "1" is set to the B determination bit 17 (S30). Next, the RGB minimum value 13 and R
The value is compared with the value of data 9 (S31), and the RGB minimum value 13
Is equal to the value of the R data 9, "0" is inserted into the determination bit 15 of R (S32). If the RGB minimum value 13 is not equal to the value of the R data 9 (S31), the RGB minimum value 1
3 is compared with the value of the G data 10 (S33). RGB
When the minimum value 13 is equal to the G data 10, "0" is set to the G determination bit 16 (S34). If the RGB minimum value 13 is not equal to the value of the R data 9 or the value of the G data 10 (S31, S33), "0" is set to the B determination bit 17 (S35).

【0031】図10に示すように、更にRGB中央値1
4とRデータ9の値とを比較し(S36)、RGB中央
値14がRデータ9の値と等しい場合はRデータ9とし
きい値18(入力8ビットデータの中央の値128)と
を比較し(S37)、Rデータ9の値がしきい値未満の
ときRの判定ビット15に「0」を入れる(S38)。
またRデータ9の値がしきい値18以上のとき(S3
7)、Rの判定ビット15に「1」を入れる(S3
9)。RGB中央値14がRデータ9の値と等しくない
場合(S36)、RGB中央値14とGデータ10の値
とを比較する(S40)。RGB中央値14がGデータ
10の値と等しい場合はGデータ10の値としきい値1
8とを比較し(S41)、Gデータ10の値がしきい値
18未満のときGの判定ビット16に「0」を入れる
(S42)。またGデータ10の値がしきい値18以上
のとき(S41)、Gの判定ビット16に「1」を入れ
る(S43)。RGB中央値14がRデータ9の値とも
Gデータ10の値とも等しくない場合(S36)(S4
0)、Bデータ11の値としきい値18とを比較し(S
44)、Bデータ11の値がしきい値18未満のときは
Bの判定ビット17に「0」を入れる(S45)。また
Bデータ11の値がしきい値18以上のとき(S4
4)、Bの判定ビット17に「1」を入れる(S4
6)。
As shown in FIG. 10, the RGB median value 1
4 is compared with the value of the R data 9 (S36). If the RGB median value 14 is equal to the value of the R data 9, the R data 9 is compared with the threshold value 18 (the middle value 128 of the input 8-bit data). Then, when the value of the R data 9 is less than the threshold value, “0” is set to the determination bit 15 of R (S38).
When the value of the R data 9 is equal to or larger than the threshold value 18 (S3
7) Put “1” in the determination bit 15 of R (S3)
9). When the RGB median value 14 is not equal to the value of the R data 9 (S36), the RGB median value 14 is compared with the value of the G data 10 (S40). When the RGB median value 14 is equal to the value of the G data 10, the value of the G data 10 and the threshold value 1
8 (S41), and when the value of the G data 10 is less than the threshold value 18, "0" is set to the G determination bit 16 (S42). When the value of the G data 10 is equal to or larger than the threshold value 18 (S41), "1" is set to the G determination bit 16 (S43). When the RGB median value 14 is not equal to the value of the R data 9 or the value of the G data 10 (S36) (S4)
0), the value of B data 11 is compared with threshold value 18 (S
44) If the value of the B data 11 is less than the threshold value 18, "0" is set to the B determination bit 17 (S45). When the value of the B data 11 is equal to or greater than the threshold value 18 (S4
4), "1" is put into the determination bit 17 of B (S4).
6).

【0032】8ビットデータでの理想的なシアンのRG
Bの各値は、Rデータが0、Gデータが255、Bデー
タが255で、マゼンタは、Rデータが255、Gデー
タが0、Bデータが255で、イエローは、Rデータが
255、Gデータが255、Bデータが0である。また
理想的なレッドのRGBの各値は、Rデータが255、
Gデータが0、Bデータが0で、グリーンは、Rデータ
が0、Gデータが255、Bデータが0で、ブルーは、
Rデータが0、Gデータが0、Bデータが255であ
る。そこでこの理想的なシアン、マゼンタ、イエロー、
レッド、グリーン、ブルーのRGBの各値を2値化した
ものを(表1)に示す。上記求めたRの判定ビット15
とGの判定ビット16とBの判定ビット17より(表
1)を参照し、シアン、マゼンタ、イエロー、レッド、
グリーン、ブルー文字を決定する(S47)。例えば、
Rの判定ビット15が「1」、Gの判定ビット16が
「0」、Bの判定ビット17が「0」のときは、レッド
文字である。以上で、注目画素の色文字判別処理が終了
し(S48)、次の注目画素のRGBデータが読み出さ
れ(S22)、上記処理(S22〜S48)が繰り返さ
れる。全ての画素の色文字判別処理が終了ならば(S4
8)、色文字判別処理が終了する。
Ideal cyan RG with 8-bit data
The values of B are 0 for R data, 255 for G data, 255 for B data, magenta for R data for 255, G data for 0, B data for 255, and yellow for R data for 255, G data. The data is 255 and the B data is 0. In addition, ideal red RGB values are 255 for R data,
G data is 0, B data is 0, green is R data is 0, G data is 255, B data is 0, and blue is
R data is 0, G data is 0, and B data is 255. So this ideal cyan, magenta, yellow,
Table 1 shows binarized values of red, green, and blue RGB. Determination bit 15 of R obtained above
From the determination bit 16 of G and the determination bit 16 of G and the determination bit 17 of B, (Table 1) is referred, and cyan, magenta, yellow, red,
Green and blue characters are determined (S47). For example,
When the determination bit 15 of R is “1”, the determination bit 16 of G is “0”, and the determination bit 17 of B is “0”, the character is a red character. Thus, the color character discrimination process of the target pixel is completed (S48), the RGB data of the next target pixel is read (S22), and the above processes (S22 to S48) are repeated. If the color character discrimination processing of all pixels is completed (S4
8), the color character discrimination processing ends.

【0033】以上のように本実施の形態によれば、RG
Bデータの内の最大値としてのRGB最大値を求めるR
GB最大値判別ステップS23と、RGBデータの内の
最小値としてのRGB最小値を求めるRGB最小値判別
ステップS24と、RGBデータの内の中央値としての
RGB中央値を求めるRGB中央値判別ステップS25
と、RGB中央値をしきい値と比較すると共にRGB最
大値とRGB最小値とRGB中央値としきい値とに基づ
いて文字画像の色を判別する色判別ステップS26〜S
47とを有するようにしたので、しきい値の依存は中央
値のみとなり、しきい値の依存性を従来よりも低減する
ことができる。
As described above, according to the present embodiment, RG
R for finding RGB maximum value as maximum value of B data
RGB maximum value determination step S23, RGB minimum value determination step S24 for obtaining an RGB minimum value as a minimum value of RGB data, and RGB median value determination step S25 for obtaining an RGB median value as a median value of RGB data
And a color discriminating step of comparing the RGB median value with a threshold value and discriminating the color of the character image based on the RGB maximum value, the RGB minimum value, the RGB median value, and the threshold value.
47, the threshold value depends only on the median value, and the threshold value dependency can be reduced as compared with the related art.

【0034】(実施の形態3)本発明の実施の形態3に
よる色文字判別方法について、図11〜図13を用いて
説明する。図11は本発明の実施の形態3による色文字
判別方法の説明図であり、図12、図13は本発明の実
施の形態3による色文字判別方法を示すフローチャート
である。
(Embodiment 3) A color character discrimination method according to Embodiment 3 of the present invention will be described with reference to FIGS. FIG. 11 is an explanatory diagram of a color character discrimination method according to the third embodiment of the present invention. FIGS. 12 and 13 are flowcharts showing a color character discrimination method according to the third embodiment of the present invention.

【0035】本実施の形態による色文字判別方法を示す
図12におけるステップ51〜65は図9におけるステ
ップ21〜35に対応し、図13におけるステップ67
〜77は図10におけるステップ36〜46に対応し、
また図12におけるステップ78、79は図9における
ステップ47、48に対応するので、その説明は省略す
る。すなわち、本実施の形態による色文字判別方法が実
施の形態2と異なるところはステップ66を有する点で
ある。ステップ66においては、図11のa、bを用い
て次式(1)からしきい値を求める。
Steps 51 to 65 in FIG. 12 showing the color character discrimination method according to the present embodiment correspond to steps 21 to 35 in FIG. 9 and step 67 in FIG.
To 77 correspond to steps 36 to 46 in FIG.
Steps 78 and 79 in FIG. 12 correspond to steps 47 and 48 in FIG. 9, and therefore description thereof is omitted. That is, the color character discrimination method according to the present embodiment is different from the second embodiment in that it has step 66. In step 66, a threshold is obtained from the following equation (1) using a and b in FIG.

【0036】しきい値=(RGB最小値×a+RGB最
大値×b)÷(a+b)・・・(1)なお、しきい値と
しては式(2)に示す値を用いることもできる。
Threshold value = (RGB minimum value × a + RGB maximum value × b) ÷ (a + b) (1) As the threshold value, the value shown in equation (2) can be used.

【0037】 しきい値=RGB最小値×α+RGB最大値×β+γ・・・・・(2) ここで、0≦α+β≦1、|γ|<20(実験値)であ
り、式(2)は式(1)のしきい値に対してγにより微
調整を行うものである。
Threshold value = RGB minimum value × α + RGB maximum value × β + γ (2) where 0 ≦ α + β ≦ 1, | γ | <20 (experimental value), and equation (2) Fine adjustment is performed on the threshold value of Expression (1) by γ.

【0038】以上のように本実施の形態によれば、しき
い値をRGB最大値およびRGB最小値から求めるしき
い値決定ステップ66を実施の形態2におけるRGB中
央値判別ステップと色判別ステップとの間に備えるよう
にしたので、しきい値の依存はRGB最大値およびRG
B最小値のみであり、しきい値の依存性が従来よりも低
減される。
As described above, according to the present embodiment, the threshold value determination step 66 for obtaining the threshold value from the RGB maximum value and the RGB minimum value is performed by the RGB median value determination step and the color determination step in the second embodiment. Between the RGB maximum value and RG
Only the B minimum value, and the dependency of the threshold value is reduced as compared with the conventional case.

【0039】(実施の形態4)本発明の実施の形態4に
よる色文字判別方法について、図14〜図16を用いて
説明する。図14は本発明の実施の形態4による色文字
判別方法の説明図であり、図15、図16は本発明の実
施の形態4による色文字判別方法を示すフローチャート
である。本実施の形態による色文字判別方法を示す図1
5におけるステップ81〜95は図9におけるステップ
21〜35に対応するので、その説明は省略する。従っ
て、ステップ96〜109について説明する。
(Embodiment 4) A color character discrimination method according to Embodiment 4 of the present invention will be described with reference to FIGS. FIG. 14 is an explanatory diagram of a color character discrimination method according to the fourth embodiment of the present invention. FIGS. 15 and 16 are flowcharts showing a color character discrimination method according to the fourth embodiment of the present invention. FIG. 1 shows a color character discrimination method according to the present embodiment.
Steps 81 to 95 in FIG. 5 correspond to steps 21 to 35 in FIG. Therefore, steps 96 to 109 will be described.

【0040】ステップ92、94、95からはステップ
96へ移行する。ステップ96においては、図14に示
すように、RGB中央値34とRGB最小値33(また
はRGB最大値32)との差分データ39を求める。次
に、RGB中央値34とRデータ29の値とを比較し
(S97)、RGB中央値34がRデータ29の値と等
しい場合上記求めた差分データ39としきい値38(=
30(実験値より))とを比較し(S98)、上記求め
た差分データ39がしきい値38未満のときRの判定ビ
ット35に「0」(または「1」)を入れる(S9
9)。また上記求めた差分データ39がしきい値38以
上のとき(S98)、Rの判定ビット35に「1」(ま
たは「0」)を入れる(S100)。RGB中央値34
がRデータ29の値と等しくない場合(S97)、RG
B中央値34とGデータ30の値とを比較する(S10
1)。RGB中央値34がGデータ30の値と等しい場
合上記求めた差分データ39としきい値38とを比較し
(S102)、上記求めた差分データ39がしきい値3
8未満のときGの判定ビット36に「0」(または
「1」)を入れる(S103)。また上記求めた差分デ
ータ39がしきい値38以上のとき(S102)、Gの
判定ビット36に「1」(または「0」)を入れる(S
104)。RGB中央値34がRデータ29の値ともG
データ30の値とも等しくない場合(S97)(S10
1)、上記求めた差分データ39としきい値38とを比
較し(S105)、上記求めた差分データ39がしきい
値38未満のときBの判定ビット37に「0」(または
「1」)を入れる(S106)。また上記求めた差分デ
ータ39がしきい値38以上のとき(S105)、Bの
判定ビット37に「1」(または「0」)を入れる(S
107)。
From steps 92, 94, and 95, the process proceeds to step 96. In step 96, as shown in FIG. 14, difference data 39 between the RGB median value 34 and the RGB minimum value 33 (or the RGB maximum value 32) is obtained. Next, the RGB median value 34 is compared with the value of the R data 29 (S97). When the RGB median value 34 is equal to the value of the R data 29, the difference data 39 and the threshold value 38 (=
30 (from an experimental value)) (S98), and when the obtained difference data 39 is less than the threshold value 38, "0" (or "1") is inserted into the determination bit 35 of R (S9).
9). When the obtained difference data 39 is equal to or larger than the threshold value 38 (S98), "1" (or "0") is set in the determination bit 35 of R (S100). RGB median 34
Is not equal to the value of the R data 29 (S97), RG
The B median 34 is compared with the value of the G data 30 (S10).
1). When the RGB median value 34 is equal to the value of the G data 30, the difference data 39 obtained above is compared with the threshold value 38 (S102).
If it is less than 8, "0" (or "1") is set in the G determination bit 36 (S103). When the difference data 39 is equal to or larger than the threshold value 38 (S102), "1" (or "0") is set in the G determination bit 36 (S102).
104). RGB median 34 is G for both R data 29
When the value is not equal to the value of the data 30 (S97) (S10
1) Compare the obtained difference data 39 with the threshold value 38 (S105), and when the obtained difference data 39 is less than the threshold value 38, set the determination bit 37 of B to “0” (or “1”). (S106). When the obtained difference data 39 is equal to or greater than the threshold value 38 (S105), "1" (or "0") is inserted into the B determination bit 37 (S105).
107).

【0041】8ビットデータでの理想的なシアンのRG
Bの各値は、Rデータが0、Gデータが255、Bデー
タが255で、マゼンタは、Rデータが255、Gデー
タが0、Bデータが255で、イエローは、Rデータが
255、Gデータが255、Bデータが0である。また
理想的なレッドのRGBの各値は、Rデータが255、
Gデータが0、Bデータが0で、グリーンは、Rデータ
が0、Gデータが255、Bデータが0で、ブルーは、
Rデータが0、Gデータが0、Bデータが255であ
る。そこでこの理想的なシアン、マゼンタ、イエロー、
レッド、グリーン、ブルーのRGBの各値を2値化した
ものを(表1)に示す。上記求めたRの判定ビット25
とGの判定ビット26とBの判定ビット27より(表
1)を参照し、シアン、マゼンタ、イエロー、レッド、
グリーン、ブルー文字を決定する(S108)。例え
ば、Rの判定ビット35が「1」、Gの判定ビット36
が「0」、Bの判定ビット37が「0」のときは、レッ
ド文字である。
Ideal cyan RG with 8-bit data
The values of B are 0 for R data, 255 for G data, 255 for B data, magenta for R data for 255, G data for 0, B data for 255, and yellow for R data for 255, G data. The data is 255 and the B data is 0. In addition, ideal red RGB values are 255 for R data,
G data is 0, B data is 0, green is R data is 0, G data is 255, B data is 0, and blue is
R data is 0, G data is 0, and B data is 255. So this ideal cyan, magenta, yellow,
Table 1 shows binarized values of red, green, and blue RGB. Determination bit 25 of R obtained above
From the determination bits 26 of G and G and the determination bits 27 of B (see Table 1), cyan, magenta, yellow, red,
Green and blue characters are determined (S108). For example, the determination bit 35 of R is “1”, the determination bit 36 of G is
Is "0" and the B determination bit 37 is "0", it is a red character.

【0042】以上で、注目画素の色文字判別処理が終了
し(S109)、次の注目画素のRGBデータが読み出
され(S82)、上記処理(S82)〜(S109)が
繰り返される。全ての画素の色文字判別処理が終了なら
ば(S109)、色文字判別処理が終了する。
Thus, the color character discrimination processing of the target pixel is completed (S109), the RGB data of the next target pixel is read (S82), and the above processing (S82) to (S109) are repeated. If the color character discrimination processing for all the pixels is completed (S109), the color character discrimination processing ends.

【0043】以上のように本実施の形態によれば、RG
Bデータの内の最大値としてのRGB最大値を求めるR
GB最大値判別ステップS83と、RGBデータの内の
最小値としてのRGB最小値を求めるRGB最小値判別
ステップS84と、RGBデータの内の中央値としての
RGB中央値を求めるRGB中央値判別ステップS85
と、RGB中央値とRGB最小値(またはRGB最大
値)との差分を求める差分算出ステップS96と、RG
B中央値としきい値とを比較し、差分としきい値とを比
較すると共にRGB最大値とRGB最小値とRGB中央
値と差分としきい値とに基づいて文字画像の色を判別す
る色判別ステップS86〜S95、S97〜S109と
を有するようにしたので、しきい値の依存はRGB中央
値および差分のみであり、しきい値の依存性を従来より
も低減することができる。
As described above, according to the present embodiment, RG
R for finding RGB maximum value as maximum value of B data
RGB maximum value determination step S83, RGB minimum value determination step S84 for obtaining an RGB minimum value as a minimum value of the RGB data, and RGB median value determination step S85 for obtaining an RGB median value as a median value of the RGB data
Calculating a difference between the RGB median value and the RGB minimum value (or the RGB maximum value) in step S96;
B color comparing step of comparing the median value with the threshold value, comparing the difference with the threshold value, and determining the color of the character image based on the RGB maximum value, the RGB minimum value, the RGB median value, the difference and the threshold value. Since steps S86 to S95 and S97 to S109 are provided, the dependency of the threshold value is only the RGB median value and the difference, and the dependency of the threshold value can be reduced as compared with the related art.

【0044】[0044]

【発明の効果】以上のように本発明の請求項1に記載の
色文字判別方法によれば、文字、網点、写真等の画像属
性判別処理により、文字画像と判別された画素に対し
て、RGBの3入力データの値から文字画像の色を判別
する色文字判別方法であって、RGBデータの任意の2
つのデータの差分の内の最小値としての差分最小値を求
める差分最小値判別ステップと、RGBデータ値の内の
最小値としてのRGB最小値を求めるRGB最小値判別
ステップと、RGB最小値と差分最小値とに基づいて文
字画像の色を判別する色判別ステップとを有することに
より、文字濃度やしきい値が色判別に使用されず、色判
別に対する文字濃度やしきい値の影響を無くすことがで
きるので、高精度に文字の色を判別することができると
いう有利な効果が得られる。
As described above, according to the color character discriminating method according to the first aspect of the present invention, pixels which are discriminated as character images by image attribute discriminating processing of characters, halftone dots, photographs, etc. A color character discrimination method for discriminating the color of a character image from the values of three input data of RGB.
A difference minimum value determining step of obtaining a minimum difference value as a minimum value between the two data differences; an RGB minimum value determining step of obtaining an RGB minimum value as a minimum value of the RGB data values; A color discriminating step of discriminating the color of the character image based on the minimum value, the character density and the threshold are not used for the color discrimination, and the influence of the character density and the threshold on the color discrimination is eliminated. Therefore, the advantageous effect that the color of a character can be determined with high accuracy can be obtained.

【0045】請求項2に記載の発明によれば、文字、網
点、写真等の画像属性判別処理により、文字画像と判別
された画素に対して、RGBの3入力データの値から文
字画像の色を判別する色文字判別方法であって、RGB
データの任意の2つのデータの差分の内の最小値として
の差分最小値を求める差分最小値判別ステップと、RG
Bデータ値の内の最大値としてのRGB最大値を求める
RGB最大値判別ステップと、RGB最大値と差分最小
値とに基づいて文字画像の色を判別する色判別ステップ
とを有することにより、文字濃度やしきい値が色判別に
使用されず、色判別に対する文字濃度やしきい値の影響
を無くすことができるので、高精度に文字の色を判別す
ることができるという有利な効果が得られる。
According to the second aspect of the present invention, a pixel determined to be a character image by image attribute determination processing of a character, a halftone dot, a photograph, or the like is applied to a pixel of a character image from three RGB input data values. A color character determination method for determining a color,
A difference minimum value determining step of obtaining a difference minimum value as a minimum value of a difference between any two data of the data;
By including an RGB maximum value determining step of determining an RGB maximum value as a maximum value of the B data values, and a color determining step of determining a color of a character image based on the RGB maximum value and the difference minimum value, the character Since the density and the threshold value are not used for the color discrimination and the influence of the character density and the threshold value on the color discrimination can be eliminated, the advantageous effect that the color of the character can be discriminated with high accuracy can be obtained. .

【0046】請求項3に記載の発明によれば、文字、網
点、写真等の画像属性判別処理により、文字画像と判別
された画素に対して、RGBの3入力データの値から文
字画像の色を判別する色文字判別方法であって、RGB
データの内の最大値としてのRGB最大値を求めるRG
B最大値判別ステップと、RGBデータの内の最小値と
してのRGB最小値を求めるRGB最小値判別ステップ
と、RGBデータの内の中央値としてのRGB中央値を
求めるRGB中央値判別ステップと、RGB中央値をし
きい値と比較すると共にRGB最大値とRGB最小値と
RGB中央値としきい値とに基づいて文字画像の色を判
別する色判別ステップとを有することにより、しきい値
の依存は中央値のみであり、しきい値の依存性を従来よ
りも低減することができるという有利な効果が得られ
る。
According to the third aspect of the present invention, a pixel determined to be a character image by image attribute determination processing of a character, a halftone dot, a photograph, or the like is applied to a pixel of a character image based on three RGB input data values. A color character determination method for determining a color,
RG for calculating RGB maximum value as maximum value of data
A B maximum value determining step, an RGB minimum value determining step of obtaining an RGB minimum value as a minimum value of the RGB data, an RGB median determining step of obtaining an RGB median value as a median of the RGB data, By having a color discrimination step of comparing the median value with the threshold value and discriminating the color of the character image based on the RGB maximum value, the RGB minimum value, the RGB median value, and the threshold value, the dependence of the threshold value is reduced. Only the median value is obtained, and an advantageous effect that the dependency of the threshold value can be reduced as compared with the related art can be obtained.

【0047】請求項4に記載の発明によれば、請求項3
に記載の発明において、しきい値をRGB最大値および
RGB最小値から求めるしきい値決定ステップをRGB
中央値判別ステップと色判別ステップとの間に備えるこ
とにより、しきい値の依存はRGB最大値およびRGB
最小値のみであり、しきい値の依存性を従来よりも低減
することができるという有利な効果が得られる。
According to the invention set forth in claim 4, according to claim 3,
In the invention described in (1), the step of determining a threshold value from the maximum RGB value and the minimum RGB value is a threshold value determining step.
By providing between the median value discriminating step and the color discriminating step, the dependence of the threshold value on the RGB maximum value and the RGB
Only the minimum value is obtained, and an advantageous effect that the dependency of the threshold value can be reduced as compared with the related art can be obtained.

【0048】請求項5に記載の発明によれば、文字、網
点、写真等の画像属性判別処理により、文字画像と判別
された画素に対して、RGBの3入力データの値から文
字画像の色を判別する色文字判別方法であって、RGB
データの内の最大値としてのRGB最大値を求めるRG
B最大値判別ステップと、RGBデータの内の最小値と
してのRGB最小値を求めるRGB最小値判別ステップ
と、RGBデータの内の中央値としてのRGB中央値を
求めるRGB中央値判別ステップと、RGB中央値とR
GB最小値との差分を求める差分算出ステップと、RG
B中央値としきい値とを比較し、差分としきい値とを比
較すると共にRGB最大値とRGB最小値とRGB中央
値と差分としきい値とに基づいて文字画像の色を判別す
る色判別ステップとを有することにより、しきい値の依
存はRGB中央値および差分のみであり、しきい値の依
存性を従来よりも低減することができるという有利な効
果が得られる。
According to the fifth aspect of the present invention, a pixel determined as a character image by image attribute determination processing of a character, a halftone dot, a photograph, or the like is applied to a pixel of a character image based on three RGB input data values. A color character determination method for determining a color,
RG for calculating RGB maximum value as maximum value of data
A B maximum value determining step, an RGB minimum value determining step of obtaining an RGB minimum value as a minimum value of the RGB data, an RGB median determining step of obtaining an RGB median value as a median of the RGB data, Median and R
A difference calculating step for obtaining a difference from the minimum GB value;
B color comparing step of comparing the median value with the threshold value, comparing the difference with the threshold value, and determining the color of the character image based on the RGB maximum value, the RGB minimum value, the RGB median value, the difference and the threshold value. Has the advantageous effect that the dependence of the threshold value is only the RGB median value and the difference, and the dependence of the threshold value can be reduced as compared with the related art.

【0049】請求項6に記載の発明によれば、文字、網
点、写真等の画像属性判別処理により、文字画像と判別
された画素に対して、RGBの3入力データの値から文
字画像の色を判別する色文字判別方法であって、RGB
データの内の最大値としてのRGB最大値を求めるRG
B最大値判別ステップと、RGBデータの内の最小値と
してのRGB最小値を求めるRGB最小値判別ステップ
と、RGBデータの内の中央値としてのRGB中央値を
求めるRGB中央値判別ステップと、RGB中央値とR
GB最大値との差分を求める差分算出ステップと、RG
B中央値としきい値とを比較し、差分としきい値とを比
較すると共にRGB最大値とRGB最小値とRGB中央
値と差分としきい値とに基づいて文字画像の色を判別す
る色判別ステップとを有することにより、しきい値の依
存はRGB中央値および差分のみであり、しきい値の依
存性を従来よりも低減することができるという有利な効
果が得られる。
According to the sixth aspect of the present invention, a pixel determined to be a character image by image attribute determination processing of a character, a halftone dot, a photograph, or the like is applied to a pixel of a character image from three RGB input data values. A color character determination method for determining a color,
RG for calculating RGB maximum value as maximum value of data
A B maximum value determining step, an RGB minimum value determining step of obtaining an RGB minimum value as a minimum value of the RGB data, an RGB median determining step of obtaining an RGB median value as a median of the RGB data, Median and R
A difference calculating step for obtaining a difference from the maximum GB value;
B color comparing step of comparing the median value with the threshold value, comparing the difference with the threshold value, and determining the color of the character image based on the RGB maximum value, the RGB minimum value, the RGB median value, the difference and the threshold value. Has the advantageous effect that the dependence of the threshold value is only the RGB median value and the difference, and the dependence of the threshold value can be reduced as compared with the related art.

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

【図1】本発明の実施の形態1による色文字判別方法に
おけるイエロー文字の色判別の説明図
FIG. 1 is an explanatory diagram of color determination of a yellow character in a color character determination method according to a first embodiment of the present invention;

【図2】本発明の実施の形態1による色文字判別方法に
おけるブルー文字の色判別の説明図
FIG. 2 is an explanatory diagram of color determination of a blue character in the color character determination method according to the first embodiment of the present invention;

【図3】本発明の実施の形態1による色文字判別方法に
おけるシアン文字の色判別の説明図
FIG. 3 is an explanatory diagram of color determination of a cyan character in the color character determination method according to the first embodiment of the present invention;

【図4】本発明の実施の形態1による色文字判別方法に
おけるレッド文字の色判別の説明図
FIG. 4 is an explanatory diagram of color determination of a red character in the color character determination method according to the first embodiment of the present invention;

【図5】本発明の実施の形態1による色文字判別方法に
おけるマゼンタ文字の色判別の説明図
FIG. 5 is an explanatory diagram of color determination of a magenta character in the color character determination method according to the first embodiment of the present invention;

【図6】本発明の実施の形態1による色文字判別方法に
おけるグリーン文字の色判別の説明図
FIG. 6 is an explanatory diagram of color determination of a green character in the color character determination method according to the first embodiment of the present invention;

【図7】本発明の実施の形態1による色文字判別方法を
示すフローチャート
FIG. 7 is a flowchart showing a color character discrimination method according to the first embodiment of the present invention;

【図8】本発明の実施の形態2による色文字判別方法の
説明図
FIG. 8 is an explanatory diagram of a color character discrimination method according to the second embodiment of the present invention.

【図9】本発明の実施の形態2による色文字判別方法を
示すフローチャート
FIG. 9 is a flowchart showing a color character discrimination method according to the second embodiment of the present invention;

【図10】本発明の実施の形態2による色文字判別方法
を示すフローチャート
FIG. 10 is a flowchart showing a color character discrimination method according to the second embodiment of the present invention;

【図11】本発明の実施の形態3による色文字判別方法
の説明図
FIG. 11 is an explanatory diagram of a color character discrimination method according to a third embodiment of the present invention.

【図12】本発明の実施の形態3による色文字判別方法
を示すフローチャート
FIG. 12 is a flowchart illustrating a color character discrimination method according to a third embodiment of the present invention;

【図13】本発明の実施の形態3による色文字判別方法
を示すフローチャート
FIG. 13 is a flowchart showing a color character discrimination method according to the third embodiment of the present invention;

【図14】本発明の実施の形態4による色文字判別方法
の説明図
FIG. 14 is an explanatory diagram of a color character discrimination method according to a fourth embodiment of the present invention.

【図15】本発明の実施の形態4による色文字判別方法
を示すフローチャート
FIG. 15 is a flowchart illustrating a color character discrimination method according to a fourth embodiment of the present invention.

【図16】本発明の実施の形態4による色文字判別方法
を示すフローチャート
FIG. 16 is a flowchart illustrating a color character discrimination method according to a fourth embodiment of the present invention.

【図17】従来の色文字判別方法を示すフローチャートFIG. 17 is a flowchart showing a conventional color character discrimination method.

───────────────────────────────────────────────────── フロントページの続き (51)Int.Cl.6 識別記号 FI H04N 1/40 F ──────────────────────────────────────────────────の Continued on the front page (51) Int.Cl. 6 Identification code FI H04N 1/40 F

Claims (6)

【特許請求の範囲】[Claims] 【請求項1】文字、網点、写真等の画像属性判別処理に
より、文字画像と判別された画素に対して、RGBの3
入力データの値から文字画像の色を判別する色文字判別
方法であって、RGBデータの任意の2つのデータの差
分の内の最小値としての差分最小値を求める差分最小値
判別ステップと、RGBデータ値の内の最小値としての
RGB最小値を求めるRGB最小値判別ステップと、前
記RGB最小値と前記差分最小値とに基づいて文字画像
の色を判別する色判別ステップとを有することを特徴と
する色文字判別方法。
1. A pixel determined to be a character image by image attribute determination processing of a character, a halftone dot, a photograph, etc.
A color character discriminating method for discriminating a color of a character image from a value of input data, comprising: a difference minimum value discriminating step of obtaining a difference minimum value as a minimum value of a difference between arbitrary two data of RGB data; An RGB minimum value determining step of obtaining an RGB minimum value as a minimum value among data values; and a color determining step of determining a color of a character image based on the RGB minimum value and the difference minimum value. Color character determination method.
【請求項2】文字、網点、写真等の画像属性判別処理に
より、文字画像と判別された画素に対して、RGBの3
入力データの値から文字画像の色を判別する色文字判別
方法であって、RGBデータの任意の2つのデータの差
分の内の最小値としての差分最小値を求める差分最小値
判別ステップと、RGBデータ値の内の最大値としての
RGB最大値を求めるRGB最大値判別ステップと、前
記RGB最大値と前記差分最小値とに基づいて文字画像
の色を判別する色判別ステップとを有することを特徴と
する色文字判別方法。
2. A pixel determined as a character image by image attribute determination processing of a character, a halftone dot, a photograph, etc.
A color character discriminating method for discriminating a color of a character image from a value of input data, comprising: a difference minimum value discriminating step of obtaining a difference minimum value as a minimum value of a difference between arbitrary two data of RGB data; An RGB maximum value determining step of obtaining an RGB maximum value as a maximum value among data values; and a color determining step of determining a color of a character image based on the RGB maximum value and the difference minimum value. Color character determination method.
【請求項3】文字、網点、写真等の画像属性判別処理に
より、文字画像と判別された画素に対して、RGBの3
入力データの値から文字画像の色を判別する色文字判別
方法であって、RGBデータの内の最大値としてのRG
B最大値を求めるRGB最大値判別ステップと、RGB
データの内の最小値としてのRGB最小値を求めるRG
B最小値判別ステップと、RGBデータの内の中央値と
してのRGB中央値を求めるRGB中央値判別ステップ
と、前記RGB中央値をしきい値と比較すると共に前記
RGB最大値と前記RGB最小値と前記RGB中央値と
前記しきい値とに基づいて文字画像の色を判別する色判
別ステップとを有することを特徴とする色文字判別方
法。
3. A pixel determined as a character image by image attribute determination processing of a character, a halftone dot, a photograph, etc.
A color character discrimination method for discriminating a color of a character image from a value of input data, wherein RG as a maximum value of RGB data
An RGB maximum value determining step for obtaining a B maximum value;
RG for finding RGB minimum value as minimum value of data
A B minimum value determining step, an RGB median value determining step of obtaining an RGB median value as a median value of the RGB data, comparing the RGB median value with a threshold value, and comparing the RGB maximum value and the RGB minimum value with each other. A color determining step of determining a color of a character image based on the RGB median value and the threshold value.
【請求項4】しきい値をRGB最大値およびRGB最小
値から求めるしきい値決定ステップを前記RGB中央値
判別ステップと前記色判別ステップとの間に備えたこと
を特徴とする請求項3に記載の色文字判別方法。
4. A method according to claim 3, further comprising the step of determining a threshold value from the RGB maximum value and the RGB minimum value between said RGB median value determination step and said color determination step. The described color character determination method.
【請求項5】文字、網点、写真等の画像属性判別処理に
より、文字画像と判別された画素に対して、RGBの3
入力データの値から文字画像の色を判別する色文字判別
方法であって、RGBデータの内の最大値としてのRG
B最大値を求めるRGB最大値判別ステップと、RGB
データの内の最小値としてのRGB最小値を求めるRG
B最小値判別ステップと、RGBデータの内の中央値と
してのRGB中央値を求めるRGB中央値判別ステップ
と、前記RGB中央値と前記RGB最小値との差分を求
める差分算出ステップと、前記RGB中央値としきい値
とを比較し、前記差分としきい値とを比較すると共に前
記RGB最大値と前記RGB最小値と前記RGB中央値
と前記差分と前記しきい値とに基づいて文字画像の色を
判別する色判別ステップとを有することを特徴とする色
文字判別方法。
5. A pixel determined to be a character image by image attribute determination processing for a character, a halftone dot, a photograph, etc.
A color character discrimination method for discriminating a color of a character image from a value of input data, wherein RG as a maximum value of RGB data
An RGB maximum value determining step for obtaining a B maximum value;
RG for finding RGB minimum value as minimum value of data
A B minimum value determining step, an RGB median value determining step of determining an RGB median value as a median value of the RGB data, a difference calculating step of determining a difference between the RGB median value and the RGB minimum value, Comparing the value with a threshold value, comparing the difference with the threshold value, and changing the color of the character image based on the RGB maximum value, the RGB minimum value, the RGB median value, the difference, and the threshold value. And a color discriminating step of discriminating.
【請求項6】文字、網点、写真等の画像属性判別処理に
より、文字画像と判別された画素に対して、RGBの3
入力データの値から文字画像の色を判別する色文字判別
方法であって、RGBデータの内の最大値としてのRG
B最大値を求めるRGB最大値判別ステップと、RGB
データの内の最小値としてのRGB最小値を求めるRG
B最小値判別ステップと、RGBデータの内の中央値と
してのRGB中央値を求めるRGB中央値判別ステップ
と、前記RGB中央値と前記RGB最大値との差分を求
める差分算出ステップと、前記RGB中央値としきい値
とを比較し、前記差分としきい値とを比較すると共に前
記RGB最大値と前記RGB最小値と前記RGB中央値
と前記差分と前記しきい値とに基づいて文字画像の色を
判別する色判別ステップとを有することを特徴とする色
文字判別方法。
6. Pixels determined as character images by image attribute determination processing of characters, halftone dots, photographs, etc.
A color character discrimination method for discriminating a color of a character image from a value of input data, wherein RG as a maximum value of RGB data
An RGB maximum value determining step for obtaining a B maximum value;
RG for finding RGB minimum value as minimum value of data
A B minimum value determination step; an RGB median value determination step of determining an RGB median value as a median value of the RGB data; a difference calculation step of determining a difference between the RGB median value and the RGB maximum value; Comparing the value with a threshold value, comparing the difference with the threshold value, and changing the color of the character image based on the RGB maximum value, the RGB minimum value, the RGB median value, the difference, and the threshold value. And a color discriminating step of discriminating.
JP10053219A 1998-03-05 1998-03-05 Color character discriminating method Withdrawn JPH11252385A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP10053219A JPH11252385A (en) 1998-03-05 1998-03-05 Color character discriminating method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP10053219A JPH11252385A (en) 1998-03-05 1998-03-05 Color character discriminating method

Publications (1)

Publication Number Publication Date
JPH11252385A true JPH11252385A (en) 1999-09-17

Family

ID=12936727

Family Applications (1)

Application Number Title Priority Date Filing Date
JP10053219A Withdrawn JPH11252385A (en) 1998-03-05 1998-03-05 Color character discriminating method

Country Status (1)

Country Link
JP (1) JPH11252385A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007329795A (en) * 2006-06-09 2007-12-20 Fuji Xerox Co Ltd Image processing system, commodity order system and image processing program

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007329795A (en) * 2006-06-09 2007-12-20 Fuji Xerox Co Ltd Image processing system, commodity order system and image processing program

Similar Documents

Publication Publication Date Title
US7593570B2 (en) Image processing method and apparatus and storage medium
US6909803B2 (en) Text color detection for copier image processing
US6718059B1 (en) Block selection-based image processing
JP2001036752A (en) Picture processor and its method
EP0949801B1 (en) Image process apparatus, image process method and storage medium
JP3489200B2 (en) Color correction method for color printer
JPH11252385A (en) Color character discriminating method
JP3334047B2 (en) IMAGE PROCESSING APPARATUS, IMAGE READING APPARATUS AND IMAGE FORMING APPARATUS EQUIPPED WITH THE SAME, IMAGE PROCESSING METHOD, AND COMPUTER-READABLE STORAGE MEDIUM CONTAINING IMAGE PROCESSING PROCEDURE
JP3039675B2 (en) Color image processing equipment
JP3039674B2 (en) Color image processing equipment
JP5549836B2 (en) Image processing apparatus and image processing method
JP3899800B2 (en) Image processing apparatus, image processing method, and computer-readable recording medium storing image processing program
JP2006109482A (en) Image processing method, image processing apparatus and image processing program
JPH11136505A (en) Picture processor and picture processing method
JP2013202927A (en) Image forming method and image forming apparatus
JP2003189105A (en) Image processor, image forming apparatus, and image processing program
JPH1040373A (en) Image processor and method therefor
JPH03270383A (en) Image processing method
JP2000151997A (en) Original type discrimination device and image processor
JPH114344A (en) Image area judging method, its system and image processing unit
JPH0490682A (en) Color picture processor
JP2020120143A (en) Image processing device, image processing method, and program
JPH10336433A (en) Image processing method and system therefor
JPH1155508A (en) Method for discriminating attribute of image
JP2000209445A (en) Color image processing unit and color image processing method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20050302

RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7421

Effective date: 20050413

RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7421

Effective date: 20050627

A761 Written withdrawal of application

Free format text: JAPANESE INTERMEDIATE CODE: A761

Effective date: 20061101