[go: up one dir, main page]

JP2005301662A - Image dictionary forming device, encoding device, image dictionary forming method, and program thereof - Google Patents

Image dictionary forming device, encoding device, image dictionary forming method, and program thereof Download PDF

Info

Publication number
JP2005301662A
JP2005301662A JP2004116646A JP2004116646A JP2005301662A JP 2005301662 A JP2005301662 A JP 2005301662A JP 2004116646 A JP2004116646 A JP 2004116646A JP 2004116646 A JP2004116646 A JP 2004116646A JP 2005301662 A JP2005301662 A JP 2005301662A
Authority
JP
Japan
Prior art keywords
image
character
unit
pattern
font
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.)
Granted
Application number
JP2004116646A
Other languages
Japanese (ja)
Other versions
JP4645058B2 (en
Inventor
Shunichi Kimura
俊一 木村
Yutaka Koshi
裕 越
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.)
Fujifilm Business Innovation Corp
Original Assignee
Fuji Xerox Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fuji Xerox Co Ltd filed Critical Fuji Xerox Co Ltd
Priority to JP2004116646A priority Critical patent/JP4645058B2/en
Publication of JP2005301662A publication Critical patent/JP2005301662A/en
Application granted granted Critical
Publication of JP4645058B2 publication Critical patent/JP4645058B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Character Discrimination (AREA)
  • Compression Of Band Width Or Redundancy In Fax (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide an encoding device which performs encoding by forming an image dictionary realizing high encoding efficiency and applying the image dictionary. <P>SOLUTION: An image processor 2 acquires a character image included in an input image and the character code of the character image, reads one or more font images corresponding to the acquired character code out of a font database, and compares the read font images with the character image in the input image to decide degrees of coincidence. Further, the image processor selects a font image to be registered as an image pattern out of those font images based upon the decided degrees of coincidence, gives an index to the selected font image, and registers it as an image dictionary. <P>COPYRIGHT: (C)2006,JPO&NCIPI

Description

本発明は、入力画像を構成する画像パターンとこの画像パターンの識別情報とを互いに対応付ける画像辞書を作成し、作成された画像辞書を符号化処理に適用する符号化装置に関する。   The present invention relates to an encoding apparatus that creates an image dictionary that associates an image pattern constituting an input image with identification information of the image pattern, and applies the created image dictionary to an encoding process.

例えば、特許文献1は、符号化側及び復号側に共通のフォントデータベースを備え、文字コード及びフォントの種類等を符号化する文字領域符号化方法を開示する。
特開平10−178638号公報
For example, Patent Document 1 discloses a character area encoding method that includes a common font database on the encoding side and the decoding side and encodes character codes, font types, and the like.
JP-A-10-178638

本発明は、上述した背景からなされたものであり、高い符号化効率を実現する画像辞書を作成し、この画像辞書を適用して符号化する符号化装置を提供することを目的とする。   The present invention has been made from the above-described background, and an object of the present invention is to provide an encoding apparatus that creates an image dictionary that realizes high encoding efficiency and encodes the image dictionary using the image dictionary.

[画像辞書作成装置]
上記目的を達成するために、本発明にかかる画像辞書作成装置は、類型的な文字画像をテンプレート画像として提供するテンプレート提供手段と、入力画像に含まれる文字画像と、前記テンプレート提供手段により提供されるテンプレート画像との一致度合いを判定する一致判定手段と、前記一致判定手段により判定された一致度合いに基づいて、前記テンプレート提供手段により提供されたテンプレート画像を、この入力画像において類型的な画像パターンとして決定する類型決定手段と、前記類型決定手段により決定された画像パターンに対して、それぞれの画像パターンを識別する識別情報を付与する識別情報付与手段とを有する。
[Image dictionary creation device]
In order to achieve the above object, an image dictionary creating apparatus according to the present invention is provided by a template providing unit that provides a typical character image as a template image, a character image included in an input image, and the template providing unit. A matching determination unit for determining a matching degree with a template image to be obtained, and a template image provided by the template providing unit based on the matching degree determined by the matching determination unit. And a type determining unit for adding identification information for identifying each image pattern to the image pattern determined by the type determining unit.

好適には、前記テンプレート提供手段は、前記テンプレート画像として、フォント画像を提供し、前記一致判定手段は、提供されるフォント画像と、入力画像に含まれる文字画像とを比較して、一致度合いを判定する。   Preferably, the template providing means provides a font image as the template image, and the match determination means compares the provided font image with a character image included in the input image, and determines the degree of match. judge.

好適には、文字コードそれぞれに対応付けて、少なくとも1つのフォント画像を記憶するフォント記憶手段と、入力画像に含まれる文字画像の文字コードを取得する情報取得手段とをさらに有し、前記テンプレート提供手段は、前記情報取得手段により取得された文字コードに対応するフォント画像を前記フォント記憶手段から読み出し、読み出されたフォント画像を前記テンプレート画像として提供し、前記一致判定手段は、提供されるフォント画像と、入力画像に含まれる文字画像とを比較して、一致度合いを判定する。   Preferably, the template provision unit further includes a font storage unit that stores at least one font image in association with each character code, and an information acquisition unit that acquires a character code of the character image included in the input image. The means reads out a font image corresponding to the character code acquired by the information acquisition means from the font storage means, provides the read font image as the template image, and the match determination means includes the provided font The degree of coincidence is determined by comparing the image and the character image included in the input image.

好適には、前記一致判定手段は、前記テンプレート提供手段により文字コードに対応する複数のフォント画像が提供された場合に、提供された複数のフォント画像それぞれと、入力画像に含まれる文字画像とを比較して、それぞれのフォント画像について一致度合いを判定し、前記類型決定手段は、それぞれのフォント画像について判定された一致度合いに基づいて、この文字画像と最も一致するフォント画像を画像パターンとして選択する。   Preferably, when the template providing unit provides a plurality of font images corresponding to a character code, the match determination unit includes a plurality of provided font images and a character image included in the input image. In comparison, the degree of coincidence is determined for each font image, and the type determining means selects, as the image pattern, the font image that most closely matches the character image based on the degree of coincidence determined for each font image. .

好適には、入力画像における文字画像それぞれの領域を示す文字領域情報を取得する情報取得手段と、前記情報取得手段により取得された文字領域情報に基づいて、入力画像から文字画像を抽出する文字画像抽出手段とをさらに有し、前記一致判定手段は、前記文字画像抽出手段により抽出された文字画像と、前記テンプレート提供手段により提供されたテンプレート画像とを比較して、一致度合いを判定する。   Preferably, an information acquisition unit that acquires character region information indicating a region of each character image in the input image, and a character image that extracts a character image from the input image based on the character region information acquired by the information acquisition unit And a matching unit that compares the character image extracted by the character image extracting unit with the template image provided by the template providing unit to determine the degree of matching.

好適には、前記一致判定手段は、前記文字画像抽出手段により抽出された文字画像と、前記テンプレート提供手段により提供されたテンプレート画像とを複数の相対位置で比較して、一致度合いを判定し、前記一致判定手段によりそれぞれの相対位置で判定された一致度合いに基づいて、それぞれの文字画像の文字領域情報を補正する領域補正手段をさらに有する。   Preferably, the coincidence determination unit compares the character image extracted by the character image extraction unit and the template image provided by the template providing unit at a plurality of relative positions, and determines the degree of coincidence, The image forming apparatus further includes area correction means for correcting the character area information of each character image based on the degree of matching determined at each relative position by the matching determination means.

好適には、前記類型決定手段により順次決定される画像パターンを記憶するパターン記憶手段と、前記パターン記憶手段により記憶された画像パターンと、新たに入力された文字画像とを比較して、いずれかの画像パターンがこの文字画像と一致する場合に、この文字画像に対する画像パターンの決定を禁止する登録制御手段とをさらに有し、前記類型決定手段は、前記登録制御手段による指示に応じて、新たに入力された文字画像が前記パターン記憶手段に記憶された画像パターンと一致する場合に、この文字画像に対して提供されたテンプレート画像を前記パターン記憶手段に登録せず、入力された文字画像がいずれの画像パターンとも一致しない場合に、この文字画像に対して提供されたテンプレート画像を画像パターンとして前記パターン記憶手段に登録する。   Preferably, the pattern storage means for storing the image patterns sequentially determined by the type determination means, the image pattern stored by the pattern storage means and the newly input character image are compared, and either A registration control means for prohibiting the determination of the image pattern for the character image when the image pattern matches the character image, and the type determination means is responsive to an instruction from the registration control means. When the character image input to the character image matches the image pattern stored in the pattern storage means, the template image provided for the character image is not registered in the pattern storage means, and the input character image is If no image pattern matches, the template image provided for this character image is used as the image pattern. It is registered in the over down the storage means.

また、本発明にかかる画像辞書作成装置は、入力画像に含まれている文字画像が表す文字を識別する文字識別情報を取得する情報取得手段と、前記情報取得手段により取得された文字識別情報に基づいて、入力画像に含まれる文字画像を複数の文字画像群に分類する文字分類手段と、類型的な文字画像をテンプレート画像として提供するテンプレート提供手段と、前記文字分類手段により文字画像群に分類された文字画像それぞれと、前記テンプレート提供手段によりそれぞれの文字画像群に対して提供されたテンプレート画像とを比較して、それぞれ一致度合いを判定する一致判定手段と、前記テンプレート提供手段により提供されたテンプレート画像と、これらの文字画像及びテンプレート画像について判定された一致度合いとに基づいて、画像パターンを決定する類型決定手段と、前記類型決定手段により決定された画像パターンに対して、それぞれの画像パターンを識別する識別情報を付与する識別情報付与手段とを有する。   The image dictionary creation device according to the present invention includes an information acquisition unit that acquires character identification information for identifying a character represented by a character image included in an input image, and character identification information acquired by the information acquisition unit. Based on the character classification means for classifying the character images included in the input image into a plurality of character image groups, template providing means for providing a typical character image as a template image, and classifying the character images into character image groups by the character classification means Each of the generated character images is compared with a template image provided for each character image group by the template providing means, and a matching determination means for determining the degree of matching respectively, and provided by the template providing means Based on template images and the degree of matching determined for these character images and template images Has a type determining means for determining an image pattern, the image pattern determined by the type determining unit, and identification information assigning means for assigning identification information for identifying each image pattern.

好適には、前記類型決定手段は、前記一致判定手段により判定された一致度合いに基づいて、文字画像それぞれと最も一致するテンプレート画像の文字画像群それぞれにおける出現頻度を判定し、判定された出現頻度に基づいて、同一の文字画像群に分類された複数の文字画像について、1つ以上の画像パターンを決定する。   Preferably, the type determining means determines the appearance frequency in each character image group of the template image that most closely matches each character image based on the degree of matching determined by the match determining means, and the determined appearance frequency Based on the above, one or more image patterns are determined for a plurality of character images classified into the same character image group.

好適には、前記一致判定手段は、前記文字分類手段により各文字画像群に分類された複数の文字画像とテンプレート画像とを比較して、文字画像に含まれる領域毎の一致度合いを判定し、前記類型決定手段は、前記一致判定手段により領域毎に判定された一致度合いと、テンプレート画像とに基づいて、文字画像を構成する複数の画像パターンを決定する。   Preferably, the match determination means compares a plurality of character images classified into each character image group by the character classification means with a template image, determines a matching degree for each area included in the character image, The type determining unit determines a plurality of image patterns constituting the character image based on the matching degree determined for each region by the matching determining unit and the template image.

[符号化装置]
また、本発明にかかる符号化装置は、類型的な文字画像をテンプレート画像として提供するテンプレート提供手段と、入力画像に含まれる文字画像と、前記テンプレート提供手段により提供されるテンプレート画像との一致度合いを判定する一致判定手段と、前記一致判定手段により判定された一致度合いに基づいて、前記テンプレート提供手段により提供されたテンプレート画像を、この入力画像において類型的な画像パターンとして決定する類型決定手段と、前記類型決定手段により決定された画像パターンに対して、それぞれの画像パターンを識別する識別情報を付与する識別情報付与手段と、入力画像に含まれている文字画像のデータを、この文字画像の入力画像における領域を示す文字領域情報、及び、この文字画像に対応する画像パターンの識別情報と置換して符号化する符号化手段とを有する。
[Encoding device]
In addition, the encoding apparatus according to the present invention includes a template providing unit that provides a typical character image as a template image, a character image included in the input image, and a matching degree between the template image provided by the template providing unit. And a type determining unit for determining a template image provided by the template providing unit as a typical image pattern in the input image based on the degree of matching determined by the match determining unit. , Identification information providing means for assigning identification information for identifying each image pattern to the image pattern determined by the type determining means, and character image data included in the input image. Character area information indicating the area in the input image and the image corresponding to this character image And an encoding means for encoding by replacing the pattern identification information.

好適には、前記一致判定手段は、入力画像に含まれる文字画像と、前記テンプレート提供手段により提供されたテンプレート画像とを複数の相対位置で比較して、一致度合いを判定し、入力画像における文字画像それぞれの領域を示す文字領域情報を取得する情報取得手段と、前記一致判定手段によりそれぞれの相対位置で判定された一致度合いに基づいて、前記情報取得手段により取得された文字領域情報を補正する領域補正手段とをさらに有し、前記符号化手段は、前記領域補正手段により補正された文字画像の文字領域情報と、この文字画像に対応する画像パターンの識別情報とを互いに対応付けて符号化する。   Preferably, the matching determination unit compares the character image included in the input image with the template image provided by the template providing unit at a plurality of relative positions, determines the degree of matching, and determines the character in the input image. Based on the degree of coincidence determined at each relative position by the information determining unit that acquires character region information indicating each region of the image and the matching determining unit, the character region information acquired by the information acquiring unit is corrected. And an encoding unit that encodes the character region information of the character image corrected by the region correction unit and the identification information of the image pattern corresponding to the character image in association with each other. To do.

[画像辞書作成方法]
また、本発明にかかる画像辞書作成方法は、類型的な文字画像をテンプレート画像として提供し、入力画像に含まれる文字画像と、提供されるテンプレート画像との一致度合いを判定し、判定された一致度合いに基づいて、提供されたテンプレート画像を、この入力画像において類型的な画像パターンとして決定し、決定された画像パターンに対して、それぞれの画像パターンを識別する識別情報を付与する。
[Image dictionary creation method]
The image dictionary creation method according to the present invention provides a typical character image as a template image, determines the degree of matching between the character image included in the input image and the provided template image, and the determined match Based on the degree, the provided template image is determined as a typical image pattern in the input image, and identification information for identifying each image pattern is given to the determined image pattern.

[プログラム]
また、本発明にかかるプログラムは、コンピュータを含む画像辞書作成装置において、類型的な文字画像をテンプレート画像として提供するステップと、入力画像に含まれる文字画像と、提供されるテンプレート画像との一致度合いを判定するステップと、判定された一致度合いに基づいて、提供されたテンプレート画像を、この入力画像において類型的な画像パターンとして決定するステップと、決定された画像パターンに対して、それぞれの画像パターンを識別する識別情報を付与するステップとを前記画像辞書作成装置のコンピュータに実行させる。
[program]
In addition, the program according to the present invention provides a step of providing a typical character image as a template image in an image dictionary creation device including a computer, and a degree of coincidence between the character image included in the input image and the provided template image. Determining the provided template image as a typical image pattern in the input image based on the determined degree of matching, and determining each image pattern for the determined image pattern A step of providing identification information for identifying the image dictionary.

本発明の符号化装置によれば、文字の可読性を保持しつつ、高い圧縮率を実現することができる。   According to the encoding device of the present invention, a high compression rate can be realized while maintaining the readability of characters.

[第1実施形態]
まず、本発明の理解を助けるために、その背景及び概略を説明する。
画像処理装置2は、例えば、入力画像に含まれる文字画像そのものを符号化する替わりに、それぞれの文字画像の識別情報とその出現位置等とを符号化することにより、高い圧縮率を実現することができる。
図1(A)は、共通のフォントデータベースが存在することを前提とした符号化方法を説明し、図1(B)は、画像辞書の添付を前提とした符号化方法を説明する図である。
図1(A)に示すように、文字画像を識別情報(文字コード及びフォントの種類)に対応付けて記憶する共通のフォントデータベースが符号化側及び復号化側の両方に存在する場合には、符号化側の画像処理装置は、文字画像の識別情報(文字コード及びフォントの種類等)と、文字画像の出現位置とを符号化することにより、高い圧縮率で画像データを圧縮し復号化側の画像処理装置に送信することができる。この場合に、復号化側の画像処理装置は、受信した符号データ(文字コード及びフォントの種類)を復号化し、復号化された文字コード及びフォントの種類、並びに、フォントデータベースに登録されているフォント画像に基づいて文字画像を生成する。
しかしながら、フォントデータベースの存在を前提とした符号化方法では、符号化側及び復号化側でフォントデータベースをそれぞれ設ける必要があり、記憶領域がフォントデータベースにより圧迫される。また、符号化側のフォントデータベースが更新されると、これに応じて復号化側のフォントデータベースも符号化側と同一内容になるよう更新する必要がある。
[First Embodiment]
First, in order to help understanding of the present invention, its background and outline will be described.
For example, instead of encoding the character image itself included in the input image, the image processing apparatus 2 realizes a high compression rate by encoding the identification information of each character image and its appearance position. Can do.
FIG. 1A illustrates an encoding method on the assumption that a common font database exists, and FIG. 1B illustrates an encoding method on the assumption that an image dictionary is attached. .
As shown in FIG. 1A, when there is a common font database that stores character images in association with identification information (character code and font type) on both the encoding side and the decoding side, The image processing apparatus on the encoding side encodes the character image identification information (character code, font type, etc.) and the appearance position of the character image, thereby compressing the image data at a high compression rate and decoding the image data. To the image processing apparatus. In this case, the image processing apparatus on the decoding side decodes the received code data (character code and font type), decodes the character code and font type, and the font registered in the font database. A character image is generated based on the image.
However, in the encoding method based on the presence of the font database, it is necessary to provide a font database on each of the encoding side and the decoding side, and the storage area is compressed by the font database. Further, when the encoding-side font database is updated, it is necessary to update the decoding-side font database so as to have the same contents as the encoding-side.

そこで、本実施形態における画像処理装置2は、図1(B)に示すように、復号化側において、入力画像内で類型的に存在する画像パターンをインデクスに対応付けて登録(画像辞書化)し、入力画像に含まれる画像パターンを、対応するインデクス及びその出現位置に置換して符号化する。符号化側は、画像パターン及びインデクスが互いに対応付けられた画像辞書と、符号化されたインデクス及び出現位置とを復号化側に送信する。復号化側は、インデクス及び出現位置を復号化し、復号化されたインデクスに対応する画像パターンを画像辞書から選択し、復号化された出現位置に配置する。
このように、画像処理装置2は、入力画像に応じて画像辞書を作成し送受信することにより、共通のデータベースを前提とすることなく高い圧縮率を実現することができる。また、フォントデータベースを符号化側及び復号化側で同期させる必要がない。なお、符号量を低減させるためには、画像辞書も符号化されることが望ましい。
Therefore, as shown in FIG. 1B, the image processing apparatus 2 according to the present embodiment registers, on the decoding side, image patterns that exist typi- cally in the input image in association with indexes (image dictionary formation). Then, the image pattern included in the input image is replaced with the corresponding index and its appearance position and encoded. The encoding side transmits the image dictionary in which the image pattern and the index are associated with each other, and the encoded index and the appearance position to the decoding side. The decoding side decodes the index and the appearance position, selects an image pattern corresponding to the decoded index from the image dictionary, and arranges it at the decoded appearance position.
As described above, the image processing apparatus 2 can achieve a high compression rate without assuming a common database by creating and transmitting / receiving an image dictionary according to an input image. Further, it is not necessary to synchronize the font database on the encoding side and the decoding side. In order to reduce the code amount, it is desirable that the image dictionary is also encoded.

図2(A)は、画像辞書を例示し、図2(B)は、画像パターンを例示する図である。
図2(A)に例示するように、画像辞書には、入力画像に含まれる複数の画像パターンと、この画像パターンを識別するために付与されたインデクスとが含まれる。画像パターンは、入力画像に含まれる部分的な画像データであり、本例では入力画像(2値)中に既定回数以上(複数回)出現する類型的なパターン(2値データ)である。また、インデクスは、例えば、入力画像毎に個別に生成される識別情報であり、入力画像から画像パターンが抽出される順番でその画像パターンに付与されるシリアル番号等であってもよい。
FIG. 2A illustrates an image dictionary, and FIG. 2B illustrates an image pattern.
As illustrated in FIG. 2A, the image dictionary includes a plurality of image patterns included in the input image and an index assigned to identify the image pattern. The image pattern is partial image data included in the input image. In this example, the image pattern is a typical pattern (binary data) that appears more than a predetermined number (multiple times) in the input image (binary). The index is, for example, identification information generated individually for each input image, and may be a serial number assigned to the image pattern in the order in which the image pattern is extracted from the input image.

次に問題となるのは、どのような基準で入力画像から画像パターンを抽出し、画像辞書として登録するかという点である。抽出される画像パターンの大きさ及び出現頻度によって、入力画像の符号量が異なるからである。例えば、図2(B)に例示するように、文字画像単位で画像パターンが抽出される場合と、文字画像よりもさらに小さな単位で画像パターンが抽出される場合とが考えられる。
文字画像よりもさらに小さな単位で画像パターンが抽出される場合には、それぞれの画像パターンの出現頻度が高い場合が多いが(例えば、「1」の縦棒部分は、「山」及び「川」の一部として出現する)、画像辞書に登録すべき画像パターンの数が多くなり画像辞書のデータ量が大きくなる。
一方、文字画像単位で画像パターンが抽出される場合には、同一ドキュメント内では、同一の言語で同一のフォント種類及び同一のフォントサイズの文字が多数出現するため、画像パターンのサイズが大きい割には高い出現頻度が期待できる。
また、ある程度の非可逆性を許容して高い圧縮率を目指す場合に、符号化側の画像処理装置は、画像パターンと同一の部分画像だけでなく、画像パターンと類似する部分画像もインデクスに置換して符号化する。この場合に、文字画像の構成部分それぞれが、類似する画像パターンに置換されると、文字画像全体として全く異なるものに復号化されて可読性を失う可能性もある。しかしながら、文字画像単位で画像パターンが抽出される場合には、文字画像の全体的な形状が類似する画像パターン(例えば、数字の「1」とアルファベットの「I」など)に置換されるため、ある程度可読性が維持される。
そこで、本実施形態における画像処理装置2は、文字画像単位の画像パターンを決定し、画像辞書に登録する。
また、本実施形態における画像処理装置2は、画像パターンのテンプレートとして、フォントデータベースに記憶されているフォント画像を適用して画像辞書を作成する。符号化対象となる入力画像には、フォント画像で構成された文字画像が多く、また、一定の手書き文字等がフォント画像に置換されたとしても可読性に影響を与えないからである。
さらには、本実施形態における画像処理装置2は、フォント画像に基づいて画像パターンを作成する。これにより、複写の繰返しによる画質劣化などが解消されて可読性が向上する。なお、本実施形態の画像処理装置2は、符号化処理においてフォント画像を用いるだけであり、復号化時にはフォントデータベースを用いる必要はない。
The next problem is how to extract an image pattern from an input image and register it as an image dictionary. This is because the code amount of the input image varies depending on the size and appearance frequency of the extracted image pattern. For example, as illustrated in FIG. 2B, there are a case where an image pattern is extracted in units of character images and a case where an image pattern is extracted in units smaller than a character image.
When an image pattern is extracted in a smaller unit than a character image, the appearance frequency of each image pattern is often high (for example, the vertical bar portion of “1” indicates “mountain” and “river”. The number of image patterns to be registered in the image dictionary increases, and the data amount of the image dictionary increases.
On the other hand, when an image pattern is extracted in units of character images, a large number of characters of the same font type and the same font size appear in the same language in the same document. Can expect high appearance frequency.
In addition, when aiming for a high compression rate while allowing a certain degree of irreversibility, the image processing apparatus on the encoding side replaces not only the partial image that is the same as the image pattern but also the partial image that is similar to the image pattern with an index. To encode. In this case, if each of the constituent parts of the character image is replaced with a similar image pattern, the entire character image may be decoded into a completely different one and lose readability. However, when an image pattern is extracted in units of character images, the overall shape of the character image is replaced with a similar image pattern (for example, the number “1” and the alphabet “I”). Some readability is maintained.
Therefore, the image processing apparatus 2 in this embodiment determines an image pattern for each character image and registers it in the image dictionary.
Further, the image processing apparatus 2 according to the present embodiment creates an image dictionary by applying a font image stored in a font database as an image pattern template. This is because the input image to be encoded includes many character images composed of font images, and even if a certain handwritten character or the like is replaced with a font image, the readability is not affected.
Furthermore, the image processing apparatus 2 in the present embodiment creates an image pattern based on the font image. This eliminates image quality degradation due to repeated copying and improves readability. Note that the image processing apparatus 2 of the present embodiment only uses a font image in the encoding process, and does not need to use a font database at the time of decoding.

[ハードウェア構成]
次に、画像処理装置2のハードウェア構成を説明する。
図3は、本発明にかかる画像辞書作成方法が適応される画像処理装置2のハードウェア構成を、制御装置20を中心に例示する図である。
図3に例示するように、画像処理装置2は、CPU202及びメモリ204などを含む制御装置20、通信装置22、HDD・CD装置などの記録装置24、並びに、LCD表示装置あるいはCRT表示装置およびキーボード・タッチパネルなどを含むユーザインターフェース装置(UI装置)26から構成される。
画像処理装置2は、例えば、符号化プログラム5(後述)がプリンタドライバの一部としてインストールされた汎用コンピュータであり、通信装置22又は記録装置24などを介して画像データを取得し、取得された画像データを符号化してプリンタ装置10に送信する。また、画像処理装置2は、プリンタ装置10のスキャナ機能より光学的に読み取られた画像データを取得し、取得された画像データを符号化する。
[Hardware configuration]
Next, the hardware configuration of the image processing apparatus 2 will be described.
FIG. 3 is a diagram illustrating a hardware configuration of the image processing apparatus 2 to which the image dictionary creating method according to the present invention is applied, centering on the control apparatus 20.
As illustrated in FIG. 3, the image processing apparatus 2 includes a control device 20 including a CPU 202 and a memory 204, a communication device 22, a recording device 24 such as an HDD / CD device, an LCD display device or a CRT display device, and a keyboard. A user interface device (UI device) 26 including a touch panel and the like is included.
The image processing apparatus 2 is, for example, a general-purpose computer in which an encoding program 5 (described later) is installed as a part of a printer driver. The image processing apparatus 2 acquires image data via the communication device 22 or the recording device 24 and the like. The image data is encoded and transmitted to the printer apparatus 10. Further, the image processing device 2 acquires image data optically read by the scanner function of the printer device 10 and encodes the acquired image data.

[符号化プログラム]
図4は、制御装置20(図3)により実行され、本発明にかかる画像辞書作成方法を実現する符号化プログラム5の機能構成を例示する図である。
図4に例示するように、符号化プログラム5は、画像入力部40、画像辞書作成部50及び符号化部60を有する。
符号化プログラム5において、画像入力部40は、プリンタ装置10のスキャナ機能により読み取られた画像データ、又は、通信装置22又は記録装置24などを介して取得されたPDL(Page Discription Language)形式の画像データを取得し、取得された画像データをラスタデータに変換して画像辞書作成部50に出力する。また、画像入力部40は、光学的に読み取られた画像データ等から文字画像を認識する文字認識部410と、PDL形式の画像データを解釈してラスタデータを生成するPDLデコンポーザ420とを有する。
文字認識部410は、入力された画像データ(以下、入力画像)に含まれる文字を認識し、認識された文字の文字識別情報、及び、認識された文字の文字領域情報を文字認識処理の結果として画像辞書作成部50に対して出力する。ここで、文字識別情報とは、文字を識別する情報であり、例えば、汎用性のある文字コード(ASCIIコード又はシフトJISコードなど)、又は、文字コードとフォントの種類との組合せなどである。また、文字領域情報とは、入力画像における文字画像の領域を示す情報であり、例えば、文字画像の位置、大きさ、範囲又はこれらの組合せからなる文字のレイアウト情報である。
PDLデコンポーザ420は、PDL形式の画像データを解釈してラスタライズされた画像データ(ラスタデータ)を生成し、生成された画像データと共に、生成された画像データにおける文字画像の文字識別情報及び文字領域情報を画像辞書作成部50に対して出力する。
[Encoding program]
FIG. 4 is a diagram illustrating a functional configuration of the encoding program 5 which is executed by the control device 20 (FIG. 3) and implements the image dictionary creation method according to the present invention.
As illustrated in FIG. 4, the encoding program 5 includes an image input unit 40, an image dictionary creation unit 50, and an encoding unit 60.
In the encoding program 5, the image input unit 40 is an image data read by the scanner function of the printer device 10, or a PDL (Page Discription Language) format image acquired via the communication device 22 or the recording device 24. Data is acquired, and the acquired image data is converted into raster data and output to the image dictionary creation unit 50. The image input unit 40 includes a character recognition unit 410 that recognizes a character image from optically read image data and the like, and a PDL decomposer 420 that interprets PDL format image data and generates raster data.
The character recognition unit 410 recognizes characters included in the input image data (hereinafter referred to as input image), and character recognition information of the recognized characters and character area information of the recognized characters are obtained as a result of character recognition processing. Is output to the image dictionary creation unit 50. Here, the character identification information is information for identifying a character, and is, for example, a versatile character code (such as an ASCII code or a shift JIS code) or a combination of a character code and a font type. The character area information is information indicating the area of the character image in the input image, and is, for example, character layout information including the position, size, range, or combination of the character images.
The PDL decomposer 420 interprets the image data in the PDL format, generates rasterized image data (raster data), and character identification information and character area information of the character image in the generated image data together with the generated image data Is output to the image dictionary creation unit 50.

画像辞書作成部50は、画像入力部40から入力された入力画像と、予め記憶されたフォント画像とに基づいて、この入力画像の符号化処理に用いられる画像辞書を作成し、作成された画像辞書と入力画像とを符号化部60に対して出力する。より具体的には、画像辞書作成部50は、文字認識部410又はPDLデコンポーザ420から入力された文字識別情報及び文字領域情報に基づいて、文字画像に対応するフォント画像を画像パターンとして選択し、選択されたフォント画像にインデクスを付与して画像辞書とし符号化部60に出力する。   The image dictionary creation unit 50 creates an image dictionary used for encoding the input image based on the input image input from the image input unit 40 and a font image stored in advance, and the created image The dictionary and the input image are output to the encoding unit 60. More specifically, the image dictionary creation unit 50 selects a font image corresponding to the character image as an image pattern based on the character identification information and the character region information input from the character recognition unit 410 or the PDL decomposer 420, An index is assigned to the selected font image, and an image dictionary is output to the encoding unit 60.

符号化部60は、画像辞書作成部50から入力された画像辞書に基づいて入力画像を符号化し、符号化された入力画像と画像辞書とを記録装置24(図3)又はプリンタ装置10(図3)などに出力する。より具体的には、符号化部60は、画像辞書に登録された画像パターンと、入力画像に含まれる部分画像とを比較して、いずれかの画像パターンと一致する部分画像のデータを、この画像パターンに対応するインデクス及びこの部分画像の位置情報に置換する。ここで、一致とは、完全一致だけを言うのではなく、既定の許容範囲内で部分的に一致している場合を含む。さらに、符号化部60は、部分画像と置き換えられたインデクス及び位置情報、並びに、画像辞書等をエントロピー符号化(ハフマン符号化、算術符号化又はLZ符号化など)により符号化してもよい。   The encoding unit 60 encodes an input image based on the image dictionary input from the image dictionary creation unit 50, and stores the encoded input image and the image dictionary in the recording device 24 (FIG. 3) or the printer device 10 (FIG. 3) and so on. More specifically, the encoding unit 60 compares the image pattern registered in the image dictionary with the partial image included in the input image, and converts the partial image data that matches one of the image patterns to this data. The index corresponding to the image pattern and the position information of this partial image are replaced. Here, the term “match” includes not only a complete match but also a case where a partial match is made within a predetermined allowable range. Furthermore, the encoding unit 60 may encode the index and position information replaced with the partial image, the image dictionary, and the like by entropy encoding (Huffman encoding, arithmetic encoding, LZ encoding, or the like).

図5は、第1の画像辞書作成部50の機能をより詳細に説明する図である。
図5に示すように、画像辞書作成部50は、記憶部500、文字画像抽出部510、フォント提供部520、フォントデータベース525(以下、フォントDB525)、一致判定部530、辞書決定部540、位置補正部550、インデクス付与部560及び登録制御部570を有する。記憶部500は、メモリ204(図3)及び記録装置24(図3)を制御して、画像入力部40(図4)から入力された入力画像、文字識別情報及び文字領域情報を記憶する。なお、以下、文字コードを文字識別情報の具体例とし、文字の位置情報を文字領域情報の具体例として説明する。
FIG. 5 is a diagram for explaining the function of the first image dictionary creation unit 50 in more detail.
As shown in FIG. 5, the image dictionary creation unit 50 includes a storage unit 500, a character image extraction unit 510, a font provision unit 520, a font database 525 (hereinafter, font DB 525), a match determination unit 530, a dictionary determination unit 540, a position A correction unit 550, an index assignment unit 560, and a registration control unit 570 are included. The storage unit 500 controls the memory 204 (FIG. 3) and the recording device 24 (FIG. 3) to store the input image, character identification information, and character region information input from the image input unit 40 (FIG. 4). Hereinafter, a character code will be described as a specific example of character identification information, and character position information will be described as a specific example of character region information.

文字画像抽出部510は、文字の位置情報に基づいて、入力画像から文字画像を切り出す。すなわち、文字画像抽出部510は、文字領域情報により示された領域を文字画像として入力画像から抽出する。抽出される文字画像は、文字認識部410により文字画像であると判定された領域である。なお、文字認識部410又はPDLデコンポーザ420が文字画像を入力画像から切り出した状態で画像辞書作成部50に出力してもよい。   The character image extraction unit 510 cuts out a character image from the input image based on the character position information. That is, the character image extraction unit 510 extracts an area indicated by the character area information as a character image from the input image. The extracted character image is an area determined by the character recognition unit 410 to be a character image. The character recognition unit 410 or the PDL decomposer 420 may output the character image to the image dictionary creation unit 50 in a state where the character image is cut out from the input image.

フォント提供部520は、フォントDB525に記憶されたフォント画像をテンプレート画像として一致判定部530及び辞書決定部540等に提供する。具体的には、フォントDB525は、文字コードに対応付けて、この文字コードに対応する文字を複数のフォント及びサイズで表現した複数のフォント画像を記憶している。フォント提供部520は、文字認識部410から入力された文字コードに基づいて、フォントDB525に記憶されているフォント画像の中から、少なくとも1つのフォント画像を選択し、選択したフォント画像をテンプレート画像として記憶部500に記憶する。   The font providing unit 520 provides the font image stored in the font DB 525 as a template image to the matching determination unit 530, the dictionary determination unit 540, and the like. Specifically, the font DB 525 stores a plurality of font images in which characters corresponding to the character code are expressed in a plurality of fonts and sizes in association with the character code. The font providing unit 520 selects at least one font image from the font images stored in the font DB 525 based on the character code input from the character recognition unit 410, and uses the selected font image as a template image. Store in the storage unit 500.

一致判定部530は、入力画像から切り出された文字画像と、フォント提供部520から提供されたフォント画像とを比較して、一致度合いを判定する。ここで、一致度合いとは、複数の画像が互いに一致する程度を示す情報であり、例えば、2値画像が比較される場合に、2つの画像を重ねたときの互いに重なりあう画素の数(以下、一致画素数)、この一致画素数を正規化した一致画素率(例えば、一致画素数を全画素数で割ったもの)、又は、複数の画像を重ねたときの画素分布(ヒストグラム)などである。
また、一致判定部530は、文字画像とフォント画像とを複数の相対位置で比較して一致度合いを判定する。すなわち、一致判定部530は、最大の一致度合いを算出するために、文字画像とフォント画像との相対位置を変更しながら(ずらしながら)比較する。
例えば、一致判定部530は、入力画像から切り出された文字画像と、この文字画像の文字コードに基づいて選択されたフォント画像とを互いにずらしながら一致画素率を算出し、一致画素率の最大値及びこの最大となったときのずらしベクトルを記憶部500に出力する。
また、一致判定部530は、同様に、入力画像から切り出された文字画像と、画像辞書に登録された画像パターンとを比較して、一致度合いを判定する。
The matching determination unit 530 compares the character image cut out from the input image with the font image provided from the font providing unit 520 to determine the degree of matching. Here, the degree of coincidence is information indicating the degree to which a plurality of images coincide with each other. For example, when binary images are compared, the number of pixels that overlap each other when the two images are overlaid (hereinafter referred to as the number of pixels). , The number of matching pixels), the matching pixel ratio obtained by normalizing the number of matching pixels (for example, the number of matching pixels divided by the total number of pixels), or the pixel distribution (histogram) when a plurality of images are superimposed is there.
Further, the coincidence determination unit 530 compares the character image and the font image at a plurality of relative positions to determine the degree of coincidence. That is, the coincidence determination unit 530 performs comparison while changing (shifting) the relative position between the character image and the font image in order to calculate the maximum degree of coincidence.
For example, the coincidence determination unit 530 calculates a coincidence pixel rate while shifting a character image cut out from the input image and a font image selected based on the character code of the character image, and the maximum value of the coincidence pixel rate The shift vector when the maximum value is reached is output to the storage unit 500.
Similarly, the coincidence determination unit 530 compares the character image cut out from the input image with the image pattern registered in the image dictionary to determine the degree of coincidence.

辞書決定部540は、一致判定部530により判定された一致度合いと、フォント提供部520から提供されたフォント画像とに基づいて、画像辞書に登録すべき画像パターンを決定する。具体的には、辞書決定部540は、フォント提供部520から文字コードに基づいて選択されたフォント画像の中から、一致判定部530により判定された一致度合いが最も大きなフォント画像を画像パターンとして選択する。   The dictionary determining unit 540 determines an image pattern to be registered in the image dictionary based on the degree of matching determined by the matching determining unit 530 and the font image provided from the font providing unit 520. Specifically, the dictionary determination unit 540 selects, from among font images selected from the font providing unit 520 based on the character code, a font image having the highest degree of matching determined by the matching determination unit 530 as an image pattern. To do.

位置補正部550は、一致判定部530から出力されたずらしベクトルに基づいて、文字画像の位置情報を補正する。すなわち、位置補正部550は、画像入力部40から入力された位置情報を、入力画像とフォント画像との一致度合いが最大となるように補正する。
インデクス付与部560は、フォント画像に基づいて決定された画像パターンに対して、これらの画像パターンを識別するインデクスを付与し、付与されたインデクスと画像パターンとを対応付けて記憶部500に出力する。
The position correction unit 550 corrects the position information of the character image based on the shift vector output from the match determination unit 530. That is, the position correction unit 550 corrects the position information input from the image input unit 40 so that the degree of matching between the input image and the font image is maximized.
The index assigning unit 560 assigns an index for identifying these image patterns to the image pattern determined based on the font image, and outputs the assigned index and the image pattern to the storage unit 500 in association with each other. .

登録制御部570は、文字画像抽出部510により抽出された文字画像と画像パターンとの一致度合いに基づいて、新たに画像パターンを登録するか否かを判断し、画像辞書への新規登録を制御する。具体的には、登録制御部570は、順次入力される文字画像と画像辞書に登録された画像パターンとの一致度合いに基づいて、入力された文字画像に対応するフォント画像を画像パターンとして画像辞書に登録するか否かを判断する。例えば、登録制御部570は、既登録の画像パターンと、入力された文字画像との一致度合いがいずれも基準以下である場合(すなわち、一致する画像パターンが登録されていない場合)に、この文字画像に対して提供されたフォント画像を画像パターンとして画像辞書に登録することを許可し、一致度合いが基準よりも大きくなる画像パターンが存在する場合(すなわち、一致する画像パターンが存在する場合)に、この文字画像に対応するフォント画像を画像パターンとして画像辞書に登録することを禁止する。   The registration control unit 570 determines whether or not to newly register an image pattern based on the degree of matching between the character image extracted by the character image extraction unit 510 and the image pattern, and controls new registration in the image dictionary. To do. Specifically, the registration control unit 570 uses the font image corresponding to the input character image as an image pattern based on the degree of matching between the sequentially input character image and the image pattern registered in the image dictionary. Judge whether or not to register. For example, the registration control unit 570 displays the character when the degree of coincidence between the registered image pattern and the input character image is less than or equal to the reference (that is, when a matching image pattern is not registered). When a font image provided for an image is allowed to be registered in the image dictionary as an image pattern, and there is an image pattern whose matching degree is greater than the reference (that is, when a matching image pattern exists) The font image corresponding to the character image is prohibited from being registered in the image dictionary as an image pattern.

図6は、符号化部60の機能をより詳細に説明する図である。
図6に示すように、符号化部60は、パターン判定部610、位置情報符号化部620、インデクス符号化部630、画像符号化部640、辞書符号化部650、選択部660及び符号出力部670を有する。
パターン判定部610は、画像辞書に登録された画像パターンそれぞれと、入力画像に含まれる部分画像とを比較して、この部分画像と対応する画像パターン(同一又は類似の画像パターン)を判定する。具体的には、パターン判定部610は、入力画像から文字画像単位で切り出された部分画像(位置補正部550により補正がなされたもの)と、画像パターンとを重ねあわせて、一致判定部530(図5)と同様の手法により、一致度合いを算出し、算出された一致度合いが基準値以上であるか否かに基づいて、対応しているか否かを判定する。
パターン判定部610は、対応する画像パターンが発見された場合には、この部分画像の位置情報を位置情報符号化部620に対して出力し、この画像パターンのインデクスをインデクス符号化部630に対して出力し、対応する画像パターンが発見されない場合には、この部分画像を画像符号化部640に対して出力する。
なお、本実施形態におけるパターン判定部610は、入力された文字画像と一致する画像パターン(すなわち、フォント画像)のインデクス、及び、文字画像の位置情報(位置補正部550により補正されたもの)を画像辞書作成部50から取得するため、入力された文字画像に対応するフォント画像がフォントDB525に存在する場合には、取得されたインデクス及び位置情報をそれぞれインデクス符号化部630及び位置情報符号化部620に出力し、入力された文字画像と対応するフォント画像が存在しない場合には、この文字画像そのものを画像符号化部640に出力する。
FIG. 6 is a diagram for explaining the function of the encoding unit 60 in more detail.
As shown in FIG. 6, the encoding unit 60 includes a pattern determination unit 610, a position information encoding unit 620, an index encoding unit 630, an image encoding unit 640, a dictionary encoding unit 650, a selection unit 660, and a code output unit. 670.
The pattern determination unit 610 compares each image pattern registered in the image dictionary with a partial image included in the input image, and determines an image pattern (same or similar image pattern) corresponding to the partial image. Specifically, the pattern determination unit 610 superimposes the partial image (corrected by the position correction unit 550) cut out in units of character images from the input image and the image pattern, and matches the determination unit 530 ( The degree of coincidence is calculated by the same method as in FIG. 5), and it is determined whether or not it corresponds based on whether or not the calculated degree of coincidence is equal to or greater than a reference value.
When the corresponding image pattern is found, the pattern determination unit 610 outputs the position information of the partial image to the position information encoding unit 620, and the index of the image pattern is output to the index encoding unit 630. If the corresponding image pattern is not found, the partial image is output to the image encoding unit 640.
Note that the pattern determination unit 610 in the present embodiment uses the index of the image pattern (that is, the font image) that matches the input character image, and the position information of the character image (corrected by the position correction unit 550). When the font image corresponding to the input character image exists in the font DB 525 for acquisition from the image dictionary creation unit 50, the acquired index and position information are respectively converted into the index encoding unit 630 and the position information encoding unit. If there is no font image corresponding to the input character image, the character image itself is output to the image encoding unit 640.

位置情報符号化部620は、パターン判定部610から入力された位置情報(すなわち、位置補正部550により補正された部分画像(文字画像)の位置情報)を符号化し、選択部660に対して出力する。例えば、位置情報符号化部620は、LZ符号化又は算術符号化等を適用して、位置情報を符号化する。
インデクス符号化部630は、パターン判定部610から入力されたインデクスを符号化し、選択部660に対して出力する。例えば、インデクス符号化部630は、インデクスの出現頻度に応じて符号長が異なる符号をそれぞれのインデクスに付与する。
画像符号化部640は、画像に適した符号化方式を適用して、パターン判定部610から入力された部分画像を符号化し、選択部660に対して出力する。
辞書符号化部650は、画像辞書作成部50(図4,図5)から入力された画像辞書(画像パターンとインデクスとが互いに対応付けられたもの)を符号化し、符号出力部670に対して出力する。
The position information encoding unit 620 encodes the position information input from the pattern determination unit 610 (that is, position information of the partial image (character image) corrected by the position correction unit 550), and outputs the encoded position information to the selection unit 660. To do. For example, the position information encoding unit 620 encodes position information by applying LZ encoding or arithmetic encoding.
The index encoding unit 630 encodes the index input from the pattern determination unit 610 and outputs the encoded index to the selection unit 660. For example, the index encoding unit 630 assigns a code having a different code length to each index according to the appearance frequency of the index.
The image encoding unit 640 encodes the partial image input from the pattern determination unit 610 by applying an encoding method suitable for the image, and outputs the encoded partial image to the selection unit 660.
The dictionary encoding unit 650 encodes the image dictionary (the image pattern and the index are associated with each other) input from the image dictionary creation unit 50 (FIGS. 4 and 5), and the code output unit 670 Output.

選択部660は、パターン判定部610により部分画像に対応する画像パターンが発見された場合に、位置情報符号化部620から入力された位置情報の符号データと、インデクス符号化部630から入力されたインデクスの符号データとを互いに対応付けて符号出力部670に対して出力し、パターン判定部610により部分画像に対応する画像パターンが発見されなかった場合に、画像符号化部640により符号化された部分画像の符号データを符号出力部670に対して出力する。
符号出力部670は、選択部660から入力された符号データ(位置情報、インデクス及び部分画像の符号データ)と、辞書符号化部650から入力された符号データ(画像辞書の符号データ)とを互いに対応付けてプリンタ装置10(図3)、記録装置24(図3)又は通信装置22(図3)に出力する。
When the pattern determination unit 610 finds an image pattern corresponding to the partial image, the selection unit 660 receives the position information code data input from the position information encoding unit 620 and the index encoding unit 630. The index code data is output to the code output unit 670 in association with each other, and is encoded by the image encoding unit 640 when the pattern determination unit 610 finds no image pattern corresponding to the partial image. The code data of the partial image is output to the code output unit 670.
The code output unit 670 receives the code data (position information, index, and partial image code data) input from the selection unit 660 and the code data (image dictionary code data) input from the dictionary encoding unit 650. The data are output to the printer device 10 (FIG. 3), the recording device 24 (FIG. 3), or the communication device 22 (FIG. 3) in association with each other.

[符号化動作]
次に、画像処理装置2による符号化処理の全体動作を説明する。
図7は、第1の実施形態における符号化プログラム5の動作(S10)を示すフローチャートである。
図7に示すように、S100において、画像入力部40(図4)は、プリンタ装置10(図3)から画像データ(2値)が入力されると、入力された画像データ(入力画像)を画像辞書作成部50に対して出力する。また、画像入力部40の文字認識部410(図4)は、入力画像に対して文字認識処理を行い、入力画像に含まれる文字画像の文字コード及び位置情報を1文字ずつ判定し、判定された文字コード及び位置情報を画像辞書作成部50に対して出力する。
[Encoding operation]
Next, the overall operation of the encoding process by the image processing apparatus 2 will be described.
FIG. 7 is a flowchart showing the operation (S10) of the encoding program 5 in the first embodiment.
As shown in FIG. 7, in S100, when image data (binary) is input from the printer 10 (FIG. 3), the image input unit 40 (FIG. 4) receives the input image data (input image). It outputs to the image dictionary creation part 50. Further, the character recognition unit 410 (FIG. 4) of the image input unit 40 performs character recognition processing on the input image, and determines the character code and position information of the character image included in the input image one character at a time. The obtained character code and position information are output to the image dictionary creation unit 50.

ステップ102(S102)において、画像辞書作成部50の記憶部500(図5)は、画像入力部40から入力される入力画像(2値)、文字コード及び位置情報をメモリ204(図3)に記憶する。
文字画像抽出部510(図5)は、入力された位置情報に基づいて、入力画像から文字画像を1文字分ずつ切り出して記憶部500に出力する。
ステップ104(S104)において、登録制御部570は、入力画像から順に切り出される文字画像の文字コードに基づいて、画像辞書から画像パターン及びこの画像パターンのインデクスを読み出す。具体的には、記憶部500は、既に決定された画像パターン、この画像パターンに対して付与されたインデクス、及び、この画像パターンに対応する文字画像の文字コードを互いに対応付けて画像辞書として記憶している。登録制御部570は、文字画像抽出部510により新たに切り出された文字画像の文字コードを文字認識部410から取得し、取得された文字コードに対応する画像パターン及びインデクスを画像辞書から読み出す。
In step 102 (S102), the storage unit 500 (FIG. 5) of the image dictionary creation unit 50 stores the input image (binary), character code, and position information input from the image input unit 40 in the memory 204 (FIG. 3). Remember.
The character image extraction unit 510 (FIG. 5) cuts out character images for each character from the input image based on the input position information and outputs them to the storage unit 500.
In step 104 (S104), the registration control unit 570 reads an image pattern and an index of the image pattern from the image dictionary based on the character code of the character image cut out in order from the input image. Specifically, the storage unit 500 stores an already determined image pattern, an index assigned to the image pattern, and a character code of a character image corresponding to the image pattern as an image dictionary. doing. The registration control unit 570 acquires the character code of the character image newly cut out by the character image extraction unit 510 from the character recognition unit 410, and reads an image pattern and an index corresponding to the acquired character code from the image dictionary.

ステップ106(S106)において、一致判定部530は、文字画像抽出部510により順次切り出される文字画像と、画像辞書に登録されている画像パターンとを比較して、複数の相対位置における一致度合いを判定する。具体的には、一致判定部530は、画像辞書に登録されている画像パターンそれぞれと、切り出された文字画像とを互いにずらしながら黒画素の一致画素数Kを算出する。
一致画素数Kは、画像における相対的な位置を示す位置ベクトルをx、画像パターンの黒画素の分布をS(x)、順に切り出される文字画像の番号をi(1〜N)、文字画像の黒画素の分布をP(i,x)、文字画像iのずらしベクトルをviとした場合に、以下の数式により算出される。
(一致画素数K)=Σ{S(x)*P(i,x−vi)}
なお、「Σ」は、変数xについての総和を示す。
次に、一致判定部530は、算出された一致画素数Kを正規化して、一致画素率K’を算出する。
一致画素率K’は、文字画像を構成する画素数をMとした場合に、以下の数式により算出される。
(一致画素率K’)=K/M
In step 106 (S106), the coincidence determination unit 530 compares the character images sequentially extracted by the character image extraction unit 510 with the image patterns registered in the image dictionary, and determines the degree of coincidence at a plurality of relative positions. To do. Specifically, the coincidence determination unit 530 calculates the number K of coincident pixels of black pixels while shifting each image pattern registered in the image dictionary and the extracted character image.
The coincidence pixel number K is a position vector indicating a relative position in the image, x is a black pixel distribution of the image pattern, S (x), a character image number cut out in order is i (1 to N), When the distribution of black pixels is P (i, x) and the shift vector of the character image i is vi, it is calculated by the following formula.
(Number of matched pixels K) = Σ {S (x) * P (i, x−vi)}
Note that “Σ” indicates the total sum for the variable x.
Next, the coincidence determination unit 530 normalizes the calculated coincidence pixel number K to calculate a coincidence pixel rate K ′.
The coincidence pixel rate K ′ is calculated by the following equation, where M is the number of pixels constituting the character image.
(Matched pixel rate K ′) = K / M

ステップ108(S108)において、登録制御部570は、一致判定部530により判定された画像パターンと文字画像(新たに切り出されたもの)との一致度合いに基づいて、新たに切り出された文字画像に基づいて画像パターンを登録するか否かを判定する。具体的には、登録制御部570は、判定された一致画素率K’が基準値以上である場合に、最も一致画素率K’が大きな画像パターンのインデクスと、切り出された文字画像の位置情報とを符号化部60に対して出力して、S122の処理に移行し、判定された一致画素率K’が基準値よりも小さい場合に、S110の処理に移行する。
すなわち、登録制御部570は、一致度合いが基準以上である場合には、この文字画像に基づく画像パターンの登録を禁止して、この文字画像を既登録の画像パターンに基づいて符号化するよう符号化部60に指示し、一致度合いが基準よりも小さい場合には、この文字画像に対応するフォント画像を画像パターンとして画像辞書に新規登録するよう辞書決定部540に指示する。
In step 108 (S108), the registration control unit 570 converts the image pattern determined by the match determination unit 530 into a newly cut out character image based on the degree of matching between the image pattern and the character image (newly cut out). Based on this, it is determined whether or not to register an image pattern. Specifically, when the determined matching pixel rate K ′ is greater than or equal to the reference value, the registration control unit 570 includes the index of the image pattern having the largest matching pixel rate K ′ and the position information of the extracted character image. Are output to the encoding unit 60, and the process proceeds to S122. If the determined matching pixel ratio K ′ is smaller than the reference value, the process proceeds to S110.
That is, the registration control unit 570 prohibits registration of the image pattern based on the character image and encodes the character image based on the registered image pattern when the matching degree is equal to or higher than the reference. If the degree of coincidence is smaller than the reference, the dictionary determining unit 540 is instructed to newly register a font image corresponding to the character image as an image pattern in the image dictionary.

ステップ110(S110)において、フォント提供部520は、文字認識部410から入力された文字コードに基づいて、切り出された文字画像に対応するフォント画像をフォントDB525から読み出し、読み出されたフォント画像(1つ以上)を記憶部500に出力する。   In step 110 (S110), the font providing unit 520 reads a font image corresponding to the extracted character image from the font DB 525 based on the character code input from the character recognition unit 410, and reads the read font image ( 1 or more) is output to the storage unit 500.

ステップ112(S112)において、一致判定部530は、フォント提供部520により提供されたフォント画像と、切り出された文字画像とを相対的に移動させながら比較して、一致度合いを判定する。具体的には、一致判定部530は、提供された1つ以上のフォント画像T(x)と、切り出された文字画像P(i,x−vi)との一致画素数Kを算出する。
(一致画素数K)=Σ{T(x)*P(i,x−vi)}
次に、一致判定部530は、この一致画素数Kに基づいて一致画素率K’を算出する。(一致画素率K’)=K/M
In step 112 (S112), the coincidence determination unit 530 compares the font image provided by the font providing unit 520 and the clipped character image while relatively moving them to determine the degree of coincidence. Specifically, the coincidence determination unit 530 calculates the number K of coincidence pixels between the provided one or more font images T (x) and the extracted character image P (i, x-vi).
(Number of matched pixels K) = Σ {T (x) * P (i, x−vi)}
Next, the coincidence determination unit 530 calculates a coincidence pixel rate K ′ based on the coincidence pixel number K. (Matched pixel rate K ′) = K / M

ステップ114(S114)において、辞書決定部540は、一致判定部530により判定されたフォント画像と文字画像との一致度合いに基づいて、フォント画像を画像パターンとして画像辞書に登録するか否かを判定する。具体的には、辞書決定部540は、フォント画像と文字画像との一致画素率K’が既定の閾値以上である場合に、S116の処理に移行し、この一致画素率K’が既定の閾値よりも小さい場合に、S126の処理に移行する。   In step 114 (S114), the dictionary determination unit 540 determines whether or not to register the font image as an image pattern in the image dictionary based on the degree of matching between the font image and the character image determined by the match determination unit 530. To do. Specifically, when the matching pixel rate K ′ between the font image and the character image is equal to or greater than a predetermined threshold, the dictionary determining unit 540 proceeds to the process of S116, and the matching pixel rate K ′ If it is smaller, the process proceeds to S126.

ステップ116(S116)において、辞書決定部540は、それぞれのフォント画像について判定された一致度合いに基づいて、画像パターンとして登録すべきフォント画像を選択する。具体的には、辞書決定部540は、切り出された文字画像とそれぞれのフォント画像とについて算出された一致画素率K’を比較して、最大の一致画素率K’となるフォント画像を画像パターンとして選択する。   In step 116 (S116), the dictionary determining unit 540 selects a font image to be registered as an image pattern based on the degree of matching determined for each font image. Specifically, the dictionary determining unit 540 compares the matching pixel rate K ′ calculated for the cut character image and each font image, and determines the font image having the maximum matching pixel rate K ′ as an image pattern. Choose as.

ステップ118(S118)において、インデクス付与部560は、辞書決定部540により選択された画像パターンに対して、この画像パターンを一意に識別する識別情報(インデクス)を付与する。そして、インデクス付与部560は、付与したインデクスを画像パターンに対応付けて画像辞書として記憶部500に格納する。付与されるインデクスは、少なくとも、符号化対象として入力された全入力画像について、それぞれの画像パターンを一意に識別するものである。
なお、付与されたインデクスは、符号化対象データとして順次符号化部60に出力される。
In step 118 (S118), the index assigning unit 560 assigns identification information (index) for uniquely identifying the image pattern to the image pattern selected by the dictionary determining unit 540. Then, the index adding unit 560 stores the added index in the storage unit 500 as an image dictionary in association with the image pattern. The assigned index uniquely identifies each image pattern for at least all input images input as encoding targets.
The assigned index is sequentially output to the encoding unit 60 as encoding target data.

ステップ120(S120)において、位置補正部550は、一致判定部530により複数の相対位置で算出される一致度合い(一致画素数K又は一致画素率K’)に基づいて、文字認識部410から入力された位置情報の補正ベクトルを決定する。具体的には、位置補正部550は、S112において、切り出された文字画像とフォント画像とについて算出される一致画素数Kが最大となったときのずらしベクトルvi(文字認識部410から入力された位置情報を基準として文字画像を変位させた2次元ベクトル)を補正ベクトルとする。
すなわち、画像辞書作成部50は、切り出された文字画像に対応する画像パターンが画像辞書に登録されていない場合に、画像辞書に登録するフォント画像を基準として、このフォント画像と文字画像とが最も一致するように切出し位置を補正する。
なお、補正ベクトルにより補正された文字画像の位置情報は、符号化対象データとして順次符号化部60に出力される。
In step 120 (S120), the position correction unit 550 receives an input from the character recognition unit 410 based on the degree of matching (the number of matching pixels K or the matching pixel rate K ′) calculated at the plurality of relative positions by the matching determination unit 530. A correction vector for the obtained position information is determined. Specifically, in S112, the position correction unit 550 outputs the shift vector vi (input from the character recognition unit 410) when the number of coincident pixels K calculated for the clipped character image and font image is the maximum. A two-dimensional vector obtained by displacing the character image with reference to the position information) is set as a correction vector.
That is, when the image pattern corresponding to the clipped character image is not registered in the image dictionary, the image dictionary creation unit 50 uses the font image registered in the image dictionary as a reference and the font image and the character image are the most. Correct the cutting position so that they match.
Note that the position information of the character image corrected by the correction vector is sequentially output to the encoding unit 60 as encoding target data.

