JP2010211699A - Image processor and image processing program - Google Patents

Image processor and image processing program Download PDF

Info

Publication number
JP2010211699A
JP2010211699A JP2009059460A JP2009059460A JP2010211699A JP 2010211699 A JP2010211699 A JP 2010211699A JP 2009059460 A JP2009059460 A JP 2009059460A JP 2009059460 A JP2009059460 A JP 2009059460A JP 2010211699 A JP2010211699 A JP 2010211699A
Authority
JP
Japan
Prior art keywords
image
point sequence
conversion
rotation angle
module
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
Application number
JP2009059460A
Other languages
Japanese (ja)
Inventor
Kagenori Nagao
景則 長尾
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 JP2009059460A priority Critical patent/JP2010211699A/en
Publication of JP2010211699A publication Critical patent/JP2010211699A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Image Analysis (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide an image processor for detecting a rotation angle, misalignment and a scaling factor for an image including a ruled line as a component. <P>SOLUTION: A first conversion means uses a first voting function to convert the image including the ruled line as the component. A rotation angle detection means detects the rotation angle of the image on the basis of the result by the first conversion means. A dot sequence generation means generates the conversion result by the first conversion means as a first dot sequence and a second dot sequence on the basis of the rotation angle. A dot sequence association means associates the first dot sequence or the second dot sequence for a first image as an object with the first dot sequence or the second dot sequence for a second image as a reference. A second conversion means uses a second voting function to convert a line determined by the association of the dot sequences by the dot sequence association means. A detection means detects the amount of misalignment and a scaling factor of the first image with respect to the second image on the basis of the result by the second conversion means. <P>COPYRIGHT: (C)2010,JPO&INPIT

Description

本発明は、画像処理装置及び画像処理プログラムに関する。   The present invention relates to an image processing apparatus and an image processing program.

帳票等の罫線を構成要素とした文書画像を対象として、その罫線を抽出して帳票等の認識、検索等を行う技術がある。その文書画像には、拡大縮小、回転、位置ずれが生じている場合があり、これらに対応することが求められている。   There is a technique for extracting a ruled line and recognizing and searching a form or the like for a document image having ruled lines such as a form as a constituent element. The document image may be enlarged / reduced, rotated, or misaligned, and it is required to deal with these.

これに関連する技術として、例えば、特許文献1には、参照画像と、該参照画像に対応する画像を回転及び又は拡大縮小した画像をその一部に含む入力画像とを照合して、前記入力画像の参照画像に対応する部分の拡大率、回転角及び平行移動量を出力する画像照合方法において、前記参照画像の各エッジ点から所定の基準点へのベクトルをエッジ方向ごとに収納したRテーブルを作成し、前記入力画像のエッジ点を前記参照画像のエッジ点とした場合の基準点の位置を前記Rテーブルに基づいて低分解能化したパラメータ空間上に投票して一又は複数の候補領域を求め、該求めた候補領域が複数存在する場合には、各候補領域及び参照画像をハフ変換してθ−ρ平面をそれぞれ生成し、該生成したθ−ρ平面をフーリエ変換してθ−q平面をそれぞれ生成し、該生成したθ−q平面レベルで回転角及び拡大率をそれぞれ算出し、該算出した回転角及び拡大率で補正したθ−ρ平面レベルで平行移動量をそれぞれ算出し、前記候補領域の中で参照画像との照合度の最も大きな候補領域に対応して算出した拡大率、回転角及び平行移動量を出力することを特徴とする画像照合方法が開示されている。   As a technique related to this, for example, in Patent Document 1, a reference image is collated with an input image that includes an image obtained by rotating and enlarging / reducing an image corresponding to the reference image, and the input is performed. An R table that stores vectors from each edge point of a reference image to a predetermined reference point for each edge direction in an image matching method for outputting an enlargement ratio, a rotation angle, and a translation amount of a portion corresponding to a reference image of an image And voting the position of the reference point when the edge point of the input image is the edge point of the reference image on the parameter space whose resolution has been reduced based on the R table, to determine one or a plurality of candidate regions. In the case where there are a plurality of obtained candidate areas, a H-transform is performed on each candidate area and the reference image to generate a θ-ρ plane, and the generated θ-ρ plane is Fourier-transformed to obtain θ-q Flat Respectively, calculate the rotation angle and the enlargement ratio at the generated θ-q plane level, respectively, calculate the parallel movement amount at the θ-ρ plane level corrected by the calculated rotation angle and enlargement ratio, An image matching method is disclosed that outputs an enlargement ratio, a rotation angle, and a translation amount calculated corresponding to a candidate area having the largest matching degree with a reference image among the candidate areas.

また、例えば、特許文献2には、検査印刷物の位置がラフに入力されても、人が位置合わせ(見当合わせ)しなくても印刷物の検査が自動的に行えるようにすることを課題とし、比較基準となる見本画像を基準画像メモリに記憶し、この見本画像から位置合わせ用絵柄を選択し2値化、重心位置座標を算出して位置合わせ用絵柄をモデル画像メモリに記憶し、次に、検査印刷物画像を検査画像メモリに記憶させ、前記モデル画像と一致する位置合わせ用絵柄を相関係数法を用いて検索し、重心位置座標を算出し、この処理を繰り返し、他の位置合わせ用絵柄の重心位置座標を算出し、上記2点の重心位置座標に基づいて検査画像メモリに対してアフィン変換を行い、画素単位で見本画像と検査印刷物画像を比較して両者の相違点を検索することが開示されている。   In addition, for example, Patent Document 2 has an object of automatically inspecting a printed matter without a person performing alignment (registration) even if the position of the inspection printed matter is roughly input, A sample image serving as a comparison reference is stored in a reference image memory, a registration pattern is selected from the sample image, binarized, a barycentric position coordinate is calculated, and the registration pattern is stored in a model image memory. The inspection print image is stored in the inspection image memory, the image for alignment that matches the model image is searched using the correlation coefficient method, the center of gravity position coordinates are calculated, this process is repeated, and other alignment images are used. The center-of-gravity position coordinates of the pattern are calculated, the affine transformation is performed on the inspection image memory based on the above-mentioned two center-of-gravity position coordinates, and the difference between the sample image and the inspection printed matter image is searched for in pixel units. This There has been disclosed.

また、例えば、非特許文献1には、帳票の識別には罫線情報の利用が有効であり、ファックス送信によって劣化した罫線検出に対して有効に働くハフ(Hough)変換を利用し、一般に、ハフ変換には投票量に起因する演算量の多さに問題があるが、帳票の罫線は縦横の2種類であることを利用することによって演算量の削減を可能とし、さらにファックス送信時に生じる「回転」「平衡移動」といった変形が、ハフ空間上のシフトとして簡便に表現される数学的性質に着目し、これを変形量の修正に活用することによって、全ての処理をハフ空間で行うことを可能としたことが開示されている。   Further, for example, in Non-Patent Document 1, the use of ruled line information is effective for identifying a form, and Hough conversion that works effectively for detecting a ruled line degraded by fax transmission is used. There is a problem with the large amount of computation due to the amount of votes in conversion, but it is possible to reduce the amount of computation by utilizing the fact that there are two types of ruled lines in the form, and the rotation that occurs when sending a fax Focusing on the mathematical property that deformation such as “balance movement” is simply expressed as a shift in the Hough space, and using this to modify the deformation amount, all processing can be performed in the Hough space. It is disclosed that.

特許第3693147号公報Japanese Patent No. 3693147 特開平10−269357号公報Japanese Patent Laid-Open No. 10-269357

大寺亮、堀内隆彦、「Hough空間を利用したファックス帳票の位置合わせと識別手法」、画像電子学会、2005年5月、第34巻、第3号、p.202−209Ryo Ohtera, Takahiko Horiuchi, “Position and identification method of fax forms using Hough space”, The Institute of Image Electronics Engineers of Japan, May 2005, Vol. 34, No. 3, p. 202-209

本発明は、罫線を構成要素として含む画像に対して、回転角、位置ずれ、拡縮率を検出するようにした画像処理装置及び画像処理プログラムを提供することを目的としている。   An object of the present invention is to provide an image processing apparatus and an image processing program that detect a rotation angle, a positional shift, and an enlargement / reduction ratio for an image including ruled lines as components.

かかる目的を達成するための本発明の要旨とするところは、次の各項の発明に存する。
請求項1の発明は、罫線を構成要素として含む画像に対して第1の投票関数による変換を行う第1の変換手段と、前記第1の変換手段による変換結果に基づいて、前記画像の回転角を検出する回転角検出手段と、前記回転角検出手段によって検出された回転角に基づいて、前記第1の変換手段による変換結果を、第1の点列と第2の点列として生成する点列生成手段と、対象とする第1の画像に対する前記第1の点列又は前記第2の点列と、参照とする第2の画像に対する前記第1の点列又は前記第2の点列を対応付ける点列対応付手段と、前記点列対応付手段による点列の対応付けによって定まる線に対して第2の投票関数による変換を行う第2の変換手段と、前記第2の変換手段による変換結果に基づいて、前記第2の画像に対する前記第1の画像の位置ずれ量及び拡縮率を検出する検出手段を具備することを特徴とする画像処理装置である。
The gist of the present invention for achieving the object lies in the inventions of the following items.
According to a first aspect of the present invention, there is provided a first conversion unit that performs conversion by a first voting function on an image including ruled lines as components, and rotation of the image based on a conversion result by the first conversion unit. Based on the rotation angle detection means for detecting the angle and the rotation angle detected by the rotation angle detection means, the conversion result by the first conversion means is generated as a first point sequence and a second point sequence. Point sequence generation means, the first point sequence or the second point sequence for the target first image, and the first point sequence or the second point sequence for the second image to be referenced A point sequence association means for associating, a second conversion means for performing conversion by a second voting function for a line determined by the point sequence association by the point sequence association means, and the second conversion means Based on the conversion result, the second image An image processing apparatus characterized by comprising detecting means for detecting a positional deviation amount and the scaling factor of the first image.

請求項2の発明は、前記第2の変換手段による変換結果と予め定められた値とを比較して、前記検出手段による検出結果が成功であるか否かを判断する判断手段をさらに具備することを特徴とする請求項1に記載の画像処理装置である。   The invention according to claim 2 further includes a determination unit that compares the conversion result by the second conversion unit with a predetermined value to determine whether or not the detection result by the detection unit is successful. The image processing apparatus according to claim 1.

請求項3の発明は、前記判断手段によって成功ではないと判断された場合は、前記点列対応付手段による点列の対応付けを変更する対応付変更手段をさらに具備し、前記第2の変換手段は、前記対応付変更手段によって変更された点列の対応付けによって定まる線に対して第2の投票関数による変換を行うことを特徴とする請求項2に記載の画像処理装置である。   The invention according to claim 3 further comprises correspondence changing means for changing the correspondence of the point sequence by the point sequence correspondence means when the judgment means determines that the second conversion is not successful. The image processing apparatus according to claim 2, wherein the means performs conversion by a second voting function on a line determined by the association of the point sequences changed by the association changing unit.

請求項4の発明は、前記判断手段は成功と判断した場合、前記参照とする画像は、前記対象とする画像に類似していると判断することを特徴とする請求項2又は3に記載の画像処理装置である。   The invention according to claim 4 is characterized in that, when the determination means determines success, the image to be referred to is determined to be similar to the target image. An image processing apparatus.

請求項5の発明は、前記判断手段は成功と判断した場合、前記参照とする画像は、前記対象とする画像の検索結果であると判断することを特徴とする請求項2又は3に記載の画像処理装置である。   The invention according to claim 5 is characterized in that, when the judging means judges success, it judges that the image to be referred to is a search result of the target image. An image processing apparatus.

請求項6の発明は、コンピュータを、罫線を構成要素として含む画像に対して第1の投票関数による変換を行う第1の変換手段と、前記第1の変換手段による変換結果に基づいて、前記画像の回転角を検出する回転角検出手段と、前記回転角検出手段によって検出された回転角に基づいて、前記第1の変換手段による変換結果を、第1の点列と第2の点列として生成する点列生成手段と、対象とする第1の画像に対する前記第1の点列又は前記第2の点列と、参照とする第2の画像に対する前記第1の点列又は前記第2の点列を対応付ける点列対応付手段と、前記点列対応付手段による点列の対応付けによって定まる線に対して第2の投票関数による変換を行う第2の変換手段と、前記第2の変換手段による変換結果に基づいて、前記第2の画像に対する前記第1の画像の位置ずれ量及び拡縮率を検出する検出手段として機能させることを特徴とする画像処理プログラムである。   According to a sixth aspect of the present invention, there is provided a computer based on a first conversion unit that performs conversion using a first voting function on an image including a ruled line as a component, and based on a conversion result by the first conversion unit. Based on the rotation angle detection means for detecting the rotation angle of the image, and the rotation angle detected by the rotation angle detection means, the conversion result by the first conversion means is converted into the first point sequence and the second point sequence. Point sequence generating means for generating the first point sequence or the second point sequence for the target first image, and the first point sequence or the second point for the second image to be referred to Point sequence associating means for associating the point sequence, second conversion means for performing conversion by a second voting function on a line determined by the correspondence of the point sequence by the point sequence associating means, and the second Based on the conversion result by the conversion means, the second An image processing program for causing to function as detection means for detecting the position displacement amount and the scaling factor of the first image with respect to the image.

請求項1の画像処理装置によれば、罫線を構成要素として含む画像に対して、回転角、位置ずれ、拡縮率を検出することができる。   According to the image processing apparatus of the first aspect, it is possible to detect a rotation angle, a positional deviation, and an enlargement / reduction ratio for an image including a ruled line as a constituent element.

請求項2の画像処理装置によれば、検出した回転角、位置ずれ、拡縮率が採用してもよいものであるか否かの判断をすることができる。   According to the image processing apparatus of the second aspect, it is possible to determine whether or not the detected rotation angle, positional deviation, and enlargement / reduction ratio may be employed.

請求項3の画像処理装置によれば、本構成を有していない場合に比較して、90度以上の回転にも対応することができる。   According to the image processing apparatus of the third aspect, it is possible to cope with a rotation of 90 degrees or more as compared with the case where the present configuration is not provided.

請求項4の画像処理装置によれば、罫線を構成要素として含む画像の認識処理を、参照とする画像との位置ずれ、拡縮率の検出によって行うことができる。   According to the image processing apparatus of the fourth aspect, recognition processing of an image including a ruled line as a constituent element can be performed by detecting a positional deviation from a reference image and a scaling ratio.

請求項5の画像処理装置によれば、罫線を構成要素として含む画像の検索処理を、参照とする画像との位置ずれ、拡縮率の検出によって行うことができる。   According to the image processing apparatus of the fifth aspect, the search processing of the image including the ruled line as a constituent element can be performed by detecting the positional deviation from the reference image and the enlargement / reduction ratio.

請求項6の画像処理プログラムによれば、罫線を構成要素として含む画像に対して、回転角、位置ずれ、拡縮率を検出することができる。   According to the image processing program of the sixth aspect, it is possible to detect a rotation angle, a positional deviation, and an enlargement / reduction ratio for an image including a ruled line as a constituent element.

本実施の形態の構成例についての概念的なモジュール構成図である。It is a conceptual module block diagram about the structural example of this Embodiment. 本実施の形態による参照画像に対する処理例を示すフローチャートである。It is a flowchart which shows the process example with respect to the reference image by this Embodiment. 本実施の形態による対象画像に対する処理例を示すフローチャートである。It is a flowchart which shows the process example with respect to the target image by this Embodiment. 本実施の形態の拡縮率・位置ずれ量検出モジュールによる対象画像の参照画像に対する拡縮率・位置ずれ量の検出例を示すフローチャートである。It is a flowchart which shows the example of a detection of the expansion / contraction rate and the position shift amount with respect to the reference image of the object image by the expansion / contraction rate / position shift amount detection module of this Embodiment. ハフ変換の処理例を示す説明図である。It is explanatory drawing which shows the process example of Hough conversion. 参照画像に対するハフ変換の処理例を示す説明図である。It is explanatory drawing which shows the process example of the Hough transformation with respect to a reference image. 対象画像に対するハフ変換の処理例を示す説明図である。It is explanatory drawing which shows the process example of the Hough transformation with respect to a target image. 対象画像の回転角の検出処理例を示す説明図である。It is explanatory drawing which shows the example of a detection process of the rotation angle of a target image. ハフ表現点列の生成処理例を示す説明図である。It is explanatory drawing which shows the production | generation process example of a Hough expression point sequence. ハフ表現点列の生成処理例を示す説明図である。It is explanatory drawing which shows the production | generation process example of a Hough expression point sequence. ハフ表現点列の対応付け処理例を示す説明図である。It is explanatory drawing which shows the matching process example of a Hough expression point sequence. 第2のハフ変換の処理例を示す説明図である。It is explanatory drawing which shows the process example of a 2nd Hough conversion. 参照帳票の画像のハフ表現点列の例を示す説明図である。It is explanatory drawing which shows the example of the Hough expression point sequence of the image of a reference form. 対象帳票の画像のハフ表現点列の例を示す説明図である。It is explanatory drawing which shows the example of the Hough expression point sequence of the image of a target form. ハフ表現点列の対応付けの組み合わせ例を示す説明図である。It is explanatory drawing which shows the example of a combination of matching of a Hough expression point sequence. 本実施の形態を実現するコンピュータのハードウェア構成例を示すブロック図である。It is a block diagram which shows the hardware structural example of the computer which implement | achieves this Embodiment.

以下、図面に基づき本発明を実現するにあたっての好適な一実施の形態の例を説明する。
図1は、本実施の形態の構成例についての概念的なモジュール構成図を示している。
なお、モジュールとは、一般的に論理的に分離可能なソフトウェア(コンピュータ・プログラム)、ハードウェア等の部品を指す。したがって、本実施の形態におけるモジュールはコンピュータ・プログラムにおけるモジュールのことだけでなく、ハードウェア構成におけるモジュールも指す。それゆえ、本実施の形態は、コンピュータ・プログラム、システム及び方法の説明をも兼ねている。ただし、説明の都合上、「記憶する」、「記憶させる」、これらと同等の文言を用いるが、これらの文言は、実施の形態がコンピュータ・プログラムの場合は、記憶装置に記憶させる、又は記憶装置に記憶させるように制御するの意である。また、モジュールは機能にほぼ一対一に対応しているが、実装においては、1モジュールを1プログラムで構成してもよいし、複数モジュールを1プログラムで構成してもよく、逆に1モジュールを複数プログラムで構成してもよい。また、複数モジュールは1コンピュータによって実行されてもよいし、分散又は並列環境におけるコンピュータによって1モジュールが複数コンピュータで実行されてもよい。なお、1つのモジュールに他のモジュールが含まれていてもよい。また、以下、「接続」とは物理的な接続の他、論理的な接続(データの授受、指示、データ間の参照関係等)の場合にも用いる。
また、システム又は装置とは、複数のコンピュータ、ハードウェア、装置等がネットワーク(一対一対応の通信接続を含む)等の通信手段で接続されて構成されるほか、1つのコンピュータ、ハードウェア、装置等によって実現される場合も含まれる。「装置」と「システム」とは、互いに同義の用語として用いる。「予め定められた」とは、対象としている処理の前に定まっていることをいい、本実施の形態による処理が始まる前はもちろんのこと、本実施の形態による処理が始まった後であっても、対象としている処理の前であれば、そのときの状況・状態に応じて、又はそれまでの状況・状態に応じて定まることの意を含めて用いる。
Hereinafter, an example of a preferred embodiment for realizing the present invention will be described with reference to the drawings.
FIG. 1 shows a conceptual module configuration diagram of a configuration example of the present embodiment.
The module generally refers to components such as software (computer program) and hardware that can be logically separated. Therefore, the module in the present embodiment indicates not only a module in a computer program but also a module in a hardware configuration. Therefore, the present embodiment also serves as an explanation of a computer program, a system, and a method. However, for the sake of explanation, the words “store”, “store”, and equivalents thereof are used. However, when the embodiment is a computer program, these words are stored in a storage device or stored in memory. It is the control to be stored in the device. In addition, the modules correspond almost one-to-one with the functions. However, in mounting, one module may be composed of one program, or a plurality of modules may be composed of one program. A plurality of programs may be used. The plurality of modules may be executed by one computer, or one module may be executed by a plurality of computers in a distributed or parallel environment. Note that one module may include other modules. Hereinafter, “connection” is used not only for physical connection but also for logical connection (data exchange, instruction, reference relationship between data, etc.).
In addition, the system or device is configured by connecting a plurality of computers, hardware, devices, and the like by communication means such as a network (including one-to-one correspondence communication connection), etc., and one computer, hardware, device. The case where it implement | achieves by etc. is included. “Apparatus” and “system” are used as synonymous terms. “Predetermined” means that the process is determined before the target process, and not only before the process according to this embodiment starts but also after the process according to this embodiment starts. In addition, if it is before the target processing, it is used in accordance with the situation / state at that time or with the intention to be decided according to the situation / state up to that point.

本実施の形態である画像処理装置は、罫線を構成要素として含む画像からその罫線を抽出して、参照とする画像と比較した場合の回転角、位置ずれ量、拡縮率を検出するものであって、図1に示すように、対象画像受付モジュール110A、参照画像受付モジュール110B、ハフ変換モジュール120A、ハフ変換モジュール120B、回転角検出モジュール130、ハフ表現点列生成モジュール140、拡縮率・位置ずれ量検出モジュール150、出力モジュール170を有している。   The image processing apparatus according to the present embodiment extracts a ruled line from an image including a ruled line as a component, and detects a rotation angle, a positional deviation amount, and a scaling ratio when compared with a reference image. As shown in FIG. 1, the target image reception module 110A, the reference image reception module 110B, the Hough conversion module 120A, the Hough conversion module 120B, the rotation angle detection module 130, the Hough expression point sequence generation module 140, the enlargement / reduction ratio / displacement A quantity detection module 150 and an output module 170 are provided.

対象画像受付モジュール110Aは、ハフ変換モジュール120Aと接続されている。罫線を構成要素として含む画像を受け付けて、その画像を対象画像としてハフ変換モジュール120Aへ渡す。画像を受け付けるとは、例えば、スキャナ、カメラ等で画像を読み込むこと、ファックス等で通信回線を介して外部機器から画像を受信すること、CCD(Charge−Coupled Device)等で映像を撮影すること、ハードディスク(コンピュータに内蔵されているものの他に、ネットワークを介して接続されているもの等を含む)等に記憶されている画像を読み出すこと等が含まれる。受け付ける画像は、2値画像、多値画像(カラー画像を含む)であってもよく、多値画像の場合は2値化処理を行って2値画像に変換してもよい。また、その画像は、1枚であってもよいし、複数枚であってもよい。画像の内容としては、例えば、帳票等の罫線を構成要素とするものが含まれていれば、ビジネスに用いられる文書、広告宣伝用のパンフレット等であってもよい。以下、帳票の場合を主に例示して説明する。また、対象画像内の帳票は、回転、拡大縮小、位置ずれ(いわゆるアフィン変換による変形)があってもよいし、罫線以外の文字等が含まれていてもよいし、罫線の一部が消去されているようなものであってもよい。   The target image reception module 110A is connected to the Hough conversion module 120A. An image including a ruled line as a component is received, and the image is transferred to the Hough conversion module 120A as a target image. Accepting an image means, for example, reading an image with a scanner, a camera, etc., receiving an image from an external device via a communication line by fax, taking a video with a CCD (Charge-Coupled Device), etc. This includes reading out an image stored in a hard disk (including those connected to the computer in addition to those built in the computer). The received image may be a binary image or a multi-value image (including a color image). In the case of a multi-value image, the image may be converted into a binary image by performing a binarization process. Further, the image may be a single image or a plurality of images. The content of the image may be, for example, a document used for business, an advertisement pamphlet, or the like as long as it includes a ruled line such as a form. Hereinafter, a case of a form will be mainly described as an example. In addition, the form in the target image may be rotated, enlarged / reduced, misaligned (so-called affine transformation), may contain characters other than ruled lines, etc., and part of the ruled lines may be erased. It may be like that.

ハフ変換モジュール120Aは、対象画像受付モジュール110A、回転角検出モジュール130と接続されている。対象画像受付モジュール110Aから対象画像を受け取り、その対象画像に対して第1の投票関数による変換を行う。第1の投票関数としてハフ変換を例示する。このハフ変換の結果を回転角検出モジュール130に渡す。
図5を用いてハフ変換について説明する。図5は、ハフ変換の処理例を示す説明図である。図5(a)の例に示す点(x1,y1)と点(x2,y2)を通る直線を検出する例を説明する。
ハフ変換とは、画像空間(x−y平面)からハフ空間(ρ−θ平面)への変換をいう。具体的には、そのρ−θ平面(図5(b)の例を参照)への投票であり、そのρとθから定まるx−y平面における直線を検出することができる。図5(a)の例に示すように、ρとは、原点から直線までの距離(原点から直線へ垂線を引いたときのその垂線の距離)であり、θとは、直線からの垂線と水平線(X軸)とがなす角の角度である。点(x1,y1)を通る直線は、
ρ=x1cosθ+y1sinθ (式1)
によって表される。そして、点(x2,y2)を通る直線は、
ρ=x2cosθ+y2sinθ (式2)
によって表される。この2つの式をρ−θ平面にプロット(投票)すると、(ρa,θa)で交わる。つまり、この交点に2つ投票されたことになる。そして、この(ρa,θa)が点(x1,y1)と点(x2,y2)を通る直線を示している。
The Hough conversion module 120A is connected to the target image reception module 110A and the rotation angle detection module 130. The target image is received from the target image receiving module 110A, and the target image is converted by the first voting function. The Hough transform is exemplified as the first voting function. The result of the Hough transform is passed to the rotation angle detection module 130.
The Hough transform will be described with reference to FIG. FIG. 5 is an explanatory diagram illustrating an example of a Hough transform process. An example of detecting a straight line passing through the point (x1, y1) and the point (x2, y2) shown in the example of FIG.
Hough transformation refers to transformation from image space (xy plane) to Hough space (ρ-θ plane). Specifically, it is a vote for the ρ-θ plane (see the example in FIG. 5B), and a straight line in the xy plane determined from the ρ and θ can be detected. As shown in the example of FIG. 5A, ρ is the distance from the origin to the straight line (the distance of the perpendicular when the perpendicular is drawn from the origin to the straight line), and θ is the perpendicular from the straight line. The angle formed by the horizontal line (X axis). The straight line passing through the point (x1, y1) is
ρ = x1 cos θ + y1 sin θ (Formula 1)
Represented by And the straight line passing through the point (x2, y2) is
ρ = x2 cos θ + y 2 sin θ (Formula 2)
Represented by When these two equations are plotted (voted) on the ρ-θ plane, they intersect at (ρa, θa). In other words, two votes have been voted for this intersection. This (ρa, θa) indicates a straight line passing through the point (x1, y1) and the point (x2, y2).

参照画像受付モジュール110B、ハフ変換モジュール120Bは、対象画像受付モジュール110A、ハフ変換モジュール120Aと同等である。ただし、対象画像受付モジュール110Aは対象とする画像を受け付けるが、参照画像受付モジュール110Bは参照とする画像を受け付ける点で異なる。対象とする画像とは、参照とする画像に対しての回転角、位置ずれ量、拡縮率を検出する対象となるものである。したがって、参照とする画像に対しての参照画像受付モジュール110B、ハフ変換モジュール120Bによる処理は、対象画像受付モジュール110A、ハフ変換モジュール120Aによる処理に先立って行っていてもよく、その処理結果をDB(データベース)等の記憶装置に記憶させておいてもよい。例えば、認識処理に用いる場合は、対象とする画像は参照とする画像のどれに最も類似するかを決定するものであり、検索処理に用いる場合は、対象とする画像は参照とする画像のどれに対応するかを決定するものである。
また、図1の例では対象画像受付モジュール110Aとハフ変換モジュール120A、参照画像受付モジュール110Bとハフ変換モジュール120Bのように2組示したが、いずれか一方であってもよく、3組以上であってもよい。
なお、参照画像受付モジュール110Bが受け取る参照画像として、帳票作成ソフトウェア等により作成された帳票データをラスタライズした画像であってもよい。
The reference image reception module 110B and the Hough conversion module 120B are equivalent to the target image reception module 110A and the Hough conversion module 120A. However, the target image receiving module 110A receives a target image, but the reference image receiving module 110B is different in that it receives a reference image. The target image is a target for detecting a rotation angle, a positional shift amount, and an enlargement / reduction ratio with respect to a reference image. Therefore, the processing by the reference image receiving module 110B and the Hough conversion module 120B for the image to be referred to may be performed prior to the processing by the target image receiving module 110A and the Hough conversion module 120A, and the processing result is stored in the DB. You may memorize | store in memory | storage devices, such as (database). For example, when used for recognition processing, the target image determines which of the reference images is most similar. When used for search processing, the target image is any of the reference images. Is determined.
In the example of FIG. 1, two sets of the target image reception module 110A and the Hough conversion module 120A, and the reference image reception module 110B and the Hough conversion module 120B are shown. There may be.
The reference image received by the reference image receiving module 110B may be an image obtained by rasterizing form data created by form creation software or the like.

回転角検出モジュール130は、ハフ変換モジュール120A、ハフ変換モジュール120B、ハフ表現点列生成モジュール140と接続されている。ハフ変換モジュール120A、ハフ変換モジュール120Bによるハフ変換結果に基づいて、画像の回転角を検出する。そして、その検出した回転角をハフ表現点列生成モジュール140へ渡す。なお、ハフ変換モジュール120Aによるハフ変換結果に基づいて、対象画像の回転角を検出するだけでもよい。
より具体的には、ρ−θ平面においてθ方向への投影を生成し、画像に含まれている罫線の回転角を得る。これは、帳票の罫線が直交していることを利用したものである。
The rotation angle detection module 130 is connected to the Hough conversion module 120A, the Hough conversion module 120B, and the Hough expression point sequence generation module 140. The rotation angle of the image is detected based on the Hough conversion result by the Hough conversion module 120A and the Hough conversion module 120B. Then, the detected rotation angle is passed to the Hough expression point sequence generation module 140. Note that the rotation angle of the target image may only be detected based on the Hough conversion result by the Hough conversion module 120A.
More specifically, a projection in the θ direction is generated on the ρ-θ plane, and the rotation angle of the ruled line included in the image is obtained. This utilizes the fact that the ruled lines of the form are orthogonal.

ハフ表現点列生成モジュール140は、回転角検出モジュール130、拡縮率・位置ずれ量検出モジュール150と接続されている。回転角検出モジュール130によって検出された回転角に基づいて、ハフ変換モジュール120A、ハフ変換モジュール120Bによる変換結果を、第1の点列と第2の点列として生成する。そして、その生成した点列群を拡縮率・位置ずれ量検出モジュール150へ渡す。
より具体的には、参照画像及び対象画像のそれぞれに対して、回転角検出モジュール130によって検出した画像内の罫線の回転角を基準にハフ空間表現の点列をρ方向に切り出し、画像内の第1の罫線群(例えば、縦線)とそれらに直交する第2の罫線群(例えば、横線)に対応する2つの点列を生成する。
The Hough expression point sequence generation module 140 is connected to the rotation angle detection module 130 and the enlargement / reduction ratio / position shift amount detection module 150. Based on the rotation angle detected by the rotation angle detection module 130, the conversion results by the Hough conversion module 120A and the Hough conversion module 120B are generated as a first point sequence and a second point sequence. Then, the generated point sequence group is transferred to the enlargement / reduction rate / position deviation amount detection module 150.
More specifically, for each of the reference image and the target image, a sequence of points in the Hough space representation is cut out in the ρ direction based on the rotation angle of the ruled line in the image detected by the rotation angle detection module 130, and Two point sequences corresponding to a first ruled line group (for example, vertical line) and a second ruled line group (for example, horizontal line) orthogonal to them are generated.

拡縮率・位置ずれ量検出モジュール150は、ハフ表現点列生成モジュール140、出力モジュール170と接続されており、拡縮率と位置ずれ量の検出を行うものである。参照画像と対象画像に対して、ハフ表現点列生成モジュール140で生成した2つのハフ表現点列について、第1の罫線群に対応する点列同士、第2の罫線群に対応する点列同士を対応付け、第2のハフ変換を行う。例えば、第2のハフ変換表現における最大投票値が2つの点列のそれぞれで予め定められた値を越えていれば検出成功とし、最大投票値を与える座標が拡縮率と位置ずれ量となる。
また、拡縮率・位置ずれ量検出モジュール150は、拡縮率と位置ずれ量の検出に失敗した場合の処理も行う。参照画像と対象画像の間に90度以上の回転がある場合などに検出失敗となる。この場合、点列の組み合わせ・反転処理により前述の拡縮率と位置ずれ量の処理を検出が成功するまで繰り返す。全ての組み合わせにおいて拡縮率と位置ずれ量の検出に失敗した場合は、参照画像内の帳票と対象画像内の帳票は異なる帳票であると判断する。
The enlargement / reduction ratio / positional deviation amount detection module 150 is connected to the Hough expression point sequence generation module 140 and the output module 170, and detects the enlargement / reduction ratio and the positional deviation amount. For the two Hough expression point sequences generated by the Hough expression point sequence generation module 140 with respect to the reference image and the target image, the point sequences corresponding to the first ruled line group and the point sequences corresponding to the second ruled line group And the second Hough transform is performed. For example, if the maximum voting value in the second Hough transform expression exceeds a predetermined value for each of the two point sequences, the detection is successful, and the coordinates giving the maximum voting value are the enlargement / reduction ratio and the amount of displacement.
The enlargement / reduction ratio / positional deviation amount detection module 150 also performs processing when the detection of the enlargement / reduction ratio and the positional deviation amount fails. The detection fails when there is a rotation of 90 degrees or more between the reference image and the target image. In this case, the above-described processing of the enlargement / reduction ratio and the positional deviation amount is repeated by the combination / inversion processing of the point sequence until the detection is successful. If detection of the enlargement / reduction ratio and the amount of misalignment fails in all combinations, it is determined that the form in the reference image and the form in the target image are different forms.

拡縮率・位置ずれ量検出モジュール150は、制御モジュール152、点列対応付モジュール154、第2のハフ変換モジュール156、拡縮率・位置ずれ量検出処理モジュール158、検出成功判断処理モジュール160、組み合わせ・反転処理モジュール162を有している。
制御モジュール152は、前述の拡縮率・位置ずれ量検出モジュール150の処理を行うように、拡縮率・位置ずれ量検出モジュール150内のその他のモジュールを制御する。そして、処理結果を出力モジュール170へ渡す。
The enlargement / reduction ratio / position deviation amount detection module 150 includes a control module 152, a point sequence correspondence module 154, a second Hough conversion module 156, an enlargement / reduction ratio / position deviation amount detection processing module 158, a detection success determination processing module 160, a combination / An inversion processing module 162 is included.
The control module 152 controls other modules in the enlargement / reduction ratio / position deviation amount detection module 150 so as to perform the processing of the enlargement / reduction ratio / position deviation amount detection module 150 described above. Then, the processing result is passed to the output module 170.

点列対応付モジュール154は、対象画像に対する第1の点列又は第2の点列と、参照画像に対する第1の点列又は第2の点列を対応付ける。具体的な例として、対象画像に対する第1の点列と参照画像に対する第1の点列とを対応付け、対象画像に対する第2の点列と参照画像に対する第2の点列とを対応付ける。   The point sequence association module 154 associates the first point sequence or the second point sequence for the target image with the first point sequence or the second point sequence for the reference image. As a specific example, the first point sequence for the target image is associated with the first point sequence for the reference image, and the second point sequence for the target image is associated with the second point sequence for the reference image.

第2のハフ変換モジュール156は、点列対応付モジュール154による点列の対応付けによって定まる線に対して第2の投票関数による変換を行う。第2の投票関数として第2のハフ変換を例示する。
ここで、第2のハフ変換とは、対応付けられた点によって定まる直線からS−K平面への変換をいう。具体的には、そのS−K平面への投票である。Sは位置ずれ量を、Kは拡縮率を表している。
The second Hough transform module 156 performs transformation by the second voting function on a line determined by the point sequence association by the point sequence association module 154. The second Hough transform is exemplified as the second voting function.
Here, the second Hough transform refers to a transformation from a straight line determined by an associated point to an SK plane. Specifically, it is a vote for the SK plane. S represents the amount of displacement, and K represents the enlargement / reduction ratio.

拡縮率・位置ずれ量検出処理モジュール158は、第2のハフ変換モジュール156による変換結果に基づいて、参照画像に対する対象画像の位置ずれ量及び拡縮率を検出する。つまり、S−K平面における投票数が多いもの(例えば、最大投票数)の交点(S,K)から、位置ずれ量、拡縮率を検出する。なお、投票数が予め定められた値以上であることを条件としてもよい。   The enlargement / reduction ratio / position shift amount detection processing module 158 detects the position shift amount and the enlargement / reduction ratio of the target image with respect to the reference image based on the conversion result by the second Hough conversion module 156. That is, the positional deviation amount and the expansion / contraction rate are detected from the intersection (S, K) of the one having a large number of votes (for example, the maximum number of votes) on the SK plane. In addition, it is good also as conditions on the number of votes being a predetermined value or more.

検出成功判断処理モジュール160は、第2のハフ変換モジュール156による変換結果と予め定められた値とを比較して、拡縮率・位置ずれ量検出処理モジュール158による検出結果が成功であるか否かを判断する。例えば、投票数が予め定められた値以上であるならば成功として、その検出結果を位置ずれ量と回転角とする。予め定められた値以上でないならば失敗として、点列の対応付けを変更して、第2のハフ変換を再度行う。なお、点列の対応付けの変更は3回まで行える。   The detection success determination processing module 160 compares the conversion result by the second Hough conversion module 156 with a predetermined value, and determines whether or not the detection result by the enlargement / reduction ratio / position deviation amount detection processing module 158 is successful. Judging. For example, if the number of votes is equal to or greater than a predetermined value, it is determined that the vote is successful, and the detection result is set as a positional deviation amount and a rotation angle. If it is not equal to or greater than a predetermined value, it is determined as failure, the point string association is changed, and the second Hough transform is performed again. Note that the point sequence association can be changed up to three times.

また、検出成功判断処理モジュール160は成功と判断した場合、参照画像は、対象画像に類似していると判断する。つまり、複数登録されている参照画像内から、対象画像に類似しているものを抽出するという認識処理を行う。より具体的な例として、第2のハフ変換表現におけるピーク位置の投票数を帳票間(対象画像内の帳票と参照画像内の帳票)の類似度とし、類似度が予め定められた値を下回る場合は認識失敗と判定する。
また、検出成功判断処理モジュール160は成功と判断した場合、参照画像は、対象画像の検索結果であると判断する。つまり、複数登録されている参照画像内から、対象画像を検索するという検索処理を行う。より具体的な例として、前述の認識処理における類似度を登録済みの全ての帳票について求め、最も大きな類似度を持つ帳票を検索結果とする。
When the detection success determination processing module 160 determines that the detection is successful, the reference image is determined to be similar to the target image. That is, a recognition process is performed in which an object similar to the target image is extracted from a plurality of registered reference images. As a more specific example, the number of votes at the peak position in the second Hough transform expression is the similarity between forms (the form in the target image and the form in the reference image), and the degree of similarity is below a predetermined value. In this case, it is determined that recognition has failed.
If the detection success determination processing module 160 determines that the detection is successful, the reference image is determined to be a search result of the target image. That is, a search process of searching for a target image from a plurality of registered reference images is performed. As a more specific example, the degree of similarity in the above recognition process is obtained for all registered forms, and the form having the largest degree of similarity is used as the search result.

組み合わせ・反転処理モジュール162は、検出成功判断処理モジュール160によって成功ではないと判断された場合は、点列対応付モジュール154による点列の対応付けを変更する。そして、第2のハフ変換モジュール156は、組み合わせ・反転処理モジュール162によって変更された点列の対応付けによって定まる線に対して第2の投票関数による変換を行う。   When the detection success determination processing module 160 determines that the combination / inversion processing module 162 is not successful, the combination / inversion processing module 162 changes the point sequence association by the point sequence association module 154. Then, the second Hough transform module 156 performs transformation by the second voting function on the line determined by the correspondence of the point sequence changed by the combination / inversion processing module 162.

出力モジュール170は、拡縮率・位置ずれ量検出モジュール150と接続されており、参照画像に対する対象画像の回転角検出モジュール130によって検出された回転角、拡縮率・位置ずれ量検出処理モジュール158によって検出された拡縮率、位置ずれ量を出力する。また、さらに認識結果(対象画像と類似する参照画像の識別子等)、検索結果(対象画像に対応する参照画像の識別子等)を出力するようにしてもよい。また、検出された回転角、拡縮率、位置ずれ量に基づいて、対象画像を元に戻す(参照画像に近いものにする)処理を行ってから出力するようにしてもよい。出力先としては、例えば、処理結果を表示・印刷するディスプレイ、プリンタ等、その処理結果を利用する他の情報処理装置等であってもよい。   The output module 170 is connected to the enlargement / reduction ratio / displacement amount detection module 150 and is detected by the rotation angle / enlargement / reduction ratio / position deviation amount detection processing module 158 detected by the rotation angle detection module 130 of the target image with respect to the reference image. The scaled rate and the amount of displacement are output. Further, a recognition result (such as an identifier of a reference image similar to the target image) and a search result (such as an identifier of a reference image corresponding to the target image) may be output. Further, based on the detected rotation angle, enlargement / reduction ratio, and displacement amount, the target image may be returned to the original (made close to the reference image) and then output. The output destination may be, for example, a display or printer that displays / prints the processing result, or another information processing apparatus that uses the processing result.

図2は、本実施の形態による参照画像に対する処理例を示すフローチャートである。この処理は、一般的には、対象画像に対する処理が行われる前に行い、複数の参照画像を予め登録しておく。
ステップS202では、参照画像受付モジュール110Bが、参照画像を受け付ける。例えば、図6(a)の例に示す参照帳票の画像を受け付ける。
FIG. 2 is a flowchart showing an example of processing for a reference image according to this embodiment. This process is generally performed before the process for the target image is performed, and a plurality of reference images are registered in advance.
In step S202, the reference image receiving module 110B receives a reference image. For example, the reference form image shown in the example of FIG.

ステップS204では、ハフ変換モジュール120Bが、その参照画像に対してハフ変換を行う。投票値に対して予め定められた値で閾値処理を行い、ハフ空間表現(ρ,θ)を得る。例えば、図6(a)の例に示す参照帳票の画像に対してのハフ変換は、図6(b)の例に示すようになる。θが90度のところには、4本の横罫線が抽出されており、θが0度のところには、6本の縦罫線が抽出されている。
ステップS206では、ハフ変換モジュール120Bが、ハフ変換の結果を記憶装置に記憶する。
In step S204, the Hough conversion module 120B performs Hough conversion on the reference image. Threshold processing is performed on the vote value with a predetermined value to obtain a Hough space expression (ρ, θ). For example, the Hough transform for the reference form image shown in the example of FIG. 6A is as shown in the example of FIG. When θ is 90 degrees, four horizontal ruled lines are extracted, and when θ is 0 degrees, six vertical ruled lines are extracted.
In step S206, the Hough conversion module 120B stores the result of the Hough conversion in the storage device.

図3は、本実施の形態による対象画像に対する処理例を示すフローチャートである。
ステップS302では、対象画像受付モジュール110Aが、対象画像を受け付ける。例えば、図7(a)の例に示す対象帳票の画像を受け付ける。この対象帳票は、図6(a)の例に示した参照画像を元にして作成されたものであるが、帳票内に文字が記載されており、回転、縮小、位置ずれが発生している。
FIG. 3 is a flowchart showing an example of processing for a target image according to the present embodiment.
In step S302, the target image receiving module 110A receives the target image. For example, the image of the target form shown in the example of FIG. This target form is created based on the reference image shown in the example of FIG. 6A. However, characters are written in the form, and rotation, reduction, and displacement occur. .

ステップS304では、ハフ変換モジュール120Aが、その対象画像に対してハフ変換を行う。投票値に対して予め定められた値で閾値処理を行い、ハフ空間表現(ρ,θ)を得る。例えば、図7(a)の例に示す対象帳票の画像に対してのハフ変換は、図7(b)の例に示すようになる。θが90度近辺のところには、6本の横罫線が抽出されており、θが0度近辺のところには、9本の縦罫線が抽出されている。図6(b)の例と異なるのは、傾き(回転)によるθ方向のシフト、位置ずれによるρ方向のシフト、スケーリング(縮小)によるρ方向の縮小、文字等の書込みによるピーク点の増加(図7(b)の例では×印が増加している点)が見られる。   In step S304, the Hough conversion module 120A performs Hough conversion on the target image. Threshold processing is performed on the vote value with a predetermined value to obtain a Hough space expression (ρ, θ). For example, the Hough transform for the target form image shown in the example of FIG. 7A is as shown in the example of FIG. Six horizontal ruled lines are extracted when θ is around 90 degrees, and nine vertical ruled lines are extracted when θ is around 0 degrees. The difference from the example of FIG. 6B is that the shift in the θ direction due to tilt (rotation), the shift in the ρ direction due to displacement, the reduction in the ρ direction due to scaling (reduction), and the increase in peak points due to writing of characters or the like ( In the example of FIG. 7B, a point where the x mark is increased).

ステップS306では、回転角検出モジュール130が、対象画像内の帳票の回転角を検出する。例えば、図8(a)の例に示す対象帳票の画像に対してのハフ変換は、図8(b)の例に示すようになり、これをθ方向へ投影(点の個数を計数したヒストグラムを生成)し、図8(c)の例に示すような投影波形p(θ)を得る。
そして、0度≦θ<90度について
r(θ) = p(θ) + p(θ+90) + p(θ−90) (式3)
を計算し、r(θ)が最大となる角度θaを対象画像内の帳票の回転角とする。なお、この式で、p(θ)だけではなく、p(θ+90)、p(θ−90)をも用いているのは、回転角の精度を上げるためである。
In step S306, the rotation angle detection module 130 detects the rotation angle of the form in the target image. For example, the Hough transform for the target form image shown in the example of FIG. 8A is as shown in the example of FIG. 8B, which is projected in the θ direction (a histogram in which the number of points is counted). And a projection waveform p (θ) as shown in the example of FIG. 8C is obtained.
For 0 degree ≦ θ <90 degrees, r (θ) = p (θ) + p (θ + 90) + p (θ−90) (Formula 3)
And the angle θa at which r (θ) is maximum is set as the rotation angle of the form in the target image. In this equation, not only p (θ) but also p (θ + 90) and p (θ−90) are used in order to increase the accuracy of the rotation angle.

ステップS308では、ハフ表現点列生成モジュール140が、対象帳票の画像及び参照帳票の画像のハフ表現点列を生成する。ステップS306で検出された回転角θaに対して、θa−90度の位置に点列(1つの点であっても点列という)がある場合は、θa+90度の位置へ移動する。点列を移動する際に各点のρ座標を反転する。そして、θaの位置にある点列を第1の罫線群に対応する点列、θa+90度の位置にある点列を第2の罫線群に対応する点列として生成する。なお、参照帳票の画像の回転角は0度であるのが一般的である。   In step S308, the Hough expression point sequence generation module 140 generates a Hough expression point sequence of the target form image and the reference form image. When there is a point sequence (even a single point is referred to as a point sequence) with respect to the rotation angle θa detected in step S306, the position moves to the position θa + 90 °. When moving the point sequence, the ρ coordinate of each point is inverted. Then, the point sequence at the position of θa is generated as the point sequence corresponding to the first ruled line group, and the point sequence at the position of θa + 90 degrees is generated as the point sequence corresponding to the second ruled line group. The rotation angle of the reference form image is generally 0 degree.

例えば、図9(a)の例に示す対象帳票の画像に対してのハフ変換は、図9(b)の例に示すようになる。縦罫線3本と横罫線3本からなる対象帳票はθaだけ傾いており、縦罫線はそれぞれρ1、ρ2、ρ3に対応しており、横罫線はρ4、ρ5、ρ6に対応している。そして、ステップS306で検出された回転角θaに対して、θa−90度の位置に点列(ρ4)があるので、これをθa+90度の位置へ移動する。この点列を移動する際にρ座標を反転する。つまり、図9(d)の例に示すように、ρ4をθa+90度の位置に移動して、θ軸に線対称の位置(−ρ4)に移動する。そして、θaの位置にある点列(ρ1、ρ2、ρ3)を第1の罫線群に対応する点列とし(図9(c)の例参照)、θa+90度位置にある点列(−ρ4、ρ5、ρ6)を第2の罫線群に対応する点列として生成する(図9(d)の例参照)。   For example, the Hough transform for the target form image shown in the example of FIG. 9A is as shown in the example of FIG. A target form composed of three vertical ruled lines and three horizontal ruled lines is inclined by θa, the vertical ruled lines correspond to ρ1, ρ2, and ρ3, respectively, and the horizontal ruled lines correspond to ρ4, ρ5, and ρ6. Then, since there is a point sequence (ρ4) at the position θa−90 degrees with respect to the rotation angle θa detected at step S306, it is moved to the position θa + 90 degrees. When this point sequence is moved, the ρ coordinate is inverted. That is, as shown in the example of FIG. 9D, ρ4 is moved to a position of θa + 90 degrees, and moved to a position (−ρ4) symmetrical with respect to the θ axis. Then, the point sequence (ρ1, ρ2, ρ3) at the position of θa is set as a point sequence corresponding to the first ruled line group (see the example of FIG. 9C), and the point sequence at the position of θa + 90 degrees (−ρ4, [rho] 5, [rho] 6) are generated as a point sequence corresponding to the second ruled line group (see the example in FIG. 9D).

図9(a)の例に示した対象帳票とは逆方向に傾いている対象帳票の場合の例を図10に示す。
図10(a)の例に示す対象帳票の画像に対してのハフ変換は、図10(b)の例に示すようになる。縦罫線3本と横罫線3本からなる対象帳票はθaだけ傾いており、縦罫線はそれぞれρ1、ρ2、ρ3に対応しており、横罫線はρ4、ρ5、ρ6に対応している。そして、ステップS306で検出された回転角θaに対して、θa−90度の位置に点列(ρ5、ρ6)があるので、これをθa+90度の位置へ移動する。この点を移動する際にρ座標を反転する。つまり、図10(d)の例に示すように、ρ5,ρ6をθa+90度の位置に移動して、θ軸に線対称の位置(−ρ5、−ρ6)に移動する。そして、θaの位置にある点列(ρ1、ρ2、ρ3)を第1の罫線群に対応する点列とし(図10(c)の例参照)、θa+90度位置にある点列(−ρ6、−ρ5、ρ4)を第2の罫線群に対応する点列として生成する(図10(d)の例参照)。
FIG. 10 shows an example of a target form tilted in the opposite direction to the target form shown in the example of FIG.
The Hough transform for the target form image shown in the example of FIG. 10A is as shown in the example of FIG. A target form composed of three vertical ruled lines and three horizontal ruled lines is inclined by θa, the vertical ruled lines correspond to ρ1, ρ2, and ρ3, respectively, and the horizontal ruled lines correspond to ρ4, ρ5, and ρ6. Then, since there is a point sequence (ρ5, ρ6) at the position of θa−90 degrees with respect to the rotation angle θa detected at step S306, it is moved to the position of θa + 90 degrees. The ρ coordinate is inverted when moving this point. That is, as shown in the example of FIG. 10D, ρ5 and ρ6 are moved to a position of θa + 90 degrees, and moved to positions (−ρ5, −ρ6) that are line-symmetric with respect to the θ axis. Then, the point sequence (ρ1, ρ2, ρ3) at the position of θa is set as a point sequence corresponding to the first ruled line group (see the example of FIG. 10C), and the point sequence at the position of θa + 90 degrees (−ρ6, -[Rho] 5, [rho] 4) is generated as a point sequence corresponding to the second ruled line group (see the example in FIG. 10D).

ステップS310では、拡縮率・位置ずれ量検出モジュール150が、対象画像の参照画像に対する拡縮率、位置ずれ量を検出する。この処理については、図4の例に示すフローチャートを用いて後述する。
ステップS312では、出力モジュール170が、ステップS306、ステップS310での処理結果を出力する。
In step S310, the enlargement / reduction ratio / positional deviation amount detection module 150 detects the enlargement / reduction ratio and positional deviation amount of the target image with respect to the reference image. This process will be described later using the flowchart shown in the example of FIG.
In step S312, the output module 170 outputs the processing results in steps S306 and S310.

図4は、本実施の形態の拡縮率・位置ずれ量検出モジュール150による対象画像の参照画像に対する拡縮率・位置ずれ量の検出例を示すフローチャートである。
ステップS402では、点列対応付モジュール154が、ハフ表現点列の対応付けを行う。例えば、図11(a)の例に示すρ軸の点列(ρa1、ρa2、ρa3等)は、参照帳票の画像の第1の罫線群に対応する点列である。図11(b)の例に示すρ軸の点列(ρb1、ρb2、ρb3、ρn1、ρn2等)は、対象帳票の画像の第1の罫線群に対応する点列である。なお、ρn1、ρn2等は、帳票を構成している罫線ではなく文字等の加筆された画像から抽出されたものである(以下、ノイズともいう)。
FIG. 4 is a flowchart showing an example of detection of the enlargement / reduction ratio / position shift amount with respect to the reference image of the target image by the enlargement / reduction ratio / position shift amount detection module 150 of the present embodiment.
In step S402, the point sequence association module 154 associates the Hough expression point sequence. For example, the ρ-axis point sequence (ρa1, ρa2, ρa3, etc.) shown in the example of FIG. 11A is a point sequence corresponding to the first ruled line group of the reference form image. The ρ-axis point sequence (ρb1, ρb2, ρb3, ρn1, ρn2, etc.) shown in the example of FIG. 11B is a point sequence corresponding to the first ruled line group of the image of the target form. Note that ρn1, ρn2, etc. are extracted from an image in which characters and the like are added instead of the ruled lines constituting the form (hereinafter also referred to as noise).

まず、一方の点列の各点を他方の点列の全ての点と対応付ける。図11の例で示すと、ρa1とρb1、ρb2、ρb3、ρn1、ρn2等とを対応付ける。同様に、ρa2等とρb1、ρb2、ρb3、ρn1、ρn2等とを対応付ける。   First, each point in one point sequence is associated with all points in the other point sequence. In the example of FIG. 11, ρa1 is associated with ρb1, ρb2, ρb3, ρn1, ρn2, and the like. Similarly, ρa2 and the like are associated with ρb1, ρb2, ρb3, ρn1, ρn2, and the like.

ステップS404では、第2のハフ変換モジュール156が、対応付けられた点列に基づいて、第2のハフ変換を行う。つまり、対応付けられた2点から定まる直線をS−K平面上に投票する。
例えば、図12の例に示すように、ρa1とρb1から定まる直線(図12内ではρa1−ρb1)、ρa2とρb2から定まる直線(図12内ではρa2−ρb2)、ρa3とρb3から定まる直線(図12内ではρa3−ρb3)は、一点(Sa,Ka)で交わるが、ρa1とρb2から定まる直線(図12内ではρa1−ρb2、つまり本来対応していない罫線同士)、ρa1とノイズであるρn1から定まる直線(図12内ではρa1−ρn1)は(Sa,Ka)を通らない。
In step S404, the second Hough transform module 156 performs the second Hough transform based on the associated point sequence. That is, a straight line determined from two associated points is voted on the SK plane.
For example, as shown in the example of FIG. 12, a straight line determined from ρa1 and ρb1 (in FIG. 12, ρa1-ρb1), a straight line determined from ρa2 and ρb2 (ρa2-ρb2 in FIG. 12), and a straight line determined from ρa3 and ρb3 ( In FIG. 12, ρa3-ρb3) intersects at one point (Sa, Ka), but is a straight line determined from ρa1 and ρb2 (in FIG. 12, ρa1-ρb2, that is, ruled lines that do not originally correspond), ρa1 and noise. A straight line determined from ρn1 (ρa1-ρn1 in FIG. 12) does not pass through (Sa, Ka).

ステップS406では、拡縮率・位置ずれ量検出処理モジュール158が、拡縮率、位置ずれ量を検出する。
位置ずれによるρ方向の位置ずれ量をSa、スケーリングによるρ方向の拡縮率をKaとすると、
ρai = Ka・ρbi + Sa (式4)
となる。
最大投票数を持つ直線の交点(Sa,Ka)から位置ずれ量と拡縮率が求まる。また、(最大投票数)/(点列内の点の数)をその方向の罫線の類似度とする。
そして、投票値の多い(例えば、最大投票値となる)点の座標(S,K)が位置ずれ量と拡縮率に対応する。
In step S406, the enlargement / reduction ratio / positional deviation amount detection processing module 158 detects the enlargement / reduction ratio and positional deviation amount.
When the displacement amount in the ρ direction due to displacement is Sa, and the expansion / contraction rate in the ρ direction due to scaling is Ka,
ρai = Ka · ρbi + Sa (Formula 4)
It becomes.
A positional deviation amount and an enlargement / reduction ratio are obtained from the intersection (Sa, Ka) of the straight line having the maximum number of votes. Also, (maximum number of votes) / (number of points in the point sequence) is the similarity of the ruled line in that direction.
The coordinates (S, K) of a point having a large vote value (for example, the maximum vote value) correspond to the positional deviation amount and the enlargement / reduction ratio.

ステップS408では、検出成功判断処理モジュール160が、ステップS406での検出が成功したか否かを判断する。検出に成功している場合は終了(ステップS499)し、それ以外の場合はステップS410へ進む。例えば、ステップS404での変換結果と予め定められた値とを比較して、成功であるか否かを判断する。また、類似度が予め定められた値以上の場合を成功と判断してもよい。
ここで、図13、図14を用いて、検出に成功しなかった場合の例を示す。図13は、参照帳票の画像のハフ表現点列の例を示す説明図である。図14は、対象帳票の画像のハフ表現点列の例を示す説明図である。図13(a)の例に示す参照帳票の画像のハフ表現点列は、図13(b)、図13(c)の例に示したようになる。つまり、第1の罫線群(θ=0度)に対応するρ1、ρ2、ρ3の点列(図13(b))と第2の罫線群(θ=90度)に対応するρ4、ρ5、ρ6の点列(図13(c))に分かれる。そして、図14(a)の例に示す対象帳票の画像のハフ表現点列は、図14(b)、図14(c)の例に示したようになる。つまり、第1の罫線群(θ=θa度)に対応するρ1、ρ2、ρ3の点列(図14(b))と第2の罫線群(θ=θa+90度)に対応する−ρ6、−ρ5、ρ4の点列(図14(c))に分かれる。対象帳票の第1の罫線群に対応する点列(図14(b))は、参照帳票の第2の罫線群に対応する点列(図13(c))を反転させたものに相当する。また、対象帳票の第2の罫線群に対応する点列(図14(c))は、参照帳票の第1の罫線群に対応する点列(図13(b))に相当する。この場合、本来対応していないもの同士を対応させるので(例えば、参照帳票の第1の罫線群に対応する点列と対象帳票の第1の罫線群に対応する点列とを対応させる)、類似度は低くなる。
In step S408, the detection success determination processing module 160 determines whether the detection in step S406 was successful. If the detection is successful, the process ends (step S499). Otherwise, the process proceeds to step S410. For example, the result of conversion in step S404 is compared with a predetermined value to determine whether or not it is successful. Further, the case where the similarity is equal to or greater than a predetermined value may be determined as successful.
Here, an example in the case where the detection is not successful will be described with reference to FIGS. FIG. 13 is an explanatory diagram illustrating an example of a Hough expression point sequence of a reference form image. FIG. 14 is an explanatory diagram illustrating an example of a Hough expression point sequence of an image of a target form. The Hough expression point sequence of the reference form image shown in the example of FIG. 13A is as shown in the examples of FIGS. 13B and 13C. That is, ρ1, ρ2, ρ3 corresponding to the first ruled line group (θ = 0 degrees) (FIG. 13B) and ρ4, ρ5, corresponding to the second ruled line group (θ = 90 degrees), It is divided into a sequence of points ρ6 (FIG. 13C). Then, the Hough expression point sequence of the image of the target form shown in the example of FIG. 14A is as shown in the examples of FIGS. 14B and 14C. That is, the points ρ1, ρ2, and ρ3 corresponding to the first ruled line group (θ = θa degree) (FIG. 14B) and −ρ6, − corresponding to the second ruled line group (θ = θa + 90 degrees). It is divided into a sequence of points ρ5 and ρ4 (FIG. 14C). The dot sequence corresponding to the first ruled line group of the target form (FIG. 14B) corresponds to an inverted version of the dot sequence corresponding to the second ruled line group of the reference form (FIG. 13C). . Further, the point sequence corresponding to the second ruled line group of the target form (FIG. 14C) corresponds to the point sequence corresponding to the first ruled line group of the reference form (FIG. 13B). In this case, since the ones that are not originally corresponded are associated with each other (for example, the point sequence corresponding to the first ruled line group of the reference form is associated with the point sequence corresponding to the first ruled line group of the target form), Similarity is low.

ステップS410では、検出成功判断処理モジュール160が、全ての対応付けの組み合わせを実施したか否かを判断する。全ての対応付けの組み合わせを実施した場合は対象画像と参照画像とは類似していないとして終了する(ステップS499)。それ以外の場合はステップS412へ進む。
なお、ここでの組み合わせとは、図15の例に示すものである。つまり、回転角がθa+90度の場合は、参照帳票の画像の第1の罫線群に対応する点列と対象帳票の画像の第2の罫線群に対応する点列との対応付け、参照帳票の画像の第2の罫線群に対応する点列と対象帳票の画像の第1の罫線群に対応する点列を反転させたものとの対応付けである。回転角がθa+180度の場合は、参照帳票の画像の第1の罫線群に対応する点列と対象帳票の画像の第1の罫線群に対応する点列を反転させたものとの対応付け、参照帳票の画像の第2の罫線群に対応する点列と対象帳票の画像の第2の罫線群に対応する点列を反転させたものとの対応付けである。回転角がθa+270度の場合は、参照帳票の画像の第1の罫線群に対応する点列と対象帳票の画像の第2の罫線群に対応する点列を反転させたものとの対応付け、参照帳票の画像の第2の罫線群に対応する点列と対象帳票の画像の第1の罫線群に対応する点列との対応付けである。
なお、回転角がθa+0度の場合は、既に1回目の処理のステップS402で対応付けられたものであり、参照帳票の画像の第1の罫線群に対応する点列と対象帳票の画像の第1の罫線群に対応する点列との対応付け、参照帳票の画像の第2の罫線群に対応する点列と対象帳票の画像の第2の罫線群に対応する点列との対応付けである。
In step S410, the detection success determination processing module 160 determines whether or not all combinations of associations have been performed. When all the combinations of correspondence are implemented, it is determined that the target image and the reference image are not similar (step S499). Otherwise, the process proceeds to step S412.
The combination here is shown in the example of FIG. That is, when the rotation angle is θa + 90 degrees, the correspondence between the point sequence corresponding to the first ruled line group of the reference form image and the point sequence corresponding to the second ruled line group of the target form image, This is a correspondence between a point sequence corresponding to the second ruled line group of the image and an inverted version of the point sequence corresponding to the first ruled line group of the target form image. When the rotation angle is θa + 180 degrees, the correspondence between the point sequence corresponding to the first ruled line group of the reference form image and the inverted point sequence corresponding to the first ruled line group of the target form image; This is a correspondence between a point sequence corresponding to the second ruled line group of the reference form image and an inverted version of the point sequence corresponding to the second ruled line group of the target form image. When the rotation angle is θa + 270 degrees, the correspondence between the dot sequence corresponding to the first ruled line group of the reference form image and the inverted dot sequence corresponding to the second ruled line group of the target form image; This is a correspondence between a point sequence corresponding to the second ruled line group of the reference form image and a point sequence corresponding to the first ruled line group of the target form image.
If the rotation angle is θa + 0 degrees, it has already been associated in step S402 of the first process, and the dot sequence corresponding to the first ruled line group of the reference form image and the first of the target form image are displayed. By associating with a point sequence corresponding to one ruled line group, associating a point sequence corresponding to the second ruled line group of the reference form image with a point sequence corresponding to the second ruled line group of the target form image is there.

ステップS412では、組み合わせ・反転処理モジュール162が、図15の例に示した組み合わせにしたがって、点列の対応付けを行わせるように指示して、ステップS402へ戻る。また、ステップS412で組み合わせ・反転処理モジュール162が点列の対応付けの処理を行って、ステップS404の処理へ戻るようにしてもよい。   In step S412, the combination / inversion processing module 162 instructs the point sequences to be associated according to the combination shown in the example of FIG. 15, and the process returns to step S402. Further, the combination / inversion processing module 162 may perform the point sequence association processing in step S412, and may return to the processing in step S404.

図16を参照して、本実施の形態の画像処理装置のハードウェア構成例について説明する。図16に示す構成は、例えばパーソナルコンピュータ(PC)などによって構成されるものであり、スキャナ等のデータ読み取り部1617と、プリンタなどのデータ出力部1618を備えたハードウェア構成例を示している。   A hardware configuration example of the image processing apparatus according to the present embodiment will be described with reference to FIG. The configuration shown in FIG. 16 is configured by a personal computer (PC), for example, and shows a hardware configuration example including a data reading unit 1617 such as a scanner and a data output unit 1618 such as a printer.

CPU(Central Processing Unit)1601は、前述の実施の形態において説明した各種のモジュール、すなわち、ハフ変換モジュール120A、回転角検出モジュール130、ハフ表現点列生成モジュール140、拡縮率・位置ずれ量検出モジュール150等の各モジュールの実行シーケンスを記述したコンピュータ・プログラムにしたがった処理を実行する制御部である。   A CPU (Central Processing Unit) 1601 is the various modules described in the above-described embodiments, that is, the Hough conversion module 120A, the rotation angle detection module 130, the Hough expression point sequence generation module 140, the enlargement / reduction ratio / displacement amount detection module. The control unit executes processing according to a computer program in which an execution sequence of each module such as 150 is described.

ROM(Read Only Memory)1602は、CPU1601が使用するプログラムや演算パラメータ等を格納する。RAM(Random Access Memory)1603は、CPU1601の実行において使用するプログラムや、その実行において適宜変化するパラメータ等を格納する。これらはCPUバスなどから構成されるホストバス1604により相互に接続されている。   A ROM (Read Only Memory) 1602 stores programs, calculation parameters, and the like used by the CPU 1601. A RAM (Random Access Memory) 1603 stores programs used in the execution of the CPU 1601, parameters that change as appropriate during the execution, and the like. These are connected to each other by a host bus 1604 including a CPU bus.

ホストバス1604は、ブリッジ1605を介して、PCI(Peripheral Component Interconnect/Interface)バスなどの外部バス1606に接続されている。   The host bus 1604 is connected to an external bus 1606 such as a PCI (Peripheral Component Interconnect / Interface) bus via a bridge 1605.

キーボード1608、マウス等のポインティングデバイス1609は、操作者により操作される入力デバイスである。ディスプレイ1610は、液晶表示装置又はCRT(Cathode Ray Tube)などがあり、各種情報をテキストやイメージ情報として表示する。   A keyboard 1608 and a pointing device 1609 such as a mouse are input devices operated by an operator. The display 1610 includes a liquid crystal display device or a CRT (Cathode Ray Tube), and displays various types of information as text or image information.

HDD(Hard Disk Drive)1611は、ハードディスクを内蔵し、ハードディスクを駆動し、CPU1601によって実行するプログラムや情報を記録又は再生させる。ハードディスクには、受け付けた画像や回転角等の検出結果などが格納される。さらに、その他の各種のデータ処理プログラム等、各種コンピュータ・プログラムが格納される。   An HDD (Hard Disk Drive) 1611 includes a hard disk, drives the hard disk, and records or reproduces a program executed by the CPU 1601 and information. The hard disk stores received images, detection results such as rotation angles, and the like. Further, various computer programs such as various other data processing programs are stored.

ドライブ1612は、装着されている磁気ディスク、光ディスク、光磁気ディスク、又は半導体メモリ等のリムーバブル記録媒体1613に記録されているデータ又はプログラムを読み出して、そのデータ又はプログラムを、インタフェース1607、外部バス1606、ブリッジ1605、及びホストバス1604を介して接続されているRAM1603に供給する。リムーバブル記録媒体1613も、ハードディスクと同様のデータ記録領域として利用可能である。   The drive 1612 reads data or a program recorded on a removable recording medium 1613 such as a magnetic disk, an optical disk, a magneto-optical disk, or a semiconductor memory, and the data or program is read out from the interface 1607 and the external bus 1606. , A bridge 1605, and a RAM 1603 connected via the host bus 1604. The removable recording medium 1613 can also be used as a data recording area similar to the hard disk.

接続ポート1614は、外部接続機器1615を接続するポートであり、USB、IEEE1394等の接続部を持つ。接続ポート1614は、インタフェース1607、及び外部バス1606、ブリッジ1605、ホストバス1604等を介してCPU1601等に接続されている。通信部1616は、ネットワークに接続され、外部とのデータ通信処理を実行する。データ読み取り部1617は、例えばスキャナであり、ドキュメントの読み取り処理を実行する。データ出力部1618は、例えばプリンタであり、ドキュメントデータの出力処理を実行する。   The connection port 1614 is a port for connecting an external connection device 1615 and has a connection unit such as USB, IEEE1394. The connection port 1614 is connected to the CPU 1601 and the like via the interface 1607, the external bus 1606, the bridge 1605, the host bus 1604, and the like. A communication unit 1616 is connected to a network and executes data communication processing with the outside. The data reading unit 1617 is a scanner, for example, and executes document reading processing. The data output unit 1618 is a printer, for example, and executes document data output processing.

なお、図16に示す画像処理装置のハードウェア構成は、1つの構成例を示すものであり、本実施の形態は、図16に示す構成に限らず、本実施の形態において説明したモジュールを実行可能な構成であればよい。例えば、一部のモジュールを専用のハードウェア(例えば特定用途向け集積回路(Application Specific Integrated Circuit:ASIC)等)で構成してもよく、一部のモジュールは外部のシステム内にあり通信回線で接続しているような形態でもよく、さらに図16に示すシステムが複数互いに通信回線によって接続されていて互いに協調動作するようにしてもよい。また、複写機、ファックス、スキャナ、プリンタ、複合機(スキャナ、プリンタ、複写機、ファックス等のいずれか2つ以上の機能を有している画像処理装置)などに組み込まれていてもよい。   Note that the hardware configuration of the image processing apparatus shown in FIG. 16 shows one configuration example, and the present embodiment is not limited to the configuration shown in FIG. 16, and the modules described in this embodiment are executed. Any configuration is possible. For example, some modules may be configured with dedicated hardware (for example, Application Specific Integrated Circuit (ASIC), etc.), and some modules are in an external system and connected via a communication line In addition, a plurality of systems shown in FIG. 16 may be connected to each other via communication lines so as to cooperate with each other. Further, it may be incorporated in a copying machine, a fax machine, a scanner, a printer, a multifunction machine (an image processing apparatus having any two or more functions of a scanner, a printer, a copying machine, a fax machine, etc.).

前述の実施の形態では、組み合わせ・反転処理モジュール162が、検出に成功しなかった場合に組み合わせを異ならせているが、参照帳票の画像(又は対象帳票の画像)を90度単位で回転させて、ハフ表現点列生成モジュール140、点列対応付モジュール154、第2のハフ変換モジュール156、拡縮率・位置ずれ量検出処理モジュール158による処理を行うようにしてもよい。そして、成功するまで(又は270度の回転まで)この処理を繰り返すようにしてもよい。   In the above-described embodiment, the combination / inversion processing module 162 changes the combination when the detection is not successful, but the reference form image (or the target form image) is rotated by 90 degrees. The Hough expression point sequence generation module 140, the point sequence association module 154, the second Hough conversion module 156, and the enlargement / reduction ratio / displacement amount detection processing module 158 may perform processing. Then, this process may be repeated until successful (or until 270 degrees rotation).

また、θ位置又はθ+90度位置に点列が存在しない場合(横罫線又は縦罫線のいずれか一方のみの場合に相当)、存在する1つの点列に対してのみ、ハフ表現点列生成モジュール140、拡縮率・位置ずれ量検出モジュール150による処理を行うようにしてもよい。また、処理時間を短縮するために、両方存在する場合であっても、片方のみに対してハフ表現点列生成モジュール140、拡縮率・位置ずれ量検出モジュール150による処理を行うようにしてもよい。   Further, when there is no point sequence at the θ position or θ + 90 degrees position (corresponding to only one of the horizontal ruled line and the vertical ruled line), the Hough expression point sequence generating module 140 is only applied to one existing point sequence. The processing by the enlargement / reduction ratio / position deviation amount detection module 150 may be performed. Further, in order to shorten the processing time, even when both are present, the processing by the Hough expression point sequence generation module 140 and the enlargement / reduction ratio / displacement amount detection module 150 may be performed on only one of them. .

また、ハフ変換モジュール120A、ハフ変換モジュール120Bでハフ変換後の点列の選択において、最大投票値に予め定められた値(例えば、0.8等のように1未満であれば短い罫線にも対応できる)を乗じた閾値により閾値処理を行うようにしてもよい。   In addition, when selecting the point sequence after the Hough transform by the Hough transform module 120A and the Hough transform module 120B, a value predetermined for the maximum vote value (for example, a short ruled line if less than 1 such as 0.8) is used. Threshold processing may be performed by a threshold value multiplied by (which can be handled).

また、認識処理又は検索処理において、帳票間の類似度として、第2のハフ変換表現におけるピーク位置の投票数と、参照帳票の画像のハフ変換表現の点列数との比を用いるようにしてもよい。つまり、点列数で正規化処理を行うようにしてもよい。   In the recognition process or the search process, the ratio between the number of votes at the peak position in the second Hough transform expression and the number of point sequences in the Hough transform expression of the image of the reference form is used as the similarity between the forms. Also good. That is, normalization processing may be performed with the number of point sequences.

また、前述の実施の形態の説明において、予め定められた値との比較において、「以上」、「以下」、「より大きい」、「より小さい(未満)」としたものは、その組み合わせに矛盾が生じない限り、それぞれ「より大きい」、「より小さい(未満)」、「以上」、「以下」としてもよい。   Further, in the description of the above-described embodiment, “more than”, “less than”, “greater than”, and “less than (less than)” in a comparison with a predetermined value contradicts the combination. As long as the above does not occur, “larger”, “smaller (less than)”, “more than”, and “less than” may be used.

なお、説明したプログラムについては、記録媒体に格納して提供してもよく、また、そのプログラムを通信手段によって提供してもよい。その場合、例えば、前記説明したプログラムについて、「プログラムを記録したコンピュータ読み取り可能な記録媒体」の発明として捉えてもよい。
「プログラムを記録したコンピュータ読み取り可能な記録媒体」とは、プログラムのインストール、実行、プログラムの流通などのために用いられる、プログラムが記録されたコンピュータで読み取り可能な記録媒体をいう。
なお、記録媒体としては、例えば、デジタル・バーサタイル・ディスク(DVD)であって、DVDフォーラムで策定された規格である「DVD−R、DVD−RW、DVD−RAM等」、DVD+RWで策定された規格である「DVD+R、DVD+RW等」、コンパクトディスク(CD)であって、読出し専用メモリ(CD−ROM)、CDレコーダブル(CD−R)、CDリライタブル(CD−RW)等、ブルーレイ・ディスク(Blu−ray Disc(登録商標))、光磁気ディスク(MO)、フレキシブルディスク(FD)、磁気テープ、ハードディスク、読出し専用メモリ(ROM)、電気的消去及び書換可能な読出し専用メモリ(EEPROM)、フラッシュ・メモリ、ランダム・アクセス・メモリ(RAM)等が含まれる。
そして、前記のプログラム又はその一部は、前記記録媒体に記録して保存や流通等させてもよい。また、通信によって、例えば、ローカル・エリア・ネットワーク(LAN)、メトロポリタン・エリア・ネットワーク(MAN)、ワイド・エリア・ネットワーク(WAN)、インターネット、イントラネット、エクストラネット等に用いられる有線ネットワーク、あるいは無線通信ネットワーク、さらにこれらの組み合わせ等の伝送媒体を用いて伝送させてもよく、また、搬送波に乗せて搬送させてもよい。
さらに、前記のプログラムは、他のプログラムの一部分であってもよく、あるいは別個のプログラムと共に記録媒体に記録されていてもよい。また、複数の記録媒体に分割して
記録されていてもよい。また、圧縮や暗号化など、復元可能であればどのような態様で記録されていてもよい。
The program described above may be provided by being stored in a recording medium, or the program may be provided by communication means. In that case, for example, the above-described program may be regarded as an invention of a “computer-readable recording medium recording the program”.
The “computer-readable recording medium on which a program is recorded” refers to a computer-readable recording medium on which a program is recorded, which is used for program installation, execution, program distribution, and the like.
The recording medium is, for example, a digital versatile disc (DVD), which is a standard established by the DVD Forum, such as “DVD-R, DVD-RW, DVD-RAM,” and DVD + RW. Standard “DVD + R, DVD + RW, etc.”, compact disc (CD), read-only memory (CD-ROM), CD recordable (CD-R), CD rewritable (CD-RW), Blu-ray disc ( Blu-ray Disc (registered trademark), magneto-optical disk (MO), flexible disk (FD), magnetic tape, hard disk, read-only memory (ROM), electrically erasable and rewritable read-only memory (EEPROM), flash Includes memory, random access memory (RAM), etc. .
The program or a part of the program may be recorded on the recording medium for storage or distribution. Also, by communication, for example, a local area network (LAN), a metropolitan area network (MAN), a wide area network (WAN), a wired network used for the Internet, an intranet, an extranet, etc., or wireless communication It may be transmitted using a transmission medium such as a network or a combination of these, or may be carried on a carrier wave.
Furthermore, the program may be a part of another program, or may be recorded on a recording medium together with a separate program. Moreover, it may be divided and recorded on a plurality of recording media. Further, it may be recorded in any manner as long as it can be restored, such as compression or encryption.

110A…対象画像受付モジュール
110B…参照画像受付モジュール
120A、120B…ハフ変換モジュール
130…回転角検出モジュール
140…ハフ表現点列生成モジュール
150…拡縮率・位置ずれ量検出モジュール
152…制御モジュール
154…点列対応付モジュール
156…第2のハフ変換モジュール
158…拡縮率・位置ずれ量検出処理モジュール
160…検出成功判断処理モジュール
162…組み合わせ・反転処理モジュール
170…出力モジュール
110A ... Target image reception module 110B ... Reference image reception module 120A, 120B ... Hough conversion module 130 ... Rotation angle detection module 140 ... Hough expression point sequence generation module 150 ... Enlargement / reduction ratio / position shift amount detection module 152 ... Control module 154 ... Point Column association module 156... Second Hough conversion module 158... Enlargement / reduction ratio / position shift amount detection processing module 160 .. detection success determination processing module 162.

Claims (6)

罫線を構成要素として含む画像に対して第1の投票関数による変換を行う第1の変換手段と、
前記第1の変換手段による変換結果に基づいて、前記画像の回転角を検出する回転角検出手段と、
前記回転角検出手段によって検出された回転角に基づいて、前記第1の変換手段による変換結果を、第1の点列と第2の点列として生成する点列生成手段と、
対象とする第1の画像に対する前記第1の点列又は前記第2の点列と、参照とする第2の画像に対する前記第1の点列又は前記第2の点列を対応付ける点列対応付手段と、
前記点列対応付手段による点列の対応付けによって定まる線に対して第2の投票関数による変換を行う第2の変換手段と、
前記第2の変換手段による変換結果に基づいて、前記第2の画像に対する前記第1の画像の位置ずれ量及び拡縮率を検出する検出手段
を具備することを特徴とする画像処理装置。
First conversion means for converting an image including a ruled line as a component by a first voting function;
A rotation angle detection means for detecting a rotation angle of the image based on a conversion result by the first conversion means;
A point sequence generation unit that generates a conversion result by the first conversion unit as a first point sequence and a second point sequence based on the rotation angle detected by the rotation angle detection unit;
Point sequence correspondence for associating the first point sequence or the second point sequence with respect to the first image as a target with the first point sequence or the second point sequence with respect to the second image as a reference Means,
Second conversion means for performing conversion by a second voting function for a line determined by the point sequence association by the point sequence association means;
An image processing apparatus comprising: a detection unit configured to detect a positional deviation amount and a scaling ratio of the first image with respect to the second image based on a conversion result obtained by the second conversion unit.
前記第2の変換手段による変換結果と予め定められた値とを比較して、前記検出手段による検出結果が成功であるか否かを判断する判断手段
をさらに具備することを特徴とする請求項1に記載の画像処理装置。
The apparatus further comprises: a determination unit that compares the conversion result by the second conversion unit with a predetermined value to determine whether the detection result by the detection unit is successful. The image processing apparatus according to 1.
前記判断手段によって成功ではないと判断された場合は、前記点列対応付手段による点列の対応付けを変更する対応付変更手段
をさらに具備し、
前記第2の変換手段は、前記対応付変更手段によって変更された点列の対応付けによって定まる線に対して第2の投票関数による変換を行う
ことを特徴とする請求項2に記載の画像処理装置。
If it is determined that the determination means is not successful, the method further includes a correspondence changing means for changing the correspondence of the point sequence by the point sequence correspondence means,
3. The image processing according to claim 2, wherein the second conversion unit performs conversion by a second voting function with respect to a line determined by association of the point sequence changed by the association changing unit. apparatus.
前記判断手段は成功と判断した場合、前記参照とする画像は、前記対象とする画像に類似していると判断する
ことを特徴とする請求項2又は3に記載の画像処理装置。
The image processing apparatus according to claim 2, wherein when the determination unit determines that the image is a success, the image to be referred to is determined to be similar to the target image.
前記判断手段は成功と判断した場合、前記参照とする画像は、前記対象とする画像の検索結果であると判断する
ことを特徴とする請求項2又は3に記載の画像処理装置。
4. The image processing apparatus according to claim 2, wherein when the determination unit determines that the image is a success, the image to be referred to is determined as a search result of the target image. 5.
コンピュータを、
罫線を構成要素として含む画像に対して第1の投票関数による変換を行う第1の変換手段と、
前記第1の変換手段による変換結果に基づいて、前記画像の回転角を検出する回転角検出手段と、
前記回転角検出手段によって検出された回転角に基づいて、前記第1の変換手段による変換結果を、第1の点列と第2の点列として生成する点列生成手段と、
対象とする第1の画像に対する前記第1の点列又は前記第2の点列と、参照とする第2の画像に対する前記第1の点列又は前記第2の点列を対応付ける点列対応付手段と、
前記点列対応付手段による点列の対応付けによって定まる線に対して第2の投票関数による変換を行う第2の変換手段と、
前記第2の変換手段による変換結果に基づいて、前記第2の画像に対する前記第1の画像の位置ずれ量及び拡縮率を検出する検出手段
として機能させることを特徴とする画像処理プログラム。
Computer
First conversion means for converting an image including a ruled line as a component by a first voting function;
A rotation angle detection means for detecting a rotation angle of the image based on a conversion result by the first conversion means;
A point sequence generation unit that generates a conversion result by the first conversion unit as a first point sequence and a second point sequence based on the rotation angle detected by the rotation angle detection unit;
Point sequence correspondence for associating the first point sequence or the second point sequence with respect to the first image as a target with the first point sequence or the second point sequence with respect to the second image as a reference Means,
Second conversion means for performing conversion by a second voting function for a line determined by the point sequence association by the point sequence association means;
An image processing program that functions as a detection unit that detects a positional deviation amount and an enlargement / reduction ratio of the first image with respect to the second image based on a conversion result obtained by the second conversion unit.
JP2009059460A 2009-03-12 2009-03-12 Image processor and image processing program Pending JP2010211699A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009059460A JP2010211699A (en) 2009-03-12 2009-03-12 Image processor and image processing program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009059460A JP2010211699A (en) 2009-03-12 2009-03-12 Image processor and image processing program

Publications (1)

Publication Number Publication Date
JP2010211699A true JP2010211699A (en) 2010-09-24

Family

ID=42971752

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009059460A Pending JP2010211699A (en) 2009-03-12 2009-03-12 Image processor and image processing program

Country Status (1)

Country Link
JP (1) JP2010211699A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2434386A1 (en) 2010-09-22 2012-03-28 Konica Minolta Business Technologies, Inc. Image processing apparatus, method and program with gradual changes between dispalyed menu windows.
CN104284053A (en) * 2013-07-08 2015-01-14 富士施乐株式会社 Tilt angle correction apparatus, image reader, image forming apparatus, and program

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2434386A1 (en) 2010-09-22 2012-03-28 Konica Minolta Business Technologies, Inc. Image processing apparatus, method and program with gradual changes between dispalyed menu windows.
CN104284053A (en) * 2013-07-08 2015-01-14 富士施乐株式会社 Tilt angle correction apparatus, image reader, image forming apparatus, and program
JP2015015687A (en) * 2013-07-08 2015-01-22 富士ゼロックス株式会社 Inclination angle correction device, image reading device, and image forming apparatus, and program

Similar Documents

Publication Publication Date Title
KR101235226B1 (en) Image processor and image processing method and recording medium
US20080199081A1 (en) Image processing apparatus, image processing method and computer-readable medium
JP6187323B2 (en) Image processing apparatus and image processing program
US9392140B2 (en) Image processing apparatus
JP2017174030A (en) Image processing apparatus and image processing program
JP2009223477A (en) Information processor and information processing program
JP2010211699A (en) Image processor and image processing program
JP5365440B2 (en) Image processing apparatus and image processing program
JP2018045359A (en) Image processing device and image processing program
JPH1125215A (en) Method and device for discriminating sort of document, and recording medium
JP5251489B2 (en) Image processing apparatus and image processing program
JP5742367B2 (en) Image processing apparatus and image processing program
JP5742283B2 (en) Image processing apparatus and image processing program
JP4840388B2 (en) Image processing apparatus and image processing program
JP6323009B2 (en) Image processing apparatus and image processing program
JP6468415B2 (en) Image processing apparatus and image processing program
JP6003375B2 (en) Image processing apparatus and image processing program
JP6252091B2 (en) Image processing apparatus and image processing program
JP6244805B2 (en) Image processing apparatus and image processing program
JP4882929B2 (en) Image processing apparatus and image processing program
US20150103363A1 (en) Image processing apparatus
JP2012022359A (en) Image processing device and image processing program
JP4978437B2 (en) Image processing apparatus and image processing program
JP2011065311A (en) Image processor and image processing program
JP3932201B2 (en) Form type identification device and recording medium