JPH03214283A - Conversion table creation circuit using systolic array - Google Patents
Conversion table creation circuit using systolic arrayInfo
- Publication number
- JPH03214283A JPH03214283A JP2008421A JP842190A JPH03214283A JP H03214283 A JPH03214283 A JP H03214283A JP 2008421 A JP2008421 A JP 2008421A JP 842190 A JP842190 A JP 842190A JP H03214283 A JPH03214283 A JP H03214283A
- Authority
- JP
- Japan
- Prior art keywords
- data
- cell
- histogram
- column
- input
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Landscapes
- Character Input (AREA)
Abstract
(57)【要約】本公報は電子出願前の出願データであるた
め要約のデータは記録されません。(57) [Summary] This bulletin contains application data before electronic filing, so abstract data is not recorded.
Description
【発明の詳細な説明】
〔概 要〕
切り出した1文字のパターンをシストリックアレイ構造
によって正規化のための変換表を作成するシストリック
アレイにおける変換表作成回路に関し、
切り出した文字データを正規化するためのヒストグラム
情報をパイプライン処理でかつ並列に行いパターン認識
を高速化するシストリノルアレイによる変換表作成回路
を提供することを目的とし、N個のセルを直列接続した
直列回路をN列設け、第m列目の入力側からm番目のセ
ルは、入力データをシフトして出力するとともに、前記
入力データと第m−1列目のm−1列目のセルよりプ川
わる幅データとカウントデータとから幅データトカウン
トデータとを更新してm+1列目の入力側からm+1番
目のセルに出力するヒストグラム計算セルであり、該ヒ
ストグラム計算セル以外のセルはシフトレシスタである
ように構成する。[Detailed Description of the Invention] [Summary] This invention relates to a conversion table creation circuit in a systolic array that creates a conversion table for normalizing an extracted single character pattern using a systolic array structure, and normalizes extracted character data. The purpose is to provide a conversion table creation circuit using a systrinol array that speeds up pattern recognition by processing histogram information in pipeline processing in parallel to speed up pattern recognition. The m-th cell from the input side of the m-th column shifts and outputs the input data, and the input data and the width data of the m-1th column are different from the cell of the m-1th column. This is a histogram calculation cell that updates the width data and count data from the input side of the m+1 column and outputs it to the m+1 cell from the input side of the m+1 column, and cells other than the histogram calculation cell are configured to be shift registers. .
本発明はパターン認識装置に係り、更に詳しくは切り出
した1文字のパターンをシストリツクアレイ構造によっ
て正規化のための変換表を作成するシストリックアレイ
における変換表作成回路に関する。The present invention relates to a pattern recognition device, and more particularly to a conversion table creation circuit in a systolic array that creates a conversion table for normalizing a single character pattern cut out using a systolic array structure.
(従 来 の 技 術〕
コンピュータシステムの発展により、画像データを取り
込むとともに、取り込んだ画像データから文字を切り出
し、読み取った書類の文章のそれぞれの文字を認識する
読み取り装置が実用化している。この読み取り装置はた
とえばイメージスキャナ等によって読み取ったドットデ
ータをあらかじめ定められた領域単位で分割し、その分
割内での文字とあらかじめ定められた文字とを比較し、
1番似にかよった文字を結果として出力してい“る。(Conventional technology) With the development of computer systems, reading devices have been put into practical use that capture image data, cut out characters from the captured image data, and recognize each character in the text of the read document. The device divides the dot data read by an image scanner, etc. into predetermined area units, compares the characters within the division with the predetermined characters,
The most similar character is output as the result.
このあらかじめ定められたデータは一般的には辞書メモ
リに格納されており、たとえば各規定の文字を特徴化し
たデータとして記憶されている。そして認識すべき文字
が入力した時、同様にその入力した文字を特徴化し、前
述の辞書メモリに格納されているあらかじめ定められた
特徴データとの距離を求めている。この求めた距離から
最も小さい文字を認識結果として出力している。This predetermined data is generally stored in a dictionary memory, and is stored, for example, as data characterizing each prescribed character. When a character to be recognized is input, the input character is similarly characterized and the distance from the predetermined characteristic data stored in the dictionary memory is determined. The smallest character from this determined distance is output as the recognition result.
前述のようなシステムにおいでは、切り出した1個の文
字を認識する場合、それらの文字があらかじめ決められ
た大きさとなっていると認識率が向上する。このため従
来においては切り出した文字単位で樅横方向にあらかじ
め決められた高さと、幅にしている。すなわち正規化し
ている。In the above-mentioned system, when recognizing a single extracted character, the recognition rate improves if the characters have a predetermined size. For this reason, conventionally, each character cut out has a predetermined height and width in the lateral direction of the fir tree. In other words, it is normalized.
この正規化の方式は種々あるが、その1方式として切り
出した文字の縦方向と横方向に対してヒストグラムを求
め、得られたヒストグラムから文字を拡大や縮小して正
規化する方式がある。There are various methods for this normalization, one of which is to obtain histograms in the vertical and horizontal directions of cut out characters, and to normalize the characters by enlarging or reducing them based on the obtained histograms.
このような方式によって認識すべき文字が一定の大きさ
になるので、認識率が向上する。With this method, the characters to be recognized have a constant size, so the recognition rate improves.
[発明が解決しようとする課題]
前述し,たヒストグラムを求める場合、従来においては
、切り出した領域をドット単位で読み出し、例えばそれ
以前に読み出した左右や上下のドノトが黒であるか白で
あるか等のフラグから次のドッI・への情報を求めて順
次処理している。このような従来の方式はドット単位で
処理してヒストグラムを求めているので、その処理に多
くの時間を必要とする問題を有していた。すなわち、認
識処理を行う時間が大となる問題を有していた。[Problems to be Solved by the Invention] When obtaining the above-mentioned histogram, conventionally, the cut out area is read out dot by dot, and for example, the left and right, top and bottom dots read previously are either black or white. The information for the next dot I is obtained from the flags of these flags and processed sequentially. Since such a conventional method calculates a histogram by processing dot by dot, it has the problem that the processing requires a lot of time. That is, there was a problem in that it took a long time to perform the recognition process.
本発明は切り出した文字データを正規化するためのヒス
トグラム情報をパイプライン処理でかつ並列に行いパタ
ーン認識を高速化するシストリノルアレイによる変換表
作成回路を提供することを目的とする。SUMMARY OF THE INVENTION An object of the present invention is to provide a conversion table creation circuit using a systrinol array that speeds up pattern recognition by processing histogram information for normalizing extracted character data in parallel in a pipeline process.
第1図は本発明の原理ブロック図である。 FIG. 1 is a block diagram of the principle of the present invention.
N個のセルH(1.1)〜H(N,1)・・・H(1,
N)〜H(N,N)を直列接続した直列回路をN列設け
ている。N cells H(1.1) to H(N,1)...H(1,
N series circuits in which N) to H(N, N) are connected in series are provided.
そのセルのうち第m列目の入力側からm番目のセルはヒ
ストグラム計算セルであり、残りのセルはシフトレジス
タである。Among the cells, the m-th cell from the input side of the m-th column is a histogram calculation cell, and the remaining cells are shift registers.
ヒストグラム計算セルは入力データをシフトして次のセ
ルへ出力するとともに、このデータと隣の列の1つ前の
セルから加わる幅データとカウントデータとから幅デー
タとカウントデータとを更新して反対隣の列の1つ後の
セルに加える。The histogram calculation cell shifts the input data and outputs it to the next cell, and also updates the width data and count data from this data and the width data and count data added from the previous cell in the adjacent column. Add to the next cell in the next column.
また、例えばヒストグラム計算セルは横方向のフラグレ
ジスタ、縦方向の幅レジスタやカウンタを有する。Further, for example, the histogram calculation cell has a flag register in the horizontal direction, a width register in the vertical direction, and a counter.
[作 用]
N個のドット(1ドット行)がN個の列に対応するドノ
ト位置単位で加わり順次シフトする。[Operation] N dots (one dot row) are added in donot position units corresponding to N columns and shifted sequentially.
ヒストグラム計算セルは1ドット行に対して斜め方向に
設けられているので、例えばシストリックアレイの下方
向(列の下方向)から1ドット行が加わった時には、第
1列目の入力側から1番目のヒストグラム計算セルが縦
方向と横方向のヒストグラム計算を行う。そして順次シ
ストリックアレイ中をデータがシフトするたびに次の行
と次の列(斜め右上方向にヒストグラム計算セルが設け
られている)のヒストグラム計算を行う。これを順次繰
り返すことにより、右上最終のヒストグラム計算セルか
ら順次カウント値や幅の結果が出力される。また各ヒス
トグラム計算セル内のレジスタやカウンタにしても対向
する方向のカウント値や幅データが残る。Since the histogram calculation cells are provided diagonally with respect to one dot row, for example, when one dot row is added from the bottom of the systolic array (bottom of the column), one dot row is added from the input side of the first column. The th histogram calculation cell performs vertical and horizontal histogram calculations. Then, each time the data is sequentially shifted in the systolic array, the histogram calculation for the next row and the next column (histogram calculation cells are provided diagonally in the upper right direction) is performed. By repeating this process sequentially, the results of count values and widths are sequentially output from the last histogram calculation cell in the upper right corner. Further, count values and width data in opposing directions remain in the registers and counters in each histogram calculation cell.
シストリックアレイ中を1文字のデータが通過する時に
同時に縦方向や横方向のヒストグラムを高速に求めるこ
とができる。When one character of data passes through the systolic array, vertical and horizontal histograms can be obtained simultaneously at high speed.
[実 施 例] 以下図面を用いて本発明を詳細に説明する。[Example] The present invention will be explained in detail below using the drawings.
第2図は本発明の実施例のシステム構成図である。FIG. 2 is a system configuration diagram of an embodiment of the present invention.
イメージスキャナ等によって読み取られた情報は画像デ
ータとして画像メモリ10に格納される。Information read by an image scanner or the like is stored in the image memory 10 as image data.
この画像メモリ10はイメージスキャナで読み取る1頁
分の記憶容量を有しており、読み取った情報のそれぞれ
各ドットを白あるいは黒の2{I!すなわち0.1のデ
ータとして記憶する。This image memory 10 has a storage capacity for one page read by an image scanner, and each dot of the read information is divided into white or black 2{I! That is, it is stored as data of 0.1.
画像メモリ10に格納された画像データはノイズ除去モ
ジュール11に加わり、読み取り時に発生した雑音を除
去する。例えば、このノイズ除去モジュール11によっ
て除去されるノイズは文字情報等に無関係な雑音例えば
3×3のマスクで中心を黒、その中心のドットを囲む8
ドットが白等の雑音であり、その中心のドットをノイズ
除去モジュール11は白とする。このノイズ除去モジュ
ールは文字認識前処理部12内に設けているがこれに限
るわけでなく、例えば後述する正規化モジュール16内
に文字単位で格納する時に行ってもよく、またさらには
細線化、線素化の時に行ってもよい。The image data stored in the image memory 10 is applied to a noise removal module 11 to remove noise generated during reading. For example, the noise removed by this noise removal module 11 is noise unrelated to character information, etc. For example, a 3 x 3 mask with a black center and 8 pixels surrounding the center dot.
The dots are noise such as white, and the noise removal module 11 makes the dot in the center white. Although this noise removal module is provided in the character recognition pre-processing section 12, it is not limited thereto, and may be performed when storing each character in the normalization module 16, which will be described later. It may be performed at the time of line element formation.
ノイズ除去モジュール11によってノイズ除去された画
像情報は行ヒストグラムモジュール13、列ヒストグラ
ムモジュール14、さらには読み出し制御モジュール1
5に加わる。行ヒストグラムモジュール13は読み取っ
た情報、例えば前述したイメージスキャナによって読み
取った用紙の内容を各ドット単位で列方向に投影し、各
ドット単位の行のドット数を求めるモジュールである。The image information from which noise has been removed by the noise removal module 11 is sent to the row histogram module 13, the column histogram module 14, and further to the readout control module 1.
Join 5. The row histogram module 13 is a module that projects the read information, for example, the content of the paper read by the above-mentioned image scanner, in the column direction in units of dots, and calculates the number of dots in the row in each dot unit.
すなわち、1ドットの行(横方向)に対し、その1ドッ
ト行にい《つの黒ドソトが存在するかを各1ドット行単
位で求める処理である。また列ヒストグラム14は前述
した行ヒストグラムと同様に列方向に対し投影し、その
投影した黒ドノトの数を求める処理である。That is, this is a process of determining for each dot row (horizontal direction) whether or not there are three black dots in that one dot row. Also, the column histogram 14 is a process of projecting in the column direction in the same way as the row histogram described above, and calculating the number of projected black dots.
画像メモリ10から行方向に順次1ドット単位で読み出
し、ノイズ除去モジュール11を介して加わったデータ
(ラスタースキャンと同様のドットの読み出し)を、行
ヒストグラムモジュール13は順次黒のドットをカウン
トする(1ドノト行分)。そして、順次行単位で黒のド
ット数を求める。この黒のドット数が各行に対応する行
ヒストグラムとなる。また列ヒストグラム14は1ドッ
ト行内のドット数に対応してそれぞれカウンタを有し1
行のドットが順次加わる度に黒ドノトに対応するカウン
タをインクリメントする。前述した動作を1頁分行うこ
とにより行ヒストグラムモジュール16ならびに列ヒス
トグラムモジュール14からは、それぞれ行位置ならび
に列位置に対するドット数を表したいわゆる行ヒストグ
ラム,列ヒストグラムが求められる。そしてその結果は
読み出し制御モジュール15に加わる。Data is sequentially read out dot by dot in the row direction from the image memory 10 and added via the noise removal module 11 (reading of dots similar to raster scanning), and the row histogram module 13 sequentially counts black dots (1 line). Then, the number of black dots is sequentially calculated for each row. This number of black dots becomes the row histogram corresponding to each row. The column histogram 14 also has counters corresponding to the number of dots in one dot row.
Each time a row of dots is added in sequence, the counter corresponding to the black dot is incremented. By performing the above-described operations for one page, the row histogram module 16 and the column histogram module 14 obtain so-called row histograms and column histograms representing the number of dots for row positions and column positions, respectively. The result is then applied to the read control module 15.
読み出し制御モジュール15はそれらの行ヒストグラム
,列ヒストグラムから行の位置ならびに列の位置を順次
求める。例えばこの位置は行ヒストグラムの周期や列ヒ
ストグラムの周期によって得ることができる。The readout control module 15 sequentially obtains row positions and column positions from these row histograms and column histograms. For example, this position can be obtained by the period of the row histogram or the period of the column histogram.
読み出し制御モジュール15は行ならびに列の位置を求
めるが、この他に以下の処理を行う。画像データ例えば
イメージスキャナから読みとった情報は紙の位置等によ
り傾きを有することがある。The read control module 15 determines the row and column positions, but also performs the following processing. Image data, for example, information read from an image scanner, may have a tilt depending on the position of the paper and the like.
このため、読み出し制御モジュール15は列ヒストグラ
ムならびに行ヒストグラムが最大値をとるよう、ヒスト
グラムを求める角度を順次変更し、補正角度を求める。For this reason, the readout control module 15 sequentially changes the angle at which the histogram is obtained so that the column histogram and the row histogram take the maximum value, and obtains a correction angle.
そして前述したノイズ除去モジュール11から加わる画
像情報を再度入力して、最終的なヒストグラムを求め、
その補正した傾きにより得られた行ヒストグラム(ヒス
トグラムが最大値をとる)がOから正に変化する点(正
から0でも可)より1周期分その傾きに対応した1行の
データを読み出し、読み出し制御モジュール15内に設
けられた行バッファに格納する。Then, input the image information added from the above-mentioned noise removal module 11 again to obtain the final histogram,
From the point where the row histogram obtained by the corrected slope (the histogram takes the maximum value) changes from 0 to positive (possible to 0), read out one row of data corresponding to the slope for one period. The data is stored in a row buffer provided within the control module 15.
読み出し制御モジュールl5はさらにその行バッファに
格納した1行のデータの内、行内における列ヒストグラ
ムを再度求め、列ヒストグラムが0から正に変化する位
置からそのデータを切り出し正規化モジュールl6に出
力する。また変換表作成モジュールl7にも出力する。The read control module l5 further obtains the column histogram within the row of one row of data stored in the row buffer, cuts out the data from the position where the column histogram changes from 0 to positive, and outputs it to the normalization module l6. It is also output to the conversion table creation module l7.
この切り出したデータは1文字領域のデータである。This extracted data is data for a single character area.
変換表作成モジュールI7は正規化モジュール16によ
って1文字を正規化するための変換デー夕を求めるモジ
ュールであり、たとえば読み出し制御モジュール15に
よって切り出した1文字領域に対し、列方向並びに行方
向に投影し、黒ドノトが存在する列並びに行からドット
単位(行や列単位)で、列並びに行方向のカウンタをイ
ンクリメントし、1文字の領域内の最終値までの値を求
める。このモジュールの回路並びに動作については後述
する正規化の原理に基づき後に詳細に説明する。The conversion table creation module I7 is a module that obtains conversion data for normalizing one character by the normalization module 16. For example, it projects data in the column direction and row direction onto the one character area cut out by the readout control module 15. , the counters in the column and row directions are incremented dot by dot (row and column) from the column and row where the black dot exists, and the value up to the final value in the region of one character is calculated. The circuit and operation of this module will be explained in detail later based on the normalization principle described later.
正規化モジュール16では、この1文字で切り出したド
ットの行方向並びに列方向の最終値並びに切り出した1
文字の大きさから、その文字が切り出し領域内の全域に
わたって存在する文字に拡大する。例えば64X64ド
ットの領域を1文字領域とする拡大処理を行う。文字の
列方向並びに行方向の値が変換表作成モジュール]7に
おいて48(列並びに行とも)ドノトであったならば、
48ドノトの文字を64ドットに変換する処理を行う。In the normalization module 16, the final value of the dot cut out by this one character in the row direction and column direction and the cut out 1
Based on the size of the character, the character is expanded to cover the entire area within the extraction area. For example, an enlargement process is performed to make an area of 64×64 dots into one character area. If the column and row values of the character are 48 (both column and row) in conversion table creation module]7, then
Performs processing to convert 48 dot characters to 64 dots.
この処理では特定位置の行や列のデータを繰り返して同
じデータとし文字を拡大する。また、縮小の場合には特
定位置の行や列を繰り返し読み出してOR加算し同一行
や同一列として縮小する。In this process, data in a row or column at a specific position is repeated to make the same data and enlarge the characters. Furthermore, in the case of reduction, rows and columns at specific positions are repeatedly read out and ORed together to reduce them as the same row or column.
正規化モジュール16によって1文字領域例えば64X
64ドット内に1文字が拡大された後は、細線化モジュ
ールl8がその文字を細線化する処理を行う。この細線
化モジュール18では中心ドットの上下左右1ドット(
3X3)とさらにその左1ドットと中心からの上2ドッ
ト目の合計11ドットのマスクで細線化処理を行う。ま
たこのマスクは3×3の9ドットで行うこともできる。The normalization module 16 allows one character area, for example 64X
After one character is enlarged within 64 dots, the thinning module l8 performs a process of thinning the character. In this thinning module 18, one dot above, below, left and right of the center dot (
Thinning processing is performed using a mask of a total of 11 dots: 3×3), one dot to the left, and two dots above from the center. Moreover, this mask can also be performed using 9 dots of 3×3.
前述のマスクによってあらかじめ決められたパターンで
あるときに中心ドットをOとする制御により1回の処理
によって文字を構成するドットの1ドット分の回りの細
線化が図れる。このマスクの細線化を順次繰り返すこと
により1ドットの線による文字とすることができる。By controlling the central dot to be O when the pattern is predetermined by the mask described above, thinning of lines around one dot forming a character can be achieved in one process. By sequentially repeating this thinning of the mask, a character can be formed by a one-dot line.
細線化モジュール18によって得られた例えば64X6
4ドットの細線化文字は線素化モジュール19に加わり
線素化される。この線素化モジュールでは目的のドット
すなわち中心ドットから上下方向の黒ドットが存在する
場合、ならびに左右方向に存在する場合、右上、左下に
存在する場合、さらには左上、右下に存在する場合の合
計4種類の線素によって各ドットを表す。なお上述の4
種類の内、複数に属する場合には例えば、上下方向、続
いて左右方向等の順に優先化を行い、各ドット単位でそ
の線素がどちらの方向の存在するかを求める。なお中心
がOドットすなわち白であった場合には線は存在しない
とする。For example, 64×6 obtained by the thinning module 18
The 4-dot thin line character is added to the line element generation module 19 and converted into line elements. In this line elementization module, when black dots exist in the vertical direction from the target dot, that is, the center dot, when they exist in the horizontal direction, when they exist in the upper right and lower left, and when they exist in the upper left and lower right, Each dot is represented by a total of four types of line elements. In addition, the above 4
If the line element belongs to more than one of the types, priority is given in the order of, for example, the vertical direction, then the horizontal direction, etc., and in which direction the line element exists is determined for each dot unit. Note that if the center is an O dot, that is, white, it is assumed that no line exists.
線素化モジュール19においては、上下、左右、右上が
り斜め、左上がり斜めの4方向さらには線素が存在しな
い場合の5種類があるので、その状態を各ドット単位で
3ビットの値で表し、合計3X6 4 X6 4の情報
とし、特徴ベクトルモジュール20に加える。In the line segmentation module 19, there are four directions: up and down, left and right, diagonal upwards to the right, diagonally upwards to the left, and five types, including the case where there is no line element, so the state is expressed in a 3-bit value for each dot. , a total of 3×6 4×6 4 information and added to the feature vector module 20.
特徴ベクトルモジュール20においては前述した線素化
モジュール19で得られた線素化情報を、左右上下にそ
れぞれ8ドット単位で分割し、その分割した領域を下と
右方向に1領域づつ(2×2領域)の合計16ドットの
領域を1ベクトルモジュール領域とし、その1ベクトル
モジュール’pM域内にいくつの上下方向、左右方向、
右上方向、左上方向の4方向の線素が存在するかをカウ
ントする。1 6X1 6ドットの領域を1ベクトルモ
ジュール領域として特徴ベクトルを求めるが、この1ベ
クトルモジュール領域は8ドット単位で移動させるので
行方向ならびに列方向に対しそれぞれ7領域であり合計
7×7の特徴ベクトルの領域となる。The feature vector module 20 divides the line segmentation information obtained by the line segmentation module 19 described above into units of 8 dots in the left, right, top, and bottom, respectively, and divides the divided regions into 8 dot units each in the downward and right directions (2× 2 areas) with a total of 16 dots is defined as one vector module area, and how many vertical, horizontal, horizontal,
It is counted whether there are line elements in four directions: upper right direction and upper left direction. A feature vector is calculated using an area of 1 6 x 1 6 dots as one vector module area, but since this one vector module area is moved in units of 8 dots, there are 7 areas in each of the row and column directions, resulting in a total of 7 x 7 feature vectors. This is the area of
特徴ベクトル化モジュール20においては前述したIN
域単位でその方向の数を求めているが、この数の求める
場合にはそれぞれ重み付けをし、中心部を高く周り部を
外にいくにしたがって低くしている。例えばその重み付
けを中心の4×4の領域の各ドットを重み4、その周り
の2ドット分の各ドットを3、さらにその周りの2ドッ
ト分の各ドットを2、さらにその回りの2ドット分の各
ドットを1とし、重み付けを行って特徴ベクトルを求め
る。In the feature vectorization module 20, the above-mentioned IN
The number of directions is calculated for each area, and when calculating this number, weighting is applied to each area, with the center being higher and the surrounding areas becoming lower as they move outward. For example, each dot in the center 4x4 area has a weight of 4, each dot in the 2 dots around it has a weight of 3, each dot in the 2 dots around it has a weight of 2, and then the 2 dots around it have a weight of 4. Each dot is set to 1, weighting is performed, and a feature vector is determined.
この特徴ベクトルは特定の認識すべき文字を正規化モジ
ュールl6によってすべて同じ大きさにしているので、
同一文字であるならばほぼ同一の特徴ベクトルを有し、
文字単位でその特徴ベクトルが異なってくる。しかしな
がら非常によく僚たモジュールも存在するので、本発明
の実施例においては演算の処理の高速化さらには認識率
の向上をはかるため、特徴ベクトルの標準パターンを用
いてそれぞれの特徴ベクトル化領域すなわちマス内でク
ラス分けを行い、各マス内で20クラスの標準パターン
と、加わる未知入力との距離を求める。すなわち標準パ
ターンの各マス内の特徴ベクトルと特報ベクトルモジュ
ール20によって得られたマス内の特徴ベクトルとの距
離をマス単位で求める。その各マスはクラス分け(クラ
ス1〜クラス20)されており、各マス内クラスの距離
の順位を距離の小さい順に第5番目までのクラスを求め
る。This feature vector uses the normalization module l6 to make all the characters to be recognized the same size, so
If they are the same character, they have almost the same feature vector,
The feature vectors differ for each character. However, since there are some very well-developed modules, in order to speed up the calculation process and improve the recognition rate, in the embodiment of the present invention, a standard pattern of feature vectors is used for each feature vectorization region, i.e. Classification is performed within each square, and the distance between the 20 class standard patterns and the added unknown input within each square is determined. That is, the distance between the feature vector in each square of the standard pattern and the feature vector in the square obtained by the special notice vector module 20 is determined for each square. Each of the squares is divided into classes (classes 1 to 20), and the distance ranking of the classes within each square is determined in descending order of distance to the fifth class.
距離計算モジュール21はこの距離をクラス辞書23−
1 (標準パターンをクラス単位で記憶)を用いて演算
する。尚、個別でもその個々の候補文字に対して求める
場合には候補辞書23−2を用いる(この時にはスイッ
チSWは候補辞書232を選択する)。The distance calculation module 21 stores this distance in the class dictionary 23-
1 (standard patterns are stored in class units). Note that when searching for individual candidate characters, the candidate dictionary 23-2 is used (at this time, the switch SW selects the candidate dictionary 232).
上位選出&得点割当モジュール22では前述の上位5ク
ラスを求めるとともに、各クラスに対応した得点を各マ
ス単位で決定する。すなわち上位選出&得点割当モジュ
ール22は距離計算モジュール21より得られた距離か
らクラス単位で第1〜第5番目の順位の各クラスに対し
与える得点を決定し、各文字の得点を求める。例えば第
1番目の距離(短い距離)であったときには5点、その
次に4点、3,2,Iとクラスに対し得点を与える。こ
れはマスlからマス49に対応してそれぞれ設けられる
。上位選出得点モジュール22の処理結果は総合評価モ
ジュール24に加わる。 総合評価モジュール24は入
力対象すなわち入力文字とその候補とが整合する度合い
を計算するモジュールであり、連想整合モード、全数整
合モード、個別整合モードの3種類の動作がある。The top selection and score allocation module 22 determines the top five classes mentioned above and determines the score corresponding to each class for each square. That is, the top selection and score assignment module 22 determines the score to be given to each of the first to fifth ranking classes in class units based on the distance obtained from the distance calculation module 21, and calculates the score of each character. For example, for the first distance (short distance), 5 points are given, then 4 points, 3, 2, I, and so on for the classes. These are provided corresponding to cells 1 to 49, respectively. The processing results of the top selection score module 22 are added to the comprehensive evaluation module 24. The comprehensive evaluation module 24 is a module that calculates the degree of matching between an input object, that is, an input character and its candidate, and has three types of operation: an associative matching mode, an exhaustive matching mode, and an individual matching mode.
連想整合モードは、連想辞書23−3に格納されている
候補に対応したマスクとその属するクラスからその候補
の得点を計算するモードである。The associative matching mode is a mode in which the score of a candidate is calculated from the mask corresponding to the candidate stored in the associative dictionary 23-3 and the class to which the candidate belongs.
連想辞書は第2図0))の如く、各マスク毎に候補■D
をアドレスとして、その候補がそのマスクにおいて属す
るクラスのクラスIDを格納している。As shown in Figure 2 0)), the associative dictionary has candidates ■D for each mask.
The class ID of the class to which the candidate belongs in the mask is stored, using the address as the address.
このデータは、各候補のマスクIDに対応するCdim
次元の部分ベクトルの集合をその(重み付き)距離によ
ってクラスタリングして得られるものであり、結果だけ
が連想辞書に格納される。This data is the Cdim corresponding to each candidate's mask ID.
It is obtained by clustering a set of dimensional subvectors according to their (weighted) distances, and only the results are stored in an associative dictionary.
同時に距離計算モジュールにおけるクラス辞書23−1
も対応して作成される。Class dictionary 23-1 in the distance calculation module at the same time
is also created correspondingly.
尚、連想辞書23−3とクラス辞書23−1は対応して
おり、そのII類は同じになる.2種類以上の辞書を1
つのメモリに格納する場合、使用辞書指定は辞書参照開
始位置となる。(この辞書を候補IDについて分割して
、それぞれについて並列に総合評価を行うことができ、
より高速なものが要求される場合容易に実現できる)。Note that the associative dictionary 23-3 and the class dictionary 23-1 correspond, and their class II is the same. 2 or more types of dictionaries in 1
When storing in one memory, the specification of the dictionary to be used becomes the dictionary reference start position. (This dictionary can be divided into candidate IDs and a comprehensive evaluation can be performed on each in parallel.
If higher speed is required, it can be easily realized).
連想辞書23−3は、候補aがマスクmで属するクラス
のクラスID:Kを記した表であり、これをC (m,
a)=Kと表すと、候補a(=1〜c cand)に
対して、
で得られる。尚、ここでP (m,k)は得点を表して
いる。この式により候補aに対する総合評価値V (a
)を得る。The associative dictionary 23-3 is a table in which the class ID: K of the class to which candidate a belongs with mask m is written, and this is written as C (m,
When expressed as a)=K, for candidate a (=1 to c cand), it is obtained as follows. Note that P (m, k) represents the score here. Based on this formula, the overall evaluation value V (a
).
総合評価モジュールの全数整合モード、個別整合モード
は各候補に対し、計算するモードであり。The total matching mode and individual matching mode of the comprehensive evaluation module are modes in which calculations are made for each candidate.
全数整合モードはa=1〜c cand、個別整合モ
ードはJ−1 〜c kind,a=b(j)とし、
距離をd (m,a)で表し
を求める。この値V (a)は候補aと入力対象との特
徴ベクトル間の(重み付き)距離である。The total matching mode is a=1 to c can, the individual matching mode is J-1 to c kind, a=b(j),
Express the distance by d (m, a). This value V (a) is the (weighted) distance between the feature vectors of candidate a and the input object.
上位候補選出モジュール25は各文字対応での上位から
決められた複数の文字例えば5文字を選出し出力する。The top candidate selection module 25 selects and outputs a plurality of characters, for example, five characters determined from the top in each character correspondence.
この上位5文字が読みとった画像データにおける認識結
果となる。The top five characters become the recognition result in the read image data.
前述した動作は全てパイプライン処理で成されるもので
ある。すなわち画像データを記憶する画像メモリ10内
の例えば1頁分のデータをバイブライン処理のよって読
み出し、制御モジュール15で行単位に分割するととも
に、正規化モジュール16に1文字単位で出力する。そ
の文字単で前述の細線化,線素化,特徴ベクトル化さら
には認識処理を行う
上位選出モジュール25は総合評価値に基づいて、候補
に順位をつけ、上位5個を選出するモジュールであり、
入力は連想全数整合モードであるならば{ (a’,
V(a)la’, a = 1 〜c candを修
正したもの}
個別整数合モードであるならば
( (j, v(aNj = 1〜c kind,
a = b (j))(個別整合の総合評価出力)
降/昇順= (文字連想:大きい順、その他:小さい1
1(資))である。また出力は入力のソート結果の順に
並んだ候補ID(または入力順序)とその総合評価値で
ある。All of the operations described above are performed by pipeline processing. That is, data for one page, for example, in the image memory 10 that stores image data is read out by vibrating processing, divided into lines by the control module 15, and outputted to the normalization module 16 in units of characters. The top selection module 25, which performs the above-mentioned thinning, line elementization, feature vectorization, and recognition processing on the single character, is a module that ranks candidates based on the comprehensive evaluation value and selects the top five.
If the input is in associative exhaustive matching mode, then { (a',
V(a)la', a = 1~c cand} If it is in the discrete integer sum mode ((j, v(aNj = 1~c kind,
a = b (j)) (Comprehensive evaluation output of individual matching) Descending/ascending order = (Character association: Largest order, Others: Smallest 1
1 (fund)). Further, the output is the candidate IDs (or input order) arranged in the order of the input sort results and their comprehensive evaluation values.
前述した第2図における本発明の実施例においては全体
のシステムから変換表作成モジュールについて説明した
。以下ではさらに詳細に変換表作成モジュールにおける
原理と詳細な回路について説明する。In the embodiment of the present invention shown in FIG. 2 described above, the conversion table creation module was explained from the perspective of the entire system. Below, the principles and detailed circuits of the conversion table creation module will be explained in more detail.
第2図における正規化モジュールl6が拡大や縮小処理
を実行する場合には、読み出し制御モジュール15によ
って切り出した一文字M域内の文字の大きさを求めなく
てはならない。何故ならば本発明の実施例における認識
処理においては認識率を高めるため文字を同じ大きさに
しなくてはならないからである。このため第3図におけ
る拡大の原理説明図からも明確なようにX軸上の0≦X
≦Wの領域をY軸上のO≦Y≦Dの領域に変更する処理
を行う。When the normalization module l6 in FIG. 2 executes enlargement or reduction processing, the size of the character within the region M of one character cut out by the readout control module 15 must be determined. This is because in the recognition process in the embodiment of the present invention, characters must be made the same size in order to increase the recognition rate. Therefore, as is clear from the diagram explaining the principle of enlargement in Figure 3, 0≦X on the X axis.
Processing is performed to change the area where ≦W to an area where O≦Y≦D on the Y axis.
以下では、先ず拡大原理から説明し、続いて変換表作成
モジュール17の詳細な回路動作について説明する。In the following, the enlargement principle will be explained first, and then the detailed circuit operation of the conversion table creation module 17 will be explained.
X,Yが任意の実数値をとるものとすればY軸上の座標
Yに対応するX軸上のXは
X=WxY/D ・− − 1)で
表わされる。これを用いて拡大された図形の座標I(I
は整数、工≦1≦D)に対応する元の図形上の座標X(
Xは整数)
X−1<WXI/D≦X ・・・2)を満たす
点であるものとする。この2)式を変形すると
D(X−1)<IXW≦DX −−−3)が得ら
れる。従って各I(1≦■≦D)について座標Iの要素
を3)式を満たす元の図形の座標Xの要素とすることに
より、幅Dに変形拡大された図形が得られる。Assuming that X and Y take arbitrary real values, the X on the X axis corresponding to the coordinate Y on the Y axis is expressed as X=WxY/D·−−1). Using this, the coordinates I (I
is an integer, the coordinate on the original figure corresponding to work≦1≦D)
(X is an integer) X-1<WXI/D≦X...2). When this equation 2) is modified, D(X-1)<IXW≦DX ---3) is obtained. Therefore, by setting the element at the coordinate I for each I (1≦■≦D) to the element at the coordinate X of the original figure that satisfies equation 3), a figure deformed and enlarged to the width D can be obtained.
この考え方で入力画像データを正規化するため、先ず入
力図形に対して文字の幅Wを調べるとともに横方向や縦
方向のヒストグラムを作成する。すなわち、変換表を作
成する。In order to normalize input image data based on this idea, first, the character width W of the input figure is checked, and horizontal and vertical histograms are created. That is, create a conversion table.
ヒストグラムは線形であるならば画像データ上の文字の
領域に含まれる最も左の点が属数列の値を1とし、それ
より右の列は1づつ増やすことによって得られる。また
行に対しても同様に、文字の領域に加わる最も上の点が
属する行の値を1としそれより下方の行を1づつ増やし
ていくことによって得られる。この文字の幅Wと列の先
端並びに行の先端を変換表作成モジュール17は求める
。If the histogram is linear, the leftmost point included in the character area on the image data is obtained by setting the value of the genus sequence to 1, and increasing the value by 1 for the columns to the right. Similarly, for lines, the value is obtained by setting the value of the line to which the uppermost point added to the character area belongs to 1 and increasing the value by 1 for the lines below it. The conversion table creation module 17 determines the width W of this character, the leading edge of the column, and the leading edge of the row.
第4図は本発明の実施例の構成図である。頌域RXが読
み出し制御部15(第2図参照)より切り出されて行単
位でヒストグラム生成回路網(NxN)31に入力する
。ヒストグラム生成回路網(NXN)3 1は第5図に
示した縦方向、横方向のヒストグラムとその入力した文
字の幅を求める回路であり、縦方向のヒストグラムはバ
ッファ(MXI)32に行単位の値として格納される。FIG. 4 is a block diagram of an embodiment of the present invention. The numeral area RX is extracted by the readout control unit 15 (see FIG. 2) and input to the histogram generation circuit network (NxN) 31 in units of rows. Histogram generation circuit network (NXN) 3 1 is a circuit for calculating the vertical and horizontal histograms shown in FIG. Stored as a value.
また横方向のヒストグラムはヒストグラム生成回路31
から正規化回路網34に図示しないが直接加わる。Also, the horizontal histogram is generated by the histogram generation circuit 31.
The normalization circuitry 34 is directly connected to the normalization circuitry 34 (not shown).
ヒストグラム生成回路網31はNXNのシストリックア
レイ構造を有しており、ヒストグラム生成回路綱31を
通過した画像データ(画像データに変化はない)はバッ
ファ(NxN)33に格納される。すなわち画像RXが
最終的にはバッファ33に格納される。尚第2図におい
ては読み出し制御モジュール15の出力は正規化回路網
16にも加わるので、この場合にはこのバッファ33は
必要ではなく正規化モジュール16内に設けても良い。The histogram generation circuit 31 has an NXN systolic array structure, and the image data (the image data remains unchanged) that has passed through the histogram generation circuit 31 is stored in a buffer (NxN) 33. That is, the image RX is finally stored in the buffer 33. In FIG. 2, the output of the read control module 15 is also applied to the normalization circuit network 16, so in this case, the buffer 33 is not necessary and may be provided within the normalization module 16.
このヒストグラム生成回路網31によって得られた縦方
向並びに横方向のヒストグラムは正規化回路モジュール
16に加わり、このヒストグラムをもとに正規化モジュ
ール16は動作する。尚正規化回路網34は横方向(列
単位)の正規化を行う回路である。縦方向(行単位)の
正規化はバッファ33 (MxN)からのデータ読み込
み用セル構造回路35によるドット行単位の呼び出しに
よって正規化している。すなわち縦方向の正規化を行い
ながら横方向の正規化に必要な計算をし、この値と入力
データを正規化回路綱34に出力する。The vertical and horizontal histograms obtained by this histogram generation circuitry 31 are applied to the normalization circuit module 16, and the normalization module 16 operates based on this histogram. Note that the normalization circuit network 34 is a circuit that performs horizontal direction (column unit) normalization. The normalization in the vertical direction (in units of rows) is performed by calling the data in units of dot rows by the cell structure circuit 35 for reading data from the buffer 33 (MxN). That is, calculations necessary for horizontal normalization are performed while performing vertical normalization, and this value and input data are output to the normalization circuit 34.
データ読み込み用セル構造回路綱35は縦方向を正規化
する回路であり、データ読み込み用セル回路網35と正
規化回路綱34の動作が始まる時刻をt=1とするなら
ば、縦方向の正規化を行うため、時刻Lで正規化後の図
形のt行目に対応する行を読b込む。The data reading cell structure circuitry 35 is a circuit that normalizes the vertical direction.If the time when the data reading cell circuitry 35 and the normalization circuitry 34 start operating is t=1, then the vertical normalization In order to perform the normalization, at time L, a line corresponding to the t-th line of the figure after normalization is read.
D−h2(i’−1)<t L ≦ D − h2(
i’ ) ・ ・ ・4〕が成り立つよう、入力画
像の行i″を時刻tで読み取る。換言するならば、ヒス
トグラムの値が4)式を満足するまで縦方向(行の読み
出し順方向)のヒストグラムと入力画像を読み込めば、
縦方向の正規化が行える。これは
while ( t L > D−h2(i’) &&
i’<M )read data && histo
gram;なる処理をセルが行うことで実現できる。ま
た、横方向の正規化を行う時も3)式を満足する処理を
行えば良い。横方向のヒストグラムの値および横方向の
文字幅W呼び込み、1列のセルでは’D − hHj−
1)’ , “jW”, “D − hl(j)”
を計算し、さらに
D−hl(j”)<j W ならば j→j−1,
jり≦D−hl(j’ −1) ならば j−+j+
1と変換していくことで行う。尚jは正規化の図形にお
ける列、j′は入力図形のおける列を表している。D-h2(i'-1)<t L ≦ D-h2(
i' ) ・ ・ ・ ・4] is read at time t so that row i'' of the input image is satisfied.In other words, read the row i'' of the input image at time t so that the histogram value satisfies equation 4) in the vertical direction (line reading forward direction). If you load the histogram and input image,
Vertical normalization can be performed. This is while (t L >D-h2(i')&&
i'<M) read data && histo
This can be achieved by the cell performing the following process. Also, when normalizing in the horizontal direction, processing that satisfies equation 3) may be performed. The value of the horizontal histogram and the horizontal character width W are called in. 'D − hHj−
1)', "jW", "D - hl(j)"
If D−hl(j”)<j W, then j→j−1,
If jri≦D−hl(j' −1), then j−+j+
This is done by converting to 1. Note that j represents a column in the normalization figure, and j' represents a column in the input figure.
このような正規化回路網34の動作、ならびにデータ読
み込み用セル回路網35の動作により、横方向と縦方向
の正規化がなされ、得られる図形はDXDの正規化され
た図形になる。By the operation of the normalization circuit network 34 and the data reading cell circuit network 35, horizontal and vertical normalization is performed, and the resulting figure becomes a DXD normalized figure.
前述の正規化を行うためには入力文字のヒストグラムを
必要とする。以下ではこのヒストグラム生成についてさ
らに詳細に説明する。In order to perform the above-mentioned normalization, a histogram of input characters is required. This histogram generation will be explained in more detail below.
第6図は本発明の実施例のヒストグラム生成回路網図で
ある。各セルH(1.1)〜H (N,N)はヒストグ
ラム計算セルあるいはシフトレジスタより成る。第4図
に示した如<MXMの入カデータRXがヒストグラム計
算セルH(N,1)とシフトレジスタH(N,2)〜H
(N,N)に1行ドット単位で加わる。そしてそのヒ
ストグラム計算セルH(N,1)の出力はシフトレジス
タH(N−1.1)にまたシフトレジスタH(N,2)
の出力はヒストグラム計算セルH (N−1.2)に加
わる。さらにシフトレジスタH(N.3)〜H (N,
N)の出力はシフトレジスタ(N−1、3)〜H (N
−1,N)に加わる。すなわち、第1番目においては行
の左端にヒストグラム計算セルを、次の段においては二
番目のドット位置、また3段目においては3ドット目の
位置に順次ヒストグラム計算セルを設け、それぞれ1番
目から2番目、3番目へとそのデータを出力する構造と
している。さらに換言するならばシフトレジスタをそれ
ぞれド7}対応でセルH(N,1)から順次セルH(1
.1)までをシフトレジスタで構成し、その時セルH(
N,1)をヒストグラム計算セルとし、2番目において
は2番目のセルH (N−1.2)をヒストグラム計算
セルとし、3番目は同様に3個目の位置に、そして順々
に最終的にはセルH (1,N)にヒストグラム計算セ
ルを設けそれぞれのドット位置単位で左から次のヒスト
グラム計算セルの位置に結果を出力する構造としている
。FIG. 6 is a histogram generation circuit diagram according to an embodiment of the present invention. Each cell H(1.1) to H(N,N) consists of a histogram calculation cell or a shift register. As shown in FIG.
Add dots to (N, N) in one line. The output of the histogram calculation cell H (N, 1) is sent to the shift register H (N-1.1) and also to the shift register H (N, 2).
The output of is applied to the histogram calculation cell H (N-1.2). Furthermore, shift registers H (N.3) to H (N,
The output of N) is the shift register (N-1, 3) to H (N
-1, N). That is, in the first row, the histogram calculation cell is placed at the left end of the row, in the next row, the histogram calculation cell is placed at the second dot position, and in the third row, the histogram calculation cell is placed at the third dot position, and the cells are placed sequentially from the first to the third dot position. The structure is such that the data is output to the second and third nodes. In other words, the shift registers are sequentially moved from cell H(N, 1) to cell H(1) corresponding to
.. Up to 1) are configured with shift registers, and at that time cell H (
N, 1) is the histogram calculation cell, in the second the second cell H (N-1.2) is the histogram calculation cell, in the third the same way, in the third position, and in turn the final A histogram calculation cell is provided in cell H (1, N), and the result is output to the next histogram calculation cell position from the left for each dot position.
このそれぞれのヒストグラム計算セル並びにシフトレジ
スタは1クロノクに対応してデータを次の段のシフトレ
ジスタやヒストグラム計算セルに出力する。尚シフトレ
ジスタは送られてきたデータを1クロックを遅延するも
のである。Each histogram calculation cell and shift register outputs data to the next stage shift register or histogram calculation cell in correspondence with one clock. Note that the shift register delays the sent data by one clock.
以下ではさらに詳細に動作を説明する。ヒストダラム生
成回路網の動作の始まる時刻tをt=1とし、エクロッ
クごとにtが1づつ増えていくものとするならば、時刻
tでの各セルでの動作は次のようになる。The operation will be explained in more detail below. Assuming that the time t at which the operation of the histodaram generation circuit network begins is t=1, and t is incremented by 1 for each ex-clock, the operation of each cell at time t is as follows.
■ t≦Mのとき、セル(N,1)〜セル(N.N)は
入力データのt行目を読み込む。M<tのとき,セル(
N,1)〜セル(N,N)は0を読み込む。(2) When t≦M, cells (N, 1) to (N.N) read the t-th row of input data. When M<t, the cell (
N, 1) to cell (N, N) read 0.
■ ヒストグラム計算セル(i,N−i+1)はセル(
i+1,N−i)から送られてきた演算結果とセル(i
+1,N−i+1)から送られてきたデータを用い、後
述のセルの動作に従って処理を行う。■ Histogram calculation cell (i, N-i+1) is cell (
The calculation results sent from cell (i+1,N-i) and cell (i
+1, N-i+1), processing is performed according to the operation of the cell, which will be described later.
■ ヒストグラム計算セル(i,N−i+1)は、演算
結果をセル(i−1,N−i+2)に送る。(2) Histogram calculation cell (i, N-i+1) sends the calculation result to cell (i-1, N-i+2).
また、l〜N−1行のすべてのセル(i.j)は、セル
(i+1,j)から送られてきたデータをそのままセル
(i−1,j)に送る。Furthermore, all cells (i.j) in rows 1 to N-1 send the data sent from cell (i+1, j) to cell (i-1, j) as they are.
但し、N≦tのときセル(1,N)の演算結果は入力デ
ータの横方向のヒストグラム((N−t+1)行目)の
値(xsvidth , xcounυとなるから、(
MXI)のバンファ32に格納していく。また、セル(
1,j)(0≦j≦1)のデータ(ywidth,xc
ount)は(MxN)のバッファに送られる。However, when N≦t, the calculation result of cell (1, N) is the value (xsvidth, xcounυ) of the horizontal histogram ((N-t+1)th row) of the input data, so (
MXI) is stored in the buffer 32. Also, the cell (
1, j) (0≦j≦1) data (ywidth, xc
ount) is sent to (MxN) buffers.
以上の動作はM+N−1クロックで全て完了し、J行目
のヒストグラム計算セルに入力データのJ行目(横方向
)のヒストグラムの値が格納され、(MXI)のバッフ
ァの■行目に入力データの■行目(縦方向)のヒストグ
ラムの値が格納されることになる。All the above operations are completed in M+N-1 clocks, and the histogram value of the J-th row (horizontal direction) of the input data is stored in the histogram calculation cell of the J-th row, and is input to the ■ row of the (MXI) buffer. The histogram value of the ■th row (vertical direction) of the data will be stored.
セルを第6図のように配置すれば、たとえば入力図形の
1行目のデータがセル(N,1)で処理され、時刻(I
+1)で処理結果とその2行目のデータがセル(N−1
.2)で処理されるという具合に同じ行のデータが順に
出会っていくので縦方向と横方向のヒストグラムが同時
に作れる。尚セルを第6図のように配置するかわりに1
次限に配置されたヒストグラム計算セルを用い、図7に
示すようにデータを1クロックづつ別単位で遅延させて
入力してもよい。前述では横方向、縦方向の動作につい
て説明したが以下では前述のヒストグラム計算セルの動
作についてさらに詳細に説明する。If the cells are arranged as shown in Figure 6, for example, the data in the first row of the input figure will be processed in cell (N, 1), and the time (I
+1), the processing result and its second row data are stored in cell (N-1)
.. As data from the same row is encountered in sequence in step 2), vertical and horizontal histograms can be created at the same time. Note that instead of arranging the cells as shown in Figure 6,
Using a histogram calculation cell placed at the next limit, data may be input after being delayed in units of one clock at a time, as shown in FIG. Although the operations in the horizontal and vertical directions have been described above, the operations of the histogram calculation cell described above will be explained in more detail below.
先ず線形の場合のヒストグラム計算セルの横方向のヒス
トグラムについて説明する。横方向のヒストグラムは、
前述したように、画像データ上で文字の領域に含まれる
最も左の点が属する列の値を1とし、それより右の列は
1づつ値を増やしていくことで得られる。従って、入力
画像のある列を走査したとき、もしその列に黒画像が含
まれていて、しかもその列より左の列には黒画像が含ま
れていないとき、その列のヒストグラムの値を1とし、
その列より右の列は、ヒストグラムの値を1ずつ増やす
。j列目のセルはまず(j−1)列目のセルの値を判別
し、それが1以上であればその値に1を加えたものを自
分のセルの値とする。First, a horizontal histogram of a histogram calculation cell in a linear case will be explained. The horizontal histogram is
As described above, the value is obtained by setting the value of the column to which the leftmost point included in the character area belongs to 1 on the image data, and increasing the value by 1 in the columns to the right. Therefore, when scanning a certain column of the input image, if that column contains a black image, and the column to the left of that column does not contain any black images, the value of the histogram of that column is set to 1. year,
In the columns to the right of that column, the histogram values are increased by 1. The cell in the j-th column first determines the value of the cell in the (j-1)th column, and if it is greater than or equal to 1, the value obtained by adding 1 to that value is set as the value of its own cell.
もし(j−1)列目のセルの値がOであれば、j列目に
黒画素があるか否か調べ、あればセルの値を1にし、な
ければセルの値を0にする。各セルに前述の処理を設け
、入力画像に対し1行目から順に処理すれば、最終的に
横方向のヒストグラムが得られる。If the value of the cell in the (j-1)th column is O, it is checked whether there is a black pixel in the jth column, and if so, the cell value is set to 1, and if not, the cell value is set to 0. By applying the above-described processing to each cell and sequentially processing the input image from the first row, a horizontal histogram is finally obtained.
また、文字の幅は、入力画像データ上の最も右の黒画素
の存在する列のヒストグラムの値に等しく、これを求め
ればよい。Further, the width of the character is equal to the value of the histogram of the column in which the rightmost black pixel exists on the input image data, and this can be calculated.
なお、縦方向のヒストグラムも、全く同様の考え方で得
ることができる。但し、横方向のときに空間的に分布さ
せていた機能を時間的に配置することになる。Note that a vertical histogram can also be obtained using exactly the same concept. However, the functions that were distributed spatially in the horizontal direction will now be distributed temporally.
第8図は線形におけるヒストグラム計算セルの詳細な構
成図である。flagは黒画素があったかどうかを判定
するフラグであり、countはヒストグラムの値を格
納し、Widthは文字幅の値を格納する。 1x1
1y1 は縦方向か横方向かを表している。また、y
flag xiuidth,xcountは、左の列の
セルの値を用いて処理して結果を右のセルに送り、yw
i6th,ycount,xfalgは自分のセルの値
を用いて処理して結果を自分のセルに格納する。そして
xflag,xcount,xwidth並びにyfl
ag,ycount,ywi6thはそれぞれ以下の式
によって決定される。FIG. 8 is a detailed configuration diagram of a linear histogram calculation cell. flag is a flag for determining whether there is a black pixel, count stores a histogram value, and Width stores a character width value. 1x1
1y1 indicates whether the direction is vertical or horizontal. Also, y
flag xiuidth, xcount is processed using the value of the cell in the left column and sends the result to the right cell, yw
i6th, ycount, and xfalg process using the values of their own cells and store the results in their own cells. and xflag, xcount, xwidth and yfl
ag, ycount, and ywi6th are each determined by the following formulas.
横方向
xflag = if data ==1 then
1else xflag
xcount = if xcount>O
then xcount+1else if xfl
ag−=1 or data==I then 1el
se xcount
xwidth = if xflag==1 or d
ata==l then xcount+1else
xwidth
縦方向
yflag = if data==1 then 1
else yflag
ycount = if ycount>O then
ycount+1else if yflag==I
or data==l then 1else yc
ount
ywidth = if yflag==1 or d
ata==1 then ycount+1else
ywidth
このようなセルを用いて処理を行うと、最終的に、横力
同のヒストグラムは各セル内のxcounef.,横方
向の文字幅はセル(1,N)のxwidthに、縦方向
の文字幅はセル(1,N)のywidthに格納され、
縦方向のヒストグラムは、時刻N以降セル(1,N)の
ycountとして順に出力されることになる。Horizontal xflag = if data ==1 then
1else xflag xcount = if xcount>O
then xcount+1else if xfl
ag-=1 or data==I then 1el
se xcount xwidth = if xflag==1 or d
ata==l then xcount+1else
xwidth vertical direction yflag = if data==1 then 1
else yflag ycount = if ycount>O then
ycount+1 else if yflag==I
or data==l then 1else yc
ount ywidth = if yflag==1 or d
ata==1 then ycount+1else
ywidth When processing is performed using such cells, the histogram of the lateral force is finally created by xcounef. , the horizontal character width is stored in xwidth of cell (1, N), the vertical character width is stored in ywidth of cell (1, N),
The vertical histogram is sequentially output as the ycount of the cell (1, N) after time N.
次に非線形の場合のヒストグラム計算セルの横方向のヒ
ストグラムについて説明する。非線形の場合は、各列ご
とに、黒画素を横切る回数を数え、それを積算していく
。従って、j列目のセルは、j列内で黒画素を横切った
回数を計算し、その値を積算する。Next, the horizontal histogram of the histogram calculation cell in the nonlinear case will be explained. In the case of non-linearity, the number of times black pixels are crossed for each column is counted and the numbers are integrated. Therefore, the cell in the j-th column calculates the number of times a black pixel is crossed within the j-th column, and integrates the values.
第9図は非線形におけるヒストグラム計算セルの詳細な
構成図である。flagは黒画素を横切っている途中で
あるかどうかを判定するフラグであり、countはヒ
ストグラムの値を格納する。stackはその行でヒス
トグラムに加算された値の積算値を格納する。 ゛X゛
y′ は縦方向か横方向かを表している。また、yfa
lg,ycount,xstackは、左の列のセルの
値を用いて処理して結果を右のセルに送り、ystac
k,xcount,xflagは自分のセルの値を用い
て処理して結果を自分のセルに格納する。FIG. 9 is a detailed configuration diagram of a nonlinear histogram calculation cell. flag is a flag that determines whether or not a black pixel is being crossed, and count stores the value of the histogram. The stack stores the integrated value of the values added to the histogram in that row.゛X゛y' represents the vertical direction or the horizontal direction. Also, yfa
lg, ycount, xstack process using the value of the cell in the left column and send the result to the right cell, and ystack
k, xcount, and xflag are processed using the values of their own cells, and the results are stored in their own cells.
そして、xflag,xcount,xstack,並
びにyflag,ycount , ystackはそ
れぞれ以下の弐によって決定される。Then, xflag, xcount, xstack, and yflag, ycount, ystack are each determined by the following two.
横方向
xflag = if data==o then O
else 1
if data==1 and xflag==Oth
en xcount+xstack+1else x
count+xstackxstack = if d
ata−=1 and xflag==O then
xstack+1else xstack
xcount
縦方向
yflag = if data==O then O
else 1
ycount = if data==I and y
flag=司then ycount+ystack
+1else ycount+ystack+1yst
ack = if data==1 and yfla
g==o then ystack+1else ys
tack
このようなセルを用いて処理を行うと、最終的に、横方
向のヒストグラムは第10図の例に示すごとくに、横方
向の文字幅はセル(1,N)のXCountに、縦方向
の文字幅はセル(1.N)のycountに格納され、
縦方向のヒストグラムは、時刻N以降セル(1,N)の
ycountとして順に出力されることになる。Horizontal xflag = if data = = o then O
else 1 if data==1 and xflag==Oth
en xcount+xstack+1else x
count+xstackxstack = if d
ata-=1 and xflag==O then
xstack+1else xstack xcount Vertical direction yflag = if data==O then O
else 1 ycount = if data==I and y
flag=ycount+ystack
+1else ycount+ystack+1yst
ack=if data==1 and yfla
g==o then ystack+1 else ys
tack When processing is performed using such a cell, the horizontal histogram will eventually look like the example in Figure 10, where the character width in the horizontal direction is equal to the XCount of cell (1, N), and the character width in the vertical direction is The character width of is stored in ycount of cell (1.N),
The vertical histogram is sequentially output as the ycount of the cell (1, N) after time N.
以上のようにヒストグラム計算セルを構成することによ
り、線形、非線形のヒストグラムである変換表を得るこ
とができる。By configuring the histogram calculation cell as described above, a conversion table that is a linear or nonlinear histogram can be obtained.
以上述べたように本発明によればヒストグラムヲハイブ
ライン構造で並列に処理するのでその変換処理を高速化
することができる。このヒストグラムを高速で求めるの
で、正規化処理を同時に高速化することができる。また
その結果、高速の文字等の認識装置を行うことができる
。As described above, according to the present invention, since the histograms are processed in parallel in a high line structure, the conversion process can be speeded up. Since this histogram is obtained at high speed, the normalization process can be speeded up at the same time. As a result, a high-speed character recognition device can be realized.
第1図は本発明の原理ブロソク図、
第2図は本発明の実施例の構成図、
第3図は拡大の原理説明図、
第4図は本発明の実施例の全体の構成図、第5図は縦方
向と横方向のヒストグラム図、第6図は本発明のヒスト
グラム計算回路網図、第7図はデータの流れ図、
第8図はヒストグラム計算セル(tiI形)図、第9図
は横方向のヒストグラム(非線形)図、第10図はヒス
トグラム計算セル(非線形)図である。
H(1.1)〜H(N ])
H(N、1)〜H(N,N)・・・・・セル、H(N,
1). H(N〜1,2)・・・H(1,N)・・・・
・ヒストグラム計算セル.Fig. 1 is a diagram of the principle of the present invention, Fig. 2 is a block diagram of an embodiment of the present invention, Fig. 3 is a diagram explaining the principle of enlargement, Fig. 4 is a block diagram of the entire embodiment of the present invention, Figure 5 is a vertical and horizontal histogram diagram, Figure 6 is a histogram calculation circuit diagram of the present invention, Figure 7 is a data flow diagram, Figure 8 is a histogram calculation cell (tiI type) diagram, and Figure 9 is a diagram of a histogram calculation cell (tiI type). A horizontal histogram (nonlinear) diagram, FIG. 10 is a histogram calculation cell (nonlinear) diagram. H(1.1)~H(N]) H(N,1)~H(N,N)...Cell, H(N,
1). H(N~1,2)...H(1,N)...
・Histogram calculation cell.
Claims (1)
(1、N)〜H(N、N))を直列接続した直列回路を
N列設け、第m列目の入力側からm番目のセルは、入力
データをシフトして出力するとともに、前記入力データ
と第m−1列目のm−1列目のセルより加わる幅データ
とカウントデータとから幅データとカウントデータとを
更新してm+1列目の入力側からm+1番目のセルに出
力するヒストグラム計算セルであり、 該ヒストグラム計算セル以外のセルはシフトレジスタで
あることを特徴とするシストリックアレイによる変換表
作成回路。 2)前記ヒストグラム計算セルはフラグレジスタを有し
、加わる入力データが1の時にフラグを1、0の時には
現在のフラグの値を保持し、 カウント値が0より大の時に入力するカウントデータを
インクリメントし、0でかつ前記フラグが1か入力する
データが1の時にカウントデータを1とし、他の時にカ
ウント値をそのままとして更新して出力し、 フラグが1かあるいは入力データが1の時カウントデー
タに1加算して幅データとし他の時に同じ値として入力
する幅データを出力することを特徴とする請求項1記載
のシストリックアレイによる変換表作成回路。 3)前記入力データは文字データであり、1文字領域の
ドットが1ドット行単位で前記直列接続したN個の入力
に加わり、 前記N列目の入力側からN番目のセルは横方向のヒスト
グラムを出力することを特徴とする請求項1記載のシス
トリックアレイによる変換表作成回路。 4)N個のセル(H(1、1)〜H(N、1)・・・
H(1、N)〜H(N、N))を直列接続した直列回路
をN列設け、第m列目の入力側からm番目のセルは、入
力データをシフトして出力するシフトレジスタと幅レジ
スタとカウンタとを有し、入力データが1の時フラグデ
ータを1とし、0の時はm−1列目の入力側からm−1
段目のセルから加わるフラグデータを出力フラグデータ
としてm+1列目の入力側からm+1番目のセルに出力
し、カウンタの値が0より大の時カウンタを1歩進し、
入力するフラグデータが1かあるいは入力データが1で
ある時カウンタを1とし、他の時にはカウンタを変化さ
せず、前記m−1列目の入力側からm−1段目のセルか
ら加わるフラグデータが1かあるいは入力データが1の
時カウンタの値に1加算して幅レジスタに格納し、その
他の時に幅レジスタの値を保持するヒストグラム計算セ
ルであり、 他は入力データをシフトして出力するシフトレジスタで
あることを特徴とするシストリックアレイによる変換表
作成回路。 5)前記入力データは文字データであり、1文字領域の
ドットが1ドット行単位で前記直列接続したN個の入力
に加わり、前記ヒストグラム計算セルは縦方向のヒスト
グラムを前記幅レジスタとカウンタでそれぞれ求めるこ
とを特徴とする請求項4記載のシストリッレアレイによ
る変換表作成回路。[Claims] 1) N cells (H(1,1) to H(N,1)...H
(1, N) to H(N, N)) are connected in series, and the m-th cell from the input side of the m-th column shifts and outputs the input data, and A histogram that updates the width data and count data from the data and the width data and count data added from the cell in the m-1th column and outputs it from the input side in the m+1st column to the m+1th cell. A conversion table creation circuit using a systolic array, characterized in that the cells are calculation cells, and the cells other than the histogram calculation cells are shift registers. 2) The histogram calculation cell has a flag register, which sets the flag to 1 when the added input data is 1, holds the current flag value when it is 0, and increments the input count data when the count value is greater than 0. Then, when the flag is 1 or the input data is 1, the count data is set to 1, and at other times, the count value is updated and output as is, and when the flag is 1 or the input data is 1, the count data is set to 1. 2. The conversion table creation circuit using a systolic array according to claim 1, wherein the circuit adds 1 to the width data and outputs the width data which is input as the same value at other times. 3) The input data is character data, and the dots in one character area are added to the N series-connected inputs in units of one dot row, and the Nth cell from the input side of the Nth column is a horizontal histogram. 2. A conversion table creation circuit using a systolic array according to claim 1, wherein the circuit outputs the following. 4) N cells (H(1,1) to H(N,1)...
N columns of series circuits in which H(1,N) to H(N,N)) are connected in series are provided, and the m-th cell from the input side of the m-th column is a shift register that shifts input data and outputs it. It has a width register and a counter, and when the input data is 1, the flag data is set to 1, and when it is 0, it is set to m-1 from the input side of the m-1th column.
The flag data added from the cell in the row is outputted as output flag data to the m+1 cell from the input side in the m+1 column, and when the counter value is greater than 0, the counter is incremented by one.
When the input flag data is 1 or the input data is 1, the counter is set to 1, otherwise the counter is not changed, and the flag data is added from the m-1st cell from the input side of the m-1th column. It is a histogram calculation cell that adds 1 to the counter value and stores it in the width register when is 1 or the input data is 1, and holds the value of the width register at other times, and otherwise shifts the input data and outputs it. A conversion table creation circuit using a systolic array characterized by being a shift register. 5) The input data is character data, and the dots in one character area are added to the N series-connected inputs in units of one dot row, and the histogram calculation cell calculates a vertical histogram using the width register and counter, respectively. 5. A conversion table creation circuit using a systolyre array according to claim 4.
Priority Applications (5)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008421A JPH03214283A (en) | 1990-01-19 | 1990-01-19 | Conversion table creation circuit using systolic array |
EP91100646A EP0447751B1 (en) | 1990-01-19 | 1991-01-21 | Image processing system |
DE69131304T DE69131304T2 (en) | 1990-01-19 | 1991-01-21 | Image processing system |
CA002034617A CA2034617C (en) | 1990-01-19 | 1991-01-21 | Data processing system |
US07/644,360 US5436982A (en) | 1990-01-19 | 1991-01-22 | Data processing system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008421A JPH03214283A (en) | 1990-01-19 | 1990-01-19 | Conversion table creation circuit using systolic array |
Publications (1)
Publication Number | Publication Date |
---|---|
JPH03214283A true JPH03214283A (en) | 1991-09-19 |
Family
ID=11692663
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2008421A Pending JPH03214283A (en) | 1990-01-19 | 1990-01-19 | Conversion table creation circuit using systolic array |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPH03214283A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5642444A (en) * | 1994-07-28 | 1997-06-24 | Univ North Carolina | Specialized image processing system architecture and method for image data arrays |
-
1990
- 1990-01-19 JP JP2008421A patent/JPH03214283A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5642444A (en) * | 1994-07-28 | 1997-06-24 | Univ North Carolina | Specialized image processing system architecture and method for image data arrays |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5401695B2 (en) | Image identification device, image identification method, image identification program, and recording medium | |
US20100180189A1 (en) | Information processing method and apparatus, program, and storage medium | |
CN113642571B (en) | Fine granularity image recognition method based on salient attention mechanism | |
US20200279166A1 (en) | Information processing device | |
US11526723B2 (en) | Apparatus and methods of obtaining multi-scale feature vector using CNN based integrated circuits | |
CN110598703A (en) | OCR (optical character recognition) method and device based on deep neural network | |
JPH0695192A (en) | Device for image recognition and method for inputting image | |
US20200286254A1 (en) | Information processing device | |
JPH03214283A (en) | Conversion table creation circuit using systolic array | |
JP4390523B2 (en) | Segmentation of composite image by minimum area | |
CN115482537B (en) | Text alignment method and system based on iterative clustering processing OCR recognition result | |
CN113298702B (en) | Reordering and Segmentation Method Based on Large Size Image Pixels | |
JPH03214282A (en) | Normalization system applying systolic array | |
JPH03240175A (en) | histogram calculation circuit | |
JP3661774B2 (en) | Character string recognition method, character recognition device and program | |
JPH03214285A (en) | Data conversion system | |
CN118038476B (en) | Navigation data form positioning method, system, equipment and storage medium | |
CN118522019B (en) | Text recognition method, electronic device and storage medium | |
JPH03214284A (en) | Data conversion system | |
EP0447751B1 (en) | Image processing system | |
JP3196291B2 (en) | Character recognition method and device | |
JPH03268054A (en) | High-speed parallel processing system | |
JPH1049684A (en) | High-speed moment calculation device | |
JPH03268088A (en) | General evaluation circuit | |
JPH03126188A (en) | Character recognizing device |