JPS5856905B2 - Pattern extraction method and device in pattern recognition device - Google Patents

Pattern extraction method and device in pattern recognition device

Info

Publication number
JPS5856905B2
JPS5856905B2 JP54042070A JP4207079A JPS5856905B2 JP S5856905 B2 JPS5856905 B2 JP S5856905B2 JP 54042070 A JP54042070 A JP 54042070A JP 4207079 A JP4207079 A JP 4207079A JP S5856905 B2 JPS5856905 B2 JP S5856905B2
Authority
JP
Japan
Prior art keywords
pattern
cutting
scanning
counting
scanning line
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
Application number
JP54042070A
Other languages
Japanese (ja)
Other versions
JPS55135970A (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.)
Hitachi Ltd
Original Assignee
Hitachi 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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP54042070A priority Critical patent/JPS5856905B2/en
Publication of JPS55135970A publication Critical patent/JPS55135970A/en
Publication of JPS5856905B2 publication Critical patent/JPS5856905B2/en
Expired legal-status Critical Current

Links

Description

【発明の詳細な説明】 本発明は、文字読取装置等のパターン認識装置において
、それぞれ分離して所定方向に配列された単位パターン
を切り出すためのパターン切り出し方法および装置に関
するものである。
DETAILED DESCRIPTION OF THE INVENTION The present invention relates to a pattern cutting method and apparatus for cutting out unit patterns that are separated and arranged in a predetermined direction in a pattern recognition device such as a character reading device.

文字読取装置においては、帳票を行単位に走査し、それ
によって得られる映像パターンから、文字パターンの1
つ1つを切り出し、切り出された文字パターンと標準パ
ターンとを比較することによって文字読み取りを行なう
ようになっている。
In a character reading device, a document is scanned line by line, and one character pattern is detected from the resulting image pattern.
Characters are read by cutting out each character pattern and comparing the cut out character pattern with a standard pattern.

例えば、第1図に示すような複数個の文字パターンを含
む1行分パターン領域を、スキャナ(光電変換を行なう
眼に相当する部分)により、始めに縦方向(j方向)に
走査して光電変換し、次に、横方向(i方向)に1走査
線分(1列分)だけ移動させ、再度縦方向に走査して光
電変換し、これらの動作を1行分パターン領域を全部走
査するまで続ける。
For example, a one-line pattern area containing multiple character patterns as shown in Figure 1 is first scanned in the vertical direction (j direction) using a scanner (corresponding to the eye that performs photoelectric conversion), and photoelectric conversion is performed. Convert it, then move it by one scanning line (one column) in the horizontal direction (i direction), scan again in the vertical direction, perform photoelectric conversion, and perform these operations to scan the entire pattern area by one row. Continue until.

このようにして得られた映像パターンから各文字パター
ンを分離して切り出しを行なうわけであるが、このよう
な切り出し方法として、従来、まず、縦方向の周辺分布
を計算して文字パターンの横方向の中心を求め、予じめ
与えられた文字枠のピッチ、または文字ピッチを参照し
て、1行分パターン領域の文字パターン間に第1図の点
線に示すような横方向の区切り目を求め、次に、メモリ
内に記憶された1行分パターン領域内の文字パターンま
参照して、各区切り目的の文字パターンの横方向の周辺
分布を求めて、文字パターンの縦方向の中心点を求める
Each character pattern is separated and cut out from the video pattern obtained in this way. Conventionally, in such a cutting method, first, the vertical peripheral distribution is calculated, and then the horizontal direction of the character pattern is calculated. Find the center of the character frame, refer to the pitch of the character frame given in advance or the character pitch, and find the horizontal separation between the character patterns in the pattern area for one line, as shown by the dotted line in Figure 1. , Next, refer to the character patterns in the one-line pattern area stored in memory, find the horizontal peripheral distribution of each character pattern for separation purpose, and find the vertical center point of the character pattern. .

例えば、第2図に示すような「田」という文字の切り出
しを行なうために、その横方向および縦方向の周辺分布
PHおよびPvを計算すると、その文字パターンの左端
座標i1、右端座標12、上端座標j、および下端座標
j2が求まり、それによって、文字パターンの横方向お
よび縦方向の中心点が求まり、その中心点に基づいて文
字パターンを所望の大きさの枠で切り出すことができる
For example, in order to cut out the character ``田'' as shown in Figure 2, when calculating its horizontal and vertical peripheral distributions PH and Pv, the left end coordinate i1, right end coordinate 12, and top end coordinate of the character pattern are calculated. The coordinate j and the lower end coordinate j2 are determined, and thereby the horizontal and vertical center points of the character pattern are determined, and based on the center points, the character pattern can be cut out into a frame of a desired size.

このような従来のパターン切り出し方法では、縦方向の
周辺分布は、縦方向走査線内のバイナリパターンの状態
を検出することにより走査と同時に求まるが、横方向の
周辺分布は、容易なことではない。
In such conventional pattern extraction methods, the peripheral distribution in the vertical direction is determined simultaneously with scanning by detecting the state of the binary pattern within the vertical scanning line, but it is not easy to obtain the peripheral distribution in the horizontal direction. .

すなわち、l旦縦方向の周辺分布により横方向の区切り
目を求めた後に、改めて、メモリから対応する横方向の
ビットを取り出し、横方向のバイナリ・パターンの状態
を検出することによって横方向の周辺分布を求めている
That is, after first determining the horizontal delimiter using the vertical peripheral distribution, the corresponding horizontal bit is retrieved from the memory and the state of the horizontal binary pattern is detected to determine the horizontal peripheral distribution. I'm looking for a distribution.

そのため、横方向の周辺分布を求めるのに非常に長い時
間がかかり、パターンの切り出しに多大な時間を要する
という欠点があった。
Therefore, there is a drawback that it takes a very long time to obtain the peripheral distribution in the horizontal direction, and a great deal of time is required to cut out the pattern.

また、一旦メモリに所定の順序で記憶されたパターンを
再びそれとは異なる順序で読み出して横方向の周辺分布
を求めているので、そのための特殊なメモリを設ける必
要があるため、装置が非常に高価になるという問題があ
った。
In addition, since the pattern that has been stored in the memory in a predetermined order is read out again in a different order to determine the horizontal peripheral distribution, it is necessary to provide a special memory for this purpose, which makes the equipment very expensive. There was a problem with becoming.

本発明の主な目的は、極めて高速にパターンの切り出し
が行なえるパターン切り出し方法を提供することにある
The main object of the present invention is to provide a pattern cutting method that can cut out patterns at extremely high speed.

本発明の他の目的は、非常に簡単な構成で、かつ高速に
切り出しが行なえるパターン切り出し装置を提供するこ
とにある。
Another object of the present invention is to provide a pattern cutting device that has a very simple configuration and can cut out patterns at high speed.

このような目的を達成するために、本発明では所定方向
にそれぞれ分離して配列された複数個の単位パターンを
含む走査領域を所定方向と直角な方向の走査線に沿って
順次走査するに際し、各走査線における単位パターンの
存在状態を検出するとともに、各走査線の始端および終
端から各単位パターンの部分までの距離を検定し、これ
らの検出結果に基づいて単位パターンの切り出しを行な
うようにしたことに特徴がある。
In order to achieve such an object, in the present invention, when sequentially scanning a scanning area including a plurality of unit patterns arranged separately in a predetermined direction along a scanning line in a direction perpendicular to the predetermined direction, In addition to detecting the presence of unit patterns in each scanning line, the distance from the start and end of each scanning line to each unit pattern is verified, and the unit pattern is extracted based on these detection results. There are certain characteristics.

例えば、上述した文字読取装置において、1行分パター
ン領域を走査するに際し、その走査領域の走査方向であ
る縦方向の走査線の周辺分布を求めるとともに、各走査
線の上端から各文字パターンの部分に達するまでの距離
および各走査線の下端から各文字パターンの部分に達す
るまでの距離を求め、これらの値から、文字パターンの
左端、右端および上端、下端を求め、それによって文字
パターンの切り出しを行なう。
For example, in the above-mentioned character reading device, when scanning a pattern area for one line, the peripheral distribution of scanning lines in the vertical direction, which is the scanning direction of the scanning area, is determined, and the portion of each character pattern is calculated from the top of each scanning line. , and the distance from the bottom edge of each scanning line to the part of each character pattern. From these values, find the left edge, right edge, top edge, and bottom edge of the character pattern, and then cut out the character pattern. Let's do it.

また、本発明では、上記した走査領域内の各走査線上の
パターンのビット数を計数する計数手段・と、走査線の
始端からパターン部分に達するまでのビット数を計数す
る計数手段と、走査線の終端からパターン部分に達する
までのビット数を計数する計数手段を設け、切り出しに
必要な情報をハード的に求めるようにしたことに特徴が
ある。
Further, in the present invention, a counting means for counting the number of bits of a pattern on each scanning line in the above-described scanning area, a counting means for counting the number of bits from the starting end of the scanning line until reaching the pattern portion, and The feature is that a counting means is provided to count the number of bits from the end of the pattern to the pattern part, and the information necessary for extraction is obtained by hardware.

以下、本発明の実施例を図面により詳細に説明する。Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.

第3図は本発明によるパターン切り出し方法の一例を説
明するための図で、文字読取装置において走査された1
行分パターン領域の例を示す。
FIG. 3 is a diagram for explaining an example of the pattern cutting method according to the present invention.
An example of a line pattern area is shown.

図では、上述したと同様に、まず、縦方向(j方向)に
走査し、次に、横方向(i方向)に1走査線分だけ移動
させ、再度縦方向に走査する動作を繰り返すようになっ
ている。
In the figure, as described above, the image is first scanned in the vertical direction (j direction), then moved in the horizontal direction (i direction) by one scanning line, and then scanned again in the vertical direction. It has become.

本発明の実施例で特徴的なことは、第3図aのように、
縦方向の各走査線に沿う走査を行なう毎に、第3図dの
ような縦方向の周辺分布Np (i)を求めるとともに
、パターン領域の上端すなわち走査線の始端から文字パ
ターンの一部に達するまでの距離Nt(i)およびパタ
ーン領域の下端すなわち走査線の終端から文字パターン
の一部に達するまでの距離Nb(i)(第3図すおよび
Cに示す。
The characteristic feature of the embodiment of the present invention is as shown in FIG. 3a,
Each time scanning is performed along each scanning line in the vertical direction, the peripheral distribution Np (i) in the vertical direction as shown in Fig. 3d is determined, and a part of the character pattern is and the distance Nb(i) from the lower end of the pattern area, that is, the end of the scanning line, to reaching a part of the character pattern (shown in FIGS. 3 and 3C).

)を求めることにある。).

このように、周辺分布Np(i)、距離N t (i)
、Nb(i)が求められると、周辺分布N p (i)
により、文字パターンの左端11および右端12が求め
られ、1行分パターン領域内での距離Nt(i)および
Nb(i)それぞれの最小値を計算することによって文
字パターンの上端j1および下端J2が求められ、それ
によって文字パターン切り出しのための枠が設定され、
文字パターンの切り出しが行なわれる。
In this way, the marginal distribution Np(i), the distance N t (i)
, Nb(i), the marginal distribution N p (i)
The left end 11 and right end 12 of the character pattern are obtained, and the upper end j1 and lower end J2 of the character pattern are calculated by calculating the minimum values of the distances Nt(i) and Nb(i) within the pattern area for one line. The frame for cutting out the character pattern is set accordingly.
The character pattern is cut out.

第3図aに示すパターン領域が走査され、光電変換され
た後、サンプリングされてバイナリデータに変換されて
いるとすれば、周辺分布Np(i)は走査線iにおける
文字パターン部分のビット数を計数することにより、ま
た、距離N t (i)およびNb(i)は走査線iに
おいてパターン領域の上端および下端から文字パターン
の一部に達するまでのそれぞれのビット数を計数するこ
とにより求められる。
If the pattern area shown in Figure 3a is scanned, photoelectrically converted, and then sampled and converted into binary data, the marginal distribution Np(i) is the number of bits in the character pattern part in scanning line i. Also, the distances N t (i) and Nb (i) are determined by counting the respective number of bits from the top and bottom edges of the pattern area to a part of the character pattern in scanning line i. .

また、本発明の実施例でさらに特徴的なことは、上述し
たようにして求めた値Np (i) 、 N t (i
)およびNp(i)のそれぞれをメディアン・フィルタ
に通すことにより、パターン中に含まれる雑音による影
響を軽減し、より正確な切り出しを行なうようにするこ
とにある。
Furthermore, a further characteristic feature of the embodiments of the present invention is that the values Np (i) and N t (i
) and Np(i) through a median filter to reduce the influence of noise contained in the pattern and to perform more accurate cutting.

このメディアン・フィルタは、注目する点およびその点
に隣接する複数の点における信号の値を大きさの順に並
べ換え、その中央の値を注目すべき点の信号の新しい値
として登録し、これらの操作を繰り返して、信号中のス
パイク状の雑音を除去するものである。
This median filter sorts the signal values at a point of interest and multiple points adjacent to that point in order of magnitude, registers the median value as the new value of the signal at the point of interest, and performs these operations. This process is repeated to remove spike-like noise from the signal.

そこで、このメディアンフィルタを周辺分布Np(i)
、距離Nt(i)、Nb(i)のそれぞれに適用し、そ
れによって得られた値Npm(i)、N t m (i
)、Nbm(i)を切り出しのための情報として使用す
ることにより、より正確な切り出しが行なえる。
Therefore, we use this median filter as the marginal distribution Np(i)
, distances Nt(i) and Nb(i), respectively, and the values obtained thereby are Npm(i) and Ntm(i
), Nbm(i) as information for extraction, more accurate extraction can be performed.

第4図は本発明に係る文字読取装置の一実施例の構成を
示すもので、1は装置全体を制御するホストマイクロコ
ンピュータ、2はマイクロプロセッサを含み、本発明に
よる文字パターン切り出しを行なう文字パターン切り出
し回路、3は文字パターンの認識を行なう文字パターン
認識回路、4は認識結果を出力するフロッピ・ディスク
等の出力装置、5は所定のパターン領域を走査するスキ
ャナからなるパターン観測装置6は上述した各回路を結
ぶインタフェース・バスでアル。
FIG. 4 shows the configuration of an embodiment of the character reading device according to the present invention, in which 1 is a host microcomputer that controls the entire device, 2 is a microprocessor, and the character reading device 2 includes a microprocessor for cutting out character patterns according to the present invention. The pattern observation device 6, which includes an extraction circuit, 3 a character pattern recognition circuit that recognizes character patterns, 4 an output device such as a floppy disk that outputs the recognition results, and 5 a scanner that scans a predetermined pattern area, is as described above. Al is an interface bus that connects each circuit.

このような構成において、まず、1行分パターン領域を
パターン観測装置5により走査し、その領域内のパター
ンを光電変換して文字パターン切り出し回路2に転送し
、そこで、後述するような文字パターンの切り出し処理
を行ない、1文字毎に切り出されたパターンをインタフ
ェース・バス6を通してマイクロコンピュータ1内のメ
モリに転送する。
In such a configuration, first, a pattern area corresponding to one line is scanned by the pattern observation device 5, and the pattern within the area is photoelectrically converted and transferred to the character pattern cutout circuit 2, where the character pattern cutout circuit 2, which will be described later, is A cutting process is performed, and the pattern cut out for each character is transferred to the memory in the microcomputer 1 through the interface bus 6.

次に、この切り出しパターンをインタフェース・バス6
を介して文字パターン認識回路4に転送し、認識処理を
施した後、一旦マイクロコンピュータ1に返送して編集
処理を施し、その結果をインタフェース・バス6を介し
て出力装置4に出力する。
Next, this cutout pattern is connected to the interface bus 6.
After being transferred to the character pattern recognition circuit 4 via the interface bus 6 for recognition processing, it is once returned to the microcomputer 1 for editing processing, and the result is output to the output device 4 via the interface bus 6.

マイクロコンピュータ1は、各種のデータの転送制御お
よび認識結果の編集処理を行なう。
The microcomputer 1 controls the transfer of various data and edits recognition results.

第5図は第4図の文字パターン切り出し回路2の具体的
構成の一例を示すもので、20は内部データ・バス、2
1は回路全体を制御するマイクロプロセッサ、22はマ
イクロプロセッサ21で実行するマイクロプログラムを
記憶する読み出し専用メモリ(以下、ROMと称する。
FIG. 5 shows an example of a specific configuration of the character pattern extraction circuit 2 shown in FIG. 4, in which 20 is an internal data bus;
1 is a microprocessor that controls the entire circuit; 22 is a read-only memory (hereinafter referred to as ROM) that stores a microprogram executed by the microprocessor 21;

)、23は第4図のインタフェース・バス6と接続する
ためのインタフェース回路、24はパターン観測装置5
と接続するための入出力制御回路、25は走査されたパ
ターン領域内の各走査線のパターンの縦方向の周辺分布
Np(i)を求める計数回路、26は走査パターン領域
の各走査線の上端から文字パターンの一部に達するまで
の距離を求める計数回路27は走査パターン領域の各走
査線の下端から文字パターンの一部に達するまでの距離
を求める計数回路、28は1走査線分のパターンデータ
を記憶し、かつ、計数回路25〜27を制御するための
制御回路、29は計数回路25〜27で求めた結果等を
記憶するメモリ、30は計数回路25〜27で得られた
結果にメディアン・フィルタリングを施すためのメディ
アン・フィルタ回路である。
), 23 is an interface circuit for connecting to the interface bus 6 in FIG. 4, and 24 is a pattern observation device 5.
25 is a counting circuit for calculating the vertical peripheral distribution Np(i) of the pattern of each scanning line in the scanned pattern area; 26 is the upper end of each scanning line in the scanned pattern area; A counting circuit 27 calculates the distance from the bottom of each scanning line in the scanning pattern area to a part of the character pattern, and a counting circuit 28 calculates the distance from the bottom of each scanning line in the scanning pattern area to a part of the character pattern. A control circuit for storing data and controlling the counting circuits 25 to 27; 29 a memory for storing the results obtained by the counting circuits 25 to 27; and 30 a memory for storing the results obtained by the counting circuits 25 to 27. This is a median filter circuit for performing median filtering.

マイクロプロセッサ21は、これらの回路の全体の制御
を行なうとともに、計数回路25〜27で得られた結果
を利用して文字パターンの切り出し処理を行なうが、以
下、このようなマイクロプロセッサ21での処理を中心
に、第5図の回路の動作を説明する。
The microprocessor 21 controls these circuits as a whole and also performs character pattern cutout processing using the results obtained by the counting circuits 25 to 27. The operation of the circuit shown in FIG. 5 will be explained mainly.

なお、パターン観測装置5では、走査パターン領域内の
パターンを光電変換するとともに、2値化してバイナリ
・データに変換する処理を施して、文字パターン切り出
し回路2にディジタル信号として出力するものとする。
It is assumed that the pattern observation device 5 photoelectrically converts the pattern in the scanning pattern area, as well as performs a process of binarizing and converting it into binary data, and outputs it to the character pattern cutout circuit 2 as a digital signal.

まず、パターン観測装置5から縦方向の1走査線分(1
列分)のバイナリ・データ(例えば、128ビツトから
なる。
First, from the pattern observation device 5, one vertical scanning line (1
binary data (for example, 128 bits).

)を通常のインタフェースの役目をする入出力制御回路
24を経由して取り込み、制御回路28のメモリに格納
する。
) is taken in via the input/output control circuit 24, which serves as a normal interface, and stored in the memory of the control circuit 28.

次に、制御回路28のメモリに格納されたデータの内、
所望のデータ部分(例えば、96ビツトからなる。
Next, among the data stored in the memory of the control circuit 28,
the desired data portion (eg, consisting of 96 bits).

)を抽出して読み出し、内部データ・バス20を介して
メモリ29へ書き込むと同時に、計数回路25〜27へ
転送する。
) is extracted, read, and written to the memory 29 via the internal data bus 20, and simultaneously transferred to the counting circuits 25-27.

計数回路25〜27では、転送されて来たデータを基に
文字パターン切り出しに必要な情報Np (i) 、
N t (i) 、 Nb (i)を求める。
The counting circuits 25 to 27 calculate information Np (i) necessary for cutting out character patterns based on the transferred data.
Find N t (i) and Nb (i).

このようにして情報Np(t) y N t (i)
t Nb (t)が求められると、その結果をメモリ2
9へ書き込む。
In this way, the information Np(t) y N t (i)
Once t Nb (t) is determined, the result is stored in memory 2.
Write to 9.

上述した処理は1走査線分のデータに対するものであり
、次の走査線分のデータに対しても同様な処理を行なう
The above-described processing is for data for one scanning line, and similar processing is performed for data for the next scanning line.

そして、このような処理を1行分パターン領域に亘って
繰り返す。
Then, such processing is repeated over the pattern area for one line.

例えば、1行が1500走査線(列)からなる場合には
、1500回繰り返すことになる。
For example, if one row consists of 1500 scanning lines (columns), it will be repeated 1500 times.

次に、メディアン・フィルタ回路30ではこのようにし
て得られた1行分の情報Np(iLNt(i)。
Next, the median filter circuit 30 generates one row of information Np(iLNt(i)) obtained in this manner.

Nb(i)に対してメディアンフィルタリングを施し、
パターン切り出し情報N p m (i) 、 N t
m (i) 、 Nbm(i)を得る。
Apply median filtering to Nb(i),
Pattern cutting information N p m (i), N t
m (i) , obtain Nbm(i).

例えば、周辺分布Np(i)の場合、n番目の走査線に
おける周辺分布Np(n)を注目すべき点の値とし、そ
の点を中心に、n−N番目の走査線からn+N番目まで
の周辺分布Np(n−N) 〜NP(n+N)をメモリ
29から取り出し、それらの値をその大きさの順序に並
べ換え、N+1番目の大きさを有する周辺分布を選択し
て取り出し、その値を注目しているn番目の走査線分の
切り出し情報N p m (n)としてメモリ29に登
録する。
For example, in the case of the marginal distribution Np(i), the marginal distribution Np(n) at the nth scanning line is taken as the value of the point of interest, and from the n-Nth scanning line to the n+Nth scanning line centering on that point, Retrieve the marginal distributions Np(n-N) ~NP(n+N) from the memory 29, rearrange those values in the order of their magnitudes, select and retrieve the marginal distribution with the N+1st magnitude, and focus on its value. It is registered in the memory 29 as cutout information N p m (n) for the n-th scanning line.

このような処理を各走査線毎に繰り返して新しい周辺分
布N P m (i)を得る。
Such processing is repeated for each scanning line to obtain a new marginal distribution N P m (i).

このような処理を距離情報Nt(i)、Nb(i)につ
いても行ない、同様にして切り出し情報N t m (
i) 、 N b m (i)を得る。
Such processing is also performed for the distance information Nt(i) and Nb(i), and the cutout information Ntm (
i) , obtain N b m (i).

最初から1〜N番目および最後から1〜N番目の走査線
の切り出し情報Npm(i)、Ntm(i)、Nbm(
i)については、対応するN p (i) 、 N t
(i) 、 Nb (i)をそのまま使用すればよい
Cutting information Npm(i), Ntm(i), Nbm(
For i), the corresponding N p (i), N t
(i) and Nb (i) may be used as they are.

なお、メディアン・フィルタの原理については、例えば
、L、R,Rabiner、et ad:Appli
cations of a Non1inear
Smoothi−ng Algorithm to
5peech Proce−ssing、IEE
E Transaction As5P−23、A6.
pp552−557(1975年12月発行)に詳細に
示されている。
Regarding the principle of the median filter, for example, L, R, Rabiner, et ad: Appli
cations of a Non1inear
Smoothing Algorithm to
5peech Processing, IEE
E Transaction As5P-23, A6.
552-557 (published December 1975).

このように、本発明の実施例によれば、情報Np(i)
、Nt(i)、Nb(i)をメディアン・フィルタ30
に通すことになり、文字パターン中に含まれる雑音によ
るパターン切り出しへの影響を著るしく軽減することが
できる。
Thus, according to embodiments of the present invention, information Np(i)
, Nt(i), Nb(i) using a median filter 30
The influence of noise contained in character patterns on pattern extraction can be significantly reduced.

さらに、マイクロプロセッサ21では、このようにして
得られた切り出し情報Npm(i)、Ntm(i)。
Furthermore, the microprocessor 21 uses the thus obtained cutout information Npm(i) and Ntm(i).

N b m (i)によって、各文字パターンの左端1
1・右端12、上端J1および下端J2を求め、それら
の値から各文字パターンの横方向および縦方向の中心点
を求め、切り出しのための枠を設定して各文字パターン
の切り出しを行なう。
By N b m (i), the left end 1 of each character pattern
1. Find the right edge 12, top edge J1, and bottom edge J2, find the horizontal and vertical center points of each character pattern from these values, set a frame for cutting out, and cut out each character pattern.

第6図は第5図の回路25〜28部分の具体的構成の一
例を示すものである。
FIG. 6 shows an example of a specific configuration of the circuits 25 to 28 in FIG. 5.

周辺分布Np(i)を求める計数回路25は、アンドゲ
ート251.8ビツト・バイナリ・カウンタ252およ
びバス・ドライバ253からなり、距離Nt(i)を求
める計数回路26はインバータ261゜フリップフロッ
プ262、アンドゲート263、8ビツト・バイナリ・
カウンタ264およびバス・ドライバ265からなり、
距離Nb(i)を求める計数回路27はオアゲート27
1.8ビツト・バイナリ・カウンタ272およびバス・
ドライバ273からなり、さらに、制御回路28は制御
パルス・デコーダ281.256ビツト・ランダム・ア
クセス・メモリ(以下、RAMという。
The counting circuit 25 for calculating the marginal distribution Np(i) consists of an AND gate 251.8-bit binary counter 252 and a bus driver 253, and the counting circuit 26 for calculating the distance Nt(i) consists of an inverter 261, a flip-flop 262, ANDGATE263, 8-bit binary
Consisting of a counter 264 and a bus driver 265,
The counting circuit 27 for calculating the distance Nb(i) is an OR gate 27
1.8-bit binary counter 272 and bus
The control circuit 28 further includes a control pulse decoder 281 and a 256-bit random access memory (hereinafter referred to as RAM).

)282.8ビツト・アドレス・カウンタ283並列入
出力可能な16ビツト・シフトレジスタ284、バス・
ドライバ285およびマイクロプロセッサ21からの制
御信号を入力する制御信号線286からなる。
) 282.8-bit address counter 283 16-bit shift register 284 capable of parallel input/output, bus
It consists of a driver 285 and a control signal line 286 into which control signals from the microprocessor 21 are input.

なお、内部データ・バス20は16ビツト構成であると
する。
It is assumed that the internal data bus 20 has a 16-bit configuration.

以下、第6図の動作を詳細に説明する。The operation shown in FIG. 6 will be explained in detail below.

1行分文字パターン領域の各走査線分(1列分)のバイ
ナリ・データは8語(1語は16ビツト)からなってい
るとする。
It is assumed that the binary data of each scanning line (one column) of a one-line character pattern area consists of eight words (one word is 16 bits).

まず、第5図に示すパターン観測装置5で走査され、光
電変換され、さらに2値化されたバイナリ・データを語
単位でインタフェースとしての人出力制御回路24を経
由してRAM282へ入力する。
First, binary data scanned by the pattern observation device 5 shown in FIG. 5, photoelectrically converted, and further binarized is input word by word to the RAM 282 via the human output control circuit 24 as an interface.

そのために、まず、アドレス・カウンタ283を制御パ
ルス・デコーダ281からの制御信号C1により0にリ
セットし、その後、1語のバイナリ・データをデコーダ
281からの制御信号C2によりシフト・レジスタ28
4に書き込む。
To do this, first, the address counter 283 is reset to 0 by the control signal C1 from the control pulse decoder 281, and then one word of binary data is transferred to the shift register 28 by the control signal C2 from the decoder 281.
Write in 4.

次に、デコーダ281からの制御クロックパルスCPに
よりアドレス・カウンタ283の内容を1ずつアップす
るとともに、シフト・レジスタ284をシフトして行き
、シフト・レジスタ284内のバイナリ・データを1ビ
ツトずつデコーダ281からの書き込み制御信号C3に
よりRAM282に順次格納する。
Next, the content of the address counter 283 is incremented by 1 by the control clock pulse CP from the decoder 281, and the shift register 284 is shifted, so that the binary data in the shift register 284 is transferred bit by bit to the decoder 281. The data are sequentially stored in the RAM 282 in accordance with the write control signal C3 from .

RAM282へ1語分のバイナリ・データの格納が終る
と、再びアドレス・カウンタ283を制御信号C1によ
りリセットするとともに、次の1語分のバイナリ・デー
タをパターン観測装置5から内部データ・バス20を介
してシフト・レジスタ284に入力し、上述したと同様
な動作を繰り返してRAM282に格納する。
When one word of binary data has been stored in the RAM 282, the address counter 283 is reset again by the control signal C1, and the next one word of binary data is transferred from the pattern observation device 5 to the internal data bus 20. The signal is inputted to the shift register 284 via the signal line, and stored in the RAM 282 by repeating the same operation as described above.

このような動作を1走査線分(8語分)のバイナリ・デ
ータをRAM282に格納するまで続ける。
This operation is continued until one scanning line (eight words) of binary data is stored in the RAM 282.

このようにして、■走査線分のバイナリ・データがRA
M282に書き込まれると、次に、書き込まれた8詔(
128ビツト)から文字パターンを中心に6語(96ビ
ツト)のみを抽出してシフト・レジスタ284を経由し
て、メモリ29へ書き込む。
In this way, the binary data for scanning lines is
Once written in M282, the written 8th edict (
Only 6 words (96 bits), mainly character patterns, are extracted from the 128 bits) and written into the memory 29 via the shift register 284.

パターン観測装置5では、走査の位置ずれ等を考慮して
1走査線毎に8語ずつのバイナリ・データが得られるが
、実際に切り出しに必要な語数は文字パターン部分を中
心に6語であれば充分である。
The pattern observation device 5 can obtain binary data of 8 words for each scanning line, taking into account scanning positional deviations, etc. However, the actual number of words required for extraction is 6 words, mainly in the character pattern part. It is sufficient.

そこで、マイクロプロセッサ21では、文字パターンの
実際の中心を検出して、抽出す−゛き範囲を設定し、そ
の最初のビット位置に対、しす2.アドレスをアドレス
・カウンタ283に内部データ・バス20を介して設定
する。
Therefore, the microprocessor 21 detects the actual center of the character pattern, sets the range to be extracted, and selects the first bit position for the first bit position. The address is set in address counter 283 via internal data bus 20.

引続いて、デコーダ281から読み出し制御信号C4を
RAM282に印加してRAM282からの読み出しを
開始する。
Subsequently, a read control signal C4 is applied from the decoder 281 to the RAM 282 to start reading from the RAM 282.

この際、デコーダ281から制御クロックパルスCPを
アドレス・カウンタ283に印加してその内容を1ずつ
アップするとともに、シフト・レジスタ284の内容を
1ビツトずつシフトして行く。
At this time, a control clock pulse CP is applied from the decoder 281 to the address counter 283 to increment its contents one by one, and the contents of the shift register 284 are shifted one bit at a time.

それによって、RAM281から読み出したデータをシ
フトレジスタ284に順次格納して行く。
As a result, data read from the RAM 281 is sequentially stored in the shift register 284.

そして、1語分のデータがシフト・レジスタ284に格
納されると、デコーダ281からの制御信号C5により
バス・バッファ285を開いて、シフト・レジスタ28
4の1語分のデータをバス20を介してメモリ29に送
り、そこに書き込む。
When data for one word is stored in the shift register 284, the bus buffer 285 is opened by the control signal C5 from the decoder 281, and the data is stored in the shift register 284.
Data for one word of 4 is sent to the memory 29 via the bus 20 and written there.

同様に、次の1語がシフト・レジスタ284に格納され
るとバス・バッファ285を再び開いて、そのデータを
メモリ29に書き込む。
Similarly, when the next word is stored in shift register 284, bus buffer 285 is reopened and the data is written to memory 29.

このような動作を6語(96ビツト)に亘って繰り返す
This operation is repeated over 6 words (96 bits).

一方、RAM282からの読み出しに先立って、デコー
ダ281からの制御信号C6により、カウンタ252,
264,272を初期化するとともに、フリップフロッ
プ262をセットし、アンドゲート263に”l”信号
を印加する。
On the other hand, prior to reading from the RAM 282, the control signal C6 from the decoder 281 causes the counter 252,
264 and 272, the flip-flop 262 is set, and the "l" signal is applied to the AND gate 263.

続いて、デコーダ281から制御クロックパルスCPが
出力されるが、計数回路25では、このパルスCPとR
AM282の読み出し出力りとの論理積をアンドゲート
251でとり、その出力パルスをカウンタ252で計数
する。
Subsequently, the decoder 281 outputs the control clock pulse CP, and the counting circuit 25 outputs the control clock pulse CP and R.
An AND gate 251 performs a logical product with the readout output of the AM 282, and a counter 252 counts the output pulses.

すなわち、計数回路25では、RAM282から読み出
されたデータビットが1”である数、言い換えれば、文
字パターン部分のビット数を計数することになる。
That is, the counting circuit 25 counts the number of 1'' data bits read from the RAM 282, in other words, the number of bits in the character pattern portion.

次に、計数回路26では、制御クロックパルスCPと、
フリップフロップ262のセット出力と、RAM282
の出力りをインバータ261で反転した出力との論理積
をアンドゲート263でとり、その出力をカウンタ26
4で計数する。
Next, in the counting circuit 26, the control clock pulse CP,
Set output of flip-flop 262 and RAM 282
The AND gate 263 performs a logical AND operation with the output of the inverter 261, and the output is sent to the counter 26
Count by 4.

なお、フリップフロップ262はRAM282の1”出
力によりリセットされるようになっているので、■走査
線分のバイナリ・データの始端から”■”信号(文字パ
ターン部分を表わす信号)が現われるまでの期間セット
状態にあり、その期間中のクロックパルスCPの数をカ
ウンタ264で計数することになる。
Furthermore, since the flip-flop 262 is reset by the 1" output from the RAM 282, the period from the beginning of the binary data for the scanning line until the "■" signal (signal representing the character pattern part) appears. It is in a set state, and the counter 264 counts the number of clock pulses CP during that period.

したがって、計数回路26では、走査線の始端から文字
パターンの部分に達するまでの距離を求めていることに
なる。
Therefore, the counting circuit 26 calculates the distance from the starting end of the scanning line to the character pattern portion.

また、計数回路27では、RAM282から”1”信号
が出ている期間、カウンタ2γ2のリセットを繰り返し
、”1”信号がなくなった時点から制御クロックパルス
CPを計数始め、■走査線分のクロックパルスCPをデ
コーダ281から送出し終るまで計数を続ける。
In addition, the counting circuit 27 repeatedly resets the counter 2γ2 while the "1" signal is output from the RAM 282, and starts counting the control clock pulses CP from the time when the "1" signal disappears. Counting continues until the CP is sent out from the decoder 281.

したがって、計数回路27では、文字パターンのf端か
ら走査線の終端までの距離が求められることになる。
Therefore, the counting circuit 27 calculates the distance from the f end of the character pattern to the end of the scanning line.

このようにして、■走査線分のバイナリ・データの読み
出しが完了すると、デコーダ281からの制御信号C7
、C8およびC9によりバス・バッファ253.256
および273を開いて、カウンタ252.264および
272に記憶されている情報N p (1) + N
t (’)およびNb(i)をデータ・バス20を経由
してメモリ29に送り、そこに書き込む。
In this way, when the reading of the binary data for the scanning line is completed, the control signal C7 from the decoder 281 is
, C8 and C9 to bus buffer 253.256
and 273, the information stored in counters 252, 264 and 272 N p (1) + N
t(') and Nb(i) are sent via data bus 20 to memory 29 and written there.

次の走査線分のバイナリ・データがパターン観測装置5
で得られると、上述したと同様な処理により、情報Np
(i) 、 N t (i)およびNb(i)を求め
、その結果をメモリ、29に書き込む。
The binary data for the next scanning line is transferred to the pattern observation device 5.
, the information Np is obtained by processing similar to that described above.
(i), N t (i) and Nb(i) are determined and the results are written into the memory 29.

このような動作を、1行分文字パターン領域内の全走査
線に亘って繰り返し、その結果をメモリ29に書き込む
This operation is repeated over all the scanning lines in the character pattern area for one line, and the results are written into the memory 29.

第7図は第5図のメモリ29部分のメモリ構成の一例を
示すもので、制御回路28で抽出された1行分のバイナ
リ・データを格納する領域291と、計数回路25〜2
7で得られた値Np (”) +N t (i) 、
N b (i)を格納する領域292と、後述するメデ
ィアン・フィルタ30を通すことによって得られた切り
出し情報N pm (i) 、 N t m(i)、
Nbm(i)を格納する領域293と、後述するように
して切り出された1文字パターン領域のデータを格納す
る領域294と、各種の作業用メモリ領域295とから
なっている。
FIG. 7 shows an example of the memory configuration of the memory 29 portion in FIG.
The value obtained in 7. Np ('') + N t (i),
An area 292 for storing Nb(i) and cutout information Npm(i), Ntm(i), obtained by passing through a median filter 30, which will be described later.
It consists of an area 293 for storing Nbm(i), an area 294 for storing data of a single character pattern area cut out as described later, and various working memory areas 295.

第8図は第5図のメディアン・フィルタ30の具体的構
成の一例を示すもので、301−1〜301−5は直列
入力・−並列出力のレジスタ、302−1〜302−4
はレジスタ3011〜301−5の相隣る同士の内容を
比較し、その大小に応じて内容の入れ換えを行なう交換
回路群、303は交換回路群の動作を制御する制御回路
、304はデ゛−タ・バス20から人力されるデ゛−タ
を並列出力するシフトレジスタ、305はマイクロプロ
セッサ21からの制御信号の入力線306はバス・バッ
ファを示す。
FIG. 8 shows an example of a specific configuration of the median filter 30 shown in FIG.
303 is a control circuit that controls the operation of the switching circuit group; 304 is a switch circuit group that compares the contents of adjacent registers 3011 to 301-5 and replaces the contents depending on the size; 303 is a control circuit that controls the operation of the switching circuit group; A shift register 305 outputs data manually inputted from the data bus 20 in parallel, and an input line 306 for a control signal from the microprocessor 21 represents a bus buffer.

また、第9図は第8図の交換回路群302−1の具体的
構成の一例を示すもので、310は比較回路、311〜
1および311−2はレジスタ301−1および3(H
−2の内容を一旦記憶するレジスタ312i、312−
2はアンドゲートを示す。
Further, FIG. 9 shows an example of a specific configuration of the exchange circuit group 302-1 in FIG. 8, where 310 is a comparison circuit, 311 to
1 and 311-2 are registers 301-1 and 3 (H
-2 registers 312i and 312- that temporarily store the contents of
2 indicates an AND gate.

なお、比較回路310への制御信号、比較回路310か
らの出力信号以外は複数ビットの信号であるが、図では
簡略化のために1ビツトの信号で示している。
Although the control signal to the comparison circuit 310 and the output signal from the comparison circuit 310 are multi-bit signals, they are shown as 1-bit signals in the figure for the sake of simplicity.

また、アンドゲート311−L3122はそれぞれ1個
で示されているが実際には信号ビット数だけであること
は言うまでもない。
Further, although one AND gate 311 to L3122 is shown, it goes without saying that in reality, it is only the number of signal bits.

このような構成において、周辺分布Np(i)から切り
出しのための周辺分布N p m (i)を求める処理
について説明する。
In such a configuration, a process for obtaining the marginal distribution N p m (i) for extraction from the marginal distribution Np(i) will be described.

1番目から5番目までの走査線の周辺分布Np1〜Np
5を順次シフトレジスタ304に入力し、制御回路3
03からのクロックパルスCP1により、シフトレジス
タ304の内容をレジスタ301−5〜3011に順次
格納して行く。
Marginal distribution of the first to fifth scanning lines Np1 to Np
5 is sequentially input to the shift register 304, and the control circuit 3
The contents of the shift register 304 are sequentially stored in the registers 301-5 to 3011 by the clock pulse CP1 from 03.

それによって、レジスタ3011〜301−5にそれぞ
れ1〜5番目の走査線の情報Np1〜Np5が格納され
る。
As a result, information Np1 to Np5 of the first to fifth scanning lines are stored in the registers 3011 to 301-5, respectively.

そこで、まず、制御回路303からの制御信号C11に
より交換回路群302−1.302−3を動作させ、引
続いて、制御信号C12により交換回路群302−2.
302−4を動作させ、必要なデータの交換を行なう。
Therefore, first, the switching circuit groups 302-1, 302-3 are operated by the control signal C11 from the control circuit 303, and then the switching circuit groups 302-2.
302-4 to perform necessary data exchange.

いま、レジスタ301−1と301−2の内容の交換を
行なうための交換回路302−1の動作を考えて見ると
、第9図に示すように、レジスタ301−1と301−
2の内容をレジスタ3111と311−2に記憶すると
ともに、比較回路310で比較し、レジスタ301−2
の内容が301−1の内容より大きい時にのみ、比較回
路310から制御信号C13を出力して、レジスタ31
11および311−2に記憶されているレジスタ301
−1および301−2のデータをアンドゲート3121
および312−2を介して交換してそれぞれ301−2
および301−1に記憶させる。
Now, considering the operation of the exchange circuit 302-1 for exchanging the contents of the registers 301-1 and 301-2, as shown in FIG.
The contents of 2 are stored in registers 3111 and 311-2, compared by comparison circuit 310, and stored in register 301-2.
The comparison circuit 310 outputs the control signal C13 only when the content of the register 301-1 is greater than the content of the register 301-1.
11 and 311-2.
-1 and 301-2 data to AND gate 3121
and 301-2 respectively by exchanging via 312-2.
and stored in 301-1.

このような動作を繰り返して行き、交換回路群のそれぞ
れの比較回路310の出力01〜04を制御回路303
で監視することにより、データの交換が行なわれなくな
ったことを検出し、それによって並び換え動作を終了さ
せ、制御信号C14にヨリバス・バッファ306を開い
て、中央ルジスク301−3のデータをデータ・バス2
0に送出する。
By repeating such operations, the outputs 01 to 04 of each comparison circuit 310 of the switching circuit group are transferred to the control circuit 303.
By monitoring the data, it is detected that no data exchange is being performed, thereby terminating the reordering operation, opening the Yoribus buffer 306 in response to the control signal C14, and redirecting the data in the central Ludisk 301-3 to the data. bus 2
Send to 0.

この時、レジスタ301−1〜3015にはその順番の
大きさの値が記憶されることになるので、中央のレジス
タ301−3には3番目の値のデータが格納されており
、その値が3番目の走査線における、切り出しのための
新たな周辺分布Npm3としてメモリ29の領域293
に記憶される。
At this time, the registers 301-1 to 3015 store the values of the sizes in that order, so the central register 301-3 stores the data of the third value. The area 293 of the memory 29 is used as the new peripheral distribution Npm3 for cutting out in the third scanning line.
is memorized.

次に、2番目から6番目までの走査線の周辺分布Np(
i)を順次シフトレジスタ304を介してレジスタ30
1−1〜301−5に入力し、前述したと同様な処理を
行ない、4番目の走査線の新たな周辺分布Npm4を得
て、その結果をメモリ29の領域293に記憶する。
Next, the marginal distribution Np(
i) sequentially through the shift register 304 to the register 30
1-1 to 301-5, and performs the same processing as described above to obtain a new peripheral distribution Npm4 for the fourth scanning line, and stores the result in area 293 of memory 29.

以下、同様にして、各走査線の周辺分布N p (i)
に対応する切り出しのための新たな周辺分布Npm(i
)を得ることができる。
Hereinafter, similarly, the peripheral distribution N p (i) of each scanning line
A new marginal distribution Npm(i
) can be obtained.

各走査線における距離N t (i) 、 Nb (i
)についても同様にして切り出しのための新たな距離N
tm(i) 、 −N b m (i)を求め、その結
果をメモリ29の領域293に記憶する。
The distances N t (i), Nb (i
), a new distance N for extraction is similarly set.
tm(i) and −N b m (i) are determined and the results are stored in area 293 of memory 29 .

なお、最初から1番目および2番目の走査線および最後
から1番目および2番目の走査線における各情報Npm
(i)、Ntm(i)、Nbm(i)は、対応する情報
Np (i) 、 N t (i) 、 Nb (i)
をそのまま使うことによって得られる。
In addition, each information Npm in the first and second scanning lines from the beginning and the first and second scanning lines from the end
(i), Ntm(i), Nbm(i) are the corresponding information Np(i), Nt(i), Nb(i)
can be obtained by using as is.

次に、このように、メモリ29に記憶された情報Np(
t) 、N t (t) 、Nb (t)をメディアン
・フィルタ30に通すことによって得られる切り出し用
情報N pm(i) 、 N tm(i) 、 N b
m(i)に基づいて、同じくメモリ29の領域291に
格納されている1行分のバイナリ・データから各文字パ
ターンの切り出しをマイクロプロセッサ21により行な
う。
Next, the information Np(
Cutting information N pm(i) , N tm(i) , N b obtained by passing t) , N t (t) , Nb (t) through the median filter 30
Based on m(i), the microprocessor 21 cuts out each character pattern from one line of binary data stored in the area 291 of the memory 29.

以下、マイクロプロセッサ21による文字パターン切り
出し処理について詳細に説明する。
The character pattern extraction process by the microprocessor 21 will be described in detail below.

第10図は1行文の文字パターン領域における周辺分布
N p (i)の状態を示すもので、第11図は第10
図の一部を拡大して示したものである。
Figure 10 shows the state of the marginal distribution N p (i) in the character pattern area of a one-line sentence, and Figure 11 shows the state of the marginal distribution N p (i) in the character pattern area of a one-line sentence.
This is an enlarged view of a part of the figure.

図において、Bは1行分パターン領域の左端から予じめ
設定されている第1番目の文字パターン枠の左端までの
距離(ビット数)、Pはそれぞれの文字パターン枠の横
方向のピッチ(ビット数)、nは1行分パターン領域中
における最大文字数(例えば、n=25 )、Wは各文
字パターンの横方向の巾の最大長(ビット数)(例えば
、W=44)、kは文字パターン枠の番号(1≦に≦n
)である。
In the figure, B is the distance (number of bits) from the left edge of the pattern area for one line to the left edge of the first character pattern frame set in advance, and P is the horizontal pitch of each character pattern frame ( n is the maximum number of characters in the pattern area for one line (for example, n = 25), W is the maximum width of each character pattern in the horizontal direction (number of bits) (for example, W = 44), k is Character pattern frame number (1≦≦n
).

また、第12図は文字パターンの切り出し状態を示すも
ので、点線は文字パターンの切り出し枠を示し、13お
よびi4はそれぞれ文字パターンの切り出し枠の左端お
よび右端、J3は文字パターンの切り出し枠のと端を示
す。
Moreover, FIG. 12 shows the cutout state of the character pattern, where the dotted line indicates the cutout frame of the character pattern, 13 and i4 are the left and right ends of the cutout frame of the character pattern, respectively, and J3 is the cutout frame of the character pattern. Show the edge.

第13図a、b、cは文字パクーン切り出し処理の一例
のフローチャートを示すものである。
FIGS. 13a, b, and 13c show a flowchart of an example of character pakun extraction processing.

以下、このフローチャートに従って、文字パターン切り
出し処理について詳細に説明する。
The character pattern extraction process will be described in detail below according to this flowchart.

まず、第13図aに示すステップS1で文字パターン枠
の番号kを0にリセットし、ステップS2でこのkを1
だけ増加し、ステップS3でに≦nであるかどうかを判
定し、ステップS4に進む。
First, in step S1 shown in FIG. 13a, the number k of the character pattern frame is reset to 0, and in step S2, this k is set to 1.
In step S3, it is determined whether ≦n, and the process proceeds to step S4.

ステップS4.S5では、設定された文字パターン枠内
における周辺分布Npm(i)の総和Skを次の(1)
式に従って計算する。
Step S4. In S5, the total sum Sk of the peripheral distribution Npm(i) within the set character pattern frame is calculated as follows (1)
Calculate according to the formula.

次に、ステップS6では、このようにして求めた値Sk
を一定の閾値Stと比較し、Sk<Stの時、その枠内
に文字パターンがないと判断して、ステップS2に戻り
、kの値を1だけ増加する。
Next, in step S6, the value Sk obtained in this way
is compared with a certain threshold value St, and when Sk<St, it is determined that there is no character pattern within the frame, the process returns to step S2, and the value of k is increased by 1.

そして、kinの時は上述した処理を終了する。Then, when it is kin, the above-mentioned processing ends.

また、ステップS6でSk≧Stの時は、枠内に文字パ
ターンがあると判断して次のステップS7に移る。
Further, when Sk≧St in step S6, it is determined that there is a character pattern within the frame, and the process moves to the next step S7.

ここで、Stは文字存在の検定をするための閾値で、例
えばStγ10である。
Here, St is a threshold value for testing the presence of characters, and is, for example, Stγ10.

ステップS7では、周辺分布Npm(i)を調べるべき
範囲の左端i5および右端i6を次の(2) 、 (3
)式によって求める。
In step S7, the left end i5 and right end i6 of the range in which the marginal distribution Npm(i) is to be examined are determined as follows (2), (3
) is calculated using the formula.

このようにして15 t 16が求められると、Npm
(15) 、Npm(to)を調べ、次のステップS8
では、次の(4)式 を満足するかどうかを調べ、(4)式を満たす時は、第
13図すのステップS21へ進み、(4)式を満たさな
い時はステップS9へ進む、ステップS9では、次の(
5)式を満たすかどうか調べ、(5)式を満たす時は、
第13図すのステップS31に進み、満たさない時はス
テップS10に進む。
When 15 t 16 is determined in this way, Npm
(15) Check Npm(to) and proceed to the next step S8
Now, it is checked whether the following equation (4) is satisfied, and when the equation (4) is satisfied, the process proceeds to step S21 in FIG. 13, and when the equation (4) is not satisfied, the process proceeds to step S9. In S9, the following (
5) Check whether the formula is satisfied, and when the formula (5) is satisfied,
The process proceeds to step S31 in FIG. 13, and if the condition is not satisfied, the process proceeds to step S10.

ステップS10では、次の(6)式を満たすかどうかを
調べ、(6)式を満たす時、すなわち、Npm(i5)
−〇で、かつNPm(i6)>0の時は、ステップS1
1でi、を1だけ増加し、ステップS8に戻る。
In step S10, it is checked whether the following equation (6) is satisfied, and when the equation (6) is satisfied, that is, Npm(i5)
- If 〇 and NPm(i6)>0, step S1
1, i is incremented by 1, and the process returns to step S8.

また、(6)式を満たさない時、すなわち、Np+i−
+(i5)>Oで、かつNpm(i6)=Oの時は、ス
テップ812で15を1だけ減少し、ステップS8に戻
る。
Moreover, when the formula (6) is not satisfied, that is, Np+i−
When +(i5)>O and Npm(i6)=O, 15 is decreased by 1 in step 812, and the process returns to step S8.

第13図すのステップS21では、ilをi5+1にし
、ステップS22で、次の(7)式を満たすかどうかを
調べ、もしく7)式を満たす場合は、ステラ7’S24
へ進み、(7)式を満たさない場合は、ステップS23
へ進み、 11を1だけ増加してステップ822に戻
る。
In step S21 of FIG. 13, il is set to i5+1, and in step S22, it is checked whether the following formula (7) is satisfied, and if formula 7) is satisfied, Stella 7'S24
If the equation (7) is not satisfied, proceed to step S23.
The process proceeds to step 822, increments 11 by 1, and returns to step 822.

ステップ824では、12を16−1にし、次のステッ
プS25で次の(8)式を調べ、(8)式を満たす時は
、 ステップ826へ移行してi2を1だけ減少させてステ
ップS25へ戻り、(8)式を満たさない時はステップ
841に進む。
In step 824, 12 is set to 16-1, and in the next step S25, the following equation (8) is checked. When equation (8) is satisfied, the process moves to step 826, where i2 is decreased by 1, and the process proceeds to step S25. Returning, if the equation (8) is not satisfied, proceed to step 841.

また、ステップ831では、11を15−1にして、次
のステップ832で次の(9)式を調べ、(9)式を満
たす時はステップS34に移行し、(9)式の条件を満
たさない時はステップS33に移行してilを1だけ減
少させ、ステップS32に戻る。
In addition, in step 831, 11 is set to 15-1, and in the next step 832, the following equation (9) is checked, and when the equation (9) is satisfied, the process moves to step S34, and if the condition of the equation (9) is satisfied. If there is not, the process moves to step S33, il is decreased by 1, and the process returns to step S32.

ステップS34では11を1だけ増加し、次のステップ
S35では12をi6+1にする。
In step S34, 11 is increased by 1, and in the next step S35, 12 is changed to i6+1.

次のステップS36では、次のαO)式の関係を調べ、
(10)式を満たす場合はステップ838へ移行してi
2を1だけ減少させ、00)式を満たさない時はステッ
プS37でi2を1だけ増加させてステップS36へ戻
る。
In the next step S36, the relationship of the following αO) formula is examined,
If the formula (10) is satisfied, proceed to step 838 and i
2 is decreased by 1, and if the equation 00) is not satisfied, i2 is increased by 1 in step S37, and the process returns to step S36.

このように、ステップ821〜826およびステップ8
31〜838で文字パターンの左端i。
Thus, steps 821-826 and step 8
31-838 is the left end i of the character pattern.

および右端12を求めることができる。and the right end 12 can be found.

ステップS41では、このようにして求められた値11
,12およびメモリ29に格納されている切り出し情報
N tm(i) 、 N bm(i)を利用して、次の
(11) 、 (12>式に基づいて、文字パターンの
上端j1、下端J2を計算する。
In step S41, the value 11 obtained in this way is
, 12 and the cutout information N tm(i) and N bm(i) stored in the memory 29, the upper end j1 and lower end J2 of the character pattern are determined based on the following equations (11) and (12>). Calculate.

すなわち、求められた文字パターンの左端11から右端
+2までの走査線における距離Ntm(i)およびNb
m(i)のそれぞれの最小値を求め、それを文字パター
ンの上端j1およびF端j2の値とする。
That is, the distances Ntm(i) and Nb in the scanning line from the left end 11 to the right end +2 of the character pattern found
Find each minimum value of m(i) and use it as the value of the upper end j1 and the F end j2 of the character pattern.

次に、ステップ842では、上述した値J1,32と、
文字パターンの切り出し枠の横方向および縦方向の巾(
ビット数)WHおよびVvv(例えば、WH=42 、
Wv−48)とにより、次の43)〜(15)式に従っ
て、切り出し枠の上端j3および左端i3、右端i4を
計算する。
Next, in step 842, the above-mentioned values J1, 32 and
The horizontal and vertical widths of the character pattern cutting frame (
number of bits) WH and Vvv (for example, WH=42,
Wv-48), the top end j3, left end i3, and right end i4 of the cutting frame are calculated according to the following equations 43) to (15).

但し、ステップ843,844によりj3〈0の時はj
3=0にステップS45 、S46によりj3〉W■の
時はj3=W■にそれぞれ置き換えを行なう。
However, if j3<0 in steps 843 and 844, j
3=0 in step S45, and in step S46, when j3>W■, the replacement is performed with j3=W■.

次に、ステップ847では、i3≦i≦i4の範囲内に
ある各走査線の6語のバイナリ・データを順次第5図の
メモリ29から読み出し、第6図のRAM282へ前述
したと同様にして転送する。
Next, in step 847, the six words of binary data of each scanning line within the range of i3≦i≦i4 are sequentially read out from the memory 29 in FIG. 5 and stored in the RAM 282 in FIG. 6 in the same manner as described above. Forward.

このようにして転送が終了すると、アドレス・カウンタ
283に値j3をセットし、そのアドレス値以降の3語
(48ビツト)をRAM282から読み出し、メモリ2
9の切り出しパターン領域294に転送する。
When the transfer is completed in this way, the value j3 is set in the address counter 283, the three words (48 bits) after that address value are read out from the RAM 282, and the memory 2
It is transferred to the cutout pattern area 294 of No. 9.

これらの動作をi3<i<i4の範囲内のすべての走査
線のバイナリ・データについて行なう。
These operations are performed on the binary data of all scanning lines within the range i3<i<i4.

なお、これらの制御を行なう制御信号は第6図に示すも
のと同じ信号が使えるので、ここでは説明を省略した。
Note that the same control signals as shown in FIG. 6 can be used to perform these controls, so their explanation is omitted here.

最後に、ステップ848では、メモリ29の領域内の1
文字分の切り出しパターンを読み出し、内部データ・バ
ス20、インタフェース23を介してホストマイクロコ
ンピュータ1に送出する。
Finally, in step 848, 1 in the area of memory 29
The cutout pattern for characters is read out and sent to the host microcomputer 1 via the internal data bus 20 and interface 23.

このようにして、第4図のホストマイクロコンピュータ
1に切り出しパターンが送られると、そのパターンをパ
ターン認識回路3に送る。
In this way, when the cutout pattern is sent to the host microcomputer 1 shown in FIG. 4, the pattern is sent to the pattern recognition circuit 3.

パターン認識回路3では、切り出しパターンと標準パタ
ーンとの比較を行ない、切り出しパターンの認識を行な
った後、その結果を出力装置4のメモリに記憶する。
The pattern recognition circuit 3 compares the cutout pattern with the standard pattern, recognizes the cutout pattern, and then stores the result in the memory of the output device 4.

このパターン認識回路3としては、例えば、本件発明者
等による特願昭53−68791号明細書に示されるよ
うな構成のものを使うことできる。
As this pattern recognition circuit 3, for example, one having a structure as shown in Japanese Patent Application No. 53-68791 by the inventors of the present invention can be used.

以上述べた実施例からも解るように、本発明によれば、
走査パターン領域内の各走査線の走査時において、パタ
ーン切り出しに必要なすべての情報を得ることができる
ので、パターンの切り出しを極めて短時間で行なうこと
ができる。
As can be seen from the embodiments described above, according to the present invention,
Since all the information necessary for cutting out the pattern can be obtained when scanning each scanning line in the scanning pattern area, the pattern can be cut out in an extremely short time.

また、値Np (i) 、 N t (i) 、 Nb
(i)を求めるのに第6図に示すようなハード構成と
することにより、文字パターンの切り出しを極めて簡単
な回路構成で実現できるばかりか さらに高速に行なう
ことができる。
Also, the values Np (i), N t (i), Nb
By using a hardware configuration as shown in FIG. 6 to obtain (i), character patterns can be cut out not only with an extremely simple circuit configuration, but also at higher speed.

なお、上述した実施例では、情報Np(iLNt(i)
、 N b (i)を求めるために、計数回路25〜
27、制御回路28からなる特殊な回路を設けるように
したが、これらの情報をマイクロプロセッサ21のマイ
クロプログラムにより求めるようにしてもよい。
Note that in the embodiment described above, the information Np(iLNt(i)
, N b (i), the counting circuit 25 ~
27. Although a special circuit consisting of the control circuit 28 is provided, this information may also be obtained by a microprogram of the microprocessor 21.

また、情報Np (i) 、 N t (i) 、 N
b (i)から切り出し用情報Npm(i)、Ntm(
i)、Nbm(i)を得るために、特殊なメディアン・
フィルタを設けないで、同様に、マイクロプロセッサ2
1のマイクロプログラムを使用してソフトウェアで処理
してもよい。
Also, the information Np (i), N t (i), N
b From (i), extract information Npm(i), Ntm(
i), Nbm(i), we use a special median
Similarly, without providing a filter, microprocessor 2
The processing may be performed by software using the microprogram No. 1.

また、計数回路25〜27、制御回路28およびメディ
アン・フィルタ30の具体的構成は第6図、第8図、第
9図に示されるものでなく種々の変形が考えられる。
Furthermore, the specific configurations of the counting circuits 25 to 27, the control circuit 28, and the median filter 30 are not shown in FIGS. 6, 8, and 9, and various modifications are possible.

要するに、これらの回路は、走査パターン領域内の各走
査線上のパターンのビット数を計数し、走査線の始端か
らパターン部分までのビット数を計数し、走査線の終端
からパターン部分に達するまでのビット数を計数し、か
つ、これらの計数結果にメディアン・フィルタリングを
施すような構成のものであれば、どのようなものでもよ
い。
In short, these circuits count the number of bits of the pattern on each scan line in the scan pattern area, count the number of bits from the beginning of the scan line to the pattern part, and count the number of bits from the end of the scan line until reaching the pattern part. Any configuration may be used as long as it counts the number of bits and performs median filtering on the results of these counts.

また、上述した例では、計数回路で得られた情報をメデ
ィアン・フィルタに通して切り出し用情報を得る場合に
ついて説明したが、計数回路で得られた情報をそのまま
切り出し用情報として用いるようにし、メディアン・フ
ィルタ部分を省略するようにしてもよい。
Furthermore, in the above example, the information obtained by the counting circuit is passed through the median filter to obtain the cutting information, but the information obtained by the counting circuit is used as it is as the cutting information, - The filter part may be omitted.

さらに、上記例では、計数回路25により各走査線の周
辺分布N p (i)を求めるようにしているが、フリ
ップフロップ等により各走査線における文字パターンの
存在を検出するだけでよく、要するに、切り出しパター
ン枠の横方向の中心が求められるものであればどのよう
なものでもよい。
Furthermore, in the above example, the peripheral distribution N p (i) of each scanning line is determined by the counting circuit 25, but it is only necessary to detect the existence of a character pattern in each scanning line using a flip-flop or the like. Any method may be used as long as the horizontal center of the cutout pattern frame can be determined.

さらに、上述した実施例では、文字パターンを認識する
文字読取装置の例について示したが、それに限定される
ものではなく、例えば、物体パターンが所定方向に分離
して存在するような場合に・それぞれの物体パターンを
切り出してその認識を行なうような物体認識装置にも本
発明は適用できることは言うまでもない。
Further, in the above-mentioned embodiment, an example of a character reading device that recognizes a character pattern is shown, but the present invention is not limited to this. For example, when object patterns exist separately in a predetermined direction, It goes without saying that the present invention can also be applied to an object recognition device that cuts out an object pattern and recognizes it.

以上述べたように、本発明によれば、各走査線に沿って
走査を行なっている際に、各走査線における単位パター
ンの存在状態とともに、各走査線の始端および終端から
単位パターンまでの距離を求め、それらの情報に基づい
てパターン切り出し枠を設定することにより、非常に高
速にパターン切り出しを行なうことができる。
As described above, according to the present invention, when scanning is performed along each scanning line, the existence state of the unit pattern in each scanning line and the distance from the start and end of each scanning line to the unit pattern are determined. By finding the information and setting the pattern cutting frame based on that information, pattern cutting can be performed very quickly.

また、これらの情報を計数回路を用いて得ることができ
るので、非常に簡単な構成で、かつ、高速にパターン切
り出しを行なうことができる。
Further, since this information can be obtained using a counting circuit, pattern cutting can be performed with a very simple configuration and at high speed.

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

第1図は1行分パターン領域の走査方法を説明する説明
図、第2図は従来のパターン切り出し方法を説明するた
めの説明図、第3図は本発明によるパターン切り出し方
法の一例を説明するための説明図、第4図は本発明に係
るパターン認識装置の全体構成の一例を示すブロック図
、第5図は第4図のパターン切り出し回路部分の具体的
構成の一例を示すブロック図、第6図は第5図の計数回
路、制御回路部分の具体的構成の一例を示す回路図、第
7図は第5図のメモリ部分のメモリ構成の一例を示す図
、第8図は第5図のメディアン・フィルタ部分の具体的
構成の一例を示す回路図、第9図は第8図の交換回路部
分の具体的構成の一例を示す回路図、第10図、第11
図および第12図はパターン切り出し処理を説明するた
めの周辺分布図およびパターン図、第13図はパターン
切り出し処理の一例を示すフローチャートである。 2・・・・・・パターン切り出し回路、5・・・・・・
パターン観測装置、21・・・・・・マイクロプロセッ
サ、25〜27・・・・・・計数回路、28・・・・・
・制御回路、30・・・・・・メディアン・フィルタ。
FIG. 1 is an explanatory diagram for explaining a method of scanning a pattern area for one line, FIG. 2 is an explanatory diagram for explaining a conventional pattern cutting method, and FIG. 3 is an explanatory diagram for explaining an example of a pattern cutting method according to the present invention. FIG. 4 is a block diagram showing an example of the overall configuration of the pattern recognition device according to the present invention, and FIG. 5 is a block diagram showing an example of the specific configuration of the pattern extraction circuit portion of FIG. 6 is a circuit diagram showing an example of a specific configuration of the counting circuit and control circuit portion of FIG. 5, FIG. 7 is a diagram showing an example of a memory configuration of the memory portion of FIG. 5, and FIG. 9 is a circuit diagram showing an example of a specific configuration of the median filter portion of FIG. 8, and FIGS.
12 and 12 are a peripheral distribution diagram and a pattern diagram for explaining the pattern extraction process, and FIG. 13 is a flowchart showing an example of the pattern extraction process. 2...Pattern cutting circuit, 5...
Pattern observation device, 21...Microprocessor, 25-27...Counting circuit, 28...
- Control circuit, 30...median filter.

Claims (1)

【特許請求の範囲】 1 それぞれ所定方向に分離して配列された複数個の単
位パターンを含むパターン領域を前記所定方向とほぼ直
角な方向の走査線に沿って順次走査して電気信号を得る
走査手段と、該走査手段からの電気信号に基づき、前記
パターン領域内の各単位パターンを分離して切り出すパ
ターン切り出し手段と、該パターン切り出し手段で切り
出された単位パターンの認識を行なう認識手段とを備え
たパターン認識装置において、前記走査手段による各走
査線に沿う走査毎に、各走査線中における前記単位パタ
ーンの存在状態を示す第1の検出信号と、各走査線の始
端および終端から前記単位パターンに到るまでの距離を
示す第2および第3の検出信号を求め、該第1ないし第
3の検出信号に対応する信号に基づいて各単位パターン
の切り出し枠を設定してパターンの切り出しを行ない、
切り出されたパターンを前記認識手段に入力するように
したことを特徴とするパターン切り出し方法。 2 前記第1ないし第3の検出信号のそれぞれにメディ
アン・フィルタリングを施して第4〜第6の検出信号を
求め、該検出信号に基づいて各単位パターンの切り出し
枠を設定するようにしたことを特徴とする特許請求範囲
第1項記載のパターン切り出し方法。 3 前記パターン領域がそれぞれ行方向に分離して配列
された複数個の文字パターンを含む1行分文字パターン
領域からなることを特徴とする特許請求範囲第1項また
は第2項記載のパターン切り出し方法。 4 それぞれ所定方向に分離して配列された複数個の単
位パターンを含むパターン領域を前記所定方向とほぼ直
角な方向の走査線に沿って順次走査して2進の電気信号
を得る走査装置と、該走査装置からの電気信号に基づき
、前記パターン領域内の各単位パターンを分離して切り
出すパターン切り出し装置と、該パターン切り出し装置
で切り出された単位パターンの認識を行なう認識装置と
を備えたパターン認識装置において、走査パターン領域
内の各走査線上の単位パターン部分における電気信号の
ビット数を計数する第1の計数手段と、各走査線の始端
から単位パターン部分に達するまでの電気信号のビット
数を計数する第2の計数手段と、各走査線の終端から単
位パターン部分に達するまでの電気信号のビット数を計
数する第3の計数手段と、前記第1ないし第3の計数手
段の計数結果に対応する値に基づいて各単位パターンの
切り出し枠を設定してパターンの切り出しを行なう切り
出し手段とからなることを特徴とするパターン切り出し
装置。 5 前記切り出し手段が前記第1ないし第3の計数手段
の計数結果にメディアン・フィルタリングを施すための
メディアン・フィルタを有することを特徴とする特許請
求範囲第4項記載のパターン切り出し装置。
[Scope of Claims] 1. Scanning for obtaining electrical signals by sequentially scanning a pattern area including a plurality of unit patterns arranged separately in a predetermined direction along a scanning line in a direction substantially perpendicular to the predetermined direction. a pattern cutting means for separating and cutting out each unit pattern in the pattern area based on an electric signal from the scanning means, and a recognition means for recognizing the unit pattern cut out by the pattern cutting means. In the pattern recognition device, for each scan along each scanning line by the scanning means, a first detection signal indicating the existence state of the unit pattern in each scanning line, and a first detection signal indicating the existence state of the unit pattern in each scanning line, and The second and third detection signals indicating the distance to reach are determined, and the pattern is cut out by setting a cutting frame for each unit pattern based on the signals corresponding to the first to third detection signals. ,
A pattern cutting method characterized in that the cut out pattern is input to the recognition means. 2. Median filtering is applied to each of the first to third detection signals to obtain fourth to sixth detection signals, and a cutting frame for each unit pattern is set based on the detection signals. A pattern cutting method according to claim 1, characterized in that: 3. The pattern cutting method according to claim 1 or 2, wherein each of the pattern areas is composed of a single line character pattern area including a plurality of character patterns arranged separately in the row direction. . 4. a scanning device that obtains a binary electric signal by sequentially scanning a pattern area including a plurality of unit patterns arranged separately in a predetermined direction along a scanning line in a direction substantially perpendicular to the predetermined direction; A pattern recognition device comprising a pattern cutting device that separates and cuts out each unit pattern in the pattern area based on an electric signal from the scanning device, and a recognition device that recognizes the unit pattern cut out by the pattern cutting device. The apparatus includes: a first counting means for counting the number of bits of an electrical signal in a unit pattern portion on each scanning line in a scanning pattern area; a second counting means for counting; a third counting means for counting the number of bits of the electrical signal from the end of each scanning line to the unit pattern portion; and counting results of the first to third counting means. A pattern cutting device comprising a cutting means for setting a cutting frame for each unit pattern based on a corresponding value and cutting out the pattern. 5. The pattern cutting device according to claim 4, wherein the cutting means has a median filter for applying median filtering to the counting results of the first to third counting means.
JP54042070A 1979-04-09 1979-04-09 Pattern extraction method and device in pattern recognition device Expired JPS5856905B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP54042070A JPS5856905B2 (en) 1979-04-09 1979-04-09 Pattern extraction method and device in pattern recognition device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP54042070A JPS5856905B2 (en) 1979-04-09 1979-04-09 Pattern extraction method and device in pattern recognition device

Publications (2)

Publication Number Publication Date
JPS55135970A JPS55135970A (en) 1980-10-23
JPS5856905B2 true JPS5856905B2 (en) 1983-12-17

Family

ID=12625812

Family Applications (1)

Application Number Title Priority Date Filing Date
JP54042070A Expired JPS5856905B2 (en) 1979-04-09 1979-04-09 Pattern extraction method and device in pattern recognition device

Country Status (1)

Country Link
JP (1) JPS5856905B2 (en)

Also Published As

Publication number Publication date
JPS55135970A (en) 1980-10-23

Similar Documents

Publication Publication Date Title
JPH05242298A (en) Method for recognizing code string
GB1567287A (en) Pattern encoding apparatus
JPS62221785A (en) Art of feature extraction for use in pattern recognition system
EP0851389B1 (en) Contour tracing method
US4701961A (en) Character identifying apparatus
JPS6120035B2 (en)
JPS5856905B2 (en) Pattern extraction method and device in pattern recognition device
JPH0664614B2 (en) Hierarchical structured template matching method
JPH0634233B2 (en) Hierarchical structural template matching method
JPS613568A (en) Intermediate tone area identification system
JPS62121589A (en) Character segmenting system
US5313529A (en) System for representing line drawings by polygonal lines
JPH0332723B2 (en)
JPH04205271A (en) Method and device for determining optimum binarized threshold value
JPH11120291A (en) Pattern recognition system
KR950011065B1 (en) A character recognition method
JP2507949B2 (en) Character / graphic area determination device
JPH0245229B2 (en)
JPH0147827B2 (en)
JPH0433074B2 (en)
JPS60175189A (en) Character reading processing system
JPH0429109B2 (en)
JPH02222076A (en) Contour line extracting device
JPS62126485A (en) Character segmentation system
JPS6125285A (en) Character recognizing device