JP5051971B2 - Image encoding device, image decoding device, image encoding method, computer-readable recording medium recording program of image encoding method, and computer-readable recording medium recording program of image decoding method and image decoding method - Google Patents

Image encoding device, image decoding device, image encoding method, computer-readable recording medium recording program of image encoding method, and computer-readable recording medium recording program of image decoding method and image decoding method Download PDF

Info

Publication number
JP5051971B2
JP5051971B2 JP2004238698A JP2004238698A JP5051971B2 JP 5051971 B2 JP5051971 B2 JP 5051971B2 JP 2004238698 A JP2004238698 A JP 2004238698A JP 2004238698 A JP2004238698 A JP 2004238698A JP 5051971 B2 JP5051971 B2 JP 5051971B2
Authority
JP
Japan
Prior art keywords
pattern
image
input
input pattern
representative
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2004238698A
Other languages
Japanese (ja)
Other versions
JP2005006353A5 (en
JP2005006353A (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.)
Sharp Corp
Original Assignee
Sharp Corp
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 Sharp Corp filed Critical Sharp Corp
Priority to JP2004238698A priority Critical patent/JP5051971B2/en
Publication of JP2005006353A publication Critical patent/JP2005006353A/en
Publication of JP2005006353A5 publication Critical patent/JP2005006353A5/ja
Application granted granted Critical
Publication of JP5051971B2 publication Critical patent/JP5051971B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Image Processing (AREA)
  • Compression Of Band Width Or Redundancy In Fax (AREA)

Description

本発明は、画像符号化装置、画像符号化方法および画像符号化方法のプログラムを記録したコンピュータ読取可能な記録媒体、ならびに画像復号方法および画像復号方法のプログラムを記録したコンピュータ読取可能な記録媒体に関する。特に、符号化効率を高く保ちながら、符号化による入力パターンの置換え誤りを少なくした画像符号化装置、画像符号化方法および画像符号化方法のプログラムを記録したコンピュータ読取可能な記録媒体、ならびに画像復号方法および画像復号方法のプログラムを記録したコンピュータ読取可能な記録媒体に関する。   The present invention relates to an image encoding device, an image encoding method, a computer-readable recording medium on which a program for the image encoding method is recorded, and a computer-readable recording medium on which an image decoding method and a program for the image decoding method are recorded. . In particular, an image encoding apparatus, an image encoding method, and a computer-readable recording medium on which a program for the image encoding method is recorded, and image decoding, in which an input pattern replacement error due to encoding is reduced while maintaining high encoding efficiency The present invention relates to a computer-readable recording medium on which a program for an image decoding method and an image decoding method are recorded.

従来、文書画像を符号化する代表的な方法として、文字認識技術を用いて、文字部分を文字コードとして符号化する方法と、通常の画像データを符号化するのと同様に符号化する方法とがある。   Conventionally, as a typical method of encoding a document image, a method of encoding a character part as a character code using a character recognition technology, and a method of encoding in the same way as encoding normal image data, There is.

文字認識技術を用いる方法では、符号化後のデータ容量が小さくなるという特徴を有する。しかし、性能の向上は見られるものの、文字の認識誤りをゼロにすることはできない。このため、誤った符号化が行なわれると、復号時に、画像に含まれる文章の理解に支障をきたすことも起こり得る。   The method using the character recognition technique has a feature that the data capacity after encoding becomes small. However, although performance is improved, character recognition errors cannot be made zero. For this reason, if erroneous encoding is performed, it may occur that the understanding of the text included in the image is hindered at the time of decoding.

一方、通常の画像と同様に符号化する方法は、一般に良く知られている画像圧縮の方法をそのまま文書画像に適用するものである。この方法では、極端な画質の低下が起きない限り、文章の理解に支障をきたすようなことは起こりにくい。しかし、文字認識技術を用いる場合に比べ、符号化後のデータ容量が大きくなってしまう。   On the other hand, a method of encoding in the same way as a normal image applies a generally well-known image compression method to a document image as it is. In this method, unless the image quality is extremely deteriorated, it is difficult to cause trouble in understanding the sentence. However, the data capacity after encoding becomes larger than in the case of using character recognition technology.

両者の欠点をカバーするため、相互に類似する複数のパターンを単一のパターンで代表させ、代表パターン、代表パターンの識別コードおよび代表パターンで代表されるパターンの出現位置のみを符号化する方法が以前より提案されている。この符号化方法については、「R.N.Ascher et al. "A Means for Achieving a High Degree of Compaction on Scan-Digitized Printed Text", IEEE Transactions on Computers, vol.c-23, No.11, November 1974」(非特許文献1)などに詳しく開示されている。   In order to cover the disadvantages of both, there is a method in which a plurality of similar patterns are represented by a single pattern and only the representative pattern, the identification code of the representative pattern, and the appearance position of the pattern represented by the representative pattern are encoded. It has been proposed before. This encoding method is described in “RNAscher et al.“ A Means for Achieving a High Degree of Compaction on Scan-Digitized Printed Text ”, IEEE Transactions on Computers, vol.c-23, No.11, November 1974” ( Non-patent document 1) and the like are disclosed in detail.

ここでいうパターンとは、文書画像の符号化においては多くの場合文字に対応している。このため、代表パターン自身の符号化データのデータ容量を別にすれば、符号化データのデータ容量は、理想的には画像中の各文字の識別コードと、それに対応する位置情報とを表わすのに必要なデータ量で済むことになる。   The pattern here corresponds to a character in many cases in encoding of a document image. For this reason, apart from the data capacity of the encoded data of the representative pattern itself, the data capacity of the encoded data ideally represents the identification code of each character in the image and the corresponding position information. The amount of data required will be sufficient.

また、この方法は、パターンマッチング方式を用いた文字認識技術において、標準パターンを入力画像から抽出したものと考えることもできる。   This method can also be considered as a standard pattern extracted from an input image in a character recognition technique using a pattern matching method.

この方法では、文字認識技術を用いた場合ほどは、認識誤りが問題にならない。なぜならば、この方法では、パターンが類似しているか否かを判断するだけでよく、文字認識のようにパターンが本当は「何」であるかを正確に判断する必要がないからである。また、パターンマッチング方式を用いた文字認識と比較した場合、標準パターンに相当するパターンを入力画像自身より抽出している。このため、入力画像内に特殊なフォントの文字が含まれていても、そのこと自体が符号化の障害になることはない。   In this method, recognition errors are not a problem as much as when character recognition technology is used. This is because, in this method, it is only necessary to determine whether or not the patterns are similar, and it is not necessary to accurately determine what the pattern is really like as in character recognition. When compared with character recognition using a pattern matching method, a pattern corresponding to a standard pattern is extracted from the input image itself. For this reason, even if a character of a special font is included in the input image, this does not hinder the encoding itself.

このように代表パターン等を符号化する方法は比較的優れた性質を持つ。それにも関わらず、広範に使われていないのが現状である。   As described above, the method of encoding the representative pattern has relatively excellent properties. Nevertheless, it is not widely used at present.

この原因として、符号化が難しいことが挙げられる。これは入力パターンの置換え誤り、すなわち、入力パターンを誤った代表パターンで置換えてしまう誤りを少なくするように制御することが難しいためである。   This is because encoding is difficult. This is because it is difficult to control so as to reduce an input pattern replacement error, that is, an error that replaces an input pattern with an incorrect representative pattern.

図46を参照して、入力パターンの置換え誤りの一例について説明する。図46(a)は、入力画像を示し、図46(b)は、入力画像を符号化し、復号化した後の画像である。図46(a)の入力画像には、「ス」と「ヌ」、「沢」と「択」および「ポ」と「ボ」というそれぞれ類似した3組のパターンが存在する。このような場合には、入力パターンの置換え誤りが生じ易く、図46(b)に示すように、「ス」、「択」および「ポ」がそれぞれ本来置換えられるべきではない「ヌ」、「沢」および「ボ」を表すパターンに置換えられてしまっている。これは、入力パターンのクラスタリングが不適切なために生じる。   An example of an input pattern replacement error will be described with reference to FIG. FIG. 46A shows an input image, and FIG. 46B shows an image after the input image is encoded and decoded. In the input image of FIG. 46 (a), there are three sets of similar patterns, “su” and “nu”, “sawa” and “choice”, and “po” and “bo”. In such a case, an input pattern replacement error is likely to occur, and as shown in FIG. 46B, “su”, “choice”, and “po” should not be replaced by “nu”, “ It has been replaced with a pattern representing “sawa” and “bo”. This occurs because the input pattern clustering is inappropriate.

図47〜図52を参照して、各入力パターン(文字)を2次元平面上の点として表現する。この図は入力パターンの入力画像上での位置を示しているのではなく、入力パターンの特徴を抽出し作成された特徴ベクトルのパターン空間(特徴ベクトル空間)上での位置を模式的に示している。なお、図47〜図52では、特徴ベクトルを2次元平面上の点として表現しているが、特徴量が3つ以上ある場合には、パターン空間は3以上の次元数を有する。   47 to 52, each input pattern (character) is expressed as a point on a two-dimensional plane. This figure does not show the position of the input pattern on the input image, but schematically shows the position of the feature vector created by extracting the features of the input pattern in the pattern space (feature vector space). Yes. 47 to 52, the feature vector is expressed as a point on a two-dimensional plane. However, when there are three or more feature amounts, the pattern space has three or more dimensions.

図47を参照して、2種類の文字を表わす入力パターンをそれぞれパターン102(「○」印)およびパターン104(「△」印)で表わす。   Referring to FIG. 47, input patterns representing two types of characters are represented by pattern 102 (“◯” mark) and pattern 104 (“Δ” mark), respectively.

ここでは、代表パターンは、入力パターンから選び出される。たとえば、パターン空間内でユークリッド距離が一定の範囲内にある入力パターンが1つのクラスに分類され、そのクラスを代表する代表パターンが選び出される。たとえば、図48を参照して、パターン102および104は3つの円112、114および116で表わされるクラスに分類され、3つのクラスを代表する代表パターンとして、パターン106、108および110がそれぞれ選び出される。なお、代表パターンの抽出方法は、ユークリッド距離に基づきクラスタリングする方法には限定されない。入力パターンの正しい置換えとは、各代表パターンがすべて同じ文字を表わす入力パターンから選び出されることを意味する。図48は、入力パターンの正しい置換えが行なわれる理想的なクラスタリングの例を示している。   Here, the representative pattern is selected from the input patterns. For example, input patterns whose Euclidean distance is within a certain range in the pattern space are classified into one class, and a representative pattern representing that class is selected. For example, referring to FIG. 48, patterns 102 and 104 are classified into classes represented by three circles 112, 114 and 116, and patterns 106, 108 and 110 are selected as representative patterns representing the three classes, respectively. It is. Note that the representative pattern extraction method is not limited to the clustering method based on the Euclidean distance. Correct replacement of input patterns means that each representative pattern is selected from input patterns representing the same character. FIG. 48 shows an example of ideal clustering in which correct replacement of input patterns is performed.

3つの円112、114および116は、それぞれパターン106、108および110を中心とし半径が一定の円である。円内のパターンは、符号化時に代表パターンで置換えられる。この時、同一種類の入力パターンが必ずしも1つの代表パターンで代表されるとは限らない。図48に示すようにパターン102は、2つの円112および114内に含まれる。このため、パターン102は2つのパターン106および108で代表される。   The three circles 112, 114, and 116 are circles having a constant radius centered on the patterns 106, 108, and 110, respectively. The pattern in the circle is replaced with the representative pattern at the time of encoding. At this time, the same type of input pattern is not necessarily represented by one representative pattern. As shown in FIG. 48, the pattern 102 is contained within two circles 112 and 114. For this reason, the pattern 102 is represented by two patterns 106 and 108.

円の直径、すなわち同一のクラスに属するとみなされる代表パターンと入力パターンとの間のユークリッド距離を大きくすると、図49のように、すべての入力パターンが円118に含まれ、1つのクラスにクラスタリングされてしまう。このため、異なる種類のパターン102および104が同一の代表パターン120で代表されてしまい、図46(b)に示したような入力パターンの置換え誤りが生じてしまう。   When the diameter of the circle, that is, the Euclidean distance between the representative pattern considered to belong to the same class and the input pattern is increased, all the input patterns are included in the circle 118 as shown in FIG. 49 and clustered into one class. Will be. For this reason, different types of patterns 102 and 104 are represented by the same representative pattern 120, and an input pattern replacement error as shown in FIG. 46B occurs.

上述のようにクラスタリングする際の円の直径を大きくすれば、入力パターンの置換え誤りが生じやすく、円の直径を小さくすれば、置換え誤りは生じにくくなる。このため、円の直径を小さくすれば良いように思われる。   As described above, if the diameter of the circle in clustering is increased, an input pattern replacement error is likely to occur, and if the circle diameter is decreased, a replacement error is less likely to occur. For this reason, it seems to be sufficient to reduce the diameter of the circle.

しかし、図50に示すように、円の直径を限りなく0に近づけると、置換え誤りは起こらないものの、入力パターンと代表パターンとが一対一に対応してしまう。このため、代表パターンを用いて入力パターンの符号化を行なったとしても、入力パターンそのものを符号化した場合と変わりはなく、データ量の削減にはつながらない。   However, as shown in FIG. 50, when the diameter of the circle is made as close to 0 as possible, the replacement pattern does not occur, but the input pattern and the representative pattern have a one-to-one correspondence. For this reason, even if the input pattern is encoded using the representative pattern, it is not different from the case where the input pattern itself is encoded, and the data amount is not reduced.

このように、データ量の削減と入力パターンの置換え誤りの減少とはトレードオフの関係にある。   Thus, there is a trade-off relationship between the reduction of the data amount and the reduction of the input pattern replacement error.

特開平8−30794号公報(特許文献1)には、以下に説明するような入力パターンから代表パターンを抽出する方法が開示されている。すなわち、入力パターンおよび代表パターン以外に登録パターンと呼ばれるパターンが用意される。始めに入力パターンの中から登録パターンが1つ選択され、登録パターンと入力パターンとが順次照合される。登録パターンが入力パターンと類似していれば、その登録パターンと入力パターンとの平均を求めることにより求められたパターン、または予め定められた基準に基づいて登録パターンまたは入力パターンの中から選択されたパターンが新たな登録パターンとされる。登録パターンに類似する入力パターンが同じクラスにクラスタリングされる。   Japanese Patent Laid-Open No. 8-30794 (Patent Document 1) discloses a method of extracting a representative pattern from an input pattern as described below. That is, a pattern called a registered pattern is prepared in addition to the input pattern and the representative pattern. First, one registered pattern is selected from the input patterns, and the registered pattern and the input pattern are sequentially verified. If the registered pattern is similar to the input pattern, the pattern obtained by calculating the average of the registered pattern and the input pattern, or selected from the registered pattern or the input pattern based on a predetermined criterion The pattern is a new registered pattern. Input patterns similar to registered patterns are clustered into the same class.

いずれの登録パターンにも類似しない入力パターンが発生した場合には、その入力パターンが新たな登録パターンとされ、同様の処理が行なわれる。このような処理が、入力パターンがいずれかのクラスにクラスタリングされるまで行なわれ、処理終了時点の登録パターンが代表パターンとされる。
特開平8−30794号公報 R.N.Ascher et al. "A Means for Achieving a High Degree of Compaction on Scan-Digitized Printed Text", IEEE Transactions on Computers, vol.c-23, No.11, November 1974
When an input pattern that is not similar to any registered pattern occurs, the input pattern is set as a new registered pattern, and the same processing is performed. Such a process is performed until the input pattern is clustered into any class, and the registered pattern at the end of the process is set as the representative pattern.
JP-A-8-30794 RNAscher et al. "A Means for Achieving a High Degree of Compaction on Scan-Digitized Printed Text", IEEE Transactions on Computers, vol.c-23, No. 11, November 1974

しかしながら、しかし、このような代表パターンの登録方法を用いたとしても、入力パターンのクラスタリング方法は、上記した方法と同様である。このため、データ量の削減と入力パターンの置換え誤りの減少とを両立させることが困難である。   However, even if such a representative pattern registration method is used, the input pattern clustering method is the same as the above-described method. For this reason, it is difficult to achieve both a reduction in data amount and a reduction in input pattern replacement error.

たとえば、図51を参照して、入力パターン201を登録パターンとして入力パターンの置換え誤りが生じないようにクラスタリングしようとすると、入力パターン202は同一のクラスに属するが、入力パターン203は別のクラスに属することになる。このため、代表パターンの数が増えてしまう。   For example, referring to FIG. 51, when an input pattern 201 is registered as a registered pattern and an attempt is made to perform clustering so that an input pattern replacement error does not occur, the input pattern 202 belongs to the same class, but the input pattern 203 belongs to another class. Will belong. For this reason, the number of representative patterns increases.

図52を参照して、逆に、パターン102を1つの代表パターンで表わそうとすると、パターン104の入力パターン204などが同一のクラスに属し、入力パターンの置換え誤りが生じてしまう。   Referring to FIG. 52, conversely, if pattern 102 is to be represented by one representative pattern, input pattern 204 of pattern 104 belongs to the same class, and an input pattern replacement error occurs.

また、日本語など、複数の連結成分からなる文字を多く含む言語の文書画像の処理には、特別な注意が必要となる。前掲の特開平8−30794号公報では、連結成分を入力パターンとしており、入力パターンが同一の文字から取出されたものであるか、異なる文字から取出されたものであるかは考慮されていない。そのため、復号画像上で、いわゆる分離文字を構成する複数の連結成分が、符号化時に、異なる文字から取出された代表パターンで置換えられることはあり得ることである。ところが、このような代表パターンのもととなった文字の書体が異なる場合など、復号画像上では著しい違和感を引き起こすことになる。たとえば、図53を参照して、明朝体で書かれた「体」の人偏(左側の部分)とゴシック体で書かれた「林」の旁(右側の部分)とをそれぞれ代表パターンとし、同一紙面上のゴシック体の「休」を符号化したとする。この場合、復号画像では、「休」は、偏部分が明朝体、旁部分がゴシック体の書体から取られたものとなり、違和感がはなはだしい。これを防ぐためには、従来、代表パターンが入力パターンを置換える条件を厳しくするしかなく、このことは上述のように代表パターンの数を増やし、符号化効率を低下させることになる。   In addition, special attention is required for processing a document image of a language including many characters composed of a plurality of connected components such as Japanese. In the above-mentioned Japanese Patent Application Laid-Open No. 8-30794, a connected component is used as an input pattern, and it is not considered whether the input pattern is extracted from the same character or from different characters. Therefore, it is possible that a plurality of connected components constituting so-called separation characters are replaced with representative patterns extracted from different characters at the time of encoding on the decoded image. However, when the typeface of the character that is the basis of such a representative pattern is different, a noticeable discomfort is caused on the decoded image. For example, referring to FIG. 53, the “body” prejudice (left part) written in the Mincho style and the “forest” fence (right part) written in Gothic are used as representative patterns, respectively. Suppose that a Gothic “rest” on the same sheet is encoded. In this case, in the decoded image, the “vacation” is taken from a typeface that has a partial portion in the Mincho style and a heel portion in the Gothic style, and is uncomfortable. In order to prevent this, conventionally, there is only a strict condition for the representative pattern to replace the input pattern. This increases the number of representative patterns as described above, and lowers the encoding efficiency.

本発明は、上述の課題を解決するためになされたもので、その目的は、符号化効率を高く保ちながら、符号化による入力パターンの置換え誤りを少なくした画像符号化装置を提供することである。   The present invention has been made to solve the above-described problems, and an object of the present invention is to provide an image encoding apparatus that reduces input pattern replacement errors due to encoding while maintaining high encoding efficiency. .

本発明の他の目的は、符号化効率を保ちながら、分離文字の符号化字の違和感を防止することである。   Another object of the present invention is to prevent a sense of incongruity between encoded characters of separated characters while maintaining encoding efficiency.

上記の課題を解決するために、この発明のある局面に従うと、画像符号化装置は、画像データより入力パターンを抽出するための入力パターン抽出手段と、入力パターン抽出手段によって抽出された入力パターン同士を、入力パターンを構成する部分ごとに比較し、相互に類似する入力パターンの中から代表パターンを抽出するための代表パターン抽出手段と、代表パターンの画像および入力パターンの座標位置を出力するための出力手段とを含む。   In order to solve the above-described problems, according to one aspect of the present invention, an image encoding device includes an input pattern extraction unit for extracting an input pattern from image data, and input patterns extracted by the input pattern extraction unit. For each part constituting the input pattern, and representative pattern extraction means for extracting the representative pattern from among the input patterns similar to each other, and for outputting the image of the representative pattern and the coordinate position of the input pattern Output means.

上記の構成を有する画像符号化装置によると、入力パターンを部分的に比較することにより、全体的に見れば類似しているが、部分的に見れば類似していない文字を峻別することができる。このため、入力パターンの置換え誤りを減少させることができる。   According to the image coding apparatus having the above-described configuration, by comparing input patterns partially, it is possible to distinguish characters that are similar on the whole but not similar on a partial basis. . For this reason, the replacement error of the input pattern can be reduced.

この発明の他の局面に従うと、画像符号化装置は、画像データより入力パターンを抽出するための入力パターン抽出手段と、入力パターン抽出手段によって抽出された入力パターンの各々について、当該入力パターンに類似する入力パターンに類似する入力パターンを、当該入力パターンに類似する入力パターンとするための類似拡大手段と、類似拡大手段によって相互に類似すると判断された入力パターンの中から代表パターンを抽出するための代表パターン抽出手段と、代表パターンの画像および入力パターンの座標位置を出力するための出力手段とを含む。   According to another aspect of the present invention, an image encoding device is similar to an input pattern extraction unit for extracting an input pattern from image data and the input pattern extracted by the input pattern extraction unit. A similar enlarging means for making an input pattern similar to the input pattern to be an input pattern similar to the input pattern, and a representative pattern to be extracted from the input patterns determined to be similar to each other by the similar enlarging means Representative pattern extraction means, and output means for outputting the representative pattern image and the input pattern coordinate position.

上記の構成を有する画像符号化装置によると、入力パターンの類似範囲を連鎖的に拡大することにより、入力パターンを表わす代表パターンの個数を減少させることができる。このため、符号化効率を高く保つことができる。   According to the image coding apparatus having the above-described configuration, the number of representative patterns representing an input pattern can be reduced by expanding the similarity range of input patterns in a chain. For this reason, encoding efficiency can be kept high.

この発明の他の局面に従うと、画像符号化方法は、画像データより入力パターンを抽出するステップと、抽出された入力パターン同士を、入力パターンを構成する部分ごとに比較し、相互に類似する入力パターンの中から代表パターンを抽出するステップと、代表パターンの画像および入力パターンの座標位置を出力するステップとを含む。   According to another aspect of the present invention, an image encoding method includes a step of extracting an input pattern from image data, and the extracted input patterns are compared with each other constituting the input pattern, and inputs similar to each other. A step of extracting a representative pattern from the pattern, and a step of outputting the image of the representative pattern and the coordinate position of the input pattern.

上記の構成を有する画像符号化方法によると、入力パターンを部分的に比較することにより、全体的に見れば類似しているが、部分的に見れば類似していない文字を峻別することができる。このため、入力パターンの置換え誤りを減少させることができる。   According to the image coding method having the above-described configuration, by comparing input patterns partially, it is possible to distinguish characters that are similar on the whole but not similar on a partial basis. . For this reason, the replacement error of the input pattern can be reduced.

この発明の他の局面に従うと、画像符号化方法は、画像データより入力パターンを抽出するステップと、抽出された入力パターン同士を比較し、入力パターンの各々について、当該入力パターンに類似する入力パターンに類似する入力パターンを、当該入力パターンに類似する入力パターンとするステップと、相互に類似する入力パターンの中から、代表パターンを抽出するステップと、代表パターンの画像および入力パターンの座標位置を出力するステップとを含む。   According to another aspect of the present invention, an image encoding method compares an extracted input pattern with a step of extracting an input pattern from image data, and an input pattern similar to the input pattern for each of the input patterns. The input pattern similar to the input pattern is set to the input pattern similar to the input pattern, the representative pattern is extracted from the input patterns similar to each other, and the image of the representative pattern and the coordinate position of the input pattern are output. Including the step of.

この発明の他の局面に従うと、画像復号方法は、上記の画像符号化方法で符号化されたデータより、画像を復号する。この画像復号方法は、符号化されたデータより代表パターンの画像および入力パターンの座標位置を抽出するステップと、入力パターンの座標位置に当該入力パターンを代表する代表パターンを貼付けるステップとを含む。   According to another aspect of the present invention, an image decoding method decodes an image from data encoded by the above image encoding method. The image decoding method includes a step of extracting a representative pattern image and an input pattern coordinate position from encoded data, and a step of pasting a representative pattern representing the input pattern to the input pattern coordinate position.

上記の構成を有する画像復号方法によると、入力パターンの座標位置に代表パターンを順次貼付けるだけで画像が作成できる。このため、高速に画像を復元することができる。   According to the image decoding method having the above configuration, an image can be created simply by sequentially pasting the representative pattern to the coordinate position of the input pattern. For this reason, an image can be restored at high speed.

この発明の他の局面に従うと、記録媒体は、コンピュータで実行可能な画像符号化方法のプログラムを記録したコンピュータ読取可能な記録媒体である。画像符号化方法は、画像データより入力パターンを抽出するステップと、抽出された入力パターン同士を、入力パターンを構成する部分ごとに比較し、相互に類似する入力パターンの中から代表パターンを抽出するステップと、代表パターンの画像および入力パターンの座標位置を出力するステップとを含む。   According to another aspect of the present invention, the recording medium is a computer-readable recording medium that records a computer-executable image encoding method program. In the image encoding method, the step of extracting an input pattern from image data, the extracted input patterns are compared for each part constituting the input pattern, and a representative pattern is extracted from mutually similar input patterns. And a step of outputting an image of the representative pattern and a coordinate position of the input pattern.

上記の記録媒体により、コンピュータは、入力パターンを部分的に比較することにより、全体的に見れば類似しているが、部分的に見れば類似していない文字を峻別することができる。このため、入力パターンの置換え誤りを減少させることができる。   With the above recording medium, the computer can distinguish characters that are similar in overall view but not similar in partial view by partially comparing the input patterns. For this reason, the replacement error of the input pattern can be reduced.

この発明の他の局面に従うと、記録媒体は、コンピュータで実行可能な画像符号化方法のプログラムを記録したコンピュータ読取可能な記録媒体である。画像符号化方法は、画像データより入力パターンを抽出するステップと、抽出された入力パターン同士を比較し、入力パターンの各々について、当該入力パターンに類似する入力パターンに類似する入力パターンを、当該入力パターンに類似する入力パターンとするステップと、相互に類似する入力パターンの中から、代表パターンを抽出するステップと、代表パターンの画像および入力パターンの座標位置を出力するステップとを含む。   According to another aspect of the present invention, the recording medium is a computer-readable recording medium that records a computer-executable image encoding method program. In the image encoding method, an input pattern is extracted from image data, and the extracted input patterns are compared with each other. For each input pattern, an input pattern similar to the input pattern is input to the input pattern. An input pattern similar to the pattern is included, a representative pattern is extracted from among the input patterns similar to each other, and an image of the representative pattern and a coordinate position of the input pattern are output.

この発明のさらに他の局面に従うと、記録媒体は、コンピュータで実行可能な画像復号方法のプログラムを記録したコンピュータ読取可能な記録媒体である。画像復号方法は、上記の画像符号化方法で符号化されたデータより、画像を復号する方法である。この画像復号方法は、符号化されたデータより代表パターンの画像および入力パターンの座標位置を抽出するステップと、入力パターンの座標位置に当該入力パターンを代表する代表パターンを貼付けるステップとを含む。   According to still another aspect of the present invention, the recording medium is a computer-readable recording medium that records a computer-executable image decoding method program. The image decoding method is a method of decoding an image from the data encoded by the above image encoding method. The image decoding method includes a step of extracting a representative pattern image and an input pattern coordinate position from encoded data, and a step of pasting a representative pattern representing the input pattern to the input pattern coordinate position.

上記の記録媒体によると、コンピュータは、入力パターンの座標位置に代表パターンを順次貼付けるだけで画像が作成できる。このため、高速に画像を復元することができる。   According to the above recording medium, the computer can create an image simply by sequentially pasting the representative pattern to the coordinate position of the input pattern. For this reason, an image can be restored at high speed.

入力パターンを部分的に比較することにより、全体的に見れば類似しているが、部分的に見れば類似していない文字を峻別することができる。このため、入力パターンの置換え誤りを減少させることができる。   By comparing the input patterns partially, it is possible to distinguish characters that are similar in whole but not similar in partial. For this reason, the replacement error of the input pattern can be reduced.

また、ループの個数を検出することにより、部分的に見ても類似しているが、異なる文字を正確に峻別することができる。このため、入力パターンの置換え誤りを減少させることができる。   Also, by detecting the number of loops, although partially similar, it is possible to accurately distinguish different characters. For this reason, the replacement error of the input pattern can be reduced.

さらに、入力パターンの類似範囲を連鎖的に拡大することにより、入力パターンを表わす代表パターンの個数を減少させることができる。このため、符号化効率を高く保つことができる。   Furthermore, the number of representative patterns representing an input pattern can be reduced by chaining the similarity range of the input pattern. For this reason, encoding efficiency can be kept high.

さらにまた、代表パターンとして画像データより切出された文字を使用している。このため、入力パターンを文字認識して文字のコードで代表パターンを表わす場合のように、文字認識による入力パターンの置換え誤りが発生しない。   Furthermore, characters cut out from the image data are used as the representative pattern. Therefore, the input pattern replacement error due to character recognition does not occur as in the case where the input pattern is recognized and the representative pattern is represented by the character code.

画像復号時には、入力パターンの座標位置に代表パターンを順次貼付けるだけで画像が作成できる。このため、高速に画像を復元することができる。   At the time of image decoding, an image can be created by simply pasting the representative pattern to the coordinate position of the input pattern. For this reason, an image can be restored at high speed.

以下、図面を参照しつつ、本発明の実施の形態について説明する。以下の説明では、同一の部品には同一の符号を付してある。それらの名称および機能も同じである。したがって、それらについての詳細な説明は繰り返さない。   Hereinafter, embodiments of the present invention will be described with reference to the drawings. In the following description, the same parts are denoted by the same reference numerals. Their names and functions are also the same. Therefore, detailed description thereof will not be repeated.

図1を参照して、本発明の実施の形態に係る画像符号化装置は、紙面をスキャンして画像を取込むスキャナ303と、スキャナ303に接続され、スキャナ303に順次紙面を自動給紙するオートフィーダ301と、オートフィーダ301に接続され、スキャナ303に給紙している紙面のページ数をカウントするカウンタ302と、スキャナ303に接続され、スキャナ303で取込まれた画像を記憶する画像データバッファ304とを含む。   Referring to FIG. 1, an image encoding apparatus according to an embodiment of the present invention is connected to scanner 303 that scans a paper surface and captures an image, and automatically feeds the paper surface sequentially to scanner 303. An auto feeder 301, a counter 302 that is connected to the auto feeder 301 and counts the number of pages of paper fed to the scanner 303, and image data that is connected to the scanner 303 and stores an image captured by the scanner 303 Buffer 304.

画像符号化装置は、さらに、画像データバッファ304に接続され、各ページごとに2値化しきい値を算出する2値化しきい値算出器307と、2値化しきい値算出器307に接続され、ページごとに2値化しきい値を1次元配列として記憶する2値化しきい値バッファ308と、画像データバッファ304および2値化しきい値バッファ308に接続され、画像より入力パターンを抽出する入力パターン抽出器305とを含む。   The image encoding device is further connected to an image data buffer 304 and connected to a binarization threshold value calculator 307 for calculating a binarization threshold value for each page, and a binarization threshold value calculator 307. Input pattern extraction for extracting an input pattern from an image, connected to a binarization threshold buffer 308 that stores a binarization threshold as a one-dimensional array for each page, and an image data buffer 304 and a binarization threshold buffer 308 305.

画像符号化装置は、さらに、入力パターン抽出器305に接続され、現在処理中の画像のページ数をカウントするページカウンタ306と、入力パターンの画像を格納する入力パターン画像バッファ309と、入力パターン抽出器305に接続され、入力パターンの横幅および縦幅を格納する入力パターン情報バッファ310と、入力パターン画像バッファ309および入力パターン情報バッファ310に接続され、入力パターンを代表する代表パターンを抽出する代表パターン抽出器311とを含む。   The image encoding apparatus is further connected to an input pattern extractor 305, and a page counter 306 that counts the number of pages of an image currently being processed, an input pattern image buffer 309 that stores an image of the input pattern, and an input pattern extraction An input pattern information buffer 310 for storing the horizontal and vertical widths of the input pattern, and a representative pattern for extracting a representative pattern representative of the input pattern, connected to the input pattern image buffer 309 and the input pattern information buffer 310. And an extractor 311.

画像符号化装置は、さらに、代表パターン抽出器311、入力パターン画像バッファ309および入力パターン情報バッファ310に接続され、代表パターンと入力パターンとを対応付けるための整数配列を格納する代表パターンラベルバッファ312と、代表パターン抽出器311および代表パターンラベルバッファ312に接続され、代表パターンの画像を格納する代表パターン画像バッファ313と、代表パターン抽出器311に接続され、代表パターンの横幅および縦幅を格納する代表パターン情報バッファ314とを含む。   The image coding apparatus is further connected to a representative pattern extractor 311, an input pattern image buffer 309, and an input pattern information buffer 310, and a representative pattern label buffer 312 that stores an integer array for associating the representative pattern with the input pattern The representative pattern image buffer 313 that is connected to the representative pattern extractor 311 and the representative pattern label buffer 312 and stores the image of the representative pattern, and the representative that is connected to the representative pattern extractor 311 and stores the horizontal width and the vertical width of the representative pattern. Pattern information buffer 314.

画像符号化装置は、さらに、代表パターン情報バッファ314に接続され、代表パターンを圧縮する代表パターン情報圧縮器315と、代表パターン画像バッファ313に接続され、代表パターン画像バッファ313に格納された代表パターンの画像を減色する代表パターン画像減色器316と、入力パターン情報バッファ310および代表パターンラベルバッファ312に接続され、カウンタ302に格納されているページ数の情報、入力パターン情報バッファ310に格納された情報および代表パターンラベルバッファ312に格納された情報を、混合および圧縮する入力パターン情報圧縮器317とを含む。   The image encoding apparatus is further connected to the representative pattern information buffer 314, and the representative pattern information compressor 315 for compressing the representative pattern and the representative pattern image buffer 313 are connected to the representative pattern image buffer 313 and stored in the representative pattern image buffer 313. Connected to a representative pattern image color reducer 316 that reduces the color of the image, an input pattern information buffer 310 and a representative pattern label buffer 312, information on the number of pages stored in the counter 302, and information stored in the input pattern information buffer 310 And an input pattern information compressor 317 for mixing and compressing information stored in the representative pattern label buffer 312.

画像符号化装置は、さらに、代表パターン情報圧縮器315および入力パターン情報圧縮器317に接続され、代表パターンの情報、代表パターンの画像および入力パターンの情報の圧縮データを1つの符号化データに連結するデータ混合器319と、代表パターン画像減色器316およびデータ混合器319に接続され、代表パターン画像減色器316に接続され、代表パターン画像減色器316で減色された代表パターンを圧縮する代表パターン画像圧縮器318と、データ混合器319に接続され、文書画像を符号化したデータを格納する符号化データバッファ320とを含む。   The image encoding apparatus is further connected to the representative pattern information compressor 315 and the input pattern information compressor 317, and connects the representative pattern information, the representative pattern image, and the compressed data of the input pattern information to one encoded data. A representative pattern image that is connected to the representative pattern image color reducer 316 and connected to the representative pattern image color reducer 316 and compresses the representative pattern reduced by the representative pattern image color reducer 316. A compressor 318 and an encoded data buffer 320 connected to the data mixer 319 and storing data obtained by encoding the document image are included.

図2を参照して、入力パターン抽出器305は、画像データバッファ304に接続され、画像データバッファ304に格納された画像から文字要素を抽出する文字要素抽出部701と、文字要素抽出部701に接続され、文字要素抽出部701で抽出された文字要素を格納する文字要素バッファ702と、文字要素バッファ702に接続され、画像内の文字列の方向を判定する文字列方向判定部703と、文字列方向判定部703に接続され、文字列の方向を格納する文字列方向情報フラグ713とを含む。   Referring to FIG. 2, input pattern extractor 305 is connected to image data buffer 304, and includes a character element extraction unit 701 that extracts character elements from an image stored in image data buffer 304, and character element extraction unit 701. A character element buffer 702 that stores the character elements extracted by the character element extraction unit 701, a character string direction determination unit 703 that is connected to the character element buffer 702 and determines the direction of the character string in the image, and a character It includes a character string direction information flag 713 that is connected to the column direction determination unit 703 and stores the direction of the character string.

入力パターン抽出器305は、さらに、文字要素バッファ702および文字列方向情報フラグ713に接続され、画像中より文字列を抽出する文字列抽出部705と、文字列抽出部705に接続され、抽出された文字列の番号と文字要素とが1対1に対応付けられた整数配列を記憶する文字列情報バッファ706と、文字要素バッファ702、文字列抽出部705および文字列情報バッファ706に接続され、文字列を文字の候補に分割する個別文字抽出部707とを含む。   The input pattern extractor 305 is further connected to the character element buffer 702 and the character string direction information flag 713, and is connected to the character string extraction unit 705 for extracting a character string from the image and the character string extraction unit 705 for extraction. Connected to a character string information buffer 706 that stores an integer array in which character string numbers and character elements are associated one-to-one, a character element buffer 702, a character string extraction unit 705, and a character string information buffer 706, And an individual character extraction unit 707 that divides the character string into character candidates.

入力パターン抽出器305は、さらに、個別文字抽出部707に接続され、文字の候補の外接矩形の座標を格納する個別文字情報バッファ708と、文字列の数をカウントする文字列カウンタ709と、文字の数をカウントする文字カウンタ710と、ある文字列内の文字の数をカウントする文字列内文字カウンタ711と、2値化しきい値バッファ308、個別文字抽出部707、文字列カウンタ709、文字カウンタ710、個別文字情報バッファ708、文字列内文字カウンタ711、2値化しきい値バッファ308および2値化しきい値算出器307に接続され、文字標準パターン712と文字列より抽出された文字との比較を行なう文字マッチング部704とを含む。   The input pattern extractor 305 is further connected to the individual character extraction unit 707, and includes an individual character information buffer 708 for storing coordinates of circumscribed rectangles of character candidates, a character string counter 709 for counting the number of character strings, and a character Counter 710 that counts the number of characters, character counter 711 that counts the number of characters in a certain character string, binarization threshold buffer 308, individual character extraction unit 707, character string counter 709, character counter 710, connected to the individual character information buffer 708, the character counter in character string 711, the binarization threshold buffer 308 and the binarization threshold calculator 307, and compares the character standard pattern 712 and the character extracted from the character string And a character matching unit 704 that performs.

図3を参照して、代表パターン抽出器311は、入力パターンに対応する画像に含まれる輪形状をした部分(ループ)の数を検出するループ検出器1001と、ループの数を記憶するループ数バッファ1002と、入力パターンの数をカウントする第1カウンタ1003と、入力パターンの数をカウントする第2カウンタ1004と、入力パターン同士を比較するパターン比較器1005と、ループ検出器1001、ループ数バッファ1002、第1カウンタ1003、第2カウンタ1004およびパターン比較器1005に接続され、接続された機器を制御するコントローラ1000とを含む。   Referring to FIG. 3, representative pattern extractor 311 includes a loop detector 1001 that detects the number of loop-shaped portions (loops) included in the image corresponding to the input pattern, and the number of loops that stores the number of loops. A buffer 1002, a first counter 1003 that counts the number of input patterns, a second counter 1004 that counts the number of input patterns, a pattern comparator 1005 that compares input patterns with each other, a loop detector 1001, and a loop number buffer 1002, a first counter 1003, a second counter 1004, and a pattern comparator 1005, and a controller 1000 that controls the connected devices.

図4を参照して、ループ検出器1001は、現在処理中の入力パターンの番号を示す第1カウンタ1301と、入力パターンに含まれる連結成分の外接矩形を抽出する連結成分外接矩形抽出器1302と、連結成分の外接矩形の座標などを記憶する連結成分外接矩形情報バッファ1303と、連結成分の数をカウントする第2カウンタ1304と、第1カウンタ1301、連結成分外接矩形抽出器1302、連結成分外接矩形情報バッファ1303および第2カウンタ1304に接続され、接続された機器を制御するコントローラ1300とを含む。   Referring to FIG. 4, a loop detector 1001 includes a first counter 1301 indicating the number of an input pattern currently being processed, a connected component circumscribed rectangle extractor 1302 that extracts a circumscribed rectangle of a connected component included in the input pattern, and A connected component circumscribed rectangle information buffer 1303 for storing the coordinates of the circumscribed rectangle of the connected component, a second counter 1304 for counting the number of connected components, a first counter 1301, a connected component circumscribed rectangle extractor 1302, a connected component circumscribed A controller 1300 is connected to the rectangular information buffer 1303 and the second counter 1304, and controls the connected devices.

図5を参照して、パターン比較器1005は、入力パターンより特徴量を抽出し、特徴ベクトルに変換するベクトル変換器1601と、特徴ベクトルの正規化を行なうベクトル正規化器1602と、特徴ベクトルの正準化を行なうベクトル正準化器1603と、特徴ベクトルの内積計算を行なう内積計算器1604と、部分ベクトルの数をカウントするカウンタ1605と、特徴ベクトルより部分ベクトルを作成する部分ベクトル作成器1606と、ベクトル変換器1601、ベクトル正規化器1602、ベクトル正準化器1603、内積計算器1604、カウンタ1605および部分ベクトル作成器1606に接続され、接続された機器を制御するコントローラ1600とを含む。   Referring to FIG. 5, a pattern comparator 1005 extracts a feature amount from an input pattern and converts it into a feature vector, a vector normalizer 1602 that normalizes the feature vector, a feature vector A vector canonicalizer 1603 that performs canonicalization, an inner product calculator 1604 that performs inner product calculation of feature vectors, a counter 1605 that counts the number of partial vectors, and a partial vector generator 1606 that generates partial vectors from feature vectors And a controller 1600 connected to the vector converter 1601, the vector normalizer 1602, the vector canonicalizer 1603, the inner product calculator 1604, the counter 1605, and the partial vector generator 1606 and controlling the connected devices.

画像符号化装置では、複数枚の紙面をオートフィーダ付きスキャナで入力することを想定しているが、本発明がこれに限られるものでない。   In the image encoding apparatus, it is assumed that a plurality of sheets are input by a scanner with an auto feeder, but the present invention is not limited to this.

図6を参照して、画像符号化装置で作成された符号化データを画像に復号する画像復号装置は、符号化されたデータを格納する符号化データバッファ2201と、符号化データバッファ2201に接続され、符号化されたデータを代表パターン情報、代表パターン画像および入力パターン情報に分離するデータ分離器2202と、データ分離器2202に接続され、代表パターン情報を伸張する代表パターン情報伸長器2203とを含む。   Referring to FIG. 6, an image decoding apparatus that decodes encoded data created by the image encoding apparatus into an image is connected to encoded data buffer 2201 that stores the encoded data, and encoded data buffer 2201. A data separator 2202 that separates the encoded data into representative pattern information, representative pattern image, and input pattern information; and a representative pattern information decompressor 2203 that is connected to the data separator 2202 and decompresses the representative pattern information. Including.

画像復号装置は、さらに、代表パターン情報伸長器2203に接続され、伸張された代表パターン情報を格納する代表パターン情報バッファ2206と、データ分離器2202に接続され、代表パターン画像を伸張する代表パターン画像伸長器2204と、代表パターン画像伸長器2204に接続され、伸張された代表パターン画像を格納する代表パターン画像バッファ2207と、データ分離器2202に接続され、圧縮された入力パターン情報を格納する入力パターン圧縮情報バッファ2205と、画素値を変換するためのテーブルが格納されている画素値変換テーブル2209とを含む。   The image decoding apparatus is further connected to a representative pattern information decompressor 2203 and is connected to a representative pattern information buffer 2206 for storing the decompressed representative pattern information and a data separator 2202, and a representative pattern image for decompressing the representative pattern image. Connected to the decompressor 2204, the representative pattern image decompressor 2204, and the representative pattern image buffer 2207 for storing the decompressed representative pattern image, and the input pattern connected to the data separator 2202 for storing the compressed input pattern information It includes a compression information buffer 2205 and a pixel value conversion table 2209 in which a table for converting pixel values is stored.

画像復号装置は、さらに、代表パターン画像バッファ2207および画素値変換テーブル2209に接続され、代表パターンの画素値を変換する代表パターン画素値変換器2208と、代表パターン情報バッファ2206に接続され、代表パターン情報バッファ2206に格納されたデータより、代表パターンの画像の代表パターン画像バッファ2207での記憶位置を生成する代表パターン画像オフセット生成器2210と、代表パターン画像オフセット生成器2210に接続され、代表パターンの番号とオフセット値とが対応付けられた整数配列を格納する代表パターン画像オフセットテーブル2211とを含む。   The image decoding apparatus is further connected to the representative pattern image buffer 2207 and the pixel value conversion table 2209, and is connected to the representative pattern pixel value converter 2208 for converting the pixel value of the representative pattern and the representative pattern information buffer 2206, and the representative pattern. Based on the data stored in the information buffer 2206, the representative pattern image offset generator 2210 for generating the storage position of the representative pattern image in the representative pattern image buffer 2207, and the representative pattern image offset generator 2210 are connected. A representative pattern image offset table 2211 that stores an integer array in which numbers and offset values are associated with each other.

画像復号装置は、さらに、入力パターン圧縮情報バッファ2205に接続され、各ページデータの入力パターン圧縮情報バッファ2205中での位置を表わすオフセットを生成する入力パターン情報オフセット生成器2212と、入力パターン情報オフセット生成器2212に接続され、ページ番号とオフセットとが対応付けられた整数配列を記憶する入力パターン情報オフセットテーブル2213と、ページの数をカウントするページカウンタ2214と、入力パターン圧縮情報バッファ2205に接続され、入力パターン情報を伸張する入力パターン情報伸長器2217とを含む。   The image decoding apparatus is further connected to an input pattern compression information buffer 2205, and an input pattern information offset generator 2212 that generates an offset representing the position of each page data in the input pattern compression information buffer 2205, and an input pattern information offset Connected to the generator 2212, connected to the input pattern information offset table 2213 for storing an integer array in which page numbers and offsets are associated, a page counter 2214 for counting the number of pages, and an input pattern compression information buffer 2205. And an input pattern information decompressor 2217 for decompressing the input pattern information.

画像復号装置は、さらに、入力パターン情報伸長器2217に接続され、入力パターン情報を格納する入力パターン情報バッファ2218と、入力パターンの数をカウントする入力パターンカウンタ2219と、ページごとに画像を格納するページ画像バッファ2215と、ページ画像バッファ2215に接続され、ページ画像バッファ2215に格納される画像の画素値を初期化するページ画像バッファ初期化器2216とを含む。   The image decoding apparatus is further connected to an input pattern information decompressor 2217, stores an input pattern information buffer 2218 for storing input pattern information, an input pattern counter 2219 for counting the number of input patterns, and stores an image for each page. A page image buffer 2215 and a page image buffer initializer 2216 that is connected to the page image buffer 2215 and initializes pixel values of an image stored in the page image buffer 2215 are included.

画像復号装置は、さらに、ページ画像バッファ2215に接続され、ページ画像バッファ2215に格納された画像を表示する表示装置2221と、代表パターン画像オフセットテーブル2211、入力パターン情報バッファ2218、入力パターンカウンタ2219、ページ画像バッファ2215、代表パターン画像バッファ2207、代表パターン画素値変換器2208、画素値変換テーブル2209および入力パターン情報オフセットテーブル2213に接続され、代表パターンのサイズを入力パターンのサイズと等しくする画素密度変換器2220とを含む。   The image decoding apparatus is further connected to a page image buffer 2215, and displays a display device 2221 that displays an image stored in the page image buffer 2215, a representative pattern image offset table 2211, an input pattern information buffer 2218, an input pattern counter 2219, Pixel density conversion that is connected to the page image buffer 2215, the representative pattern image buffer 2207, the representative pattern pixel value converter 2208, the pixel value conversion table 2209, and the input pattern information offset table 2213, and makes the size of the representative pattern equal to the size of the input pattern Instrument 2220.

図7を参照して、画像符号化処理について詳細に説明する。以下、文書の各紙面を指し示すのに、「ページ」という表現を用いる。また、配列の要素番号またはページ数は、特に断りがない限り0から始まるものとする。さらに、ループ変数i,jおよびkを異なる部分の動作の説明に繰り返し用いるが、動作が異なれば、特に記述がない限り相互に無関係である。   The image encoding process will be described in detail with reference to FIG. Hereinafter, the expression “page” is used to indicate each page of the document. The element number or page number of the array starts from 0 unless otherwise specified. Furthermore, the loop variables i, j, and k are repeatedly used to describe the operation of different parts, but the operations are irrelevant unless otherwise specified.

オートフィーダ301はカウンタ302を0にクリアする(ステップS(以下、「ステップ」を省略する。)401)。カウンタの値をiとすると、スキャナ303はi番目のページをスキャンして、取込まれた画像を画像データバッファ304に格納する(S402)。画像データバッファ304に格納されるデータの一例を図8に示す。   The auto feeder 301 clears the counter 302 to 0 (step S (hereinafter, “step” is omitted) 401). When the counter value is i, the scanner 303 scans the i-th page and stores the captured image in the image data buffer 304 (S402). An example of data stored in the image data buffer 304 is shown in FIG.

画像データバッファ304に格納される画像は1ピクセルが1バイトで表現された256階調の濃淡画像とする。オートフィーダ301はカウンタ302を1だけインクリメントする(S403)、カウンタ302の値がページ数と等しくなければ(S404でNO)、スキャンされていないページ(i番目のページ)が存在することを意味するので、S402以降の処理を繰り返す。   The image stored in the image data buffer 304 is a grayscale image with 256 gradations in which one pixel is represented by one byte. The auto feeder 301 increments the counter 302 by 1 (S403). If the value of the counter 302 is not equal to the number of pages (NO in S404), it means that there is an unscanned page (i-th page). Therefore, the process after S402 is repeated.

カウンタ302の値がページ数と等しくなると(S404でYES)、入力パターン抽出器305はページカウンタ306を0にクリアする(S405)。2値化しきい値算出器307は、ページカウンタ306が指し示すページの画像を画像データバッファ304から取り出し、最適な2値しきい値を算出し、2値化しきい値バッファ308に格納する(S406)。2値化しきい値は、後述する入力パターンの抽出処理に用いられる。2値化しきい値算出器307は、各ページ画像毎に、文字領域と背景領域の間の分散(いわゆる群間分散)が最大になるように2値化しきい値を定める。群間分散を用いた2値化しきい値算出方法については、例えば、長尾「画像認識論」(コロナ社、1983年)43ページに詳しく開示されている。なお、2値化しきい値の算出方法はこれに限られるものではない。2値化しきい値が入力パターンの抽出処理に必要なければ、S406は省略しても良い。   When the value of the counter 302 becomes equal to the number of pages (YES in S404), the input pattern extractor 305 clears the page counter 306 to 0 (S405). The binarization threshold value calculator 307 takes out the image of the page pointed to by the page counter 306 from the image data buffer 304, calculates the optimum binary threshold value, and stores it in the binarization threshold value buffer 308 (S406). . The binarized threshold value is used for input pattern extraction processing described later. The binarization threshold value calculator 307 determines the binarization threshold value so that the variance between the character area and the background area (so-called intergroup variance) is maximized for each page image. The binarization threshold value calculation method using intergroup variance is disclosed in detail, for example, on page 43 of Nagao “Image Recognition Theory” (Corona, 1983). Note that the binarization threshold value calculation method is not limited to this. If the binarized threshold value is not necessary for the input pattern extraction process, S406 may be omitted.

2値化しきい値バッファ308は、各ページに1対1対応する配列からなっており、ページごとに最適な2値化しきい値を格納している。ここでは2値化しきい値より小さな画素値を持つ画素を非背景画素、すなわち着目画素とする。2値化しきい値バッファ308に記憶された配列THのi番目の要素をTH[i]とすれば、i番目のページに含まれる着目画素は、式(1)を満たす画素である。
0≦画素値<TH[i]…(1)
ここでは、画像データバッファ304に格納されている画像を256階調の濃淡画像としているが、それ以外の場合についての処理方法について付言しておく。入力画像がカラーの場合には、たとえば輝度成分のみについて2値化しきい値を算出する。
The binarization threshold buffer 308 has an array corresponding to each page on a one-to-one basis, and stores an optimum binarization threshold for each page. Here, a pixel having a pixel value smaller than the binarization threshold is set as a non-background pixel, that is, a target pixel. If the i-th element of the array TH stored in the binarization threshold buffer 308 is TH [i], the pixel of interest included in the i-th page is a pixel that satisfies Expression (1).
0 ≦ pixel value <TH [i] (1)
Here, the image stored in the image data buffer 304 is a grayscale image having 256 gradations, but a processing method in other cases will be additionally described. When the input image is color, for example, a binarization threshold value is calculated only for the luminance component.

また、入力画像が2値画像の場合には、しきい値処理を行なわなくても非背景画素と背景画素の区別は自明であるから、S406は省略可能である。   If the input image is a binary image, the distinction between non-background pixels and background pixels is self-evident even if threshold processing is not performed, and therefore S406 can be omitted.

入力パターン抽出器305は、式(1)に基づいて、ページカウンタ306が示すページの画像の2値化処理を行なう。その後、2値画像より入力パターンの抽出を行なう(S407)。ここでいう入力パターンとは、紙面内に類似したものが多数存在すると考えられる小領域を指す。   The input pattern extractor 305 performs binarization processing of the page image indicated by the page counter 306 based on the equation (1). Thereafter, an input pattern is extracted from the binary image (S407). Here, the input pattern refers to a small area that is considered to have many similar patterns in the paper.

図9を参照して、入力画像の一部分を拡大したところ、「あかい川」と、文字ではないが文字とほぼ類似した大きさを持つ人の顔に似た図形が存在しているものとする。この部分から黒画素(文字領域画素)の連結成分を求め、入力パターンを抽出すると、図10のようになる。すなわち、文字列「あかい川」およびそれに続く図形より、12個の入力パターンが得られる。   Referring to FIG. 9, when a part of the input image is enlarged, it is assumed that “Akai River” and a figure that is not a character but resembles a human face having a size almost similar to the character exists. . When a connected component of black pixels (character area pixels) is obtained from this portion and an input pattern is extracted, it is as shown in FIG. That is, twelve input patterns are obtained from the character string “Akaigawa” and the following graphic.

同じ部分より文字を切出し、入力パターンを求めると図11のようになる。すなわち、文字列「あかい川」およびそれに続く図形より5個の入力パターンが得られる。以下の説明では、図11に示すように、文字を入力パターンとして説明するが、文字に限られるものではない。   When characters are cut out from the same part and an input pattern is obtained, it is as shown in FIG. That is, five input patterns are obtained from the character string “Akaigawa” and the graphic following it. In the following description, as shown in FIG. 11, a character is described as an input pattern, but is not limited to a character.

入力パターン抽出器305はページカウンタ306を1つインクリメントする(S408)。ページカウンタ306の指し示す値がページ数と一致していなければ(S409でNO)、すべてのページについて入力パターンを抽出するまでS406以降の処理を繰返す。   The input pattern extractor 305 increments the page counter 306 by 1 (S408). If the value indicated by the page counter 306 does not match the number of pages (NO in S409), the processes in and after S406 are repeated until input patterns are extracted for all pages.

ページカウンタ306の指し示す値がページ数と一致していれば(S409でYES)、代表パターン抽出器311が、入力パターン画像バッファ309および入力パターン情報バッファ310を参照して、代表パターンを抽出し、その結果を代表パターンラベルバッファ312および代表パターン情報バッファ314に格納する(S410)。ここでいう代表パターンとは、入力画像中の入力パターンを、大きく画質を低下させずに、置換え得るようなパターンを意味する。S410の処理については、後に詳細に説明する。   If the value indicated by the page counter 306 matches the number of pages (YES in S409), the representative pattern extractor 311 refers to the input pattern image buffer 309 and the input pattern information buffer 310 to extract a representative pattern, The result is stored in the representative pattern label buffer 312 and the representative pattern information buffer 314 (S410). The representative pattern here means a pattern that can replace the input pattern in the input image without greatly degrading the image quality. The process of S410 will be described in detail later.

代表パターン情報圧縮器315は、代表パターン情報バッファ314に記憶された代表パターンを圧縮する(S412)。代表パターン画像減色器316は、代表パターン画像バッファ313に格納された代表パターンの画像を減色する(S413)。減色を行うのは、入力パターンの大半を占めると思われる文字パターンを再現するのに必要な階調数まで情報量を下げて、さらに圧縮率を向上させるためである。ここでは、256階調の代表パターンを8階調まで減色するものとする。256階調をほぼ等間隔に8等分し、8つの代表色0、36、73、109、145、181、218および255のどれに最も近いかを調べ、最も近い代表色が何番目に当たるかを示す数字で画素値を置換える。たとえば、画素値120は、代表色109に最も近く、また代表色109は、各代表色に値の小さな順に番号を付けると、代表色0を0番目として、3番目の代表色にあたる。そこで、画素値120は、S413で3に置換えられる。   The representative pattern information compressor 315 compresses the representative pattern stored in the representative pattern information buffer 314 (S412). The representative pattern image color reducer 316 reduces the color of the representative pattern image stored in the representative pattern image buffer 313 (S413). The reason for color reduction is to further reduce the amount of information to the number of gradations necessary to reproduce a character pattern that is expected to occupy most of the input pattern, and to further improve the compression rate. Here, it is assumed that the representative pattern of 256 gradations is reduced to 8 gradations. 256 gradations are divided into eight equal parts, and the eight representative colors 0, 36, 73, 109, 145, 181, 218, and 255 are examined, and the closest representative color is assigned first. The pixel value is replaced with a number indicating. For example, the pixel value 120 is closest to the representative color 109, and the representative color 109 corresponds to the third representative color, with the representative color 0 being 0th when numbers are assigned to the representative colors in ascending order. Therefore, the pixel value 120 is replaced with 3 in S413.

代表パターン画像圧縮器318は、代表パターン画像減色器316で減色された代表パターンを圧縮し、データ混合器319に供給する(S414)。圧縮の方法としては、画像としての2次元構造を残したまま圧縮する方法、1次元の単なる配列として圧縮する方法に大別され、いずれの方法でも圧縮可能である。ここでは1次元の配列として圧縮を行ない、算術符号化を用いたエントロピー符号化の手法を用いる。データ圧縮の方法はこれに限られるものではない。   The representative pattern image compressor 318 compresses the representative pattern reduced by the representative pattern image color reducer 316, and supplies it to the data mixer 319 (S414). The compression method is roughly divided into a method of compressing a two-dimensional structure as an image, and a method of compressing as a one-dimensional simple array, and any method can be used for compression. Here, compression is performed as a one-dimensional array, and an entropy coding method using arithmetic coding is used. The data compression method is not limited to this.

図12を参照して、入力パターン情報圧縮器317は、カウンタ302に格納されているページ数の情報、入力パターン情報バッファ310に格納された情報および代表パターンラベルバッファ312に格納された情報を、混合および圧縮し、データ混合器319に供給する(S415)。なお、入力パターン情報圧縮器317は、各ページごとに入力パターン情報を作成し、各ページごとに圧縮を行なう。   Referring to FIG. 12, input pattern information compressor 317 obtains information on the number of pages stored in counter 302, information stored in input pattern information buffer 310, and information stored in representative pattern label buffer 312. The data is mixed and compressed, and supplied to the data mixer 319 (S415). Note that the input pattern information compressor 317 creates input pattern information for each page and performs compression for each page.

例えば、0ページ目に含まれる入力パターンの数2108(PC[0]で表す)から、0ページ目の(PC[0]−1)番目の入力パターンに対応する代表パターンの番号2109までが1つの圧縮単位となる。圧縮後のバイト数が、0ページ目の入力パターンデータの圧縮後の容量2106として格納される。同様の手順が各ページごとに行われる。これは、各ページごとに圧縮することにより、ページごとの復号を可能とし、復号時に必要なメモリ容量を少なくし、ページのランダムアクセスを可能にするためである。   For example, the number from the number 2108 of input patterns included in the 0th page (represented by PC [0]) to the representative pattern number 2109 corresponding to the (PC [0] -1) th input pattern on the 0th page is 1. One compression unit. The number of bytes after compression is stored as the capacity 2106 after compression of the input pattern data of the 0th page. A similar procedure is performed for each page. This is because compression for each page enables decoding for each page, reduces the memory capacity required for decoding, and enables random access of pages.

なお、ここでは各ページごとに入力パターンデータの圧縮後の容量を記憶しており、その容量に基づいて、入力パターン情報へのアクセスを行なっている。この容量とは別に、各ページごとに入力パターン情報へのオフセット(ページ数2105からのオフセット)を記憶するようにし、入力パターン情報へのアクセスを行なうようにしてもよい。   Here, the compressed capacity of the input pattern data is stored for each page, and the input pattern information is accessed based on the capacity. Apart from this capacity, an offset to the input pattern information (offset from the number of pages 2105) may be stored for each page, and the input pattern information may be accessed.

なお、入力パターン情報圧縮器317は、ページ数2105(Pと表す)から、P−1ページ目の入力パターンデータの圧縮後の容量2107までの情報は圧縮せずに、そのまま出力する。   The input pattern information compressor 317 outputs the information from the number of pages 2105 (denoted as P) to the capacity 2107 after compression of the input pattern data of the (P-1) th page without being compressed.

入力パターン情報圧縮器317は、算術符号化を用いたエントロピー符号化の手法を用いてデータ圧縮を行なう。データ圧縮の方法はこれに限られるものではない。   The input pattern information compressor 317 performs data compression using an entropy coding technique using arithmetic coding. The data compression method is not limited to this.

データ混合器319は、S412、S413およびS415でそれぞれ得られた代表パターンの情報、代表パターンの画像および入力パターンの情報の圧縮データを1つの符号化データに連結して符号化データバッファ320に出力する(S416)。以上の処理により、符号化データバッファ320には、文書画像を符号化したデータが格納される。   The data mixer 319 concatenates the representative pattern information, the representative pattern image, and the compressed data of the input pattern information obtained in S412, S413, and S415, respectively, into one encoded data and outputs the encoded data to the encoded data buffer 320. (S416). Through the above processing, the encoded data buffer 320 stores data obtained by encoding the document image.

図13を参照して、符号化データバッファ320に格納されたデータは、代表パターン情報2101、代表パターン画像2102および入力パターン情報2103を含む。代表パターン情報2101、代表パターン画像2102および入力パターン情報2103をそれぞれ復号すると、それぞれ図14、図15および図12に示すようなデータが得られる。   Referring to FIG. 13, the data stored in encoded data buffer 320 includes representative pattern information 2101, representative pattern image 2102, and input pattern information 2103. When the representative pattern information 2101, the representative pattern image 2102 and the input pattern information 2103 are respectively decoded, data as shown in FIGS. 14, 15 and 12 is obtained.

図16を参照して、図7のS407の処理について詳細に説明する。本実施の形態のように文字を入力パターンとする場合には、入力パターン抽出器305は、文字認識技術において、紙面画像から取り出された各文字に対応する文字コードを出力する代わりに、各文字の画像を入力パターン画像バッファ309に格納し、入力パターンの縦幅および横幅を入力パターン情報バッファ310に格納するものである。   With reference to FIG. 16, the process of S407 of FIG. 7 will be described in detail. When a character is used as an input pattern as in the present embodiment, the input pattern extractor 305 uses each character instead of outputting a character code corresponding to each character extracted from the paper image in the character recognition technology. Are stored in the input pattern image buffer 309, and the vertical and horizontal widths of the input pattern are stored in the input pattern information buffer 310.

文字要素抽出部701は、画像データバッファ304に格納された画像、すなわち現在の処理対象となっているページの画像から文字要素を抽出し、文字要素の外接矩形に関する情報を文字要素バッファ702に格納する(S801)。文字要素とは、黒画素(文字領域画素)の連結成分を示す。文字要素バッファ702には、外接矩形の左上頂点のx座標およびy座標、ならびに右下頂点のx座標およびy座標が格納される。このような、画像から文字領域画素の連結成分の外接矩形を抽出する方法の一例が特開平5−81474号公報に開示されている。S801の処理を行なう際には、2値化しきい値バッファ308に格納された2値化しきい値を用いて、予め画像の2値化が行なわれる。   The character element extraction unit 701 extracts a character element from the image stored in the image data buffer 304, that is, the image of the current page to be processed, and stores information about the circumscribed rectangle of the character element in the character element buffer 702. (S801). The character element indicates a connected component of black pixels (character area pixels). The character element buffer 702 stores the x and y coordinates of the upper left vertex of the circumscribed rectangle and the x and y coordinates of the lower right vertex. An example of such a method for extracting a circumscribed rectangle of a connected component of character area pixels from an image is disclosed in Japanese Patent Laid-Open No. 5-81474. When the processing of S801 is performed, the image is binarized in advance using the binarization threshold stored in the binarization threshold buffer 308.

文字列方向判定部703は、文字要素バッファ702を参照して、画像内の文字列の方向が縦方向であるか、横方向であるかを判定し、その判定結果を文字列方向情報フラグ713に格納する(S802)。文字要素の配置から、画像内の文字列方向を判定する方法の一例が特開平11−73475号公報に開示されている。   The character string direction determination unit 703 refers to the character element buffer 702 to determine whether the direction of the character string in the image is the vertical direction or the horizontal direction, and the determination result is used as the character string direction information flag 713. (S802). An example of a method for determining the direction of a character string in an image from the arrangement of character elements is disclosed in Japanese Patent Laid-Open No. 11-73475.

文字列抽出部705は、文字要素バッファ702および文字列方向情報フラグ713を参照しながら、文字列を抽出し、文字列情報バッファの内容を書きかえる(S803)。文字要素の配置から、文字列を抽出する方法の一例は、前掲の特開平5−81474号公報に開示されている。文字列情報バッファ706には、文字列の番号と文字要素とが1対1に対応付けられ、整数配列として記憶されている。   The character string extraction unit 705 extracts a character string while referring to the character element buffer 702 and the character string direction information flag 713, and rewrites the contents of the character string information buffer (S803). An example of a method for extracting a character string from the arrangement of character elements is disclosed in the above-mentioned Japanese Patent Application Laid-Open No. 5-81474. The character string information buffer 706 stores character string numbers and character elements in a one-to-one correspondence and is stored as an integer array.

文字マッチング部704は、文字列カウンタ709を0に初期化し(S804)、文字カウンタ710を0に初期化する(S805)。以下、文字列カウンタ709の値をiで表し、文字カウンタ710の値をjで表す。また、各文字列ごとに下記のような処理が行われる。すなわち、個別文字抽出部707は、i番目の文字列を文字の候補領域に分割する(S806)。具体的には以下のように処理される。例えば、横書きの文字列「河川」を処理する場合を考える。図17(a)を参照して、「河川」という文字列に対して、個別文字抽出部707は、同図の点線で示されるように、文字列を個別文字候補領域に分割する。これは、文字列方向と垂直な方向に、外接矩形が重なり合いを持つ文字要素(この場合は連結成分)を1つの文字要素として統合することにより行なわれる。   The character matching unit 704 initializes the character string counter 709 to 0 (S804), and initializes the character counter 710 to 0 (S805). Hereinafter, the value of the character string counter 709 is represented by i, and the value of the character counter 710 is represented by j. The following processing is performed for each character string. That is, the individual character extraction unit 707 divides the i-th character string into character candidate regions (S806). Specifically, it is processed as follows. For example, consider a case where a horizontally written character string “river” is processed. Referring to FIG. 17A, for the character string “river”, the individual character extraction unit 707 divides the character string into individual character candidate regions as indicated by the dotted lines in FIG. This is performed by integrating character elements (in this case, connected components) having circumscribed rectangles overlapping in a direction perpendicular to the character string direction as one character element.

例えば、図17(a)では、「河」のさんずいを構成する3つの点の外接矩形は、文字列方向と垂直な方向(この場合は上下方向)に重なっている。そのため、3つの外接矩形が個別文字抽出部707によって統合され、統合後の外接矩形の座標が、文字要素バッファ702と同じ形式で個別文字情報バッファ708に格納される。文字の候補領域の格納順序は、文字列方向情報フラグ713が横書きを示しているときには、文字列の左方から右方の順とし、縦書きを示しているときには、文字列の上方から下方の順とする。また、個別文字情報バッファ708には、各文字列ごとに何文字あるかに関する情報も格納される。   For example, in FIG. 17A, the circumscribed rectangles of the three points that constitute the “river” overlap each other in the direction perpendicular to the character string direction (in this case, the vertical direction). Therefore, the three circumscribed rectangles are integrated by the individual character extraction unit 707, and the coordinates of the circumscribed rectangle after integration are stored in the individual character information buffer 708 in the same format as the character element buffer 702. When the character string direction information flag 713 indicates horizontal writing, the character candidate area is stored in the order from the left to the right of the character string. In order. The individual character information buffer 708 also stores information on how many characters are present for each character string.

文字マッチング部704は、文字列内文字カウンタ711を0に初期化(S807)する。以下、文字列内文字カウンタ711の値をkで表す。文字マッチング部704は、個別文字情報バッファ708および画像データバッファ304を参照しながら、文字列中のk番目の文字を、すべての文字標準パターン712と照合し、もっとも高い類似度をマッチングスコアとする(S808)。   The character matching unit 704 initializes the character counter 711 in the character string to 0 (S807). Hereinafter, the value of the character counter in character string 711 is represented by k. The character matching unit 704 matches the kth character in the character string with all the character standard patterns 712 while referring to the individual character information buffer 708 and the image data buffer 304, and uses the highest similarity as a matching score. (S808).

なお、各認識カテゴリに対応する文字標準パターン712と入力パターンとの類似度は、複合類似度に基づいて計算される。このため、類似度の最大値は1となる。複合類似度については、例えば、「橋本「文字認識概論」(電気通信協会、1982),P35」などに詳しく述べられている。類似度の算出に用いられる特徴量の一例としてメッシュ特徴量が用いられるが、それ以外の特徴量であってもよいのはいうまでもない。   Note that the similarity between the character standard pattern 712 corresponding to each recognition category and the input pattern is calculated based on the composite similarity. For this reason, the maximum value of the similarity is 1. The compound similarity is described in detail in, for example, “Hashimoto“ Introduction to Character Recognition ”(Telecommunications Association, 1982), P35”. A mesh feature amount is used as an example of a feature amount used for calculating the similarity, but it goes without saying that other feature amounts may be used.

マッチングスコアが所定のしきい値以上の場合には(S809でNO)、入力パターンの抽出が成功したと判断し、文字マッチング部704は、k番目の文字要素の座標情報を、入力パターン情報バッファ310に格納する(S812)。また、文字マッチング部704は、画像データバッファ304から、文字要素の外接矩形に基づいて、文字の画像を切出し、入力パターン画像バッファ309に格納する(S813)。   If the matching score is equal to or greater than the predetermined threshold (NO in S809), it is determined that the input pattern has been successfully extracted, and the character matching unit 704 uses the coordinate information of the kth character element as the input pattern information buffer. It is stored in 310 (S812). Also, the character matching unit 704 cuts out a character image from the image data buffer 304 based on the circumscribed rectangle of the character element, and stores it in the input pattern image buffer 309 (S813).

文字マッチング部704は、文字列内文字カウンタ711を1つインクリメントし(S814)、文字列の最後まで到達していれば(S815でYES)、文字カウンタ710の値に、文字列内文字カウンタ711の値を加算する(S816)。この時点で、文字列内文字カウンタ711の値は、処理が終わったばかりのi番目の文字列から何文字取り出されたかを示している。   The character matching unit 704 increments the character counter 711 in the character string by 1 (S814), and if the character string reaches the end of the character string (YES in S815), the character counter 711 is set to the value of the character counter 710. Are added (S816). At this time, the value of the in-character string character counter 711 indicates how many characters have been extracted from the i-th character string that has just been processed.

文字列カウンタ709が1つインクリメントされる(S817)。文字列カウンタ709の値が文字列数と異なれば(S818でNO)、未処理の文字列が存在するため、制御がS806に戻る。   The character string counter 709 is incremented by 1 (S817). If the value of the character string counter 709 is different from the number of character strings (NO in S818), since there is an unprocessed character string, the control returns to S806.

文字列カウンタ709の値が文字列数と等しければ(S818でYES)、すべての文字列について処理が終了している。このため、文字カウンタ710の値が入力パターン情報バッファ310に書込まれ処理が終了する(S819)。   If the value of character string counter 709 is equal to the number of character strings (YES in S818), the processing has been completed for all character strings. For this reason, the value of the character counter 710 is written into the input pattern information buffer 310, and the process ends (S819).

マッチングスコアが所定のしきい値を下回った場合には(S809でYES)、以下に説明する再統合・マッチング処理が行われる(S810)。再統合・マッチング処理の結果、個別文字情報バッファ708の内容が書きかえられ(S811)、上述したS812以降の処理が実行される。   If the matching score falls below a predetermined threshold (YES in S809), the reintegration / matching process described below is performed (S810). As a result of the reintegration / matching process, the contents of the individual character information buffer 708 are rewritten (S811), and the processes after S812 described above are executed.

図17を参照して、図16のS810(再統合・マッチング処理)について説明する。図17(a)は、横書きの文字列「河川」から個別文字抽出部707が抽出した文字候補領域を示している。文字領域候補は、破線で囲まれ、5つの文字候補領域が抽出されていることが分かる。図17(b)および図17(f)を参照して、S808の処理では、文字マッチング部704が、「河」のさんずいとカタカナの「シ」とのマッチングを行なっており、このときのマッチングスコアが0.8と求められている。0.8という数値は必ずしも高いものではない。これは、さんずいとカタカナの「シ」との間には細部において、かなりの差があるためである。   With reference to FIG. 17, S810 (reintegration / matching processing) in FIG. 16 will be described. FIG. 17A shows a character candidate area extracted by the individual character extraction unit 707 from the horizontally written character string “river”. It can be seen that the character area candidates are surrounded by broken lines and five character candidate areas are extracted. Referring to FIG. 17B and FIG. 17F, in the processing of S808, the character matching unit 704 performs matching between the “kawa” and the katakana “shi”. The score is required to be 0.8. A value of 0.8 is not necessarily high. This is because there is a considerable difference in detail between Suzu and Katakana “shi”.

S809で用いられるしきい値が0.85であったとする。この場合、S809の条件を満たさないため(S809でYES)、再統合・マッチング処理(S810)が実行される。すなわち、一定の文字幅の範囲内で文字候補領域の統合が順次行なわれる。統合を行なうたびに、文字マッチング部704は、すべての文字標準パターン712と文字候補領域との類似度を計算し、最もマッチングスコアが大きくなる文字候補領域を抽出する。図17(b)、図17(c)および図17(d)はそれぞれ一定の文字幅以下の文字候補領域であり、図17(f)、図17(g)および図17(h)を参照して、それぞれマッチングスコアが、0.5、0.9および0.7として求められている。3つの文字候補領域の中では、図17(c)に示す文字候補領域がもっとも高いマッチングスコアを示す。このため、図17(c)に示す文字候補領域が入力パターンとして採用される。   It is assumed that the threshold used in S809 is 0.85. In this case, since the condition of S809 is not satisfied (YES in S809), the reintegration / matching process (S810) is executed. That is, the character candidate areas are sequentially integrated within a certain character width range. Each time integration is performed, the character matching unit 704 calculates the similarity between all the character standard patterns 712 and the character candidate regions, and extracts the character candidate region having the largest matching score. FIG. 17B, FIG. 17C, and FIG. 17D are character candidate areas each having a certain character width or less, and refer to FIG. 17F, FIG. 17G, and FIG. Thus, the matching scores are determined as 0.5, 0.9, and 0.7, respectively. Among the three character candidate regions, the character candidate region shown in FIG. 17C shows the highest matching score. For this reason, the character candidate area shown in FIG. 17C is adopted as the input pattern.

以上説明した再統合・マッチング処理(図16のS810)により、着目する文字列の文字数は減少する。このため、個別文字情報バッファ708に記憶されている、文字列の文字数や、文字の座標もそれに合わせて変更される(S810)。例えば、ここで用いた例では、さんずいと「可」とが統合され、「河」という文字が抽出されることにより、文字列の文字数が1つ減少する。また、個別文字情報バッファ708に格納されていた「可」の座標は消去され、さんずいに対応する座標は「河」の座標に書きかえられる(S811)。   By the reintegration / matching process described above (S810 in FIG. 16), the number of characters in the character string of interest decreases. Therefore, the number of characters in the character string and the character coordinates stored in the individual character information buffer 708 are also changed accordingly (S810). For example, in the example used here, the number of characters in the character string is reduced by one by combining the letters “Yes” and extracting the characters “river”. In addition, the “OK” coordinates stored in the individual character information buffer 708 are deleted, and the coordinates corresponding to each other are replaced with the “river” coordinates (S811).

次に、図18を参照して、代表パターンを抽出する処理(図7のS410)について詳細に説明する。   Next, with reference to FIG. 18, the process of extracting a representative pattern (S410 in FIG. 7) will be described in detail.

コントローラ1000は、代表パターンラベルバッファ312の初期化を行う(S1101)。代表パターンラベルバッファ312は、代表パターンと入力パターンとを1対1に対応付けるための整数配列である。代表パターンラベルバッファ312の添え字が入力パターンの番号に対応し、代表パターンラベルバッファ312の要素が代表パターンの番号に対応する。代表パターンラベルバッファ312の初期化とは、各要素にそれぞれ異なった値を代入することを意味する。以下、代表パターンラベルバッファ312の各要素をLB[i](i=0,1,...)と表すものとし、LB[i]=iとなるように初期化を行なうものとする。   The controller 1000 initializes the representative pattern label buffer 312 (S1101). The representative pattern label buffer 312 is an integer array for associating a representative pattern with an input pattern on a one-to-one basis. The subscript of the representative pattern label buffer 312 corresponds to the input pattern number, and the element of the representative pattern label buffer 312 corresponds to the representative pattern number. Initializing the representative pattern label buffer 312 means substituting different values for each element. Hereinafter, each element of the representative pattern label buffer 312 is represented as LB [i] (i = 0, 1,...), And initialization is performed so that LB [i] = i.

ループ検出器1001は、2値化しきい値バッファ308、入力パターン画像バッファ309および入力パターン情報バッファ310を参照して、入力パターンに対応する画像に含まれるループの数を検出し、ループ数バッファ1002に格納する(S1102)。ループとは、輪形状をした部分のことである。ループ数バッファ1002は、入力パターンの番号を添え字とし、ループ数を要素とする整数配列のことである。以下の説明では、ループ数バッファ1002のi番目の要素をL[i]とする。すなわち、i番目の入力パターンに含まれるループ数はL[i]で表わされる。   The loop detector 1001 refers to the binarization threshold buffer 308, the input pattern image buffer 309, and the input pattern information buffer 310, detects the number of loops included in the image corresponding to the input pattern, and loop number buffer 1002 (S1102). A loop is a ring-shaped part. The loop number buffer 1002 is an integer array in which the input pattern number is a subscript and the number of loops is an element. In the following description, the i-th element of the loop number buffer 1002 is L [i]. That is, the number of loops included in the i-th input pattern is represented by L [i].

ここでいうループの数の検出において、着目画素は入力パターン抽出器305と同様の基準により選ばれる。すなわち、非背景画素が着目画素とされる。図19(a)はループ数が2の画像を示しており、図19(b)はループ数が1の画像を示している。S1102の処理については後に詳述する。   In this detection of the number of loops, the pixel of interest is selected based on the same criteria as the input pattern extractor 305. That is, the non-background pixel is set as the target pixel. FIG. 19A shows an image with two loops, and FIG. 19B shows an image with one loop. The process of S1102 will be described in detail later.

コントローラ1000は第1カウンタ1003を0に初期化し(S1103)、第2カウンタ1004に第1カウンタ1003の値に1を加えた値を代入する(S1104)。以下の説明では、第1カウンタ1003の値をi,第2カウンタ1004の値をjとする。   The controller 1000 initializes the first counter 1003 to 0 (S1103), and substitutes a value obtained by adding 1 to the value of the first counter 1003 to the second counter 1004 (S1104). In the following description, the value of the first counter 1003 is i, and the value of the second counter 1004 is j.

コントローラ1000は、i番目およびj番目の入力パターンの大きさが類似しているか否かを判断する(S1105)。これは、2つの入力パターンの横幅および縦幅を取り出して比較することにより実行される。   The controller 1000 determines whether or not the i-th and j-th input patterns are similar in size (S1105). This is executed by extracting and comparing the horizontal width and vertical width of the two input patterns.

i番目の入力パターンの外接矩形の左上頂点の座標を(sx0[i],sy0[i])、右下頂点の座標を(ex0[i],ey0[i])とすると、i番目の入力パターンの横幅lx[i]および縦幅ly[i]、ならびにj番目の入力パターンの横幅lx[j]および縦幅ly[j]は以下の式(2)〜(5)によって、それぞれ表わされる。
lx[i]=ex0[i]−sx0[i]+1 …(2)
ly[i]=ey0[i]−sy0[i]+1 …(3)
lx[j]=ex0[j]−sx0[j]+1 …(4)
ly[j]=ey0[j]−sy0[j]+1 …(5)
このとき、次の式(6)および式(7)の双方が成り立てば、i番目およびj番目の入力パターンの大きさが類似していると判断される。すなわち、横幅と縦幅との差が、横幅または縦幅そのものと比べてそれほど大きくないときに、大きさが類似していると判断される。
abs(lx[i]−lx[j])×4 ≦max(lx[i],lx[j]) …(6)
abs(ly[i]−ly[j])×4 ≦max(ly[i],ly[j]) …(7)
ここで、abs(x)とは、xの絶対値を示し、max(x,y)とは、xおよびyの絶対値を示す。
If the coordinates of the upper left vertex of the circumscribed rectangle of the i th input pattern are (sx0 [i], sy0 [i]) and the coordinates of the lower right vertex are (ex0 [i], ey0 [i]), the i th input The horizontal width lx [i] and the vertical width ly [i] of the pattern, and the horizontal width lx [j] and the vertical width ly [j] of the jth input pattern are represented by the following equations (2) to (5), respectively. .
lx [i] = ex0 [i] −sx0 [i] +1 (2)
ly [i] = ey0 [i] -sy0 [i] +1 (3)
lx [j] = ex0 [j] −sx0 [j] +1 (4)
ly [j] = ey0 [j] −sy0 [j] +1 (5)
At this time, if both the following expressions (6) and (7) hold, it is determined that the i-th and j-th input patterns are similar in size. That is, when the difference between the horizontal width and the vertical width is not so large as compared with the horizontal width or the vertical width itself, it is determined that the sizes are similar.
abs (lx [i] −lx [j]) × 4 ≦ max (lx [i], lx [j]) (6)
abs (ly [i] −ly [j]) × 4 ≦ max (ly [i], ly [j]) (7)
Here, abs (x) indicates the absolute value of x, and max (x, y) indicates the absolute value of x and y.

入力パターンの大きさが類似していれば(S1105でYES)、コントローラ1000は、i番目の入力パターンに含まれるループ数L[i]とj番目の入力パターンに含まれるループ数L[j]とが等しいか否かを調べる(S1106)。   If the sizes of the input patterns are similar (YES in S1105), the controller 1000 determines that the number of loops L [i] included in the i-th input pattern and the number of loops L [j] included in the j-th input pattern. Are equal to each other (S1106).

ループ数L[i]およびL[j]が等しければ(S1106でYES)、パターン比較器1005は、i番目の入力パターンとj番目の入力パターンとを比較する(S1107)。   If the loop numbers L [i] and L [j] are equal (YES in S1106), the pattern comparator 1005 compares the i-th input pattern with the j-th input pattern (S1107).

i番目の入力パターンとj番目の入力パターンとが類似している場合には(S1105でYES)、コントローラ1000は、以下のように代表パターンラベルバッファ312の書換えを行なう(S1109)。すなわち、コントローラ1000は、類似していると判断されたi番目およびj番目の入力パターンにそれぞれ対応する代表パターンラベルバッファ312の要素LB[i]およびLB[j]に共通の値min(LB[i],LB[j])を代入する。また、更新前の要素LB[i]またはLB[j]と同じ値を有する要素についても、共通の値min(LB[i],LB[j])を代入する。ここで、min(LB[i],LB[j])とは、LB[i]およびLB[j]の最小値を示す。   If the i-th input pattern is similar to the j-th input pattern (YES in S1105), the controller 1000 rewrites the representative pattern label buffer 312 as follows (S1109). That is, the controller 1000 uses a value min (LB [common to elements LB [i] and LB [j] of the representative pattern label buffer 312 corresponding to the i-th and j-th input patterns determined to be similar to each other. i], LB [j]). A common value min (LB [i], LB [j]) is also substituted for an element having the same value as the element LB [i] or LB [j] before update. Here, min (LB [i], LB [j]) indicates the minimum value of LB [i] and LB [j].

コントローラ1000は、第2カウンタ1004を1つインクリメントする(S1110)。コントローラ1000は、第2カウンタ1004の値jが入力パターン数と等しいか否かを調べ(S1111)、入力パターン数と等しくなければ(S1111でNO)、S1105に戻る。   The controller 1000 increments the second counter 1004 by 1 (S1110). The controller 1000 checks whether or not the value j of the second counter 1004 is equal to the number of input patterns (S1111). If not equal to the number of input patterns (NO in S1111), the controller 1000 returns to S1105.

第2カウンタ1004の値jが入力パターン数と等しければ(S1111でYES)、i番目の入力パターンに対する比較はすべて終了しているため、コントローラ1000は、第1カウンタ1003を1つインクリメントする(S1112)。   If the value j of the second counter 1004 is equal to the number of input patterns (YES in S1111), since all comparisons for the i-th input pattern have been completed, the controller 1000 increments the first counter 1003 by one (S1112). ).

コントローラ1000は、第1カウンタ1003の値iが入力パターン数と等しいか否かを調べ(S1113)、入力パターン数と等しくなければ(S1113でNO)、i番目の入力パターンに対する比較を開始するためにS1004に戻る。   The controller 1000 checks whether or not the value i of the first counter 1003 is equal to the number of input patterns (S1113). If not equal to the number of input patterns (NO in S1113), the controller 1000 starts comparison with the i-th input pattern. Return to S1004.

第1カウンタ1003の値iが入力パターン数と等しければ(S1113でYES)、すべての入力パターンの組合わせに対する比較が終了しており、コントローラ1000は、再び第1カウンタ1003および第2カウンタ1004を0に初期化する(S1114、S1115)。   If the value i of the first counter 1003 is equal to the number of input patterns (YES in S1113), the comparison for all combinations of input patterns is complete, and the controller 1000 again sets the first counter 1003 and the second counter 1004. It is initialized to 0 (S1114, S1115).

コントローラ1000は、LB[i]=iが成り立つかどうかを判定する(S1116)。LB[i]=iであれば(S1116でYES)、コントローラ1000は、i番目の入力パターンを代表パターンとするため、i番目の入力パターンの画像を入力パターン画像バッファ309から読出し、代表パターン画像バッファ313に書込む(S1117)。また、コントローラ1000は、i番目の入力パターンの情報を入力パターン情報バッファ310から読出して、代表パターン情報バッファ314に書込む(S1118)。また、コントローラ1000は、第2カウンタ1004を1つインクリメントする(S1119)。   The controller 1000 determines whether LB [i] = i is satisfied (S1116). If LB [i] = i (YES in S1116), the controller 1000 reads the image of the i-th input pattern from the input pattern image buffer 309 in order to use the i-th input pattern as the representative pattern. Writing to the buffer 313 is performed (S1117). Further, the controller 1000 reads information on the i-th input pattern from the input pattern information buffer 310 and writes it in the representative pattern information buffer 314 (S1118). In addition, the controller 1000 increments the second counter 1004 by 1 (S1119).

LB[i]=iという条件を満たす場合にのみi番目の入力パターンを代表パターンとするのは、同じクラスタに属する入力パターンから1つだけ代表パターンを選び出すためである。その他に、入力パターンから1つだけ代表パターンを選び出す方法が存在すれば、その方法を用いてもよい。   The reason why the i-th input pattern is used as a representative pattern only when the condition LB [i] = i is satisfied is to select only one representative pattern from the input patterns belonging to the same cluster. In addition, if there is a method for selecting only one representative pattern from the input patterns, that method may be used.

S1118の処理では、i番目の入力パターンの横幅lx[i]および縦幅ly[i]が上述の式(2)および(3)に従い求められる。   In the processing of S1118, the horizontal width lx [i] and the vertical width ly [i] of the i-th input pattern are obtained according to the above equations (2) and (3).

コントローラ1000は、第1カウンタ1003を1つインクリメントする(S1120)。コントローラ1000は、第1カウンタ1003の値iと入力パターン数とが一致しているか否かを調べ(S1121)、一致していなければ(S1121でNO)、S1116に戻る。   The controller 1000 increments the first counter 1003 by 1 (S1120). The controller 1000 checks whether or not the value i of the first counter 1003 matches the number of input patterns (S1121). If they do not match (NO in S1121), the process returns to S1116.

両者が一致していれば(S1121でYES)、図14を参照して、コントローラ1000は、第2カウンタ1004の値jを代表パターンの数2104として代表パターン情報バッファ314に書込み(S1122)、後述する代表パターンラベルバッファ312の値を詰めなおす処理を行なう(S1123)。   If the two match (YES in S1121), with reference to FIG. 14, the controller 1000 writes the value j of the second counter 1004 in the representative pattern information buffer 314 as the number of representative patterns 2104 (S1122). The process of repacking the value of the representative pattern label buffer 312 is performed (S1123).

図15を参照して、代表パターン画像バッファ313には、代表パターンの画像データがラスタスキャンの順で書込まれている。このようなデータ構造はあくまでも一例であり、その他のデータ構造であってもよいのは言うまでもない。   Referring to FIG. 15, representative pattern image buffer 313 has image data of a representative pattern written in the order of raster scan. Such a data structure is merely an example, and it goes without saying that other data structures may be used.

S1123の処理について説明する。代表パターンの数はj個ある。しかし、代表パターンラベルバッファ312の要素は、0から「入力パターン数−1」の範囲の値を取ることができる。このため、代表パターンラベルバッファ312の要素は飛び飛びの値を取る。コントローラ1000は、代表パターンラベルバッファ312の要素が0からj−1までの範囲に収まり、かつ要素の大小関係を保つように要素の付け替えを行なう。たとえば、図20(a)を参照して、要素0、2および5を有する代表パターンラベルバッファ312の値を詰め直すと、図20(b)のようになる。   The process of S1123 will be described. There are j representative patterns. However, the elements of the representative pattern label buffer 312 can take values ranging from 0 to “number of input patterns−1”. For this reason, the element of the representative pattern label buffer 312 takes a jump value. The controller 1000 replaces the elements so that the elements of the representative pattern label buffer 312 are within the range from 0 to j−1 and the magnitude relationship of the elements is maintained. For example, referring to FIG. 20A, when the value of the representative pattern label buffer 312 having elements 0, 2 and 5 is repacked, the result is as shown in FIG.

なお、代表パターンは、同じクラスタに属する複数の入力パターンから作成するようにしてもよい。たとえば、入力パターンを拡大または縮小し、サイズを等しくした上で、入力パターンの平均を取り、代表パターンを作成するようにしてもよい。ただし、一般的にはこのような合成処理は、代表パターンがぼけた画像になることが多く、必ずしも有効とは限らない。   The representative pattern may be created from a plurality of input patterns belonging to the same cluster. For example, the input pattern may be enlarged or reduced to make the size equal, and the average of the input pattern may be taken to create a representative pattern. However, in general, such synthesis processing often results in an image with a blurred representative pattern, and is not always effective.

図21〜図36を参照して、代表パターンラベルバッファ312の値の変化の一例を説明する。図21は、2種類、計13個の入力パターンをパターン空間上に配置した図である。図中の数字はS1102直後の代表パターンラベルバッファ312に格納されている代表パターンラベルの値を示している。この数字は、入力パターン情報バッファ310に格納されている入力パターンの番号とも一致している。   An example of a change in the value of the representative pattern label buffer 312 will be described with reference to FIGS. FIG. 21 is a diagram in which two types, a total of 13 input patterns, are arranged on the pattern space. The numbers in the figure indicate the values of the representative pattern labels stored in the representative pattern label buffer 312 immediately after S1102. This number also matches the input pattern number stored in the input pattern information buffer 310.

以下図22から図34は第1カウンタ1003の値iが1つずつインクリメントされながら、S1104からS1112までの処理が実行された後の代表パターンラベルの値の変化を示している。S1107の処理はすべての入力パターンの組合わせに対して実行される。ここでは、2つの入力パターンが類似しているか否かをパターン空間上のユークリッド距離が一定しきい値以下であるか否かで判定すると仮定し、点線で示した円が、中心に位置するパターンに類似すると判定される距離の範囲を示す。たとえば、図22は、i=0のときに、S1112の処理が終了した時点での代表パターンラベルバッファ312の状態を示している。0番目の入力パターン2801と1番目の入力パターン2802とは類似していると判定されたため、S1109の処理により代表パターンラベルバッファ312の値が図22のように書換えられている。   FIG. 22 to FIG. 34 show the change in the value of the representative pattern label after the processing from S1104 to S1112 is executed while the value i of the first counter 1003 is incremented by one. The process of S1107 is executed for all combinations of input patterns. Here, it is assumed that whether or not two input patterns are similar is determined by whether or not the Euclidean distance in the pattern space is equal to or less than a certain threshold value, and the circle indicated by the dotted line is the pattern located at the center. The range of distance determined to be similar to is shown. For example, FIG. 22 shows the state of the representative pattern label buffer 312 when the process of S1112 is completed when i = 0. Since it is determined that the 0th input pattern 2801 and the first input pattern 2802 are similar, the value of the representative pattern label buffer 312 is rewritten as shown in FIG. 22 by the processing of S1109.

図21で示される初期状態では、LB[0]=0、LB[1]=1であったが、S1109の処理により、LB[1]がLB[0]と同じ値に書換えられている。S1109が実行される直前の状態で、LB[0]またはLB[1]と同じ値が付された代表パターンラベルは他には存在しない。このため、その他の代表パターンラベルはそのままの値を維持する。たとえば9番目の入力パターン2803は、入力パターン2801と類似しているとは判断されないため、代表パターンラベルLB[9]はこの時点では9のままである。以下、図23から図34はiが1から12まで変化していったときに、S1112の処理が終了した時点での代表パターンラベルバッファ312の値を示す。たとえば、i=11に相当する図33では、11番目の入力パターン2804と12番目の入力パターン2805とが類似していると判定される。このため、S1112の処理終了時点では、LB[11]=0、LB[12]=0となっている。また、7番目の入力パターン2806については、図に示されるように入力パターン2804と類似しているという判定はなされないが、それまでの処理で、LB[7]=LB[11]であることが示されている。このため、S1109の処理により、LB[7]も0に書換えられている。   In the initial state shown in FIG. 21, LB [0] = 0 and LB [1] = 1, but LB [1] is rewritten to the same value as LB [0] by the processing of S1109. There is no other representative pattern label with the same value as LB [0] or LB [1] immediately before S1109 is executed. For this reason, other representative pattern labels maintain the values as they are. For example, since the ninth input pattern 2803 is not determined to be similar to the input pattern 2801, the representative pattern label LB [9] remains 9 at this time. 23 to 34 show values of the representative pattern label buffer 312 when the process of S1112 is completed when i changes from 1 to 12. FIG. For example, in FIG. 33 corresponding to i = 11, it is determined that the 11th input pattern 2804 and the 12th input pattern 2805 are similar. For this reason, LB [11] = 0 and LB [12] = 0 at the end of the processing of S1112. Further, as shown in the figure, it is not determined that the seventh input pattern 2806 is similar to the input pattern 2804, but LB [7] = LB [11] in the processing so far. It is shown. For this reason, LB [7] is also rewritten to 0 by the processing of S1109.

図34は、i=12に相当する図であるが、すでにLB[12]は0に書換えられており、12番目の代表パターン2807と類似していると判定されている入力パターンに対応した代表パターンラベルの値はいずれも0になっている。このため、代表パターンラベルバッファ312の値に変化はない。   FIG. 34 is a diagram corresponding to i = 12, but LB [12] has already been rewritten to 0, and the representative corresponding to the input pattern determined to be similar to the 12th representative pattern 2807. The values of the pattern labels are all 0. For this reason, the value of the representative pattern label buffer 312 does not change.

S1114の処理が実行される時点での状態を図35に示す。S1123の処理終了後の状態を図36に示す。代表パターンラベルバッファ312の詰め直し処理(S1123)を実行することにより、代表パターンラベルの値3が1に更新される。   The state at the time when the process of S1114 is executed is shown in FIG. FIG. 36 shows the state after the processing of S1123. By executing the refill process (S1123) of the representative pattern label buffer 312, the value 3 of the representative pattern label is updated to 1.

図37を参照して、図18のS1102の処理について詳細に説明する。コントローラ1300は、第1カウンタ1301を0に初期化する(S1401)。以下第1カウンタ1301の値をiとする。第1カウンタ1301の値は、ループ検出器1001で現在処理中の入力パターンの番号を示す。   With reference to FIG. 37, the process of S1102 of FIG. 18 will be described in detail. The controller 1300 initializes the first counter 1301 to 0 (S1401). Hereinafter, the value of the first counter 1301 is i. The value of the first counter 1301 indicates the number of the input pattern currently being processed by the loop detector 1001.

コントローラ1300は、連結成分外接矩形抽出器1302を用いて、第1カウンタ1301が指し示す入力パターンから、背景領域の連結成分を取出す。コントローラ1300は、連結成分ごとに外接矩形を作成し、その情報を連結成分外接矩形情報バッファ1303に格納する(S1402)。すなわち、i番目の入力パターンが属するページ番号p[i]を入力パターン情報バッファ310から取り出す。これは、2値化しきい値バッファ308に記憶されたp[i]ページ目の画像の2値化しきい値をTH[p[i]]として、以下の式(8)を満たす画素を着目画素とすることで行える。これは、着目画素を非背景領域ではなく、背景領域としていることを意味する。それ以外の点では、連結成分外接矩形抽出器1302の動作は、上掲の特開平5−81474号公報で開示されているものと同じで良い。
TH[p[i]]≦画素値<256…(8)
連結成分外接矩形情報バッファ1303には、矩形数RCと、各矩形の左上頂点のX座標およびY座標と、各矩形の右下頂点のX座標およびY座標とが記憶されている。以下、k番目の矩形の左上頂点を(sx1[k],sy1[k])と表わし、右下頂点を(ex1[k],ey1[k])と表す。
The controller 1300 uses the connected component circumscribed rectangle extractor 1302 to extract the connected component of the background area from the input pattern indicated by the first counter 1301. The controller 1300 creates a circumscribed rectangle for each connected component and stores the information in the connected component circumscribed rectangle information buffer 1303 (S1402). That is, the page number p [i] to which the i-th input pattern belongs is extracted from the input pattern information buffer 310. The pixel of interest is a pixel that satisfies the following expression (8), where TH [p [i]] is the binarization threshold value of the image of the p [i] page stored in the binarization threshold buffer 308. This can be done. This means that the pixel of interest is not a non-background area but a background area. In other respects, the operation of the connected component circumscribed rectangle extractor 1302 may be the same as that disclosed in JP-A-5-81474.
TH [p [i]] ≦ pixel value <256 (8)
The connected component circumscribed rectangle information buffer 1303 stores the number of rectangles RC, the X and Y coordinates of the upper left vertex of each rectangle, and the X and Y coordinates of the lower right vertex of each rectangle. Hereinafter, the upper left vertex of the kth rectangle is represented as (sx1 [k], sy1 [k]), and the lower right vertex is represented as (ex1 [k], ey1 [k]).

コントローラ1300は、ループ数バッファ1002のi番目の要素L[i]を0に初期化し(S1403)、第2カウンタ1304を0に初期化する(S1404)。第2カウンタ1304の値をここではjと表す。コントローラ1300は、連結成分外接矩形情報バッファ1303に含まれているj番目の矩形が、入力パターンの端に接しているかどうかを調べる(S1405〜S1408)。すなわち、入力パターン情報バッファ310に格納されているi番目の入力パターンの外接矩形の左上頂点および右下頂点のXY座標をそれぞれ(sx0[i],sy0[i])および(ex0[i],ey0[i])としたとき、式(9)〜式(12)のいずれかが成り立つか否かを調べる。
sx1[j]=0…(9)
sy1[j]=0…(10)
ex1[j]=ex0[i]−sx0[i]…(11)
ey1[j]=ey0[i]−sy0[i]…(12)
4つの条件のうちのいずれかが成り立つ場合には(S1405でYES、S1406でYES、S1407でYESまたはS1408でYES)、コントローラ1300は、第2カウンタ1304を1つインクリメントする(S1410)。
The controller 1300 initializes the i-th element L [i] of the loop number buffer 1002 to 0 (S1403), and initializes the second counter 1304 to 0 (S1404). Here, the value of the second counter 1304 is represented as j. The controller 1300 checks whether or not the jth rectangle included in the connected component circumscribed rectangle information buffer 1303 is in contact with the end of the input pattern (S1405 to S1408). That is, the XY coordinates of the upper left vertex and lower right vertex of the circumscribed rectangle of the i-th input pattern stored in the input pattern information buffer 310 are (sx0 [i], sy0 [i]) and (ex0 [i], ey0 [i]), it is checked whether any one of the equations (9) to (12) holds.
sx1 [j] = 0 (9)
sy1 [j] = 0 (10)
ex1 [j] = ex0 [i] -sx0 [i] (11)
ey1 [j] = ey0 [i] −sy0 [i] (12)
If any of the four conditions is satisfied (YES in S1405, YES in S1406, YES in S1407, or YES in S1408), controller 1300 increments second counter 1304 by one (S1410).

いずれの条件も成り立たない場合には(S1405でNO、S1406でNO、S1407でNOおよびS1408でNO)、コントローラ1300は、ループ数バッファ1002のi番目の要素L[i]を1つインクリメントして(S1409)、S1410に進む。   If neither condition is satisfied (NO in S1405, NO in S1406, NO in S1407, and NO in S1408), the controller 1300 increments the i-th element L [i] of the loop number buffer 1002 by one. (S1409), the process proceeds to S1410.

S1410の処理実行後に、コントローラ1300は、第2カウンタ1304の値jが、連結成分外接矩形抽出器1302で取り出された矩形の数と一致するか否かを調べる(S1411)。一致すれば(S1411でYES)、コントローラ1300は、第1カウンタ1301を1つインクリメントする(S1412)。一致していなければ(S1411でNO)、S1405に戻る。   After executing the processing of S1410, the controller 1300 checks whether or not the value j of the second counter 1304 matches the number of rectangles extracted by the connected component circumscribed rectangle extractor 1302 (S1411). If they match (YES in S1411), the controller 1300 increments the first counter 1301 by 1 (S1412). If they do not match (NO in S1411), the process returns to S1405.

S1412の処理実行後に、コントローラ1300は、第1カウンタ1301の値iが入力パターンの数と一致しているか否かを調べる(S1413)。第1カウンタ1301の値iが入力パターンの数と一致していれば(S1413でYES)、処理を終了する。一致していなければ(S1413でNO)、S1402に戻る。   After executing the processing of S1412, the controller 1300 checks whether or not the value i of the first counter 1301 matches the number of input patterns (S1413). If the value i of the first counter 1301 matches the number of input patterns (YES in S1413), the process ends. If they do not match (NO in S1413), the process returns to S1402.

図38を参照して、ループ検出器1001の処理の一例を説明する。図38(a)を入力パターンとした場合、図38(b)は非背景領域と背景領域とを逆転させて表示した図である。図38(b)で黒色で表されているのが背景領域であり、連結成分外接矩形抽出器1302の着目領域である。図38(c)は、図38(b)の画像より抽出される連結成分のうち、その外接矩形が入力パターンの端に接している連結成分1501および1502を示している。図38(d)は、図38(b)の画像より抽出される連結成分のうち、その外接矩形が入力パターンの端に接していない連結成分1503および1504を示している。   An example of processing of the loop detector 1001 will be described with reference to FIG. When FIG. 38A is used as the input pattern, FIG. 38B is a diagram in which the non-background region and the background region are reversed and displayed. In FIG. 38B, the background region is represented in black, and is the region of interest of the connected component circumscribed rectangle extractor 1302. FIG. 38C shows connected components 1501 and 1502 whose circumscribed rectangle is in contact with the end of the input pattern among the connected components extracted from the image of FIG. FIG. 38D shows connected components 1503 and 1504 whose circumscribed rectangle is not in contact with the end of the input pattern among the connected components extracted from the image of FIG.

連結成分1503および1504のようなその外接矩形が入力パターンの端に接していない連結成分の数を数えることにより、非背景領域のループ数を計算することができる。   By counting the number of connected components whose circumscribed rectangles, such as connected components 1503 and 1504, do not touch the edge of the input pattern, the number of loops in the non-background region can be calculated.

このように、非背景領域のループ数の計算が、背景領域に着目し、そこから検出された、連結成分の外接矩形で、端に達していないものだけを数えることで、従来のループを実際に検出してから、検出されたループ数を数える手法に比べて容易に行なえる。   In this way, the calculation of the number of loops in the non-background region focuses on the background region and counts only the connected component circumscribed rectangles that have not reached the end. This is easier than the method of counting the number of detected loops after the detection.

また、このような構成をとることで、検出するループの開口部のサイズや形状に条件を課す。たとえば、「一定値以下の横幅または縦幅のループ数は無視する」という処理を追加することも、ex1[j]−sx1[j],ey1[j]−sy1[j]を計算して、条件に合わないものを無視することで容易に行なえる。他のいかなる条件も、ループの開口部の外接矩形のサイズや形状に関する条件に置換え得る限りは同様である。   In addition, by adopting such a configuration, conditions are imposed on the size and shape of the opening of the loop to be detected. For example, adding a process of “ignoring the number of loops having a horizontal width or a vertical width equal to or less than a certain value” also calculates ex1 [j] −sx1 [j], ey1 [j] −sy1 [j] This can be done easily by ignoring the ones that do not meet the conditions. Any other conditions are the same as long as they can be replaced by conditions related to the size and shape of the circumscribed rectangle of the opening of the loop.

図39を参照して、図18のS1107の処理について説明する。ベクトル変換器1601は、比較対象の2つの入力パターンよりそれぞれ特徴抽出を行ない、特徴ベクトルを生成する(S1701)。特徴抽出の方法は文字認識の分野で様々な手法が提案されている。ここでは、一例として以下に説明する方法で特徴抽出を行ない、入力パターンを特徴ベクトルに変換する。   With reference to FIG. 39, the process of S1107 of FIG. 18 will be described. The vector converter 1601 performs feature extraction from each of the two input patterns to be compared, and generates a feature vector (S1701). Various methods for feature extraction have been proposed in the field of character recognition. Here, as an example, feature extraction is performed by the method described below, and the input pattern is converted into a feature vector.

図40(a)を参照して、3×5画素の入力パターンを4等分する。各区画に含まれる画素を、その区画に含まれる面積比で重み付けし、重み平均を求める。重み平均の値は、図40(b)のようになり、これより4次元の特徴ベクトルが作成される。なお、実際には図41(a)に示すような64次元(8×8次元)の特徴ベクトルが算出される。   Referring to FIG. 40A, an input pattern of 3 × 5 pixels is divided into four equal parts. The pixels included in each section are weighted by the area ratio included in the section, and a weighted average is obtained. The value of the weighted average is as shown in FIG. 40B, and a four-dimensional feature vector is created from this. In practice, a 64-dimensional (8 × 8-dimensional) feature vector as shown in FIG. 41A is calculated.

ベクトル正規化器1602は、絶対値が1になるように、特徴ベクトルを正規化する(S1702)。すなわち、ベクトル正規化器1602は、特徴ベクトルの絶対値を求め、特徴ベクトルの各要素をその絶対値で割る。   The vector normalizer 1602 normalizes the feature vector so that the absolute value becomes 1 (S1702). That is, the vector normalizer 1602 obtains the absolute value of the feature vector and divides each element of the feature vector by the absolute value.

ベクトル正準化器1603は、特徴ベクトルの正準化を行う(S1703)。ここでいう正準化とは、要素がすべて同じであり、絶対値が1の特徴ベクトルをCとし、S1701の処理で作成された入力パターンの特徴ベクトルをFとするとき、これらから以下の式に基づいて特徴ベクトルF′を算出する処理である。
F′=F−(C・F)C …(13)
ただし、C・Fは特徴ベクトルの内積を表す。特徴ベクトルF′は、背景が一様な入力パターンと直交する成分を取出したものである。正準化を行なうのは以下のような理由による。文書画像などでは、白地に黒い文字が書かれているため、背景の画素値が大きな値を示す。特に、単純な文字の場合には、画像のほとんどの部分が大きな値を示し、入力パターンの種類にかかわらず、特徴ベクトルが一様濃度の入力パターンから作ったものと似たものになってしまう。これを防ぐために正準化が行なわれる。なお、正準化の一般的な理論的基礎については、例えば飯島「パターン認識理論」(森北出版、1989年),P94に詳しく記載されている。
The vector canonicalizer 1603 normalizes the feature vector (S1703). Here, the canonicalization means that a feature vector having the same elements, an absolute value of 1 is C, and a feature vector of an input pattern created in the process of S1701 is F. From these, The feature vector F ′ is calculated based on the above.
F ′ = F− (C · F) C (13)
C · F represents the inner product of feature vectors. The feature vector F ′ is obtained by extracting a component orthogonal to the input pattern having a uniform background. The reason for canonicalization is as follows. In a document image or the like, since black characters are written on a white background, the background pixel value indicates a large value. In particular, in the case of simple characters, most of the image shows a large value, and the feature vector is similar to that created from an input pattern of uniform density regardless of the type of input pattern. . Canonicalization is performed to prevent this. The general theoretical basis of canonicalization is described in detail in, for example, Iijima “Pattern Recognition Theory” (Moritakita Publishing, 1989), P94.

内積計算器1604は、S1703の処理で得られた2つの特徴ベクトルの内積S0を計算する(S1704)。ここでの内積は対応する要素の積の和を、2つの特徴ベクトルの絶対値の積で割った値であり、0から1の範囲の値を取る。内積の値S0が1に近いほど、2つの特徴ベクトルは類似しており、2つの入力パターンが類似していることを示している。   The inner product calculator 1604 calculates the inner product S0 of the two feature vectors obtained in the processing of S1703 (S1704). The inner product here is a value obtained by dividing the sum of the products of the corresponding elements by the product of the absolute values of the two feature vectors, and takes a value in the range of 0 to 1. As the inner product value S0 is closer to 1, the two feature vectors are more similar, indicating that the two input patterns are similar.

コントローラ1600は、内積の値S0があらかじめ定められたしきい値TH0以上か否かを調べる(S1705)。内積の値S0がしきい値TH0よりも小さければ(S1705でNO)、類似していないと判定し(S1710)、処理を終了する。   The controller 1600 checks whether or not the inner product value S0 is equal to or greater than a predetermined threshold value TH0 (S1705). If inner product value S0 is smaller than threshold value TH0 (NO in S1705), it is determined that they are not similar (S1710), and the process is terminated.

内積の値S0がしきい値以上TH0であれば(S1705でYES)、特徴ベクトルの部分(以下、「部分ベクトル」という。)同士の比較を行うために、コントローラ1600は、カウンタ1605を0に初期化する(S1705)。以下、カウンタ1605の値をkとする。   If the inner product value S0 is equal to or greater than the threshold value TH0 (YES in S1705), the controller 1600 sets the counter 1605 to 0 in order to compare the feature vector portions (hereinafter referred to as “partial vectors”). Initialization is performed (S1705). Hereinafter, the value of the counter 1605 is k.

部分ベクトルとは、特徴ベクトルの要素の一部を取り出して作成されたベクトルをいう。ここでは、図41(a)に示すような、64次元の特徴ベクトルから、図41(b)〜(j)にそれぞれ示すような9個の16次元ベクトルを部分ベクトルとする。図41(b)〜(j)の部分ベクトルにはそれぞれ0から8までの番号をつけておく。   A partial vector refers to a vector created by extracting some of the elements of a feature vector. Here, nine 16-dimensional vectors as shown in FIGS. 41B to 41J are used as partial vectors from 64-dimensional feature vectors as shown in FIG. Numbers from 0 to 8 are assigned to the partial vectors in FIGS. 41 (b) to (j), respectively.

部分ベクトル作成器1606は、2つの特徴ベクトルの各々について、それぞれk番目の部分ベクトルを生成する(S1706)。内積計算器1604は、部分ベクトル同士の内積S1[k]を計算する(S1707)。コントローラ1600は、内積S1[k]があらかじめ定められたしきい値TH1以上か否かを調べる(S1709)。内積S1[k]がしきい値TH1よりも小さければ(S1709でNO)、類似していないと判定して(S1708)、処理を終了する。   The partial vector generator 1606 generates a k-th partial vector for each of the two feature vectors (S1706). The inner product calculator 1604 calculates the inner product S1 [k] between the partial vectors (S1707). The controller 1600 checks whether or not the inner product S1 [k] is greater than or equal to a predetermined threshold value TH1 (S1709). If inner product S1 [k] is smaller than threshold value TH1 (NO in S1709), it is determined that they are not similar (S1708), and the process is terminated.

内積S1[k]がしきい値TH1以上であれば(S1709でYES)、コントローラ1600は、カウンタ1605を1つインクリメントする(S1709)。カウンタ1605の値kが部分ベクトルの数と一致していなければ(S1712でNO)、S1707に戻る。   If inner product S1 [k] is equal to or greater than threshold value TH1 (YES in S1709), controller 1600 increments counter 1605 by one (S1709). If the value k of the counter 1605 does not match the number of partial vectors (NO in S1712), the process returns to S1707.

カウンタ1605の値kが部分ベクトルの数と一致していれば(S1712でYES)、すべての部分ベクトルについて類似していると判断されたため、2つの入力パターンは類似していると判定され(S1713)、処理を終了する。   If the value k of the counter 1605 matches the number of partial vectors (YES in S1712), since it is determined that all partial vectors are similar, it is determined that the two input patterns are similar (S1713). ), The process is terminated.

なお、しきい値TH0としきい値TH1とは独立して定めることができる。また、9個の部分ベクトルごとに相違するしきい値を設定することも可能である。経験的には、しきい値TH0はしきい値TH1よりも大きい方が良い結果が得られることが多い。これは複数の部分ベクトル同士の比較において、すべての部分ベクトル同士の類似度が一定値以上でなければ類似しているとは判断されず、部分ベクトルの比較については厳しい条件付けがされていることによる。一例としてしきい値TH0およびTH1をそれぞれ0.9および0.8とする。   Note that the threshold value TH0 and the threshold value TH1 can be determined independently. It is also possible to set different threshold values for every nine partial vectors. Empirically, better results are often obtained when the threshold value TH0 is larger than the threshold value TH1. This is because, in the comparison between a plurality of partial vectors, if the degree of similarity between all the partial vectors is not equal to or greater than a certain value, it is not determined that the vectors are similar, and the comparison of the partial vectors is strict. . As an example, threshold values TH0 and TH1 are set to 0.9 and 0.8, respectively.

ここでは、2つのパターンが類似しているか否かの指標として、値が高いほど2つのパターンが類似していることを示す内積を用いたが、値が小さいほど類似していることを示す尺度として、部分ベクトル間のユークリッド距離やシティブロック距離を用いてもよい。これは、S1705における、特徴ベクトルの比較についても同様である。   Here, as an indicator of whether two patterns are similar, an inner product indicating that the two patterns are more similar as the value is higher is used, but a scale indicating that the two patterns are more similar as the value is smaller. Alternatively, the Euclidean distance or the city block distance between the partial vectors may be used. The same applies to the comparison of feature vectors in S1705.

部分同士の比較を行なうのは以下のような理由による。すなわち、全体的に見れば類似しているが、部分的に見れば異なっているパターンを正しく識別するためである。図42(a)および図42(b)は、そのような類似したパターンの一例を示している。このようなパターンでも、図42(c)および図42(d)のように、右上の部分だけを抽出してみると、大きく異なっていることが分かる。そこで、全ての部分ベクトルについて、2つのパターンが類似していることを要求することで、正しい識別を行うことができ、図42(a)および(b)のような、異なる文字を表すパターンが共通の代表パターンで置換えられてしまうのを防ぐことができる。   The reason for comparing the parts is as follows. That is, it is for correctly identifying patterns that are similar on the whole but different on a partial basis. FIG. 42 (a) and FIG. 42 (b) show an example of such a similar pattern. Even in such a pattern, it can be seen that when only the upper right portion is extracted as shown in FIGS. Therefore, by requesting that two patterns are similar for all partial vectors, correct identification can be performed, and patterns representing different characters as shown in FIGS. It is possible to prevent replacement with a common representative pattern.

また、代表パターンを抽出する際にループ検出を行なっているのは、部分的な比較を行なっても識別が困難な入力パターンに対して、正しい識別を行うためである。例えば、図43(a)および(b)のような例では、図42に示した場合とは異なり、全体として類似しているだけでなく、もっとも違いが大きいと思われる右上の部分においても、図43(c)および(d)に示すように類似している。しかし、このような場合であってもループの数は異なる。このため、図43(a)および(b)のように異なる文字を表すパターンが共通の代表パターンで置換えられてしまうのを防ぐことができる。   The reason why loop detection is performed when extracting a representative pattern is to correctly identify an input pattern that is difficult to identify even if partial comparison is performed. For example, in the example as shown in FIGS. 43A and 43B, unlike the case shown in FIG. 42, not only is it similar as a whole, but also in the upper right part where the difference is considered to be the largest, Similar to FIGS. 43 (c) and 43 (d). However, even in such a case, the number of loops is different. Therefore, it is possible to prevent the patterns representing different characters from being replaced with a common representative pattern as shown in FIGS. 43 (a) and 43 (b).

図44を参照して、符号化データの復号処理について説明する。データ分離器2202は、符号化データバッファ2201に格納された符号化されたデータを、図13に示す代表パターン情報2101、代表パターン画像2102および入力パターン情報2103に分離する。データ分離器2202は、分離した代表パターン情報2101、代表パターン画像2102および入力パターン情報2103をそれぞれ代表パターン情報伸長器2203、代表パターン画像伸長器2204および入力パターン圧縮情報バッファ2205に送信する(S2301)。   With reference to FIG. 44, a decoding process of encoded data will be described. The data separator 2202 separates the encoded data stored in the encoded data buffer 2201 into representative pattern information 2101, representative pattern image 2102, and input pattern information 2103 shown in FIG. The data separator 2202 transmits the separated representative pattern information 2101, representative pattern image 2102 and input pattern information 2103 to the representative pattern information decompressor 2203, representative pattern image decompressor 2204 and input pattern compression information buffer 2205, respectively (S2301). .

代表パターン情報伸長器2203は、代表パターン情報2101を伸長して、代表パターン情報バッファ2206に格納する。(S2302)。代表パターン画像伸長器2204は、代表パターン画像2102を伸長して、代表パターン画像バッファ2207に格納する(S2303)。この時点で、代表パターン情報バッファ2206には図14に示すようなデータが記憶され、代表パターン画像バッファ2207には図15で示すようなデータが記憶されている。   The representative pattern information decompressor 2203 decompresses the representative pattern information 2101 and stores it in the representative pattern information buffer 2206. (S2302). The representative pattern image expander 2204 expands the representative pattern image 2102 and stores it in the representative pattern image buffer 2207 (S2303). At this time, the representative pattern information buffer 2206 stores data as shown in FIG. 14, and the representative pattern image buffer 2207 stores data as shown in FIG.

代表パターン画素値変換器2208は、代表パターン画像バッファ2207に格納された代表パターンの画素値を、画素値変換テーブル2209を使って復元する(S2304)。これは符号化時に減色された画素値を符号化前の階調数の画素値に戻す処理である。図45に、画素値変換テーブル2209の一例を示す。1行目が入力画素値を示し、2行目が対応する出力画素値を示す。   The representative pattern pixel value converter 2208 restores the pixel value of the representative pattern stored in the representative pattern image buffer 2207 using the pixel value conversion table 2209 (S2304). This is a process of returning the pixel value reduced during encoding to the pixel value of the number of gradations before encoding. FIG. 45 shows an example of the pixel value conversion table 2209. The first row shows the input pixel value, and the second row shows the corresponding output pixel value.

代表パターン画像オフセット生成器2210は、代表パターン情報バッファ2206に記憶されたデータに基づいて、代表パターン画像バッファ2207内での各代表パターンの記憶位置を、代表パターン画像バッファ2207の先頭からのオフセットとして計算する。代表パターン画像オフセット生成器2210は、オフセットを代表パターンの番号とオフセット値とが1対1対応する整数配列である代表パターン画像オフセットテーブル2211に格納する(S2305)。代表パターン情報バッファ2206に格納されている各代表パターンの横幅および縦幅の積がそのまま各代表パターンの伸長後の容量を示している。このため、オフセットは簡単に計算することができる。   Based on the data stored in the representative pattern information buffer 2206, the representative pattern image offset generator 2210 sets the storage position of each representative pattern in the representative pattern image buffer 2207 as an offset from the head of the representative pattern image buffer 2207. calculate. The representative pattern image offset generator 2210 stores the offset in the representative pattern image offset table 2211 which is an integer array in which the representative pattern number and the offset value have a one-to-one correspondence (S2305). The product of the horizontal width and the vertical width of each representative pattern stored in the representative pattern information buffer 2206 directly indicates the capacity after expansion of each representative pattern. For this reason, the offset can be easily calculated.

図12を参照して、入力パターン情報オフセット生成器2212は、入力パターン圧縮情報バッファ2205の先頭部分にあるページ数2105(Pと表す)から、P−1ページ目の入力パターンデータの圧縮後の容量2107までを参照して、各ページデータが入力パターン圧縮情報バッファ2205のどこから始まるかを計算する。入力パターン情報オフセット生成器2212は、計算の結果をページ番号とページデータの記憶場所とが1対1に対応する整数配列である入力パターン情報オフセットテーブル2213に書込む(S2306)。例えばiページ目に対応する、入力パターンデータのオフセットは、0ページ目から(i−1)ページ目までの入力パターンデータの圧縮後の容量の和として求められる。   Referring to FIG. 12, input pattern information offset generator 2212 calculates the number of pages 2105 (represented as P) at the head of input pattern compression information buffer 2205 after compression of input pattern data on page P−1. By referring to the capacity 2107, it is calculated where in the input pattern compression information buffer 2205 each page data starts. The input pattern information offset generator 2212 writes the calculation result in the input pattern information offset table 2213, which is an integer array in which page numbers and page data storage locations have a one-to-one correspondence (S2306). For example, the offset of the input pattern data corresponding to the i-th page is obtained as the sum of the compressed capacities of the input pattern data from the 0th page to the (i−1) -th page.

ページカウンタ2214が0に初期化される(S2307)。以下、ページカウンタ2214の値をiとする。ページ画像バッファ初期化器2216は、ページ画像バッファ2215に記憶される画像の画素値を背景色と同一の値に初期化する(S2308)。ここでは、背景色の値は255で表わされるものとする。ここではページ画像バッファ2215に格納される画像の背景色は固定値としているが、背景色も符号化し、背景の画素値を可変にしてもよい。   The page counter 2214 is initialized to 0 (S2307). Hereinafter, the value of the page counter 2214 is i. The page image buffer initializer 2216 initializes the pixel value of the image stored in the page image buffer 2215 to the same value as the background color (S2308). Here, the value of the background color is represented by 255. Here, the background color of the image stored in the page image buffer 2215 is a fixed value, but the background color may also be encoded to change the background pixel value.

入力パターン情報伸長器2217は、入力パターン圧縮情報バッファ2205および入力パターン情報オフセットテーブル2213を参照して、iページ目に含まれる入力パターン情報を伸長して、入力パターン情報バッファ2218に格納する(S2309)。入力パターンカウンタ2219が0に初期化される(S2310)。以下、入力パターンカウンタ2219の値をjで表す。   The input pattern information decompressor 2217 refers to the input pattern compression information buffer 2205 and the input pattern information offset table 2213, decompresses the input pattern information included in the i-th page, and stores it in the input pattern information buffer 2218 (S2309). ). The input pattern counter 2219 is initialized to 0 (S2310). Hereinafter, the value of the input pattern counter 2219 is represented by j.

画素密度変換器2220は、入力パターン情報バッファ2218に記憶されたデータより、iページ目のj番目の入力パターンの横幅および縦幅を計算する(S2311)。   The pixel density converter 2220 calculates the horizontal width and vertical width of the j-th input pattern of the i-th page from the data stored in the input pattern information buffer 2218 (S2311).

入力パターン情報バッファ2218および代表パターン情報バッファ2206に記憶されたデータから、入力パターンおよびその入力パターンを表わす代表パターンの横幅および縦幅が抽出され、横幅および縦幅がそれぞれ比較される。横幅および縦幅のいずれかまたは双方が一致しなければ(S2312でNO)、画素密度変換器2220は、代表パターンの縦幅および横幅のうち一致しない方または双方を、入力パターンのそれと一致するように変換する(S2313)。画像サイズの変換方法としては、共一次内挿法などの方法が従来提案されている。これらの方法は公知の技術であるため、その詳細な説明はここでは繰返さない。なお、そのような方法について、高木他「画像解析ハンドブック」(東京大学出版会、1991年)PP.441〜PP.444に詳しく記載されている。   From the data stored in the input pattern information buffer 2218 and the representative pattern information buffer 2206, the horizontal width and vertical width of the input pattern and the representative pattern representing the input pattern are extracted, and the horizontal width and vertical width are respectively compared. If either or both of the horizontal width and the vertical width do not match (NO in S2312), the pixel density converter 2220 makes the non-matching one or both of the vertical width and horizontal width of the representative pattern match that of the input pattern. (S2313). As a method for converting the image size, a method such as bilinear interpolation has been conventionally proposed. Since these methods are known techniques, detailed description thereof will not be repeated here. For such a method, Takagi et al., “Image Analysis Handbook” (The University of Tokyo Press, 1991) PP. 441-PP. 444 in detail.

代表パターンの横幅および縦幅を入力パターンと一致させた後(S2313またはS2312でYES)、ページ画像バッファ2215の入力パターンが存在する位置に、代表パターンをはめ込む(S2314)。   After the horizontal width and vertical width of the representative pattern are matched with the input pattern (YES in S2313 or S2312), the representative pattern is inserted into the position where the input pattern of the page image buffer 2215 exists (S2314).

なお、ここではサイズが完全に一致した場合のみ、S2313の処理を省略しているが、さらに条件を緩めて、横幅、縦幅の違いが小さい場合はS2313を省略することで、画質にそれほど影響を与えずに高速化が可能である。   Here, the processing of S2313 is omitted only when the sizes completely match, but the conditions are further relaxed, and when the difference between the horizontal width and the vertical width is small, omitting S2313 has a significant effect on the image quality. Can be speeded up without giving

入力パターンカウンタ2219が1つインクリメントされる(S2114)。入力パターンカウンタ2219の値jがiページ目の入力パターンの数と一致しているか否かが調べられる(S2316)。入力パターンカウンタ2219の値jが入力パターンの数と一致していなければ(S2316でYES)、残りの入力パターンについても同様の処理を繰返すため、制御はS2311に戻る。   The input pattern counter 2219 is incremented by 1 (S2114). It is checked whether or not the value j of the input pattern counter 2219 matches the number of input patterns on the i-th page (S2316). If the value j of the input pattern counter 2219 does not match the number of input patterns (YES in S2316), the same processing is repeated for the remaining input patterns, and the control returns to S2311.

入力パターンカウンタ2219の値jが入力パターンの数と一致していれば(S2316でYES)、iページ目に対する処理は終了したため、ページカウンタ2214が1つインクリメントされる(S2319)。   If the value j of the input pattern counter 2219 matches the number of input patterns (YES in S2316), the process for the i-th page is completed, and the page counter 2214 is incremented by 1 (S2319).

ページカウンタ2214の値iがページ数と一致しているか否か調べられ(S2318)、ページ数と一致していなければ(S2318でNO)、残りのページに対して処理を行なうため、制御はS2308に戻る。   It is checked whether or not the value i of the page counter 2214 matches the number of pages (S2318). If the number i does not match the number of pages (NO in S2318), the process is performed on the remaining pages, so the control is S2308. Return to.

ページ数と一致していれば(S2318でYES)、すべてのページに対して処理が終了したため、画像を出力した後(S2319)、処理を終了する。   If it matches the number of pages (YES in S2318), the processing is completed for all pages, so after outputting the image (S2319), the processing is terminated.

以上説明したように、本発明の実施の形態によれば入力パターンが特徴ベクトルとして表わされ、特徴ベクトルを構成する部分ベクトル同士が比較される。このように入力パターンを部分的に比較することにより、全体的に見れば類似しているが、部分的に見れば類似していない文字を峻別することができる。このため、入力パターンの置換え誤りを減少させることができる。   As described above, according to the embodiment of the present invention, an input pattern is represented as a feature vector, and partial vectors constituting the feature vector are compared with each other. Thus, by partially comparing the input patterns, it is possible to distinguish characters that are similar in overall view but are not similar in partial view. For this reason, the replacement error of the input pattern can be reduced.

また、ループの個数を検出することにより、部分的に見ても類似しているが、異なる文字を正確に峻別することができる。このため、入力パターンの置換え誤りを減少させることができる。   Also, by detecting the number of loops, although partially similar, it is possible to accurately distinguish different characters. For this reason, the replacement error of the input pattern can be reduced.

さらに、入力パターンの類似範囲を連鎖的に拡大することにより、入力パターンを表わす代表パターンの個数を減少させることができる。このため、符号化効率を高く保つことができる。   Furthermore, the number of representative patterns representing an input pattern can be reduced by chaining the similarity range of the input pattern. For this reason, encoding efficiency can be kept high.

さらにまた、代表パターンとして画像データより切出された文字を使用している。このため、入力パターンを文字認識して文字のコードで代表パターンを表わす場合のように、文字認識による入力パターンの置換え誤りが発生しない。   Furthermore, characters cut out from the image data are used as the representative pattern. Therefore, the input pattern replacement error due to character recognition does not occur as in the case where the input pattern is recognized and the representative pattern is represented by the character code.

また、連結成分を入力パターンとする場合のように、復号画像の違和感が発生しない。   Further, unlike the case where the connected component is used as an input pattern, there is no sense of incongruity in the decoded image.

画像復号時には、入力パターンの座標位置に代表パターンを順次貼付けるだけで画像が作成できる。このため、高速に画像を復元することができる。   At the time of image decoding, an image can be created by simply pasting the representative pattern to the coordinate position of the input pattern. For this reason, an image can be restored at high speed.

また、入力パターンの座標位置の符号化単位が、文書のページに対応しているため、所望のページに対応する画像のみを容易に復号できる。   Further, since the encoding unit of the coordinate position of the input pattern corresponds to the page of the document, only the image corresponding to the desired page can be easily decoded.

本発明による、図形に含まれるループ数の計算方法では、非背景領域のループ数の計算が、背景領域に着目し、そこから検出された、連結成分の外接矩形で、端に達していないものだけを数えることで、従来の、ループを実際に検出してから、検出されたループ数を数える手法に比べて容易に行なえる。   In the calculation method of the number of loops included in a figure according to the present invention, the calculation of the number of loops in the non-background region is a circumscribed rectangle of the connected component detected from the background region and does not reach the end. By counting only, it is easier to perform than the conventional method of actually detecting a loop and counting the number of detected loops.

また、このような構成をとることで、検出するループの開口部の形状、サイズに条件を課すことも、ループの開口部の外接矩形の形状、サイズに関する条件と置換えることができる限りは容易に実現できる。   In addition, by adopting such a configuration, it is easy to place conditions on the shape and size of the opening of the loop to be detected as long as it can be replaced with the conditions on the shape and size of the circumscribed rectangle of the loop opening. Can be realized.

上述した画像符号化装置および画像復号装置は、コンピュータとコンピュータ上で動作するプログラムで実現することが可能である。画像符号化処理のプログラムおよび画像復号処理のプログラムはCD−ROM(Compact Disc-Read Only Memory)等のコンピュータ読取可能な記録媒体により提供され、コンピュータがそのプログラムを読取って実行するようにしても良い。また、ネットワークを介して配信されたプログラムをコンピュータが受信し、受信したプログラムを実行するようにしても良い。   The above-described image encoding device and image decoding device can be realized by a computer and a program operating on the computer. The image encoding processing program and the image decoding processing program may be provided by a computer-readable recording medium such as a CD-ROM (Compact Disc-Read Only Memory), and the computer may read and execute the program. . The computer may receive a program distributed via a network and execute the received program.

今回開示された実施の形態はすべての点で例示であって制限的なものではないと考えられるべきである。本発明の範囲は上記した説明ではなくて特許請求の範囲によって示され、特許請求の範囲と均等の意味および範囲内でのすべての変更が含まれることが意図される。   The embodiment disclosed this time should be considered as illustrative in all points and not restrictive. The scope of the present invention is defined by the terms of the claims, rather than the description above, and is intended to include any modifications within the scope and meaning equivalent to the terms of the claims.

本発明の実施の形態に係る画像符号化装置の構成を示す図である。It is a figure which shows the structure of the image coding apparatus which concerns on embodiment of this invention. 入力パターン抽出器305の構成を示すブロック図である。3 is a block diagram showing a configuration of an input pattern extractor 305. FIG. 代表パターン抽出器311の構成を示すブロック図である。5 is a block diagram showing a configuration of a representative pattern extractor 311. FIG. ループ検出器1001の構成を示すブロック図である。2 is a block diagram showing a configuration of a loop detector 1001. FIG. パターン比較器1005の構成を示すブロック図である。4 is a block diagram showing a configuration of a pattern comparator 1005. FIG. 本発明の実施の形態に係る画像復号装置の構成を示すブロック図である。It is a block diagram which shows the structure of the image decoding apparatus which concerns on embodiment of this invention. 画像符号化処理のフローチャートである。It is a flowchart of an image encoding process. 画像データバッファ304に格納されるデータの一例を示す図である。4 is a diagram illustrating an example of data stored in an image data buffer 304. FIG. 入力画像の一部を拡大した図である。It is the figure which expanded a part of input image. 入力画像から得られた入力パターンを示す図である。It is a figure which shows the input pattern obtained from the input image. 入力画像から切出された文字を示す図である。It is a figure which shows the character cut out from the input image. 入力パターン情報2103の一例を示す図である。5 is a diagram illustrating an example of input pattern information 2103. FIG. 符号化データバッファ320に格納されたデータの一例を示す図である。4 is a diagram illustrating an example of data stored in an encoded data buffer 320. FIG. 代表パターン情報2101の一例を示す図である。5 is a diagram illustrating an example of representative pattern information 2101. FIG. 代表パターン画像2102の一例を示す図である。5 is a diagram illustrating an example of a representative pattern image 2102. FIG. 2値画像より入力パターンを抽出する処理のフローチャートである。It is a flowchart of the process which extracts an input pattern from a binary image. 文字列より入力パターンを抽出する処理の具体例を説明するための図である。It is a figure for demonstrating the specific example of the process which extracts an input pattern from a character string. 代表パターンを抽出する処理のフローチャートである。It is a flowchart of the process which extracts a representative pattern. ループ数の異なる入力パターンの一例を示す図である。It is a figure which shows an example of the input pattern from which the number of loops differs. 代表パターンラベルバッファ312の値の詰め直し処理を説明するための図である。FIG. 10 is a diagram for explaining a process of repacking values in a representative pattern label buffer 312; 代表パターンラベルバッファ312の値の変化を説明するための図である。It is a figure for demonstrating the change of the value of the representative pattern label buffer 312. FIG. 代表パターンラベルバッファ312の値の変化を説明するための図である。It is a figure for demonstrating the change of the value of the representative pattern label buffer 312. FIG. 代表パターンラベルバッファ312の値の変化を説明するための図である。It is a figure for demonstrating the change of the value of the representative pattern label buffer 312. FIG. 代表パターンラベルバッファ312の値の変化を説明するための図である。It is a figure for demonstrating the change of the value of the representative pattern label buffer 312. FIG. 代表パターンラベルバッファ312の値の変化を説明するための図である。It is a figure for demonstrating the change of the value of the representative pattern label buffer 312. FIG. 代表パターンラベルバッファ312の値の変化を説明するための図である。It is a figure for demonstrating the change of the value of the representative pattern label buffer 312. FIG. 代表パターンラベルバッファ312の値の変化を説明するための図である。It is a figure for demonstrating the change of the value of the representative pattern label buffer 312. FIG. 代表パターンラベルバッファ312の値の変化を説明するための図である。It is a figure for demonstrating the change of the value of the representative pattern label buffer 312. FIG. 代表パターンラベルバッファ312の値の変化を説明するための図である。It is a figure for demonstrating the change of the value of the representative pattern label buffer 312. FIG. 代表パターンラベルバッファ312の値の変化を説明するための図である。It is a figure for demonstrating the change of the value of the representative pattern label buffer 312. FIG. 代表パターンラベルバッファ312の値の変化を説明するための図である。It is a figure for demonstrating the change of the value of the representative pattern label buffer 312. FIG. 代表パターンラベルバッファ312の値の変化を説明するための図である。It is a figure for demonstrating the change of the value of the representative pattern label buffer 312. FIG. 代表パターンラベルバッファ312の値の変化を説明するための図である。It is a figure for demonstrating the change of the value of the representative pattern label buffer 312. FIG. 代表パターンラベルバッファ312の値の変化を説明するための図である。It is a figure for demonstrating the change of the value of the representative pattern label buffer 312. FIG. 代表パターンラベルバッファ312の値の変化を説明するための図である。It is a figure for demonstrating the change of the value of the representative pattern label buffer 312. FIG. 代表パターンラベルバッファ312の値の変化を説明するための図である。It is a figure for demonstrating the change of the value of the representative pattern label buffer 312. FIG. 入力パターンに含まれるループの数を検出する処理のフローチャートである。It is a flowchart of the process which detects the number of loops contained in an input pattern. ループ検出器1001による処理の一例を説明するための図である。6 is a diagram for explaining an example of processing by a loop detector 1001. FIG. パターン比較器1005による入力パターンの比較処理のフローチャートである。10 is a flowchart of input pattern comparison processing by the pattern comparator 1005; 入力パターンより特徴量を抽出する処理を説明するための図である。It is a figure for demonstrating the process which extracts the feature-value from an input pattern. 特徴ベクトルと部分ベクトルとの関係を説明するための図である。It is a figure for demonstrating the relationship between a feature vector and a partial vector. 部分的に異なるパターンを説明するための図である。It is a figure for demonstrating a partially different pattern. ループ数が異なるパターンを説明するための図である。It is a figure for demonstrating the pattern from which the number of loops differs. 符号化データの復号処理のフローチャートである。It is a flowchart of a decoding process of encoded data. 画素値変換テーブル2209の一例を示す図である。It is a figure which shows an example of the pixel value conversion table 2209. 入力パターンの置換え誤りの一例を説明するための図である。It is a figure for demonstrating an example of the replacement error of an input pattern. 入力パターンの分布を示す図である。It is a figure which shows distribution of an input pattern. 従来の入力パターンの符号化を説明するための図である。It is a figure for demonstrating the encoding of the conventional input pattern. 従来の入力パターンの符号化を説明するための図である。It is a figure for demonstrating the encoding of the conventional input pattern. 従来の入力パターンの符号化を説明するための図である。It is a figure for demonstrating the encoding of the conventional input pattern. 従来の入力パターンの符号化を説明するための図である。It is a figure for demonstrating the encoding of the conventional input pattern. 従来の入力パターンの符号化を説明するための図である。It is a figure for demonstrating the encoding of the conventional input pattern. 従来の入力パターンの符号化の問題点を説明するための図である。It is a figure for demonstrating the problem of the encoding of the conventional input pattern.

符号の説明Explanation of symbols

301 オートフィーダ、302 カウンタ、303 スキャナ、304 画像データバッファ、305 入力パターン抽出器、306 ページカウンタ、307 2値化しきい値算出器、308 2値化しきい値バッファ、309 入力パターン画像バッファ、310 入力パターン情報バッファ、311 代表パターン抽出器、312 代表パターンラベルバッファ、313 代表パターン画像バッファ、314 代表パターン情報バッファ、315 代表パターン情報圧縮器、316 代表パターン画像減色器、317 入力パターン情報圧縮器、318 代表パターン画像圧縮器、319 データ混合器、320 符号化データバッファ。   301 Auto Feeder, 302 Counter, 303 Scanner, 304 Image Data Buffer, 305 Input Pattern Extractor, 306 Page Counter, 307 Binary Threshold Calculator, 308 Binary Threshold Buffer, 309 Input Pattern Image Buffer, 310 Input Pattern information buffer, 311 representative pattern extractor, 312 representative pattern label buffer, 313 representative pattern image buffer, 314 representative pattern information buffer, 315 representative pattern information compressor, 316 representative pattern image color reducer, 317 input pattern information compressor, 318 Representative pattern image compressor, 319 data mixer, 320 encoded data buffer.

Claims (10)

画像データより抽出されるパターンであって文字または文字を構成する部分を入力パターンとして当該画像データから抽出するための入力パターン抽出手段と、
前記入力パターン抽出手段によって抽出された第1の入力パターンについて、当該第1の入力パターンに類似する第2の入力パターンに類似する第3の入力パターンを、当該第1の入力パターンに類似する入力パターンとするための類似拡大手段と、
前記類似拡大手段によって相互に類似すると判断された入力パターンの中から、入力パターンを分類するクラスを代表する代表パターンを抽出するための代表パターン抽出手段と、
前記代表パターンの画像および前記入力パターンの座標位置を出力するための出力手段とを含む、画像符号化装置。
An input pattern extracting means for extracting from the image data as a pattern that is extracted from the image data and constituting a character or a part constituting the character ;
With the first input pattern extracted by said input pattern extraction means, similar to the third input pattern similar to the second input pattern similar to the first input pattern, to the first input pattern Similar enlargement means for making the input pattern
Representative pattern extraction means for extracting a representative pattern representing a class for classifying the input pattern from among the input patterns determined to be similar to each other by the similarity enlargement means;
An image encoding device comprising: an image of the representative pattern and an output means for outputting a coordinate position of the input pattern.
前記代表パターン抽出手段は、入力パターンを構成する部分ごとに入力パターン同士を比較し、相互に類似する入力パターンの中から代表パターンを抽出する、請求項1に記載の画像符号化装置。   The image coding apparatus according to claim 1, wherein the representative pattern extraction unit compares the input patterns for each portion constituting the input pattern, and extracts the representative pattern from among similar input patterns. 画像データより抽出されるパターンであって文字または文字を構成する部分を入力パターンとして当該画像データから抽出するステップと、
抽出された第1の入力パターンについて、当該第1の入力パターンに類似する第2の入力パターンに類似する第3の入力パターンを、当該第1の入力パターンに類似する入力パターンとするステップと、
相互に類似する入力パターンの中から、入力パターンを分類するクラスを代表する代表パターンを抽出するステップと、
前記代表パターンの画像および前記入力パターンの座標位置を出力するステップとを含む、画像符号化方法。
A pattern extracted from the image data and extracting a character or a part constituting the character from the image data as an input pattern;
With the first input pattern extracted, the step of the input pattern the third input pattern similar to the second input pattern similar to the first input pattern, similar to the first input pattern When,
Extracting a representative pattern representing a class for classifying the input pattern from among input patterns similar to each other;
Outputting an image of the representative pattern and a coordinate position of the input pattern.
前記代表パターンを抽出するステップは、入力パターンを構成する部分ごとに入力パターン同士を比較し、相互に類似する入力パターンの中から代表パターンを抽出するステップを含む、請求項3に記載の画像符号化方法。   The image code according to claim 3, wherein the step of extracting the representative pattern includes a step of comparing the input patterns for each portion constituting the input pattern and extracting the representative pattern from among the input patterns similar to each other. Method. 請求項3または請求項4に記載の画像符号化方法で符号化されたデータより、画像を復号する画像復号方法であって、
符号化されたデータより代表パターンの画像および入力パターンの座標位置を抽出するステップと、
入力パターンの座標位置に当該入力パターンを代表する代表パターンを貼付けるステップとを含む、画像復号方法。
An image decoding method for decoding an image from data encoded by the image encoding method according to claim 3 or 4,
Extracting the image of the representative pattern and the coordinate position of the input pattern from the encoded data;
Pasting a representative pattern representing the input pattern to the coordinate position of the input pattern.
コンピュータで実行可能な画像符号化方法のプログラムを記録したコンピュータ読取可能な記録媒体であって、
前記画像符号化方法は、
画像データより抽出されるパターンであって文字または文字を構成する部分を入力パターンとして当該画像データから抽出するステップと、
抽出された第1の入力パターンについて、当該第1の入力パターンに類似する第2の入力パターンに類似する第3の入力パターンを、当該第1の入力パターンに類似する入力パターンとするステップと、
相互に類似する入力パターンの中から、入力パターンを分類するクラスを代表する代表パターンを抽出するステップと、
前記代表パターンの画像および前記入力パターンの座標位置を出力するステップとを含む、コンピュータ読取可能な記録媒体。
A computer-readable recording medium that records a computer-executable image encoding method program,
The image encoding method includes:
A pattern extracted from the image data and extracting a character or a part constituting the character from the image data as an input pattern;
With the first input pattern extracted, the step of the input pattern the third input pattern similar to the second input pattern similar to the first input pattern, similar to the first input pattern When,
Extracting a representative pattern representing a class for classifying the input pattern from among input patterns similar to each other;
A computer-readable recording medium comprising: outputting an image of the representative pattern and a coordinate position of the input pattern.
前記代表パターンを抽出するステップは、
入力パターンを構成する部分ごとに入力パターン同士を比較し、相互に類似する入力パターンの中から代表パターンを抽出するステップを含む、請求項6に記載のコンピュータ読取可能な記録媒体。
The step of extracting the representative pattern includes:
The computer-readable recording medium according to claim 6, comprising comparing the input patterns for each portion constituting the input pattern and extracting a representative pattern from among the input patterns similar to each other.
コンピュータで実行可能な画像復号方法のプログラムを記録したコンピュータ読取可能な記録媒体であって、
前記画像復号方法は、
請求項3または請求項4に記載の画像符号化方法で符号化されたデータより、画像を復号する画像復号方法であって、
符号化されたデータより代表パターンの画像および入力パターンの座標位置を抽出するステップと、
入力パターンの座標位置に当該入力パターンを分類するクラスを代表する代表パターンを貼付けるステップとを含む、コンピュータ読取可能な記録媒体。
A computer-readable recording medium that records a computer-executable image decoding method program,
The image decoding method includes:
An image decoding method for decoding an image from data encoded by the image encoding method according to claim 3 or 4,
Extracting the image of the representative pattern and the coordinate position of the input pattern from the encoded data;
Pasting a representative pattern representing a class for classifying the input pattern at the coordinate position of the input pattern.
請求項1または請求項2に記載の画像符号化装置で符号化されたデータより、画像を復号する画像復号装置であって、
画像データより抽出されるパターンであって文字または文字を構成する部分を入力パターンとして当該画像データから抽出する入力パターン抽出手段と、
抽出された入力パターン同士を、入力パターンを構成する部分ごとに比較し、相互に類似する入力パターンの中から、入力パターンを分類するクラスを代表する代表パターンを抽出する代表パターン抽出手段と、
前記代表パターンの画像および前記入力パターンの座標位置を出力する出力手段とを含む、画像復号装置。
An image decoding apparatus that decodes an image from data encoded by the image encoding apparatus according to claim 1 or 2,
An input pattern extracting means for extracting from the image data as an input pattern a pattern extracted from the image data and constituting a character or a character ;
Representative pattern extraction means for comparing the extracted input patterns for each part constituting the input pattern and extracting a representative pattern representing a class for classifying the input pattern from among similar input patterns;
An image decoding apparatus comprising: an output unit that outputs an image of the representative pattern and a coordinate position of the input pattern.
画像データより抽出されるパターンであって文字または文字を構成する部分を入力パターンとして当該画像データから抽出するための入力パターン抽出手段と、
前記入力パターン抽出手段によって抽出された第1の入力パターンについて、当該第1の入力パターンに類似する第2の入力パターンに類似する第3の入力パターンを、当該第1の入力パターンに類似する入力パターンとするための類似拡大手段と、
前記類似拡大手段によって相互に類似すると判断された入力パターンの中から、入力パターンを分類するクラスを代表する代表パターンを抽出するための代表パターン抽出手段と、
前記代表パターンの画像および前記入力パターンの座標位置を出力するための出力手段とを含み、
前記出力手段は、前記代表パターンと前記入力パターンとを対応付けるための整数配列を出力する、画像符号化装置。
An input pattern extracting means for extracting from the image data as a pattern that is extracted from the image data and constituting a character or a part constituting the character ;
With the first input pattern extracted by said input pattern extraction means, similar to the third input pattern similar to the second input pattern similar to the first input pattern, to the first input pattern Similar enlargement means for making the input pattern
Representative pattern extraction means for extracting a representative pattern representing a class for classifying the input pattern from among the input patterns determined to be similar to each other by the similarity enlargement means;
Output means for outputting the image of the representative pattern and the coordinate position of the input pattern,
The image encoding device, wherein the output means outputs an integer array for associating the representative pattern with the input pattern.
JP2004238698A 2004-08-18 2004-08-18 Image encoding device, image decoding device, image encoding method, computer-readable recording medium recording program of image encoding method, and computer-readable recording medium recording program of image decoding method and image decoding method Expired - Fee Related JP5051971B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004238698A JP5051971B2 (en) 2004-08-18 2004-08-18 Image encoding device, image decoding device, image encoding method, computer-readable recording medium recording program of image encoding method, and computer-readable recording medium recording program of image decoding method and image decoding method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004238698A JP5051971B2 (en) 2004-08-18 2004-08-18 Image encoding device, image decoding device, image encoding method, computer-readable recording medium recording program of image encoding method, and computer-readable recording medium recording program of image decoding method and image decoding method

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2000073654A Division JP3604993B2 (en) 2000-03-16 2000-03-16 Image encoding device, image encoding method, image decoding device, and image decoding method

Publications (3)

Publication Number Publication Date
JP2005006353A JP2005006353A (en) 2005-01-06
JP2005006353A5 JP2005006353A5 (en) 2007-05-10
JP5051971B2 true JP5051971B2 (en) 2012-10-17

Family

ID=34101442

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004238698A Expired - Fee Related JP5051971B2 (en) 2004-08-18 2004-08-18 Image encoding device, image decoding device, image encoding method, computer-readable recording medium recording program of image encoding method, and computer-readable recording medium recording program of image decoding method and image decoding method

Country Status (1)

Country Link
JP (1) JP5051971B2 (en)

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0683574A (en) * 1991-03-20 1994-03-25 Fujitsu Ltd Data compression and restoring system
JP2526783B2 (en) * 1993-05-31 1996-08-21 日本電気株式会社 Region shape encoding / decoding method
JP3031603B2 (en) * 1994-07-15 2000-04-10 株式会社リコー Image compression method
JPH0832816A (en) * 1994-07-20 1996-02-02 Ricoh Co Ltd Image compression method
JPH08130652A (en) * 1994-10-28 1996-05-21 Nippon Steel Corp Compression and expansion system for two-dimension image data
JP3150856B2 (en) * 1994-10-12 2001-03-26 株式会社リコー Image processing method

Also Published As

Publication number Publication date
JP2005006353A (en) 2005-01-06

Similar Documents

Publication Publication Date Title
KR101463499B1 (en) Character recognition device, character recognition method, character recognition system, and character recognition program
CN101558425B (en) Image processing apparatus, image processing method
EP2224359B1 (en) Image processing apparatus, image processing method, and computer program
US8908961B2 (en) System and methods for arabic text recognition based on effective arabic text feature extraction
CA2057243C (en) Segmentation of handwriting and machine printed text
JP5528121B2 (en) Image processing apparatus, image processing method, and program
US8396294B2 (en) Image processing device, image processing method, and program and recording medium thereof
JP4504702B2 (en) Document processing apparatus, document processing method, and document processing program
EP1480158A1 (en) Systems and methods for adaptive handwriting recognition
KR20080026128A (en) Grammatical parsing of document visual structures
CN109168006A (en) The video coding-decoding method that a kind of figure and image coexist
JP3604993B2 (en) Image encoding device, image encoding method, image decoding device, and image decoding method
Lemaitre et al. Multiresolution cooperation makes easier document structure recognition
JP5051971B2 (en) Image encoding device, image decoding device, image encoding method, computer-readable recording medium recording program of image encoding method, and computer-readable recording medium recording program of image decoding method and image decoding method
US20090290797A1 (en) Image processing for storing objects separated from an image in a storage device
JPH07168913A (en) Character recognition system
Colaco et al. Design and implementation of Konkani text to speech generation system using OCR technique
JPH04172574A (en) Graph recognition device
Verma et al. Image to Sound Conversion
Song et al. Content-independent font recognition on a single Chinese character using sparse representation
KR20010083265A (en) Character Feature Extraction Apparatus And Method For Recognition Of Multi-Language Printed Document
JPH0772978A (en) Electronic blackboard
JPH07104940B2 (en) Figure recognition device
KR20060056408A (en) Method and system for compressing handwritten character templates
JP2733057B2 (en) String component extraction device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20070315

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070316

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100323

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100513

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20110315

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120327

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20120724

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20150803

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees