JP2023136551A - Image processing device, image processing method and image processing program - Google Patents
Image processing device, image processing method and image processing program Download PDFInfo
- Publication number
- JP2023136551A JP2023136551A JP2022042281A JP2022042281A JP2023136551A JP 2023136551 A JP2023136551 A JP 2023136551A JP 2022042281 A JP2022042281 A JP 2022042281A JP 2022042281 A JP2022042281 A JP 2022042281A JP 2023136551 A JP2023136551 A JP 2023136551A
- Authority
- JP
- Japan
- Prior art keywords
- character
- recognition area
- written
- characters
- image processing
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000012545 processing Methods 0.000 title claims abstract description 39
- 238000003672 processing method Methods 0.000 title claims abstract description 6
- 238000012937 correction Methods 0.000 claims abstract description 50
- 238000000034 method Methods 0.000 claims description 15
- 230000006870 function Effects 0.000 description 31
- 238000010586 diagram Methods 0.000 description 20
- 238000004891 communication Methods 0.000 description 13
- 239000013598 vector Substances 0.000 description 10
- 239000000284 extract Substances 0.000 description 8
- 238000007639 printing Methods 0.000 description 8
- 238000000605 extraction Methods 0.000 description 5
- 238000005516 engineering process Methods 0.000 description 3
- 238000007796 conventional method Methods 0.000 description 2
- 230000010365 information processing Effects 0.000 description 2
- 239000000463 material Substances 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 239000003086 colorant Substances 0.000 description 1
- 238000001125 extrusion Methods 0.000 description 1
- 238000009434 installation Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 230000004044 response Effects 0.000 description 1
Images
Landscapes
- Character Input (AREA)
Abstract
Description
本発明は、画像処理装置、画像処理方法及び画像処理プログラムに関する。 The present invention relates to an image processing device, an image processing method, and an image processing program.
MFP(Multifunction Peripheral/Printer/Product)やスキャナで読み取った帳票や文書などの画像から、文字が印字された領域を抽出し、種類を認識する文字認識処理(OCR)という技術がある。このような技術では、文字が印字された領域を正確に抽出するために、原稿から表の枠線等の特徴的な領域を抽出して文字認識が行われる認識領域を設定する場合や、認識領域を手動で設定する場合がある。しかし、予め印字された枠線に必要事項のみ追記する原稿の場合、印字ずれなどにより事前に設定した認識領域外に文字が出てしまうことがある。そこで、読み取った原稿の印字のずれを検出して、認識領域を補正する技術が知られている。 There is a technology called character recognition processing (OCR) that extracts areas where characters are printed from images of forms, documents, etc. read with an MFP (Multifunction Peripheral/Printer/Product) or scanner and recognizes the types. In such technology, in order to accurately extract the area where characters are printed, there are cases in which characteristic areas such as table borders are extracted from the document and a recognition area is set for character recognition. The area may be set manually. However, in the case of a document in which only necessary information is added to a pre-printed frame line, characters may appear outside the pre-set recognition area due to printing misalignment or the like. Therefore, a technique is known that detects the misalignment of print on a read document and corrects the recognition area.
このような技術の一例として、例えば、特許文献1には、枠線を含む文書をスキャナで電子化した画像中の印字データを読取る方法において、データが印字されない領域に混入した印字ずれデータの検出と、枠の領域と印字ずれデータの外接矩形の重なり度の算出と、2つの枠を仕切る枠線の位置と重なった文字の位置と枠の中心位置との関係と、印字ずれデータの外接矩形の大きさと枠の大きさと、大局的な印字ずれ方向とを利用することで、印字ずれデータがどの枠からはみ出した印字データであるかを判別する技術が開示されている。
As an example of such technology, for example,
しかしながら、文字認識の対象が、ずれ方が一律である活字である場合、大局的なずれの検出から、文字と認識領域の対応付けが可能だが、文字認識の対象が、ずれ方が一律でない手書きの文字の場合は、認識領域を正しく設定できず、誤認識が発生し易いという問題点があった。 However, if the object of character recognition is printed text whose deviation is uniform, it is possible to associate the character with the recognition area by detecting the global deviation. In the case of the characters, there was a problem in that the recognition area could not be set correctly and erroneous recognition was likely to occur.
本願は、上記に鑑みてなされたものであって、画像に含まれる文字が手書きである場合であっても認識領域を正しく設定することを目的とする。 The present application has been made in view of the above, and an object thereof is to correctly set a recognition area even when characters included in an image are handwritten.
上述した課題を解決し、目的を達成するために、本発明は、画像内に記載された文字の認識が行われる領域である認識領域に記載された文字が、手書きか活字かを判定する文字判定部と、前記判定部により前記認識領域に記載された文字が手書きであると判定された場合に、前記認識領域のサイズを変更する第1補正部と、前記判定部により前記認識領域に記載された文字が活字であると判定された場合に、前記認識領域の位置を移動させる第2補正部とを備えたことを特徴とする。 In order to solve the above-mentioned problems and achieve the objects, the present invention provides a character recognition method for determining whether characters written in a recognition area, which is an area where characters written in an image are recognized, are handwritten or printed. a determination unit; a first correction unit that changes the size of the recognition area when the determination unit determines that the character written in the recognition area is handwritten; and a first correction unit that changes the size of the recognition area written in the recognition area by the determination unit; and a second correction unit that moves the position of the recognition area when the detected character is determined to be a printed character.
本発明によれば、画像に含まれる文字が手書きである場合であっても認識領域を正しく設定することができるといった効果を奏する。 According to the present invention, it is possible to correctly set a recognition area even when characters included in an image are handwritten.
以下に添付図面を参照して、画像処理装置、画像処理方法及び画像処理プログラムの実施の形態を詳細に説明する。下記に示す実施の形態においては、本発明の画像処理装置が複合機(MFP)である場合を例に取り説明するが、これに限定されるものではない。なお、複合機とは、印刷機能、複写機能、スキャナ機能、及びファクシミリ機能のうち少なくとも2つの機能を有する装置である。 Embodiments of an image processing device, an image processing method, and an image processing program will be described in detail below with reference to the accompanying drawings. In the embodiments shown below, an example will be explained in which the image processing apparatus of the present invention is a multifunction peripheral (MFP), but the present invention is not limited to this. Note that a multifunction device is a device that has at least two functions among a printing function, a copying function, a scanner function, and a facsimile function.
(実施形態)
まず、図1を用いて、実施形態に係る画像処理装置(MFP)10を含む画像処理システム1全体の概要について説明する。図1は、実施形態に係る画像処理システム1の構成の一例を示す図である。図1に示すように、画像処理システム1は、MFP10と、PC(Personal Computer)11と、サーバ12と、記憶装置13とを含む。MFP10、PC(Personal Computer)11、サーバ12及び記憶装置13は、ネットワーク14を介して接続されている。ネットワーク14としては、例えば、LAN(Local Area Network)やインターネットなどが挙げられる。なお、図1に示した画像処理システム1には、複数台のMFP10、複数台のPC(Personal Computer)11、複数台のサーバ12及び複数台の記憶装置13が含まれていてもよい。
(Embodiment)
First, an overview of the entire
MFP10は、原稿を読み取り、当該原稿を示す画像に含まれる文字の認識処理を実行する。また、文字の認識処理が行われる領域である認識領域に関する情報が、読み取る原稿に対して設定されていない場合、MFP10は、認識領域の抽出を行う。
The
PC11は、ユーザによって利用される情報処理装置である。例えば、PC11は、MFP10による認識処理の認識結果をユーザが確認するために用いられる。また、PC11は、認識領域の修正をユーザが行うために用いられる。
The PC 11 is an information processing device used by a user. For example, the PC 11 is used by the user to confirm the recognition result of the recognition process performed by the
なお、文字の認識処理や認識領域の設定は、PC11やサーバ12が、MFP10により読み取られた原稿を示す画像を、MFP10から受信して実行してもよい。また、認識領域の設定は、MFP10が原稿の読み取りと同時に自動で行わず、画像を見ながらユーザが手動でMFP10を操作することにより行われてもよい。
Note that the character recognition process and the setting of the recognition area may be executed by the
また、認識結果や認識領域に関する情報は、基本的にPC11やサーバ12に保存されるが、外部の記憶装置13に保存しておくことも可能である。
Further, although information regarding recognition results and recognition areas is basically stored in the PC 11 or server 12, it is also possible to store it in an
次に、図2を用いて、実施形態に係るMFP10の構成について説明する。図2は、実施形態に係るMFP10のハードウェア構成例を示した図である。図2に示すように、複合機であるMFP10は、コピー機能、スキャナ機能、ファクス機能、プリンタ機能などの各種の機能を実現可能な本体20と、ユーザの操作を受け付ける操作部30とを備える。なお、ユーザの操作を受け付けるとは、ユーザの操作に応じて入力される情報(画面の座標値を示す信号等を含む)を受け付けることを含む概念である。本体20と操作部30とは、専用の通信路100を介して相互に通信可能に接続されている。通信路100は、例えばUSB(Universal Serial Bus)規格のものを用いることもできるが、有線か無線かを問わず任意の規格のものであってよい。
Next, the configuration of the
なお、本体20は、操作部30で受け付けた操作に応じた動作を行うことができる。また、本体20は、クライアントPC等の外部装置(例えば、PC11)とも通信可能であり、外部装置から受信した指示に応じた動作を行うこともできる。
Note that the
まず、本体20のハードウェア構成について説明する。図2に示すように、本体20は、CPU21と、ROM22と、RAM23と、HDD(ハードディスクドライブ)24と、通信I/F(インタフェース)25と、接続I/F26と、エンジン部27とを備える。CPU21と、ROM22と、RAM23と、HDD24と、通信I/F25と、接続I/F26と、エンジン部27とは、システムバス28を介して相互に接続されている。
First, the hardware configuration of the
CPU21は、本体20の動作を統括的に制御する。CPU21は、RAM23をワークエリア(作業領域)としてROM22またはHDD24等に格納されたプログラムを実行することで、本体20全体の動作を制御し、上述したコピー機能、スキャナ機能、ファクス機能、プリンタ機能などの各種機能を実現する。
The
通信I/F25は、ネットワーク14と接続するためのインタフェースである。接続I/F26は、通信路100を介して操作部30と通信するためのインタフェースである。
Communication I/
エンジン部27は、コピー機能、スキャナ機能、ファクス機能、および、プリンタ機能を実現させるための、汎用的な情報処理及び通信以外の処理を行うハードウェアである。エンジン部27は、例えば、原稿の画像をスキャンして読み取るスキャナ(画像読取部)、用紙等のシート材への印刷を行うプロッタ(画像形成部)、ファクス通信を行うファクス部などを備えている。更に、エンジン部27は、印刷済みシート材を仕分けるフィニッシャや、原稿を自動給送するADF(自動原稿給送装置)のような特定のオプションを備えることもできる。
The
次に、操作部30のハードウェア構成について説明する。図2に示すように、操作部30は、CPU31と、ROM32と、RAM33と、フラッシュメモリ34と、通信I/F35と、接続I/F36と、操作パネル37とを備える。CPU31と、ROM32と、RAM33と、フラッシュメモリ34と、通信I/F35と、接続I/F36と、操作パネル37とは、システムバス38を介して相互に接続されている。
Next, the hardware configuration of the
CPU31は、操作部30の動作を統括的に制御する。CPU31は、RAM33をワークエリア(作業領域)としてROM32またはフラッシュメモリ34等に格納されたプログラムを実行することで、操作部30全体の動作を制御し、ユーザから受け付けた入力に応じた情報(画像)の表示などの後述する各種機能を実現する。
The CPU 31 centrally controls the operation of the
通信I/F35は、ネットワーク14と接続するためのインタフェースである。接続I/F36は、通信路100を介して本体20と通信するためのインタフェースである。
Communication I/
操作パネル37は、ユーザの操作に応じた各種の入力を受け付けるとともに、各種の情報(例えば受け付けた操作に応じた情報、MFP10の動作状況を示す情報、設定状態などを示す情報など)を表示する。この例では、操作パネル37は、タッチパネル機能を搭載した液晶表示装置(LCD)で構成されるが、これに限られるものではない。例えば、操作パネル37は、タッチパネル機能が搭載された有機EL表示装置で構成されてもよい。さらに、操作パネル37は、これに加えて又はこれに代えて、ハードウェアキー等の操作部やランプ等の表示部を設けることもできる。
The
本実施形態のMFP10の操作部30で実行される画像処理プログラムは、ROM等に予め組み込まれて提供される。
The image processing program executed by the
なお、本実施形態のMFP10の操作部30で実行される画像処理プログラムは、インストール可能な形式又は実行可能な形式のファイルでCD-ROM、フレキシブルディスク(FD)、CD-R、DVD(Digital Versatile Disk)等のコンピュータで読み取り可能な記録媒体に記録されて提供するように構成してもよい。
The image processing program executed on the
また、本実施形態のMFP10の操作部30で実行される画像処理プログラムを、インターネット等のネットワークに接続されたコンピュータ上に格納し、ネットワーク経由でダウンロードさせることにより提供するように構成してもよい。また、本実施形態のMFP10の操作部30で実行される画像処理プログラムをインターネット等のネットワーク経由で提供または配布するように構成してもよい。
Further, the image processing program executed by the
本実施の形態のMFP10の操作部30で実行される画像処理プログラムは、後述する各部(画像受信部301、認識領域取得部302、文字判定部303、はみ出し判定部304、第1補正部305、追記判定部306、算出部307、第2補正部308及び認識領域出力部309)を含むモジュール構成となっており、実際のハードウェアとしてはCPU(プロセッサ)が上記ROMから画像処理プログラムを読み出して実行することにより上記各部が主記憶装置上にロードされ、画像受信部301、認識領域取得部302、文字判定部303、はみ出し判定部304、第1補正部305、追記判定部306、算出部307、第2補正部308及び認識領域出力部309が主記憶装置上に生成されるようになっている。
The image processing program executed by the
次に、図3を用いて、MFP10の操作部30で実行される音声補助機能について説明する。図3は、操作部30の画像処理機能に関するモジュール構成を示すブロック図である。
Next, the voice assistance function executed by the
図3に示すように、本実施の形態のMFP10の操作部30で実行されるプログラムは、各部(画像受信部301、認識領域取得部302、文字判定部303、はみ出し判定部304、第1補正部305、追記判定部306、算出部307、第2補正部308及び認識領域出力部309)を含むモジュール構成となっており、実際のハードウェアとしてはCPU31がROM32またはフラッシュメモリ34等からプログラムを読み出して実行することにより上記各部がRAM33上にロードされ、画像受信部301、認識領域取得部302、文字判定部303、はみ出し判定部304、第1補正部305、追記判定部306、算出部307、第2補正部308及び認識領域出力部309がRAM33上に生成されるようになっている。
As shown in FIG. 3, the program executed by the
画像受信部301は、エンジン部27により実現されるスキャナ機能により読み取られた原稿の画像を、通信路100を介して受信する。
認識領域取得部302は、画像受信部301により受信された画像のうち、文字の認識処理が行われる領域である認識領域に関する情報を、ネットワーク14を介してPC11から取得する。また、認識領域取得部302は、原稿を示す画像を見ながらユーザが手動でMFP10を操作することにより設定した認識領域に関する情報を取得する。
The recognition
認識領域に関する情報が取得できない場合や、認識領域が未設定の場合、認識領域取得部302は、原稿を示す画像から認識領域の抽出及び設定を行ってもよい。例えば、認識領域取得部302は、画像に対して罫線抽出及び枠抽出を行い、抽出した枠を認識領域として設定する。
If information regarding the recognition area cannot be acquired or if the recognition area has not been set, the recognition
ここで、罫線抽出には、例えば、水平、垂直方向の画素の連続性を抽出する手段や、水平、垂直な線を検出するフィルタをかけて抽出する手段を用いることにより実現されてもよい。また、枠抽出には、罫線の交点を見つけ、それらの位置関係から1つ1つの枠位置を抽出する手段を用いることにより実現されてもよい。また、抽出された認識領域は、ユーザが確認しながら追加、削除などの修正を行えるように構成されてもよい。 Here, the ruled line extraction may be realized by, for example, using a means for extracting continuity of pixels in the horizontal and vertical directions, or a means for applying a filter to detect horizontal and vertical lines. Further, frame extraction may be realized by using means for finding intersections of ruled lines and extracting frame positions one by one based on their positional relationship. Furthermore, the extracted recognition area may be configured so that the user can modify it, such as adding or deleting it, while checking it.
なお、認識領域取得部302による認識領域の抽出処理及び設定処理は、上記の手法に限定されず、任意の従来技術を用いて実現されてもよい。
Note that the recognition area extraction process and setting process by the recognition
文字判定部303は、画像内に記載された文字の認識が行われる領域である認識領域に記載された文字が、手書きか活字かを判定する。例えば、文字判定部303は、画像から同じ色の画素の塊を取り出し、隣接する画素の塊を連結することで1文字単位の複数の矩形を抽出する。ここで、各文字の矩形の大きさがほぼ一定である場合、文字判定部303は、これらの文字を活字と判定する。一方で、各文字の矩形の大きさが不均一である場合、文字判定部303は、これらの文字を手書きと判定する。
The
なお、文字判定部303は、他にも抽出した文字の中心位置のばらつきや、文字内で使われている線分の直線性を用いて、画像に記載された文字が手書きか活字かを判定してもよい。また、文字判定部303による文字の判定処理は、上記の手法に限定されず、任意の従来技術を用いて実現されてもよい。
Note that the
はみ出し判定部304は、認識領域に記載された文字が手書きであると判定された場合に、当該文字が認識領域からはみ出しているか否かを判定する。 When the character written in the recognition area is determined to be handwritten, the protrusion determination unit 304 determines whether the character is outside the recognition area.
第1補正部305は、文字判定部303により認識領域に記載された文字が手書きであると判定された場合に、認識領域のサイズを変更する。また、第1補正部305は、はみ出し判定部304により認識領域に記載された文字がはみ出していると判定された場合に、認識領域のサイズを変更する。また、第1補正部305は、認識領域の境界から所定の範囲内に画素データが存在する場合に、認識領域に記載された文字がはみ出していると判定する。
The
追記判定部306は、認識領域に記載された文字が活字であると判定された場合に、当該文字が画像に予め印字された文字であるか、画像に追記された文字であるかを判定する。また、追記判定部306は、認識領域に記載された文字の認識領域内における位置、当該文字の文字色、当該文字のフォント種、並びに、当該文字のフォントサイズのうち少なくともいずれかに基づいて、当該文字が画像に予め印字された文字であるか、画像に追記された文字であるかを判定する。 When a character written in the recognition area is determined to be a printed character, the additional writing determination unit 306 determines whether the character is a character that has been printed in advance on the image or a character that has been added to the image. . Further, the additional writing determination unit 306 performs the following based on at least one of the position of the character written in the recognition area, the color of the character, the font type of the character, and the font size of the character. It is determined whether the character is a character previously printed on the image or a character added to the image.
算出部307は、追記判定部306により、認識領域に記載された文字が、画像に追記された文字であると判定された場合に、認識領域からの当該文字のずれ量を算出する
The
第2補正部308は、文字判定部303により認識領域に記載された文字が活字であると判定された場合に、認識領域の位置を移動させる。また、第2補正部308は、算出部307による算出されたずれ量に応じて、認識領域の位置を移動させる。
The
認識領域出力部309は、第1補正部305による補正結果、並びに、第2補正部308による補正結果を統合した新たな認識領域を画像に対応付け、MFP10において文字認識処理を実行するモジュール等に対し出力する。
The recognition area output unit 309 associates a new recognition area that integrates the correction result by the
次に、図4を用いて、MFP10による画像処理の流れについて説明する。図4は、MFP10による画像処理の流れを示すフローチャートである。図4に示すように、MFP10は、スキャナ機能により原稿を読み取る(ステップS401)。
Next, the flow of image processing by the
続いて、MFP10は、原稿を読み取った画像に設定された認識領域を取得する(ステップS402)。続いて、MFP10は、各認識領域に記載された文字が手書きであるか、活字であるかを判定する(ステップS403)。
Next, the
認識領域に記載された文字が手書きである場合(ステップS404;Yes)、MFP10は、当該認識領域のサイズを変更する(ステップS405)。
If the characters written in the recognition area are handwritten (step S404; Yes), the
認識領域に記載された文字が手書きではない(言い換えると、活字)である場合(ステップS404;No)、MFP10は、当該認識領域の位置を移動させる(ステップS406)。
If the characters written in the recognition area are not handwritten (in other words, printed) (step S404; No), the
続いて、MFP10は、補正した認識領域を統合する(ステップS407)。
Subsequently, the
このような本実施形態によれば、認識領域に記載された文字の種別が活字か手書きか判定したうえで、活字であれば認識領域をシフトし、手書きであれば認識領域を拡張することができるため、認識領域を正しく設定することができる。すなわち、本実施形態によれば、画像に含まれる文字が手書きである場合であっても認識領域を正しく設定することができる。 According to this embodiment, it is possible to determine whether the type of character written in the recognition area is printed or handwritten, and then shift the recognition area if it is printed or expand the recognition area if it is handwritten. Therefore, the recognition area can be set correctly. That is, according to this embodiment, even if the characters included in the image are handwritten, the recognition area can be set correctly.
なお、上記の実施形態では、本発明の画像処理装置を、コピー機能、プリンタ機能、スキャナ機能およびファクシミリ機能のうち少なくとも2つの機能を有する複合機に適用した例を挙げて説明したが、複写機、プリンタ、スキャナ装置、ファクシミリ装置等の画像処理装置であればいずれにも適用することができる。 In the above embodiment, the image processing apparatus of the present invention is applied to a multifunction machine having at least two functions among a copy function, a printer function, a scanner function, and a facsimile function. The present invention can be applied to any image processing device such as a printer, a scanner device, a facsimile device, or the like.
(はみ出し判定部304及び第1補正部305による処理について)
次に、図5~7を用いて、はみ出し判定部304及び第1補正部305による処理の具体例について説明する。図5は、手書きされた文字を含む原稿を示す画像の例を示す図である。図6は、はみ出し判定部304による判定の例を示す図である。図7は、第1補正部305による認識領域の補正の例を示す図である。
(Regarding processing by the protrusion determination unit 304 and first correction unit 305)
Next, a specific example of the processing by the protrusion determination section 304 and the
図5に示すように、原稿には活字で項目名が予め印字(プレ印字)されており、それに対応する内容をユーザが手書きで追記するようなものが多い。例えば、図5(A)のように商品名が書かれていて注文したい個数を手書きで記載するようなものや、図5(B)のように名前、住所、電話番号などを記載するようなものである。 As shown in FIG. 5, in many cases, item names are pre-printed (pre-printed) in type on the manuscript, and the corresponding content is added by hand by the user. For example, as shown in Figure 5 (A), the product name is written and the number of items you want to order is written by hand, or as shown in Figure 5 (B), you write your name, address, phone number, etc. It is something.
上述の認識領域取得部302により罫線と交点の情報を基に認識領域の抽出処理を実行すると、項目名がプレ印字された領域にはユーザによる追記が行われない(すなわち、認識領域ではない)と判定可能であるため、図5(A)の原稿では認識領域500~503、図5(B)の原稿では認識領域504~506がそれぞれ抽出される。プレ印字された原稿に手書きで追記する場合、個々の枠ごとに記載するため、プレ印字された原稿に活字で追記する場合のように認識領域に対してずれ方は一律にならない。一方で、ユーザは枠を見ながら追記するため、活字の場合のように2つの認識領域の中心に位置するように文字が記載されるような大きなずれも起こりづらい。
When the recognition
したがって、はみ出し判定部304は、認識領域の境界周辺の画素を走査し、黒画素が存在した場合には文字のはみ出しがあると判定する。例えば、図6の例において、はみ出し判定部304は、認識領域500内の黒画素が、領域600内において認識領域500の境界を跨ぐように存在しているため、記載された文字がはみ出していると判定する。
Therefore, the protrusion determination unit 304 scans the pixels around the boundary of the recognition area, and determines that there is protrusion of the character if a black pixel is present. For example, in the example of FIG. 6, the protrusion determination unit 304 determines that the black pixels in the
一方で、はみ出し判定部304は、認識領域501内の各黒画素が、認識領域501内にのみ存在しているため、認識領域501内に記載された文字がはみ出していないと判定する。
On the other hand, since each black pixel within the
そして、第1補正部305は、図7に示すように、記載された文字がはみ出していると判定された認識領域500のサイズを変更し、新たな認識領域510とする。例えば、第1補正部305は、文字のはみ出しに対応するため、認識領域500を拡大し、認識領域510とする。なお、拡大率は一律で事前に設定しされてもよく、黒画素の塊を連結して抽出した矩形(すなわち、文字)の大きさを判断してそれに合わせて拡大させてもよい。
Then, as shown in FIG. 7, the
以上のように、第1補正部305は、記載された文字がはみ出している認識領域だけ拡大させることにより、認識領域内に収まっている文字については枠の罫線や隣接枠内に書かれた文字が含まれて認識結果にノイズが混ざるのを防ぎ、はみ出してしまっている文字については認識領域を拡大することで文字を全て認識領域内に収められ認識精度が上がることが期待できる。
As described above, the
なお、第1補正部305は、認識領域内に文字が収まっている場合であっても、より認識率を向上さるため、当該文字の大きさに応じて認識領域を縮小するようにしてもよい。
Note that the
(追記判定部306、算出部307及び第2補正部308による処理について)
次に、図8~11を用いて、追記判定部306、算出部307及び第2補正部308による処理の具体例について説明する。図8は、追記判定部306による判定の例を示す図である。図9は、認識領域からずれて印字された文字列の矩形の抽出の例を示す図である。図10は、算出部307によるずれ量の算出の例を示す図である。図11は、第2補正部308による認識領域の補正の例を示す図である。
(Regarding processing by the additional writing determination unit 306,
Next, a specific example of processing by the additional writing determination unit 306, the
通常、原稿に活字で項目名がプレ印字されており、それに対応する内容をユーザが活字で追記する場合、原稿に重ねて印字しても、PCのデータ上で文字を合わせているため位置、サイズ共にずれることはない。しかし、印字の際の紙の設置位置のずれや、搬送時のエラーが発生すると、図8に示すように、プレ印字された枠内からはみ出して印字されることがある。このように印字された活字のずれは、サイズは変わらずに一律に同じ方向にずれる。 Normally, the item name is pre-printed in type on the original, and when the user adds the corresponding content in type, even if it is printed over the original, the position will be different because the characters are aligned on the PC data. There is no difference in size. However, if the installation position of the paper is misaligned during printing or an error occurs during conveyance, as shown in FIG. 8, printing may occur outside the pre-printed frame. In this way, the printed characters are uniformly shifted in the same direction without changing the size.
図8に示す画像について、上述の認識領域取得部302による認識領域の抽出処理が実行された場合、罫線と交点の情報を基に認識領域が抽出されるため、プレ印字の文字が書かれた領域703~705も、追記された文字の領域700~702もどちらも認識領域として抽出される。また、プレ印字された文字は枠と一緒に印刷されており、枠に対して位置ずれがないため、この領域も含めて印字ずれを判定してしまった場合、印字ずれ量の算出を誤る可能性がある。
When the above-mentioned recognition
そこで、追記判定部306は、各領域内の文字がプレ印字なのか、追記された文字なのか判定する。プレ印字の文字が書かれた領域の特徴としては、項目名が記載されているため、枠の上端、もしくは左端に文字が位置している。また、プレ印字の文字は、罫線と一緒に印刷されているため、同じ色で再現されている。さらに、プレ印字の文字と追記された文字を比較した場合、領域内において異なる位置に印字されている場合や、異なる文字の文字色、フォント種、フォントサイズが使われている場合が多くある。追記判定部306は、これらの情報を用いて、領域700~702が認識領域であり、領域703~705がプレ印字された領域(すなわち、認識領域ではない)と判定する。
Therefore, the additional writing determination unit 306 determines whether the characters in each area are pre-printed characters or additionally written characters. A characteristic of the area where pre-printed characters are written is that the characters are located at the top or left end of the frame because the item name is written therein. Furthermore, since the pre-printed characters are printed together with the ruled lines, they are reproduced in the same color. Furthermore, when comparing pre-printed characters and additionally written characters, there are many cases in which they are printed in different positions within the area, or in which characters use different character colors, font types, and font sizes. Using this information, the additional writing determining unit 306 determines that
図9(A)に示すように、認識領域700~702が判定された後、算出部307は、図9(B)のように、認識領域700~702を切り出し、各領域内の黒画素を抽出する。続いて、算出部307は、図9(C)のように、図9(B)で抽出した黒画素と連結している黒画素を抽出する。続いて、算出部307は、図9(D)のように、認識領域700から抽出された黒画素の塊を文字列矩形710、認識領域701から抽出された黒画素の塊を文字列矩形711、認識領域702から抽出された黒画素の塊を文字列矩形712として特定する。なお、認識領域702内には文字列矩形710に対応する「0」、文字列矩形711に対応する「10」も含まれているが、他の認識領域から検出済みの文字列矩形について、算出部307は無視するものとする。
As shown in FIG. 9(A), after the
続いて、算出部307は、図10に示すように、抽出した文字列矩形710~712のそれぞれから、認識領域700~702それぞれへのベクトルを算出する。ここで、ベクトルの始点は、文字列矩形710~712それぞれの左端、中央、右端のいずれかを用いるものとする。また、ベクトルの終点は、認識領域700~702それぞれの左端、中央、右端のいずれかを用いるものとする。
Subsequently, the
文字列矩形710の場合、図10(A)に示す3本のベクトルが算出される。また、文字列矩形711の場合、図10(B)に示す3本のベクトルが算出される。また、文字列矩形712の場合、図10(C)に示す3本のベクトルが算出される。図10(A)~(C)には、いずれもベクトル800が含まれているため、算出部307は、文字列矩形710~712(言い換えると、追記された文字)のずれ量がベクトル800の逆方向のベクトルと算出する。このように、算出部307は、各文字列矩形から認識領域へのベクトルの最頻値を求めることにより、追記された文字のずれ量を算出できる。
In the case of the
そして、第2補正部308は、図11に示すように、上記のように算出されたずれ量に基づき、認識領域700~702をそれぞれ移動させ、新たな認識領域720~722とする。
Then, as shown in FIG. 11, the
以上の処理を行うことにより、文字が認識領域内に収まり、正しく認識されることが期待できる。なお、特許文献1に開示されているように、罫線の除去と文字の補完とを実施すれば、さらに認識精度を向上させることが可能となる
By performing the above processing, it is expected that the characters will fit within the recognition area and be recognized correctly. Note that, as disclosed in
10 MFP
20 本体
30 操作部
301 画像受信部
302 認識領域取得部
303 文字判定部
304 はみ出し判定部
305 第1補正部
306 追記判定部
307 算出部
308 第2補正部
309 認識領域出力部
10 MFP
20
Claims (7)
前記文字判定部により前記認識領域に記載された文字が手書きであると判定された場合に、前記認識領域のサイズを変更する第1補正部と、
前記文字判定部により前記認識領域に記載された文字が活字であると判定された場合に、前記認識領域の位置を移動させる第2補正部と
を備えたことを特徴とする画像処理装置。 a character determination unit that determines whether characters written in a recognition area, which is an area where characters written in the image are recognized, are handwritten or printed;
a first correction unit that changes the size of the recognition area when the character determination unit determines that the character written in the recognition area is handwritten;
An image processing device comprising: a second correction unit that moves the position of the recognition area when the character determination unit determines that the character written in the recognition area is a printed character.
をさらに備え、
前記第1補正部は、
前記はみ出し判定部により前記認識領域に記載された文字がはみ出していると判定された場合に、前記認識領域のサイズを変更する
ことを特徴とする請求項1に記載の画像処理装置。 Further comprising: an overflow determination unit that determines whether or not the character protrudes from the recognition area when the character written in the recognition area is determined to be handwritten;
The first correction section includes:
The image processing apparatus according to claim 1, wherein the size of the recognition area is changed when the protrusion determination unit determines that the characters written in the recognition area protrude.
前記認識領域の境界から所定の範囲内に画素データが存在する場合に、前記認識領域に記載された文字がはみ出していると判定する
ことを特徴とする請求項2に記載の画像処理装置。 The protrusion determination section is
The image processing apparatus according to claim 2, wherein when pixel data exists within a predetermined range from a boundary of the recognition area, it is determined that the character written in the recognition area protrudes.
前記追記判定部により、前記認識領域に記載された文字が、前記画像に追記された文字であると判定された場合に、前記認識領域からの当該文字のずれ量を算出する算出部と
をさらに備え、
前記第2補正部は、
前記算出部による算出されたずれ量に応じて、前記認識領域の位置を移動させる
ことを特徴とする請求項1から3のうちいずれか1つに記載の画像処理装置。 an additional writing determination unit that determines, when it is determined that the characters written in the recognition area are printed characters, whether the characters are characters that have been printed in advance on the image or characters that have been added to the image; and,
a calculation unit that calculates a deviation amount of the character from the recognition area when the addition determination unit determines that the character written in the recognition area is a character added to the image; Prepare,
The second correction section includes:
The image processing device according to any one of claims 1 to 3, wherein the position of the recognition area is moved according to the amount of deviation calculated by the calculation unit.
前記認識領域に記載された文字の前記認識領域内における位置、当該文字の文字色、当該文字のフォント種、並びに、当該文字のフォントサイズのうち少なくともいずれかに基づいて、当該文字が前記画像に予め印字された文字であるか、前記画像に追記された文字であるかを判定する
ことを特徴とする請求項4に記載の画像処理装置。 The additional writing determination unit includes:
The character written in the recognition area is displayed in the image based on at least one of the position of the character in the recognition area, the color of the character, the font type of the character, and the font size of the character. The image processing apparatus according to claim 4, wherein the image processing apparatus determines whether the character is a character printed in advance or a character added to the image.
画像内に記載された文字の認識が行われる領域である認識領域に記載された文字が、手書きか活字かを判定する文字判定工程と、
前記文字判定工程により前記認識領域に記載された文字が手書きであると判定された場合に、前記認識領域のサイズを変更する第1補正工程と、
前記文字判定工程により前記認識領域に記載された文字が活字であると判定された場合に、前記認識領域の位置を移動させる第2補正工程と
を含むことを特徴とする画像処理方法。 An image processing method executed by an image processing device, the method comprising:
a character determination step of determining whether the characters written in the recognition area, which is an area where characters written in the image are recognized, are handwritten or printed;
a first correction step of changing the size of the recognition area when the character written in the recognition area is determined to be handwritten in the character determination step;
An image processing method comprising: a second correction step of moving the position of the recognition region when the character written in the recognition region is determined to be a printed character in the character determination step.
前記文字判定手順により前記認識領域に記載された文字が手書きであると判定された場合に、前記認識領域のサイズを変更する第1補正手順と、
前記文字判定手順により前記認識領域に記載された文字が活字であると判定された場合に、前記認識領域の位置を移動させる第2補正手順と
を画像処理装置に実行させることを特徴とする画像処理プログラム。 a character determination procedure for determining whether characters written in a recognition area, which is an area where characters written in the image are recognized, are handwritten or printed;
a first correction procedure of changing the size of the recognition area when the character written in the recognition area is determined to be handwritten by the character determination procedure;
and a second correction procedure of moving the position of the recognition area when the character written in the recognition area is determined to be printed by the character determination process. Processing program.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2022042281A JP2023136551A (en) | 2022-03-17 | 2022-03-17 | Image processing device, image processing method and image processing program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2022042281A JP2023136551A (en) | 2022-03-17 | 2022-03-17 | Image processing device, image processing method and image processing program |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2023136551A true JP2023136551A (en) | 2023-09-29 |
Family
ID=88144972
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2022042281A Pending JP2023136551A (en) | 2022-03-17 | 2022-03-17 | Image processing device, image processing method and image processing program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2023136551A (en) |
-
2022
- 2022-03-17 JP JP2022042281A patent/JP2023136551A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6891073B2 (en) | A device for setting a file name, etc. on a scanned image, its control method, and a program. | |
US10652409B2 (en) | Apparatus for setting information relating to scanned image, method and storage medium | |
US10929657B2 (en) | Apparatus, method, and storage medium for setting information related to scanned image | |
US11386046B2 (en) | Apparatus for setting file name for scan image, method of controlling same, and storage medium | |
US8131081B2 (en) | Image processing apparatus, and computer program product | |
US8285078B2 (en) | Image processing system | |
US20070139707A1 (en) | User interface device, image displaying method, and computer program product | |
KR100788444B1 (en) | Log data recording device and log data recording method | |
US20100322520A1 (en) | Image-reading device | |
US11341733B2 (en) | Method and system for training and using a neural network for image-processing | |
US11245803B2 (en) | Information processing apparatus and non-transitory computer readable medium storing information processing program | |
US10853010B2 (en) | Image processing apparatus, image processing method, and storage medium | |
US20070057152A1 (en) | Image forming apparatus, image processing apparatus, image output apparatus, portable terminal, image processing system, image forming method, image processing method, image output method, image forming program, image processing program, and image output program | |
US9245318B2 (en) | Methods and systems for automated orientation detection and correction | |
US11436733B2 (en) | Image processing apparatus, image processing method and storage medium | |
US20180260363A1 (en) | Information processing apparatus and non-transitory computer readable medium storing program | |
US10645256B2 (en) | Image forming apparatus and non-transitory computer-readable storage medium suitable for extracting areas in images specified by handwritten marker by line marker such as highlighter pen or the like, and electronic marker by digital pen | |
US11233911B2 (en) | Image processing apparatus and non-transitory computer readable medium for image processing | |
JP2023136551A (en) | Image processing device, image processing method and image processing program | |
US11328425B2 (en) | Image processing apparatus and non-transitory computer readable medium | |
JP6983687B2 (en) | Devices, methods, and programs for setting information related to scanned image data. | |
JP2020145632A (en) | Image processing apparatus, image processing system, and program | |
JP2005269095A (en) | Image processing method and image processor | |
JP2007011528A (en) | Method for searching position of recognition target item in ocr processing | |
JP2008160339A (en) | Image forming apparatus |