JP2011039896A - Image processing apparatus and computer program - Google Patents

Image processing apparatus and computer program Download PDF

Info

Publication number
JP2011039896A
JP2011039896A JP2009188157A JP2009188157A JP2011039896A JP 2011039896 A JP2011039896 A JP 2011039896A JP 2009188157 A JP2009188157 A JP 2009188157A JP 2009188157 A JP2009188157 A JP 2009188157A JP 2011039896 A JP2011039896 A JP 2011039896A
Authority
JP
Japan
Prior art keywords
image
line segment
feature quantity
unit
deriving
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2009188157A
Other languages
Japanese (ja)
Other versions
JP5418057B2 (en
Inventor
Teruka Saito
照花 斎藤
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 JP2009188157A priority Critical patent/JP5418057B2/en
Publication of JP2011039896A publication Critical patent/JP2011039896A/en
Application granted granted Critical
Publication of JP5418057B2 publication Critical patent/JP5418057B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Processing (AREA)
  • Editing Of Facsimile Originals (AREA)
  • Image Analysis (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To derive a feature quantity characterizing an image having a frame from a correctly determined layout of segments constituting the frame even when the image is rotated, translated, scaled or otherwise distorted. <P>SOLUTION: An image processing apparatus 1 includes a segment extraction means for extracting segments included in an image, a segment selection means for selecting segments out of the extracted segments according to a predetermined standard, a feature quantity derivation means for selecting segments substantially parallel to the respective edges of the image out of the selected segments according to the distance from each edge and deriving a feature quantity characterizing the image, a linear map derivation means for deriving a linear map that matches the feature quantity of an image to the feature quantity of another image selected according to the size of an area enclosed by the segments selected by the feature quantity derivation means, and an image comparison means for comparing the latter image and the former image transformed via the linear map derived by the linear map derivation means. <P>COPYRIGHT: (C)2011,JPO&INPIT

Description

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

特許文献1には、入力画像データと、出力プリント画像を測定し、該測定された出力プリント画像データについて画像のエッジ、極大点又は極小点のいずれかによる画像特徴量を算出し、該画像特徴量に基づいて、入力画像データと出力プリント画像データの対応する画像の位置関係及び位置ずれ量を求め、歪み補正式を算出する画像歪み補正方法が記載されている。   In Patent Document 1, input image data and an output print image are measured, and an image feature amount based on one of an edge, a maximum point, and a minimum point of the image is calculated for the measured output print image data. An image distortion correction method is described in which, based on the amount, the positional relationship and displacement amount of the corresponding images of the input image data and the output print image data are obtained, and a distortion correction formula is calculated.

特許文献2には、罫線を有する帳票の画像A及び画像Bについて、横黒ラン・ヒストグラム及び縦黒ラン・ヒストグラムを作成し、画像Aについての黒ラン・ヒストグラムと画像Bについての黒ラン・ヒストグラムを比較して両者のずれを検出する画像のずれ検出方法が記載されている。   In Patent Document 2, a horizontal black run histogram and a vertical black run histogram are created for the image A and the image B of a form having ruled lines, and the black run histogram for the image A and the black run histogram for the image B are created. Describes a method for detecting a shift of an image by detecting a shift between the two.

特許文献3には、罫線を有する帳票の参照画像及び入力画像について、帳簿上辺の傾き方向を考慮してx軸投影ヒストグラム及びy軸投影ヒストグラムを生成し、それぞれ検出されたピーク値を罫線の存在する座標として検出し、参照画像と入力画像の各々に対する罫線の存在する座標の差が事前に設定したしきい値よりも小さいもの同士を対応付けることにより、両者の位置ずれ量を検出するプレ印刷除去装置が記載されている。同装置は、検出された位置ずれ量に基づいて座標変換を行い、画像を照合する。   In Patent Document 3, an x-axis projection histogram and a y-axis projection histogram are generated for a reference image and an input image of a form having ruled lines in consideration of the inclination direction of the upper side of the book, and the detected peak values are used for the existence of ruled lines. Pre-print removal that detects the amount of misalignment of the reference image and the input image by associating the reference image and the input image where the difference between the coordinates where the ruled line exists is smaller than a preset threshold value An apparatus is described. The apparatus performs coordinate conversion based on the detected amount of displacement and collates the images.

特開2001−186337号公報JP 2001-186337 A 特開平11−120288号公報JP-A-11-120288 特開2002−57873号公報JP 2002-57873 A

本発明は、回転・平行移動・拡大縮小等により互いに変形している複数の画像について、かかる変形の程度がある限度よりも大きい場合に、かかる変形を除去して一の画像と他の画像を比較することができないという問題を解決することを目的とする。   In the present invention, when a plurality of images that are deformed by rotation, parallel movement, enlargement / reduction, etc. are larger than a certain limit, the deformation is removed and one image and another image are removed. The aim is to solve the problem of being unable to compare.

上記課題を解決するために、本発明の請求項1に係る画像処理装置は、画像に含まれる線分を抽出する線分抽出手段と、抽出された前記線分のうち、予め定められた基準に基づき線分を選別する線分選別手段と、選別された前記線分のうち、前記画像の各端縁にそれぞれ略平行である線分を該各端縁からの距離に基づき選び、前記画像を特徴づける特徴量を導出する特徴量導出手段と、前記特徴量導出手段により選ばれた線分により囲まれる領域の大きさに基づき選定された一の画像の特徴量に他の画像の特徴量を一致させる線形写像を導出する線形写像導出手段と、前記一の画像と、前記線形写像導出手段により導出された線形写像により変換された他の画像とを比較する画像比較手段と、を有する。   In order to solve the above-described problem, an image processing apparatus according to claim 1 of the present invention includes a line segment extracting unit that extracts a line segment included in an image, and a predetermined reference among the extracted line segments. A line segment selecting means for selecting a line segment based on the line segment, a line segment that is substantially parallel to each edge of the image is selected based on the distance from each edge of the selected line segment, and the image A feature amount deriving unit for deriving a feature amount that characterizes the image, and a feature amount of one image selected based on a size of an area surrounded by a line segment selected by the feature amount deriving unit Linear mapping deriving means for deriving a linear mapping that matches the image, and image comparing means for comparing the one image with another image converted by the linear mapping derived by the linear mapping deriving means.

また、本発明の請求項2に係る画像処理装置は、請求項1記載の画像処理装置であって、前記画像に含まれる図形の一部分を抽出し、当該一部分を新たに前記画像とする一部分抽出手段を有する。   An image processing apparatus according to claim 2 of the present invention is the image processing apparatus according to claim 1, wherein a part of a graphic included in the image is extracted, and the part is newly extracted as the image. Have means.

また、本発明の請求項3に係る画像処理装置は、請求項2記載の画像処理装置であって、前記一部分抽出手段は、前記画像の外縁又は外縁近傍の少なくとも一点を起点とする塗りつぶし処理により得られる図形の輪郭を示す図形である輪郭図形を取得する輪郭図形取得手段を有する。   An image processing apparatus according to claim 3 of the present invention is the image processing apparatus according to claim 2, wherein the partial extraction unit performs a filling process starting from at least one point near the outer edge or the outer edge of the image. Contour graphic acquisition means for acquiring a contour graphic, which is a graphic indicating the contour of the obtained graphic.

また、本発明の請求項4に係る画像処理装置は、請求項2又は3記載の画像処理装置であって、前記一部分抽出手段は、前記画像に含まれる連結した図形である連結図形を識別する連結図形識別手段と、前記連結図形のうち、最大の連結図形である最大連結図形を取得する最大連結図形取得手段と、を有する。   An image processing apparatus according to a fourth aspect of the present invention is the image processing apparatus according to the second or third aspect, wherein the partial extraction unit identifies a connected graphic that is a connected graphic included in the image. Connected figure identifying means; and maximum connected figure obtaining means for obtaining a maximum connected figure which is the largest connected figure among the connected figures.

また、本発明の請求項5に係る画像処理装置は、請求項1乃至4の何れかに記載の画像処理装置であって、一の前記画像について得られた前記特徴量を記憶する特徴量記憶手段と、前記特徴量記憶手段に記憶された前記特徴量に基づいて、前記線分抽出手段が他の前記画像について線分を抽出する範囲を制限する線分抽出範囲制限手段と、を有する。   An image processing apparatus according to a fifth aspect of the present invention is the image processing apparatus according to any one of the first to fourth aspects, wherein the feature quantity storage stores the feature quantity obtained for one image. And a line segment extraction range limiting unit that limits a range in which the line segment extraction unit extracts a line segment for the other image based on the feature amount stored in the feature amount storage unit.

また、本発明の請求項6に係るコンピュータプログラムは、コンピュータを、画像に含まれる線分を抽出する線分抽出手段と、抽出された前記線分のうち、予め定められた基準に基づき線分を選別する線分選別手段と、選別された前記線分のうち、前記画像の各端縁に略平行である線分を該各端縁からの距離に基づき選び、前記画像を特徴づける特徴量を導出する特徴量導出手段と、前記特徴量導出手段により選ばれた線分により囲まれる領域の大きさに基づき選定された一の画像の特徴量に他の画像の特徴量を一致させる線形写像を導出する線形写像導出手段と、前記一の画像と、前記線形写像導出手段により導出された線形写像により変換された他の画像とを比較する画像比較手段と、として機能させる。   According to a sixth aspect of the present invention, there is provided a computer program comprising: a line segment extracting means for extracting a line segment included in an image; and a line segment based on a predetermined criterion among the extracted line segments. A line segment selecting means for selecting a line segment, a line segment that is substantially parallel to each edge of the image among the selected line segments is selected based on a distance from each edge, and a feature amount that characterizes the image And a linear mapping that matches the feature quantity of one image with the feature quantity of one image selected based on the size of the region surrounded by the line segment selected by the feature quantity derivation means The linear mapping deriving means for deriving the image, and the image comparing means for comparing the one image with another image converted by the linear mapping derived by the linear mapping deriving means.

上記請求項1に係る画像処理装置によれば、回転・平行移動・拡大縮小等により互いに変形している複数の画像について、かかる変形の程度がある限度よりも大きい場合であっても、かかる変形を除去して一の画像と他の画像を比較することができる。   According to the image processing apparatus of the first aspect, even when a plurality of images deformed by rotation, parallel movement, enlargement / reduction, and the like are deformed to each other, the deformation is larger than a certain limit. And one image can be compared with another image.

また、上記請求項2に係る画像処理装置によれば、本請求項に特定される構成を有しない画像処理装置に比して、線分を抽出する際の計算量を低減できる。   Further, according to the image processing device of the second aspect, it is possible to reduce the amount of calculation when extracting line segments, compared to an image processing device that does not have the configuration specified in the present claim.

また、上記請求項3に係る画像処理装置によれば、枠内部の図形を線分を抽出する対象から除外することができる。   Further, according to the image processing apparatus of the third aspect, it is possible to exclude the figure inside the frame from the target for extracting the line segment.

また、上記請求項4に係る画像処理装置によれば、枠以外の図形を線分を抽出する対象から除外することができる。   Further, according to the image processing apparatus of the fourth aspect, it is possible to exclude graphics other than the frame from the target for extracting the line segment.

また、上記請求項5に係る画像処理装置によれば、一度特徴量を導出した画像と同種の枠を有する画像の特徴量を導出する際に、本請求項に特定される構成を有しない画像処理装置に比して、線分を抽出する際の計算量を低減できる。   Further, according to the image processing apparatus of the fifth aspect, when deriving the feature amount of the image having the same kind of frame as the image from which the feature amount has been derived, the image not having the configuration specified in the present claim Compared to the processing apparatus, the amount of calculation when extracting line segments can be reduced.

また、上記請求項6に係るコンピュータプログラムによれば、コンピュータにより回転・平行移動・拡大縮小等により互いに変形している複数の画像について、かかる変形の程度がある限度よりも大きい場合であっても、かかる変形を除去して一の画像と他の画像を比較することができる。   Further, according to the computer program according to the sixth aspect, even when a plurality of images deformed with each other by rotation, parallel movement, enlargement / reduction, etc. by the computer, the degree of the deformation is larger than a certain limit. By removing such deformation, one image can be compared with another image.

本発明の実施形態の一例である画像処理装置の機能ブロック図である。1 is a functional block diagram of an image processing apparatus that is an example of an embodiment of the present invention. 画像特徴量導出部の機能ブロック図である。It is a functional block diagram of an image feature-value deriving unit. 画像受付部によって受け付けられた第1の画像である。It is the 1st image received by the image reception part. 塗りつぶし処理後の第1の画像を示す図である。It is a figure which shows the 1st image after a filling process. 輪郭取得後の第1の画像を示す図である。It is a figure which shows the 1st image after the outline acquisition. 最大の連結図形のみが残された第1の画像を示す図である。It is a figure which shows the 1st image in which only the largest connection figure was left. 最大連結図形取得処理のみを施された第1の画像を示す図である。It is a figure which shows the 1st image to which only the largest connection figure acquisition process was performed. 図6の第1の画像をハフ変換して得られるr−θ平面上のプロットの例である。7 is an example of a plot on an r-θ plane obtained by Hough transforming the first image of FIG. 6. 線分選別部が第3の基準を採用した場合の、第1の画像の特徴量である交点の位置を示す図である。It is a figure which shows the position of the intersection which is the feature-value of a 1st image when a line segment selection part employ | adopts the 3rd reference | standard. 第2の画像を示す図である。It is a figure which shows a 2nd image. 線分抽出対象外とする領域を示す図である。It is a figure which shows the area | region excluded from line segment extraction object. 傾き、位置、大きさが修正された第2の画像である。It is the 2nd image by which inclination, a position, and a size were corrected. 差分画像を示す図である。It is a figure which shows a difference image.

図1は、本発明の実施形態の一例である画像処理装置1の機能ブロック図である。   FIG. 1 is a functional block diagram of an image processing apparatus 1 that is an example of an embodiment of the present invention.

画像処理装置1は、物理的には汎用の情報処理装置である、CPU(Central Processing Unit)、メモリ、入出力インタフェース、モニタ及び外部記憶装置等を有する一般的なコンピュータを用いて実現される。そして、かかるコンピュータ上で、コンピュータを画像処理装置1として動作させるためのコンピュータプログラムを実行することにより、画像処理装置1は仮想的に実現される。コンピュータを画像処理装置1として動作させるためのコンピュータプログラムは、たとえばDVD−ROM(DVD−Read Only Memory)やCD−ROM(Compact Disk Read Only Memory)等の任意の情報記録媒体に記録して提供しても、インターネットに代表される公衆回線等の電気通信回線を介して、コンピュータ読み取り可能な電気信号として提供してもよい。もちろん、画像処理装置1を実現するにあたり、必ずしも汎用の情報処理装置を用いずともよく、専用の装置を製作しても、また、コピー機やファクシミリ等の事務機器に実装あるいは追加されるモジュールとして構成してもよい。   The image processing apparatus 1 is realized by using a general computer having a CPU (Central Processing Unit), a memory, an input / output interface, a monitor, an external storage device, and the like that are physically general-purpose information processing apparatuses. And the image processing apparatus 1 is virtually implement | achieved by running the computer program for operating a computer as the image processing apparatus 1 on this computer. A computer program for operating the computer as the image processing apparatus 1 is provided by being recorded on an arbitrary information recording medium such as a DVD-ROM (DVD-Read Only Memory) or a CD-ROM (Compact Disk Read Only Memory). Alternatively, it may be provided as a computer-readable electric signal via an electric communication line such as a public line typified by the Internet. Of course, it is not always necessary to use a general-purpose information processing apparatus for realizing the image processing apparatus 1, and even if a dedicated apparatus is manufactured, or as a module mounted or added to office equipment such as a copier or a facsimile machine. It may be configured.

なお、図示された画像処理装置1の機能ブロック図は、コンピュータプログラムにより実現される画像処理装置1を、説明の便宜上、その機能に着目して展開し示したものであり、必ずしも各機能ブロックが物理的に存在するとは限らない。   Note that the functional block diagram of the illustrated image processing apparatus 1 shows the image processing apparatus 1 realized by a computer program in terms of its functions for convenience of explanation, and each functional block is not necessarily included. It does not necessarily exist physically.

画像処理装置1は、画像を受け付ける画像受付部2、第1の画像を記憶する第1の画像記憶部3、第2の画像を記憶する第2の画像記憶部4、受け付けた画像から、その画像の特徴量を導出する画像特徴量導出部5と、得られた特徴量を記憶する第1の特徴量記憶部6及び第2の特徴量記憶部7、線形写像導出部8、画像変換部9、画像比較部10及び差分画像出力部11を有する。   The image processing apparatus 1 includes an image receiving unit 2 that receives an image, a first image storage unit 3 that stores a first image, a second image storage unit 4 that stores a second image, and the received image An image feature quantity deriving unit 5 for deriving image feature quantities, a first feature quantity storage unit 6 and a second feature quantity storage unit 7 for storing the obtained feature quantities, a linear mapping deriving unit 8, and an image conversion unit 9 and an image comparison unit 10 and a difference image output unit 11.

なお、ここでいう画像とは、ビットマップ等のいわゆるラスターイメージデータであり、また、その周縁に枠を有しているものであることが好ましい。枠は、概ね矩形であれば足り、厳密に矩形である必要はない。かかる画像の内容は特に限定されないが、そのような画像の代表的な例を挙げると、図面の画像、帳票類の画像、MSDS(Material Safety Data Sheet)等のデータシート類などである。以降の本実施形態の説明では、図面の画像を例として説明するが、これに限定する意図ではない。   The image referred to here is so-called raster image data such as a bitmap, and preferably has a frame around its periphery. The frame need only be generally rectangular, and need not be strictly rectangular. The content of such an image is not particularly limited, but typical examples of such an image include a drawing image, a form image, and a data sheet such as MSDS (Material Safety Data Sheet). In the following description of the present embodiment, the image of the drawing will be described as an example, but the present invention is not intended to be limited to this.

また、特徴量とは、画像を特徴づける量であり、より詳しくは、画像に含まれる図形が画像内において占める位置、大きさ、回転角度を示す量である。どのような値を特徴量として用いるかは特に限定されないが、一例として、画像に含まれる枠を構成する線分の位置を示す情報は特徴量である。そのような情報は、各線分が画像中に配置される位置や角度を直接示す値であってもよいし、各線分の交点、すなわち、枠の角に当たる点の座標であってもよい。   The feature amount is an amount that characterizes the image. More specifically, the feature amount is an amount that indicates a position, a size, and a rotation angle that a graphic included in the image occupies in the image. Although what value is used as a feature amount is not particularly limited, as an example, information indicating the position of a line segment constituting a frame included in an image is a feature amount. Such information may be a value that directly indicates the position or angle at which each line segment is arranged in the image, or may be the coordinates of the intersection point of each line segment, that is, the point that corresponds to the corner of the frame.

画像受付部2は、外部より画像の電子データを受け付けるインタフェースである。この画像受付部2は、画像を受け付けることができればどのようなものであってもよいが、具体的には、LAN(Local Area Network)やインターネット等の公衆回線を含むWAN(Wide Area Network)に接続された電気通信回線、任意の情報記録媒体読取装置、紙媒体を読み取るスキャナ等が考えられる。   The image receiving unit 2 is an interface that receives electronic image data from the outside. The image receiving unit 2 may be anything as long as it can receive an image. Specifically, the image receiving unit 2 is connected to a WAN (Wide Area Network) including a public line such as a LAN (Local Area Network) or the Internet. A connected telecommunication line, an arbitrary information recording medium reading device, a scanner for reading a paper medium, and the like are conceivable.

画像受付部2により第1の画像が受け付けられると、第1の画像記憶部3に記憶され、画像特徴量導出部5へと受け渡される。また、第2の画像が受け付けられると、第2の画像記憶部4に記憶され、同じく画像特徴量導出部5へと受け渡される。   When the first image is received by the image receiving unit 2, it is stored in the first image storage unit 3 and transferred to the image feature quantity deriving unit 5. When the second image is received, the second image is stored in the second image storage unit 4 and transferred to the image feature amount deriving unit 5.

図2は、画像特徴量導出部5の機能ブロック図である。以下、画像特徴量導出部5の動作を具体例を参照しつつ説明する。   FIG. 2 is a functional block diagram of the image feature quantity deriving unit 5. Hereinafter, the operation of the image feature quantity deriving unit 5 will be described with reference to specific examples.

図3は、画像受付部2(図1参照)によって受け付けられた第1の画像100である。第1の画像100は、紙にプリントアウトされた図面をスキャナで電子データとして取り込んだものである。第1の画像100は、矩形の枠101のほか、図面のタイトル等を記入するタイトル欄102、承認印あるいは署名を記入する承認欄103、部品表等の外枠104、枠101内に描かれた図形105等を含んでいる。もちろん、これは説明のための一例であり、第1の画像をかかる具体例に限定する意図ではない。また、第1の画像100は白色の背景に黒色で枠101等が描かれているものとしているが、これも一例であり、白黒を反転させても、異なる色調を用いてもよい。   FIG. 3 is a first image 100 received by the image receiving unit 2 (see FIG. 1). The first image 100 is obtained by capturing a drawing printed out on paper as electronic data with a scanner. The first image 100 is drawn in a rectangular frame 101, a title column 102 for entering a drawing title, an approval column 103 for entering an approval mark or signature, an outer frame 104 for a parts table, and the frame 101. The figure 105 etc. are included. Of course, this is an example for explanation, and is not intended to limit the first image to such a specific example. The first image 100 is assumed to have a black background and a frame 101 etc. drawn on a white background, but this is also an example, and black and white may be reversed or different tones may be used.

図2に戻り、画像受付部2で受け付けられた第1の画像100は第1の画像記憶部3より画像補正部12に受け渡され、必要であれば補正を施される。ここでなされる補正は、後述の画像処理を円滑に進めるためのものであり、公知の種々の補正を必要に応じ行ってよい。それらの補正には、グレースケールまたはフルカラーの画像を白黒の2値画像に変換する2値化処理、かすれなどによる画像中の線分の途切れを補償する途切れ補償、画像中のノイズを除去するノイズ除去等様々なものがあるが、本実施形態では、2値化処理を行っている。2値化処理は、ある輝度のしきい値を定め、画像中の各画素の輝度が当該しきい値を下回れば黒、上回れば白とすればよい。   Returning to FIG. 2, the first image 100 received by the image receiving unit 2 is transferred from the first image storage unit 3 to the image correction unit 12 and is corrected if necessary. The correction performed here is for smoothly proceeding with image processing described later, and various known corrections may be performed as necessary. These corrections include binarization processing that converts a grayscale or full-color image into a black and white binary image, discontinuity compensation that compensates for discontinuity of line segments in the image due to blurring, and noise that eliminates noise in the image. There are various types such as removal, but in this embodiment, binarization processing is performed. In the binarization process, a threshold value of a certain luminance is determined, and black may be set if the luminance of each pixel in the image is lower than the threshold value, and white if the luminance is higher.

続いて第1の画像100は、線分抽出部18が線分を抽出する範囲を制限する線分抽出範囲制限手段として機能する線分抽出範囲制限部13へと渡される。線分抽出範囲制限部13の動作については後ほど詳述する。   Subsequently, the first image 100 is passed to the line segment extraction range limiting unit 13 that functions as a line segment extraction range limiting unit that limits the range in which the line segment extraction unit 18 extracts line segments. The operation of the line segment extraction range restriction unit 13 will be described in detail later.

さらに第1の画像100は、画像に含まれる図形の一部分を抽出し、当該一部分を新たに前記画像とする一部分抽出手段として機能する一部分抽出部14に受け渡される。一部分抽出部14は、画像の外縁又は外縁近傍の少なくとも一点を起点とする塗りつぶし処理により得られる図形の輪郭を示す図形である輪郭図形を取得する輪郭図形取得手段として機能する輪郭図形取得部15、画像に含まれる連結した図形である連結図形を識別する連結図形識別手段として機能する連結図形識別部16、連結図形のうち、最大の連結図形である最大連結図形を取得する最大連結図形取得手段として機能する最大連結図形取得部17を有している。   Further, the first image 100 is delivered to a partial extraction unit 14 that functions as a partial extraction unit that extracts a part of a graphic included in the image and newly uses the part as the image. The partial extraction unit 14 includes a contour graphic acquisition unit 15 that functions as a contour graphic acquisition unit that acquires a contour graphic that is a graphic indicating a contour of a graphic obtained by a filling process starting from at least one point in the vicinity of the outer edge or the outer edge of the image. As a connected figure identifying unit 16 that functions as a connected figure identifying means for identifying a connected figure that is a connected figure included in an image, as a maximum connected figure obtaining means for obtaining a maximum connected figure that is the largest connected figure among the connected figures. It has the maximum connected figure acquisition part 17 which functions.

まず、第1の画像100は輪郭図形取得部15に受け渡される。輪郭図形取得部15は、まず、第1の画像100の周辺の少なくとも一点を起点とした塗りつぶし処理を行う。この塗りつぶし処理は周知の手法によってよい。図4は、塗りつぶし処理後の第1の画像106を示しており、図中網掛けで示した部分が塗りつぶし処理された領域である。   First, the first image 100 is transferred to the contour graphic acquisition unit 15. The contour graphic acquisition unit 15 first performs a painting process starting from at least one point around the first image 100. This painting process may be performed by a known method. FIG. 4 shows the first image 106 after the filling process, and the shaded portion in the drawing is an area where the filling process has been performed.

そして、輪郭図形取得部15は、塗りつぶし処理された領域の輪郭を取得する。輪郭の取得は公知の手法を用いてよく、その一例としては、微分フィルタの適用が挙げられる。図5は、輪郭取得後の第1の画像107を示す図である。図3と比較すると、枠100内部のタイトル欄102や図形105は排除され、枠100と承認欄103の外形及び外枠104が残されている。輪郭図形取得部15は、この画像処理後の第1の図形107を連結図形識別部16へと受け渡す。なお、ここで、塗りつぶし処理された領域の輪郭を取得する前の段階で、画像の白黒を反転してもよい。   Then, the contour graphic acquisition unit 15 acquires the contour of the region subjected to the fill processing. A well-known method may be used for acquisition of the contour, and an example thereof is application of a differential filter. FIG. 5 is a diagram showing the first image 107 after the contour acquisition. Compared with FIG. 3, the title column 102 and the graphic 105 inside the frame 100 are excluded, and the outer shape and the outer frame 104 of the frame 100 and the approval column 103 remain. The contour graphic acquisition unit 15 delivers the first graphic 107 after the image processing to the connected graphic identification unit 16. Here, the black and white of the image may be inverted before the outline of the region that has been subjected to the filling process is acquired.

連結図形識別部16は、第1の画像107に含まれる図形を、連結しているもの毎(すなわち、連結図形毎)に区分し、識別する。この処理は、画像処理において一般にラベリングとして知られている処理であってよい。具体的には、第1の画像107に含まれるある黒色の画素に識別情報を付与し、当該画素に隣接する黒色の画素にさらに同じ識別情報を付与し、という動作を繰り返すことにより、第1の画像107に含まれるすべての黒色画素に対し、連結している図形毎に異なる識別情報を付与する。その結果、図5中に示すように、第1の画像107中の枠101と承認欄103の外形には識別情報「A」が付与され連結図形Aとして、外枠104には識別情報「B」が付与されて連結図形Bとして識別される。   The connected graphic identification unit 16 classifies and identifies the graphic included in the first image 107 for each connected graphic (that is, for each connected graphic). This process may be a process generally known as labeling in image processing. Specifically, by repeating the operation of giving identification information to a black pixel included in the first image 107 and further giving the same identification information to a black pixel adjacent to the pixel, the first image 107 is obtained. Different identification information is assigned to each connected graphic for all black pixels included in the image 107. As a result, as shown in FIG. 5, the identification information “A” is given to the outer shape of the frame 101 and the approval column 103 in the first image 107 as the connected figure A, and the identification information “B” is displayed in the outer frame 104. "Is given and identified as a connected figure B.

続いて最大連結図形取得部17は、第1の画像107に含まれる連結図形のうち、その大きさが最も大きいものを取得する。ここでは、連結図形Aと連結図形Bの大きさ、特に、その幅及び高さを比較して大きい連結図形である連結図形Aを選択する。なお、大きさの比較には種々の方法があり、特段限定されない。幅及び高さを比較する方法にも、その何れかを用いる方法、両者をそれぞれ比較し優先順位をつける方法、幅と高さの和を用いて比較する方法等がある。また、連結図形の面積あるいは連結図形に外接する矩形の面積を用いて比較するようにしてもよい。その結果、図6に示すように、第1の画像108には最大の連結図形である連結図形Aのみが残される。最大連結図形取得部17は、得られた第1の画像108を線分抽出部18へと受け渡す。   Subsequently, the maximum connected figure obtaining unit 17 obtains the largest connected figure among the connected figures included in the first image 107. Here, the connected figure A, which is a large connected figure, is selected by comparing the sizes of the connected figure A and the connected figure B, in particular, the width and height thereof. Note that there are various methods for comparing the sizes, and there is no particular limitation. As a method for comparing width and height, there are a method using one of them, a method for comparing both of them and giving priority, a method for comparing using the sum of width and height, and the like. Further, the comparison may be performed using the area of the connected figure or the area of the rectangle circumscribing the connected figure. As a result, as shown in FIG. 6, only the connected graphic A, which is the maximum connected graphic, remains in the first image 108. The maximum connected figure acquisition unit 17 delivers the obtained first image 108 to the line segment extraction unit 18.

以上の処理により、第1の画像100(図3参照)からその一部分である連結図形Aが抽出された。本実施形態では、一部分抽出部14において、輪郭図形取得部15による輪郭図形取得処理と、連結図形識別部16及び最大連結図形取得部17による最大連結図形取得処理の両方をこの順で行っているが、この両方は必ずしもなされずとも良く、いずれか一方でもよい。   Through the above processing, the connected figure A as a part thereof is extracted from the first image 100 (see FIG. 3). In the present embodiment, the partial extraction unit 14 performs both the contour graphic acquisition process by the contour graphic acquisition unit 15 and the maximum connected graphic acquisition process by the connected graphic identification unit 16 and the maximum connected graphic acquisition unit 17 in this order. However, both of these may not necessarily be performed, and either one may be used.

まず、輪郭図形取得部15による輪郭図形取得処理のみをする場合は、図5に示した第1の画像107が線分抽出部18に受け渡されることになる。また、連結図形識別部16及び最大連結図形取得部17による最大連結図形取得処理のみをする場合には、図3に示す第1の画像100に対し上述の最大連結図形取得処理がなされることになる。その結果、図7に示す第1の画像109が得られ、同画像中には、最大の連結図形として、枠101、タイトル欄102及び承認欄103からなる連結図形Cのみが含まれている。   First, when only the outline graphic acquisition process by the outline graphic acquisition unit 15 is performed, the first image 107 shown in FIG. 5 is transferred to the line segment extraction unit 18. In addition, when only the maximum connected graphic acquisition process by the connected graphic identification unit 16 and the maximum connected graphic acquisition unit 17 is performed, the above-described maximum connected graphic acquisition process is performed on the first image 100 illustrated in FIG. 3. Become. As a result, the first image 109 shown in FIG. 7 is obtained, and only the connected figure C including the frame 101, the title field 102, and the approval field 103 is included in the image as the largest connected figure.

続いて、第1の画像108(あるいは、第1の画像107又は109)は画像に含まれる線分を抽出する線分抽出手段として機能する線分抽出部18に受け渡される。   Subsequently, the first image 108 (or the first image 107 or 109) is transferred to the line segment extraction unit 18 that functions as a line segment extraction unit that extracts a line segment included in the image.

線分抽出部18は、受け渡された第1の画像108中に含まれる線分を抽出し、その位置及び長さまたは長さに関連する情報を特定する。この線分を抽出する手法は公知の種々のものを用いることができ、代表的な手法としては、ハフ変換、投影分布(ヒストグラム)、追跡等を挙げることができるが、本実施形態では、ノイズなどによる線分の途切れや、連結図形Aの第1の画像108の外形に対する傾きの影響をあまり受けないことから、ハフ変換を採用する。もちろん、ハフ変換以外の手法を採用することは任意である。   The line segment extraction unit 18 extracts a line segment included in the transferred first image 108 and specifies information related to the position and length or length. Various known methods can be used to extract this line segment, and typical methods include Hough transform, projection distribution (histogram), tracking, etc. In this embodiment, noise is extracted. Therefore, the Hough transform is employed because it is not greatly affected by the interruption of the line segment due to the above or the inclination of the connected graphic A with respect to the outer shape of the first image 108. Of course, it is arbitrary to employ a method other than the Hough transform.

ハフ変換により、第1の画像108はr−θ座標に変換され、第1の画像108に含まれる線分は、r−θ平面上の投票数の多い点としてあらわされる。投票数は、線分の長さに関連する量であり、一般に、投票数が多いほど線分の長さは長くなる。r,θの取り方は任意であるが、ここでは、rは第1の画像108の左下の点から線分に対し引いた法線の長さを、θは当該法線の角度を示すものとする。rの範囲は、第1の画像108の横方向長さをX、縦方向の長さをYとすると
0≦r≦√X+Y
となる。また、θの範囲は、半周、すなわち180°の範囲を取れば足るが、ここでは一例として、
−45°≦θ<135°とする。
The first image 108 is converted to r-θ coordinates by the Hough transform, and the line segment included in the first image 108 is represented as a point with a large number of votes on the r-θ plane. The number of votes is an amount related to the length of the line segment. Generally, the greater the number of votes, the longer the length of the line segment. The method of taking r and θ is arbitrary, but here r represents the length of the normal drawn from the lower left point of the first image 108 with respect to the line segment, and θ represents the angle of the normal. And The range of r is 0 ≦ r ≦ √X 2 + Y 2 where X is the horizontal length of the first image 108 and Y is the vertical length.
It becomes. Further, it is sufficient that the range of θ is a half circumference, that is, a range of 180 °, but here, as an example,
−45 ° ≦ θ <135 °.

得られた結果は、抽出された線分のうち、予め定められた基準に基づき線分を選別する線分選別手段として機能する線分選別部19へと受け渡される。図8は、図6の第1の画像108をハフ変換して得られるr−θ平面上のプロットの例である。図中、黒丸で示した点は、ハフ変換により得られた線分を示す点であり、黒丸の大きさは、その投票数、すなわち、線分の長さを反映している。また、黒丸の脇に記したa〜fのアルファベットは、図6中示したa〜fの各線分に対応したものであることを示している。   The obtained result is transferred to a line segment selection unit 19 that functions as a line segment selection unit that selects a line segment based on a predetermined criterion among the extracted line segments. FIG. 8 is an example of a plot on the r-θ plane obtained by Hough transforming the first image 108 of FIG. In the figure, the points indicated by black circles are points indicating line segments obtained by the Hough transform, and the size of the black circles reflects the number of votes, that is, the length of the line segments. Further, alphabets a to f written beside the black circles indicate that they correspond to the respective line segments a to f shown in FIG.

線分選別部19は、これら得られた線分のうち、予め定められた基準に基づき線分を選別する。この基準の定め方には種々のものが考えられる。   The line segment sorting unit 19 sorts line segments based on a predetermined criterion among these obtained line segments. There are various ways to determine this standard.

第1の基準は、もっとも単純なものであり、縦方向、横方向の線分のうち、それぞれ上位n番目までの長さを持つものを選別する基準である。r−θ平面上では、縦方向の線分はθがおおむね0°近傍の値となるので、適当な範囲、例えば、
−5°<θ<5°
の範囲を縦方向の線分とみなせばよい。n=2とすると、図8の例では、点b及びfが選別される。また、横方向の線分はθがおおむね90°近傍の値となるので、適当な範囲、例えば、
85°<θ<95°
の範囲を横方向の線分とみなせばよい。図8の例では、点a及び点eが選別される。なお、ここで示したθの範囲は一例であり、適宜変更してよいことは言うまでもない。
The first standard is the simplest one, and is a standard for selecting the vertical and horizontal line segments having the lengths up to the top nth. On the r-θ plane, the vertical line segment has a value in the vicinity of 0 °, so that an appropriate range, for example,
-5 ° <θ <5 °
Can be regarded as a vertical line segment. If n = 2, the points b and f are selected in the example of FIG. In addition, since the horizontal line segment has a value of θ around 90 °, an appropriate range, for example,
85 ° <θ <95 °
Can be regarded as a horizontal line segment. In the example of FIG. 8, the points a and e are selected. Needless to say, the range of θ shown here is merely an example and may be changed as appropriate.

第2の基準は、第1の画像108を、その中心をとおる垂直線において2分し、それぞれの範囲において、第1の画像108の縦の長さに対し一定割合以上の長さを有する縦方向の線分を選別するとともに、第1の画像108を、その中心をとおる水平線において2分し、それぞれの範囲において、第1の画像108の横の長さに対し一定割合以上の長さを有する横方向の線分を選別する基準である。ここで、一例として、一定割合を70%とする。   The second criterion is to divide the first image 108 into two along a vertical line centered on the first image 108, and in each range, the vertical length has a length equal to or greater than a certain ratio with respect to the vertical length of the first image 108. In addition to selecting the line segment in the direction, the first image 108 is divided into two on the horizontal line passing through the center thereof, and in each range, a length of a certain ratio or more with respect to the horizontal length of the first image 108 is set. This is a standard for selecting a horizontal line segment. Here, as an example, the fixed ratio is 70%.

このとき、第1の画像108の左半分は、
0≦r<X/2
であり、同様に右半分は
X/2≦r<X
であって、縦方向の線分は
−5°<θ<5°
となるから、それぞれの範囲内で長さの条件を満たす線分を選別すればよい。図8の例では、点b及び点fが選別されることになる。
At this time, the left half of the first image 108 is
0 ≦ r <X / 2
Similarly, the right half is X / 2 ≦ r <X
And the vertical line segment is −5 ° <θ <5 °.
Therefore, it is only necessary to select a line segment that satisfies the length condition within each range. In the example of FIG. 8, the point b and the point f are selected.

また、第1の画像の下半分は、
0≦r<Y/2
であり、同様に上半分は
Y/2≦r<Y
であって、縦方向の線分は
85°<θ<95°
となるから、それぞれの範囲内で長さの条件を満たす線分を選別すればよい。図8の例では、点a及び点eが選別されることになる。
The lower half of the first image is
0 ≦ r <Y / 2
Similarly, the upper half is Y / 2 ≦ r <Y
And the vertical line segment is 85 ° <θ <95 °
Therefore, it is only necessary to select a line segment that satisfies the length condition within each range. In the example of FIG. 8, the points a and e are selected.

第3の基準は、第2の基準同様に第1の画像108を、その中心をとおる垂直線において2分し、それぞれの範囲において、最も長い縦方向の線分に対し一定割合以上の長さを有する線分を選別するとともに、第1の画像108を、その中心をとおる水平線において2分し、それぞれの範囲において、最も長い横方向の線分に対し一定割合以上の長さを有する横方向の線分を選別する基準である。ここで、一例として、一定割合を50%とする。   The third criterion divides the first image 108 into two parts along a vertical line passing through the center as in the second criterion, and each area has a length equal to or greater than a certain ratio with respect to the longest vertical line segment. The first image 108 is divided into two on a horizontal line passing through the center of the first image 108, and in each range, the horizontal direction has a length equal to or greater than a certain ratio with respect to the longest horizontal line segment. This is a criterion for selecting the line segment. Here, as an example, the fixed ratio is 50%.

上述のとおり、第1の画像108の左半分は、
0≦r<X/2
であり、同様に右半分は
X/2≦r<X
であって、縦方向の線分は
−5°<θ<5°
となるから、それぞれの範囲内で長さの条件を満たす線分を選別すればよい。図8の例では、最も長い縦方向の線分として点b及び点fがそれぞれ選別される。点dは、点bが示す線分の50%の長さに満たないため、選別されない。
As mentioned above, the left half of the first image 108 is
0 ≦ r <X / 2
Similarly, the right half is X / 2 ≦ r <X
And the vertical line segment is −5 ° <θ <5 °.
Therefore, it is only necessary to select a line segment that satisfies the length condition within each range. In the example of FIG. 8, the point b and the point f are each selected as the longest vertical line segment. The point d is not selected because it does not reach the length of 50% of the line segment indicated by the point b.

また、第1の画像の下半分は、
0≦r<Y/2
であり、同様に上半分は
Y/2≦r<Y
であって、縦方向の線分は
85°<θ<95°
となるから、それぞれの範囲内で長さの条件を満たす線分を選別すればよい。図8の例では、最も長い横方向の線分として点a及び点eがそれぞれ選別され、さらに、点cが、点eが示す線分の50%の長さ以上の長さを持つ線分を示すため、選別される。
The lower half of the first image is
0 ≦ r <Y / 2
Similarly, the upper half is Y / 2 ≦ r <Y
And the vertical line segment is 85 ° <θ <95 °
Therefore, it is only necessary to select a line segment that satisfies the length condition within each range. In the example of FIG. 8, the point a and the point e are selected as the longest horizontal line segment, and the point c is a line segment having a length equal to or greater than 50% of the line segment indicated by the point e. To be selected.

以上説明した基準はいずれを用いてもよいし、これら以外の基準を用いてもよい。第2の基準又は第3の基準を用いると、少なくとも、抽出される縦方向及び横方向の線分が、それぞれ、第1の画像108の中心を挟み両側に位置することになる。   Any of the criteria described above may be used, or criteria other than these may be used. When the second reference or the third reference is used, at least the extracted vertical and horizontal line segments are located on both sides of the center of the first image 108, respectively.

抽出された線分は、選別された線分のうち、画像の各端縁にそれぞれ略平行である線分を該各端縁からの距離に基づき選び、画像を特徴づける特徴量を導出する特徴量導出手段として機能する特徴量導出部20へと受け渡される。特徴量導出部20は、第1の画像108の各端縁、すなわち、各辺に対し略平行な線分を各辺からの距離に基づいて、選別された線分から選び出す。本実施形態では、各辺に最も近い線分を選ぶようにしている。すなわち、具体的には、左辺に対しては、図8において、
−5°<θ<5°
の範囲で最もrの小さい点を選ぶ。また、右辺に対しては、同じ範囲で最もrがXに近い点を選ぶ。また、下辺に対しては、
85°<θ<95°
の範囲で最もrの小さい点を選び、上辺に対しては同じ範囲で最もrがYに近い点を選ぶ。
For the extracted line segment, a line segment that is substantially parallel to each edge of the image is selected from the selected line segments based on the distance from each edge, and a feature amount that characterizes the image is derived. The data is transferred to the feature quantity deriving unit 20 that functions as a quantity deriving unit. The feature quantity deriving unit 20 selects each edge of the first image 108, that is, a line segment substantially parallel to each side, from the selected line segments based on the distance from each side. In the present embodiment, the line segment closest to each side is selected. That is, specifically, for the left side, in FIG.
-5 ° <θ <5 °
The point with the smallest r in the range is selected. For the right side, a point where r is closest to X in the same range is selected. Also, for the lower side,
85 ° <θ <95 °
The point having the smallest r in the range is selected, and the point in the same range where r is closest to Y is selected for the upper side.

なお、選別された線分から各辺に対し略平行な線分を選ぶ際の基準は、各辺に最も近いものに限定されない。たとえば、各辺からの基準となる距離を予め定めておき、当該基準となる距離に最も近い線分を選ぶようにしてもよい。これは、選び出されるべき枠を構成する線分の、各辺からの大まかな距離が予め分かっている場合などに有効である。もちろん、その他の基準に基づき線分を選んでもよい。また、上の説明で、「略平行」とは、画像の歪みを無視した際に実質的に平行と看做してよい関係を意味しており、具体的には、2の線分を延長した際に形成される角の角度が予め定められた値以下である場合に、両者を実質的に平行と看做してよい。   In addition, the reference | standard at the time of selecting a line segment substantially parallel with respect to each edge | side from the selected line segment is not limited to the thing nearest to each edge | side. For example, a reference distance from each side may be determined in advance, and a line segment closest to the reference distance may be selected. This is effective when a rough distance from each side of a line segment constituting a frame to be selected is known in advance. Of course, line segments may be selected based on other criteria. In the above description, “substantially parallel” means a relationship that can be regarded as substantially parallel when image distortion is ignored. Specifically, the line segment 2 is extended. When the angle of the formed angle is equal to or less than a predetermined value, the two may be regarded as substantially parallel.

この動作の結果を、上述の線分選別部19が採用した基準毎に具体的に説明する。   The result of this operation will be specifically described for each reference adopted by the above-described line segment selection unit 19.

まず、第1の基準が採用された場合及び第2の基準が採用された場合には、選別された線分を示す点は、点a、点b、点e、点fである。これらの点はそれぞれ、第1の画像108の各辺に最も近い線分を示しているので、点a、点b、点e、点fがそのまま選ばれる。図6も併せて参照されたい。   First, when the first reference is adopted and when the second reference is adopted, the points indicating the selected line segment are point a, point b, point e, and point f. Since each of these points indicates a line segment closest to each side of the first image 108, the point a, the point b, the point e, and the point f are selected as they are. See also FIG.

また、第3の基準が採用された場合、選別された線分を示す点は、点a、点b、点c、点e、点fである。そして、第1の画像の左辺、右辺、下辺に最も近い線分を示す点はそれぞれ点b、点f、点aであるからこれらが選ばれる。上辺に対しては、最も近い線分を表す点は、点cであるから、この場合は、点cが選ばれる。   When the third criterion is adopted, points indicating the selected line segment are point a, point b, point c, point e, and point f. The points indicating the line segments closest to the left side, the right side, and the lower side of the first image are the point b, the point f, and the point a, respectively. For the upper side, the point representing the closest line segment is the point c. In this case, the point c is selected.

そして、特徴量導出部20は、選び出した線分に基づいて、第1の画像100の特徴量を導出する。前述したように特徴量が具体的にどのような値であるかは限定されないが、選び出した線分の位置を示す情報、具体的には、各線分のr−θ平面上の位置である(r、θ)の値は特徴量の一つである。あるいは、選び出した線分を延長した直線同士が交わる交点の位置もまた、特徴量の一つである。図9は、線分選別部19が第3の基準を採用した場合の、第1の画像108の特徴量である交点110の位置を示す図である。同図中、線分a,b,c,fを延長した直線は破線で示している。本実施形態では、この交点110の位置を特徴量として用いる。もちろん、他の値を特徴量として用いてもよい。   Then, the feature amount deriving unit 20 derives the feature amount of the first image 100 based on the selected line segment. As described above, the specific value of the feature amount is not limited, but information indicating the position of the selected line segment, specifically, the position on the r-θ plane of each line segment ( The value of (r, θ) is one of feature quantities. Alternatively, the position of the intersection where the straight lines obtained by extending the selected line segments intersect is also one of the feature values. FIG. 9 is a diagram illustrating the position of the intersection point 110 that is the feature amount of the first image 108 when the line segment selection unit 19 adopts the third reference. In the figure, straight lines obtained by extending line segments a, b, c, and f are indicated by broken lines. In the present embodiment, the position of the intersection 110 is used as a feature amount. Of course, other values may be used as feature quantities.

特徴量導出部20により導出された第1の画像100の特徴量である第1の特徴量は、図1に示すように、第1の特徴量記憶部6へと受け渡され、記憶される。   The first feature quantity that is the feature quantity of the first image 100 derived by the feature quantity deriving unit 20 is transferred to and stored in the first feature quantity storage unit 6 as shown in FIG. .

また、特徴量導出部20により導出された特徴量は、一の画像について得られた特徴量を記憶する特徴量記憶手段として機能する特徴量記憶部21にも受け渡され、記憶される。   Further, the feature quantity derived by the feature quantity deriving unit 20 is transferred to and stored in the feature quantity storage unit 21 that functions as a feature quantity storage unit that stores the feature quantity obtained for one image.

続いて、第1の画像100に続いて、さらに第2の画像200が画像処理装置1の画像受付部2により受け付けられたものとする。ここで、第2の画像200は、図10に示すとおりであり、その内容はおおむね第1の画像100(図3参照)と同一である。第2の画像200は、枠201、タイトル欄202、承認欄203、外枠204及び図形205が全体として第2の画像200の外形に対し傾いており、また枠201の位置及び大きさも第1の画像100における枠101と若干異なっている。また、図形205は、第1の画像100中の図形105から修正されている。   Subsequently, it is assumed that the second image 200 is received by the image receiving unit 2 of the image processing apparatus 1 following the first image 100. Here, the second image 200 is as shown in FIG. 10, and the contents thereof are almost the same as those of the first image 100 (see FIG. 3). In the second image 200, the frame 201, the title column 202, the approval column 203, the outer frame 204, and the graphic 205 as a whole are inclined with respect to the outer shape of the second image 200, and the position and size of the frame 201 are also the first. This is slightly different from the frame 101 in the image 100 of FIG. In addition, the graphic 205 is corrected from the graphic 105 in the first image 100.

この第2の画像200に対しても、画像補正部12による補正がなされ、続いて線分抽出範囲制限部13により、特徴量記憶部21に記憶されている特徴量に基づいて線分抽出範囲の制限がされる。この処理は、最終的に特徴量導出部20により第1の画像100において選ばれた線分の近傍の範囲のみを線分抽出部18による線分抽出の対象とし、その他の範囲を線分抽出の対象としないよう制限する。より具体的には、特徴量記憶部21に記憶されている特徴量、本実施形態では、交点110(図9参照)の位置を用いて、各交点を結んで得られる直線を得る。この線分は、矩形を構成する。なお、特徴量が、線分のr−θ平面上の位置を示す(r、θ)の値であれば、矩形を構成する直線は直ちに得られる。そして、得られた直線の近傍、例えば、当該直線からある一定の距離までの範囲を線分抽出対象とし、それ以外の範囲は線分抽出対象外とする。線分抽出対象外とする方法は、例えば、線分抽出対象外の範囲を全て白色で塗りつぶしたり、あるいは、かかる範囲を一部分抽出部14及び線分抽出部18における処理の対象外としたりしてもよい。   The second image 200 is also corrected by the image correction unit 12, and then the line segment extraction range based on the feature amount stored in the feature amount storage unit 21 by the line segment extraction range restriction unit 13. There will be restrictions. In this process, only the range in the vicinity of the line segment selected in the first image 100 by the feature quantity deriving unit 20 is finally subjected to line segment extraction by the line segment extracting unit 18, and the other ranges are extracted. Restrict not to be subject to More specifically, using the feature amount stored in the feature amount storage unit 21, in this embodiment, the position of the intersection 110 (see FIG. 9), a straight line obtained by connecting the intersections is obtained. This line segment forms a rectangle. If the feature amount is a value of (r, θ) indicating the position on the r-θ plane of the line segment, a straight line constituting the rectangle is immediately obtained. Then, the vicinity of the obtained straight line, for example, a range from the straight line to a certain distance is set as a line segment extraction target, and the other range is excluded from the line segment extraction target. The method of excluding the line segment extraction target is, for example, painting out the entire range not covered by the line segment extraction with white, or excluding such a range from the processing in the partial extraction unit 14 and the line segment extraction unit 18. Also good.

図11は、線分抽出対象外とする領域を示す図である。同図は、図10に示す第2の画像200上に、第1の画像100について得られた交点110を結んで得られる直線を破線で示している。そして、直線から一定の距離までの範囲の境界は一点鎖線で、線分抽出対象外となるそれ以外の範囲にはハッチングを施した。同図にハッチングで示す領域を線分抽出対象外として制限することで、以降の処理におけるノイズ及び必要な計算量が削減される。   FIG. 11 is a diagram illustrating regions that are not subject to line segment extraction. In the figure, a straight line obtained by connecting the intersection 110 obtained for the first image 100 on the second image 200 shown in FIG. 10 is indicated by a broken line. And the boundary of the range from a straight line to the fixed distance is a dashed-dotted line, and hatching was performed to the other range which is not a line segment extraction object. By limiting the area indicated by hatching in FIG. 5 as being not subject to line segment extraction, noise and necessary calculation amount in the subsequent processing can be reduced.

なお、線分抽出範囲制限部13による制限は、第1の画像100と第2の画像200がおおむね等しい枠101,201を使用することを前提としている。したがって、第2の画像200が第1の画像100と大きく異なる枠を用いる場合には、線分抽出範囲制限部13による制限は行わない。この選択は、ユーザが適宜画像処理装置1に指示するものとすればよい。また、特徴量記憶部21は、必ずしも直前の処理に係る画像の特徴量のみを記憶するようにしなくともよく、例えば、複数の特徴量を記憶しておき、ユーザがどの特徴量に基づいて線分抽出範囲を制限するか選択するようにしてもよい。   Note that the restriction by the line segment extraction range restriction unit 13 is based on the premise that the first image 100 and the second image 200 use substantially the same frames 101 and 201. Accordingly, when the second image 200 uses a frame that is significantly different from the first image 100, the line segment extraction range restriction unit 13 does not perform the restriction. This selection may be made by the user instructing the image processing apparatus 1 as appropriate. The feature amount storage unit 21 does not necessarily store only the feature amount of the image related to the immediately preceding process. For example, the feature amount storage unit 21 stores a plurality of feature amounts, and the user selects a feature amount based on which feature amount. You may make it select whether to limit a part extraction range.

これ以降の動作は、第1の画像100について説明したと同様である。その結果、特徴量導出部20により導出された第2の画像200の特徴量である第2の特徴量は、図1に示すように、第2の特徴量記憶部7へと受け渡され、記憶される。   The subsequent operation is the same as that described for the first image 100. As a result, the second feature quantity that is the feature quantity of the second image 200 derived by the feature quantity deriving unit 20 is transferred to the second feature quantity storage unit 7 as shown in FIG. Remembered.

そして、第1の特徴量記憶部6及び第2の特徴量記憶部7の双方に特徴量が記憶されると、特徴量導出手段により選ばれた線分により囲まれる領域の大きさに基づき選定された一の画像の特徴量に他の画像の特徴量を一致させる線形写像を導出する線形写像導出手段として機能する線形写像導出部8は、第1の特徴量と第2の特徴量を比較し、各々の特徴量が示す線分により囲まれる領域の大きさに基づき選定された画像に、他の画像の特徴量を一致させる線形写像を求める。本実施形態では、選定の基準の一例として、特徴量が示す線分により囲まれる領域の大きさが大きい画像が選定される。そして、線形写像導出部8により求められる線形写像とは、第1の特徴量と第2の特徴量がそれぞれ矩形を構成する直線の交点の位置であるから、それぞれの交点が形成する矩形が大きい方の一方の交点に、他の交点を一致させるような線形写像となる。このような線形写像には種々のものがあり得るが、ここでは、アフィン変換と呼ばれる線形写像の変換係数である行列を求める。アフィン変換は、2次元平面状において、平行移動、回転、拡大縮小を合成した変換である。なお、アフィン変換の変換係数を求める方法は周知の手法を用いればよく、本明細書ではその詳細な説明は割愛する。   When feature quantities are stored in both the first feature quantity storage unit 6 and the second feature quantity storage unit 7, selection is made based on the size of the region surrounded by the line segment selected by the feature quantity deriving means. The linear mapping deriving unit 8 that functions as a linear mapping deriving unit for deriving a linear mapping that matches the feature amount of one image with the feature amount of the other image compares the first feature amount and the second feature amount. Then, a linear map that matches the feature amount of the other image with the image selected based on the size of the region surrounded by the line segment indicated by each feature amount is obtained. In the present embodiment, as an example of selection criteria, an image having a large area surrounded by the line segment indicated by the feature value is selected. The linear mapping obtained by the linear mapping deriving unit 8 is the position of the intersection of the straight lines that form the rectangle, and therefore the rectangle formed by each intersection is large. The linear map is such that the other intersection coincides with one of the other intersections. There are various types of such linear mapping. Here, a matrix which is a transformation coefficient of the linear mapping called affine transformation is obtained. The affine transformation is a transformation obtained by synthesizing translation, rotation, and enlargement / reduction in a two-dimensional plane. Note that a known method may be used as a method for obtaining a conversion coefficient of affine transformation, and detailed description thereof is omitted in this specification.

なお、本実施形態では、線形写像導出部8は、2の画像に対し線形写像を求めることとしたが、これに限定されず、3以上の画像に対し線形写像を求めることとしてもよい。その場合においても、各画像の特徴量が示す線分により囲まれる領域の大きさに基づき選定された画像に、他の画像の特徴量を一致させる線形写像を求めるとよい。   In the present embodiment, the linear mapping deriving unit 8 determines the linear mapping for the two images, but is not limited to this, and may determine the linear mapping for three or more images. Even in this case, it is preferable to obtain a linear map that matches the feature amount of another image with the image selected based on the size of the region surrounded by the line segment indicated by the feature amount of each image.

さらに、画像変換部9は、線形写像導出部8により求められた変換係数を用い、第1の画像記憶部3より得た第1の画像又は第2の画像記憶部4より得た第2の画像の一方を変換し、両者を画像比較部10へと受け渡す。   Further, the image conversion unit 9 uses the conversion coefficient obtained by the linear mapping derivation unit 8 to use the first image obtained from the first image storage unit 3 or the second image obtained from the second image storage unit 4. One of the images is converted, and both are transferred to the image comparison unit 10.

画像比較部10は、受け渡された2の画像を比較し、変化のあった場所を特定できる画像を生成する。より具体的には、受け渡された2の画像の差分を取り、得られた画像を差分画像として、差分画像出力部11へと受け渡す。もちろん、比較の方法は差分を取ることに限定はされず、他の手法を用いてもよい。   The image comparison unit 10 compares the two received images and generates an image that can identify the place where the change has occurred. More specifically, the difference between the two transferred images is taken, and the obtained image is transferred to the difference image output unit 11 as a difference image. Of course, the comparison method is not limited to taking the difference, and other methods may be used.

差分画像出力部11は、受け渡された差分画像を出力する。出力の形式は特に問わず、電気通信回線を通して他の情報端末へと送信してもよいし、モニタに表示しても、プリンタにより印刷しても、任意の情報記録媒体に記録するようにしてもよい。   The difference image output unit 11 outputs the delivered difference image. The output format is not particularly limited, and it may be transmitted to other information terminals through a telecommunication line, displayed on a monitor, printed by a printer, or recorded on an arbitrary information recording medium. Also good.

ここで、図3に示す第1の画像100及び図10に示す第2の画像200が画像処理装置1に受け渡され、線形写像導出部8が、第2の画像200を変換する変換係数を導出した場合を例として想定する。   Here, the first image 100 shown in FIG. 3 and the second image 200 shown in FIG. 10 are transferred to the image processing apparatus 1, and the linear mapping deriving unit 8 sets conversion coefficients for converting the second image 200. The case where it derives is assumed as an example.

この場合、画像変換部9により第2の画像200は変換され、図12に示すようにその傾き、位置、大きさが修正された第2の画像206が得られる。   In this case, the second image 200 is converted by the image conversion unit 9, and a second image 206 whose inclination, position, and size are corrected as shown in FIG. 12 is obtained.

そして、画像比較部10により第1の画像100と第2の画像206の差分がとられ、図13に示す差分画像300が得られる。差分画像300は、第1の画像100と第2の画像206との間で、異なっている部分のみを図示する画像である。   Then, the difference between the first image 100 and the second image 206 is taken by the image comparison unit 10, and a difference image 300 shown in FIG. 13 is obtained. The difference image 300 is an image illustrating only a portion that is different between the first image 100 and the second image 206.

このように、本実施形態の画像処理装置1は、複数の画像が回転・平行移動・拡大縮小等により互いに変形している場合であっても、画像に含まれる枠を構成する線分の配置を正しく求め、当該線分の配置に基づいて特徴量を導出する。そして、そのようにして導出された特徴量に基づいて得られた線形写像により、複数の画像間の変形が除去されるので、かかる変形の程度がある限度よりも大きい場合であっても、一の画像と他の画像が正しく比較される。   As described above, the image processing apparatus 1 according to the present embodiment arranges line segments constituting a frame included in an image even when a plurality of images are deformed by rotation, parallel movement, enlargement / reduction, and the like. Is calculated correctly, and a feature amount is derived based on the arrangement of the line segment. Then, since the deformation between the plurality of images is removed by the linear mapping obtained based on the feature amount derived in this way, even if the degree of the deformation is larger than a certain limit, one Will be compared correctly with other images.

以上本実施形態の説明では、画像処理装置1は2つの画像を比較しているが、これに限定されず、3以上の画像を互いに比較するようにしてもよい。その場合、指定された画像に対し他の画像を比較するようにしてよい。   In the above description of the present embodiment, the image processing apparatus 1 compares two images. However, the present invention is not limited to this, and three or more images may be compared with each other. In that case, another image may be compared with the designated image.

また、以上の説明において、画像処理装置1、線形写像導出部8及び画像処理装置1の具体的な機能ブロックの構成は一例として示したものであり、これに限定されない。本発明の技術的範囲は、特許請求の範囲の記載に基づいて定められる。   In the above description, specific functional block configurations of the image processing apparatus 1, the linear mapping derivation unit 8, and the image processing apparatus 1 are shown as an example, and the present invention is not limited thereto. The technical scope of the present invention is defined based on the description of the scope of claims.

1 画像処理装置、2 画像受付部、3 第1の画像記憶部、4 第2の画像記憶部、5 画像特徴量導出部、6 第1の特徴量記憶部、7 第2の特徴量記憶部、8 線形写像導出部、9 画像変換部、10 画像比較部、11 差分画像出力部、12 画像補正部、13 線分抽出範囲制限部、14 一部分抽出部、15 輪郭図形取得部、16 連結図形識別部、17 最大連結図形取得部、18 線分抽出部、19 線分選別部、20 特徴量導出部、21 特徴量記憶部、100 第1の画像、101 枠、102 タイトル欄、103 承認欄、104 外枠、105 図形、106,107,108,109 第1の画像、110 交点、200 第2の画像、201 枠、202 タイトル欄、203 承認欄、204 外枠、205 図形、206 第2の画像、300 差分画像。   DESCRIPTION OF SYMBOLS 1 Image processing apparatus, 2 Image reception part, 3 1st image storage part, 4 2nd image storage part, 5 Image feature-value derivation | leading-out part, 6 1st feature-value storage part, 7 2nd feature-value storage part 8 Linear mapping derivation unit 9 Image conversion unit 10 Image comparison unit 11 Difference image output unit 12 Image correction unit 13 Line segment extraction range restriction unit 14 Partial extraction unit 15 Contour figure acquisition unit 16 Connected figure Identification unit, 17 Maximum connected figure acquisition unit, 18 line segment extraction unit, 19 line segment selection unit, 20 feature amount derivation unit, 21 feature amount storage unit, 100 first image, 101 frame, 102 title column, 103 approval column 104 Outer frame, 105 figure, 106, 107, 108, 109 First image, 110 Intersection, 200 Second image, 201 frame, 202 Title field, 203 Approval field, 204 Outer frame, 205 Figure, 206 Second image, 300 difference image.

Claims (6)

画像に含まれる線分を抽出する線分抽出手段と、
抽出された前記線分のうち、予め定められた基準に基づき線分を選別する線分選別手段と、
選別された前記線分のうち、前記画像の各端縁にそれぞれ略平行である線分を該各端縁からの距離に基づき選び、前記画像を特徴づける特徴量を導出する特徴量導出手段と、
前記特徴量導出手段により選ばれた線分により囲まれる領域の大きさに基づき選定された一の画像の特徴量に他の画像の特徴量を一致させる線形写像を導出する線形写像導出手段と、
前記一の画像と、前記線形写像導出手段により導出された線形写像により変換された他の画像とを比較する画像比較手段と、
を有する画像処理装置。
A line segment extracting means for extracting a line segment included in the image;
Of the extracted line segments, line segment sorting means for sorting line segments based on a predetermined criterion;
Feature amount deriving means for deriving a feature amount characterizing the image by selecting a line segment substantially parallel to each edge of the image from the selected line segments based on a distance from the edge; ,
Linear mapping derivation means for deriving a linear mapping that matches the feature quantity of another image with the feature quantity of one image selected based on the size of the region surrounded by the line segment selected by the feature quantity derivation means;
Image comparing means for comparing the one image with another image transformed by the linear mapping derived by the linear mapping deriving means;
An image processing apparatus.
前記画像に含まれる図形の一部分を抽出し、当該一部分を新たに前記画像とする一部分抽出手段を有する請求項1記載の画像処理装置。   The image processing apparatus according to claim 1, further comprising a partial extraction unit that extracts a part of a graphic included in the image and newly sets the part as the image. 前記一部分抽出手段は、前記画像の外縁又は外縁近傍の少なくとも一点を起点とする塗りつぶし処理により得られる図形の輪郭を示す図形である輪郭図形を取得する輪郭図形取得手段を有する請求項2記載の画像処理装置。   3. The image according to claim 2, wherein the partial extraction unit includes a contour graphic acquisition unit that acquires a contour graphic that is a graphic indicating a contour of a graphic obtained by a painting process starting from at least one point of the outer edge or the vicinity of the outer edge of the image. Processing equipment. 前記一部分抽出手段は、
前記画像に含まれる連結した図形である連結図形を識別する連結図形識別手段と、
前記連結図形のうち、最大の連結図形である最大連結図形を取得する最大連結図形取得手段と、
を有する請求項2又は3記載の画像処理装置。
The partial extraction means includes
Connected figure identifying means for identifying a connected figure that is a connected figure included in the image;
Among the connected figures, maximum connected figure acquisition means for acquiring the maximum connected figure which is the maximum connected figure,
The image processing apparatus according to claim 2, further comprising:
一の前記画像について得られた前記特徴量を記憶する特徴量記憶手段と、
前記特徴量記憶手段に記憶された前記特徴量に基づいて、前記線分抽出手段が他の前記画像について線分を抽出する範囲を制限する線分抽出範囲制限手段と、
を有する請求項1乃至4の何れかに記載の画像処理装置。
Feature quantity storage means for storing the feature quantity obtained for one of the images;
A line segment extraction range limiting unit that limits a range in which the line segment extraction unit extracts a line segment for the other image based on the feature amount stored in the feature amount storage unit;
An image processing apparatus according to claim 1, comprising:
コンピュータを、
画像に含まれる線分を抽出する線分抽出手段と、
抽出された前記線分のうち、予め定められた基準に基づき線分を選別する線分選別手段と、
選別された前記線分のうち、前記画像の各端縁に略平行である線分を該各端縁からの距離に基づき選び、前記画像を特徴づける特徴量を導出する特徴量導出手段と、
前記特徴量導出手段により選ばれた線分により囲まれる領域の大きさに基づき選定された一の画像の特徴量に他の画像の特徴量を一致させる線形写像を導出する線形写像導出手段と、
前記一の画像と、前記線形写像導出手段により導出された線形写像により変換された他の画像とを比較する画像比較手段と、
として機能させるコンピュータプログラム。
Computer
A line segment extracting means for extracting a line segment included in the image;
Of the extracted line segments, line segment sorting means for sorting line segments based on a predetermined criterion;
Of the selected line segments, a line segment that is substantially parallel to each edge of the image is selected based on the distance from each edge, and a feature value deriving unit that derives a feature value that characterizes the image;
Linear mapping derivation means for deriving a linear mapping that matches the feature quantity of another image with the feature quantity of one image selected based on the size of the region surrounded by the line segment selected by the feature quantity derivation means;
Image comparing means for comparing the one image with another image transformed by the linear mapping derived by the linear mapping deriving means;
A computer program that functions as a computer program.
JP2009188157A 2009-08-14 2009-08-14 Image processing apparatus and computer program Expired - Fee Related JP5418057B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009188157A JP5418057B2 (en) 2009-08-14 2009-08-14 Image processing apparatus and computer program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009188157A JP5418057B2 (en) 2009-08-14 2009-08-14 Image processing apparatus and computer program

Publications (2)

Publication Number Publication Date
JP2011039896A true JP2011039896A (en) 2011-02-24
JP5418057B2 JP5418057B2 (en) 2014-02-19

Family

ID=43767580

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009188157A Expired - Fee Related JP5418057B2 (en) 2009-08-14 2009-08-14 Image processing apparatus and computer program

Country Status (1)

Country Link
JP (1) JP5418057B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017215946A (en) * 2016-05-31 2017-12-07 コニカ ミノルタ ラボラトリー ユー.エス.エー.,インコーポレイテッド Robust method for tracing lines of table

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07220023A (en) * 1994-01-31 1995-08-18 Hitachi Ltd Method and device for table recognition
JP2001283231A (en) * 2000-03-29 2001-10-12 Toshiba Corp Document image filing device and document image updating method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07220023A (en) * 1994-01-31 1995-08-18 Hitachi Ltd Method and device for table recognition
JP2001283231A (en) * 2000-03-29 2001-10-12 Toshiba Corp Document image filing device and document image updating method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017215946A (en) * 2016-05-31 2017-12-07 コニカ ミノルタ ラボラトリー ユー.エス.エー.,インコーポレイテッド Robust method for tracing lines of table

Also Published As

Publication number Publication date
JP5418057B2 (en) 2014-02-19

Similar Documents

Publication Publication Date Title
US8634659B2 (en) Image processing apparatus, computer readable medium storing program, and image processing method
JP4847592B2 (en) Method and system for correcting distorted document images
US10289924B2 (en) System and method for scanned document correction
CN111127339B (en) Method and device for correcting trapezoidal distortion of document image
US20120294528A1 (en) Method of Detecting and Correcting Digital Images of Books in the Book Spine Area
JP5616308B2 (en) Document modification detection method by character comparison using character shape feature
JP5387193B2 (en) Image processing system, image processing apparatus, and program
JPH03201866A (en) Decision of picture skew angle from data including data of compressed form
JP2009278363A (en) Image processor and image processing method
US20130120806A1 (en) Image processing apparatus, line detection method, and computer-readable, non-transitory medium
JP5675194B2 (en) Image processing apparatus, image processing method, and program
JP5042917B2 (en) Image processing apparatus and program
CN115619656A (en) Digital file deviation rectifying method and system
US8229214B2 (en) Image processing apparatus and image processing method
JP5005732B2 (en) Image forming apparatus and image processing method
JP5418057B2 (en) Image processing apparatus and computer program
JP4208520B2 (en) Image processing apparatus, image processing method, program, and storage medium
JP2017174031A (en) Image processing apparatus and image processing program
AU2008264171A1 (en) Print quality assessment method
CN114529922A (en) Method for identifying table structure of wireless frame table image
JP2008113145A (en) Image processor and image processing program
JP2009105541A (en) Image processing apparatus, method and program
JP4803001B2 (en) Image processing apparatus and image processing program
JP5180412B1 (en) Information processing apparatus, information processing method, and program
JP5146199B2 (en) Difference extraction apparatus and difference extraction program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20120719

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20130603

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20130625

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20130823

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20131022

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20131104

R150 Certificate of patent or registration of utility model

Ref document number: 5418057

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees