JP2016009395A - Document file generation device and document file generation method - Google Patents
Document file generation device and document file generation method Download PDFInfo
- Publication number
- JP2016009395A JP2016009395A JP2014130606A JP2014130606A JP2016009395A JP 2016009395 A JP2016009395 A JP 2016009395A JP 2014130606 A JP2014130606 A JP 2014130606A JP 2014130606 A JP2014130606 A JP 2014130606A JP 2016009395 A JP2016009395 A JP 2016009395A
- Authority
- JP
- Japan
- Prior art keywords
- character
- character image
- image
- document file
- coordinate
- 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
Links
Images
Landscapes
- Character Discrimination (AREA)
- Document Processing Apparatus (AREA)
Abstract
Description
本発明は、文字認識によって得られる原稿の文字画像をデータ化し、たとえばPDF(Portable Document Format)形式などの文書ファイルを生成する文書ファイル生成装置及び文書ファイル生成方法に関する。 The present invention relates to a document file generation apparatus and a document file generation method for converting a character image of a document obtained by character recognition into data and generating a document file of, for example, a PDF (Portable Document Format) format.
電子書類の規格の一種としてPDF(Portable Document Format)形式がある。PDF形式のファイル(以下、「PDFファイル」という)には、文書内で用いられるフォント情報をそのPFDファイル自体に埋め込んでおくことができる。そのため、フォントを埋め込んだPFDファイルは、それを作成した環境以外でも、文書に埋め込まれたフォントを用いて作成者の意図通りに描画(表示あるいは印刷)することができる。 There is a PDF (Portable Document Format) format as one type of electronic document standard. In a PDF format file (hereinafter referred to as “PDF file”), font information used in a document can be embedded in the PFD file itself. Therefore, the PFD file in which the font is embedded can be drawn (displayed or printed) as intended by the creator using the font embedded in the document even in an environment other than the environment in which the font is created.
また、PDFでは、文書を電子化するに際してファイルサイズを抑えるために、高圧縮方式が用いられている。これは、画像に含まれる文字や図形といったオブジェクト毎に文字層や画層の画像層(画像レイヤ)で識別し、それぞれの文字層や画層の画像レイヤに含まれるオブジェクトに応じて画像処理や画像圧縮が行われるようにしたものである。これにより、高画質と高圧縮とが同時に達成されるようになっている。 In PDF, a high compression method is used in order to reduce the file size when digitizing a document. This is done by identifying the character layer or image layer (image layer) for each object such as characters or graphics included in the image, and performing image processing or image processing according to the object included in each character layer or image layer of the layer. Image compression is performed. As a result, high image quality and high compression are achieved at the same time.
ところで、PDFで描画される、たとえば文字画像を細かく綺麗に描画させる手段の一つとして、文字画像のベクトル化が挙げられる。ところが、文字画像をベクトル化すると、ベクトル化したフォントデータの描画処理をPDFファイル上に記載する必要があり、テキストデータに対して大きくなってしまう。 By the way, vectorization of a character image is mentioned as one of the means for drawing a character image finely and finely drawn by PDF. However, when a character image is vectorized, it is necessary to describe the rendering processing of the vectorized font data on the PDF file, which is larger than the text data.
このような不具合を解消する場合、たとえば特許文献1に示されている文書作成方法を適用することが考えられる。すなわち、特許文献1では、フォントを文書ファイルに埋め込むか否かの基準となるフォント名及びポイント数(すなわちサイズ)の閾値をテーブルとして入力し、処理対象の元データからその中で使用されているフォント名とポイント数とを獲得し、元データ内で使用されているフォント名がテーブル中に登録されていれば、その元データ中におけるポイント数とテーブル中のポイント数閾値とを比較し、閾値よりも大きいポイントの文字があれば、そのフォントを埋め込むものと決定するようにした文書作成方法を提案している。
In order to solve such a problem, for example, it is conceivable to apply a document creation method disclosed in
上述した特許文献1では、フォント情報を含むことのできる文書情報を作成する際に、フォントの名前のみならず、フォントのポイント数(すなわちサイズ)にも着目するようにしているため、作成される文書ファイルのサイズの縮小が可能となっている。
In the above-mentioned
ところが、フォント毎にポイント数などを持たせるようにすると、フォント毎のパターンが必要となり、登録されるフォント数が多くなるに従い、ファイルサイズが大きくなってしまうという問題があった。 However, if the number of points is given for each font, a pattern for each font is required, and the file size increases as the number of registered fonts increases.
本発明は、このような状況に鑑みてなされたものであり、ファイルサイズを増大させることなく、画像を細かく綺麗に描画するための文字画像のベクトル化を容易にかつ確実に行うことができる文書ファイル生成装置及び文書ファイル生成方法を提供することを目的とする。 The present invention has been made in view of such circumstances, and a document that can easily and reliably perform vectorization of a character image for finely drawing an image without increasing the file size. It is an object to provide a file generation apparatus and a document file generation method.
本発明の文書ファイル生成装置は、文字認識によって得られる原稿の文字画像をデータ化した文書ファイルを生成する文書ファイル生成装置であって、前記文字画像をベクトル化するベクトル化手段と、ベクトル化ファイル又は文書ファイルを生成する画像処理手段とを有し、前記ベクトル化手段は、前記ベクトル化の前に2値画像の近傍画素において同じ輝度を持つ要素を探し出して前記文字画像を作成する文字画像作成手段と、前記文字画像作成手段で作成された前記文字画像の特徴量と前記文字認識により得られる前記文字画像の特徴量との照合を行うパターンマッチング手段と、前記特徴量が一致する前記文字画像のベクトル化データをフォント辞書に登録する第1のフォント辞書登録手段を備え、前記第1のフォント辞書登録手段により登録した前記ベクトル化データを用いて前記ベクトル化ファイルを生成することを特徴としている。
また、本発明の文書ファイル生成装置の前記パターンマッチング手段は、前記文字画像の重心を決め、前記重心の位置から前記文字画像の最外周輪郭線間までの距離である前記特徴量を算出する特徴量算出手段を備え、前記特徴量が一致する前記文字画像をベクトル画像情報から検索し、前記文字画像を前記フォント辞書に登録することを特徴としている。
また、本発明の文書ファイル生成装置の前記ベクトル化手段は、前記文字認識により得られる前記文字画像の基点からの文字座標と前記ベクトル化データに含まれる前記文字座標との照合を行う文字座標照合手段と、前記文字座標が一致する前記文字画像の前記ベクトル化データを前記フォント辞書に登録する第2のフォント辞書登録手段を備え、前記第2のフォント辞書登録手段により登録した前記ベクトル化データを用いて前記ベクトル化ファイルを生成することを特徴としている。
また、本発明の文書ファイル生成装置の前記文字座標照合手段は、前記文字画像の描画開始位置のX座標を文字認識情報から検索し、前記描画開始位置のX座標が一致した場合、前記文字画像の前記描画開始位置のY座標を検索する座標検索手段を備え、前記X座標と前記Y座標が一致する前記文字画像を前記ベクトル画像情報から検索し、前記文字画像を前記フォント辞書に登録することを特徴としている。
また、本発明の文書ファイル生成装置は、前記フォント辞書に前記文字画像の前記ベクトル化データの登録を行うときに、既に登録済みの前記文字画像については登録が行われないことを特徴としている。
本発明の文書ファイル生成方法は、文字認識によって得られる原稿の文字画像をデータ化した文書ファイルを生成する文書ファイル生成方法であって、前記文字画像をベクトル化するベクトル化工程と、ベクトル化ファイル又は文書ファイルを生成する画像処理工程とを有し、前記ベクトル化工程は、前記ベクトル化の前に2値画像の近傍画素において同じ輝度を持つ要素を探し出して前記文字画像を作成する文字画像作成工程と、前記文字画像作成工程で作成された前記文字画像の特徴量と前記文字認識により得られる前記文字画像の特徴量との照合を行うパターンマッチング工程と、前記特徴量が一致する前記文字画像のベクトル化データをフォント辞書に登録する第1のフォント辞書登録工程を備え、前記第1のフォント辞書登録工程により登録した前記ベクトル化データを用いて前記ベクトル化ファイルを生成することを特徴としている。
また、本発明の文書ファイル生成方法の前記パターンマッチング工程は、前記文字画像の重心を決め、前記重心の位置から前記文字画像の最外周輪郭線間までの距離である前記特徴量を算出する特徴量算出工程を備え、前記特徴量が一致する前記文字画像をベクトル画像情報から検索し、前記文字画像を前記フォント辞書に登録することを特徴としている。
また、本発明の文書ファイル生成方法の前記ベクトル化工程は、前記文字認識により得られる前記文字画像の基点からの文字座標と前記ベクトル化データに含まれる前記文字座標との照合を行う文字座標照合工程と、前記文字座標が一致する前記文字画像の前記ベクトル化データを前記フォント辞書に登録する第2のフォント辞書登録工程を備え、前記第2のフォント辞書登録工程により登録した前記ベクトル化データを用いて前記ベクトル化ファイルを生成することを特徴としている。
また、本発明の文書ファイル生成方法の前記文字座標照合工程は、前記文字画像の描画開始位置のX座標を文字認識情報から検索し、前記描画開始位置のX座標が一致した場合、前記文字画像の前記描画開始位置のY座標を検索する座標検索工程を備え、前記X座標と前記Y座標が一致する前記文字画像を前記ベクトル画像情報から検索し、前記文字画像を前記フォント辞書に登録することを特徴としている。
また、本発明の文書ファイル生成方法は、前記フォント辞書に前記文字画像の前記ベクトル化データの登録を行うときに、既に登録済みの前記文字画像については登録が行われないことを特徴としている。
A document file generation apparatus according to the present invention is a document file generation apparatus that generates a document file obtained by converting character images of a document obtained by character recognition into data, the vectorization means for vectorizing the character images, and a vectorized file Or an image processing unit that generates a document file, and the vectorization unit creates a character image by searching for elements having the same luminance in neighboring pixels of the binary image before the vectorization. Means, pattern matching means for comparing the feature quantity of the character image created by the character image creation means with the feature quantity of the character image obtained by the character recognition, and the character image having the same feature quantity First font dictionary registration means for registering the vectorized data in the font dictionary, the first font dictionary registration means It is characterized in that to generate the vectorization file using the vector data that more registered.
Further, the pattern matching unit of the document file generation device of the present invention determines a centroid of the character image, and calculates the feature amount that is a distance from the position of the centroid to the outermost contour line of the character image. It is characterized by comprising a quantity calculating means, searching the character image having the same feature quantity from vector image information, and registering the character image in the font dictionary.
Further, the vectorization means of the document file generation device of the present invention is characterized in that the character coordinate collation for collating the character coordinates from the base point of the character image obtained by the character recognition with the character coordinates included in the vectorized data. And a second font dictionary registration means for registering the vectorized data of the character image having the same character coordinates in the font dictionary, and the vectorized data registered by the second font dictionary registration means The vectorized file is generated by using the method.
Further, the character coordinate matching unit of the document file generation device of the present invention searches the character recognition information for the X coordinate of the drawing start position of the character image, and when the X coordinate of the drawing start position matches, the character image Coordinate search means for searching for the Y coordinate of the drawing start position, searching for the character image in which the X coordinate and the Y coordinate match from the vector image information, and registering the character image in the font dictionary It is characterized by.
In the document file generating apparatus of the present invention, when the vectorized data of the character image is registered in the font dictionary, the already registered character image is not registered.
The document file generation method of the present invention is a document file generation method for generating a document file in which character images of a document obtained by character recognition are converted into data, and a vectorization step for vectorizing the character images; Or an image processing step for generating a document file, wherein the vectorization step creates a character image by searching for elements having the same luminance in neighboring pixels of the binary image before the vectorization. A pattern matching step for comparing a feature amount of the character image created in the character image creation step with a feature amount of the character image obtained by the character recognition, and the character image having the same feature amount A first font dictionary registration step of registering the vectorized data in the font dictionary, the first font dictionary registration step It is characterized in that to generate the vectorization file using the vector data that more registered.
Further, the pattern matching step of the document file generation method of the present invention determines the center of gravity of the character image, and calculates the feature amount that is the distance from the position of the center of gravity to the outermost contour of the character image. An amount calculating step, wherein the character image having the matching feature amount is searched from vector image information, and the character image is registered in the font dictionary.
Further, the vectorization step of the document file generation method of the present invention includes a character coordinate collation for collating the character coordinates from the base point of the character image obtained by the character recognition with the character coordinates included in the vectorized data. And a second font dictionary registration step of registering the vectorized data of the character image having the same character coordinates in the font dictionary, and the vectorized data registered in the second font dictionary registration step The vectorized file is generated by using the method.
The character coordinate matching step of the document file generation method of the present invention searches the character recognition information for the X coordinate of the drawing start position of the character image, and if the X coordinate of the drawing start position matches, the character image A coordinate search step of searching for the Y coordinate of the drawing start position, searching for the character image in which the X coordinate matches the Y coordinate from the vector image information, and registering the character image in the font dictionary It is characterized by.
The document file generation method according to the present invention is characterized in that when the vectorized data of the character image is registered in the font dictionary, the already registered character image is not registered.
本発明の文書ファイル生成装置及び文書ファイル生成方法は、ファイルサイズを増大させることなく、画像を細かく綺麗に描画することができる。 The document file generation apparatus and the document file generation method of the present invention can draw an image finely and finely without increasing the file size.
以下、本発明の文書ファイル生成装置の一実施形態を、図1〜図3を参照しながら説明する。まず、図1に示すように、文書ファイル生成装置10は、制御部11、操作部12、表示部13、スキャナー部14を備えている。
Hereinafter, an embodiment of a document file generation apparatus of the present invention will be described with reference to FIGS. First, as illustrated in FIG. 1, the document
制御部11は、図示しないROM内の所定のプログラムに基づき、文書ファイル生成装置10の全体の動作を制御するものであり、操作受付部11a、画像認識部11b、画像処理部11c、メモリー11d、カウンター11e、ベクトル化部11fを備えている。
The control unit 11 controls the overall operation of the document
操作受付部11aは、操作部12による画像処理に係わる操作を受け付ける。画像認識部11bは、スキャナー部14によって読み取られた文字画像のOCR(Optical Character Reader:文字認識)を行う。すなわち、スキャナー部14によって読み取られた文字画像が予め記憶されているパターンと照合されて特定され、その特定された文字画像のデータが得られる。
The
画像処理部11cは、ベクトル化部11fによってベクトル化されているデータを書き込んだ文書ファイル(以下、ベクトル化ファイルという)、又は後述の原稿20のファイル形式に従った文書ファイルの生成などを行う。メモリー11dには、スキャナー部14によって読み取られた文字画像などが記憶される。
The image processing unit 11c generates a document file in which the data vectorized by the vectorizing
カウンター11eは、画像認識部11bによって認識された文字毎の数(例えば文字画像「a」、「b」、「c」が認識された場合、文字画像「a」、「b」、「c」毎の文字数)をカウントして登録する。ベクトル化部11fは、画像認識部11bによって認識された文字画像のベクトル化を行うものであるが、その詳細についても後述する。
The
操作部12は、画像処理を指示する際に操作されるものであり、たとえばタッチパネルで構成されている。表示部13は、画像処理などをガイドするメッセージや、画像処理を選択させる項目などを表示する。スキャナー部14は、イメージセンサ(図示省略)によって読み取られる後述の原稿20の文字画像を光学的に読み取る。
The
次に、図2及び図3を参照し、画像処理の概要について説明する。まず、スキャナー部14により、たとえば図3に示すような原稿20の読み取りによるOCR(文字認識)を実行させる(ステップS1)。なお、図3に示す原稿20は、たとえばPDF形式のファイル(以下、PDFファイルという)を印字した文書であり、説明の都合上、たとえばa〜dの文字画像が表示されている文字層のみを示している。
Next, an overview of image processing will be described with reference to FIGS. 2 and 3. First, the
すなわち、そのPDFファイルは、上述したように、文字層や画層の画像層(画像レイヤ)に含まれるオブジェクトに応じて画像処理や画像圧縮が行われる高圧縮方式による構成となっている。 That is, as described above, the PDF file has a configuration based on a high compression method in which image processing and image compression are performed according to objects included in an image layer (image layer) of a character layer or an image layer.
また、スキャナー部14による原稿20の読み取りは、矢印で示すように、たとえば上段から順に1行ずつ行われるようになっているものとする。ここで、原稿20が読み取られると、新規の文字画像がOCR(文字認識)される毎に、それぞれ認識された文字画像の登録がカウンター11eにて行われる(ステップS2)。
In addition, it is assumed that the reading of the
すなわち、まず「a」の文字画像が認識されると、その認識された「a」の文字画像がカウンター11eのaカウンター11e−1として登録される。続いて、次の「a」の文字画像が認識されると、aカウンター11e−1の文字数が加算される。つまり、「a」の文字画像が認識される毎に、aカウンター11e−1の文字数が加算されていく。
That is, when the character image “a” is first recognized, the recognized character image “a” is registered as the a
次に、「b」の文字画像が認識されると、その認識された「b」の文字画像がカウンター11eのbカウンター11e−2として登録される。続いて、次の「b」の文字画像が認識されると、bカウンター11e−2の文字数が加算される。つまり、「b」の文字画像が認識される毎に、bカウンター11e−2の文字数が加算されていく。
Next, when the character image “b” is recognized, the recognized character image “b” is registered as the b counter 11e-2 of the
次に、「c」の文字画像が認識されると、その認識された「c」の文字画像がカウンター11eのcカウンター11e−3として登録される。続いて、次の「c」の文字画像が認識されると、cカウンター11e−3の文字数が加算される。つまり、「c」の文字画像が認識される毎に、cカウンター11e−3の文字数が加算されていく。
Next, when the character image “c” is recognized, the recognized character image “c” is registered as the c counter 11e-3 of the
次に、ベクトル化部11fによる文字画像のベクトル化が行われる(ステップS3)。すなわち、上述したカウンター11eのaカウンター11e−1、bカウンター11e−2、cカウンター11e−3で加算されたそれぞれの文字画像である「a」〜「c」のベクトル化が行われる。
Next, the
次に、画像処理部11cにより、aカウンター11e−1、bカウンター11e−2、cカウンター11e−3で加算されたそれぞれの文字画像に対して、OCR(文字認識)で得られる文字座標とベクトル化したデータの文字座標とを照らし合わせ、対象文字の抽出が行われる(ステップS4)。ちなみに、OCR(文字認識)で得られるOCR(文字認識)情報には文字座標や文字コードなどが含まれている。また、ベクトル化したデータには、線の起終点の座標(位置)などが含まれている。よって、OCR(文字認識)情報とベクトル化したデータの文字座標を照らし合わせることで、対象文字の抽出が可能となる。
Next, for each character image added by the a
次に、画像処理部11cによりフォント置き換え処理が実行される(ステップS5)。すなわち、ステップS3で行われたベクトル化部11fによるそれぞれの文字画像のベクトル化されたデータがたとえば上述したメモリー11dに記憶される。
Next, a font replacement process is executed by the image processing unit 11c (step S5). That is, the vectorized data of each character image by the
次に、ステップS5でメモリー11dに記憶された文字画像のベクトル化されたデータに基づき、画像処理部11cによりベクトル化ファイルの生成が行われる(ステップS6)。
Next, based on the vectorized data of the character image stored in the
以上のように、本実施形態では、ステップS3でのベクトル化部11fによるそれぞれの文字画像のベクトル化の処理が行われ、ステップS6でのベクトル化部11fによりベクトル化ファイルが生成される。
As described above, in this embodiment, the
次に、上述した画像処理の具体例について説明する。図4〜図8は、ベクトル化とOCR(文字認識)を利用した文書ファイルの低サイズ化のためのベクトル化処理について説明するものである。なお、以下に説明するベクトル化処理は、上述したベクトル化部11fが行うものとする。
Next, a specific example of the image processing described above will be described. 4 to 8 illustrate vectorization processing for reducing the size of a document file using vectorization and OCR (character recognition). Note that the vectorization process described below is performed by the
まず、図4に示すように、原稿20を上述したスキャナー部14により読み込み、文字画像とOCR(文字認識)情報bとを取得する。なお、ベクトル画像情報(ベクトルデータ)aは、上述したように、原稿20そのもののPDFファイルの情報であり、既に取得されているものとする。また、以下に説明するフォント辞書cは、PDFファイル内に含まれているものである。ここで、描画される文字が、ベクトル画像情報(ベクトルデータ)aからでは特定できないため、OCR(文字認識)情報bから文字コードと文字座標とを取得し、以下の手順でフォント辞書cへの登録を行う。
First, as shown in FIG. 4, the
すなわち、図5及び図6に示すように、
(1)たとえば「K」の文字画像がOCR(文字認識)されたとすると、「K」の文字画像の左端から右端の間で描画開始位置が一致するX座標を、OCR(文字認識)情報bから検索する。
(2)OCR座標(OCR(文字認識)情報bの文字座標)とベクトル画像情報aの描画開始位置のX座標とが一致した場合、Y座標の上端から下端間で描画開始位置が一致するY座標を検索する。
(3)どちらも一致した場合は、該当文字と判断しベクトル画像情報aのfillまでを文字としてフォント辞書cに登録する。
(4)既に登録済みの文字が検索で見つかった場合はフォント辞書cへの登録を行わない。
That is, as shown in FIGS.
(1) For example, if the character image of “K” is OCR (character recognition), the X coordinate where the drawing start position matches between the left end and the right end of the character image of “K” is represented by OCR (character recognition) information b. Search from.
(2) When the OCR coordinates (the character coordinates of the OCR (character recognition) information b) match the X coordinate of the drawing start position of the vector image information a, the drawing start position matches between the upper end and the lower end of the Y coordinate. Search for coordinates.
(3) If both match, it is determined as a corresponding character and up to the fill of the vector image information a is registered as a character in the font dictionary c.
(4) When a registered character is found by the search, registration to the font dictionary c is not performed.
なお、図6に示すように、フォント辞書cに登録された文字がたとえば「K」「y」「o」「c」となっていると、それぞれの文字が描画処理の際にそのフォント辞書cから読み出されることになる。 As shown in FIG. 6, if the characters registered in the font dictionary c are, for example, “K”, “y”, “o”, and “c”, each character is displayed in the font dictionary c during the drawing process. Will be read from.
次に、図7に示すように、ベクトル画像情報aのEOF(データの終端)までの検索を終えたら、次はベクトル画像情報aのベクトル座標からOCR(文字認識)情報bに対して検索をかける。ここで、OCR(文字認識)で認識できていない文字があり得るので、以下の手順でベクトル画像情報aから再度検索する。 Next, as shown in FIG. 7, when the search to the EOF (end of data) of the vector image information a is completed, the next search is performed on the OCR (character recognition) information b from the vector coordinates of the vector image information a. Call. Here, since there may be a character that cannot be recognized by OCR (character recognition), the vector image information a is searched again by the following procedure.
(5)ベクトルデータの書き出し開始位置について、OCR(文字認識)で認識された文字に一致しないものを検索する。
(6)一致した文字は、別認識した記号や既にフォント辞書cに登録済みであるため破棄する。
(7)一致しない文字は、ベクトル列をまとめて1つのフォント辞書cに追加登録する。
ここで、一致しない文字のブロックができるが、9割以上はフォント辞書cに登録されるためファイルのサイズの低減につながる。
(5) Search for a vector data write start position that does not match a character recognized by OCR (character recognition).
(6) The matched characters are discarded because they are already registered in the separately recognized symbols and font dictionary c.
(7) Non-matching characters are additionally registered in one font dictionary c by collecting vector strings.
Here, a block of non-matching characters is created, but 90% or more are registered in the font dictionary c, leading to a reduction in file size.
次に、図8に示すように、
(8)文字を登録したフォント辞書cからフォントを取得し、サイズ、記載座標を指定して描画処理を行う。すなわち、たとえば「K」「y」「o」「c」「o」「o」を描画する場合、それぞれの文字のフォントがフォント辞書cから取得されることになる。
Next, as shown in FIG.
(8) A font is acquired from the font dictionary c in which characters are registered, and drawing processing is performed by designating size and description coordinates. That is, for example, when “K”, “y”, “o”, “c”, “o”, and “o” are drawn, the font of each character is acquired from the font dictionary c.
次に、図9などを参照し、ベクトル化とパターンマッチングを利用した文書ファイルの低サイズ化のためのベクトル化処理について説明する。なお、以下に説明するパターンマッチングは、上述したベクトル化部11fが行うものとする。
Next, a vectorization process for reducing the size of a document file using vectorization and pattern matching will be described with reference to FIG. In addition, the pattern matching demonstrated below shall be performed by the
まず、図9に示すように、原稿20を上述したスキャナー部14により読み込み、文字画像を取得し、以下の手順でフォント辞書cへの登録を行う。
すなわち、図10(a)に示すように、
(1)ベクトル化前の2値画像の近傍画素において同じ輝度を持つ要素を探し出しラベルを作成する。ここでは、たとえば「K」の文字のラベルが取得されることになる。
(2)ラベル取得時の基点dの場所の座標と、縦横のドット幅を記憶する。
(3)文字画像内の記載座標に対して検索をかける。
(4)横ドット幅(X座標)の文字画像の左端から右端間で、描画開始位置が一致するX座標をベクトル画像情報aから検索する。
(5)X座標が一致した場合は、縦ドット幅(Y座標)の上端から下端間で描画開始位置が一致するY座標をベクトル画像情報aから検索する。
(6)どちらも一致した場合は該当文字と判断し、ベクトル画像情報aのfillまでを文字として上述したフォント辞書cに登録する。
(7)既に登録済みの文字が検索で見つかった場合はフォント辞書cへの登録を行わない。
First, as shown in FIG. 9, the original 20 is read by the
That is, as shown in FIG.
(1) An element having the same luminance is searched for in the neighboring pixels of the binary image before vectorization, and a label is created. Here, for example, the label of the letter “K” is acquired.
(2) The coordinates of the location of the base point d at the time of label acquisition and the vertical and horizontal dot widths are stored.
(3) A search is performed on the described coordinates in the character image.
(4) Search the vector image information a for the X coordinate whose drawing start position matches between the left end and the right end of the character image having the horizontal dot width (X coordinate).
(5) If the X coordinates match, the vector image information a is searched for a Y coordinate whose drawing start position matches between the upper end and the lower end of the vertical dot width (Y coordinate).
(6) If both match, it is determined as a corresponding character, and up to the fill of the vector image information a is registered as a character in the font dictionary c described above.
(7) When a registered character is found by the search, registration to the font dictionary c is not performed.
次に、図10(b)に示すように、
(8)ラベルの重心eを決め、その重心eの位置からのラベルの特徴量を算出する。
なお、特徴量は、ラベルの重心eから最外周輪郭線間までの距離(点線矢印で示している)である。これにより対象ラベルが拡大/縮小、回転をしても特徴の周期で一致させることが可能となる。
(9)特徴量の一致する文字をベクトル画像情報aから検索する。
(10)一致した文字の座標と縦横の幅を記憶する。
(11)文字が見つからなくなるまで(9)、(10)を繰り返す。
(12)次のラベルを取得し、上記同様のパターンマッチングを行う。
このとき、記憶した文字と座標を次の検索対象から外す。
(13)描画処理の際は、フォント辞書cからフォントを取得し、サイズ、記載座標が指定される。
Next, as shown in FIG.
(8) The center of gravity e of the label is determined, and the feature amount of the label from the position of the center of gravity e is calculated.
The feature amount is a distance (indicated by a dotted arrow) between the center of gravity e of the label and the outermost contour line. As a result, even if the target label is enlarged / reduced or rotated, it can be made to coincide with the period of the feature.
(9) Search the vector image information a for characters having the same feature quantity.
(10) The coordinates of the matched character and the horizontal and vertical width are stored.
(11) Repeat (9) and (10) until no character is found.
(12) The next label is acquired and pattern matching similar to the above is performed.
At this time, the stored characters and coordinates are excluded from the next search target.
(13) In the drawing process, the font is acquired from the font dictionary c, and the size and description coordinates are designated.
このように、本実施形態では、画像処理部11cにより、文字認識により得られる文字座標とベクトル化したデータに含まれる文字座標との照合により一致する文字画像のベクトル化データをフォント辞書cに登録できる。また、文字認識により得られる文字画像から算出される特徴量との照合(パターンマッチング)により一致する文字画像のベクトル化データをフォント辞書に登録できる。 As described above, in the present embodiment, the image processing unit 11c registers the vectorized data of the character image that matches by matching the character coordinates obtained by character recognition with the character coordinates included in the vectorized data in the font dictionary c. it can. Also, vectorized data of matching character images can be registered in the font dictionary by matching (pattern matching) with a feature amount calculated from a character image obtained by character recognition.
また、フォント辞書cへの登録を行う場合、既に登録済みの文字についてはその登録が行われないようにしているため、登録すべき文字画像が増えてもファイルサイズが増大してしまうことを抑制することができる。 In addition, when registering in the font dictionary c, since registration is not performed for characters that have already been registered, it is possible to prevent the file size from increasing even if the number of character images to be registered increases. can do.
このような本発明の文書ファイル生成装置及び文書ファイル生成方法は、ファイルサイズを増大させることなく、画像を細かく綺麗に描画するための文字画像のベクトル化を容易にかつ確実に行うことができる。 The document file generation apparatus and the document file generation method of the present invention can easily and reliably perform vectorization of a character image for finely drawing an image without increasing the file size.
以上、具体的な実施の形態により本発明を説明したが、上記実施の形態は本発明の例示であり、この実施の形態に限定されないことは言うまでもない。 As mentioned above, although this invention was demonstrated by specific embodiment, it cannot be overemphasized that the said embodiment is an illustration of this invention and is not limited to this embodiment.
本発明は、文書ファイル生成装置及び文書ファイル生成方法に好適であるが、文書ファイル生成装置及び文書ファイル生成方法に限られるものではなく、文書ファイルを生成する機能を備える装置及び文書ファイル生成一般に適用できる。 The present invention is suitable for a document file generation apparatus and a document file generation method, but is not limited to the document file generation apparatus and the document file generation method, and is generally applicable to an apparatus having a function for generating a document file and document file generation in general. it can.
10 文書ファイル生成装置
11 制御部
11a 操作受付部
11b 画像認識部
11c 画像処理部
11d メモリー
11e カウンター
11e−1 aカウンター
11e−2 bカウンター
11e−3 cカウンター
11f ベクトル化部
12 操作部
13 表示部
14 スキャナー部
20 原稿
a ベクトル画像情報(ベクトルデータ)
b OCR(文字認識)情報
c フォント辞書
d 基点
e 重心
DESCRIPTION OF
b OCR (character recognition) information c Font dictionary d Base point e Center of gravity
Claims (10)
前記文字画像をベクトル化するベクトル化手段と、
ベクトル化ファイル又は文書ファイルを生成する画像処理手段とを有し、
前記ベクトル化手段は、
前記ベクトル化の前に2値画像の近傍画素において同じ輝度を持つ要素を探し出して前記文字画像を作成する文字画像作成手段と、
前記文字画像作成手段で作成された前記文字画像の特徴量と前記文字認識により得られる前記文字画像の特徴量との照合を行うパターンマッチング手段と、
前記特徴量が一致する前記文字画像のベクトル化データをフォント辞書に登録する第1のフォント辞書登録手段を備え、
前記第1のフォント辞書登録手段により登録した前記ベクトル化データを用いて前記ベクトル化ファイルを生成することを特徴とする文書ファイル生成装置。 A document file generation device that generates a document file obtained by converting character images of a document obtained by character recognition into data,
Vectorizing means for vectorizing the character image;
Image processing means for generating a vectorized file or a document file,
The vectorization means includes:
A character image creating means for searching for an element having the same luminance in neighboring pixels of the binary image before the vectorization and creating the character image;
Pattern matching means for comparing the feature amount of the character image created by the character image creation means with the feature amount of the character image obtained by the character recognition;
A first font dictionary registration means for registering vectorized data of the character image having the same feature quantity in a font dictionary;
An apparatus for generating a document file, wherein the vectorized file is generated using the vectorized data registered by the first font dictionary registering means.
前記文字画像の重心を決め、前記重心の位置から前記文字画像の最外周輪郭線間までの距離である前記特徴量を算出する特徴量算出手段を備え、
前記特徴量が一致する前記文字画像をベクトル画像情報から検索し、前記文字画像を前記フォント辞書に登録することを特徴とする請求項1に記載の文書ファイル生成装置。 The pattern matching means includes
A feature amount calculating means for determining a center of gravity of the character image and calculating the feature amount that is a distance from the position of the center of gravity to the outermost contour line of the character image;
2. The document file generation apparatus according to claim 1, wherein the character image having the same feature amount is searched from vector image information, and the character image is registered in the font dictionary.
前記文字認識により得られる前記文字画像の基点からの文字座標と前記ベクトル化データに含まれる前記文字座標との照合を行う文字座標照合手段と、
前記文字座標が一致する前記文字画像の前記ベクトル化データを前記フォント辞書に登録する第2のフォント辞書登録手段を備え、
前記第2のフォント辞書登録手段により登録した前記ベクトル化データを用いて前記ベクトル化ファイルを生成することを特徴とする請求項1または請求項2に記載の文書ファイル生成装置。 The vectorization means includes:
Character coordinate matching means for matching the character coordinates from the base point of the character image obtained by the character recognition with the character coordinates included in the vectorized data;
A second font dictionary registering means for registering the vectorized data of the character image with the matching character coordinates in the font dictionary;
3. The document file generating apparatus according to claim 1, wherein the vectorized file is generated using the vectorized data registered by the second font dictionary registering unit.
前記文字画像の描画開始位置のX座標を文字認識情報から検索し、前記描画開始位置のX座標が一致した場合、前記文字画像の前記描画開始位置のY座標を検索する座標検索手段を備え、
前記X座標と前記Y座標が一致する前記文字画像を前記ベクトル画像情報から検索し、前記文字画像を前記フォント辞書に登録することを特徴とする請求項3に記載の文書ファイル生成装置。 The character coordinate matching means includes:
Coordinate search means for searching for the X coordinate of the drawing start position of the character image from character recognition information and searching for the Y coordinate of the drawing start position of the character image when the X coordinate of the drawing start position matches,
4. The document file generation apparatus according to claim 3, wherein the character image in which the X coordinate and the Y coordinate coincide with each other is searched from the vector image information, and the character image is registered in the font dictionary.
前記文字画像をベクトル化するベクトル化工程と、
ベクトル化ファイル又は文書ファイルを生成する画像処理工程とを有し、
前記ベクトル化工程は、
前記ベクトル化の前に2値画像の近傍画素において同じ輝度を持つ要素を探し出して前記文字画像を作成する文字画像作成工程と、
前記文字画像作成工程で作成された前記文字画像の特徴量と前記文字認識により得られる前記文字画像の特徴量との照合を行うパターンマッチング工程と、
前記特徴量が一致する前記文字画像のベクトル化データをフォント辞書に登録する第1のフォント辞書登録工程を備え、
前記第1のフォント辞書登録工程により登録した前記ベクトル化データを用いて前記ベクトル化ファイルを生成することを特徴とする文書ファイル生成方法。 A document file generation method for generating a document file obtained by converting character images of a manuscript obtained by character recognition into data,
A vectorization step of vectorizing the character image;
An image processing step for generating a vectorized file or a document file,
The vectorization step includes
A character image creation step of searching for an element having the same brightness in neighboring pixels of the binary image before the vectorization and creating the character image;
A pattern matching step for collating the feature amount of the character image created in the character image creation step with the feature amount of the character image obtained by the character recognition;
A first font dictionary registration step of registering vectorized data of the character image having the same feature quantity in a font dictionary;
A document file generation method, wherein the vectorized file is generated using the vectorized data registered in the first font dictionary registration step.
前記文字画像の重心を決め、前記重心の位置から前記文字画像の最外周輪郭線間までの距離である前記特徴量を算出する特徴量算出工程を備え、
前記特徴量が一致する前記文字画像をベクトル画像情報から検索し、前記文字画像を前記フォント辞書に登録することを特徴とする請求項6に記載の文書ファイル生成方法。 The pattern matching process includes:
Determining a center of gravity of the character image, and comprising a feature amount calculating step of calculating the feature amount that is a distance from the position of the center of gravity to the outermost contour line of the character image,
The document file generation method according to claim 6, wherein the character image having the same feature amount is searched from vector image information, and the character image is registered in the font dictionary.
前記文字認識により得られる前記文字画像の基点からの文字座標と前記ベクトル化データに含まれる前記文字座標との照合を行う文字座標照合工程と、
前記文字座標が一致する前記文字画像の前記ベクトル化データを前記フォント辞書に登録する第2のフォント辞書登録工程を備え、
前記第2のフォント辞書登録工程により登録した前記ベクトル化データを用いて前記ベクトル化ファイルを生成することを特徴とする請求項6または請求項7に記載の文書ファイル生成方法。 The vectorization step includes
A character coordinate matching step for collating the character coordinates from the base point of the character image obtained by the character recognition with the character coordinates included in the vectorized data;
A second font dictionary registration step of registering the vectorized data of the character image with the matching character coordinates in the font dictionary;
The document file generation method according to claim 6 or 7, wherein the vectorized file is generated using the vectorized data registered in the second font dictionary registration step.
前記文字画像の描画開始位置のX座標を文字認識情報から検索し、前記描画開始位置のX座標が一致した場合、前記文字画像の前記描画開始位置のY座標を検索する座標検索工程を備え、
前記X座標と前記Y座標が一致する前記文字画像を前記ベクトル画像情報から検索し、前記文字画像を前記フォント辞書に登録することを特徴とする請求項8に記載の文書ファイル生成方法。 The character coordinate matching step includes:
A coordinate search step of searching for the X coordinate of the drawing start position of the character image from character recognition information and searching for the Y coordinate of the drawing start position of the character image when the X coordinate of the drawing start position matches,
9. The document file generation method according to claim 8, wherein the character image in which the X coordinate matches the Y coordinate is searched from the vector image information, and the character image is registered in the font dictionary.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2014130606A JP6432179B2 (en) | 2014-06-25 | 2014-06-25 | Document file generation apparatus and document file generation method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2014130606A JP6432179B2 (en) | 2014-06-25 | 2014-06-25 | Document file generation apparatus and document file generation method |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2016009395A true JP2016009395A (en) | 2016-01-18 |
JP6432179B2 JP6432179B2 (en) | 2018-12-05 |
Family
ID=55226895
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2014130606A Expired - Fee Related JP6432179B2 (en) | 2014-06-25 | 2014-06-25 | Document file generation apparatus and document file generation method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6432179B2 (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108108339A (en) * | 2018-01-10 | 2018-06-01 | 北京仁和汇智信息技术有限公司 | A kind of PDF borders and the method and device of grid lines mark |
CN109460701A (en) * | 2018-09-10 | 2019-03-12 | 昆明理工大学 | A kind of character recognition method based on histogram in length and breadth |
CN109670461A (en) * | 2018-12-24 | 2019-04-23 | 广东亿迅科技有限公司 | PDF text extraction method, device, computer equipment and storage medium |
Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH096315A (en) * | 1995-06-22 | 1997-01-10 | Canon Inc | Method and device for font data management |
JP2002287674A (en) * | 2001-03-28 | 2002-10-04 | Toshiba Corp | Advertisement insertion method and advertisement insertion system and program |
JP2003085164A (en) * | 2001-09-07 | 2003-03-20 | Xelo Inc | Document output device, method and computer program |
JP2006202026A (en) * | 2005-01-20 | 2006-08-03 | Canon Inc | Information processor and control method |
US20060288281A1 (en) * | 2005-06-21 | 2006-12-21 | Thomas Merz | Method of determining unicode values corresponding to the text in digital documents |
JP2008117037A (en) * | 2006-11-01 | 2008-05-22 | Fujitsu Ltd | Program and method for creating character recognition dictionary |
JP2008148263A (en) * | 2006-12-13 | 2008-06-26 | Canon Inc | Image forming apparatus, and its control method |
JP2008199249A (en) * | 2007-02-13 | 2008-08-28 | Fuji Xerox Co Ltd | Image processing apparatus, image coding device, image processing program, and image coding program |
JP2008236715A (en) * | 2007-02-21 | 2008-10-02 | Fuji Xerox Co Ltd | Image processing apparatus and program |
JP2009545064A (en) * | 2006-07-25 | 2009-12-17 | モノタイプ.イメージング.インコーポレイテッド | Method and apparatus for font subsetting |
JP2010136192A (en) * | 2008-12-05 | 2010-06-17 | Canon Inc | Image processor, image processing method, and computer program |
-
2014
- 2014-06-25 JP JP2014130606A patent/JP6432179B2/en not_active Expired - Fee Related
Patent Citations (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH096315A (en) * | 1995-06-22 | 1997-01-10 | Canon Inc | Method and device for font data management |
JP2002287674A (en) * | 2001-03-28 | 2002-10-04 | Toshiba Corp | Advertisement insertion method and advertisement insertion system and program |
JP2003085164A (en) * | 2001-09-07 | 2003-03-20 | Xelo Inc | Document output device, method and computer program |
JP2006202026A (en) * | 2005-01-20 | 2006-08-03 | Canon Inc | Information processor and control method |
US20060288281A1 (en) * | 2005-06-21 | 2006-12-21 | Thomas Merz | Method of determining unicode values corresponding to the text in digital documents |
JP2009545064A (en) * | 2006-07-25 | 2009-12-17 | モノタイプ.イメージング.インコーポレイテッド | Method and apparatus for font subsetting |
JP2008117037A (en) * | 2006-11-01 | 2008-05-22 | Fujitsu Ltd | Program and method for creating character recognition dictionary |
JP2008148263A (en) * | 2006-12-13 | 2008-06-26 | Canon Inc | Image forming apparatus, and its control method |
JP2008199249A (en) * | 2007-02-13 | 2008-08-28 | Fuji Xerox Co Ltd | Image processing apparatus, image coding device, image processing program, and image coding program |
JP2008236715A (en) * | 2007-02-21 | 2008-10-02 | Fuji Xerox Co Ltd | Image processing apparatus and program |
JP2008233840A (en) * | 2007-02-21 | 2008-10-02 | Fuji Xerox Co Ltd | Image processor and image processing program |
JP2010136192A (en) * | 2008-12-05 | 2010-06-17 | Canon Inc | Image processor, image processing method, and computer program |
Non-Patent Citations (1)
Title |
---|
染原 睦美: "PDFをOffice文書に逆変換", 日経パソコン, vol. 第516号, JPN6017018824, 23 October 2006 (2006-10-23), JP, pages 82 - 89, ISSN: 0003891960 * |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108108339A (en) * | 2018-01-10 | 2018-06-01 | 北京仁和汇智信息技术有限公司 | A kind of PDF borders and the method and device of grid lines mark |
CN109460701A (en) * | 2018-09-10 | 2019-03-12 | 昆明理工大学 | A kind of character recognition method based on histogram in length and breadth |
CN109460701B (en) * | 2018-09-10 | 2020-09-25 | 昆明理工大学 | Font identification method based on longitudinal and transverse histograms |
CN109670461A (en) * | 2018-12-24 | 2019-04-23 | 广东亿迅科技有限公司 | PDF text extraction method, device, computer equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
JP6432179B2 (en) | 2018-12-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6000992B2 (en) | Document file generation apparatus and document file generation method | |
CN109409398B (en) | Image processing apparatus, image processing method, and storage medium | |
JP4694613B2 (en) | Document orientation determination apparatus, document orientation determination method, program, and recording medium therefor | |
US8254721B2 (en) | Data input system, data input receiving device, data input receiving method and computer readable medium | |
US10339657B2 (en) | Character detection apparatus and method | |
JP6527410B2 (en) | Character recognition device, character recognition method, and program | |
US20100158375A1 (en) | Signal processing apparatus, signal processing method, computer-readable medium and computer data signal | |
WO2014014640A1 (en) | Method of handling complex variants of words through prefix-tree based decoding for devanagiri ocr | |
JP6795195B2 (en) | Character type estimation system, character type estimation method, and character type estimation program | |
JP6432179B2 (en) | Document file generation apparatus and document file generation method | |
US10032059B2 (en) | Image analyzing apparatus that identifies barcode image in target image | |
JP5538812B2 (en) | Image processing apparatus, image processing method, and program | |
CN111338733A (en) | User interface adaptation method and system | |
RU2597163C2 (en) | Comparing documents using reliable source | |
JP5623574B2 (en) | Form identification device and form identification method | |
JP6624120B2 (en) | Character recognition device, character recognition method, character recognition program, and computer-readable recording medium storing character recognition program | |
KR20160053544A (en) | Method for extracting candidate character | |
JP2014154066A (en) | Character recognition system, character recognition program and character recognition method | |
JP6118646B2 (en) | Form processing device, form processing method, form processing program | |
JP2022090469A (en) | Format defining device, format defining method, and program | |
JP2013182459A (en) | Information processing apparatus, information processing method, and program | |
JP6459528B2 (en) | Image correction apparatus, image correction system, image correction method, and image correction program | |
JP5277750B2 (en) | Image processing program, image processing apparatus, and image processing system | |
JP2017207837A (en) | Image inspection device, image inspection method and program | |
JP2012058869A (en) | Image processor, image-forming device and image processing program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20160721 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20170524 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20170530 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20170728 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20180206 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20180405 |
|
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: 20181009 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20181022 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 6432179 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
LAPS | Cancellation because of no payment of annual fees |