ステップ122(S122)において、位置補正部550は、一致判定部530により画像パターンと文字画像とについて判定される一致度合いに基づいて、文字認識部410から入力された位置情報の補正ベクトルを決定する。具体的には、位置補正部550は、S106において、切り出された文字画像と画像パターンとについて算出される一致画素数Kが最大となったときのずらしベクトルviを補正ベクトルとする。
すなわち、画像辞書作成部50は、切り出された文字画像に対応する画像パターンが既に画像辞書に登録されている場合に、登録されている画像パターンとこの文字画像とが最も一致するように切出し位置を補正する。
なお、補正ベクトルにより補正された文字画像の位置情報は、符号化対象データとして順次符号化部60に出力される。
In step 122 (S122), the position correction unit 550 determines the correction vector of the position information input from the character recognition unit 410 based on the degree of matching determined by the match determination unit 530 for the image pattern and the character image. . Specifically, in S106, the position correction unit 550 sets the shift vector vi when the number of matching pixels K calculated for the extracted character image and image pattern is the maximum as the correction vector.
That is, when the image pattern corresponding to the clipped character image is already registered in the image dictionary, the image dictionary creation unit 50 cuts out the clipped position so that the registered image pattern and this character image most closely match. Correct.
Note that the position information of the character image corrected by the correction vector is sequentially output to the encoding unit 60 as encoding target data.

ステップ124(S124)において、符号化部60は、画像辞書作成部50から符号化対象データとして入力されるインデクス及び文字画像の位置情報(位置補正部550により補正されたもの)を符号化し、符号化されたインデクス及び位置情報(符号データ)を順次プリンタ装置10又は記録装置24等に出力する。具体的には、位置情報符号化部620が、画像辞書作成部50から入力される位置情報を符号化し、インデクス符号化部630が、画像辞書作成部50から入力されるインデクスを符号化し、選択部660及び符号出力部670が、符号化された位置情報及びインデクスを互いに対応付けて出力する。   In step 124 (S124), the encoding unit 60 encodes the index and character image position information (corrected by the position correction unit 550) input as encoding target data from the image dictionary creation unit 50, and The converted index and position information (code data) are sequentially output to the printer 10 or the recording device 24 or the like. Specifically, the position information encoding unit 620 encodes the position information input from the image dictionary creation unit 50, and the index encoding unit 630 encodes and selects the index input from the image dictionary creation unit 50. The unit 660 and the code output unit 670 output the encoded position information and index in association with each other.

ステップ126(S126)において、符号化部60は、切り出された文字画像のデータをそのまま符号化し、符号化された画像データ(符号データ)をプリンタ装置10又は記録装置24等に出力する。具体的には、画像符号化部640が、切り出された文字画像のデータをそのまま符号化し、選択部660及び符号出力部670が、符号化された文字画像のデータを出力する。
すなわち、符号化部60は、切り出された文字画像と、この文字画像に対して提供されたフォント画像とがいずれも基準以上一致しない場合に、この切り出された文字画像そのものを符号化する。
In step 126 (S126), the encoding unit 60 encodes the extracted character image data as it is, and outputs the encoded image data (code data) to the printer device 10 or the recording device 24 or the like. Specifically, the image encoding unit 640 encodes the extracted character image data as it is, and the selection unit 660 and the code output unit 670 output the encoded character image data.
That is, the encoding unit 60 encodes the extracted character image itself when the extracted character image and the font image provided for the character image do not match at least the reference.

ステップ128(S128)において、符号化プログラム5は、入力画像に含まれる全ての文字画像について符号化処理が終了したか否かを判定し、全ての文字画像について終了している場合にS130の処理に移行し、これ以外の場合にS102の処理に戻り次の文字画像を切り出してS104からS128までの処理を繰り返す。   In step 128 (S128), the encoding program 5 determines whether or not the encoding process has been completed for all character images included in the input image. If all the character images have been completed, the process of S130 is performed. In other cases, the process returns to S102 and the next character image is cut out, and the processes from S104 to S128 are repeated.

ステップ130(S130)において、符号化部60は、画像辞書として登録された画像パターン及びインデクスを符号化する。具体的には、辞書符号化部650は、画像辞書として画像辞書作成部50から入力された画像パターン及びインデクスを互いに対応付けて符号化する。
ステップ132(S132)において、符号化部60は、符号化された画像辞書を入力画像の符号データに対応付けてプリンタ装置10又は記録装置24等に出力する。具体的には、符号出力部670は、辞書符号化部650により符号化された画像パターン及びインデクス(すなわち、画像辞書)を入力画像の符号データに対応付けて出力する。
In step 130 (S130), the encoding unit 60 encodes the image pattern and index registered as an image dictionary. Specifically, the dictionary encoding unit 650 encodes the image pattern and the index input from the image dictionary creation unit 50 as an image dictionary in association with each other.
In step 132 (S132), the encoding unit 60 associates the encoded image dictionary with the code data of the input image and outputs it to the printer device 10 or the recording device 24 or the like. Specifically, the code output unit 670 outputs the image pattern and index (that is, the image dictionary) encoded by the dictionary encoding unit 650 in association with the code data of the input image.

以上説明したように、第1の実施形態における画像処理装置2は、入力画像に含まれる文字画像とフォント画像とを比較して、これらの一致度合いに基づいてフォント画像を画像辞書に登録する。これにより、入力画像に含まれる類型的な画像パターンを効率よく選択することが可能になる。
また、本画像処理装置2は、文字認識処理の結果として取得した文字コードに基づいて、フォント画像を選択する。これにより、切り出された文字画像と比較すべきフォント画像が絞り込まれるため、画像辞書に登録するフォント画像の選択が容易になる。なお、画像処理装置2は、文字認識処理の結果としてフォントの種類又は文字画像の画像サイズ(例えばフォントサイズ)等が取得される場合に、フォントの種類又は画像サイズ等によりフォント画像を選択してもよいし、PDLデコンポーザ420で生成された文字識別情報によりフォント画像を選択してもよい。
また、本実施形態における画像処理装置2は、文字画像に最も近似するフォント画像を画像パターンとして画像辞書に登録する。これにより、原稿の汚れや複写の繰返しによる画質劣化などが解消されて可読性が向上する。
また、本実施形態における画像処理装置2は、フォント画像を基準として文字画像の切出し位置を補正する。これにより、復号化された画像において、文字画像それぞれの位置がより正確に再現される。特に、文字の切出し領域と切り出される文字とで重心位置が異なる場合などに好適である。
As described above, the image processing apparatus 2 according to the first embodiment compares the character image included in the input image with the font image, and registers the font image in the image dictionary based on the degree of matching. This makes it possible to efficiently select a typical image pattern included in the input image.
The image processing apparatus 2 selects a font image based on the character code acquired as a result of the character recognition process. As a result, the font images to be compared with the cut-out character image are narrowed down, and the font image to be registered in the image dictionary can be easily selected. Note that the image processing apparatus 2 selects a font image according to the font type or the image size or the like when the font type or the image size (for example, the font size) of the character image is acquired as a result of the character recognition process. Alternatively, the font image may be selected based on the character identification information generated by the PDL decomposer 420.
In addition, the image processing apparatus 2 according to the present embodiment registers a font image closest to the character image in the image dictionary as an image pattern. As a result, the smearing of the original and the image quality deterioration due to repeated copying are eliminated, and the readability is improved.
Further, the image processing apparatus 2 in the present embodiment corrects the cutout position of the character image with reference to the font image. Thereby, the position of each character image is more accurately reproduced in the decoded image. In particular, it is suitable when the position of the center of gravity differs between the character cut-out area and the character to be cut out.

[第2実施形態]
次に、第2の実施形態を説明する。
上記第1の実施形態では、画像辞書作成部50は、逐次的に入力画像から文字画像を切り出し、切り出された文字画像に基づいて順次画像辞書を作成していたが、本実施形態における第2の画像辞書作成部52は、1ページ又は1ドキュメントなどの入力画像全体に基づいて、画像辞書を作成する。
また、本実施形態における画像辞書作成部52は、形態が類似する複数のフォント画像に基づいて、画像辞書に登録すべき画像パターンを作成することにより、フォント画像の多様性に対応しつつ、高い符号化効率を実現する画像辞書を作成する。
[Second Embodiment]
Next, a second embodiment will be described.
In the first embodiment, the image dictionary creation unit 50 sequentially cuts out character images from the input image, and sequentially creates an image dictionary based on the cut out character images. The image dictionary creation unit 52 creates an image dictionary based on the entire input image such as one page or one document.
In addition, the image dictionary creation unit 52 according to the present embodiment creates an image pattern to be registered in the image dictionary based on a plurality of font images having similar forms, so that the image dictionary creation unit 52 is highly compatible with the variety of font images. An image dictionary that realizes encoding efficiency is created.

図8は、文字コードとフォント画像との関係を説明する図である。
図8(A)に例示するように、それぞれの文字コードには、形状が異なる複数のフォント画像が対応付けられている。例えば、数字の「1」に対応する文字コードに基づいて、形状が異なる複数のフォント画像が提供されうる。そして、上記第1の実施形態では、これらのフォント画像それぞれと一致する文字画像が入力画像中に存在すると、それぞれのフォント画像が画像パターンとして登録される。
しかしながら、これらフォント画像の違いは文字の可読性にそれほど影響を与えない。また、同一の文書内では同一のフォントが多く適用され、見出し等において他のフォントが稀に適用されるだけである。そして、出現頻度の低いフォント画像についても、画像辞書に画像パターンがそれぞれ登録されると、符号化効率の向上を妨げることとなる。
また、図8(B)に例示するように、文字認識処理のミスにより、形状が類似する文字(例えば、数字「1」とアルファベット大文字「I」と)が同一の文字コードとして判別されうる。この場合、少なくとも形状が近似しているため、可読性に与える影響はそれほど大きくないが、これらを区別できるように再現したい場合もある。
FIG. 8 is a diagram for explaining the relationship between a character code and a font image.
As illustrated in FIG. 8A, each character code is associated with a plurality of font images having different shapes. For example, a plurality of font images having different shapes can be provided based on a character code corresponding to the numeral “1”. In the first embodiment, when a character image that matches each of these font images exists in the input image, each font image is registered as an image pattern.
However, these font image differences do not significantly affect the readability of characters. Also, many of the same fonts are applied in the same document, and other fonts are rarely applied in headings and the like. Even for a font image having a low appearance frequency, if an image pattern is registered in the image dictionary, improvement in coding efficiency is hindered.
Further, as illustrated in FIG. 8B, due to a mistake in character recognition processing, characters having similar shapes (for example, the number “1” and the capital letter “I”) can be identified as the same character code. In this case, since the shape is at least approximate, the influence on the readability is not so great, but there are cases where it is desired to reproduce these so that they can be distinguished.

そこで、第2の実施形態における画像処理装置2は、このように互いに類似する複数のフォント画像を入力画像内での出現頻度に応じて統合して、画像辞書に登録すべき画像パターンを作成する。例えば、画像処理装置2は、それぞれのフォント画像に対応する文字画像の出現頻度に応じて、同一の文字コードに対応するフォント画像を統合して、入力画像において頻出する画像パターンを作成する。なお、同一文字コードのフォント画像により作成される画像パターンは、複数あってもよい。   Thus, the image processing apparatus 2 according to the second embodiment creates an image pattern to be registered in the image dictionary by integrating a plurality of font images similar to each other in accordance with the appearance frequency in the input image. . For example, the image processing apparatus 2 integrates font images corresponding to the same character code in accordance with the appearance frequency of the character image corresponding to each font image, and creates an image pattern that frequently appears in the input image. There may be a plurality of image patterns created from font images having the same character code.

図9は、第2の画像辞書作成部52の機能構成を説明する図である。なお、本図に示された各構成のうち、図5に示された構成と実質的に同一のものには同一の符号が付されている。
図9に示すように、第2の実施形態における画像辞書作成部52は、図5に示した第1の画像辞書作成部50において、登録制御部570を文字分類部580に置換した構成をとる。
文字分類部580は、文字コードに基づいて、入力画像から切り出された文字画像を複数の文字画像群に分類する。例えば、文字分類部520は、文字コードが一致する文字画像を同一の文字画像群に分類する。
この場合、辞書決定部540は、文字コードが一致する複数の文字画像に対応するフォント画像(複数の文字画像とそれぞれ最も一致するフォント画像)に基づいて、それぞれのフォント画像の出現頻度に応じた画像パターンを作成する。なお、文字分類部580が、切り出された文字画像それぞれに対応するフォント画像(それぞれの文字画像と最も一致するフォント画像)を、切り出された文字画像の文字コードに応じて分類してもよい。
FIG. 9 is a diagram illustrating the functional configuration of the second image dictionary creation unit 52. Of the components shown in the figure, those substantially the same as those shown in FIG. 5 are given the same reference numerals.
As shown in FIG. 9, the image dictionary creation unit 52 in the second embodiment has a configuration in which the registration control unit 570 is replaced with a character classification unit 580 in the first image dictionary creation unit 50 shown in FIG. .
The character classifying unit 580 classifies the character images cut out from the input image into a plurality of character image groups based on the character code. For example, the character classification unit 520 classifies character images having the same character code into the same character image group.
In this case, the dictionary determining unit 540 responds to the appearance frequency of each font image based on the font images corresponding to the plurality of character images having the same character code (the font image most matching each of the plurality of character images). Create an image pattern. Note that the character classification unit 580 may classify the font images corresponding to each of the extracted character images (the font image that most closely matches each character image) according to the character code of the extracted character image.

図10は、符号化プログラム5の第2の動作(S20)を示すフローチャートである。なお、本フローチャートでは、プリンタ装置10のスキャナ機能により光学的に読み取られた2値の画像データが入力される場合を具体例として説明する。また、本図に示された各処理のうち、図7に示された処理と実質的に同一のものには同一の符号が付されている。
図10に示すように、S100からS112の処理において、画像入力部40は、プリンタ装置10(図3)から画像データ(2値)が入力されると、入力された画像データ(入力画像)に対して文字認識処理を行い、文字認識処理の結果(文字コード及び位置情報)と入力画像とを画像辞書作成部50に対して出力する。
画像辞書作成部52は、入力された位置情報に基づいて、入力画像から文字画像を1文字分ずつ切り出し、切り出される文字画像の文字コードに基づいて、1つ以上のフォント画像をフォントDB525から読み出し、読み出されたフォント画像(1つ以上)と、切り出された文字画像とを相対的に移動させながら一致画素率K’を算出する。
FIG. 10 is a flowchart showing the second operation (S20) of the encoding program 5. In this flowchart, a case where binary image data optically read by the scanner function of the printer apparatus 10 is input will be described as a specific example. Also, among the processes shown in the figure, the same reference numerals are assigned to the processes that are substantially the same as those shown in FIG.
As shown in FIG. 10, in the processing from S100 to S112, when image data (binary) is input from the printer 10 (FIG. 3), the image input unit 40 converts the input image data (input image). Character recognition processing is performed on the image, and the result of the character recognition processing (character code and position information) and the input image are output to the image dictionary creation unit 50.
The image dictionary creation unit 52 cuts out character images one character at a time from the input image based on the input position information, and reads out one or more font images from the font DB 525 based on the character code of the cut out character image. The matching pixel ratio K ′ is calculated while relatively moving the read font image (one or more) and the extracted character image.

ステップ202(S202)において、辞書決定部540は、一致判定部530により算出されたフォント画像と文字画像との一致画素率K’に基づいて、フォントDB525から読み出されたフォント画像の中から、切り出された文字画像と最も一致するフォント画像を選択する。
ステップ204(S204)において、画像辞書作成部50は、入力画像に含まれる文字画像全てが切り出されたか否かを判定し、全ての文字画像が切り出された場合に、S206の処理に移行し、これ以外の場合に、S102の処理に戻り次の文字画像を切り出してS110からS204までの処理を繰り返す。
In step 202 (S202), the dictionary determination unit 540 determines from the font images read from the font DB 525 based on the matching pixel rate K ′ between the font image and the character image calculated by the matching determination unit 530. Select the font image that most closely matches the extracted character image.
In step 204 (S204), the image dictionary creation unit 50 determines whether or not all the character images included in the input image have been cut out. If all the character images have been cut out, the process proceeds to S206. In other cases, the process returns to S102, the next character image is cut out, and the processes from S110 to S204 are repeated.

ステップ206(S206)において、文字分類部580は、切り出された文字画像それぞれについて選択されたフォント画像(それぞれの文字画像と最も一致するフォント画像)を、これら文字画像の文字コードに基づいて分類する。
ステップ210(S210)において、辞書決定部540は、文字分類部580により分類されたフォント画像に基づいて、画像辞書に登録すべき画像パターンを作成する。
In step 206 (S206), the character classification unit 580 classifies the font images selected for each of the cut out character images (the font image that most closely matches each character image) based on the character codes of these character images. .
In step 210 (S210), the dictionary determination unit 540 creates an image pattern to be registered in the image dictionary based on the font images classified by the character classification unit 580.

ステップ230(S230)において、インデクス付与部560は、辞書決定部540により作成された画像パターンに対してインデクスを付与し、付与されたインデクスを画像パターンに対応付けて記憶部500に格納する。付与されるインデクスは、少なくとも、符号化対象として入力された全入力画像において、それぞれの画像パターンを一意に識別するものである。
画像パターンの作成及びインデクスの付与が符号化対象として入力された全入力画像について終了すると、これらの画像パターン及びインデクスは、画像辞書として符号化部60に出力される。
In step 230 (S230), the index assigning unit 560 assigns an index to the image pattern created by the dictionary determining unit 540, and stores the assigned index in the storage unit 500 in association with the image pattern. The assigned index uniquely identifies each image pattern in at least all input images input as encoding targets.
When image pattern creation and index assignment have been completed for all input images input as encoding targets, these image patterns and indexes are output to the encoding unit 60 as an image dictionary.

ステップ240(S240)において、符号化部60は、画像辞書に登録された画像パターンと、入力画像に含まれる部分画像とを比較して、部分画像と一致する画像パターンが画像辞書に存在する場合に、この部分画像をインデクス及び位置情報に置換して符号化し、部分画像と一致する画像パターンが画像辞書に存在しない場合に、この部分画像をそのまま符号化する。また、符号化部60は、画像辞書を符号化する。
符号化部60は、インデクス、位置情報、部分画像及び画像辞書の符号データを互いに対応付けてプリンタ装置10等に出力する。
In step 240 (S240), the encoding unit 60 compares the image pattern registered in the image dictionary with the partial image included in the input image, and an image pattern that matches the partial image exists in the image dictionary. In addition, this partial image is encoded by replacing it with the index and position information, and when the image pattern matching the partial image does not exist in the image dictionary, the partial image is encoded as it is. The encoding unit 60 encodes the image dictionary.
The encoding unit 60 associates the index, the position information, the partial image, and the code data of the image dictionary with each other and outputs them to the printer device 10 or the like.

図11は、第2の実施形態における画像パターン作成処理(S210)をより詳細に説明するフローチャートである。
図11に示すように、ステップ212(S212)において、一致判定部530は、文字コード毎に分類されたフォント画像を互いに比較して、複数の相対位置における一致度合いを判定する。具体的には、一致判定部530は、分類された複数のフォント画像(以下、フォント画像群)における黒画素の画素分布(ヒストグラム)を作成し、作成された画素分布と、このフォント画像群に含まれるフォント画像とを互いにずらしながら黒画素の一致画素数を算出する。なお、画素分布は、フォント画像群に属するフォント画像の黒画素を一致画素数が最大となる相対位置で領域毎に画素値を順次加算したヒストグラムである。
すなわち、フォント画像群の画素分布をQ(x)、各フォント画像の黒画素分布をP(i,x)、位置ベクトルをx、フォント画像群に属する各フォント画像をi(1〜N:Nはフォント画像群に属するフォント画像の数)、フォント画像iのずらしベクトルをviとした場合に、一致判定部530は、以下の数式により一致画素数を算出する。
(一致画素数K)=Σ{Q(x)*P(i,x−vi)}
なお、i=1の場合には、
Q(x)=P(1,x)
となり、
i>1の場合には、
Q(x)=P(1,x)+P(2,x−v2)+・・・+P(i−1,x−v(i−1))
となる。
FIG. 11 is a flowchart illustrating the image pattern creation process (S210) in the second embodiment in more detail.
As shown in FIG. 11, in step 212 (S212), the coincidence determination unit 530 compares the font images classified for each character code with each other, and determines the degree of coincidence at a plurality of relative positions. Specifically, the coincidence determination unit 530 creates a pixel distribution (histogram) of black pixels in a plurality of classified font images (hereinafter referred to as font image group), and creates the pixel distribution and the font image group. The number of matching pixels of black pixels is calculated while shifting the contained font image from each other. The pixel distribution is a histogram obtained by sequentially adding pixel values for each region at a relative position where the number of matching pixels is maximum for the black pixels of the font image belonging to the font image group.
That is, the pixel distribution of the font image group is Q (x), the black pixel distribution of each font image is P (i, x), the position vector is x, and each font image belonging to the font image group is i (1 to N: N). Is the number of font images belonging to the font image group), and when the shift vector of the font image i is vi, the coincidence determination unit 530 calculates the number of coincidence pixels by the following formula.
(Number of matched pixels K) = Σ {Q (x) * P (i, x−vi)}
When i = 1,
Q (x) = P (1, x)
And
If i> 1,
Q (x) = P (1, x) + P (2, x−v2) +... + P (i−1, x−v (i−1))
It becomes.

ステップ214(S214)において、辞書決定部540は、一致判定部530により算出された一致度合い(画素分布)に対して、閾値以下の分布数を除去する閾値処理を行う。具体的には、辞書決定部540は、一致判定部530により算出されたQ(x)を正規化してQ’(x)を算出し、算出されたQ’(x)に対して閾値処理を行う。すなわち、辞書決定部540は、以下の数式により分布確率Q’(x)を算出する。
Q’(x)=Q(x)/N
次に、一致判定部530は、以下の条件式により、分布確率Q’(x)が基準値よりも小さい部分を除去してQ”(x)を算出する。
Q’(x)>閾値Aの場合に、Q”(x)=1
上記以外の場合に、Q”(x)=0
In step 214 (S214), the dictionary determining unit 540 performs threshold processing for removing the number of distributions equal to or less than the threshold for the degree of matching (pixel distribution) calculated by the matching determining unit 530. Specifically, the dictionary determining unit 540 normalizes Q (x) calculated by the match determination unit 530 to calculate Q ′ (x), and performs threshold processing on the calculated Q ′ (x). Do. That is, the dictionary determination unit 540 calculates the distribution probability Q ′ (x) by the following formula.
Q ′ (x) = Q (x) / N
Next, the coincidence determination unit 530 calculates Q ″ (x) by removing a portion where the distribution probability Q ′ (x) is smaller than the reference value according to the following conditional expression.
When Q ′ (x)> threshold A, Q ″ (x) = 1
In other cases, Q ″ (x) = 0

ステップ216(S216)において、辞書決定部540は、閾値処理後の画素分布について、分布数が0でない領域(黒画素の領域)が基準よりも広いか否かを判定し、基準以上ある場合に、S218の処理に移行し、基準よりも狭い場合に、このフォント画像群について画像パターンの登録を行わずに、画像パターン作成処理(S210)を終了する。具体的には、辞書決定部540は、上記Q”(x)が1となる画素の数が基準値以上であるか否かを判定し、基準値以上である場合に、画像パターンの登録を行い、基準値よりも小さい場合に、画像パターンの登録を行わない。
すなわち、画像処理装置2は、出現回数の少ないフォント画像(すなわち、文字画像)については画像パターンの登録を行わず、文字画像そのものを符号化する。これにより、符号化効率の観点からみて不要な画像パターンの登録が排除される。
In step 216 (S216), the dictionary determining unit 540 determines whether or not an area where the number of distributions is not 0 (black pixel area) is wider than the reference with respect to the pixel distribution after the threshold processing. The process proceeds to S218, and if it is narrower than the reference, the image pattern creation process (S210) is terminated without registering the image pattern for this font image group. Specifically, the dictionary determination unit 540 determines whether or not the number of pixels for which Q ″ (x) is 1 is greater than or equal to a reference value. If the number is greater than or equal to the reference value, registration of an image pattern is performed. If it is smaller than the reference value, the image pattern is not registered.
That is, the image processing apparatus 2 encodes a character image itself without registering an image pattern for a font image (that is, a character image) with a small number of appearances. This eliminates registration of unnecessary image patterns from the viewpoint of encoding efficiency.

ステップ218(S218)において、辞書決定部540は、画素分布に基づいて、和結合パターンQ”(x)を決定する。具体的には、辞書決定部540は、閾値処理がなされたQ”(x)を和結合パターンとする。
ステップ220(S220)において、辞書決定部540は、和結合パターンQ”(x)と、このフォント画像群に属するフォント画像との共通部分(積集合)を共通パターンとして抽出する。
ステップ222(S222)において、辞書決定部540は、抽出された共通パターンを画像パターンに決定する。なお、辞書決定部540は、それぞれのフォント画像に基づいて抽出された共通パターンすべてを画像辞書に登録するわけではなく、重複する共通パターンを排除して画像辞書に登録する。また、辞書決定部540は、それぞれの文字画像に基づいて抽出された複数の共通パターンのうち、黒画素の領域の違いが閾値以下である場合にも、重複するものとして排除してもよい。また、辞書決定部540は、和結合パターンQ”そのものを画像パターンとして画像辞書に登録してもよい。
In step 218 (S218), the dictionary determining unit 540 determines the sum combination pattern Q ″ (x) based on the pixel distribution. Specifically, the dictionary determining unit 540 performs Q ″ ( Let x) be the union pattern.
In step 220 (S220), the dictionary determining unit 540 extracts a common part (product set) between the sum combination pattern Q ″ (x) and the font images belonging to the font image group as a common pattern.
In step 222 (S222), the dictionary determining unit 540 determines the extracted common pattern as an image pattern. Note that the dictionary determining unit 540 does not register all the common patterns extracted based on the respective font images in the image dictionary, but excludes overlapping common patterns and registers them in the image dictionary. Further, the dictionary determination unit 540 may also exclude a plurality of common patterns extracted based on each character image as overlapping even when the difference in the black pixel area is equal to or less than a threshold value. The dictionary determination unit 540 may register the sum combination pattern Q ″ itself as an image pattern in the image dictionary.

ステップ224(S224)において、一致判定部530は、切り出された文字画像と、この文字画像に対応する画像パターン(文字画像の文字コードで分類されたフォント画像により作成されたもの)とを複数の相対位置で比較して、一致画素数Kを算出する。
位置補正部550は、一致判定部530により算出される一致画素数Kが最大となったときのずらしベクトルviを補正ベクトルとする。
In step 224 (S224), the coincidence determination unit 530 outputs a plurality of character images that have been cut out and image patterns corresponding to the character images (created from font images classified by character codes of the character images). The number of coincidence pixels K is calculated by comparison at the relative position.
The position correction unit 550 sets the shift vector vi when the number of matching pixels K calculated by the matching determination unit 530 is maximum as a correction vector.

図12は、第2の実施形態における画像パターン作成処理(S210)を模式的に説明する図である。
図12に示すように、文字コードで分類されたフォント画像の黒画素の分布確率Q’(x)は、画素位置xによって異なる数値を示す。これは、フォント画像群の中に、形状の異なるフォント画像が異なる出現頻度で混在しているからである。分布確率Q’(x)は、閾値Bにより閾値処理がなされることにより、分布確率の低い部分を除去される。これにより、出現頻度が低いフォント文字(入力画像)の差分形状(出現頻度の高いフォント画像との差分)及びノイズ部分等を排除して、類型的な形状のみを画像パターンとすることができる。
辞書決定部540は、続いて、閾値B以上の部分を1とし、閾値Bよりも小さい部分を0とした和結合パターンQ”(x)を生成し、生成された和結合パターンQ”(x)と、フォント画像群に属する各フォント画像との共通部分を共通パターンとして抽出する。すなわち、辞書決定部540は、和結合パターンQ”(x)と、各フォント画像の画素分布P(i,x−vi)とを積演算する。これにより、フォント画像群の中に複数存在する類型的なフォント画像(出現頻度の高いフォント画像)の画像パターン#1及び画像パターン#2が抽出される。
FIG. 12 is a diagram schematically illustrating the image pattern creation process (S210) in the second embodiment.
As shown in FIG. 12, the black pixel distribution probability Q ′ (x) of the font image classified by the character code indicates a different numerical value depending on the pixel position x. This is because font images having different shapes are mixed with different appearance frequencies in the font image group. The distribution probability Q ′ (x) is subjected to threshold processing using the threshold B, and thus a portion with a low distribution probability is removed. Thereby, it is possible to eliminate only the differential shape (difference from the font image with high appearance frequency), the noise portion, and the like of the font characters (input image) with low appearance frequency, and make only a typical shape as an image pattern.
Subsequently, the dictionary determination unit 540 generates a sum coupling pattern Q ″ (x) in which a portion equal to or greater than the threshold B is 1 and a portion smaller than the threshold B is 0, and the generated sum coupling pattern Q ″ (x ) And each font image belonging to the font image group is extracted as a common pattern. That is, the dictionary determining unit 540 performs a product operation on the sum coupling pattern Q ″ (x) and the pixel distribution P (i, x−vi) of each font image. Thereby, a plurality of font images exist in the font image group. Image pattern # 1 and image pattern # 2 of a typical font image (a font image having a high appearance frequency) are extracted.

図13は、第2の実施形態における符号化処理(S240)をより詳細に説明するフローチャートである。なお、本フローチャートでは、図11で作成された画像パターンに基づいて符号化処理を行う場合を具体例として説明する。
図13に示すように、ステップ242(S242)において、パターン判定部610は、補正ベクトルによる補正後の位置情報に基づいて入力画像から切り出された部分画像(すなわち、文字画像)と、画像辞書に登録された画像パターンとを比較して、一致画素数を算出する。なお、パターン判定部610は、一致判定部530から一致画素数を取得してもよい。
ステップ244(S244)において、パターン判定部610は、一致する画像パターンが存在するか否かを判定する。具体的には、パターン判定部610は、それぞれの画像パターンについて算出された一致画素数が許容範囲(例えば、部分画像の全画素に対して90%以上)内であるか否かを判定し、許容範囲内である場合に、S246の処理に移行し、許容範囲外である場合に、S250の処理に移行する。
FIG. 13 is a flowchart for explaining in more detail the encoding process (S240) in the second embodiment. In this flowchart, a case where the encoding process is performed based on the image pattern created in FIG. 11 will be described as a specific example.
As shown in FIG. 13, in step 242 (S242), the pattern determination unit 610 uses a partial image (that is, a character image) cut out from the input image based on the position information corrected by the correction vector, and an image dictionary. The number of matching pixels is calculated by comparing with the registered image pattern. Note that the pattern determination unit 610 may acquire the number of matching pixels from the matching determination unit 530.
In step 244 (S244), the pattern determination unit 610 determines whether there is a matching image pattern. Specifically, the pattern determination unit 610 determines whether or not the number of matching pixels calculated for each image pattern is within an allowable range (for example, 90% or more with respect to all pixels of the partial image), If it is within the allowable range, the process proceeds to S246, and if it is outside the allowable range, the process proceeds to S250.

ステップ246(S246)において、パターン判定部610は、一致画素数が許容範囲内である画像パターンのうち、一致画素数が最大の画像パターンのインデクスを画像辞書から読み出し、読み出されたインデクスをインデクス符号化部630に対して出力し、この文字画像の位置情報(位置補正部550により補正されたもの)を位置情報符号化部620に対して出力する。
インデクス符号化部630は、パターン判定部610から入力されたインデクスを符号化し、インデクスの符号データを選択部660に対して出力する。
In step 246 (S246), the pattern determination unit 610 reads the index of the image pattern having the largest number of matching pixels from the image dictionary among the image patterns having the matching pixel number within the allowable range, and reads the read index into the index. This is output to the encoding unit 630 and the position information of the character image (corrected by the position correction unit 550) is output to the position information encoding unit 620.
The index encoding unit 630 encodes the index input from the pattern determination unit 610 and outputs the index code data to the selection unit 660.

ステップ248(S248)において、位置情報符号化部620は、パターン判定部610から入力された位置情報を符号化し、位置情報の符号データを選択部660に対して出力する。
選択部660は、インデクス符号化部630から入力されたインデクスの符号データと、位置情報符号化部620から入力された位置情報の符号データとを互いに対応付けて符号出力部670に対して出力する。すなわち、選択部660は、部分画像毎に、インデクスと位置情報とを互いに対応付けられるように符号出力部670に出力する。
In step 248 (S248), the position information encoding unit 620 encodes the position information input from the pattern determination unit 610 and outputs code data of the position information to the selection unit 660.
The selection unit 660 associates the code data of the index input from the index encoding unit 630 and the code data of the position information input from the position information encoding unit 620 with each other and outputs them to the code output unit 670. . That is, the selection unit 660 outputs the index and the position information to the code output unit 670 so as to be associated with each other for each partial image.

ステップ250(S250)において、パターン判定部610は、この部分画像(すなわち、対応する画像パターンが画像辞書に存在しなかった文字画像)を画像符号化部640に対して出力する。
画像符号化部640は、パターン判定部610から入力された部分画像の画像データを符号化し、部分画像の符号データを選択部660に対して出力する。
選択部660は、画像符号化部640から入力された部分画像の符号データを符号出力部670に対して出力する。
In step 250 (S250), the pattern determination unit 610 outputs this partial image (that is, a character image for which the corresponding image pattern does not exist in the image dictionary) to the image encoding unit 640.
The image encoding unit 640 encodes the partial image image data input from the pattern determination unit 610 and outputs the partial image code data to the selection unit 660.
The selection unit 660 outputs the code data of the partial image input from the image encoding unit 640 to the code output unit 670.

ステップ252(S252)において、パターン判定部610は、全ての部分画像について符号化処理が終了したか否かを判定し、符号化していない部分画像が存在する場合に、S242の処理に戻って、次の部分画像の符号化処理を行い、全ての部分画像が符号化された場合に、S254の処理に移行する。
ステップ254(S254)において、辞書符号化部650は、画像辞書作成部50から入力された画像辞書(画像パターンとインデクスとを互いに対応付けたもの)を符号化し、画像辞書の符号データを符号出力部670に対して出力する。
In step 252 (S252), the pattern determination unit 610 determines whether or not the encoding process has been completed for all partial images. If there is an unencoded partial image, the process returns to the process of S242. When the next partial image is encoded and all the partial images have been encoded, the process proceeds to S254.
In step 254 (S254), the dictionary encoding unit 650 encodes the image dictionary (the image pattern and the index associated with each other) input from the image dictionary creation unit 50, and outputs the code data of the image dictionary as code output. Output to the unit 670.

以上説明したように、第2の実施形態における画像処理装置2は、入力画像に含まれる文字画像それぞれに対応するフォント画像(それぞれの文字画像毎にフォント画像が読み出されるため、同一のフォント画像が複数存在しうる)を、文字画像の文字コードに基づいて分類し、分類された複数のフォント画像と、これらのフォント画像の出現頻度とに基づいて、類型的な複数の画像パターンを決定することができる。これにより、出現頻度が高ければ、フォント又は大きさ等が異なるフォント画像もそれぞれ画像パターンとして画像辞書に登録され、出現頻度が低いフォント画像は画像辞書に登録されないため、類型的なフォント画像の再現を可能にしつつ、符号化効率を高めることができる。
なお、本実施形態では、画像処理装置2は、文字コードに基づいて文字画像を文字画像群に分類したが、文字コード及び文字画像の大きさを用いて文字画像を分類してもよい。
As described above, the image processing apparatus 2 according to the second embodiment has a font image corresponding to each character image included in the input image (the font image is read out for each character image. A plurality of types), and a plurality of typical image patterns are determined based on the classified font images and the appearance frequency of these font images. Can do. As a result, if the appearance frequency is high, font images having different fonts or sizes are also registered in the image dictionary as image patterns, and font images with a low appearance frequency are not registered in the image dictionary. Encoding efficiency can be improved.
In the present embodiment, the image processing apparatus 2 classifies the character images into character image groups based on the character codes. However, the image processing apparatus 2 may classify the character images using character codes and character image sizes.

[変形例]
次に、上記第2の実施形態の変形例を説明する。
図14は、同一の文字コードとして判定されうる複数の文字画像の共通形状及び差分形状を例示する図である。
図14(A)に例示するように、同一の文字コードに対して、形状が異なる(すなわち、フォントの種類が異なる)複数のフォント画像が対応付けられている。このように、文字コードに対応するフォント画像群は、大部分で同一の形状を有している。以下、フォント画像群に属する複数のフォント画像が共通して有する部分画像を共通形状といい、それぞれのフォント画像とこの共通形状との差分となる部分画像を差分形状という。
図14(B)に例示するように、これらのフォント画像を構成する部分形状のうち、第1レベルパターンは、これらのフォント画像の共通形状であるため出現頻度が特に高い。また、第2レベルパターンa及び第2レベルパターンbは、それぞれのフォント画像に固有の部分形状であり、第1レベルパターンに比べると出現頻度が低い。
そこで、本変形例における画像処理装置2は、文字コード毎に分類されたフォント画像群について、これらのフォント画像の共通形状及び差分形状をそれぞれ画像パターンとして画像辞書に階層的に登録する。
[Modification]
Next, a modification of the second embodiment will be described.
FIG. 14 is a diagram illustrating common shapes and differential shapes of a plurality of character images that can be determined as the same character code.
As illustrated in FIG. 14A, a plurality of font images having different shapes (that is, different font types) are associated with the same character code. Thus, the font image group corresponding to the character code has the same shape in most cases. Hereinafter, a partial image shared by a plurality of font images belonging to a font image group is referred to as a common shape, and a partial image that is a difference between each font image and the common shape is referred to as a differential shape.
As illustrated in FIG. 14B, among the partial shapes constituting these font images, the first level pattern has a particularly high appearance frequency because of the common shape of these font images. The second level pattern a and the second level pattern b are partial shapes unique to the respective font images, and their appearance frequency is lower than that of the first level pattern.
Therefore, the image processing apparatus 2 according to the present modification hierarchically registers the common shape and the difference shape of these font images in the image dictionary as image patterns for the font image group classified for each character code.

図15は、本変形例における画像パターン作成処理(S310)のフローチャートである。なお、本図における各処理のうち、図11に示された処理と実質的に同一のものには同一の符号が付されている。
図15に示すように、S216において、辞書決定部540が、閾値処理後の画素分布について、分布数が0でない領域(黒画素の領域)が基準よりも広いか否かを判定し、基準以上である場合に、S312の処理に移行し、基準よりも狭い場合に、このフォント画像群について画像パターンの登録を行わずに、画像パターン作成処理(S310)を終了する。
ステップ312(S312)において、辞書決定部540は、分布確率Q’(x)において第1レベル閾値よりも大きな部分を共通形状の画像パターン(すなわち、第1レベルパターン)として抽出する。ここで、第1レベル閾値とは、フォント画像群に属するフォント画像が共通して有する共通形状と、他の形状とを分離するための基準であり、本例では、フォント画像群に属するほぼ全てのフォント画像で黒画素が存在する場合の分布確率(0.95など)である。
FIG. 15 is a flowchart of the image pattern creation process (S310) in this modification. It should be noted that among the processes in this figure, the same reference numerals are assigned to the processes that are substantially the same as those shown in FIG.
As illustrated in FIG. 15, in S216, the dictionary determining unit 540 determines whether or not a region where the number of distributions is not 0 (black pixel region) is wider than the reference in the pixel distribution after the threshold processing. If it is, the process proceeds to S312. If it is narrower than the reference, the image pattern creation process (S310) ends without registering the image pattern for this font image group.
In step 312 (S312), the dictionary determining unit 540 extracts a portion larger than the first level threshold in the distribution probability Q ′ (x) as an image pattern having a common shape (that is, the first level pattern). Here, the first level threshold is a reference for separating the common shape that the font images belonging to the font image group have in common and other shapes. In this example, almost all of the first level threshold values belong to the font image group. Distribution probability when black pixels are present in the font image (0.95, etc.).

ステップ314(S314)において、辞書決定部540は、分布確率Q’(x)から第1レベルパターンに相当する部分を0にして、第1レベルパターンに相当する部分が除去された分布確率Q1(x)を生成する。
次に、辞書決定部540は、この分布確率Q1(x)において第2レベル閾値以上の部分を1、第2レベル閾値より小さい部分を0として、第1レベルパターンが除去された和結合パターンQ1”(x)を生成する。ここで、第2レベル閾値とは、共通形状の差分としてそれぞれのフォント画像を構成する差分形状であってフォント画像群において出現頻度が高いものを分離するための基準であり、第1レベル閾値よりも低く、例えば、目標となる符号量及び画質に応じて設定される。
そして、辞書決定部540は、この和結合パターンQ1”と、各フォント画像の画素分布P(i,x−vi)とを積演算して、これらの共通部分であるRi(x)を抽出し、抽出されたRi(x)を差分形状の画像パターン(すなわち、第2レベルパターン)に決定する。
In step 314 (S314), the dictionary determination unit 540 sets the portion corresponding to the first level pattern to 0 from the distribution probability Q ′ (x) and removes the portion corresponding to the first level pattern from the distribution probability Q1 ( x).
Next, the dictionary determining unit 540 sets the portion of the distribution probability Q1 (x) equal to or higher than the second level threshold as 1 and sets the portion lower than the second level threshold as 0, and the sum coupling pattern Q1 from which the first level pattern has been removed. "(X) is generated. Here, the second level threshold is a standard for separating the difference shapes constituting the respective font images as the difference between the common shapes and having a high appearance frequency in the font image group." It is lower than the first level threshold, and is set according to the target code amount and image quality, for example.
Then, the dictionary determination unit 540 performs a product operation on the sum coupling pattern Q1 ″ and the pixel distribution P (i, x−vi) of each font image, and extracts Ri (x) that is a common part of these products. The extracted Ri (x) is determined to be an image pattern having a differential shape (that is, a second level pattern).

ステップ316(S316)において、辞書決定部540は、同一のフォント画像群(同一の文字コードで分類されたフォント画像)から生成された第1レベルパターン及び第2レベルパターンを互いに対応付けて画像辞書に登録する。より具体的には、辞書決定部540は、第1レベルパターン及び第2レベルパターンをそれぞれのインデクスにより階層的に対応付けて画像辞書に登録する。   In step 316 (S316), the dictionary determining unit 540 associates the first level pattern and the second level pattern generated from the same font image group (font images classified by the same character code) with each other, and creates an image dictionary. Register with. More specifically, the dictionary determining unit 540 registers the first level pattern and the second level pattern in the image dictionary in a hierarchical association with each index.

図16は、本変形例における画像パターン作成処理(S310)を模式的に説明する図である。
図16に示すように、文字コードで分類されたフォント画像の黒画素の分布確率Q’(x)は、画素位置xによって異なる数値を示す。このうち、分布確率が最も高い部分は、このフォント画像群に属するフォント画像に共通する形状(すなわち、共通形状)であると考えられる。そして、分布確率が存在する他の領域は、それぞれのフォント画像と共通形状との差分に相当する形状(すなわち、差分形状)であると考えられる。
そこで、辞書決定部540は、共通形状(分布確率がほぼ最大となる領域)を抽出するための第1レベル閾値と、出現頻度の高い差分形状を抽出するための第2レベル閾値とを有している。
まず、辞書決定部540は、分布確率Q’(x)に対して第1レベル閾値により閾値処理を行い、第1レベルパターン(共通形状)に相当する部分を抽出する。次に、分布確率Q’(x)から、抽出された第1レベルパターンに相当する部分が除去されて、第2レベル閾値を基準として「1」又は「0」に変換されることにより、第2レベル和結合パターンQ1”(x)が生成される。
辞書決定部540は、この第2レベル和結合パターンQ1”(x)と、各フォント画像iの画素分布P(i,x)とを積演算することにより、これらの共通部分である第2レベルパターンを抽出する。本例では、第2レベル和結合パターンQ1”(x)と「フォント画像#1」との共通部分は、第2レベルパターンaとなり、第2レベル和結合パターンQ1”(x)と「フォント画像#2」との共通部分は、第2レベルパターンbとなる。
これにより、「フォント画像#1」は、第1レベルパターンと第2レベルパターンaとの和としてそれぞれのインデクスに置換でき、「フォント画像#2」は、第1レベルパターンと第2レベルパターンbとの和としてインデクスに置換できる。
FIG. 16 is a diagram schematically illustrating the image pattern creation process (S310) in the present modification.
As shown in FIG. 16, the black pixel distribution probability Q ′ (x) of the font image classified by the character code indicates a different numerical value depending on the pixel position x. Of these, the portion with the highest distribution probability is considered to have a shape common to font images belonging to this font image group (that is, a common shape). The other area where the distribution probability exists is considered to have a shape corresponding to the difference between the respective font images and the common shape (that is, the difference shape).
Therefore, the dictionary determination unit 540 has a first level threshold for extracting a common shape (an area where the distribution probability is almost maximum) and a second level threshold for extracting a difference shape having a high appearance frequency. ing.
First, the dictionary determination unit 540 performs threshold processing on the distribution probability Q ′ (x) using the first level threshold, and extracts a portion corresponding to the first level pattern (common shape). Next, the portion corresponding to the extracted first level pattern is removed from the distribution probability Q ′ (x) and converted to “1” or “0” with the second level threshold as a reference, thereby A two-level sum coupling pattern Q1 ″ (x) is generated.
The dictionary determination unit 540 performs a product operation on the second level sum combination pattern Q1 ″ (x) and the pixel distribution P (i, x) of each font image i, thereby obtaining a second level which is a common part of these products. In this example, the common part between the second level sum combined pattern Q1 ″ (x) and “font image # 1” is the second level pattern a, and the second level sum combined pattern Q1 ″ (x ) And “font image # 2” are the second level pattern b.
Thereby, “font image # 1” can be replaced with the respective indexes as the sum of the first level pattern and the second level pattern a, and “font image # 2” can be replaced with the first level pattern and the second level pattern b. Can be replaced with an index as the sum of

図17は、本変形例における符号化処理(S340)のフローチャートである。
図17に示すように、ステップ342(S342)において、パターン判定部610は、補正後の位置情報に基づいて入力画像から切り出された部分画像(すなわち、文字画像)と、画像辞書に登録された第1レベルパターンとを比較して、一致画素数を算出する。
ステップ344(S344)において、パターン判定部610は、入力された部分画像と一致する第1レベルパターンが存在するか否かを判定する。具体的には、パターン判定部610は、それぞれの第1レベルパターンについて算出された一致画素数が許容範囲(例えば、部分画像の全画素に対して90%以上)内であるか否かを判定し、許容範囲内である場合に、S346の処理に移行し、許容範囲外である場合に、S356の処理に移行する。
FIG. 17 is a flowchart of the encoding process (S340) in this modification.
As shown in FIG. 17, in step 342 (S 342), the pattern determination unit 610 is registered in the image dictionary and a partial image (that is, a character image) cut out from the input image based on the corrected position information. The number of matching pixels is calculated by comparing with the first level pattern.
In step 344 (S344), the pattern determination unit 610 determines whether there is a first level pattern that matches the input partial image. Specifically, the pattern determination unit 610 determines whether or not the number of matching pixels calculated for each first level pattern is within an allowable range (for example, 90% or more with respect to all pixels of the partial image). If the value is within the allowable range, the process proceeds to S346. If the value is outside the allowable range, the process proceeds to S356.

ステップ346(S346)において、パターン判定部610は、一致画素数が許容範囲内である第1レベルパターンのうち、一致画素数が最大の第1レベルパターンのインデクスを画像辞書から読み出し、読み出されたインデクスをインデクス符号化部630に対して出力し、この文字画像の位置情報(位置補正部550により補正されたもの)を位置情報符号化部620に対して出力する。
ステップ348(S348)において、パターン判定部610は、この第1レベルパターンの形状と、入力された部分画像との差分形状を抽出する。
ステップ350(S350)において、パターン判定部610は、この第1レベルパターンと対応付けられている第2レベルパターンを画像辞書から読み出し、読み出された第2レベルパターンと、抽出された差分形状とを比較して一致画素数を算出する。パターン判定部610は、それぞれの第2レベルパターンについて算出された一致画素数が許容範囲(例えば、差分形状の全画素に対して90%以上)内であるか否かを判定し、許容範囲内である場合に、S352の処理に移行し、許容範囲外である場合に、S354の処理に移行する。
In step 346 (S346), the pattern determination unit 610 reads from the image dictionary the index of the first level pattern having the largest number of matching pixels out of the first level patterns whose matching pixel number is within the allowable range, and is read out. The index is output to the index encoding unit 630, and the position information of the character image (corrected by the position correction unit 550) is output to the position information encoding unit 620.
In step 348 (S348), the pattern determination unit 610 extracts a difference shape between the shape of the first level pattern and the input partial image.
In step 350 (S350), the pattern determination unit 610 reads out the second level pattern associated with the first level pattern from the image dictionary, the read second level pattern, and the extracted difference shape. Are compared to calculate the number of matching pixels. The pattern determination unit 610 determines whether or not the number of matching pixels calculated for each second level pattern is within an allowable range (for example, 90% or more with respect to all pixels of the difference shape). If it is, the process proceeds to S352, and if it is outside the allowable range, the process proceeds to S354.

ステップ352(S352)において、パターン判定部610は、一致画素数が許容範囲内である第2レベルパターンのうち、一致画素数が最大の第2レベルパターンのインデクスを画像辞書から読み出し、読み出されたインデクスを、上記第1レベルパターンのインデクスと対応付けてインデクス符号化部630に対して出力する。
なお、本例では、第1レベルパターン及び第2レベルパターンのいずれとも一致しない黒画素をノイズ等として除去しているが、これらの黒画素そのものを別途符号化してもよい。
In step 352 (S352), the pattern determination unit 610 reads from the image dictionary the second level pattern index having the largest number of matching pixels from the second level pattern in which the number of matching pixels is within the allowable range, and is read out. The index is associated with the index of the first level pattern and output to the index encoding unit 630.
In this example, black pixels that do not match either the first level pattern or the second level pattern are removed as noise or the like, but these black pixels themselves may be encoded separately.

ステップ354(S354)において、位置情報符号化部620は、パターン判定部610から入力された位置情報を符号化し、位置情報の符号データを選択部660に対して出力する。
選択部660は、インデクス符号化部630から入力されたインデクスの符号データと、位置情報符号化部620から入力された位置情報の符号データとを互いに対応付けて符号出力部670に対して出力する。すなわち、選択部660は、部分画像毎に、インデクスと位置情報とを互いに対応付けられるように符号出力部670に出力する。
In step 354 (S354), the position information encoding unit 620 encodes the position information input from the pattern determination unit 610, and outputs code data of the position information to the selection unit 660.
The selection unit 660 associates the code data of the index input from the index encoding unit 630 and the code data of the position information input from the position information encoding unit 620 with each other and outputs them to the code output unit 670. . That is, the selection unit 660 outputs the index and the position information to the code output unit 670 so as to be associated with each other for each partial image.

ステップ356(S356)において、パターン判定部610は、この部分画像(すなわち、対応する第1レベルパターンが画像辞書に存在しなかった文字画像)を画像符号化部640に対して出力する。
画像符号化部640は、パターン判定部610から入力された部分画像の画像データを符号化し、部分画像の符号データを選択部660に対して出力する。
選択部660は、画像符号化部640から入力された部分画像の符号データを符号出力部670に対して出力する。
In step 356 (S356), the pattern determination unit 610 outputs the partial image (that is, the character image in which the corresponding first level pattern does not exist in the image dictionary) to the image encoding unit 640.
The image encoding unit 640 encodes the partial image image data input from the pattern determination unit 610 and outputs the partial image code data to the selection unit 660.
The selection unit 660 outputs the code data of the partial image input from the image encoding unit 640 to the code output unit 670.

ステップ358(S358)において、パターン判定部610は、全ての部分画像について符号化処理が終了したか否かを判定し、符号化していない部分画像が存在する場合に、S342の処理に戻って、次の部分画像の符号化処理を行い、全ての部分画像が符号化された場合に、S360の処理に移行する。
ステップ360(S360)において、辞書符号化部650は、画像辞書作成部50から入力された画像辞書(画像パターンとインデクスとを互いに対応付けたもの)を符号化し、画像辞書の符号データを符号出力部670に対して出力する。
In step 358 (S358), the pattern determination unit 610 determines whether or not the encoding process has been completed for all the partial images, and when there is an unencoded partial image, the process returns to the process of S342, When the next partial image is encoded and all the partial images have been encoded, the process proceeds to S360.
In step 360 (S360), the dictionary encoding unit 650 encodes the image dictionary (the image pattern and the index associated with each other) input from the image dictionary creation unit 50, and outputs the code data of the image dictionary as code output. Output to the unit 670.

以上説明したように、本変形例における画像処理装置2は、同一の文字コードにより分類された複数のフォント画像を互いに比較して、共通形状と差分形状とを抽出し、抽出された共通形状及び差分形状を階層的に対応付けて画像辞書に登録する。これにより、高い圧縮率を実現しつつ、文字画像の再現性を高めることができる。
また、画像処理装置2は、共通形状と差分形状とを階層化し、共通形状の符号データから順に出力することにより、復号化側で復号化した符号データの量に応じて徐々に画像品質を改善するプログレッシブ伝送を実現することができる。
As described above, the image processing device 2 in the present modification compares a plurality of font images classified by the same character code with each other, extracts a common shape and a difference shape, and extracts the extracted common shape and The difference shapes are hierarchically associated and registered in the image dictionary. Thereby, the reproducibility of a character image can be improved, achieving a high compression rate.
In addition, the image processing apparatus 2 gradually improves the image quality according to the amount of code data decoded on the decoding side by hierarchizing the common shape and the difference shape and sequentially outputting the code data of the common shape. Progressive transmission can be realized.

また、画像辞書作成部52は、文字認識処理の確度に応じて、画像辞書を作成してもよい。例えば、画像辞書作成部52は、切り出された文字画像それぞれに対する文字認識処理の確度に応じて、これら文字画像に対応するフォント画像を分類し、分類されたフォント画像に基づいて、文字認識処理の確度毎に画像辞書を作成する。
これは、文字認識部410による文字認識の正確性(確度)は、入力画像に含まれる文字画像毎に異なる場合があり、文字認識結果(文字コード)に基づいて分類されたフォント画像群には、形状の類似しない文字画像が混在する可能性があるからである。すなわち、このように形状が類似しない文字画像が文字画像群に混在すると、画像辞書に登録される画像パターンが歪めらるなどの弊害が発生しうるため、本変形例における画像処理装置2は、文字認識処理の確度毎に画像辞書を作成して、文字認識処理におけるミスの影響を最小限にとどめる。
Further, the image dictionary creation unit 52 may create an image dictionary according to the accuracy of the character recognition process. For example, the image dictionary creation unit 52 classifies the font images corresponding to the character images according to the accuracy of the character recognition processing for each of the clipped character images, and performs character recognition processing based on the classified font images. Create an image dictionary for each accuracy.
This is because the accuracy (accuracy) of character recognition by the character recognition unit 410 may differ for each character image included in the input image, and the font image group classified based on the character recognition result (character code) This is because character images having similar shapes may be mixed. That is, when character images that are not similar in shape are mixed in the character image group, an adverse effect such as distortion of the image pattern registered in the image dictionary may occur. An image dictionary is created for each accuracy of character recognition processing to minimize the influence of mistakes in the character recognition processing.

図18は、文字認識処理の確度毎に作成された画像辞書を例示する図である。
図18に例示するように、文字分類部520は、文字認識処理の確度を文字認識部410から取得し、取得された確度に応じて、切り出された文字画像に対応するフォント画像(文字画像と最も一致するフォント画像)を分類する。本例の文字分類部520は、「確度が90%以上」のフォント画像群、「確度が70%以上90%未満」のフォント画像群、及び、「確度が70%未満」のフォント画像群というように、確度の範囲によってフォント画像を分類している。
さらに、文字分類部520は、それぞれのフォント画像群を文字コードでさらに分類する。
FIG. 18 is a diagram illustrating an image dictionary created for each accuracy of character recognition processing.
As illustrated in FIG. 18, the character classification unit 520 acquires the accuracy of the character recognition processing from the character recognition unit 410, and in accordance with the acquired accuracy, the font image (character image and character image) corresponding to the extracted character image. The best matching font image). The character classifying unit 520 in this example is a font image group with “accuracy is 90% or more”, a font image group with “accuracy is 70% or more and less than 90%”, and a font image group with “accuracy is less than 70%”. As described above, the font images are classified according to the accuracy range.
Further, the character classifying unit 520 further classifies each font image group with a character code.

画像辞書決定部540は、確度及び文字コードにより分類されたフォント画像群に基づいて、画像パターンを作成する。なお、辞書決定部540は、確度が低いフォント画像群について画像パターンを決定する場合には、まず、確度が高いフォント画像群について決定された画像パターンと、このフォント画像群(確度が低いフォント画像群)に属する各フォント画像とを比較して、一致するか否かを判定し、一致する場合には、このフォント画像をフォント画像群から排除する。
このように、画像処理装置2は、文字認識処理の確度毎に画像辞書を作成することにより、文字認識処理のミスによる画像辞書への影響を最小限に抑えることができる。
The image dictionary determination unit 540 creates an image pattern based on the font image group classified by the accuracy and the character code. When determining an image pattern for a font image group with low accuracy, the dictionary determination unit 540 first determines an image pattern determined for a font image group with high accuracy and this font image group (font image with low accuracy). Each font image belonging to the group) is compared to determine whether or not they match, and if they match, the font images are excluded from the font image group.
As described above, the image processing apparatus 2 can minimize the influence on the image dictionary due to the mistake of the character recognition process by creating the image dictionary for each accuracy of the character recognition process.

(A)は、共通のフォントデータベースが存在することを前提とした符号化方法を説明し、(B)は、画像辞書の添付を前提とした符号化方法を説明する図である。(A) illustrates an encoding method on the assumption that a common font database exists, and (B) illustrates an encoding method on the assumption that an image dictionary is attached. (A)は、画像辞書を例示し、(B)は、画像パターンを例示する図である。(A) illustrates an image dictionary, and (B) illustrates an image pattern. 本発明にかかる画像辞書作成方法が適応される画像処理装置2のハードウェア構成を、制御装置20を中心に例示する図である。It is a figure which illustrates the hardware constitutions of the image processing apparatus 2 with which the image dictionary creation method concerning this invention is applied centering on the control apparatus 20. FIG. 制御装置21(図3)により実行され、本発明にかかる画像辞書作成方法を実現する符号化プログラム5の機能構成を例示する図である。It is a figure which illustrates the function structure of the encoding program 5 which is performed by the control apparatus 21 (FIG. 3), and implement | achieves the image dictionary creation method concerning this invention. 第1の画像辞書作成部50の機能をより詳細に説明する図である。It is a figure explaining the function of the 1st image dictionary creation part 50 in detail. 符号化部60の機能をより詳細に説明する図である。It is a figure explaining the function of the encoding part 60 in detail. 符号化プログラム5の第1の動作(S10)を示すフローチャートである。It is a flowchart which shows 1st operation | movement (S10) of the encoding program 5. 文字コードとフォント画像との関係を説明する図である。It is a figure explaining the relationship between a character code and a font image. 第2の画像辞書作成部52の機能構成を説明する図である。It is a figure explaining the function structure of the 2nd image dictionary preparation part. 符号化プログラム5の第2の動作(S20)を示すフローチャートである。It is a flowchart which shows 2nd operation | movement (S20) of the encoding program 5. FIG. 第2の実施形態における画像パターン作成処理(S210)をより詳細に説明するフローチャートである。It is a flowchart explaining the image pattern creation process (S210) in 2nd Embodiment in detail. 第2の実施形態における画像パターン作成処理(S210)を模式的に説明する図である。It is a figure which illustrates typically image pattern creation processing (S210) in a 2nd embodiment. 第2の実施形態における符号化処理(S240)をより詳細に説明するフローチャートである。It is a flowchart explaining the encoding process (S240) in 2nd Embodiment in detail. 同一の文字コードとして判定されうる複数の文字画像の共通形状及び差分形状を例示する図である。It is a figure which illustrates the common shape and difference shape of several character images which can be determined as the same character code. 本変形例における画像パターン作成処理(S310)のフローチャートである。It is a flowchart of the image pattern creation process (S310) in this modification. 本変形例における画像パターン作成処理(S310)を模式的に説明する図である。It is a figure which illustrates typically image pattern creation processing (S310) in this modification. 本変形例における符号化処理(S340)のフローチャートである。It is a flowchart of the encoding process (S340) in this modification. 文字認識処理の確度毎に作成された画像辞書を例示する図である。It is a figure which illustrates the image dictionary produced for every probability of character recognition processing.

符号の説明Explanation of symbols

2・・・画像処理装置
5・・・符号化プログラム
40・・・画像入力部
410・・・文字認識部
420・・・PDLデコンポーザ
50,52・・・画像辞書作成部
500・・・記憶部
510・・・文字画像抽出部
520・・・フォント提供部
525・・・フォントデータベース
530・・・一致判定部
540・・・辞書決定部
550・・・位置補正部
560・・・インデクス付与部
570・・・登録制御部
580・・・文字分類部
60・・・符号化部
610・・・パターン判定部
620・・・位置情報符号化部
630・・・インデクス符号化部
640・・・画像符号化部
650・・・辞書符号化部
660・・・選択部
670・・・符号出力部
DESCRIPTION OF SYMBOLS 2 ... Image processing apparatus 5 ... Coding program 40 ... Image input part 410 ... Character recognition part 420 ... PDL decomposer 50,52 ... Image dictionary creation part 500 ... Storage part 510: Character image extracting unit 520: Font providing unit 525 ... Font database 530 ... Match determining unit 540 ... Dictionary determining unit 550 ... Position correcting unit 560 ... Index adding unit 570 ... Registration control unit 580 ... Character classification unit 60 ... Encoding unit 610 ... Pattern determination unit 620 ... Position information encoding unit 630 ... Index encoding unit 640 ... Image code Conversion unit 650... Dictionary encoding unit 660... Selection unit 670.

Claims (14)

類型的な文字画像をテンプレート画像として提供するテンプレート提供手段と、
入力画像に含まれる文字画像と、前記テンプレート提供手段により提供されるテンプレート画像との一致度合いを判定する一致判定手段と、
前記一致判定手段により判定された一致度合いに基づいて、前記テンプレート提供手段により提供されたテンプレート画像を、この入力画像において類型的な画像パターンとして決定する類型決定手段と、
前記類型決定手段により決定された画像パターンに対して、それぞれの画像パターンを識別する識別情報を付与する識別情報付与手段と
を有する画像辞書作成装置。
A template providing means for providing a typical character image as a template image;
A match determination means for determining a match degree between the character image included in the input image and the template image provided by the template providing means;
A type determining unit that determines a template image provided by the template providing unit as a typical image pattern in the input image based on the degree of matching determined by the matching determining unit;
An image dictionary creating apparatus comprising: identification information providing means for assigning identification information for identifying each image pattern to the image pattern determined by the type determining means.
前記テンプレート提供手段は、前記テンプレート画像として、フォント画像を提供し、
前記一致判定手段は、提供されるフォント画像と、入力画像に含まれる文字画像とを比較して、一致度合いを判定する
請求項1に記載の画像辞書作成装置。
The template providing means provides a font image as the template image,
The image dictionary creation device according to claim 1, wherein the matching determination unit determines the degree of matching by comparing a provided font image with a character image included in an input image.
文字コードそれぞれに対応付けて、少なくとも1つのフォント画像を記憶するフォント記憶手段と、
入力画像に含まれる文字画像の文字コードを取得する情報取得手段と
をさらに有し、
前記テンプレート提供手段は、前記情報取得手段により取得された文字コードに対応するフォント画像を前記フォント記憶手段から読み出し、読み出されたフォント画像を前記テンプレート画像として提供し、
前記一致判定手段は、提供されるフォント画像と、入力画像に含まれる文字画像とを比較して、一致度合いを判定する
請求項2に記載の画像辞書作成装置。
Font storage means for storing at least one font image in association with each character code;
An information acquisition means for acquiring a character code of a character image included in the input image;
The template providing unit reads a font image corresponding to the character code acquired by the information acquisition unit from the font storage unit, and provides the read font image as the template image.
The image dictionary creation device according to claim 2, wherein the matching determination unit determines the degree of matching by comparing a provided font image with a character image included in the input image.
前記一致判定手段は、前記テンプレート提供手段により文字コードに対応する複数のフォント画像が提供された場合に、提供された複数のフォント画像それぞれと、入力画像に含まれる文字画像とを比較して、それぞれのフォント画像について一致度合いを判定し、
前記類型決定手段は、それぞれのフォント画像について判定された一致度合いに基づいて、この文字画像と最も一致するフォント画像を画像パターンとして選択する
請求項3に記載の画像辞書作成装置。
When the plurality of font images corresponding to the character code are provided by the template providing unit, the match determination unit compares each of the provided font images with the character image included in the input image, Determine the degree of match for each font image,
The image dictionary creation device according to claim 3, wherein the type determination unit selects, as an image pattern, a font image that most closely matches the character image based on the degree of matching determined for each font image.
入力画像における文字画像それぞれの領域を示す文字領域情報を取得する情報取得手段と、
前記情報取得手段により取得された文字領域情報に基づいて、入力画像から文字画像を抽出する文字画像抽出手段と
をさらに有し、
前記一致判定手段は、前記文字画像抽出手段により抽出された文字画像と、前記テンプレート提供手段により提供されたテンプレート画像とを比較して、一致度合いを判定する
請求項1又は2に記載の画像辞書作成装置。
Information acquisition means for acquiring character area information indicating the area of each character image in the input image;
A character image extracting means for extracting a character image from the input image based on the character area information acquired by the information acquiring means;
3. The image dictionary according to claim 1, wherein the match determination unit determines the degree of match by comparing the character image extracted by the character image extraction unit with the template image provided by the template providing unit. Creation device.
前記一致判定手段は、前記文字画像抽出手段により抽出された文字画像と、前記テンプレート提供手段により提供されたテンプレート画像とを複数の相対位置で比較して、一致度合いを判定し、
前記一致判定手段によりそれぞれの相対位置で判定された一致度合いに基づいて、それぞれの文字画像の文字領域情報を補正する領域補正手段
をさらに有する請求項5に記載の画像辞書作成装置。
The match determination means compares the character image extracted by the character image extraction means with the template image provided by the template providing means at a plurality of relative positions, and determines the degree of match.
The image dictionary creation device according to claim 5, further comprising: a region correction unit that corrects the character region information of each character image based on the degree of matching determined at each relative position by the matching determination unit.
前記類型決定手段により順次決定される画像パターンを記憶するパターン記憶手段と、
前記パターン記憶手段により記憶された画像パターンと、新たに入力された文字画像とを比較して、いずれかの画像パターンがこの文字画像と一致する場合に、この文字画像に対する画像パターンの決定を禁止する登録制御手段と
をさらに有し、
前記類型決定手段は、前記登録制御手段による指示に応じて、新たに入力された文字画像が前記パターン記憶手段に記憶された画像パターンと一致する場合に、この文字画像に対して提供されたテンプレート画像を前記パターン記憶手段に登録せず、入力された文字画像がいずれの画像パターンとも一致しない場合に、この文字画像に対して提供されたテンプレート画像を画像パターンとして前記パターン記憶手段に登録する
請求項1〜6のいずれかに記載の画像辞書作成装置。
Pattern storage means for storing image patterns sequentially determined by the type determination means;
The image pattern stored by the pattern storage means is compared with the newly input character image, and when any image pattern matches this character image, determination of the image pattern for this character image is prohibited. And a registration control means for
In accordance with an instruction from the registration control unit, the type determining unit is configured to provide a template provided for the character image when a newly input character image matches an image pattern stored in the pattern storage unit. When an image is not registered in the pattern storage unit and an input character image does not match any image pattern, a template image provided for the character image is registered in the pattern storage unit as an image pattern. Item 7. The image dictionary creation device according to any one of Items 1 to 6.
入力画像に含まれている文字画像が表す文字を識別する文字識別情報を取得する情報取得手段と、
前記情報取得手段により取得された文字識別情報に基づいて、入力画像に含まれる文字画像を複数の文字画像群に分類する文字分類手段と、
類型的な文字画像をテンプレート画像として提供するテンプレート提供手段と、
前記文字分類手段により文字画像群に分類された文字画像それぞれと、前記テンプレート提供手段によりそれぞれの文字画像群に対して提供されたテンプレート画像とを比較して、それぞれ一致度合いを判定する一致判定手段と、
前記テンプレート提供手段により提供されたテンプレート画像と、これらの文字画像及びテンプレート画像について判定された一致度合いとに基づいて、画像パターンを決定する類型決定手段と、
前記類型決定手段により決定された画像パターンに対して、それぞれの画像パターンを識別する識別情報を付与する識別情報付与手段と
を有する画像辞書作成装置。
Information acquisition means for acquiring character identification information for identifying a character represented by a character image included in the input image;
Character classification means for classifying the character images included in the input image into a plurality of character image groups based on the character identification information acquired by the information acquisition means;
A template providing means for providing a typical character image as a template image;
Match determination means for comparing each character image classified into the character image group by the character classification means and the template image provided for each character image group by the template providing means, respectively, for determining the degree of match. When,
A type determining unit that determines an image pattern based on the template image provided by the template providing unit and the degree of matching determined for the character image and the template image;
An image dictionary creating apparatus comprising: identification information providing means for assigning identification information for identifying each image pattern to the image pattern determined by the type determining means.
前記類型決定手段は、前記一致判定手段により判定された一致度合いに基づいて、文字画像それぞれと最も一致するテンプレート画像の文字画像群それぞれにおける出現頻度を判定し、判定された出現頻度に基づいて、同一の文字画像群に分類された複数の文字画像について、1つ以上の画像パターンを決定する
請求項8に記載の画像辞書作成装置。
The type determining means determines the appearance frequency in each character image group of the template image that most closely matches each character image based on the degree of matching determined by the match determining means, and based on the determined appearance frequency, The image dictionary creation device according to claim 8, wherein one or more image patterns are determined for a plurality of character images classified into the same character image group.
前記一致判定手段は、前記文字分類手段により各文字画像群に分類された複数の文字画像とテンプレート画像とを比較して、文字画像に含まれる領域毎の一致度合いを判定し、
前記類型決定手段は、前記一致判定手段により領域毎に判定された一致度合いと、テンプレート画像とに基づいて、文字画像を構成する複数の画像パターンを決定する
請求項8に記載の画像辞書作成装置。
The match determination means compares a plurality of character images classified into each character image group by the character classification means with a template image, determines a matching degree for each region included in the character image,
9. The image dictionary creation device according to claim 8, wherein the type determining unit determines a plurality of image patterns constituting a character image based on a matching degree determined for each region by the matching determining unit and a template image. .
類型的な文字画像をテンプレート画像として提供するテンプレート提供手段と、
入力画像に含まれる文字画像と、前記テンプレート提供手段により提供されるテンプレート画像との一致度合いを判定する一致判定手段と、
前記一致判定手段により判定された一致度合いに基づいて、前記テンプレート提供手段により提供されたテンプレート画像を、この入力画像において類型的な画像パターンとして決定する類型決定手段と、
前記類型決定手段により決定された画像パターンに対して、それぞれの画像パターンを識別する識別情報を付与する識別情報付与手段と、
入力画像に含まれている文字画像のデータを、この文字画像の入力画像における領域を示す文字領域情報、及び、この文字画像に対応する画像パターンの識別情報と置換して符号化する符号化手段と
を有する符号化装置。
A template providing means for providing a typical character image as a template image;
A match determination means for determining a match degree between the character image included in the input image and the template image provided by the template providing means;
A type determining unit that determines a template image provided by the template providing unit as a typical image pattern in the input image based on the degree of matching determined by the matching determining unit;
Identification information giving means for giving identification information for identifying each image pattern to the image pattern determined by the type determining means;
Encoding means for encoding the character image data included in the input image by substituting the character region information indicating the region in the input image of the character image and the identification information of the image pattern corresponding to the character image And an encoding device.
前記一致判定手段は、入力画像に含まれる文字画像と、前記テンプレート提供手段により提供されたテンプレート画像とを複数の相対位置で比較して、一致度合いを判定し、
入力画像における文字画像それぞれの領域を示す文字領域情報を取得する情報取得手段と、
前記一致判定手段によりそれぞれの相対位置で判定された一致度合いに基づいて、前記情報取得手段により取得された文字領域情報を補正する領域補正手段と
をさらに有し、
前記符号化手段は、前記領域補正手段により補正された文字画像の文字領域情報と、この文字画像に対応する画像パターンの識別情報とを互いに対応付けて符号化する
請求項11に記載の符号化装置。
The match determination unit compares the character image included in the input image with the template image provided by the template providing unit at a plurality of relative positions, and determines the degree of match.
Information acquisition means for acquiring character area information indicating the area of each character image in the input image;
An area correction unit that corrects the character area information acquired by the information acquisition unit based on the degree of matching determined at each relative position by the match determination unit;
The encoding unit according to claim 11, wherein the encoding unit encodes the character region information of the character image corrected by the region correction unit and the identification information of the image pattern corresponding to the character image in association with each other. apparatus.
類型的な文字画像をテンプレート画像として提供し、
入力画像に含まれる文字画像と、提供されるテンプレート画像との一致度合いを判定し、
判定された一致度合いに基づいて、提供されたテンプレート画像を、この入力画像において類型的な画像パターンとして決定し、
決定された画像パターンに対して、それぞれの画像パターンを識別する識別情報を付与する
画像辞書作成方法。
Provide a typical character image as a template image,
Determine the degree of match between the character image included in the input image and the provided template image,
Based on the determined degree of matching, the provided template image is determined as a typical image pattern in this input image,
An image dictionary creation method for providing identification information for identifying each image pattern to a determined image pattern.
コンピュータを含む画像辞書作成装置において、
類型的な文字画像をテンプレート画像として提供するステップと、
入力画像に含まれる文字画像と、提供されるテンプレート画像との一致度合いを判定するステップと、
判定された一致度合いに基づいて、提供されたテンプレート画像を、この入力画像において類型的な画像パターンとして決定するステップと、
決定された画像パターンに対して、それぞれの画像パターンを識別する識別情報を付与するステップと
を前記画像辞書作成装置のコンピュータに実行させるプログラム。
In an image dictionary creation device including a computer,
Providing a typical character image as a template image;
Determining the degree of matching between the character image included in the input image and the provided template image;
Determining the provided template image as a typical image pattern in the input image based on the determined degree of matching;
A program for causing the computer of the image dictionary creating apparatus to execute identification information for identifying each image pattern with respect to the determined image pattern.
JP2004116646A 2004-04-12 2004-04-12 Image dictionary creation device, encoding device, image dictionary creation method and program thereof Expired - Fee Related JP4645058B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004116646A JP4645058B2 (en) 2004-04-12 2004-04-12 Image dictionary creation device, encoding device, image dictionary creation method and program thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004116646A JP4645058B2 (en) 2004-04-12 2004-04-12 Image dictionary creation device, encoding device, image dictionary creation method and program thereof

Publications (2)

Publication Number Publication Date
JP2005301662A true JP2005301662A (en) 2005-10-27
JP4645058B2 JP4645058B2 (en) 2011-03-09

Family

ID=35333116

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004116646A Expired - Fee Related JP4645058B2 (en) 2004-04-12 2004-04-12 Image dictionary creation device, encoding device, image dictionary creation method and program thereof

Country Status (1)

Country Link
JP (1) JP4645058B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012005076A (en) * 2010-06-21 2012-01-05 Fujitsu Ltd Character image compression apparatus and character image restoration apparatus, character image compression method and character image restoration method, and character image compression program and character image restoration program
JP2015194872A (en) * 2014-03-31 2015-11-05 京セラドキュメントソリューションズ株式会社 Information processing apparatus, image forming apparatus, information processing method, and information processing program

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101938878B1 (en) * 2018-06-14 2019-01-15 김보언 System for managing copyright based on blockchain
KR101983530B1 (en) * 2019-01-08 2019-05-29 김보언 Registration system for storing copyrighted works in blockchain
KR101983529B1 (en) * 2019-01-08 2019-05-29 김보언 Smart contract system for copyright infringement prevention

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62229489A (en) * 1986-03-31 1987-10-08 Toshiba Corp Pattern recognition learning device
JPS6382061A (en) * 1986-09-26 1988-04-12 Ricoh Co Ltd Data compression system
JPH07262317A (en) * 1994-03-18 1995-10-13 Ricoh Co Ltd Document processor
JPH08101893A (en) * 1994-09-30 1996-04-16 Omron Corp Model image data registering device for image processor
JPH08255223A (en) * 1995-03-16 1996-10-01 Fuji Electric Co Ltd Similar character discrimination method in character recognition device
JPH10178638A (en) * 1996-12-18 1998-06-30 Nippon Telegr & Teleph Corp <Ntt> Character region encoding method, decoding method, character region encoding device, and decoding device
JP2000067164A (en) * 1998-08-26 2000-03-03 Nippon Telegr & Teleph Corp <Ntt> Pattern recognition method and apparatus, and recording medium recording template creation program
JP2001236467A (en) * 2000-02-21 2001-08-31 Nippon Telegr & Teleph Corp <Ntt> Pattern recognition method and apparatus, and recording medium storing pattern recognition program
JP2003050971A (en) * 2001-08-07 2003-02-21 Riso Kagaku Corp Font selection program, image processing device, and image forming device

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62229489A (en) * 1986-03-31 1987-10-08 Toshiba Corp Pattern recognition learning device
JPS6382061A (en) * 1986-09-26 1988-04-12 Ricoh Co Ltd Data compression system
JPH07262317A (en) * 1994-03-18 1995-10-13 Ricoh Co Ltd Document processor
JPH08101893A (en) * 1994-09-30 1996-04-16 Omron Corp Model image data registering device for image processor
JPH08255223A (en) * 1995-03-16 1996-10-01 Fuji Electric Co Ltd Similar character discrimination method in character recognition device
JPH10178638A (en) * 1996-12-18 1998-06-30 Nippon Telegr & Teleph Corp <Ntt> Character region encoding method, decoding method, character region encoding device, and decoding device
JP2000067164A (en) * 1998-08-26 2000-03-03 Nippon Telegr & Teleph Corp <Ntt> Pattern recognition method and apparatus, and recording medium recording template creation program
JP2001236467A (en) * 2000-02-21 2001-08-31 Nippon Telegr & Teleph Corp <Ntt> Pattern recognition method and apparatus, and recording medium storing pattern recognition program
JP2003050971A (en) * 2001-08-07 2003-02-21 Riso Kagaku Corp Font selection program, image processing device, and image forming device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012005076A (en) * 2010-06-21 2012-01-05 Fujitsu Ltd Character image compression apparatus and character image restoration apparatus, character image compression method and character image restoration method, and character image compression program and character image restoration program
JP2015194872A (en) * 2014-03-31 2015-11-05 京セラドキュメントソリューションズ株式会社 Information processing apparatus, image forming apparatus, information processing method, and information processing program

Also Published As

Publication number Publication date
JP4645058B2 (en) 2011-03-09

Similar Documents

Publication Publication Date Title
JP4788106B2 (en) Image dictionary creation device, encoding device, image dictionary creation method and program thereof
KR100938099B1 (en) Computer-readable media for performing the clustering system, clustering method, document encoding system and clustering method
US7376272B2 (en) Method for image segmentation to identify regions with constant foreground color
US8755604B1 (en) Using shape similarity methods to improve OCR speed and accuracy
US20080199081A1 (en) Image processing apparatus, image processing method and computer-readable medium
EP0933719B1 (en) Image processing method and apparatus
JP2001203897A (en) Pattern-matching encoding device and its method
JP4977232B2 (en) Character reading result confirmation device and character reading result confirmation method
JP4645058B2 (en) Image dictionary creation device, encoding device, image dictionary creation method and program thereof
JP2005301664A (en) Image dictionary forming device, encoding device, data file, image dictionary forming method, and program thereof
JP5335581B2 (en) Image processing apparatus, image processing method, and program
US20060182358A1 (en) Coding apparatus, decoding apparatus, data file, coding method, decoding method, and programs thereof
JP2005352735A (en) Document file creation support device, document file creation support method, and program thereof
JPH11272798A (en) Method and device for distinguishing bold character
CN112204562A (en) Music character system
US20020085756A1 (en) System and method for efficient determination of recognition initial conditions
JP2005323169A (en) Image processor, data file and method for processing image and its program
US20030152270A1 (en) Image encoding device, decoding device and encoding method, decoding method, and recorded program on which programs of the methods are recorded
JP2005352734A (en) Document file creation supporting device, document file creation supporting method, and its program
JP4465654B2 (en) Image dictionary creation device, encoding device, encoding method and program thereof
JPH07160824A (en) Character recognizing device
JP5457853B2 (en) Image encoding apparatus, image encoding method, program, and storage medium
CN116433454B (en) Method, device and storage medium for embedding document watermark based on micro-variant
JP4973603B2 (en) Image processing apparatus and image processing program
JP2005352736A (en) Document file creation supporting device, document file creation supporting method, and its program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20070322

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20100212

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100330

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100527

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20101109

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: 20101122

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

Free format text: PAYMENT UNTIL: 20131217

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 4645058

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees