JP3020240B2 - Color identification circuit - Google Patents

Color identification circuit

Info

Publication number
JP3020240B2
JP3020240B2 JP63289675A JP28967588A JP3020240B2 JP 3020240 B2 JP3020240 B2 JP 3020240B2 JP 63289675 A JP63289675 A JP 63289675A JP 28967588 A JP28967588 A JP 28967588A JP 3020240 B2 JP3020240 B2 JP 3020240B2
Authority
JP
Japan
Prior art keywords
color
circuit
colors
output
new
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP63289675A
Other languages
Japanese (ja)
Other versions
JPH02135585A (en
Inventor
泰彦 中野
茂 吉田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP63289675A priority Critical patent/JP3020240B2/en
Publication of JPH02135585A publication Critical patent/JPH02135585A/en
Application granted granted Critical
Publication of JP3020240B2 publication Critical patent/JP3020240B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Character Input (AREA)
  • Image Analysis (AREA)

Description

【発明の詳細な説明】 [概要] カラー原稿から読出したカラー画像信号から各種の色
を分離する色識別回路に関し、 色を分離する際に固定した閾値を用いずに色の集合に
よる分離(クラスタリング)を行うことを目的とし、 カラー原稿を分光特性の異なるフィルタを通した複数
色で読取って色を識別する回路において、最初に見つけ
た新しい色の色情報を保持する複数の色保持回路と、そ
の保持された各色と他の色との距離をそれぞれ計算し、
それぞれ同色かどうかを判定する複数個の判定回路と、
これら判定回路の出力をまとめてその注目色が新しい色
かどうかを判定する新色認識回路と、該新色認識回路の
出力を受けて、前記色保持回路に新しい色を保持させる
ように制御する制御回路と、前記判定回路からの出力
と、識別した色が有彩色か無彩色かを示す信号とを受け
て、これら信号を入力してエンコードし、エンコードし
た結果から色相の種類を示す色信号を出力するエンコー
ダとにより構成され、前記色保持回路に新色が同色と認
識できる最大許容距離d0の2倍以上離れて順次格納され
ていくように構成する。
DETAILED DESCRIPTION OF THE INVENTION [Summary] A color identification circuit for separating various colors from a color image signal read from a color original is described. A color separation (clustering) without using a fixed threshold when separating colors A plurality of color holding circuits for holding color information of a new color found first by reading a color original with a plurality of colors passed through filters having different spectral characteristics and identifying colors; Calculate the distance between each of the retained colors and other colors,
A plurality of judgment circuits for judging whether each color is the same,
A new color recognition circuit that collects the outputs of these determination circuits to determine whether the target color is a new color, and receives the output of the new color recognition circuit and controls the color holding circuit to hold the new color. A control circuit, receives an output from the determination circuit, and a signal indicating whether the identified color is a chromatic color or an achromatic color, inputs and encodes these signals, and outputs a color signal indicating the type of hue from the encoded result. is composed of an encoder for outputting a new color on the color holding circuit is configured such are successively stored remotely least twice the maximum allowable distance d 0 which can be recognized as the same color.

[産業上の利用分野] 本発明はカラー原稿から読出したカラー画像信号から
各種の色を分離する色識別回路に関する。
The present invention relates to a color identification circuit for separating various colors from a color image signal read from a color original.

[従来の技術] 銀行業務等においては、通帳等に記入された数字及び
文字を読取る目的で、文字読取り用OCR(Optical Char
acter Reader)が用いられている。この種の文字読取
り用OCRは、パターン認識技術の向上により手書き文字
読取り用としても用いられるようになってきている。こ
の種の装置では、対象とする帳票(以下原稿という)の
文字記入枠(書式ともいう)をドロップアウトカラーで
印刷していた。ドロップアウトカラーとは、人間の眼で
ははっきり区別できるがOCRセンサには背景の色と区別
がつかない色相と濃さをもつ色をいう。文字記入枠にこ
のようなドロップアウトカラーを用いると、OCRで読取
った時の画像データから文字記入枠が消えるので、文字
記入枠と文字の分離を可能としている。
[Prior Art] In a banking business or the like, a character reading OCR (Optical Char-
acter Reader) is used. This type of character reading OCR has also been used for reading handwritten characters due to improvements in pattern recognition technology. In this type of apparatus, a character entry frame (also referred to as a format) of a target form (hereinafter referred to as a manuscript) is printed in a dropout color. The dropout color is a color having a hue and a density that can be clearly distinguished by human eyes but cannot be distinguished from the background color by the OCR sensor. If such a dropout color is used for the character entry frame, the character entry frame disappears from the image data read by the OCR, so that the character entry frame and the characters can be separated.

第6図は従来のOCR読取り部の構成例を示す図であ
る。原稿1内には、文字記入枠(書式)1aで囲まれた文
字(A,B,C,D)が書込まれている。図に示す例では、原
稿1を副走査方向に移動させながら、主走査方向に1ラ
インずつ文字情報を読取る。1ラインの原稿1上のイメ
ージは、集光用レンズ2で集光され、フィルタ3によっ
てドロップアウトカラーを除去した後、CCDイメージセ
ンサ4に入力される。このCCDイメージセンサ4は、入
力した光を電気信号に変換して出力する。この電気信号
は、続くアンプ5で所定のレベルまで増幅された後、A/
D変換器(図示せず)でディジタルデータに変換され、
ディジタルデータに対して文字認識処理等が行われる。
FIG. 6 is a diagram showing a configuration example of a conventional OCR reading unit. In the document 1, characters (A, B, C, D) surrounded by a character entry frame (format) 1a are written. In the example shown in the figure, character information is read line by line in the main scanning direction while moving the original 1 in the sub-scanning direction. One line of the image on the document 1 is condensed by the condensing lens 2, the filter 3 removes the dropout color, and then input to the CCD image sensor 4. The CCD image sensor 4 converts the input light into an electric signal and outputs the electric signal. This electric signal is amplified to a predetermined level by the following amplifier 5, and then A / A
It is converted to digital data by a D converter (not shown),
Character recognition processing and the like are performed on the digital data.

[発明が解決しようとする課題] 従来の方法は、筆記用具(鉛筆又はボールペン)に合
わせて、ドロップアウトカラーとフィルタ3の特性を選
ぶ必要があり、ドロップアウトカラーの色によって、フ
ィルタ3を交換しなければならないという問題点があっ
た。
[Problem to be Solved by the Invention] In the conventional method, it is necessary to select the characteristics of the dropout color and the filter 3 according to the writing implement (pencil or ballpoint pen), and replace the filter 3 according to the color of the dropout color. There was a problem that had to be done.

そこで、本発明者は伝票をカラーで読取った後、色識
別により文字と書式とを分離する方式について発明し、
出願した(特願昭63−220067号、以下先願発明とい
う)。この方法は、伝票等の原稿を3色の画像信号とし
て読取り、色相,彩度,輝度(以下H(Hue),S(Satur
ation),V(Value)で表わす)変換を行うと共に、彩度
で所定の閾値により無彩色と有彩色に分けた後、無彩色
の輝度を文字認識に用い、有彩色は予め定めた複数の閾
値で2値または色数分の多値画像として出力するもので
ある。有彩色からなる文字記入枠情報は、文字の切り出
しに用いることができる。
Then, the present inventor invented a method of reading a slip in color and then separating characters and format by color identification,
We filed an application (Japanese Patent Application No. 63-220067, hereinafter referred to as the prior invention). In this method, a document such as a slip is read as a three-color image signal, and the hue, saturation, and luminance (hereinafter, H (Hue), S (Satur
ation), V (Value)), and after separating achromatic and chromatic colors by a predetermined threshold in saturation, the achromatic color is used for character recognition, and the chromatic color is a plurality of predetermined chromatic colors. It is output as a binary or multi-valued image of the number of colors with a threshold value. Character entry frame information composed of chromatic colors can be used for cutting out characters.

第7図にHSV変換後、HSV座標で背景,文字と文字記入
枠の位置する領域を示す。即ち、背景,文字は無彩色と
なるため、HSV座標で内側の円筒領域に入り、カラーの
文字記入枠は有彩色となるため、外側の中空円筒領域に
入ることになる。先願発明では、HSV変換後のこの性質
を利用し、先ずSで閾値をかけ、無彩色である文字,背
景と、有彩色である文字記入枠とを分離する。そして、
分離された無彩色からVに閾値をかけて文字と背景とを
区別する。一方、有彩色の方は伝票で用いる代表的な色
について色相を分割する閾値を第8図に示すように予め
定めておき、この閾値により予め定めた色数分の多値画
像として識別する。
FIG. 7 shows the background, the characters, and the area where the character entry frame is located in HSV coordinates after the HSV conversion. That is, since the background and the characters are achromatic, they enter the inner cylindrical area in the HSV coordinates, and the color character entry frame becomes the chromatic color, so they enter the outer hollow cylindrical area. In the prior invention, utilizing this property after the HSV conversion, a threshold is first applied at S to separate the achromatic characters and background from the chromatic character entry frame. And
A threshold is applied to V from the separated achromatic color to distinguish the character from the background. On the other hand, for the chromatic color, a threshold value for dividing the hue of the representative color used in the slip is determined in advance as shown in FIG. 8, and the threshold value is identified as a multi-value image of a predetermined number of colors.

第9図は先願発明の一実施例を示す構成ブロック図で
ある。原稿11上には文字記入枠11aとその中に記入され
た文字が存在している。画像処理部は、画像読取部20と
色識別部30より構成されている。画像読取部20で、原稿
11から読取った情報は、レンズL1,L2,L3及びフィルタF
1,F2,F3及びイメージセンサCCD1,CCD2,CCD3よりなる3
系統の光学系を用いて3色分の画像信号をライン単位に
読み取る。読取られた信号は、それぞれ続くアンプA1,A
2,A3で所定のレベルまで増幅された後A/D変換器ADC1,AD
C2,ADC3によりディジタルデータに変換される。そし
て、信号線l1〜l3から出力される。
FIG. 9 is a configuration block diagram showing an embodiment of the invention of the prior application. On the manuscript 11, there is a character entry frame 11a and characters entered therein. The image processing unit includes an image reading unit 20 and a color identification unit 30. In the image reading unit 20, the original
The information read from 11 is the lens L1, L2, L3 and filter F
1, consisting of F2, F3 and image sensors CCD1, CCD2, CCD3
An image signal for three colors is read line by line using a system optical system. The read signals are output from the following amplifiers A1 and A, respectively.
A / D converters ADC1 and AD after being amplified to a predetermined level by A2 and A3
It is converted to digital data by C2 and ADC3. Then, the signals are output from the signal lines l1 to l3.

色識別部30では、これら3色分の信号を受けて、HSV
変換器31でH,S,V信号に分離されて出力される。これら
信号の内、S信号は比較回路32で無彩色と有彩色とを分
離する閾値Tsと比較される。該比較回路32は、例えばS
<Tsならば無彩色とみて“0"を出力し、S≧Tsならば有
彩色とみて“1"を出力する。
The color identification unit 30 receives the signals for these three colors,
The converter 31 separates the signals into H, S, and V signals and outputs the signals. Among these signals, the S signal is compared by a comparison circuit 32 with a threshold value Ts for separating achromatic and chromatic colors. The comparison circuit 32 includes, for example, S
If <Ts, it is regarded as an achromatic color and outputs “0”. If S ≧ Ts, it is regarded as a chromatic color and outputs “1”.

一方、V信号,H信号はそれぞれ比較回路33,34に入力
される。比較回路33に入力される閾値Tvは無彩色のう
ち、文字と背景の輝度(明度ともいう)を区別するため
のものであり、比較回路34に入力される閾値THは色を区
別するためのものである。閾値THは、第8図より類推さ
れるように、文字記入枠が1色なら区別する必要はな
い。2色なら閾値1個、3色なら閾値2個というように
する。6色ならば閾値5個というように、伝票等に用い
られる色数により閾値及び閾値の個数nを決めておく。
On the other hand, the V signal and the H signal are input to the comparison circuits 33 and 34, respectively. Threshold Tv inputted to the comparison circuit 33 of the achromatic, is intended to distinguish the character and background brightness (also referred to as brightness), the threshold T H, which is input to the comparison circuit 34 to distinguish the color belongs to. Threshold T H, as will be inferred from FIG. 8, it is not necessary character entry box to distinguish if one color. One threshold is used for two colors, and two thresholds are used for three colors. The threshold and the number n of the thresholds are determined in advance according to the number of colors used for the slip, such as five thresholds for six colors.

比較回路33は、入力したV信号情報を閾値Tvと比較
し、V信号<Tvならば文字とみて“1"として出力し、V
信号≧Tvならば背景として“0"を出力する。更に、この
出力信号は比較回路32により制御されたマルチプレクサ
35により、無彩色部分はそのまま出力されるが、有彩色
の文字記入枠の部分は該マルチプレクサ35の他方に入力
された“0"が強制的にセレクトされ、出力される。従っ
て、文字記入枠部分は、ドロップアウトカラーを用いて
読取ったのと同様に除去される。このマルチプレクサ35
の出力が、後段の文字認識部(図示せず)に与えられ
る。
The comparison circuit 33 compares the input V signal information with a threshold value Tv, and if the V signal <Tv, outputs the signal as "1" as a character.
If signal ≧ Tv, “0” is output as the background. Further, this output signal is supplied to a multiplexer controlled by a comparison circuit 32.
The achromatic portion is output as it is by 35, but the chromatic character entry frame portion is forcibly selected and output as "0" input to the other side of the multiplexer 35. Therefore, the character entry frame portion is removed in the same manner as when reading using the dropout color. This multiplexer 35
Is provided to a subsequent character recognition unit (not shown).

比較回路34は、入力したH信号情報を前述のように予
め定められた複数個nの閾値THと比較し、H信号をn値
に多値化して出力する。例えば第3図のように6色を区
別する場合、閾値T1〜T5と比較して6値で各色が表わさ
れる。次にこの出力信号は、比較回路32により制御され
たマルチプレクサ36により有彩色の部分はそのまま出力
されるが、無彩色の文字記入枠の部分は該マルチプレク
サ36の他方に入力された“0"が強制的にセレクトされ、
合計7値の信号として出力される。そして、該マルチプ
レクサ36の出力は後段の文字記入枠参照部(図示せず)
に与えられる。
Comparison circuit 34, the H signal information inputted is compared with a threshold T H of the plurality n predetermined as described above, with multi-level and outputs the H signal to the n value. For example, when six colors are distinguished as shown in FIG. 3, each color is represented by six values as compared with threshold values T1 to T5. Next, the chromatic portion of this output signal is output as it is by the multiplexer 36 controlled by the comparison circuit 32, but “0” input to the other end of the multiplexer 36 is output in the achromatic character entry frame portion. Forced selection,
It is output as a signal having a total of seven values. The output of the multiplexer 36 is a character entry frame reference section (not shown) at the subsequent stage.
Given to.

前述した先願発明では第8図に示すように識別したい
色を予め与えておき、その色数に応じて閾値の数も決定
するようになっている。この方法では、例えば以下に示
すような不具合が発生する。第10図を用いて説明する。
図は固定閾値による色分離の説明図である。横軸はH
(色相)、縦軸は頻度である。同図(a)では色の数が
2なのでその真ん中に破線で示すような閾値Tをとって
黄色と赤とを分離している。これに対し、(b)では色
の数が3なので閾値をT1,T2と2個とっている。しかし
ながら、この例では青が丁度閾値T2にまたがった形で分
布しており、このままの閾値で分離すると、青が2つの
異なった色(2値T2より小さい青とT2よりも大きい青)
として分離されてしまうという不具合が生じる。
In the above-mentioned prior invention, as shown in FIG. 8, a color to be identified is given in advance, and the number of thresholds is determined according to the number of colors. In this method, for example, the following problems occur. This will be described with reference to FIG.
The figure illustrates color separation using a fixed threshold. The horizontal axis is H
(Hue) and the vertical axis is frequency. In FIG. 11A, since the number of colors is two, a threshold value T as shown by a broken line is taken in the middle of the number to separate yellow and red. On the other hand, in (b), since the number of colors is three, two thresholds T 1 and T 2 are set. However, in this example, blue is distributed just over the threshold T 2 , and when separated by the threshold as it is, blue is divided into two different colors (blue smaller than binary T 2 and blue larger than T 2). )
This causes a problem that the components are separated.

色数が増えてくると、更にこのような不具合の例は増
えてくる。上述の例では、閾値と閾値のマージンは等間
隔にとっているが、予め認識させたい色が分かっておれ
ば閾値をそれに応じて移動させることもできる。しかし
ながら、何種類もの伝票を一度に読取らせたい時、伝票
毎に色の情報を逐一与えてやるのは面倒で、効率も大幅
に低下する。また、回路的にも複雑になり、何か別の方
法で解決することが望まれていた。解決の一手段とし
て、単純クラスタリングによる色分離が考えられるが、
処理時間がかかり、回路構成が複雑になるという不具合
があった。
As the number of colors increases, examples of such defects further increase. In the above example, the threshold and the margin of the threshold are set at equal intervals. However, if the color to be recognized is known in advance, the threshold can be moved accordingly. However, when it is desired to read several types of slips at once, it is troublesome to give color information for each slip one by one, and the efficiency is greatly reduced. In addition, the circuit becomes complicated, and it has been desired to solve the problem by some other method. As a solution, color separation by simple clustering can be considered.
There is a problem that processing time is required and the circuit configuration is complicated.

本発明はこのような課題に鑑みてなされたものであっ
て、色を分離する際に固定した閾値を用いずに色の集合
による分離(クラスタリング)を行うことにより任意の
色に対して色分離を行うことができる色識別回路を提供
することを目的としている。
The present invention has been made in view of such a problem, and performs color separation for an arbitrary color by performing separation (clustering) by a set of colors without using a fixed threshold when separating colors. It is an object of the present invention to provide a color identification circuit capable of performing the following.

[課題を解決するための手段] 第1図は本発明の要部の原理ブロック図、第2図は本
発明の全体構成例を示す図である。第2図において、画
像読取部については省略してあるが、その構成は第9図
と同様である。そして、第2図の回路が第9図に示す回
路と異なる部分は、Hの比較回路34とマルチプレクサ36
がなくなり、代わりにクラスタリング回路37が設けられ
た点である。該クラスタリング回路37の出力が文字記入
枠参照部へ渡される。次にこのクラスタリング回路37の
具体的構成例を示す第1図について説明する。
[Means for Solving the Problems] FIG. 1 is a principle block diagram of a main part of the present invention, and FIG. 2 is a diagram showing an example of the overall configuration of the present invention. In FIG. 2, the image reading section is omitted, but the configuration is the same as in FIG. The circuit of FIG. 2 is different from the circuit of FIG.
Is eliminated, and a clustering circuit 37 is provided instead. The output of the clustering circuit 37 is passed to the character entry frame reference section. Next, FIG. 1 showing a specific configuration example of the clustering circuit 37 will be described.

第1図において、41は最初に見つけた新しい色の色情
報を保持する複数個の色保持回路、42はその保持された
各色と他の色との距離をそれぞれ計算し、それぞれ同色
かどうかを判定する複数個の判定回路である。これら色
保持回路41及び判定回路42は色の数nに応じてn個設け
られている。43はこれら判定回路42の出力をまとめてそ
の注目色が新しい色かどうかを判定する新色認識回路、
44は該新色認識回路43の出力を受けて、前記色保持回路
41に新しい色を保持させるように制御する制御回路であ
る。この回路を用いた全体回路の動作については、第9
図とほぼ同じであり、第9図の比較回路34とマルチプレ
クサ36の代わりにクラスタリング回路37が設けられた点
である。
In FIG. 1, reference numeral 41 denotes a plurality of color holding circuits for holding color information of a new color found first, and 42 calculates a distance between each held color and another color, and determines whether each color is the same color. It is a plurality of determination circuits for determination. The n color holding circuits 41 and the judging circuits 42 are provided in accordance with the number n of colors. 43 is a new color recognition circuit that collects the outputs of these determination circuits 42 and determines whether the target color is a new color,
44 receives the output of the new color recognition circuit 43 and
A control circuit for controlling the 41 to hold a new color. Regarding the operation of the whole circuit using this circuit,
This is almost the same as the drawing, except that a clustering circuit 37 is provided instead of the comparison circuit 34 and the multiplexer 36 in FIG.

[作用] 本発明は、色を分離するために色数に応じた固定の閾
値を使用せず、色の集合による分離(クラスタリング,C
lustering)を行うものである。本発明では、クラスタ
リングによる処理時間の増加は、処理をパラレルに行う
回路を考案することにより、固定閾値による方法と変わ
らない処理時間ですむ。しかも、識別精度については固
定閾値法より優れている。
[Operation] The present invention does not use a fixed threshold value according to the number of colors to separate colors, but separates by a set of colors (clustering, C
lustering). In the present invention, the increase in the processing time due to the clustering requires only the processing time that is not different from the method using the fixed threshold value by devising a circuit that performs the processing in parallel. Moreover, the discrimination accuracy is superior to the fixed threshold method.

第3図に示すように、ある画素の色相Haが読込まれた
時、各クラス(集合)との距離を計算し、クラス分けす
る。つまり、今クラス1〜nまである時、 を計算する。ここで、H1〜Hnは各クラス別の代表色相値
を示す。
As shown in FIG. 3, when the hue Ha of a certain pixel is read, the distance to each class (set) is calculated and the classes are classified. In other words, when there are classes 1 to n now, Is calculated. Here, H 1 ~Hn shows a different representative hue value each class.

今、d1〜dnのなかで同色と認識できる最大許容距離
(識別の対象となる色は、いずれも互いに2d0以上離れ
ていると仮定する)d0より小さいdiを捜す。つまり、ど
のクラスに近いのかを計算する。計算結果がd0以下にな
るクラスが見つかれば注目画素はクラスiに属するとい
うようにする。ここで、d1〜dnのいずれもが同色と認識
できる最大許容距離d0を越えている場合には、注目画素
は新しくクラスを生成することになる。本発明による
と、従来の固定閾値で問題であった閾値上に色の分布が
またがることはなく、色数に応じて自動的に最適の閾値
が得られ、人間の感覚に合致した色の分離が行える。
Now, the maximum allowable distance can be recognized as the same color among the d 1 -Dn (color to be identified, it is assumed that both are separated from each other 2d 0 or more) d 0 look smaller di. That is, it calculates which class it is close to. Calculation result to ensure that the target pixel if found class becomes d 0 less belonging to the class i. Here, if any of d 1 to dn exceeds the maximum allowable distance d 0 that can be recognized as the same color, a new class is generated for the pixel of interest. According to the present invention, the color distribution does not straddle the threshold value which is a problem with the conventional fixed threshold value, and the optimal threshold value is automatically obtained according to the number of colors, and color separation that matches human senses Can be performed.

第2図のH信号は、第1図の制御回路44及び各色保持
回路41,判定回路42に入力される。色保持回路41と判定
回路42とは1個ずつが対になっており、識別させたい色
数分だけ用意され、パラレルに処理される。各色保持回
路41には、各クラスタ(集合)の最初にきたHの値が制
御回路44からのラッチ信号により保持される。また、各
段の判定回路42では、この色保持回路41の値(色の代表
の色相値)と新しく入力された画素の差を計算し、その
結果が予め決めた同色と認識する最大許容距離d0と比較
して小さければ同色と判定して“1"を出力し、大きけれ
ば違う色と判定して“0"を出力する。
The H signal in FIG. 2 is input to the control circuit 44, the color holding circuits 41, and the determination circuit 42 in FIG. The color holding circuit 41 and the determination circuit 42 are paired one by one, and are prepared for the number of colors to be identified and processed in parallel. Each color holding circuit 41 holds the first H value of each cluster (set) by a latch signal from the control circuit 44. The determination circuit 42 of each stage calculates the difference between the value of the color holding circuit 41 (the representative hue value of the color) and the newly input pixel, and the result is the predetermined maximum allowable distance for recognizing the same color. smaller compared with d 0 is determined that the same color outputs "1", and outputs the to "0" determined a different color larger.

若し、全ての判定回路42の出力が“0"の場合には、新
色認識回路43は入力した色がどの色にも属さない新色で
あると判定して制御回路44にその旨の信号を送る。制御
回路44では、この信号を受けるとその前にラッチ命令を
送った次の段の色保持回路41にラッチ信号を与えて注目
画素の色を新たに登録する。このようにして、本発明に
よれば、色を分離する際に固定した閾値を用いずに色の
集合による分離(クラスタリング)を行うことにより任
意の色に対して色分離を行うことができる色識別回路を
提供することができる。
If the outputs of all the determination circuits 42 are “0”, the new color recognition circuit 43 determines that the input color is a new color that does not belong to any color, and notifies the control circuit 44 of that fact. Send a signal. Upon receiving this signal, the control circuit 44 supplies a latch signal to the color holding circuit 41 of the next stage to which the latch command has been sent before, and newly registers the color of the pixel of interest. As described above, according to the present invention, color separation can be performed on an arbitrary color by performing separation (clustering) using a set of colors without using a fixed threshold when separating colors. An identification circuit can be provided.

[実施例] 以下、図面を参照して本発明の実施例を詳細に説明す
る。
[Example] Hereinafter, an example of the present invention will be described in detail with reference to the drawings.

第4図は本発明の一部であるクラスタリング回路の一
実施例を示す構成ブロック図である。図に示す実施例で
は色保持回路41としてレジスタを用い、色の数n=4の
場合を示している。G1は制御回路44の制御出力をその一
方の入力に、判定回路42の出力を他方の入力に受けるア
ンドゲートで色の数に応じた数だけ設けられている。こ
のアンドゲートG1は、現在見つかったクラスの数(色
数)によって制御回路44から出力される制御信号と各段
の判定回路42とのアンドをとるもので、これは必要な判
定結果のみ取得するためのものである。例えば、2色し
かクラス分けされていなければ3段目,4段目の判定結果
は必要ない。即ち、現在2色クラス分けされていれば、
上から2つの制御信号a1,a2は“1"、残りの制御信号a3,
a4が“0"になる。
FIG. 4 is a block diagram showing an embodiment of a clustering circuit which is a part of the present invention. In the illustrated embodiment, a register is used as the color holding circuit 41, and the case where the number of colors is n = 4 is shown. G1 is provided with a number corresponding to the number of colors by AND gates that receive the control output of the control circuit 44 at one input thereof and the output of the determination circuit 42 at the other input. The AND gate G1 ANDs the control signal output from the control circuit 44 and the judgment circuit 42 of each stage according to the number of currently found classes (the number of colors), and acquires only necessary judgment results. It is for. For example, if only two colors are classified, the third and fourth determination results are unnecessary. That is, if it is currently classified into two colors,
The two control signals a 1 and a 2 from the top are “1”, and the remaining control signals a 3 and a 3
a 4 becomes “0”.

G2は各アンドゲートG1の出力を受けるノアゲートで、
その出力は制御回路44に与えられている。ノアゲートG2
は、各段の判定結果全てが“0"で、即ちどのクラスの色
でもないと判断された場合、このノアゲートG2により出
力“1"を制御回路44に与えて、新しくこの色を登録する
ように知らせるものである。これらアンドゲートG1及び
ノアゲートG2は、第1図の新色認識回路43に対応してい
る。45は各アンドゲートG1の出力を受けてエンコードす
るエンコーダで、その出力は後段の文字記入枠参照部
(図示せず)に与えられている。また、該エンコーダ45
には比較回路32(第2図参照)から制御信号が与えられ
ている。このように構成された回路の動作を説明すれ
ば、以下のとおりである。
G2 is a NOR gate receiving the output of each AND gate G1,
The output is given to the control circuit 44. Noah gate G2
When all the determination results of each stage are “0”, that is, it is determined that the color does not belong to any class, the output “1” is given to the control circuit 44 by the NOR gate G2 to newly register this color. To inform. These AND gate G1 and NOR gate G2 correspond to the new color recognition circuit 43 of FIG. An encoder 45 receives and encodes the output of each AND gate G1, and the output is provided to a character entry frame reference section (not shown) at the subsequent stage. In addition, the encoder 45
Is supplied with a control signal from the comparison circuit 32 (see FIG. 2). The operation of the circuit configured as described above will be described below.

HSV変換回路31(第2図参照)から出力されたH信号
は、制御回路44,レジスタ41及び判定回路42に入る。最
初は、レジスタ41に入っている初期値は何であってもか
まわない。各判定回路42は、レジスタ41に入っている初
期値と入力されたH信号との差分を演算する。最初は意
味のない判定結果が出力されるが、制御回路44からの制
御信号“0"により強制的にアンドゲートG1の出力はすべ
て“0"にされる。
The H signal output from the HSV conversion circuit 31 (see FIG. 2) enters a control circuit 44, a register 41, and a determination circuit 42. Initially, it does not matter what the initial value is in the register 41. Each determination circuit 42 calculates a difference between the initial value stored in the register 41 and the input H signal. At first, a meaningless determination result is output, but the output of the AND gate G1 is forcibly set to "0" by the control signal "0" from the control circuit 44.

ノアゲートG2は全て“0"の信号を受けるので、その出
力は“1"になり、制御回路44に新色である旨の信号を送
る。制御回路44は、この信号を受けると、第1段目レジ
スタ41にラッチ命令を出力し、最初の色信号H1がラッチ
される。ここで、また差分演算が行われ、判定回路42の
出力は当然に“1"になる(なんとなればレジスタ41に入
っている信号及び入力信号共にH1であるからである)。
ここで、初めてエンコーダ45に“1000"(信号b1,b2,b3,
b4の順)が入力される。
Since the NOR gate G2 receives all "0" signals, its output becomes "1" and sends a signal to the control circuit 44 indicating that it is a new color. Upon receiving this signal, the control circuit 44 outputs a latch instruction to the first-stage register 41, and the first color signal H1 is latched. Here, the difference operation is performed again, and the output of the determination circuit 42 naturally becomes “1” (because both the signal and the input signal in the register 41 are H1).
Here, for the first time, “1000” (signals b 1 , b 2 , b 3 ,
b 4 ) is input.

第5図はエンコーダ論理式を示す図である。ここで、
エンコーダ入力は5ビットとなっているが、一番左端は
比較回路32から与えられる制御信号である。この信号が
“1"の場合は有彩色、“0"の場合は無彩色を示す。次の
4ビットは順にb1,b2,b3,b4となっている。エンコーダ4
5は比較回路32からの制御信号が“0"の場合にはエンコ
ードを行わず、“1"の時のみ、即ち有彩色であった時の
みエンコードを行う。エンコード出力は3ビットで表わ
され、入力の左端のビットを除いたb1,b2,b3,b4につい
てエンコードされる。ここでは、b1がLSB、b4がMSBとな
っている。
FIG. 5 is a diagram showing an encoder logical expression. here,
Although the encoder input has 5 bits, the leftmost end is a control signal given from the comparison circuit 32. When this signal is “1”, it indicates a chromatic color, and when this signal is “0”, it indicates an achromatic color. The next four bits are b 1 , b 2 , b 3 , and b 4 in that order. Encoder 4
Reference numeral 5 does not perform encoding when the control signal from the comparison circuit 32 is "0", but performs encoding only when it is "1", that is, only when it is a chromatic color. The encoded output is represented by 3 bits, and is encoded for b 1 , b 2 , b 3 , b 4 excluding the leftmost bit of the input. Here, b 1 is LSB, b 4 is a MSB.

前記“1000"がエンコーダ45に入った時のノアゲートG
2の出力は“0"で、次のレジスタへのラッチ命令は出な
い。次に、2番目のH信号H2が入ってくると、H1の判定
と同様にして判定回路42による距離計算が行われ、判定
結果が出力される。この時も意味のある演算が行われる
のは第1段目の判定回路42のみである。判定の結果、H1
と同色と判定されると、ノアゲートG2の出力は“0"で同
様の演算が繰返され、エンコーダ45に“1000"が出力さ
れる。
NOR gate G when “1000” enters encoder 45
The output of 2 is "0" and no latch instruction to the next register is issued. Next, when the second H signal H2 enters, the distance calculation is performed by the determination circuit 42 in the same manner as the determination of H1, and the determination result is output. At this time, only the first-stage determination circuit 42 performs a meaningful operation. As a result of the judgment, H1
When the same color is determined, the output of the NOR gate G2 is "0" and the same operation is repeated, and "1000" is output to the encoder 45.

ここで、判定回路42によりH2はH1とは違う色と判定さ
れると、1段目の判定回路42の出力が“0"になり、この
結果全てのアンドゲートG1の出力が“0"になり、ノアゲ
ートG2の出力は“1"になる。そして制御回路44にこの2
番目の色H2をレジスタ41にラッチするよう命令を出す。
そして、もう一度演算をしなおし、今度はエンコーダ45
に“0100"が出力される。この時のノアゲートG2の出力
は“0"である。この後に、3番目の色信号H3が入ってく
るが、3番目以降の画素は2つの色のうちどちらに属す
るかが判定回路42により判定される。以下、同様の処理
により全ての画素についてクラスの代表色との距離を計
算することにより、クラス(色)毎に分類される。
Here, when the determination circuit 42 determines that H2 is a different color from H1, the output of the first-stage determination circuit 42 becomes “0”, and as a result, the outputs of all the AND gates G1 become “0”. And the output of the NOR gate G2 becomes "1". Then, the control circuit 44
An instruction is issued to latch the second color H2 in the register 41.
Then, the calculation is performed again, and this time, the encoder 45
Is output as "0100". At this time, the output of the NOR gate G2 is "0". After this, the third color signal H3 comes in. The determination circuit 42 determines which of the two colors the third and subsequent pixels belong to. Hereinafter, all pixels are classified by class (color) by calculating the distance from all the pixels to the representative color of the class.

本発明によれば、入力した画像から順に新色が決定さ
れていく。その場合において、新色間同士については、
前述したように、識別の対象となる色はいずれも互いに
2d0以上離れているものであるから(第3図参照)、新
色の分離がうまくいかなくなるということはない。な
お、最大許容距離d0は、その値を変更することができ、
必要に応じてきめ細かい色の分離が可能となる。
According to the present invention, new colors are determined in order from the input image. In that case, between the new colors,
As mentioned above, all colors to be identified
2d since it is 0 which are more away (see FIG. 3), is not that new color separation can not go wrong. The value of the maximum allowable distance d 0 can be changed,
Fine color separation is possible as needed.

[発明の効果] 以上、詳細に説明したように、本発明によれば、色を
分離する際に固定した閾値を用いずに色の集合による分
離(クラスタリング)を行うことにより任意の色に対し
て色分離を行うことができる色識別回路を提供すること
ができる。本発明によるクラスタリングの方法は閾値に
より色を分離する従来方式と同等の処理速度が得られ
る。
[Effects of the Invention] As described above in detail, according to the present invention, an arbitrary color can be obtained by performing separation (clustering) by a set of colors without using a fixed threshold when separating colors. To provide a color identification circuit capable of performing color separation. The clustering method according to the present invention can obtain a processing speed equivalent to that of the conventional method of separating colors by a threshold value.

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

第1図は本発明の要部の原理ブロック図、 第2図は本発明の全体構成例を示す図、 第3図は色のクラスタリングの説明図、 第4図はクラスタリング回路の一実施例を示す構成ブロ
ック図、 第5図はエンコーダ論理式を示す図、 第6図は従来のOCR読取部の構成例を示す図、 第7図はHSV表色系での色の分布を示す図、 第8図は色相の分布と色相を分割する閾値との関係を示
す図、 第9図は先願発明の一実施例を示す構成ブロック図、 第10図は固定閾値による色分離の説明図である。 第1図において、 41は色保持回路、 42は判定回路、 43は新色認識回路、 44は制御回路である。
FIG. 1 is a block diagram showing the principle of the main part of the present invention, FIG. 2 is a diagram showing an example of the overall configuration of the present invention, FIG. 3 is an explanatory diagram of color clustering, and FIG. FIG. 5 is a diagram showing an encoder logical expression, FIG. 6 is a diagram showing a configuration example of a conventional OCR reading unit, FIG. 7 is a diagram showing a color distribution in an HSV color system, FIG. 8 is a diagram showing the relationship between the hue distribution and the threshold for dividing the hue, FIG. 9 is a block diagram showing the configuration of an embodiment of the invention of the prior application, and FIG. . In FIG. 1, 41 is a color holding circuit, 42 is a judgment circuit, 43 is a new color recognition circuit, and 44 is a control circuit.

───────────────────────────────────────────────────── フロントページの続き (56)参考文献 特開 昭62−200485(JP,A) 特開 昭61−25199(JP,A) 特開 昭57−189278(JP,A) 特開 昭63−254039(JP,A) 特開 昭63−64479(JP,A) 特開 昭63−262965(JP,A) 特開 昭62−296279(JP,A) (58)調査した分野(Int.Cl.7,DB名) G06F 15/62 H04N 1/40 G06K 9/20 ──────────────────────────────────────────────────続 き Continuation of front page (56) References JP-A-62-200485 (JP, A) JP-A-61-25199 (JP, A) JP-A-57-189278 (JP, A) JP-A 63-200278 254039 (JP, A) JP-A-63-64479 (JP, A) JP-A-63-262965 (JP, A) JP-A-62-296279 (JP, A) (58) Fields investigated (Int. 7 , DB name) G06F 15/62 H04N 1/40 G06K 9/20

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】カラー原稿を分光特性の異なるフィルタを
通した複数色で読取って色を識別する回路において、 最初に見つけた新しい色の色情報を保持する複数の色保
持回路と、 その保持された各色と他の色との距離をそれぞれ計算
し、それぞれ同色かどうかを判定する複数個の判定回路
と、 これら判定回路の出力をまとめてその注目色が新しい色
かどうかを判定する新色認識回路と、 該新色認識回路の出力を受けて、前記色保持回路に新し
い色を保持させるように制御する制御回路と、 前記判定回路からの出力と、識別した色が有彩色か無彩
色かを示す信号とを受けて、これら信号を入力してエン
コードし、エンコードした結果から色相の種類を示す色
信号を出力するエンコーダとにより構成され、 前記色保持回路に新色が同色と認識できる最大許容距離
d0の2倍以上離れて順次格納されていくように構成され
た色識別回路。
A circuit for identifying a color by reading a color original with a plurality of colors passed through filters having different spectral characteristics, comprising: a plurality of color holding circuits for holding color information of a new color found first; A plurality of determination circuits for calculating the distance between each color and the other colors and determining whether or not the colors are the same, and a new color recognition for determining whether or not the target color is a new color by combining outputs of the determination circuits A control circuit that receives an output of the new color recognition circuit and controls the color holding circuit to hold a new color; and an output from the determination circuit and determines whether the identified color is a chromatic color or an achromatic color. And an encoder that receives and encodes these signals, and outputs a color signal indicating the type of hue from the encoded result. The color holding circuit recognizes that the new color is the same color. The maximum allowable distance that
color identification circuit configured to are successively stored away more than twice the d 0.
JP63289675A 1988-11-16 1988-11-16 Color identification circuit Expired - Fee Related JP3020240B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63289675A JP3020240B2 (en) 1988-11-16 1988-11-16 Color identification circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63289675A JP3020240B2 (en) 1988-11-16 1988-11-16 Color identification circuit

Publications (2)

Publication Number Publication Date
JPH02135585A JPH02135585A (en) 1990-05-24
JP3020240B2 true JP3020240B2 (en) 2000-03-15

Family

ID=17746289

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63289675A Expired - Fee Related JP3020240B2 (en) 1988-11-16 1988-11-16 Color identification circuit

Country Status (1)

Country Link
JP (1) JP3020240B2 (en)

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS57189278A (en) * 1981-05-18 1982-11-20 Nec Corp Pattern recognizing device
JPS6125199A (en) * 1984-07-14 1986-02-04 日本電気株式会社 Voice recognition system
JPS62200485A (en) * 1986-02-28 1987-09-04 Toshiba Corp Optical character reader

Also Published As

Publication number Publication date
JPH02135585A (en) 1990-05-24

Similar Documents

Publication Publication Date Title
US5134666A (en) Image separator for color image processing
US5956468A (en) Document segmentation system
US7054485B2 (en) Image processing method, apparatus and system
EP0422544B1 (en) Color image data processing apparatus
JPH0435167A (en) Line picture separation system
US6269186B1 (en) Image processing apparatus and method
JP3020240B2 (en) Color identification circuit
JPH11272864A (en) Optical character read method or its device
JP2637498B2 (en) Image signal processing device
JP2854307B2 (en) Color identification circuit
JP2859619B2 (en) Color identification circuit
JP2637541B2 (en) Color identification method and device
JP2644477B2 (en) Image processing method
JP4571758B2 (en) Character recognition device, character recognition method, image processing device, image processing method, and computer-readable recording medium
JPS6359272A (en) Picture processor
JP2003196592A (en) Program for processing image, and image processor
JP2947566B2 (en) In-frame area detection device
JP2851060B2 (en) Color identification device
CN110888611B (en) Image processing apparatus, image processing method, and storage medium
JPH03153167A (en) Character area separation system
JP2656874B2 (en) Integrated automatic stencil printing machine
JPH08212294A (en) Optical character reader
JPH05344329A (en) Picture area discriminating device
JPH10200767A (en) Image processing unit
JPH01161590A (en) Character recognizing method

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees